mod_cgi.html revision c9ba2370d003b2c4d07e295d30b313566386a194
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen KuksaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa This file is generated from xml source: DO NOT EDIT
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen KuksaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa--><title>mod_cgi - Apache HTTP Server</title><link rel="stylesheet" type="text/css" href="/style/manual.css"/></head><body><blockquote><div align="center"><img src="/images/sub.gif" alt="[APACHE DOCUMENTATION]"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_cgi</h1><table bgcolor="#cccccc" cellpadding="0" cellspacing="1"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Execution of CGI scripts</td></tr><tr><td><a class="help" href="module-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="module-dict.html#ModuleIdentifier">Module Identifier:</a></td><td>cgi_module</td></tr></table></td></tr></table><h2>Summary</h2>
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <p>Any file that has the mime type
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <code>cgi-script</code> (Apache 1.1 or later) will be treated
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa as a CGI script, and run by the server, with its output being
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa returned to the client. Files acquire this type either by
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa having a name containing an extension defined by the
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <a class="directive" href="mod_mime.html#addtype"><code class="directive">AddType</code></a> directive, or by being
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa in a <a class="directive" href="mod_alias.html#scriptalias"><code class="directive">ScriptAlias</code></a>
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa directory.</p>
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <p>When the server invokes a CGI script, it will add a variable
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa called <code>DOCUMENT_ROOT</code> to the environment. This
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa variable will contain the value of the
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <a class="directive" href="core.html#documentroot"><code class="directive">DocumentRoot</code></a> configuration
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa variable.</p>
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <p>For an introduction to using CGI scripts with Apache, see
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa our tutorial on <a href="/howto/cgi.html">Dynamic Content
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <p>When using a multi-threaded MPM under unix, the module
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa <code><a href="mod_cgid.html">mod_cgid</a></code> should be used in place of
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa this module. At the user level, the two modules are essentially
f0e0f09f12a9e9ce36023d339a7e35548df5bbc2Eugen Kuksa identical.</p>
<h2>Directives</h2><ul><li><a href="#scriptlog">ScriptLog</a></li><li><a href="#scriptlogbuffer">ScriptLogBuffer</a></li><li><a href="#scriptloglength">ScriptLogLength</a></li></ul><p><strong>See also </strong></p><ul><li><a class="directive" href="core.html#options"><code class="directive">Options</code></a></li><li><a class="directive" href="mod_alias.html#scriptalias"><code class="directive">ScriptAlias</code></a></li><li><a class="directive" href="mod_mime.html#addhandler"><code class="directive">AddHandler</code></a></li></ul><h2>CGI Environment variables</h2>
<dd>This will not be available if the <a class="directive" href="core.html#acceptpathinfo"><code class="directive">AcceptPathInfo</code></a> directive is explicitly set to
<dd>This will only be set if <a class="directive" href="core.html#hostnamelookups"><code class="directive">HostnameLookups</code></a> is set to <code>on</code> (it
<dd>This will only be set if <a class="directive" href="core.html#identitycheck"><code class="directive">IdentityCheck</code></a> is set to
<hr/><h2><a name="ScriptLog">ScriptLog</a> <a name="scriptlog">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Location of the CGI script error logfile</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>ScriptLog <em>file-path</em></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td><code><a href="mod_cgi.html">mod_cgi</a></code>, <code><a href="mod_cgid.html">mod_cgid</a></code></td></tr></table></td></tr></table>
as, ie. the user specified in the main <a class="directive" href="mpm_common.html#user"><code class="directive">User</code></a> directive. This means that
<hr/><h2><a name="ScriptLogBuffer">ScriptLogBuffer</a> <a name="scriptlogbuffer">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maximum amount of PUT or POST requests that will be recorded
in the scriptlog</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>ScriptLogBuffer <em>bytes</em></td></tr><tr><td><a class="help" href="directive-dict.html#Default">Default:</a></td><td><code>ScriptLogBuffer 1024</code></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td><code><a href="mod_cgi.html">mod_cgi</a></code>, <code><a href="mod_cgid.html">mod_cgid</a></code></td></tr></table></td></tr></table>
<hr/><h2><a name="ScriptLogLength">ScriptLogLength</a> <a name="scriptloglength">Directive</a></h2><table bgcolor="#cccccc" border="0" cellspacing="0" cellpadding="1"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Size limit of the CGI script logfile</td></tr><tr><td><a class="help" href="directive-dict.html#Syntax">Syntax:</a></td><td>ScriptLogLength <em>bytes</em></td></tr><tr><td><a class="help" href="directive-dict.html#Default">Default:</a></td><td><code>ScriptLogLength 10385760</code></td></tr><tr><td><a class="help" href="directive-dict.html#Context">Context:</a></td><td>server config</td></tr><tr><td><a class="help" href="directive-dict.html#Status">Status:</a></td><td>Base</td></tr><tr><td><a class="help" href="directive-dict.html#Module">Module:</a></td><td><code><a href="mod_cgi.html">mod_cgi</a></code>, <code><a href="mod_cgid.html">mod_cgid</a></code></td></tr></table></td></tr></table>