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