httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject cvs commit: httpd-2.0/docs/manual/mod mod_cgi.xml mod_cgid.xml mod_cgi.html mod_cgid.html
Date Fri, 01 Mar 2002 22:16:24 GMT
slive       02/03/01 14:16:23

  Modified:    docs/manual/mod mod_cgi.html mod_cgid.html
  Added:       docs/manual/mod mod_cgi.xml mod_cgid.xml
  Log:
  XML conversions of mod_cgi and mod_cgid.
  
  Revision  Changes    Path
  1.26      +323 -175  httpd-2.0/docs/manual/mod/mod_cgi.html
  
  Index: mod_cgi.html
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_cgi.html,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -d -b -u -r1.25 -r1.26
  --- mod_cgi.html	13 Dec 2001 18:19:21 -0000	1.25
  +++ mod_cgi.html	1 Mar 2002 22:16:23 -0000	1.26
  @@ -1,178 +1,273 @@
  -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  -
  -<html xmlns="http://www.w3.org/1999/xhtml">
  -  <head>
  -    <meta name="generator" content="HTML Tidy, see www.w3.org" />
  -
  -    <title>Apache module mod_cgi</title>
  -  </head>
  -  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  -
  -  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
  -  vlink="#000080" alink="#FF0000">
  -    <!--#include virtual="header.html" -->
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  +<!--
  +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  +     This file is generated from xml source: DO NOT EDIT
  +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  +-->
  +<title>mod_cgi - Apache HTTP Server</title>
  +<link href="../style/manual.css" type="text/css" rel="stylesheet">
  +</head>
  +<body>
  +<blockquote>
  +<div align="center">
  +<img alt="[APACHE DOCUMENTATION]" src="../images/sub.gif"><h3>Apache HTTP Server
Version 2.0</h3>
  +</div>
  +<h1 align="center">Apache Module mod_cgi</h1>
  +<table cellspacing="1" cellpadding="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table bgcolor="#ffffff">
  +<tr>
  +<td><span class="help">Description:</span></td><td>
  +<description>Execution of CGI scripts</description>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="module-dict.html#ModuleIdentifier" class="help">Module&nbsp;Identifier:</a></td><td>cgi_module</td>
  +</tr>
  +</table>
  +</td>
  +</tr>
  +</table>
  +<h2>Summary</h2>
  +<summary>
   
  -    <h1 align="CENTER">Module mod_cgi</h1>
   
  -    <p>This module provides for execution of CGI scripts.</p>
   
  -    <p><a href="module-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> Base<br />
  -     <a href="module-dict.html#SourceFile"
  -    rel="Help"><strong>Source File:</strong></a> mod_cgi.c<br />
  -     <a href="module-dict.html#ModuleIdentifier"
  -    rel="Help"><strong>Module Identifier:</strong></a>
  -    cgi_module</p>
   
  -    <h2>Summary</h2>
  -    <!-- XXX: Should have references to CGI definition/RFC -->
  -    <!-- XXX: Should mention Options ExecCGI  -->
  -    <!-- XXX: Should mention AcceptPathInfo   -->
   
  -    <p>Any file that has the mime type
  +<p>Any file that has the mime type
       <code>application/x-httpd-cgi</code> or handler
       <code>cgi-script</code> (Apache 1.1 or later) will be treated
       as a CGI script, and run by the server, with its output being
       returned to the client. Files acquire this type either by
  -    having a name containing an extension defined by the <a
  -    href="mod_mime.html#addtype">AddType</a> directive, or by being
  -    in a <a href="mod_alias.html#scriptalias">ScriptAlias</a>
  +    having a name containing an extension defined by the 
  +    <code class="directive"><a href="mod_mime.html#addtype" class="directive">AddType</a></code>
directive, or by being
  +    in a <code class="directive"><a href="mod_alias.html#scriptalias" class="directive">ScriptAlias</a></code>
       directory.</p>
   
  -    <p>When the server invokes a CGI script, it will add a variable
  +    
  +<p>When the server invokes a CGI script, it will add a variable
       called <code>DOCUMENT_ROOT</code> to the environment. This
  -    variable will contain the value of the <a
  -    href="core.html#documentroot">DocumentRoot</a> configuration
  +    variable will contain the value of the
  +    <code class="directive"><a href="core.html.html#documentroot" class="directive">DocumentRoot</a></code>
