diff options
Diffstat (limited to 'docs/manual')
-rw-r--r-- | docs/manual/mod/mpm_common.html | 1887 | ||||
-rw-r--r-- | docs/manual/mod/prefork.html | 539 |
2 files changed, 1534 insertions, 892 deletions
diff --git a/docs/manual/mod/mpm_common.html b/docs/manual/mod/mpm_common.html index 8bb64f2de3..5ad70b1948 100644 --- a/docs/manual/mod/mpm_common.html +++ b/docs/manual/mod/mpm_common.html @@ -1,696 +1,1165 @@ -<!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 MPM Common Directives</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">Multi-Processing Module Common - Directives</h1> - - <p>This file documents directives that are implemented by more - than one multi-processing module (MPM).</p> - - <h2>Directives</h2> - - <ul> - <li><a href="#coredumpdirectory">CoreDumpDirectory</a></li> - - <li><a href="#group">Group</a></li> - - <li><a href="#pidfile">PidFile</a></li> - - <li><a href="#listen">Listen</a></li> - - <li><a href="#listenbacklog">ListenBacklog</a></li> - - <li><a href="#lockfile">LockFile</a></li> - - <li><a href="#maxclients">MaxClients</a></li> - - <li><a - href="#maxrequestsperchild">MaxRequestsPerChild</a></li> - - <li><a href="#maxsparethreads">MaxSpareThreads</a></li> - - <li><a href="#maxthreadsperchild">MaxThreadsPerChild</a></li> - - <li><a href="#minsparethreads">MinSpareThreads</a></li> - - <li><a href="#numservers">NumServers</a></li> - - <li><a href="#scoreboardfile">ScoreBoardFile</a></li> - - <li><a href="#sendbuffersize">SendBufferSize</a></li> - - <li><a href="#serverlimit">ServerLimit</a></li> - - <li><a href="#startservers">StartServers</a></li> - - <li><a href="#startthreads">StartThreads</a></li> - - <li><a href="#threadlimit">ThreadLimit</a></li> - - <li><a href="#threadsperchild">ThreadsPerChild</a></li> - - <li><a href="#user">User</a></li> - </ul> - <hr /> - - <h2><a id="coredumpdirectory" - name="coredumpdirectory">CoreDumpDirectory directive</a></h2> - <!--%plaintext <?INDEX {\tt CoreDumpDirectory} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> CoreDumpDirectory - <em>directory</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> the same location as - ServerRoot<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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork, mpm_winnt</p> - - <p>This controls the directory to which Apache attempts to - switch before dumping core. The default is in the <a - href="core.html#serverroot">ServerRoot</a> directory, however +<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>mpm_common - 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 mpm_common</h1> +<table cellspacing="1" cellpadding="0" bgcolor="#cccccc"> +<tr> +<td> +<table bgcolor="#ffffff"> +<tr> +<td><span class="help">Description:</span></td><td> +<description>A collection of directives that are implemented by +more than one multi-processing module (MPM)</description> +</td> +</tr> +<tr> +<td><a href="module-dict.html#Status" class="help">Status:</a></td><td>MPM</td> +</tr> +</table> +</td> +</tr> +</table> +<h2>Directives</h2> +<ul> +<li> +<a href="#coredumpdirectory">CoreDumpDirectory</a> +</li> +<li> +<a href="#group">Group</a> +</li> +<li> +<a href="#listen">Listen</a> +</li> +<li> +<a href="#listenbacklog">ListenBackLog</a> +</li> +<li> +<a href="#lockfile">LockFile</a> +</li> +<li> +<a href="#maxclients">MaxClients</a> +</li> +<li> +<a href="#maxrequestperchild">MaxRequestPerChild</a> +</li> +<li> +<a href="#maxsparethreads">MaxSpareThreads</a> +</li> +<li> +<a href="#maxthreadsperchild">MaxThreadsPerChild</a> +</li> +<li> +<a href="#minsparethreads">MinSpareThreads</a> +</li> +<li> +<a href="#numservers">NumServers</a> +</li> +<li> +<a href="#pidfile">PidFile</a> +</li> +<li> +<a href="#scoreboardfile">ScoreBoardFile</a> +</li> +<li> +<a href="#sendbuffersize">SendBufferSize</a> +</li> +<li> +<a href="#serverlimit">ServerLimit</a> +</li> +<li> +<a href="#startservers">StartServers</a> +</li> +<li> +<a href="#startthreads">StartThreads</a> +</li> +<li> +<a href="#threadlimit">ThreadLimit</a> +</li> +<li> +<a href="#threadsperchild">ThreadsPerChild</a> +</li> +<li> +<a href="#user">User</a> +</li> +</ul> +<hr> +<h2> +<a name="CoreDumpDirectory">CoreDumpDirectory</a> <a name="coredumpdirectory">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>Sets the directory where Apache attempts to +switch before dumping core</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>CoreDumpDirectory <em>directory</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>CoreDumpDirectory ServerRoot</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + + +<p>This controls the directory to which Apache attempts to + switch before dumping core. The default is in the + <code class="directive"><a href="core.html#serverroot" class="directive">ServerRoot</a></code> directory, however since this should not be writable by the user the server runs as, core dumps won't normally get written. If you want a core dump for debugging, you can use this directive to place it in a different location.</p> - <hr /> - - <h2><a id="group" name="group">Group directive</a></h2> - <!--%plaintext <?INDEX {\tt Group} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> Group - <em>unix-group</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>Group - #-1</code><br /> - <a href="directive-dict.html#Context" - rel="Help"><strong>Context:</strong></a> server config, virtual - host<br /> - <a href="directive-dict.html#Status" - rel="Help"><strong>Status:</strong></a> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork</p> - The Group directive sets the group under which the server will - answer requests. In order to use this directive, the - stand-alone server must be run initially as root. - <em>Unix-group</em> is one of: - - <dl> - <dt>A group name</dt> - - <dd>Refers to the given group by name.</dd> - - <dt># followed by a group number.</dt> - - <dd>Refers to a group by its number.</dd> - </dl> - It is recommended that you set up a new group specifically for + +</usage> +<hr> +<h2> +<a name="Group">Group</a> <a name="group">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>Sets the group under which the server will answer +requests</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>Group <em>unix-group</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>Group #-1</code></td> +</tr> +<tr> +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td> +</tr> +<tr> +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">Group</code> directive sets the group under + which the server will answer requests. In order to use this + directive, the stand-alone server must be run initially as root. + <em>Unix-group</em> is one of:</p> + + +<dl> + +<dt>A group name</dt> + + +<dd>Refers to the given group by name.</dd> + + +<dt># followed by a group number.</dt> + + +<dd>Refers to a group by its number.</dd> + +</dl> + +<p>It is recommended that you set up a new group specifically for running the server. Some admins use user <code>nobody</code>, - but this is not always possible or desirable. + but this is not always possible or desirable.</p> - <p>Note: if you start the server as a non-root user, it will + +<p>Note: if you start the server as a non-root user, it will fail to change to the specified group, and will instead continue to run as the group of the original user.</p> - <p>Special note: Use of this directive in <VirtualHost< - is no longer supported. To implement the <a - href="../suexec.html">suEXEC wrapper</a> with Apache 2.0, use - the <a - href="mod_suexec.html#suexecusergroup">SuexecUserGroup</a> - directive. SECURITY: See <a href="#user">User</a> for a - discussion of the security considerations.</p> - <hr /> - - <h2><a id="pidfile" name="pidfile">PidFile directive</a></h2> - <!--%plaintext <?INDEX {\tt PidFile} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> PidFile - <em>filename</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>PidFile - logs/httpd.pid</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork, mpm_winnt</p> - - <p>The PidFile directive sets the file to which the server - records the process id of the daemon. If the filename does not - begin with a slash (/) then it is assumed to be relative to the - <a href="core.html#serverroot">ServerRoot</a>.</p> - - <p>It is often useful to be able to send the server a signal, - so that it closes and then reopens its <a - href="core.html#errorlog">ErrorLog</a> and TransferLog, and - re-reads its configuration files. This is done by sending a - SIGHUP (kill -1) signal to the process id listed in the - PidFile.</p> - - <p>The PidFile is subject to the same warnings about log file - placement and <a - href="../misc/security_tips.html#serverroot">security</a>.</p> - <hr /> - - <h2><a id="listen" name="listen">Listen directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> Listen - [<em>IP-address</em>:]<em>port number</em><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork, mpm_winnt</p> - - <p>The Listen directive instructs Apache to listen to only - specific IP addresses or ports; by default it responds to - requests on all IP interfaces. The Listen directive is now - a required directive. If it is not in the config file, the - server will fail to start. This is a change from previous - versions of Apache. - - <p>The Listen directive tells the server to accept incoming + +<p>Special note: Use of this directive in <VirtualHost< is + no longer supported. To implement the <a href="../suexec.html">suEXEC wrapper</a> with Apache 2.0, use the + <code class="directive"><a href="mod_suexec.html#suexecusergroup" class="directive">SuexecUserGroup</a></code> + directive. SECURITY: See <code class="directive"><a href="#user" class="directive">User</a></code> for a discussion of the + security considerations.</p> + +</usage> +<hr> +<h2> +<a name="Listen">Listen</a> <a name="listen">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>Sets the IP addresses and ports that the server +listens to</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>Listen [<em>IP-address</em>:]<em>portnumber</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">Listen</code> directive instructs Apache to + listen to only specific IP addresses or ports; by default it + responds to requests on all IP interfaces. The Listen directive is + now a required directive. If it is not in the config file, the + server will fail to start. This is a change from previous versions + of Apache.</p> + + +<p>The Listen directive tells the server to accept incoming requests on the specified port or address-and-port combination. If only a port number is specified, the server listens to the given port on all interfaces. If an IP address is given as well as a port, the server will listen on the given port and interface.</p> - <p>Multiple Listen directives may be used to specify a number + +<p>Multiple Listen directives may be used to specify a number of addresses and ports to listen to. The server will respond to requests from any of the listed addresses and ports.</p> - <p>For example, to make the server accept connections on both + +<p>For example, to make the server accept connections on both port 80 and port 8000, use:</p> -<pre> - Listen 80 + +<blockquote> +<table cellpadding="10"> +<tr> +<td bgcolor="#eeeeee"><code> + Listen 80<br> Listen 8000 -</pre> +</code></td> +</tr> +</table> +</blockquote> To make the server accept connections on two specified interfaces and port numbers, use -<pre> - Listen 192.170.2.1:80 +<blockquote> +<table cellpadding="10"> +<tr> +<td bgcolor="#eeeeee"><code> + Listen 192.170.2.1:80<br> Listen 192.170.2.5:8000 -</pre> +</code></td> +</tr> +</table> +</blockquote> IPv6 addresses must be surrounded in square brackets, as in the following example: -<pre> +<blockquote> +<table cellpadding="10"> +<tr> +<td bgcolor="#eeeeee"><code> Listen [fe80::a00:20ff:fea7:ccea]:80 -</pre> - - <p><strong>See Also:</strong> <a href="../dns-caveats.html">DNS - Issues</a><br /> - <strong>See Also:</strong> <a href="../bind.html">Setting - which addresses and ports Apache uses</a><br /> - <strong>See Also:</strong> <a - href="http://www.apache.org/info/known_bugs.html#listenbug">Known - Bugs</a></p> - <hr /> - - <h2><a id="listenbacklog" name="listenbacklog">ListenBacklog - directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> ListenBacklog - <em>backlog</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>ListenBacklog - 511</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork, mpm_winnt</p> - - <p>The maximum length of the queue of pending connections. +</code></td> +</tr> +</table> +</blockquote> + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<a href="../dns-caveats.html">DNS Issues</a> +</li> +<li> +<a href="../bind.html">Setting + which addresses and ports Apache uses</a> +</li> +</ul> +<hr> +<h2> +<a name="ListenBackLog">ListenBackLog</a> <a name="listenbacklog">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 length of the queue of pending connections</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>ListenBacklog <em>backlog</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ListenBacklog 511</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The maximum length of the queue of pending connections. Generally no tuning is needed or desired, however on some systems it is desirable to increase this when under a TCP SYN flood attack. See the backlog parameter to the <code>listen(2)</code> system call.</p> - <p>This will often be limited to a smaller number by the + +<p>This will often be limited to a smaller number by the operating system. This varies from OS to OS. Also note that many OSes do not use exactly what is specified as the backlog, but use a number based on (but normally larger than) what is set.</p> - <hr /> - - <h2><a id="lockfile" name="lockfile">LockFile - directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> LockFile - <em>filename</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>LockFile - logs/accept.lock</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork</p> - - <p>The LockFile directive sets the path to the lockfile used - when Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT - or USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally - be left at its default value. The main reason for changing it - is if the <code>logs</code> directory is NFS mounted, since - <strong>the lockfile must be stored on a local disk</strong>. - The PID of the main server process is automatically appended to - the filename.</p> - - <p><strong>SECURITY:</strong> It is best to avoid putting this + +</usage> +<hr> +<h2> +<a name="LockFile">LockFile</a> <a name="lockfile">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 accept serialization lock file</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>LockFile <em>filename</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>LockFile logs/accept.lock</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">LockFile</code> directive sets the path to + the lockfile used when Apache is compiled with either + USE_FCNTL_SERIALIZED_ACCEPT or USE_FLOCK_SERIALIZED_ACCEPT. This + directive should normally be left at its default value. The main + reason for changing it is if the <code>logs</code> directory is + NFS mounted, since <strong>the lockfile must be stored on a local + disk</strong>. The PID of the main server process is + automatically appended to the filename.</p> + + +<p> +<strong>SECURITY:</strong> It is best to avoid putting this file in a world writable directory such as <code>/var/tmp</code> because someone could create a denial of service attack and prevent the server from starting by creating a lockfile with the same name as the one the server will try to create.</p> - <hr /> - - <h2><a id="maxclients" name="maxclients">MaxClients - directive</a></h2> - <!--%plaintext <?INDEX {\tt MaxClients} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MaxClients - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>MaxClients - 8</code> (with threads) <code>MaxClients 256</code> (no - threads)<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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, prefork</p> - - <p>The MaxClients directive sets the limit on the number of - child processes that will be created to serve requests. When - the server is built without threading, no more than this number - of clients can be served simultaneously. To configure more than - 256 clients with the prefork MPM, you must use the <a - href="#serverlimit">ServerLimit</a> directive. To configure - more than 1024 clients with the worker MPM, you must use the - <a href="#serverlimit">ServerLimit</a> and <a - href="#threadlimit">ThreadLimit</a> directives. - - <p>Any connection attempts over the MaxClients limit will - normally be queued, up to a number based on the <a - href="#listenbacklog">ListenBacklog</a> directive. Once a child - process is freed at the end of a different request, the - connection will then be serviced.</p> - - <p>When the server is compiled with threading, then the maximum + +</usage> +<hr> +<h2> +<a name="MaxClients">MaxClients</a> <a name="maxclients">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 number of child processes that will be created +to serve requests</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MaxClients <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>>MaxClients + 8 (with threads) MaxClients 256</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">MaxClients</code> directive sets the limit + on the number of child processes that will be created to serve + requests. When the server is built without threading, no more than + this number of clients can be served simultaneously. To configure + more than 256 clients with the prefork MPM, you must use the + <code class="directive"><a href="#serverlimit" class="directive">ServerLimit</a></code> directive. + To configure more than 1024 clients with the worker MPM, you must + use the <code class="directive"><a href="#serverlimit" class="directive">ServerLimit</a></code> and + <code class="directive"><a href="#threadlimit" class="directive">ThreadLimit</a></code> directives.</p> + + +<p>Any connection attempts over the + <code class="directive">MaxClients</code> limit will normally be queued, + up to a number based on the <code class="directive"><a href="#listenbacklog" class="directive">ListenBacklog</a></code> directive. Once a child + process is freed at the end of a different request, the connection + will then be serviced.</p> + + +<p>When the server is compiled with threading, then the maximum number of simultaneous requests that can be served is obtained - from the value of this directive multiplied by <a - href="#threadsperchild">ThreadsPerChild</a>.</p> - <hr /> - - <h2><a id="maxrequestsperchild" - name="maxrequestsperchild">MaxRequestsPerChild - directive</a></h2> - <!--%plaintext <?INDEX {\tt MaxRequestsPerChild} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MaxRequestsPerChild - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> - <code>MaxRequestsPerChild 10000</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, prefork, - perchild, mpm_winnt</p> - - <p>The MaxRequestsPerChild directive sets the limit on the - number of requests that an individual child server process will - handle. After MaxRequestsPerChild requests, the child process - will die. If MaxRequestsPerChild is 0, then the process will - never expire.</p> - - <p>Setting MaxRequestsPerChild to a non-zero limit has two - beneficial effects:</p> - - <ul> - <li>it limits the amount of memory that process can consume + from the value of this directive multiplied by + <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code>.</p> + +</usage> +<hr> +<h2> +<a name="MaxRequestPerChild">MaxRequestPerChild</a> <a name="maxrequestperchild">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>Limit on the number of requests that an individual child server +will handle during its life</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MaxRequestsPerChild <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MaxRequestsPerChild 10000</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">MaxRequestsPerChild</code> directive sets + the limit on the number of requests that an individual child + server process will handle. After + <code class="directive">MaxRequestsPerChild</code> requests, the child + process will die. If <code class="directive">MaxRequestsPerChild</code> is + 0, then the process will never expire.</p> + + +<p>Setting <code class="directive">MaxRequestsPerChild</code> to a + non-zero limit has two beneficial effects:</p> + + +<ul> + +<li>it limits the amount of memory that process can consume by (accidental) memory leakage;</li> - <li>by giving processes a finite lifetime, it helps reduce + +<li>by giving processes a finite lifetime, it helps reduce the number of processes when the server load reduces.</li> - </ul> + +</ul> - <p><strong>NOTE:</strong> For <em>KeepAlive</em> requests, only + +<p> +<strong>NOTE:</strong> For <em>KeepAlive</em> requests, only the first request is counted towards this limit. In effect, it changes the behavior to limit the number of <em>connections</em> per child.</p> - <hr /> - - <h2><a id="maxsparethreads" - name="maxsparethreads">MaxSpareThreads directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MaxSpareThreads - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>MaxSpareThreads - 10 (Perchild) or 500 (worker)</code><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> core<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild</p> - - <p>Maximum number of idle threads. Different MPMs deal with - this directive differently. Perchild monitors the number of idle - threads on a per-child basis. If there are too many idle - threads in that child, the server will begin to kill threads + +</usage> +<hr> +<h2> +<a name="MaxSpareThreads">MaxSpareThreads</a> <a name="maxsparethreads">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 number of idle threads</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MaxSpareThreads <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MaxSpareThreads 10 (Perchild) or 500 (worker)</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>Maximum number of idle threads. Different MPMs deal with this + directive differently. <code><a href="perchild.html">perchild</a></code> monitors the + number of idle threads on a per-child basis. If there are too many + idle threads in that child, the server will begin to kill threads within that child.</p> - <p>worker deals with idle threads on a server-wide basis. If - there are too many idle threads in the server then child - processes are killed until the number of idle threads is less - than this number.</p> - - <p>See also <a href="#minsparethreads">MinSpareThreads</a> and - <a href="#startservers">StartServers</a>.</p> - <hr /> - - <h2><a id="maxthreadsperchild" - name="maxthreadsperchild">MaxThreadsPerChild directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MaxThreadsPerChild - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> - <code>MaxThreadsPerChild 64</code> <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> core<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild</p> - - <p>Maximum number of threads per child. For MPMs with a + +<p> +<code><a href="worker.html">worker</a></code> deals with idle threads on a + server-wide basis. If there are too many idle threads in the + server then child processes are killed until the number of idle + threads is less than this number.</p> + + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<code class="directive"><a href="#minsparethreads" class="directive">MinSpareThreads</a></code> +</li> +<li> +<code class="directive"><a href="#startservers" class="directive">StartServers</a></code> +</li> +</ul> +<hr> +<h2> +<a name="MaxThreadsPerChild">MaxThreadsPerChild</a> <a name="maxthreadsperchild">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 number of threads per child process</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MaxThreadsPerChild <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MaxThreadsPerChild 64</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>Maximum number of threads per child. For MPMs with a variable number of threads per child, this directive sets the maximum number of threads that will be created in each child process. To increase this value beyond its default, it is necessary to change the value of the compile-time define <code>HARD_THREAD_LIMIT</code> and recompile the server.</p> - <hr /> - - <h2><a id="minsparethreads" - name="minsparethreads">MinSpareThreads directive</a></h2> - <!--%plaintext <?INDEX {\tt MinSpareServers} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MinSpareServers - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>MaxSpareThreads - 5 (Perchild) or 250 (worker)</code><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> core<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild</p> - - <p>Minimum number of idle threads to handle request spikes. - Different MPMs deal with this directive differently. Perchild - monitors the number of idle threads on a per-child basis. If - there aren't enough idle threads in that child, the server will - begin to create new threads within that child.</p> - - <p>worker deals with idle threads on a server-wide basis. If - there aren't enough idle threads in the server then child - processes are created until the number of idle threads is - greater than number.</p> - See also <a href="#maxsparethreads">MaxSpareThreads</a> and <a - href="#startservers">StartServers</a>. - <hr /> - - <h2><a id="numservers" name="numservers">NumServers - directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> NumServers - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>NumServers - 2</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> perchild</p> - - <p>Number of children alive at the same time. MPMs that use + +</usage> +<hr> +<h2> +<a name="MinSpareThreads">MinSpareThreads</a> <a name="minsparethreads">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>Minimum number of idle threads available to handle request +spikes</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MinSpareServers <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MinSpareThreads 5 (Perchild) or 250 (worker)</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>Minimum number of idle threads to handle request spikes. + Different MPMs deal with this directive + differently. <code><a href="perchild.html">perchild</a></code> monitors the number of idle + threads on a per-child basis. If there aren't enough idle threads + in that child, the server will begin to create new threads within + that child.</p> + + +<p> +<code><a href="worker.html">worker</a></code> deals with idle threads on a + server-wide basis. If there aren't enough idle threads in the + server then child processes are created until the number of idle + threads is greater than number.</p> + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<code class="directive"><a href="#maxsparethreads" class="directive">MaxSpareThreads</a></code> +</li> +<li> +<code class="directive"><a href="#startservers" class="directive">StartServers</a></code> +</li> +</ul> +<hr> +<h2> +<a name="NumServers">NumServers</a> <a name="numservers">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>Total number of children alive at the same time</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>NumServers <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>NumServers 2</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="perchild.html">perchild</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>Number of children alive at the same time. MPMs that use this directive do not dynamically create new child processes so this number should be large enough to handle the requests for the entire site.</p> - <hr /> - - <h2><a id="scoreboardfile" name="scoreboardfile">ScoreBoardFile - directive</a></h2> - <!--%plaintext <?INDEX {\tt ScoreBoardFile} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> ScoreBoardFile - <em>filename</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>ScoreBoardFile - logs/apache_status</code><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> MPM<br /> - <a href="directive-dict.html#Compatibility" rel="Help"></a> <a - href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork</p> - - <p>The ScoreBoardFile directive is required on some - architectures to place a file that the server will use to - communicate between its children and the parent. The easiest - way to find out if your architecture requires a scoreboard file - is to run Apache and see if it creates the file named by the - directive. If your architecture requires it then you must - ensure that this file is not used at the same time by more than - one invocation of Apache.</p> - - <p>If you have to use a ScoreBoardFile then you may see - improved speed by placing it on a RAM disk. But be careful that - you heed the same warnings about log file placement and <a - href="../misc/security_tips.html">security</a>.</p> - - <p><strong>See Also</strong>: <a - href="../stopping.html">Stopping and Restarting Apache</a></p> - <hr /> - - <h2><a id="sendbuffersize" name="sendbuffersize">SendBufferSize - directive</a></h2> - <!--%plaintext <?INDEX {\tt SendBufferSize} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> SendBufferSize - <em>bytes</em><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork, mpm_winnt</p> - The server will set the TCP buffer size to the number of bytes + +</usage> +<hr> +<h2> +<a name="PidFile">PidFile</a> <a name="pidfile">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>Sets the file where the server records the process ID +of the daemon</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>PidFile <em>filename</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>PidFile logs/httpd.pid</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchilde.html">perchilde</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">PidFile</code> directive sets the file to + which the server records the process id of the daemon. If the + filename does not begin with a slash (/) then it is assumed to be + relative to the <code class="directive"><a href="core.html#serverroot" class="directive">ServerRoot</a></code>.</p> + + +<p>It is often useful to be able to send the server a signal, + so that it closes and then reopens its <code class="directive"><a href="core.html#errorlog" class="directive">ErrorLog</a></code> and TransferLog, and + re-reads its configuration files. This is done by sending a + SIGHUP (kill -1) signal to the process id listed in the + PidFile.</p> + + +<p>The PidFile is subject to the same warnings about log file + placement and <a href="../misc/security_tips.html#serverroot">security</a>.</p> + +</usage> +<hr> +<h2> +<a name="ScoreBoardFile">ScoreBoardFile</a> <a name="scoreboardfile">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 file used to store coordination data for +the child processes</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>ScoreBoardFile <em>file-path</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ScoreBoardFile logs/apache_status</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">ScoreBoardFile</code> directive is required + on some architectures to place a file that the server will use to + communicate between its children and the parent. The easiest way + to find out if your architecture requires a scoreboard file is to + run Apache and see if it creates the file named by the + directive. If your architecture requires it then you must ensure + that this file is not used at the same time by more than one + invocation of Apache.</p> + + +<p>If you have to use a <code class="directive">ScoreBoardFile</code> then + you may see improved speed by placing it on a RAM disk. But be + careful that you heed the same warnings about log file placement + and <a href="../misc/security_tips.html">security</a>.</p> + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<a href="../stopping.html">Stopping and Restarting Apache</a> +</li> +</ul> +<hr> +<h2> +<a name="SendBufferSize">SendBufferSize</a> <a name="sendbuffersize">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>TCP buffer size</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>SendBufferSize <em>bytes</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The server will set the TCP buffer size to the number of bytes specified. Very useful to increase past standard OS defaults on high speed high latency (<em>i.e.</em>, 100ms or so, such as - transcontinental fast pipes) - <hr /> - - <h2><a id="serverlimit" - name="serverlimit">ServerLimit</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> ServerLimit - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>ServerLimit - 256</code> (prefork MPM), <code>ServerLimit 16</code> (worker MPM)<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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> prefork, worker</p> - - <p>For the prefork MPM, this directive sets the maximum configured - value for <code><a href="#maxclients">MaxClients</a></code> for - the lifetime of the Apache process. For the worker MPM, this - directive in combination with <code><a href="#threadlimit"> - ThreadLimit</a></code> sets the maximum configured value for - <code><a href="#maxclients">MaxClients</a></code> - for the lifetime of the Apache process. Any attempts to change - this directive during a restart will be ignored, but - <code>MaxClients</code> can be modified during a restart.</p> - - <p>Special care must be taken when using this directive. - If <code>ServerLimit</code> is set to a value much higher than - necessary, extra, unused shared memory will be allocated. - If both <code>ServerLimit</code> and <code>MaxClients</code> - are set to values higher than the system can handle, Apache - may not start or the system may become unstable.</p> - - <p>With the prefork MPM, use this directive only if you need to - set <code>MaxClients</code> higher higher than 256. Do not set - the value of this directive any higher than what you might want - to set <code>MaxClients</code> to.</p> - - <p>With the worker MPM, use this directive only if your - <code>MaxClients</code> and <code>ThreadsPerChild</code> - settings require more than 16 server processes. Do not set the - value of this directive any higher than the number of server - processes required by what you may want for <code>MaxClients - </code> and <code>ThreadsPerChild</code>.</p> - <hr /> - - <h2><a id="startservers" name="startservers">StartServers - directive</a></h2> - <!--%plaintext <?INDEX {\tt StartServers} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> StartServers - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>StartServers - 5</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, prefork</p> - - <p>The StartServers directive sets the number of child server - processes created on startup. As the number of processes is - dynamically controlled depending on the load, there is usually - little reason to adjust this parameter.</p> - - <p>See also <a href="#minsparethreads">MinSpareThreads</a> and - <a href="#maxsparethreads">MaxSpareThreads</a>.</p> - <hr /> - - <h2><a id="startthreads" name="startthreads">StartThreads - directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> StartThreads - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>StartThreads - 5</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> perchild</p> - - <p>Number of threads each child creates on startup. As the + transcontinental fast pipes).</p> + +</usage> +<hr> +<h2> +<a name="ServerLimit">ServerLimit</a> <a name="serverlimit">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>Upper limit on configurable number of processes</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>ServerLimit <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ServerLimit 256 (prefork), ServerLimit 16 (worker)</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>For the <code><a href="prefork.html">prefork</a></code> MPM, this directive sets the + maximum configured value for <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> for the lifetime of the + Apache process. For the worker MPM, this directive in combination + with <code class="directive"><a href="#threadlimit" class="directive">ThreadLimit</a></code> sets + the maximum configured value for <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> for the lifetime of the + Apache process. Any attempts to change this directive during a + restart will be ignored, but <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> can be modified during + a restart.</p> + + +<p>Special care must be taken when using this directive. If + <code class="directive">ServerLimit</code> is set to a value much higher + than necessary, extra, unused shared memory will be allocated. If + both <code class="directive">ServerLimit</code> and <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> are set to values + higher than the system can handle, Apache may not start or the + system may become unstable.</p> + + +<p>With the <code><a href="prefork.html">prefork</a></code> MPM, use this directive only + if you need to set <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> higher higher than 256. + Do not set the value of this directive any higher than what you + might want to set <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> to.</p> + + +<p>With the <code><a href="worker.html">worker</a></code> MPM, use this directive only + if your <code class="directive"><a href="#maxclients" class="directive">MaxClients</a></code> and + <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> + settings require more than 16 server processes. Do not set the + value of this directive any higher than the number of server + processes required by what you may want for <code class="directive"><a href="#maxclients " class="directive">MaxClients </a></code> and <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code>.</p> + +</usage> +<hr> +<h2> +<a name="StartServers">StartServers</a> <a name="startservers">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>Number of child server processes created at startup</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>StartServers <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>StartServers 5</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">StartServers</code> directive sets the + number of child server processes created on startup. As the number + of processes is dynamically controlled depending on the load, + there is usually little reason to adjust this parameter.</p> + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<code class="directive"><a href="#minsparethreads" class="directive">MinSpareThreads</a></code> +</li> +<li> +<code class="directive"><a href="#maxsparethreads" class="directive">MaxSpareThreads</a></code> +</li> +</ul> +<hr> +<h2> +<a name="StartThreads">StartThreads</a> <a name="startthreads">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>Nubmer of threads each child creates on startup</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>StartThreads <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>StartThreads 5</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="perchild.html">perchild</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>Number of threads each child creates on startup. As the number of threads is dynamically controlled depending on the load, there is usually little reason to adjust this parameter.</p> - <hr /> - - <h2><a id="threadlimit" - name="threadlimit">ThreadLimit</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> ThreadLimit - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>ThreadLimit - 64</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker</p> - - <p>This directive sets the maximum configured value for - <code><a href="#threadsperchild">ThreadsPerChild</a></code> for - the lifetime of the Apache process. Any attempts to change this - directive during a restart will be ignored, but <code> - ThreadsPerChild</code> can be modified during a restart up to - the value of this directive.</p> - - <p>Special care must be taken when using this directive. - If <code>ThreadLimit</code> is set to a value much higher than - <code>ThreadsPerChild</code>, extra unused shared memory will be - allocated. If both <code>ThreadLimit</code> and <code> - ThreadsPerChild</code> are set to values higher than the system - can handle, Apache may not start or the system may become - unstable.</p> - - <p>Use this directive only if you need to set <code> - ThreadsPerChild</code> higher than 64. Do not set the value of - this directive any higher than what you might want to set <code> - ThreadsPerChild</code> to.</p> - <hr /> - - <h2><a id="threadsperchild" - name="threadsperchild">ThreadsPerChild</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> ThreadsPerChild - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>ThreadsPerChild - 50</code><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> MPM<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, mpm_winnt</p> - - <p>This directive sets the number of threads created by each + +</usage> +<hr> +<h2> +<a name="ThreadLimit">ThreadLimit</a> <a name="threadlimit">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>Sets the upper limit on the configurable number of threads +per child process</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>ThreadLimit <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ThreadLimit 64</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>This directive sets the maximum configured value for <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> for the lifetime + of the Apache process. Any attempts to change this directive + during a restart will be ignored, but <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> can be modified + during a restart up to the value of this directive.</p> + + +<p>Special care must be taken when using this directive. If + <code class="directive">ThreadLimit</code> is set to a value much higher + than <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code>, + extra unused shared memory will be allocated. If both + <code class="directive">ThreadLimit</code> and <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> are set to values + higher than the system can handle, Apache may not start or the + system may become unstable.</p> + + +<p>Use this directive only if you need to set <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> higher than 64. Do + not set the value of this directive any higher than what you might + want to set <code class="directive"><a href="#threadsperchild" class="directive">ThreadsPerChild</a></code> to.</p> + +</usage> +<hr> +<h2> +<a name="ThreadsPerChild">ThreadsPerChild</a> <a name="threadsperchild">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>Number of threads created by each child process</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>ThreadsPerChild <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>ThreadsPerChild 50</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="mpm_winnt.html">mpm_winnt</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>This directive sets the number of threads created by each child process. The child creates these threads at startup and never creates more. if using an MPM like mpmt_winnt, where there is only one child process, this number should be high @@ -698,67 +1167,109 @@ like worker, where there are multiple child processes, the total number of threads should be high enough to handle the common load on the server.</p> - <hr /> - - <h2><a id="user" name="user">User directive</a></h2> - <!--%plaintext <?INDEX {\tt User} directive> --> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> User - <em>unix-userid</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>User - #-1</code><br /> - <a href="directive-dict.html#Context" - rel="Help"><strong>Context:</strong></a> server config, virtual - host<br /> - <a href="directive-dict.html#Status" - rel="Help"><strong>Status:</strong></a> core<br /> - <a href="directive-dict.html#Module" - rel="Help"><strong>Module:</strong></a> worker, perchild, - prefork</p> - The User directive sets the userid as which the server will - answer requests. In order to use this directive, the standalone - server must be run initially as root. <em>Unix-userid</em> is - one of: - - <dl> - <dt>A username</dt> - - <dd>Refers to the given user by name.</dd> - - <dt># followed by a user number.</dt> - - <dd>Refers to a user by their number.</dd> - </dl> - The user should have no privileges which result in it being - able to access files which are not intended to be visible to - the outside world, and similarly, the user should not be able - to execute code which is not meant for httpd requests. It is - recommended that you set up a new user and group specifically - for running the server. Some admins use user - <code>nobody</code>, but this is not always possible or - desirable. For example mod_proxy's cache, when enabled, must be - accessible to this user (see <a - href="mod_proxy.html">mod_proxy's</a> <code>CacheRoot</code> - directive). - - <p>Notes: If you start the server as a non-root user, it will + +</usage> +<hr> +<h2> +<a name="User">User</a> <a name="user">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>The userid under which the server will answer +requests</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>User <em>unix-userid</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>User #-1</code></td> +</tr> +<tr> +<td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td> +</tr> +<tr> +<td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td><code><a href="worker.html">worker</a></code>, <code><a href="perchild.html">perchild</a></code>, <code><a href="prefork.html">prefork</a></code></td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">User</code> directive sets the userid as + which the server will answer requests. In order to use this + directive, the standalone server must be run initially as + root. <em>Unix-userid</em> is one of:</p> + + +<dl> + +<dt>A username</dt> + + +<dd>Refers to the given user by name.</dd> + + +<dt># followed by a user number.</dt> + + +<dd>Refers to a user by their number.</dd> + +</dl> + + +<p>The user should have no privileges which result in it being + able to access files which are not intended to be visible to the + outside world, and similarly, the user should not be able to + execute code which is not meant for httpd requests. It is + recommended that you set up a new user and group specifically for + running the server. Some admins use user <code>nobody</code>, but + this is not always possible or desirable. For example + <code><a href="mod_proxy.html">mod_proxy</a></code>'s cache, when enabled, must be + accessible to this user (see <code class="directive"><a href="mod_proxy.html#cacheroot" class="directive">CacheRoot</a></code>).</p> + + +<p>Notes: If you start the server as a non-root user, it will fail to change to the lesser privileged user, and will instead continue to run as that original user. If you do start the server as root, then it is normal for the parent process to remain running as root.</p> - <p>Special note: Use of this directive in <VirtualHost> - is no longer supported. To configure your server for <a - href="mod_suexec.html">suexec</a> use <a - href="mod_suexec.html#suexecusergroup">SuexecUserGroup</a>. - SECURITY: Don't set User (or <a href="#group">Group</a>) to - <code>root</code> unless you know exactly what you are doing, - and what the dangers are.</p> - - <p><!--#include virtual="footer.html" --> - </p> - </body> + +<p>Special note: Use of this directive in <code class="directive"><a href="core.html#virtualhost" class="directive"><VirtualHost></a></code> is no longer supported. To + configure your server for <a href="mod_suexec.html">suexec</a> use + <code class="directive"><a href="mod_suexec.html#suexecusergroup" class="directive">SuexecUserGroup</a></code>.</p> + + +<blockquote> +<table> +<tr> +<td bgcolor="#e0e5f5"> +<p align="center"> +<strong>Security</strong> +</p> +<p>Don't set <code class="directive">User</code> +(or <code class="directive"><a href="#group" class="directive">Group</a></code>) to +<code>root</code> unless you know exactly what you are doing, and what +the dangers are.</p> +</td> +</tr> +</table> +</blockquote> + +</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> - diff --git a/docs/manual/mod/prefork.html b/docs/manual/mod/prefork.html index ef147465cf..606c477e25 100644 --- a/docs/manual/mod/prefork.html +++ b/docs/manual/mod/prefork.html @@ -1,39 +1,49 @@ -<!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 MPM prefork</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">Multi-Processing Module prefork</h1> - - <p>This Multi-Processing Module implements a non-threaded, - pre-forking web server.</p> - - <p><a href="module-dict.html#Status" - rel="Help"><strong>Status:</strong></a> MPM<br /> - <a href="module-dict.html#SourceFile" - rel="Help"><strong>Source File:</strong></a> prefork.c<br /> - <a href="module-dict.html#ModuleIdentifier" - rel="Help"><strong>Module Identifier:</strong></a> - mpm_prefork_module</p> - - <h2>Summary</h2> - - <p>This Multi-Processing Module (MPM) implements a +<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>prefork - 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 prefork</h1> +<table cellspacing="1" cellpadding="0" bgcolor="#cccccc"> +<tr> +<td> +<table bgcolor="#ffffff"> +<tr> +<td><span class="help">Description:</span></td><td> +<description>Implements a non-threaded, pre-forking web server</description> +</td> +</tr> +<tr> +<td><a href="module-dict.html#Status" class="help">Status:</a></td><td>MPM</td> +</tr> +<tr> +<td><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:</a></td><td>mpm_prefork_module</td> +</tr> +</table> +</td> +</tr> +</table> +<h2>Summary</h2> +<summary> + +<p>This Multi-Processing Module (MPM) implements a non-threaded, pre-forking web server which handles request in a manner very similar to the default behavior of Apache 1.3 on Unix.</p> - <p>A single control process is responsible for launching child + +<p>A single control process is responsible for launching child processes which listen for connections and serve them when they arrive. Apache always tries to maintain several <em>spare</em> or idle server processes, which stand ready to serve incoming @@ -41,193 +51,314 @@ child processes to be forked before their requests can be served.</p> - <p>The <code>StartServers</code>, <code>MinSpareServers</code>, - <code>MaxSpareServers</code>, and <code>MaxClients</code> - regulate how the parent process creates children to serve - requests. In general, Apache is very self-regulating, so most - sites do not need to adjust these directives from their default - values. Sites which need to serve more than 256 simultaneous - requests may need to increase <code>MaxClients</code>, while - sites with limited memory may need to decrease - <code>MaxClients</code> to keep the server from thrashing - (swapping memory to disk and back). More information about - tuning process creation is provided in the <a - href="../misc/perf-tuning.html">performance hints</a> + +<p>The <code class="directive"><a href="mpm_common.html#startservers" class="directive">StartServers</a></code>, + <code class="directive"><a href="#minspareservers" class="directive">MinSpareServers</a></code>, + <code class="directive"><a href="#maxspareservers" class="directive">MaxSpareServers</a></code>, and + <code class="directive"><a href="mpm_common.html#maxclients" class="directive">MaxClients</a></code> regulate how + the parent process creates children to serve requests. In general, + Apache is very self-regulating, so most sites do not need to + adjust these directives from their default values. Sites which + need to serve more than 256 simultaneous requests may need to + increase <code class="directive"><a href="mpm_common.html#maxclients" class="directive">MaxClients</a></code>, + while sites with limited memory may need to decrease <code class="directive"><a href="mpm_common.html#maxclients" class="directive">MaxClients</a></code> to keep the server from + thrashing (swapping memory to disk and back). More information + about tuning process creation is provided in the <a href="../misc/perf-tuning.html">performance hints</a> documentation.</p> - <p>While the parent process is usually started as root under - Unix in order to bind to port 80, the child processes are - launched by Apache as a less-privileged user. The - <code>User</code> and <code>Group</code> directives are used to - set the privileges of the Apache child processes. The child - processes must be able to read all the content that will be - served, but should have as few privileges beyond that as - possible. In addition, unless <a - href="../suexec.html">suexec</a> is used, these directives also - set the privileges which will be inherited by CGI scripts.</p> - - <p><code>MaxRequestsPerChild</code> controls how frequently the - server recycles processes by killing old ones and launching new - ones.</p> - - <p>See also: <a href="../bind.html">Setting which addresses and - ports Apache uses</a>.</p> - - <h2>Directives</h2> - - <ul> - <li><a href="#acceptmutex">AcceptMutex</a></li> - - <li><a - href="mpm_common.html#coredumpdirectory">CoreDumpDirectory</a></li> - - <li><a href="mpm_common.html#group">Group</a></li> - - <li><a href="mpm_common.html#pidfile">PidFile</a></li> - - <li><a href="mpm_common.html#listen">Listen</a></li> - - <li><a - href="mpm_common.html#listenbacklog">ListenBacklog</a></li> - - <li><a href="mpm_common.html#lockfile">LockFile</a></li> - - <li><a href="mpm_common.html#maxclients">MaxClients</a></li> - - <li><a - href="mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></li> - - <li><a href="#maxspareservers">MaxSpareServers</a></li> - - <li><a href="#minspareservers">MinSpareServers</a></li> - - <li><a - href="mpm_common.html#scoreboardfile">ScoreBoardFile</a></li> - - <li><a - href="mpm_common.html#sendbuffersize">SendBufferSize</a></li> - - <li><a - href="mpm_common.html#serverlimit">ServerLimit</a></li> - - <li><a - href="mpm_common.html#startservers">StartServers</a></li> - - <li><a href="mpm_common.html#user">User</a></li> - </ul> - <hr /> - - <h2><a id="acceptmutex" name="acceptmutex">AcceptMutex - Directive</a></h2> - - <p><a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> AcceptMutex - default|<em>method</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>AcceptMutex - default</code><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> core</p> - - <p>The <code>AcceptMutex</code> directives sets the method that - Apache uses to serialize multiple children accepting requests - on network sockets. Prior to Apache 2.0, the method was + +<p>While the parent process is usually started as root under Unix + in order to bind to port 80, the child processes are launched by + Apache as a less-privileged user. The <code class="directive"><a href="mpm_common.html#user" class="directive">User</a></code> and <code class="directive"><a href="mpm_common.html#group" class="directive">Group</a></code> directives are used to set + the privileges of the Apache child processes. The child processes + must be able to read all the content that will be served, but + should have as few privileges beyond that as possible. In + addition, unless <a href="../suexec.html">suexec</a> is used, + these directives also set the privileges which will be inherited + by CGI scripts.</p> + + +<p> +<code class="directive"><a href="mpm_common.html#maxrequestsperchild" class="directive">MaxRequestsPerChild</a></code> + controls how frequently the server recycles processes by killing + old ones and launching new ones.</p> + +</summary> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<a href="../bind.html">Setting which addresses and + ports Apache uses</a> +</li> +</ul> +<h2>Directives</h2> +<ul> +<li> +<a href="#acceptmutex">AcceptMutex</a> +</li> +<li> +<a href="mpm_common.html#coredumpdirectory">CoreDumpDirectory</a> +</li> +<li> +<a href="mpm_common.html#listen">Listen</a> +</li> +<li> +<a href="mpm_common.html#listenbacklog">ListenBacklog</a> +</li> +<li> +<a href="mpm_common.html#lockfile">LockFile</a> +</li> +<li> +<a href="mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a> +</li> +<li> +<a href="mpm_common.html#maxspareservers">MaxSpareServers</a> +</li> +<li> +<a href="#maxspareservers">MaxSpareServers</a> +</li> +<li> +<a href="mpm_common.html#minspareservers">MinSpareServers</a> +</li> +<li> +<a href="#minspareservers">MinSpareServers</a> +</li> +<li> +<a href="mpm_common.html#pidfile">PidFile</a> +</li> +<li> +<a href="mpm_common.html#scoreboardfile">ScoreBoardFile</a> +</li> +<li> +<a href="mpm_common.html#sendbuffersize">SendBufferSize</a> +</li> +<li> +<a href="mpm_common.html#serverlimit">ServerLimit</a> +</li> +<li> +<a href="mpm_common.html#startservers">StartServers</a> +</li> +<li> +<a href="mpm_common.html#user">User</a> +</li> +</ul> +<hr> +<h2> +<a name="AcceptMutex">AcceptMutex</a> <a name="acceptmutex">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>Method that Apache uses to serialize multiple children +accepting requests on network sockets</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>AcceptMutex default|<em>method</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>AcceptMutex default</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>prefork</td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">AcceptMutex</code> directives sets the + method that Apache uses to serialize multiple children accepting + requests on network sockets. Prior to Apache 2.0, the method was selectable only at compile time. The optimal method to use is - highly architecture and platform dependent. For further - details, see the <a href="../misc/perf-tuning.html">performance - tuning</a> documentation.</p> + highly architecture and platform dependent. For further details, + see the <a href="../misc/perf-tuning.html">performance tuning</a> + documentation.</p> - <p>If this directive is set to <code>default</code>, then the + +<p>If this directive is set to <code>default</code>, then the compile-time selected default will be used. Other possible methods are listed below. Note that not all methods are available on all platforms. If a method is specified which is not available, a message will be written to the error log listing the available methods.</p> - <dl> - <dt><code>flock</code></dt> - - <dd>uses the <code>flock(2)</code> system call to lock the - file defined by the <a - href="mpm_common.html#lockfile">LockFile</a> directive.</dd> - - <dt><code>fcntl</code></dt> - - <dd>uses the <code>fnctl(2)</code> system call to lock the - file defined by the <a - href="mpm_common.html#lockfile">LockFile</a> directive.</dd> - - <dt><code>sysvsem</code></dt> - - <dd>uses SySV-style semaphores to implement the mutex.</dd> - - <dt><code>pthread</code></dt> - - <dd>uses POSIX mutexes as implemented by the POSIX Threads + +<dl> + +<dt> +<code>flock</code> +</dt> + + +<dd>uses the <code>flock(2)</code> system call to lock the + file defined by the <code class="directive"><a href="mpm_common.html#lockfile" class="directive">LockFile</a></code> directive.</dd> + + +<dt> +<code>fcntl</code> +</dt> + + +<dd>uses the <code>fnctl(2)</code> system call to lock the + file defined by the <code class="directive"><a href="mpm_common.html#lockfile" class="directive">LockFile</a></code> directive.</dd> + + +<dt> +<code>sysvsem</code> +</dt> + + +<dd>uses SySV-style semaphores to implement the mutex.</dd> + + +<dt> +<code>pthread</code> +</dt> + + +<dd>uses POSIX mutexes as implemented by the POSIX Threads (PThreads) specification.</dd> - </dl> - <hr /> - - <h2><a id="maxspareservers" - name="maxspareservers">MaxSpareServers directive</a></h2> - <!--%plaintext <?INDEX {\tt MaxSpareServers} directive> --> - <a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MaxSpareServers - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>MaxSpareServers - 10</code><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> core - - <p>The MaxSpareServers directive sets the desired maximum - number of <em>idle</em> child server processes. An idle process - is one which is not handling a request. If there are more than - MaxSpareServers idle, then the parent process will kill off the - excess processes.</p> - - <p>Tuning of this parameter should only be necessary on very + +</dl> + +</usage> +<hr> +<h2> +<a name="MaxSpareServers">MaxSpareServers</a> <a name="maxspareservers">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 number of idle child server processes</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MaxSpareServers <em>number</em> +<br> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MaxSpareServers 10</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>prefork</td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">MaxSpareServers</code> directive sets the + desired maximum number of <em>idle</em> child server processes. An + idle process is one which is not handling a request. If there are + more than MaxSpareServers idle, then the parent process will kill + off the excess processes.</p> + + +<p>Tuning of this parameter should only be necessary on very busy sites. Setting this parameter to a large number is almost always a bad idea.</p> - <p>See also <a href="#minspareservers">MinSpareServers</a> and - <a href="mpm_common.html#startservers">StartServers</a>.</p> - <hr /> - - <h2><a id="minspareservers" - name="minspareservers">MinSpareServers directive</a></h2> - <!--%plaintext <?INDEX {\tt MinSpareServers} directive> --> - <a href="directive-dict.html#Syntax" - rel="Help"><strong>Syntax:</strong></a> MinSpareServers - <em>number</em><br /> - <a href="directive-dict.html#Default" - rel="Help"><strong>Default:</strong></a> <code>MinSpareServers - 5</code><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> core - - <p>The MinSpareServers directive sets the desired minimum - number of <em>idle</em> child server processes. An idle process - is one which is not handling a request. If there are fewer than - MinSpareServers idle, then the parent process creates new - children at a maximum rate of 1 per second.</p> - - <p>Tuning of this parameter should only be necessary on very +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<code class="directive"><a href="#minspareservers" class="directive">MinSpareServers</a></code> +</li> +<li> +<code class="directive"><a href="mpm_common.html#startservers" class="directive">StartServers</a></code> +</li> +</ul> +<hr> +<h2> +<a name="MinSpareServers">MinSpareServers</a> <a name="minspareservers">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>Minimum number of idle child server processes</td> +</tr> +<tr> +<td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td> +<syntax>MinSpareServers <em>number</em> +</syntax> +</td> +</tr> +<tr> +<td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>MinSpareServers 5</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>MPM</td> +</tr> +<tr> +<td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>prefork</td> +</tr> +</table> +</td> +</tr> +</table> +<usage> + +<p>The <code class="directive">MinSpareServers</code> directive sets the + desired minimum number of <em>idle</em> child server processes. An + idle process is one which is not handling a request. If there are + fewer than MinSpareServers idle, then the parent process creates + new children at a maximum rate of 1 per second.</p> + + +<p>Tuning of this parameter should only be necessary on very busy sites. Setting this parameter to a large number is almost always a bad idea.</p> - <p>This directive has no effect on Microsoft Windows.</p> - - <p>See also <a href="#maxspareservers">MaxSpareServers</a> and - <a href="mpm_common.html#startservers">StartServers</a>. - <!--#include virtual="footer.html" --> - </p> - </body> + +<p>This directive has no effect on Microsoft Windows.</p> + +</usage> +<p> +<strong>See also:</strong> +</p> +<ul> +<li> +<code class="directive"><a href="#maxspareservers" class="directive">MaxSpareServers</a></code> +</li> +<li> +<code class="directive"><a href="mpm_common.html#startservers" class="directive">StartServers</a></code> +</li> +</ul> +<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> - |