mod_cgid.html.en revision 117c1f888a14e73cdd821dc6c23eb0411144a41c
97a9a944b5887e91042b019776c41d5dd74557aferikabele<?xml version="1.0" encoding="ISO-8859-1"?>
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
97a9a944b5887e91042b019776c41d5dd74557aferikabele<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is generated from xml source: DO NOT EDIT
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
356cf74f7c5d5d2ff4dae567ebeb8dc23e8bcd21nd --><title>mod_cgid - Apache HTTP Server</title><link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /><link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /><link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link href="/images/favicon.ico" rel="shortcut icon" /></head><body><div id="page-header"><p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p><p class="apache">Apache HTTP Server Version 2.0</p><img alt="" src="/images/feather.gif" /></div><div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div><div id="path"><a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs-project/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div><div id="page-content"><div id="preamble"><h1>Apache Module mod_cgid</h1><table class="module"><tr><th><a href="module-dict.html#Description">Description:
d9acf35ddaf5792bb76f8b0cc47b26cd51482abaslive </a></th><td>Execution of CGI scripts using an
97a9a944b5887e91042b019776c41d5dd74557aferikabele external CGI daemon</td></tr><tr><th><a href="module-dict.html#Status">Status:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td>Base</td></tr><tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:
d9acf35ddaf5792bb76f8b0cc47b26cd51482abaslive </a></th><td>cgid_module</td></tr><tr><th><a href="module-dict.html#SourceFile">Source�File:
d9acf35ddaf5792bb76f8b0cc47b26cd51482abaslive </a></th><td>mod_cgid.c</td></tr><tr><th><a href="module-dict.html#Compatibility">Compatibility:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td>Unix threaded MPMs only</td></tr></table><h3>Summary</h3>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <p>Except for the optimizations and the additional <code class="directive"><a href="#scriptsock">ScriptSock</a></code> directive noted below,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive mod_cgid behaves similarly to mod_cgi. <strong>See the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> Summary for additional details about
06ba4a61654b3763ad65f52283832ebf058fdf1cslive Apache and CGI.</strong></p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>On certain unix operating systems, forking a process from a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive multi-threaded server is a very expensive operation because the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive new process will replicate all the threads of the parent
06ba4a61654b3763ad65f52283832ebf058fdf1cslive process. In order to avoid incurring this expense on each CGI
06ba4a61654b3763ad65f52283832ebf058fdf1cslive invocation, mod_cgid creates an external daemon that is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive responsible for forking child processes to run CGI scripts. The
06ba4a61654b3763ad65f52283832ebf058fdf1cslive main server communicates with this daemon using a unix domain
06ba4a61654b3763ad65f52283832ebf058fdf1cslive socket.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive
136489fb8f0fe36dbcad3064a335eb86bfbeb5c6rbowen <p>This module is used by default instead of
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> whenever a multi-threaded MPM
06ba4a61654b3763ad65f52283832ebf058fdf1cslive is selected during the compilation process. At the user level,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive this module is identical in configuration and operation to
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>. The only exception is the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive additional directive <code>ScriptSock</code> which gives the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive name of the socket to use for communication with the cgi
06ba4a61654b3763ad65f52283832ebf058fdf1cslive daemon.</p>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd</div><div id="quickview"><h3 class="directives">Directives</h3><ul id="toc"><li><img alt="" src="/images/right.gif" /> <a href="mod_cgi.html#scriptlog">ScriptLog</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/right.gif" /> <a href="mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/right.gif" /> <a href="mod_cgi.html#scriptloglength">ScriptLogLength</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#scriptsock">ScriptSock</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd</ul></div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div><div class="directive-section"><h2><a name="ScriptSock" id="ScriptSock">ScriptSock</a> <a name="scriptsock" id="scriptsock">Directive</a></h2><table class="directive"><tr><th><a href="directive-dict.html#Description">Description:
d9acf35ddaf5792bb76f8b0cc47b26cd51482abaslive </a></th><td /></tr><tr><th><a href="directive-dict.html#Syntax">Syntax:
117c1f888a14e73cdd821dc6c23eb0411144a41cnd </a></th><td><code>ScriptSock <em>file-path</em></code></td></tr><tr><th><a href="directive-dict.html#Default">Default:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td><code>ScriptSock logs/cgisock</code></td></tr><tr><th><a href="directive-dict.html#Context">Context:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td>server config, virtual host</td></tr><tr><th><a href="directive-dict.html#Status">Status:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td>Base</td></tr><tr><th><a href="directive-dict.html#Module">Module:
97a9a944b5887e91042b019776c41d5dd74557aferikabele </a></th><td>mod_cgid</td></tr></table>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive sets the name of the socket to use for
06ba4a61654b3763ad65f52283832ebf058fdf1cslive communication with the CGI daemon. The socket will be opened
06ba4a61654b3763ad65f52283832ebf058fdf1cslive using the permissions of the user who starts Apache (usually
06ba4a61654b3763ad65f52283832ebf058fdf1cslive root). To maintain the security of communications with CGI
06ba4a61654b3763ad65f52283832ebf058fdf1cslive scripts, it is important that no other user has permission to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive write in the directory where the socket is located.</p>
f2c4476994729750806eaa70d8b55fa2b3eba25brbowen
97a9a944b5887e91042b019776c41d5dd74557aferikabele <div class="example"><h3>Example</h3><p><code>
f2c4476994729750806eaa70d8b55fa2b3eba25brbowen ScriptSock /var/run/cgid.sock
97a9a944b5887e91042b019776c41d5dd74557aferikabele </code></p></div>
f2c4476994729750806eaa70d8b55fa2b3eba25brbowen
97a9a944b5887e91042b019776c41d5dd74557aferikabele</div></div><div id="footer"><p class="apache">Maintained by the <a href="http://httpd.apache.org/docs-project/">Apache HTTP Server Documentation Project</a></p><p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div></body></html>