configuration
       variable.</p>
   
  -    <p>For an introduction to using CGI scripts with Apache, see
  +    
  +<p>For an introduction to using CGI scripts with Apache, see
       our tutorial on <a href="../howto/cgi.html">Dynamic Content
       With CGI</a>.</p>
   
  -    <p>When using a multi-threaded MPM under unix, the module <a
  -    href="mod_cgid.html">mod_cgid</a> should be used in place of
  +    
  +<p>When using a multi-threaded MPM under unix, the module 
  +    <code><a href="mod_cgid.html">mod_cgid</a></code> should be
used in place of
       this module. At the user level, the two modules are essentially
       identical.</p>
   
  -    <h2>Directives</h2>
  +</summary>
  +<p>
  +<strong>See also:</strong>
  +</p>
  +<ul>
  +<li>
  +<code class="directive"><a href="core.html#options" class="directive">Options</a></code>
  +</li>
  +<li>
  +<code class="directive"><a href="mod_alias.html#scriptalias" class="directive">ScriptAlias</a></code>
  +</li>
  +<li>
  +<code class="directive"><a href="mod_mime.html#addhandler" class="directive">AddHandler</a></code>
  +</li>
  +</ul>
  +<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>
  +<h2>CGI Environment variables</h2>
   
  -    <ul>
  -      <li><a href="#scriptlog">ScriptLog</a></li>
  +<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>
   
  -      <li><a href="#scriptloglength">ScriptLogLength</a></li>
   
  -      <li><a href="#scriptlogbuffer">ScriptLogBuffer</a></li>
  -    </ul>
  +<dl>
   
  -    <p>See also: <a href="core.html#options">Options</a>, <a
  -    href="mod_alias.html#scriptalias">ScriptAlias</a>, <a
  -    href="mod_mime.html#addtype">AddType</a> and <a
  -    href="mod_mime.html#addhandler">AddHandler</a>.</p>
  +<dt>PATH_INFO</dt>
   
  -    <h2>CGI Environment variables</h2>
  -    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: 
   
  -    <dl>
  -      <dt>PATH_INFO</dt>
  +<dd>This will not be available if the <code class="directive"><a href="core.html#acceptpathinfo"
