<p>The server will set the CGI environment variables as described
in the <a href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI
specification</a>, with the following provisions:</p>
<dl>
<dt>PATH_INFO</dt>
<dd>This will not be available if the <code class="directive"><a href="../mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> directive is explicitly set to
<code>off</code>. The default behavior, if <code class="directive">AcceptPathInfo</code> is not given, is that <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> will accept path info (trailing <code>
/more/path/info</code> following the script filename in the URI),
while the core server will return a 404 NOT FOUND error for requests
with additional path info. Omitting the <code class="directive">AcceptPathInfo</code> directive has the same effect as setting
it <code>On</code> for <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> requests.</dd>
<dt>REMOTE_HOST</dt>
<dd>This will only be set if <code class="directive"><a href="../mod/core.html#hostnamelookups">HostnameLookups</a></code> is set to <code>on</code> (it
is off by default), and if a reverse DNS lookup of the accessing
host's address indeed finds a host name.</dd>
<dt>REMOTE_IDENT</dt>
<dd>This will only be set if <code class="directive"><a href="../mod/core.html#identitycheck">IdentityCheck</a></code> is set to
<code>on</code> and the accessing host supports the ident
protocol. Note that the contents of this variable cannot be
relied upon because it can easily be faked, and if there is a
proxy between the client and the server, it is usually
totally useless.</dd>
<dt>REMOTE_USER</dt>
<dd>This will only be set if the CGI script is subject to
<p>The <code class="directive">ScriptLog</code> directive sets the CGI
script error logfile. If no <code class="directive">ScriptLog</code> is given,
no error log is created. If given, any CGI errors are logged into the
filename given as argument. If this is a relative file or path it is
taken relative to the <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>.
</p>
<div class="example"><h3>Example</h3><p><code>
ScriptLog logs/cgi_log
</code></p></div>
<p>This log will be opened as the user the child processes run
as, <em>i.e.</em> the user specified in the main <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code> directive. This means that
either the directory the script log is in needs to be writable
by that user or the file needs to be manually created and set
to be writable by that user. If you place the script log in
your main logs directory, do <strong>NOT</strong> change the
directory permissions to make it writable by the user the child
processes run as.</p>
<p>Note that script logging is meant to be a debugging feature
when writing CGI scripts, and is not meant to be activated
continuously on running servers. It is not optimized for speed
or efficiency, and may have security problems if used in a
manner other than that for which it was designed.</p>
<p><code class="directive">ScriptLogLength</code> can be used to limit the
size of the CGI script logfile. Since the logfile logs a lot of
information per CGI error (all request headers, all script output)
it can grow to be a big file. To prevent problems due to unbounded
growth, this directive can be used to set an maximum file-size for
the CGI logfile. If the file exceeds this size, no more
information will be written to it.</p>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_cgi.html" title="English"> en </a> |
<a href="../ja/mod/mod_cgi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_cgi.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>