mirror of
https://github.com/apache/httpd.git
synced 2025-08-30 15:01:14 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77059 13f79535-47bb-0310-9956-ffa450edef68
88 lines
2.9 KiB
HTML
88 lines
2.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
|
<html>
|
|
<head>
|
|
<title>Apache module mod_cgi</title>
|
|
</head>
|
|
|
|
<body>
|
|
<!--#include virtual="header.html" -->
|
|
|
|
<h1>Module mod_cgi</h1>
|
|
|
|
This module is contained in the <code>mod_cgi.c</code> file, and
|
|
is compiled in by default. It provides for execution of CGI scripts.
|
|
Any file with mime type <code>application/x-httpd-cgi</code> will be
|
|
processed by this module.
|
|
<!--%plaintext <?INDEX {\tt application/x-httpd-cgi} mime type> -->
|
|
<!--%plaintext <?INDEX CGI scripts> -->
|
|
|
|
<h2>Summary</h2>
|
|
Any file that has the mime type <code>application/x-httpd-cgi</code>
|
|
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 ending in 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> directory. <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.
|
|
|
|
<h2>CGI Environment variables</h2>
|
|
The server will set the CGI environment variables as described in the CGI
|
|
specification, with the following provisos:
|
|
<dl>
|
|
<dt>REMOTE_HOST
|
|
<dd>This will only be set if the server has not been compiled with
|
|
<code>MINIMAL_DNS</code>.
|
|
<dt>REMOTE_IDENT
|
|
<dd>This will only be set if
|
|
<A HREF="core.html#identitycheck">IdentityCheck</A> is set to <code>on</code>.
|
|
<dt>REMOTE_USER
|
|
<dd>This will only be set if the CGI script is subject to authentication.
|
|
</dl>
|
|
<P>
|
|
|
|
<h2>Directives</h2>
|
|
<ul>
|
|
<li><A HREF="#scriptlog">ScriptLog</A>
|
|
<li><A HREF="#scriptloglength">ScriptLogLength</A>
|
|
<li><A HREF="#scriptlogbuff">ScriptLogBuffer</A>
|
|
</ul>
|
|
|
|
<A NAME="scriptlog"><H2>ScriptLog</H2></A>
|
|
|
|
<STRONG>Syntax:</STRONG> ScriptLog <EM>filename</EM><BR>
|
|
<STRONG>Context:</STRONG> server config, virtualhost<BR>
|
|
<STRONG>Status:</STRONG> Base<BR>
|
|
<STRONG>Module:</STRONG> mod_cgi<BR>
|
|
<STRONG>Compatibility:</STRONG> ScriptLog is only available in 1.2 and
|
|
later.<P>
|
|
|
|
<A NAME="scriptloglength"><H2>ScriptLogLength</H2></A>
|
|
|
|
<STRONG>Syntax:</STRONG> ScriptLogLength <EM>size-bytes</EM><BR>
|
|
<STRONG>Context:</STRONG> server config, virtualhost<BR>
|
|
<STRONG>Status:</STRONG> Base<BR>
|
|
<STRONG>Module:</STRONG> mod_cgi<BR>
|
|
<STRONG>Default:</STRONG> ScriptLogLength 10385760<BR>
|
|
<STRONG>Compatibility:</STRONG> ScriptLogLength is only available in 1.2 and
|
|
later.<P>
|
|
|
|
<A NAME="scriptlogbuff"><H2>ScriptLogBuffer</H2></A>
|
|
<STRONG>Syntax:</STRONG> ScriptLogBuffer <EM>size-bytes</EM><BR>
|
|
<STRONG>Context:</STRONG> server config, virtualhost<BR>
|
|
<STRONG>Status:</STRONG> Base<BR>
|
|
<STRONG>Module:</STRONG> mod_cgi<BR>
|
|
<STRONG>Default:</STRONG> ScriptLogBuffer 1024<BR>
|
|
<STRONG>Compatibility:</STRONG> ScriptLogBuffer is only available in 1.2 and
|
|
later.<P>
|
|
|
|
|
|
<!--#include virtual="footer.html" -->
|
|
</BODY>
|
|
</HTML>
|
|
|