class="directive">AcceptPathInfo</a></code> directive is explicitly set to
  +      <code>off</code>.  The default behavior, if AcceptPathInfo is
  +      not given, is that mod_cgi will accept path info (trailing
  +      /more/path/info 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 AcceptPathInfo
  +      directive has the same effect as setting it <code>on</code> for
  +      mod_cgi requests.</dd>
   
  -      <dd>This will not be available if the <a
  -      href="core.html#acceptpathinfo"><code>AcceptPathInfo</code></a>
  -      directive is explicitly set to <code>off</code>.  The default
  -      behavior, if AcceptPathInfo is not given, is that mod_cgi will
  -      accept path info (trailing /more/path/info 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 AcceptPathInfo directive has the same effect as 
  -      setting it <code>on</code> for mod_cgi requests.</dd>
   
  -      <dt>REMOTE_HOST</dt>
  +<dt>REMOTE_HOST</dt>
   
  -      <dd>This will only be set if <a
  -      href="core.html#hostnamelookups"><code>HostnameLookups</code></a>
  -      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="core.html#hostnamelookups"
class="directive">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>
   
  -      <dd>This will only be set if <a
  -      href="core.html#identitycheck">IdentityCheck</a> is set to
  +      
  +<dt>REMOTE_IDENT</dt>
  +
  +      
  +<dd>This will only be set if <code class="directive"><a href="core.html#identitycheck"
class="directive">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
  +<dt>REMOTE_USER</dt>
  +
  +      
  +<dd>This will only be set if the CGI script is subject to
         authentication.</dd>
  -    </dl>
   
  -    <h2><a id="cgi_debug" name="cgi_debug">CGI Debugging</a></h2>
  -    Debugging CGI scripts has traditionally been difficult, mainly
  +</dl>
  +
  +<h2>
  +<a name="cgi_debug">CGI Debugging</a>
  +</h2>
  +    
  +<p>Debugging CGI scripts has traditionally been difficult, mainly
       because it has not been possible to study the output (standard
       output and error) for scripts which are failing to run
       properly. These directives, included in Apache 1.2 and later,
  -    provide more detailed logging of errors when they occur. 
  +    provide more detailed logging of errors when they occur. </p>
   
  -    <h2>CGI Logfile Format</h2>
  -    When configured, the CGI error log logs any CGI which does not
  +
  +<h3>CGI Logfile Format</h3>
  +    
  +<p>When configured, the CGI error log logs any CGI which does not
       execute properly. Each CGI script which fails to operate causes
       several lines of information to be logged. The first two lines
  -    are always of the format: 
  -<pre>
  +    are always of the format:</p>
  +
  +<blockquote>
  +<table cellpadding="10">
  +<tr>
  +<td bgcolor="#eeeeee"><code>
     %% [<em>time</em>] <em>request-line</em>
  +<br>
     %% <em>HTTP-status</em> <em>CGI-script-filename</em>
  -</pre>
  -    If the error is that CGI script cannot be run, the log file
  -    will contain an extra two lines: 
  -<pre>
  -  %%error
  -  <em>error-message</em>
  -</pre>
  -    Alternatively, if the error is the result of the script
  +</code></td>
  +</tr>
  +</table>
  +</blockquote>
  +    
  +<p>If the error is that CGI script cannot be run, the log file
  +    will contain an extra two lines:</p>
  +
  +<blockquote>
  +<table cellpadding="10">
  +<tr>
  +<td bgcolor="#eeeeee"><code>
  +  %%error<br>
  +  
  +<em>error-message</em>
  +</code></td>
  +</tr>
  +</table>
  +</blockquote>
  +    
  +<p>Alternatively, if the error is the result of the script
       returning incorrect header information (often due to a bug in
  -    the script), the following information is logged: 
  -<pre>
  -  %request
  -  <em>All HTTP request headers received</em>
  -  <em>POST or PUT entity (if any)</em>
  -  %response
  -  <em>All headers output by the CGI script</em>
  -  %stdout
  -  <em>CGI standard output</em>
  -  %stderr
  -  <em>CGI standard error</em>
  -</pre>
  -    (The %stdout and %stderr parts may be missing if the script did
  -    not output anything on standard output or standard error). 
  -    <hr />
  +    the script), the following information is logged: </p>
   
  -    <h3><a id="scriptlog" name="scriptlog">ScriptLog</a>
  -    directive</h3>
  -    <a href="directive-dict.html#Syntax"
  -    rel="Help"><strong>Syntax:</strong></a> ScriptLog
  -    <em>filename</em><br />
  -     <a href="directive-dict.html#Default"
  -    rel="Help"><strong>Default:</strong></a> none<br />
  -     <a href="directive-dict.html#Context"
  -    rel="Help"><strong>Context:</strong></a> server config<br />
  -     <a href="directive-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> mod_cgi 
  +<blockquote>
  +<table cellpadding="10">
  +<tr>
  +<td bgcolor="#eeeeee"><code>
  +  %request<br>
   
  -    <p>The <tt>ScriptLog</tt> directive sets the CGI script error
  -    logfile. If no ScriptLog 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
  +<em>All HTTP request headers received</em>
  +<br>
  +  
  +<em>POST or PUT entity (if any)</em>
  +<br>
  +  %response<br>
  +  
  +<em>All headers output by the CGI script</em>
  +<br>
  +  %stdout<br>
  +  
  +<em>CGI standard output</em>
  +<br>
  +  %stderr<br>
  +  
  +<em>CGI standard error</em>
  +<br>
  +
  +</code></td>
  +</tr>
  +</table>
  +</blockquote>
  +    
  +<p>(The %stdout and %stderr parts may be missing if the script did
  +    not output anything on standard output or standard error). </p>
  +
  +
  +<hr>
  +<h2>
  +<a name="ScriptLog">ScriptLog</a> <a name="scriptlog">Directive</a>
  +</h2>
  +<table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table width="100%" bgcolor="#ffffff">
  +<tr>
  +<td><strong>Description: </strong></td><td>Location of the
CGI script error logfile</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>
  +<syntax>ScriptLog <em>file-path</em>
  +</syntax>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server
config</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Module" class="help">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>
  +<usage>
  +    
  +<p>The <code class="directive">ScriptLog</code> directive sets the CGI
  +    script error logfile. If no ScriptLog 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 server root.</p>
   
  -    <p>This log will be opened as the user the child processes run
  -    as, ie. the user specified in the main <a
  -    href="core.html#User">User</a> directive. This means that
  +    
  +<p>This log will be opened as the user the child processes run
  +    as, ie. the user specified in the main <code class="directive"><a href="mpm_common.html#user"
class="directive">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
  @@ -180,52 +275,105 @@
       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
  +    
  +<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>
  -    <hr />
   
  -    <h3><a id="scriptloglength"
  -    name="scriptloglength">ScriptLogLength</a> directive</h3>
  -    <a href="directive-dict.html#Syntax"
  -    rel="Help"><strong>Syntax:</strong></a> ScriptLogLength
  -    <em>bytes</em><br />
  -     <a href="directive-dict.html#Default"
  -    rel="Help"><strong>Default:</strong></a> 10385760<br />
  -     <a href="directive-dict.html#Context"
  -    rel="Help"><strong>Context:</strong></a> server config<br />
  -     <a href="directive-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> mod_cgi 
  -
  -    <p><tt>ScriptLogLength</tt> 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>
  -    <hr />
  -
  -    <h3><a id="scriptlogbuffer"
  -    name="scriptlogbuffer">ScriptLogBuffer</a></h3>
  -    <a href="directive-dict.html#Syntax"
  -    rel="Help"><strong>Syntax:</strong></a> ScriptLogBuffer
  -    <em>bytes</em><br />
  -     <a href="directive-dict.html#Default"
  -    rel="Help"><strong>Default:</strong></a> 1024<br />
  -     <a href="directive-dict.html#Context"
  -    rel="Help"><strong>Context:</strong></a> server config<br />
  -     <a href="directive-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> mod_cgi 
  +</usage>
  +<hr>
  +<h2>
  +<a name="ScriptLogBuffer">ScriptLogBuffer</a> <a name="scriptlogbuffer">Directive</a>
  +</h2>
  +<table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table width="100%" 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 href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>
  +<syntax>ScriptLogBuffer <em>bytes</em>
  +</syntax>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ScriptLogBuffer
1024</code></td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server
config</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Module" class="help">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>
  +<usage>
   
  -    <p>The size of any PUT or POST entity body that is logged to
  +<p>The size of any PUT or POST entity body that is logged to
       the file is limited, to prevent the log file growing too big
       too quickly if large bodies are being received. By default, up
       to 1024 bytes are logged, but this can be changed with this
  -    directive. <!--#include virtual="footer.html" -->
  -    </p>
  -  </body>
  -</html>
  +    directive.</p>
  +
  +</usage>
  +<hr>
  +<h2>
  +<a name="ScriptLogLength">ScriptLogLength</a> <a name="scriptloglength">Directive</a>
  +</h2>
  +<table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table width="100%" bgcolor="#ffffff">
  +<tr>
  +<td><strong>Description: </strong></td><td>Size limit of
the CGI script logfile</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>
  +<syntax>ScriptLogLength <em>bytes</em>
  +</syntax>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ScriptLogLength
10385760</code></td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server
config</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Module" class="help">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>
  +<usage>
   
  +<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>
  +
  +</usage>
  +<hr>
  +<h3 align="center">Apache HTTP Server Version 2.0</h3>
  +<a href="./"><img alt="Index" src="../images/index.gif"></a><a href="../"><img
alt="Home" src="../images/home.gif"></a>
  +</blockquote>
  +</body>
  +</html>
  
  
  
  1.4       +115 -73   httpd-2.0/docs/manual/mod/mod_cgid.html
  
  Index: mod_cgid.html
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_cgid.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -d -b -u -r1.3 -r1.4
  --- mod_cgid.html	13 Dec 2001 18:19:21 -0000	1.3
  +++ mod_cgid.html	1 Mar 2002 22:16:23 -0000	1.4
  @@ -1,40 +1,56 @@
  -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  -    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  -
  -<html xmlns="http://www.w3.org/1999/xhtml">
  -  <head>
  -    <meta name="generator" content="HTML Tidy, see www.w3.org" />
  -
  -    <title>Apache module mod_cgi</title>
  -  </head>
  -  <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
  -
  -  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
  -  vlink="#000080" alink="#FF0000">
  -    <!--#include virtual="header.html" -->
  -
  -    <h1 align="CENTER">Module mod_cgid</h1>
  -
  -    <p>This module provides for execution of CGI scripts using an
  -    external CGI daemon.</p>
  -
  -    <p><a href="module-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> Base (unix threaded
  -    MPMs only)<br />
  -     <a href="module-dict.html#SourceFile"
  -    rel="Help"><strong>Source File:</strong></a> mod_cgid.c<br
