From: Joshua Slive Date: Sun, 6 May 2001 05:08:01 +0000 (+0000) Subject: Update some CGI docs: X-Git-Tag: 2.0.18~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=62884a215dd72a0604fb86238fac621cd6ec7a8b;p=apache Update some CGI docs: - add docs for mod_cgid - link up the CGI tutorial brought forward from 1.3 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89035 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/index.html.en b/docs/manual/index.html.en index b647cfdd37..3bc03115a0 100644 --- a/docs/manual/index.html.en +++ b/docs/manual/index.html.en @@ -133,6 +133,8 @@ Modules: By Type or Virtual Hosts +Dynamic Content with CGI + Handlers Filters diff --git a/docs/manual/mod/index-bytype.html b/docs/manual/mod/index-bytype.html index 814654c6b7..ec4c623f56 100644 --- a/docs/manual/mod/index-bytype.html +++ b/docs/manual/mod/index-bytype.html @@ -128,6 +128,8 @@ virtual hosts under different userids.
Server-parsed documents.
mod_cgi
Invoking CGI scripts. +
mod_cgid +
Invoking CGI scripts using an external daemon.
mod_actions
Executing CGI scripts based on media type or request method.
mod_isapi diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html index ee6ea73dd0..5e7b2f8b0e 100644 --- a/docs/manual/mod/index.html +++ b/docs/manual/mod/index.html @@ -70,6 +70,8 @@ virtual hosts under different userids.
Support for HTTP header metafiles.
mod_cgi
Invoking CGI scripts. +
mod_cgid +
Invoking CGI scripts using an external daemon.
mod_charset_lite
Configuring character set translation.
mod_dav diff --git a/docs/manual/mod/mod_cgi.html b/docs/manual/mod/mod_cgi.html index 6571305e43..cc331f165e 100644 --- a/docs/manual/mod/mod_cgi.html +++ b/docs/manual/mod/mod_cgi.html @@ -39,18 +39,26 @@ REL="Help" -Any file that has the mime type application/x-httpd-cgi +

Any file that has the mime type application/x-httpd-cgi or handler cgi-script (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 AddType directive, or by being in -a ScriptAlias directory.

+a ScriptAlias directory.

-When the server invokes a CGI script, it will add a variable called +

When the server invokes a CGI script, it will add a variable called DOCUMENT_ROOT to the environment. This variable will contain the value of the DocumentRoot -configuration variable. +configuration variable.

+ +

For an intruction to using CGI scripts with Apache, see our +tutorial on Dynamic Content With CGI.

+ +

When using a multi-threaded MPM under unix, the module mod_cgid should be used in place of this +module. At the user level, the two modules are essentially +identical.

Directives

diff --git a/docs/manual/mod/mod_cgid.html b/docs/manual/mod/mod_cgid.html new file mode 100644 index 0000000000..396d608d5c --- /dev/null +++ b/docs/manual/mod/mod_cgid.html @@ -0,0 +1,101 @@ + + + +Apache module mod_cgi + + + + + + +

Module mod_cgid

+ +

This module provides for execution of CGI scripts using an external +CGI daemon.

+ +

Status: Base (unix threaded MPMs only) +
+Source File: mod_cgid.c +
+Module Identifier: cgid_module +

+ + +

Summary

+ +

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.

+ +

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 mod_cgi. The only exception is the additional +directive ScriptSock which gives the name of the socket +to use for communication with the cgi daemon.

+ +

Directives

+ + + +
+ +

ScriptSock directive

+ +

Syntax: Scriptsock filename
+Default: logs/cgisock
+Context: server config
+Status: Base
+Module: mod_cgid

+ +

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.

+ + + + + +