mpm_common.xml revision eb2fc080554a5d870ca8f67296256d8781ac0a75
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<?xml version="1.0"?>
64154a07803c72f624008f5c77de844607fcc5a5patrikj<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>mpm_common</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>A collection of directives that are implemented by
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivemore than one multi-processing module (MPM)</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<status>MPM</status>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>CoreDumpDirectory</name>
eb2fc080554a5d870ca8f67296256d8781ac0a75slive<description>Directory where Apache attempts to
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliveswitch before dumping core</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>CoreDumpDirectory <em>directory</em></syntax>
23819e87bf36fbb02a63119408034b3818413983patrikj<default>See usage for the default setting</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>This controls the directory to which Apache attempts to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive switch before dumping core. The default is in the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="core">ServerRoot</directive> directory, however
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive since this should not be writable by the user the server runs
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive as, core dumps won't normally get written. If you want a core
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive dump for debugging, you can use this directive to place it in a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive different location.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>Group</name>
eb2fc080554a5d870ca8f67296256d8781ac0a75slive<description>Group under which the server will answer
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliverequests</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>Group <em>unix-group</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>Group #-1</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context><context>virtual host</context>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>Group</directive> directive sets the group under
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive which the server will answer requests. In order to use this
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive directive, the stand-alone server must be run initially as root.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <em>Unix-group</em> is one of:</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dl>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dt>A group name</dt>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dd>Refers to the given group by name.</dd>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dt># followed by a group number.</dt>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dd>Refers to a group by its number.</dd>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive </dl>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>It is recommended that you set up a new group specifically for
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive running the server. Some admins use user <code>nobody</code>,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive but this is not always possible or desirable.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Note: if you start the server as a non-root user, it will
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive fail to change to the specified group, and will instead
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive continue to run as the group of the original user.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
412307efbfcb2bb8b991be6ad2557f4d3ac0ce77jerenkrantz <p>Special note: Use of this directive in &lt;VirtualHost&gt; is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive no longer supported. To implement the <a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive href="/suexec.html">suEXEC wrapper</a> with Apache 2.0, use the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mod_suexec">SuexecUserGroup</directive>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive directive. SECURITY: See <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">User</directive> for a discussion of the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive security considerations.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>PidFile</name>
eb2fc080554a5d870ca8f67296256d8781ac0a75slive<description>File where the server records the process ID
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliveof the daemon</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>PidFile <em>filename</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>PidFile logs/httpd.pid</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchilde</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>PidFile</directive> directive sets the file to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive which the server records the process id of the daemon. If the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive filename does not begin with a slash (/) then it is assumed to be
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive relative to the <directive module="core">ServerRoot</directive>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>It is often useful to be able to send the server a signal,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive so that it closes and then reopens its <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="core">ErrorLog</directive> and TransferLog, and
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive re-reads its configuration files. This is done by sending a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive SIGHUP (kill -1) signal to the process id listed in the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive PidFile.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The PidFile is subject to the same warnings about log file
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive placement and <a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive href="/misc/security_tips.html#serverroot">security</a>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>Listen</name>
eb2fc080554a5d870ca8f67296256d8781ac0a75slive<description>IP addresses and ports that the server
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivelistens to</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>Listen [<em>IP-address</em>:]<em>portnumber</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>Listen</directive> directive instructs Apache to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive listen to only specific IP addresses or ports; by default it
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive responds to requests on all IP interfaces. The Listen directive is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive now a required directive. If it is not in the config file, the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server will fail to start. This is a change from previous versions
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive of Apache.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The Listen directive tells the server to accept incoming
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive requests on the specified port or address-and-port combination.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive If only a port number is specified, the server listens to the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive given port on all interfaces. If an IP address is given as well
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive as a port, the server will listen on the given port and
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive interface.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Multiple Listen directives may be used to specify a number
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive of addresses and ports to listen to. The server will respond to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive requests from any of the listed addresses and ports.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>For example, to make the server accept connections on both
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive port 80 and port 8000, use:</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<example>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Listen 80<br />
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Listen 8000
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</example>
64154a07803c72f624008f5c77de844607fcc5a5patrikj <p>To make the server accept connections on two specified
64154a07803c72f624008f5c77de844607fcc5a5patrikj interfaces and port numbers, use </p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<example>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Listen 192.170.2.1:80<br />
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Listen 192.170.2.5:8000
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</example>
64154a07803c72f624008f5c77de844607fcc5a5patrikj <p>IPv6 addresses must be surrounded in square brackets, as in the
64154a07803c72f624008f5c77de844607fcc5a5patrikj following example:</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<example>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Listen [fe80::a00:20ff:fea7:ccea]:80
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</example>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><a href="/dns-caveats.html">DNS Issues</a></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><a href="/bind.html">Setting
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive which addresses and ports Apache uses</a></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>ListenBackLog</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Maximum length of the queue of pending connections</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>ListenBacklog <em>backlog</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>ListenBacklog 511</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The maximum length of the queue of pending connections.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Generally no tuning is needed or desired, however on some
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive systems it is desirable to increase this when under a TCP SYN
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive flood attack. See the backlog parameter to the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <code>listen(2)</code> system call.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>This will often be limited to a smaller number by the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive operating system. This varies from OS to OS. Also note that
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive many OSes do not use exactly what is specified as the backlog,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive but use a number based on (but normally larger than) what is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive set.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>LockFile</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Location of the accept serialization lock file</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>LockFile <em>filename</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>LockFile logs/accept.lock</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>LockFile</directive> directive sets the path to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the lockfile used when Apache is compiled with either
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive USE_FCNTL_SERIALIZED_ACCEPT or USE_FLOCK_SERIALIZED_ACCEPT. This
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive directive should normally be left at its default value. The main
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive reason for changing it is if the <code>logs</code> directory is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive NFS mounted, since <strong>the lockfile must be stored on a local
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive disk</strong>. The PID of the main server process is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive automatically appended to the filename.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p><strong>SECURITY:</strong> It is best to avoid putting this
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive file in a world writable directory such as
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <code>/var/tmp</code> because someone could create a denial of
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive service attack and prevent the server from starting by creating
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive a lockfile with the same name as the one the server will try to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive create.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>MaxClients</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Maximum number of child processes that will be created
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliveto serve requests</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>MaxClients <em>number</em></syntax>
eb2fc080554a5d870ca8f67296256d8781ac0a75slive<default>MaxClients
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive 8 (with threads) MaxClients 256</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>prefork</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>MaxClients</directive> directive sets the limit
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive on the number of child processes that will be created to serve
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive requests. When the server is built without threading, no more than
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive this number of clients can be served simultaneously. To configure
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive more than 256 clients with the prefork MPM, you must use the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mpm_common">ServerLimit</directive> directive.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive To configure more than 1024 clients with the worker MPM, you must
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive use the <directive module="mpm_common">ServerLimit</directive> and
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mpm_common">ThreadLimit</directive> directives.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Any connection attempts over the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive>MaxClients</directive> limit will normally be queued,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive up to a number based on the <directive module="mpm_common"
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive >ListenBacklog</directive> directive. Once a child
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive process is freed at the end of a different request, the connection
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive will then be serviced.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>When the server is compiled with threading, then the maximum
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive number of simultaneous requests that can be served is obtained
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive from the value of this directive multiplied by
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mpm_common">ThreadsPerChild</directive>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
10237492cb0500e2c0351db6e52775578a2af624slive<name>MaxRequestsPerChild</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Limit on the number of requests that an individual child server
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivewill handle during its life</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>MaxRequestsPerChild <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>MaxRequestsPerChild 10000</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>MaxRequestsPerChild</directive> directive sets
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the limit on the number of requests that an individual child
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server process will handle. After
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive>MaxRequestsPerChild</directive> requests, the child
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive process will die. If <directive>MaxRequestsPerChild</directive> is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive 0, then the process will never expire.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Setting <directive>MaxRequestsPerChild</directive> to a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive non-zero limit has two beneficial effects:</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <ul>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <li>it limits the amount of memory that process can consume
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive by (accidental) memory leakage;</li>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <li>by giving processes a finite lifetime, it helps reduce
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the number of processes when the server load reduces.</li>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive </ul>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p><strong>NOTE:</strong> For <em>KeepAlive</em> requests, only
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the first request is counted towards this limit. In effect, it
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive changes the behavior to limit the number of
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <em>connections</em> per child.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>MaxSpareThreads</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Maximum number of idle threads</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>MaxSpareThreads <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>MaxSpareThreads 10 (Perchild) or 500 (worker)</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Maximum number of idle threads. Different MPMs deal with this
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive directive differently. <module>perchild</module> monitors the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive number of idle threads on a per-child basis. If there are too many
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive idle threads in that child, the server will begin to kill threads
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive within that child.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p><module>worker</module> deals with idle threads on a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server-wide basis. If there are too many idle threads in the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server then child processes are killed until the number of idle
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive threads is less than this number.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">MinSpareThreads</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">StartServers</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>MaxThreadsPerChild</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Maximum number of threads per child process</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>MaxThreadsPerChild <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>MaxThreadsPerChild 64</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Maximum number of threads per child. For MPMs with a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive variable number of threads per child, this directive sets the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive maximum number of threads that will be created in each child
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive process. To increase this value beyond its default, it is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive necessary to change the value of the compile-time define
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <code>HARD_THREAD_LIMIT</code> and recompile the server.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>MinSpareThreads</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Minimum number of idle threads available to handle request
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivespikes</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>MinSpareServers <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>MinSpareThreads 5 (Perchild) or 250 (worker)</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Minimum number of idle threads to handle request spikes.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Different MPMs deal with this directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive differently. <module>perchild</module> monitors the number of idle
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive threads on a per-child basis. If there aren't enough idle threads
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive in that child, the server will begin to create new threads within
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive that child.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p><module>worker</module> deals with idle threads on a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server-wide basis. If there aren't enough idle threads in the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server then child processes are created until the number of idle
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive threads is greater than number.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">MaxSpareThreads</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">StartServers</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>NumServers</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Total number of children alive at the same time</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>NumServers <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>NumServers 2</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>perchild</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Number of children alive at the same time. MPMs that use
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive this directive do not dynamically create new child processes so
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive this number should be large enough to handle the requests for
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the entire site.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>ScoreBoardFile</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Location of the file used to store coordination data for
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivethe child processes</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>ScoreBoardFile <em>file-path</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>ScoreBoardFile logs/apache_status</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley <p>Apache uses a scoreboard to communicate between its parent
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley and child processes. Some architectures require a file to facilitate
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley this communication. If the file is left unspecified, Apache first
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley attempts to create the scoreboard entirely in memory (using anonymous
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley shared memory) and, failing that, will attempt to create the file on
9f8fab7d183a8d3bac5e5d08e8000974f5d0e40fjwoolley disk (using file-based shared memory). Specifying this directive causes
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron Apache to always create the file on the disk.</p>
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron <p>File-based shared memory is useful for third-party applications
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron that require direct access to the scoreboard.</p>
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron <p>If you use a <directive>ScoreBoardFile</directive> then
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive you may see improved speed by placing it on a RAM disk. But be
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive careful that you heed the same warnings about log file placement
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive and <a href="/misc/security_tips.html">security</a>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive href="/stopping.html">Stopping and Restarting Apache</a></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>SendBufferSize</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>TCP buffer size</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>SendBufferSize <em>bytes</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The server will set the TCP buffer size to the number of bytes
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive specified. Very useful to increase past standard OS defaults on
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive high speed high latency (<em>i.e.</em>, 100ms or so, such as
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive transcontinental fast pipes).</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>ServerLimit</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Upper limit on configurable number of processes</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>ServerLimit <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>ServerLimit 256 (prefork), ServerLimit 16 (worker)</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>prefork</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>For the <module>prefork</module> MPM, this directive sets the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive maximum configured value for <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> for the lifetime of the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Apache process. For the worker MPM, this directive in combination
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive with <directive module="mpm_common">ThreadLimit</directive> sets
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive the maximum configured value for <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> for the lifetime of the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Apache process. Any attempts to change this directive during a
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive restart will be ignored, but <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> can be modified during
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive a restart.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Special care must be taken when using this directive. If
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive>ServerLimit</directive> is set to a value much higher
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive than necessary, extra, unused shared memory will be allocated. If
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive both <directive>ServerLimit</directive> and <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> are set to values
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive higher than the system can handle, Apache may not start or the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive system may become unstable.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>With the <module>prefork</module> MPM, use this directive only
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive if you need to set <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> higher higher than 256.
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive Do not set the value of this directive any higher than what you
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive might want to set <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients</directive> to.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>With the <module>worker</module> MPM, use this directive only
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive if your <directive module="mpm_common">MaxClients</directive> and
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mpm_common">ThreadsPerChild</directive>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive settings require more than 16 server processes. Do not set the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive value of this directive any higher than the number of server
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive processes required by what you may want for <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">MaxClients </directive> and <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>StartServers</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Number of child server processes created at startup</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>StartServers <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>StartServers 5</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>StartServers</directive> directive sets the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive number of child server processes created on startup. As the number
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive of processes is dynamically controlled depending on the load,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive there is usually little reason to adjust this parameter.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">MinSpareThreads</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<seealso><directive module="mpm_common">MaxSpareThreads</directive></seealso>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>StartThreads</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Nubmer of threads each child creates on startup</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>StartThreads <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>StartThreads 5</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>perchild</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Number of threads each child creates on startup. As the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive number of threads is dynamically controlled depending on the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive load, there is usually little reason to adjust this
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive parameter.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>ThreadLimit</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Sets the upper limit on the configurable number of threads
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliveper child process</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>ThreadLimit <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>ThreadLimit 64</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>This directive sets the maximum configured value for <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive> for the lifetime
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive of the Apache process. Any attempts to change this directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive during a restart will be ignored, but <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive> can be modified
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive during a restart up to the value of this directive.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Special care must be taken when using this directive. If
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive>ThreadLimit</directive> is set to a value much higher
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive than <directive module="mpm_common">ThreadsPerChild</directive>,
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive extra unused shared memory will be allocated. If both
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive>ThreadLimit</directive> and <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive> are set to values
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive higher than the system can handle, Apache may not start or the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive system may become unstable.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Use this directive only if you need to set <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive> higher than 64. Do
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive not set the value of this directive any higher than what you might
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive want to set <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mpm_common">ThreadsPerChild</directive> to.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>ThreadsPerChild</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>Number of threads created by each child process</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>ThreadsPerChild <em>number</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>ThreadsPerChild 50</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context></contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>mpm_winnt</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>This directive sets the number of threads created by each
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive child process. The child creates these threads at startup and
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive never creates more. if using an MPM like mpmt_winnt, where
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive there is only one child process, this number should be high
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive enough to handle the entire load of the server. If using an MPM
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive like worker, where there are multiple child processes, the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive total number of threads should be high enough to handle the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive common load on the server.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<name>User</name>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<description>The userid under which the server will answer
fc88db23cb4b205f1efea5f5d5ae916589db5a61sliverequests</description>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<syntax>User <em>unix-userid</em></syntax>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<default>User #-1</default>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<contextlist><context>server config</context><context>virtual host</context>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</contextlist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<modulelist><module>worker</module><module>perchild</module>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<module>prefork</module></modulelist>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The <directive>User</directive> directive sets the userid as
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive which the server will answer requests. In order to use this
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive directive, the standalone server must be run initially as
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive root. <em>Unix-userid</em> is one of:</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dl>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dt>A username</dt>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dd>Refers to the given user by name.</dd>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dt># followed by a user number.</dt>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <dd>Refers to a user by their number.</dd>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive </dl>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>The user should have no privileges which result in it being
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive able to access files which are not intended to be visible to the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive outside world, and similarly, the user should not be able to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive execute code which is not meant for httpd requests. It is
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive recommended that you set up a new user and group specifically for
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive running the server. Some admins use user <code>nobody</code>, but
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive this is not always possible or desirable. For example
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <module>mod_proxy</module>'s cache, when enabled, must be
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive accessible to this user (see <directive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive module="mod_proxy">CacheRoot</directive>).</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Notes: If you start the server as a non-root user, it will
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive fail to change to the lesser privileged user, and will instead
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive continue to run as that original user. If you do start the
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive server as root, then it is normal for the parent process to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive remain running as root.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <p>Special note: Use of this directive in <directive module="core"
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive type="section">VirtualHost</directive> is no longer supported. To
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive configure your server for <a href="mod_suexec.html">suexec</a> use
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive <directive module="mod_suexec">SuexecUserGroup</directive>.</p>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<note><title>Security</title> <p>Don't set <directive>User</directive>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive(or <directive module="mpm_common">Group</directive>) to
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive<code>root</code> unless you know exactly what you are doing, and what
fc88db23cb4b205f1efea5f5d5ae916589db5a61slivethe dangers are.</p></note>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</usage>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive</directivesynopsis>
fc88db23cb4b205f1efea5f5d5ae916589db5a61slive
4a6e2ffe454f97273eff8da1fd5abce89053dd8eaaron</modulesynopsis>