/>
  -     <a href="module-dict.html#ModuleIdentifier"
  -    rel="Help"><strong>Module Identifier:</strong></a>
  -    cgid_module</p>
  +<html>
  +<head>
  +<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  +<!--
  +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  +     This file is generated from xml source: DO NOT EDIT
  +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  +-->
  +<title>mod_cgid - Apache HTTP Server</title>
  +<link href="../style/manual.css" type="text/css" rel="stylesheet">
  +</head>
  +<body>
  +<blockquote>
  +<div align="center">
  +<img alt="[APACHE DOCUMENTATION]" src="../images/sub.gif"><h3>Apache HTTP Server
Version 2.0</h3>
  +</div>
  +<h1 align="center">Apache Module mod_cgid</h1>
  +<table cellspacing="1" cellpadding="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table bgcolor="#ffffff">
  +<tr>
  +<td><span class="help">Description:</span></td><td>
  +<description>Execution of CGI scripts using an
  +    external CGI daemon</description>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="module-dict.html#ModuleIdentifier" class="help">Module&nbsp;Identifier:</a></td><td>cgid_module</td>
  +</tr>
  +<tr>
  +<td><a href="module-dict.html#Compatibility" class="help">Compatibility:</a></td><td>
  +<compatibility>Unix threaded MPMs only</compatibility>
  +</td>
  +</tr>
  +</table>
  +</td>
  +</tr>
  +</table>
  +<h2>Summary</h2>
  +<summary>
   
  -    <h2>Summary</h2>
  +<p>Except for the optimizations and the additional <code class="directive"><a
href="#scriptsock" class="directive">ScriptSock</a></code> directive noted
below,
  +    mod_cgid behaves similarly to mod_cgi.  <strong>See the
  +    <code><a href="mod_cgi.html">mod_cgi</a></code> Summary for
additional details about
  +    Apache and CGI.</strong>
  +</p>
   
  -    <p>Except for the optimizations and the additional ScriptSock
  -    directive noted below, mod_cgid behaves similarly to mod_cgi.  
  -    <strong>See the <a href="mod_cgi.html">mod_cgi</a> Summary 
  -    for additional details about Apache and CGI.</strong></p>
   
  -    <p>On certain unix operating systems, forking a process from a
  +<p>On certain unix operating systems, forking a process from a
       multi-threaded server is a very expensive operation because the
       new process will replicate all the threads of the parent
       process. In order to avoid incurring this expense on each CGI
  @@ -43,51 +59,77 @@
       main server communicates with this daemon using a unix domain
       socket.</p>
   
  -    <p>This module is used by default whenever a multi-threaded MPM
  +    
  +<p>This module is used by default whenever a multi-threaded MPM
       is selected during the compilation process. At the user level,
  -    this module is identical in configuration and operation to <a
  -    href="mod_cgi.html">mod_cgi</a>. The only exception is the
  +    this module is identical in configuration and operation to
  +    <code><a href="mod_cgi.html">mod_cgi</a></code>. The only exception
is the
       additional directive <code>ScriptSock</code> which gives the
       name of the socket to use for communication with the cgi
       daemon.</p>
   
  -    <h2>Directives</h2>
  -
  -    <ul>
  -      <li><a href="mod_cgi.html#scriptlog">ScriptLog</a></li>
  -
  -      <li><a
  -      href="mod_cgi.html#scriptloglength">ScriptLogLength</a></li>
  -
  -      <li><a
  -      href="mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a></li>
  -
  -      <li><a href="#scriptsock">ScriptSock</a></li>
  -    </ul>
  -    <hr />
  -
  -    <h3><a id="scriptsock" name="scriptsock">ScriptSock</a>
  -    directive</h3>
  -
  -    <p><a href="directive-dict.html#Syntax"
  -    rel="Help"><strong>Syntax:</strong></a> Scriptsock
  -    <em>filename</em><br />
  -     <a href="directive-dict.html#Default"
  -    rel="Help"><strong>Default:</strong></a> logs/cgisock<br />
  -     <a href="directive-dict.html#Context"
  -    rel="Help"><strong>Context:</strong></a> server config<br />
  -     <a href="directive-dict.html#Status"
  -    rel="Help"><strong>Status:</strong></a> Base<br />
  -     <a href="directive-dict.html#Module"
  -    rel="Help"><strong>Module:</strong></a> mod_cgid</p>
  +</summary>
  +<h2>Directives</h2>
  +<ul>
  +<li>
  +<a href="mod_cgi.html#scriptlog">ScriptLog</a>
  +</li>
  +<li>
  +<a href="mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a>
  +</li>
  +<li>
  +<a href="mod_cgi.html#scriptloglength">ScriptLogLength</a>
  +</li>
  +<li>
  +<a href="#scriptsock">ScriptSock</a>
  +</li>
  +</ul>
  +<hr>
  +<h2>
  +<a name="ScriptSock">ScriptSock</a> <a name="scriptsock">Directive</a>
  +</h2>
  +<table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc">
  +<tr>
  +<td>
  +<table width="100%" bgcolor="#ffffff">
  +<tr>
  +<td><strong>Description: </strong></td><td></td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>
  +<syntax>ScriptSock <em>file-path</em>
  +</syntax>
  +</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ScriptSock
logs/cgisock</code></td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server
config</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td>
  +</tr>
  +<tr>
  +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_cgid</td>
  +</tr>
  +</table>
  +</td>
  +</tr>
  +</table>
  +<usage>
   
  -    <p>This directive sets the name of the socket to use for
  +<p>This directive sets the name of the socket to use for
       communication with the CGI daemon. The socket will be opened
       using the permissions of the user who starts Apache (usually
       root). To maintain the security of communications with CGI
       scripts, it is important that no other user has permission to
       write in the directory where the socket is located.</p>
  -    <!--#include virtual="footer.html" -->
  -  </body>
  -</html>
   
  +</usage>
  +<hr>
  +<h3 align="center">Apache HTTP Server Version 2.0</h3>
  +<a href="./"><img alt="Index" src="../images/index.gif"></a><a href="../"><img
alt="Home" src="../images/home.gif"></a>
  +</blockquote>
  +</body>
  +</html>
  
  
  
  1.1                  httpd-2.0/docs/manual/mod/mod_cgi.xml
  
  Index: mod_cgi.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE xml:manual [ <!ENTITY nbsp "&#160;"> ]>
  <?xml-stylesheet type="text/xsl" href="../style/manual.xsl"?>
  <modulesynopsis>
  
  <name>mod_cgi</name>
  <description>Execution of CGI scripts</description>
  <status>Base</status>
  <sourcefile>mod_cgi.c</sourcefile>
  <identifier>cgi_module</identifier>
  
  <summary>
      <!-- XXX: Should have references to CGI definition/RFC -->
      <!-- XXX: Should mention Options ExecCGI  -->
      <!-- XXX: Should mention AcceptPathInfo   -->
  
      <p>Any file that has the mime type
      <code>application/x-httpd-cgi</code> or handler
      <code>cgi-script</code> (Apache 1.1 or later) will be treated
      as a CGI script, and run by the server, with its output being
      returned to the client. Files acquire this type either by
      having a name containing an extension defined by the 
      <directive module="mod_mime">AddType</directive> directive, or by being
      in a <directive module="mod_alias">ScriptAlias</directive>
      directory.</p>
  
      <p>When the server invokes a CGI script, it will add a variable
      called <code>DOCUMENT_ROOT</code> to the environment. This
      variable will contain the value of the
      <directive module="core.html">DocumentRoot</directive> configuration
      variable.</p>
  
      <p>For an introduction to using CGI scripts with Apache, see
      our tutorial on <a href="../howto/cgi.html">Dynamic Content
      With CGI</a>.</p>
  
      <p>When using a multi-threaded MPM under unix, the module 
      <module>mod_cgid</module> should be used in place of
      this module. At the user level, the two modules are essentially
      identical.</p>
  </summary>
  
  <seealso><directive module="core">Options</directive></seealso>
  <seealso><directive module="mod_alias">ScriptAlias</directive></seealso>
  <seealso><directive module="mod_mime">AddHandler</directive></seealso>
  
  <section><title>CGI Environment variables</title>
      <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 <directive module="core"
        >AcceptPathInfo</directive> directive is explicitly set to
        <code>off</code>.  The default behavior, if AcceptPathInfo is
        not given, is that mod_cgi will accept path info (trailing
        /more/path/info 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 AcceptPathInfo
        directive has the same effect as setting it <code>on</code> for
        mod_cgi requests.</dd>
  
        <dt>REMOTE_HOST</dt>
  
        <dd>This will only be set if <directive module="core"
        >HostnameLookups</directive> 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 <directive module="core"
        >IdentityCheck</directive> 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
        authentication.</dd>
      </dl>
  </section>
  
  <section id="cgi_debug"><title>CGI Debugging</title>
      <p>Debugging CGI scripts has traditionally been difficult, mainly
      because it has not been possible to study the output (standard
      output and error) for scripts which are failing to run
      properly. These directives, included in Apache 1.2 and later,
      provide more detailed logging of errors when they occur. </p>
  
  <section><title>CGI Logfile Format</title>
      <p>When configured, the CGI error log logs any CGI which does not
      execute properly. Each CGI script which fails to operate causes
      several lines of information to be logged. The first two lines
      are always of the format:</p>
  <example>
    %% [<em>time</em>] <em>request-line</em><br />
    %% <em>HTTP-status</em> <em>CGI-script-filename</em>
  </example>
      <p>If the error is that CGI script cannot be run, the log file
      will contain an extra two lines:</p>
  <example>
    %%error<br />
    <em>error-message</em>
  </example>
      <p>Alternatively, if the error is the result of the script
      returning incorrect header information (often due to a bug in
      the script), the following information is logged: </p>
  <example>
    %request<br />
    <em>All HTTP request headers received</em><br />
    <em>POST or PUT entity (if any)</em><br />
    %response<br />
    <em>All headers output by the CGI script</em><br />
    %stdout<br />
    <em>CGI standard output</em><br />
    %stderr<br />
    <em>CGI standard error</em><br />
  </example>
      <p>(The %stdout and %stderr parts may be missing if the script did
      not output anything on standard output or standard error). </p>
  </section>
  </section>
  
  <directivesynopsis>
  <name>ScriptLog</name>
  <description>Location of the CGI script error logfile</description>
  <syntax>ScriptLog <em>file-path</em></syntax>
  <contextlist><context>server config</context></contextlist>
  <modulelist><module>mod_cgi</module><module>mod_cgid</module>
  </modulelist>
  
  <usage>
      <p>The <directive>ScriptLog</directive> directive sets the CGI
      script error logfile. If no ScriptLog 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 server root.</p>
  
      <p>This log will be opened as the user the child processes run
      as, ie. the user specified in the main <directive module="mpm_common"
      >User</directive> 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>
  </usage>
  </directivesynopsis>
  
  <directivesynopsis>
  <name>ScriptLogLength</name>
  <description>Size limit of the CGI script logfile</description>
  <syntax>ScriptLogLength <em>bytes</em></syntax>
  <default>ScriptLogLength 10385760</default>
  <contextlist><context>server config</context></contextlist>
  <modulelist><module>mod_cgi</module><module>mod_cgid</module>
  </modulelist>
  
  <usage>
      <p><directive>ScriptLogLength</directive> 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>
  </usage>
  </directivesynopsis>
  
  <directivesynopsis>
  <name>ScriptLogBuffer</name>
  <description>Maximum amount of PUT or POST requests that will be recorded
  in the scriptlog</description>
  <syntax>ScriptLogBuffer <em>bytes</em></syntax>
  <default>ScriptLogBuffer 1024</default>
  <contextlist><context>server config</context></contextlist>
  <modulelist><module>mod_cgi</module><module>mod_cgid</module>
  </modulelist>
  
  <usage>
      <p>The size of any PUT or POST entity body that is logged to
      the file is limited, to prevent the log file growing too big
      too quickly if large bodies are being received. By default, up
      to 1024 bytes are logged, but this can be changed with this
      directive.</p>
  </usage>
  </directivesynopsis>
  
  </modulesynopsis>
  
  
  1.1                  httpd-2.0/docs/manual/mod/mod_cgid.xml
  
  Index: mod_cgid.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE xml:manual [ <!ENTITY nbsp "&#160;"> ]>
  <?xml-stylesheet type="text/xsl" href="../style/manual.xsl"?>
  <modulesynopsis>
  
  <name>mod_cgid</name>
  <description>Execution of CGI scripts using an
      external CGI daemon</description>
  <status>Base</status>
  <sourcefile>mod_cgid.c</sourcefile>
  <identifier>cgid_module</identifier>
  <compatibility>Unix threaded MPMs only</compatibility>
  
  <summary>
      <p>Except for the optimizations and the additional <directive
      module="mod_cgid">ScriptSock</directive> directive noted below,
      mod_cgid behaves similarly to mod_cgi.  <strong>See the
      <module>mod_cgi</module> Summary for additional details about
      Apache and CGI.</strong></p>
  
      <p>On certain unix operating systems, forking a process from a
      multi-threaded server is a very expensive operation because the
      new process will replicate all the threads of the parent
      process. In order to avoid incurring this expense on each CGI
      invocation, mod_cgid creates an external daemon that is
      responsible for forking child processes to run CGI scripts. The
      main server communicates with this daemon using a unix domain
      socket.</p>
  
      <p>This module is used by default whenever a multi-threaded MPM
      is selected during the compilation process. At the user level,
      this module is identical in configuration and operation to
      <module>mod_cgi</module>. The only exception is the
      additional directive <code>ScriptSock</code> which gives the
      name of the socket to use for communication with the cgi
      daemon.</p>
  </summary>
  
  <directivesynopsis location="mod_cgi">
  <name>ScriptLog</name>
  </directivesynopsis>
  
  <directivesynopsis location="mod_cgi">
  <name>ScriptLogLength</name>
  </directivesynopsis>
  
  <directivesynopsis location="mod_cgi">
  <name>ScriptLogBuffer</name>
  </directivesynopsis>
  
  <directivesynopsis>
  <name>ScriptSock</name>
  <syntax>ScriptSock <em>file-path</em></syntax>
  <default>ScriptSock logs/cgisock</default>
  <contextlist><context>server config</context></contextlist>
  
  <usage>
      <p>This directive sets the name of the socket to use for
      communication with the CGI daemon. The socket will be opened
      using the permissions of the user who starts Apache (usually
      root). To maintain the security of communications with CGI
      scripts, it is important that no other user has permission to
      write in the directory where the socket is located.</p>
  </usage>
  </directivesynopsis>
  
  </modulesynopsis>
  
  
  
  

Mime
View raw message