mpm_common.xml revision bb0681e8b45960956d16c7e3ab629586032f7f32
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<?xml version="1.0"?>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<!-- $LastChangedRevision$ -->
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<!--
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Licensed to the Apache Software Foundation (ASF) under one or more
23179f1443b03947d85eccc81cbc6b5153a4abf3vboxsync contributor license agreements. See the NOTICE file distributed with
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync this work for additional information regarding copyright ownership.
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync The ASF licenses this file to You under the Apache License, Version 2.0
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync (the "License"); you may not use this file except in compliance with
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync the License. You may obtain a copy of the License at
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync http://www.apache.org/licenses/LICENSE-2.0
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync
bd8e360cd1db83dcb2694ea9122ce3bc5bae678avboxsync Unless required by applicable law or agreed to in writing, software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync distributed under the License is distributed on an "AS IS" BASIS,
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync See the License for the specific language governing permissions and
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync limitations under the License.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync-->
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulesynopsis metafile="mpm_common.xml.meta">
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>mpm_common</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>A collection of directives that are implemented by
23179f1443b03947d85eccc81cbc6b5153a4abf3vboxsyncmore than one multi-processing module (MPM)</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<status>MPM</status>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>AcceptMutex</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Method that Apache uses to serialize multiple children
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncaccepting requests on network sockets</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>AcceptMutex Default|<var>method</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>AcceptMutex Default</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>leader</module><module>perchild</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<usage>
5eabf773597082761832bc0a32b3660e8771f9f1vboxsync <p>The <directive>AcceptMutex</directive> directives sets the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync method (and lockfile location if appropriate) that Apache uses to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync serialize multiple children accepting
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync requests on network sockets. Prior to Apache 2.0, the method was
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync selectable only at compile time. The optimal method to use is
e165c61901edef5d42ef72ba30880eb3074e435dvboxsync highly architecture and platform dependent. For further details,
a649440589a732fe4aad2af224cc72318108d855vboxsync see the <a href="/misc/perf-tuning.html">performance tuning</a>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync documentation.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>If this directive is set to <code>Default</code>, then the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync compile-time selected default will be used. Other possible
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync methods are listed below. Note that not all methods are
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync available on all platforms. If a method is specified which is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync not available, a message will be written to the error log
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync listing the available methods.</p>
b1af3faab73d10122abc6a77cc3811657b6300f1vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dl>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>flock&lt;<var>:/path/to/lockfile</var>&gt;</code></dt>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <dd>uses the <code>flock(2)</code> system call to lock the
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync file defined by the optional <var>/path/to/lockfile</var>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync parameter. One can also use the <directive module="mpm_common"
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync >LockFile</directive> directive to specify the lockfile,
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync although this is deprecated.</dd>
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync <dt><code>fcntl&lt;<var>:/path/to/lockfile</var>&gt;</code></dt>
4c1959cb05f17e7a71ace7cb1796292247f732e8vboxsync <dd>uses the <code>fcntl(2)</code> system call to lock the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync file defined by the optional <var>/path/to/lockfile</var>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync parameter. One can also use the <directive module="mpm_common"
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >LockFile</directive> directive to specify the lockfile,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync although this is deprecated.</dd>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>file&lt;<var>:/path/to/lockfile</var>&gt;</code></dt>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync <dd>This directive tells Apache to pick the "best" file locking
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync implementation available to it, choosing between <code>fcntl</code> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>flock</code>, in that order. It is only available when the underlying
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync platform and <glossary>APR</glossary> supports at least one of the 2.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>posixsem</code></dt>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dd>uses POSIX compatible semaphores to implement the mutex.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>sysvsem</code></dt>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dd>uses SySV-style semaphores to implement the mutex.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>sem</code></dt>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dd>This directive tells Apache to pick the "best" semaphore
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync implementation available to it, choosing between Posix and SystemV IPC,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync in that order. It is only available when the underlying platform and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <glossary>APR</glossary> supports at least one of the 2.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>pthread</code></dt>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dd>uses POSIX mutexes as implemented by the POSIX Threads
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync (PThreads) specification.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </dl>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>If you want to find out the compile time chosen default
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync for your system, you may set your <directive module="core"
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >LogLevel</directive> to <code>debug</code>. Then the default <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >AcceptMutex</directive> will be written into the <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="core">ErrorLog</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note type="warning"><title>Warning</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>On most systems, when the <code>pthread</code> option
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync is selected, if a child process terminates abnormally
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync while holding the <code>AcceptCntl</code> mutex the
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync server will stop responding to requests. When this
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync occurs, the server will require a manual restart to
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync recover.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>Solaris is a notable exception as it provides a
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync mechanism, used by Apache, which usually allows the
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync mutex to be recovered after a child process terminates
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync abnormally while holding a mutex.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>If your system implements the
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <code>pthread_mutexattr_setrobust_np()</code> function,
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync you may be able to use the <code>pthread</code> option safely.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync </note>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<name>CoreDumpDirectory</name>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<description>Directory where Apache attempts to
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsyncswitch before dumping core</description>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<syntax>CoreDumpDirectory <var>directory</var></syntax>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<default>See usage for the default setting</default>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<contextlist><context>server config</context></contextlist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<modulelist><module>beos</module><module>leader</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>mpm_winnt</module><module>perchild</module><module>prefork</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>threadpool</module><module>worker</module></modulelist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>This controls the directory to which Apache attempts to
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync switch before dumping core. The default is in the
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <directive module="core">ServerRoot</directive> directory, however
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync since this should not be writable by the user the server runs
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync as, core dumps won't normally get written. If you want a core
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync dump for debugging, you can use this directive to place it in a
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync different location.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <note><title>Core Dumps on Linux</title>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>If Apache starts as root and switches to another user, the
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync Linux kernel <em>disables</em> core dumps even if the directory is
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync writable for the process. Apache (2.0.46 and later) reenables core dumps
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync on Linux 2.4 and beyond, but only if you explicitly configure a <directive
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync >CoreDumpDirectory</directive>.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync </note>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<name>EnableExceptionHook</name>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<description>Enables a hook that runs exception handlers
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsyncafter a crash</description>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<syntax>EnableExceptionHook On|Off</syntax>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<default>EnableExceptionHook Off</default>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<contextlist><context>server config</context></contextlist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<modulelist><module>leader</module><module>perchild</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>prefork</module><module>threadpool</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>worker</module></modulelist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<compatibility>Available in version 2.0.49 and later</compatibility>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>For safety reasons this directive is only available if the server was
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync configured with the <code>--enable-exception-hook</code> option. It
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync enables a hook that allows external modules to plug in and do something
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync after a child crashed.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>There are already two modules, <code>mod_whatkilledus</code> and
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <code>mod_backtrace</code> that make use of this hook. Please have a
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync look at Jeff Trawick's <a
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync href="http://www.apache.org/~trawick/exception_hook.html"
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync >EnableExceptionHook site</a> for more information about these.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<name>GracefulShutdownTimeout</name>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<description>Specify a timeout after which a gracefully shutdown server
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsyncwill exit.</description>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<syntax>GracefulShutDownTimeout <var>seconds</var></syntax>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<default>GracefulShutDownTimeout 0</default>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<contextlist><context>server config</context></contextlist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<modulelist><module>prefork</module><module>worker</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>event</module></modulelist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<compatibility>Available in version 2.2 and later</compatibility>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>The <directive>GracefulShutdownTimeout</directive> specifies
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync how many seconds after receiving a "graceful-stop" signal, a
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync server should continue to run, handling the existing connections.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync <p>Setting this value to zero means that the server will wait
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync indefinitely until all remaining requests have been fully served.</p>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<name>Group</name>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<description>Group under which the server will answer
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsyncrequests</description>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<syntax>Group <var>unix-group</var></syntax>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<default>Group #-1</default>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<contextlist><context>server config</context></contextlist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<modulelist><module>beos</module><module>leader</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>mpmt_os2</module><module>perchild</module><module>prefork</module>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<module>threadpool</module><module>worker</module></modulelist>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<compatibility>Only valid in global server config since Apache
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync2.0</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
0ce6ae9d6efed5d54222a13bbdabce9e688e4447vboxsync <p>The <directive>Group</directive> directive sets the group under
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync which the server will answer requests. In order to use this
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync directive, the server must be run initially as <code>root</code>. If
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync you start the server as a non-root user, it will fail to change to the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync specified group, and will instead continue to run as the group of the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync original user. <var>Unix-group</var> is one of:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dl>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt>A group name</dt>
432d08d68b9683d01880890d475a4cadd84b69cevboxsync <dd>Refers to the given group by name.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dt><code>#</code> followed by a group number.</dt>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <dd>Refers to a group by its number.</dd>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </dl>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example><title>Example</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Group www-group
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>It is recommended that you set up a new group specifically for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync running the server. Some admins use user <code>nobody</code>,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync but this is not always possible or desirable.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note type="warning"><title>Security</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Don't set <directive>Group</directive> (or <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">User</directive>) to <code>root</code> unless
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync you know exactly what you are doing, and what the dangers are.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
d056279b935642d0fc1ddf89c17cab3bc6c30b83vboxsync <p>Special note: Use of this directive in <directive module="core"
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync type="section">VirtualHost</directive> is no longer supported. To
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configure your server for <program>suexec</program> use
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="mod_suexec">SuexecUserGroup</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note><title>Note</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Although the <directive>Group</directive> directive is present
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync in the <module>beos</module> and <module>mpmt_os2</module> MPMs,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync it is actually a no-op there and only exists for compatibility
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync reasons.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>PidFile</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>File where the server records the process ID
d63fbe5743c4b88211f30af1bcb78df1e58d0ac6vboxsyncof the daemon</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>PidFile <var>filename</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>PidFile logs/httpd.pid</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>beos</module><module>leader</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpm_winnt</module><module>mpmt_os2</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>perchild</module><module>prefork</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>threadpool</module><module>worker</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>PidFile</directive> directive sets the file to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync which the server records the process id of the daemon. If the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync filename is not absolute then it is assumed to be relative to the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="core">ServerRoot</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example><title>Example</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync PidFile /var/run/apache.pid
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>It is often useful to be able to send the server a signal,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync so that it closes and then re-opens its <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="core">ErrorLog</directive> and <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mod_log_config">TransferLog</directive>, and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync re-reads its configuration files. This is done by sending a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync SIGHUP (kill -1) signal to the process id listed in the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive>PidFile</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>PidFile</directive> is subject to the same
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync warnings about log file placement and <a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync href="/misc/security_tips.html#serverroot">security</a>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note><title>Note</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>As of Apache 2 it is recommended to use only the <program>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync apachectl</program> script for (re-)starting or stopping the server.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>Listen</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>IP addresses and ports that the server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsynclistens to</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>Listen [<var>IP-address</var>:]<var>portnumber</var> [<var>protocol</var>]</syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>beos</module><module>leader</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpm_netware</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpmt_os2</module><module>perchild</module>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync<module>event</module>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync</modulelist>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync<compatibility>Required directive since Apache 2.0<br/>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsyncThe <var>protocol</var> argument was added in 2.1.5</compatibility>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync<usage>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync <p>The <directive>Listen</directive> directive instructs Apache to
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync listen to only specific IP addresses or ports; by default it
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync responds to requests on all IP interfaces. <directive>Listen</directive>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync is now a required directive. If it is not in the config file, the
432d08d68b9683d01880890d475a4cadd84b69cevboxsync server will fail to start. This is a change from previous versions
432d08d68b9683d01880890d475a4cadd84b69cevboxsync of Apache.</p>
432d08d68b9683d01880890d475a4cadd84b69cevboxsync
432d08d68b9683d01880890d475a4cadd84b69cevboxsync <p>The <directive>Listen</directive> directive tells the server to
432d08d68b9683d01880890d475a4cadd84b69cevboxsync accept incoming requests on the specified port or address-and-port
432d08d68b9683d01880890d475a4cadd84b69cevboxsync combination. If only a port number is specified, the server listens to
432d08d68b9683d01880890d475a4cadd84b69cevboxsync the given port on all interfaces. If an IP address is given as well
432d08d68b9683d01880890d475a4cadd84b69cevboxsync as a port, the server will listen on the given port and
432d08d68b9683d01880890d475a4cadd84b69cevboxsync interface.</p>
432d08d68b9683d01880890d475a4cadd84b69cevboxsync
432d08d68b9683d01880890d475a4cadd84b69cevboxsync <p>Multiple <directive>Listen</directive> directives may be used to
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync specify a number of addresses and ports to listen to. The server will
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync respond to requests from any of the listed addresses and ports.</p>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync <p>For example, to make the server accept connections on both
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync port 80 and port 8000, use:</p>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example>
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync Listen 80<br />
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync Listen 8000
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync </example>
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync <p>To make the server accept connections on two specified
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync interfaces and port numbers, use </p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 192.170.2.1:80<br />
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync Listen 192.170.2.5:8000
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync </example>
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync <p>IPv6 addresses must be surrounded in square brackets, as in the
fc148a6b23d25a87561beaffe0ba06c3ba93bf5avboxsync following example:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen [2001:db8::a00:20ff:fea7:ccea]:80
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The optional <var>protocol</var> argument is not required for most
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configurations. If not specified, <code>https</code> is the default for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync port 443 and <code>http</code> the default for all other ports. The
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync protocol is used to determine which module should handle a request, and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync to apply protocol specific optimizations with the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="core">AcceptFilter</directive> directive.</p>
f72cbd6a549c34992fa79cce84600fe2b92b3299vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>You only need to set the protocol if you are running on non-standard
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync ports. For example, running an <code>https</code> site on port 8443:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Listen 192.170.2.1:8443 https
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </example>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note><title>Error condition</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Multiple <directive>Listen</directive> directives for the same ip
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync address and port will result in an <code>Address already in use</code>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync error message.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<seealso><a href="/dns-caveats.html">DNS Issues</a></seealso>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<seealso><a href="/bind.html">Setting which addresses and ports Apache
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync uses</a></seealso>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>ListenBackLog</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Maximum length of the queue of pending connections</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>ListenBacklog <var>backlog</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>ListenBacklog 511</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>beos</module><module>leader</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpm_netware</module><module>mpm_winnt</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpmt_os2</module><module>perchild</module><module>prefork</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>threadpool</module><module>worker</module></modulelist>
432d08d68b9683d01880890d475a4cadd84b69cevboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The maximum length of the queue of pending connections.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Generally no tuning is needed or desired, however on some
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync systems it is desirable to increase this when under a TCP SYN
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync flood attack. See the backlog parameter to the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>listen(2)</code> system call.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>This will often be limited to a smaller number by the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync operating system. This varies from OS to OS. Also note that
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync many OSes do not use exactly what is specified as the backlog,
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync but use a number based on (but normally larger than) what is
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync set.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</usage>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<name>LockFile</name>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<description>Location of the accept serialization lock file <em>(deprecated)</em></description>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<syntax>LockFile <var>filename</var></syntax>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<default>LockFile logs/accept.lock</default>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<contextlist><context>server config</context></contextlist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<modulelist><module>leader</module><module>perchild</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</modulelist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<usage>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>The <directive>LockFile</directive> directive sets the path to
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync the lockfile used when Apache is used with an <directive
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync module="mpm_common">AcceptMutex</directive> value of either
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <code>fcntl</code> or <code>flock</code>. This directive should
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync normally be left at its default value. The main reason for changing
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync it is if the <code>logs</code> directory is NFS mounted, since
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <strong>the lockfile must be stored on a local disk</strong>. The PID
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync of the main server process is automatically appended to the
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync filename.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <note type="warning"><title>Security</title>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>It is best to <em>avoid</em> putting this file in a world writable
58e8f2bc3ec5551ada61c45bda246a97e9a945c0vboxsync directory such as <code>/var/tmp</code> because someone could create
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync a denial of service attack and prevent the server from starting by
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync creating a lockfile with the same name as the one the server will try
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync to create.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync </note>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <note type="warning"><title>Deprecated</title>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>This directive is deprecated. It is strongly suggested that
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync you use <directive module="mpm_common">AcceptMutex</directive> to
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync specify both the mutex locking implementation as well as
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync the lockfile location.</p>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync </note>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</usage>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<seealso><directive module="mpm_common">AcceptMutex</directive></seealso>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<directivesynopsis>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<name>MaxClients</name>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<description>Maximum number of connections that will be processed
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsyncsimultaneously</description>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<syntax>MaxClients <var>number</var></syntax>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<default>See usage for details</default>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<contextlist><context>server config</context></contextlist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<modulelist><module>beos</module><module>leader</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync</modulelist>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync<usage>
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync <p>The <directive>MaxClients</directive> directive sets the limit
ef811bab708f967b28bcdb7897e82b5e101eb226vboxsync on the number of simultaneous requests that will be served. Any
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync connection attempts over the <directive>MaxClients</directive>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync limit will normally be queued, up to a number based on the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive module="mpm_common">ListenBacklog</directive>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync directive. Once a child process is freed at the end of a different
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync request, the connection will then be serviced.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For non-threaded servers (<em>i.e.</em>, <module>prefork</module>),
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <directive>MaxClients</directive> translates into the maximum
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync number of child processes that will be launched to serve requests.
432d08d68b9683d01880890d475a4cadd84b69cevboxsync The default value is <code>256</code>; to increase it, you must also raise
432d08d68b9683d01880890d475a4cadd84b69cevboxsync <directive module="mpm_common">ServerLimit</directive>.</p>
432d08d68b9683d01880890d475a4cadd84b69cevboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>For threaded and hybrid servers (<em>e.g.</em> <module>beos</module>
353a4d1d78e3be140fa5ac56fbde62a413cb34c5vboxsync or <module>worker</module>) <directive>MaxClients</directive> restricts
353a4d1d78e3be140fa5ac56fbde62a413cb34c5vboxsync the total number of threads that will be available to serve clients.
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync The default value for <module>beos</module> is <code>50</code>. For
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync hybrid MPMs the default value is <code>16</code> (<directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">ServerLimit</directive>) multiplied by the value of
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>25</code> (<directive module="mpm_common"
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync >ThreadsPerChild</directive>). Therefore, to increase <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync >MaxClients</directive> to a value that requires more than 16 processes,
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync you must also raise <directive module="mpm_common"
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >ServerLimit</directive>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>MaxMemFree</name>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>Maximum amount of memory that the main allocator is allowed
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsyncto hold without calling <code>free()</code></description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<syntax>MaxMemFree <var>KBytes</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>MaxMemFree 0</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>beos</module><module>leader</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_netware</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>threadpool</module><module>worker</module><module>mpm_winnt</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The <directive>MaxMemFree</directive> directive sets the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync maximum number of free Kbytes that the main allocator is allowed
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync to hold without calling <code>free()</code>. When not set, or when set
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync to zero, the threshold will be set to unlimited.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>MaxRequestsPerChild</name>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>Limit on the number of requests that an individual child server
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsyncwill handle during its life</description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<syntax>MaxRequestsPerChild <var>number</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>MaxRequestsPerChild 10000</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>leader</module><module>mpm_netware</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_winnt</module><module>mpmt_os2</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>perchild</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>threadpool</module><module>worker</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The <directive>MaxRequestsPerChild</directive> directive sets
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync the limit on the number of requests that an individual child
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync server process will handle. After
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive>MaxRequestsPerChild</directive> requests, the child
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync process will die. If <directive>MaxRequestsPerChild</directive> is
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>0</code>, then the process will never expire.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <note><title>Different default values</title>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The default value for <module>mpm_netware</module> and
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>mpm_winnt</module> is <code>0</code>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync </note>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Setting <directive>MaxRequestsPerChild</directive> to a
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync non-zero value limits the amount of memory that process can consume
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync by (accidental) memory leakage.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note><title>Note</title>
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync <p>For <directive module="core">KeepAlive</directive> requests, only
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the first request is counted towards this limit. In effect, it
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync changes the behavior to limit the number of <em>connections</em> per
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync child.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>MaxSpareThreads</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Maximum number of idle threads</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>MaxSpareThreads <var>number</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>See usage for details</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>beos</module><module>leader</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_netware</module><module>mpmt_os2</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>perchild</module><module>threadpool</module><module>worker</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync <p>Maximum number of idle threads. Different MPMs deal with this
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync directive differently.</p>
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync
b9f5a22c6e86f7e09242c7483d8a67bd72f13a79vboxsync <p>For <module>perchild</module> the default is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>MaxSpareThreads 10</code>. This MPM monitors the number of
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync idle threads on a per-child basis. If there are too many idle
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync threads in that child, the server will begin to kill threads
4298177987f623deb1268c06d3681510bc49a594vboxsync within that child.</p>
03aef08d59dd179fd178a35f445e731788896cabvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For <module>worker</module>, <module>leader</module> and <module
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync >threadpool</module> the default is <code>MaxSpareThreads 250</code>.
57b49c1557a310ee615bc0ee79dd2a2e92319a1bvboxsync These MPMs deal with idle threads on a server-wide basis. If there
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync are too many idle threads in the server then child processes are
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync killed until the number of idle threads is less than this number.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>For <module>mpm_netware</module> the default is
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>MaxSpareThreads 100</code>. Since this MPM runs a
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync single-process, the spare thread count is also server-wide.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p><module>beos</module> and <module>mpmt_os2</module> work
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync similar to <module>mpm_netware</module>. The default for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>beos</module> is <code>MaxSpareThreads 50</code>. For
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>mpmt_os2</module> the default value is <code>10</code>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <note><title>Restrictions</title>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>The range of the <directive>MaxSpareThreads</directive> value
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync is restricted. Apache will correct the given value automatically
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync according to the following rules:</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <ul>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <li><module>perchild</module> requires <directive
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync >MaxSpareThreads</directive> to be less or equal than <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">ThreadLimit</directive>.</li>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync <li><module>mpm_netware</module> wants the value to be greater than
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <directive module="mpm_common">MinSpareThreads</directive>.</li>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <li>For <module>leader</module>, <module>threadpool</module> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>worker</module> the value must be greater or equal than
ee500238ee905283df7fc73c4ab22fce70e1da62vboxsync the sum of <directive module="mpm_common">MinSpareThreads</directive>
ee500238ee905283df7fc73c4ab22fce70e1da62vboxsync and <directive module="mpm_common">ThreadsPerChild</directive>.</li>
27ff3359094d10df126ef7c1009920d3a94d5bb7vboxsync </ul>
27ff3359094d10df126ef7c1009920d3a94d5bb7vboxsync </note>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync</usage>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync<seealso><directive module="mpm_common">MinSpareThreads</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><directive module="mpm_common">StartServers</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>MinSpareThreads</name>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>Minimum number of idle threads available to handle request
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsyncspikes</description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<syntax>MinSpareThreads <var>number</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>See usage for details</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>beos</module><module>leader</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_netware</module><module>mpmt_os2</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>perchild</module><module>threadpool</module><module>worker</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Minimum number of idle threads to handle request spikes.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Different MPMs deal with this directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync differently.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p><module>perchild</module> uses a default of
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <code>MinSpareThreads 5</code> and monitors the number of idle
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync threads on a per-child basis. If there aren't enough idle threads
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync in that child, the server will begin to create new threads within
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync that child. Thus, if you set <directive module="perchild"
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync >NumServers</directive> to <code>10</code> and a <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync >MinSpareThreads</directive> value of <code>5</code>, you'll have
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync at least 50 idle threads on your system.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p><module>worker</module>, <module>leader</module> and
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>threadpool</module> use a default of <code>MinSpareThreads
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync 75</code> and deal with idle threads on a server-wide basis. If
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync there aren't enough idle threads in the server then child
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync processes are created until the number of idle threads is greater
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync than <var>number</var>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p><module>mpm_netware</module> uses a default of
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>MinSpareThreads 10</code> and, since it is a single-process
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync MPM, tracks this on a server-wide bases.</p>
57b49c1557a310ee615bc0ee79dd2a2e92319a1bvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p><module>beos</module> and <module>mpmt_os2</module> work
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync similar to <module>mpm_netware</module>. The default for
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>beos</module> is <code>MinSpareThreads 1</code>. For
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <module>mpmt_os2</module> the default value is <code>5</code>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><directive module="mpm_common">MaxSpareThreads</directive></seealso>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync<seealso><directive module="mpm_common">StartServers</directive></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>ScoreBoardFile</name>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync<description>Location of the file used to store coordination data for
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsyncthe child processes</description>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync<syntax>ScoreBoardFile <var>file-path</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>ScoreBoardFile logs/apache_status</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>beos</module><module>leader</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_winnt</module><module>perchild</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>threadpool</module><module>worker</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Apache uses a scoreboard to communicate between its parent
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync and child processes. Some architectures require a file to facilitate
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync this communication. If the file is left unspecified, Apache first
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync attempts to create the scoreboard entirely in memory (using anonymous
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync shared memory) and, failing that, will attempt to create the file on
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync disk (using file-based shared memory). Specifying this directive causes
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync Apache to always create the file on the disk.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <example><title>Example</title>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync ScoreBoardFile /var/run/apache_status
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync </example>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>File-based shared memory is useful for third-party applications
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync that require direct access to the scoreboard.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>If you use a <directive>ScoreBoardFile</directive> then
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync you may see improved speed by placing it on a RAM disk. But be
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync careful that you heed the same warnings about log file placement
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync and <a href="/misc/security_tips.html">security</a>.</p>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<seealso><a href="/stopping.html">Stopping and Restarting
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsyncApache</a></seealso>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>ReceiveBufferSize</name>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<description>TCP receive buffer size</description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<syntax>ReceiveBufferSize <var>bytes</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>ReceiveBufferSize 0</default>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>beos</module><module>leader</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpm_netware</module><module>mpm_winnt</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>mpmt_os2</module><module>perchild</module><module>prefork</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<module>threadpool</module><module>worker</module></modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
83dc9ca94cd3c31dabc33a35b945de124d43aaeavboxsync<usage>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync <p>The server will set the TCP receive buffer size to the number of
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync bytes specified.</p>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync
b3df226cc4728cfa969fd4fa30a86ee2fde4d4b1vboxsync <p>If set to the value of <code>0</code>, the server will use the
b3df226cc4728cfa969fd4fa30a86ee2fde4d4b1vboxsync OS default.</p>
b3df226cc4728cfa969fd4fa30a86ee2fde4d4b1vboxsync</usage>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync</directivesynopsis>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<directivesynopsis>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<name>SendBufferSize</name>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<description>TCP buffer size</description>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<syntax>SendBufferSize <var>bytes</var></syntax>
b3df226cc4728cfa969fd4fa30a86ee2fde4d4b1vboxsync<default>SendBufferSize 0</default>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<contextlist><context>server config</context></contextlist>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<modulelist><module>beos</module><module>leader</module>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<module>mpm_netware</module><module>mpm_winnt</module>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<module>mpmt_os2</module><module>perchild</module><module>prefork</module>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync<module>threadpool</module><module>worker</module></modulelist>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync
b3df226cc4728cfa969fd4fa30a86ee2fde4d4b1vboxsync<usage>
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync <p>The server will set the TCP send buffer size to the number of bytes
0f299115229ed1bfd92c030c82b8f9930f109f2dvboxsync specified. Very useful to increase past standard OS defaults on
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync high speed high latency (<em>i.e.</em>, 100ms or so, such as
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync transcontinental fast pipes).</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>If set to the value of <code>0</code>, the server will use the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync OS default.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<name>ServerLimit</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Upper limit on configurable number of processes</description>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<syntax>ServerLimit <var>number</var></syntax>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<default>See usage for details</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync<modulelist><module>leader</module><module>perchild</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync</modulelist>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>For the <module>prefork</module> MPM, this directive sets the
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync maximum configured value for <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">MaxClients</directive> for the lifetime of the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Apache process. For the <module>worker</module> MPM, this directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync in combination with <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">ThreadLimit</directive> sets
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the maximum configured value for <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">MaxClients</directive> for the lifetime of the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Apache process. Any attempts to change this directive during a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync restart will be ignored, but <directive
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync module="mpm_common">MaxClients</directive> can be modified during
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync a restart.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
27018c8fbf977d7c4f67758c674736ff1c78804fvboxsync <p>Special care must be taken when using this directive. If
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive>ServerLimit</directive> is set to a value much higher
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync than necessary, extra, unused shared memory will be allocated. If
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync both <directive>ServerLimit</directive> and <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">MaxClients</directive> are set to values
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync higher than the system can handle, Apache may not start or the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync system may become unstable.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>With the <module>prefork</module> MPM, use this directive only
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync if you need to set <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">MaxClients</directive> higher than 256 (default).
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync Do not set the value of this directive any higher than what you
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync might want to set <directive
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync module="mpm_common">MaxClients</directive> to.</p>
e165c61901edef5d42ef72ba30880eb3074e435dvboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>With <module>worker</module>, <module>leader</module> and
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <module>threadpool</module> use this directive only
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync if your <directive module="mpm_common">MaxClients</directive> and
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync <directive module="mpm_common">ThreadsPerChild</directive>
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync settings require more than 16 server processes (default). Do not set
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync the value of this directive any higher than the number of server
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync processes required by what you may want for <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">MaxClients </directive> and <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">ThreadsPerChild</directive>.</p>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <p>With the <module>perchild</module> MPM, use this directive only
e165c61901edef5d42ef72ba30880eb3074e435dvboxsync if you need to set <directive
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync module="perchild">NumServers</directive> higher than 8 (default).</p>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <note><title>Note</title>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync <p>There is a hard limit of <code>ServerLimit 20000</code> compiled
e165c61901edef5d42ef72ba30880eb3074e435dvboxsync into the server (for the <module>prefork</module> MPM 200000). This is
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync intended to avoid nasty effects caused by typos.</p>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync </note>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<seealso><a href="/stopping.html">Stopping and Restarting Apache</a></seealso>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<name>StartServers</name>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<description>Number of child server processes created at startup</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>StartServers <var>number</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>See usage for details</default>
07bf154df97af02974bb89d4f1ad36afa2b45443vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>leader</module><module>mpmt_os2</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>StartServers</directive> directive sets the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync number of child server processes created on startup. As the number
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync of processes is dynamically controlled depending on the load,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync there is usually little reason to adjust this parameter.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The default value differs from MPM to MPM. For
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>leader</module>, <module>threadpool</module> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>worker</module> the default is <code>StartServers 3</code>.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync For <module>prefork</module> defaults to <code>5</code> and for
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <module>mpmt_os2</module> to <code>2</code>.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>StartThreads</name>
57b49c1557a310ee615bc0ee79dd2a2e92319a1bvboxsync<description>Number of threads created on startup</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>StartThreads <var>number</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>See usage for details</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync<modulelist><module>beos</module><module>mpm_netware</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>perchild</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>Number of threads created on startup. As the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync number of threads is dynamically controlled depending on the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync load, there is usually little reason to adjust this
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync parameter.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For <module>perchild</module> the default is <code>StartThreads
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync 5</code> and this directive tracks the number of threads per
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync process at startup.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For <module>mpm_netware</module> the default is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>StartThreads 50</code> and, since there is only a single
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync process, this is the total number of threads created at startup to
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync serve requests.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>For <module>beos</module> the default is <code>StartThreads
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync 10</code>. It also reflects the total number of threads created
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync at startup to serve requests.</p>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
cd0318d4ff9c5a7539bea1672f9bcbbf57e59095vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<name>ThreadLimit</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Sets the upper limit on the configurable number of threads
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncper child process</description>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<syntax>ThreadLimit <var>number</var></syntax>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<default>See usage for details</default>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<contextlist><context>server config</context></contextlist>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<modulelist><module>leader</module><module>mpm_winnt</module>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<module>perchild</module><module>threadpool</module><module>worker</module>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync</modulelist>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<compatibility>Available for <module>mpm_winnt</module> in Apache 2.0.41
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsyncand later</compatibility>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync<usage>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync <p>This directive sets the maximum configured value for <directive
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync module="mpm_common">ThreadsPerChild</directive> for the lifetime
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync of the Apache process. Any attempts to change this directive
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync during a restart will be ignored, but <directive
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync module="mpm_common">ThreadsPerChild</directive> can be modified
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync during a restart up to the value of this directive.</p>
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync <p>Special care must be taken when using this directive. If
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync <directive>ThreadLimit</directive> is set to a value much higher
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync than <directive module="mpm_common">ThreadsPerChild</directive>,
a649440589a732fe4aad2af224cc72318108d855vboxsync extra unused shared memory will be allocated. If both
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <directive>ThreadLimit</directive> and <directive
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync module="mpm_common">ThreadsPerChild</directive> are set to values
1e6cefcc5dd1fb1b4a2f61f587c1f145f46ac8dfvboxsync higher than the system can handle, Apache may not start or the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync system may become unstable. Do not set the value of this directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync any higher than your greatest predicted setting of <directive
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module="mpm_common">ThreadsPerChild</directive> for the
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync current run of Apache.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The default value for <directive>ThreadLimit</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>1920</code> when used with <module>mpm_winnt</module> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>64</code> when used with the others.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <note><title>Note</title>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>There is a hard limit of <code>ThreadLimit 20000</code> (or
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>ThreadLimit 15000</code> with <module>mpm_winnt</module>)
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync compiled into the server. This is intended to avoid nasty effects
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync caused by typos.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync </note>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>ThreadsPerChild</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Number of threads created by each child process</description>
a2c74b7d8053c5be7fcf82c3071528f6c8736e69vboxsync<syntax>ThreadsPerChild <var>number</var></syntax>
a2c74b7d8053c5be7fcf82c3071528f6c8736e69vboxsync<default>See usage for details</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>leader</module><module>mpm_winnt</module>
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync<module>threadpool</module><module>worker</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
a2c74b7d8053c5be7fcf82c3071528f6c8736e69vboxsync<usage>
a2c74b7d8053c5be7fcf82c3071528f6c8736e69vboxsync <p>This directive sets the number of threads created by each
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync child process. The child creates these threads at startup and
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync never creates more. If using an MPM like <module>mpm_winnt</module>,
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync where there is only one child process, this number should be high
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync enough to handle the entire load of the server. If using an MPM
a15773ea776d41750d6216c5aaf888786fd4f713vboxsync like <module>worker</module>, where there are multiple child processes,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the <em>total</em> number of threads should be high enough to handle
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the common load on the server.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The default value for <directive>ThreadsPerChild</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>64</code> when used with <module>mpm_winnt</module> and
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <code>25</code> when used with the others.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>ThreadStackSize</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>The size in bytes of the stack used by threads handling
bff1915a855c5b71d76f6391549eadda348e33b0vboxsyncclient connections</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>ThreadStackSize <var>size</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>65536 on NetWare; varies on other operating systems</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>leader</module><module>mpm_netware</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>mpm_winnt</module><module>perchild</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>threadpool</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Available in Apache 2.1 and later</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>ThreadStackSize</directive> directive sets the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync size of the stack (for autodata) of threads which handle client
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync connections and call modules to help process those connections.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync In most cases the operating system default for stack size is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync reasonable, but there are some conditions where it may need to be
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync adjusted:</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <ul>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <li>On platforms with a relatively small default thread stack size
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync (e.g., HP-UX), Apache may crash when using some third-party modules
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync which use a relatively large amount of autodata storage. Those
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync same modules may have worked fine on other platforms where the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync default thread stack size is larger. This type of crash is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync resolved by setting <directive>ThreadStackSize</directive> to a
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync value higher than the operating system default. This type of
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync adjustment is necessary only if the provider of the third-party
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync module specifies that it is required, or if diagnosis of an Apache
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync crash indicates that the thread stack size was too small.</li>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <li>On platforms where the default thread stack size is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync significantly larger than necessary for the web server
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync configuration, a higher number of threads per child process
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync will be achievable if <directive>ThreadStackSize</directive> is
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync set to a value lower than the operating system default. This type
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync of adjustment should only be made in a test environment which allows
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync the full set of web server processing can be exercised, as there
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync may be infrequent requests which require more stack to process.
9a5209d6dd9af6e9b0416e12d192e92a7a6cdb48vboxsync A change in the web server configuration can invalidate the
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync current <directive>ThreadStackSize</directive> setting.</li>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync </ul>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</usage>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync</directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<directivesynopsis>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<name>User</name>
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsync<description>The userid under which the server will answer
9c422943cda5afa926d367aeb7d40cfdffa216f9vboxsyncrequests</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>User <var>unix-userid</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>User #-1</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>leader</module><module>perchild</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>threadpool</module><module>worker</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<compatibility>Only valid in global server config since Apache
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync2.0</compatibility>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <p>The <directive>User</directive> directive sets the user ID as
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync which the server will answer requests. In order to use this
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync directive, the server must be run initially as <code>root</code>.
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync If you start the server as a non-root user, it will fail to change
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync to the lesser privileged user, and will instead continue to run as
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync that original user. If you do start the server as <code>root</code>,
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync then it is normal for the parent process to remain running as root.
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync <var>Unix-userid</var> is one of:</p>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <dl>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <dt>A username</dt>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <dd>Refers to the given user by name.</dd>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <dt># followed by a user number.</dt>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <dd>Refers to a user by its number.</dd>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync </dl>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <p>The user should have no privileges that result in it being
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync able to access files that are not intended to be visible to the
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync outside world, and similarly, the user should not be able to
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync execute code that is not meant for HTTP requests. It is
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync recommended that you set up a new user and group specifically for
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync running the server. Some admins use user <code>nobody</code>, but
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync this is not always desirable, since the <code>nobody</code> user
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync can have other uses on the system.</p>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <note type="warning"><title>Security</title>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <p>Don't set <directive>User</directive> (or <directive
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync module="mpm_common">Group</directive>) to <code>root</code> unless
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync you know exactly what you are doing, and what the dangers are.</p>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync </note>
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync <p>With the <module>perchild</module> MPM, which is intended to
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync server virtual hosts run under different user IDs, the
aa0632eb844172ced4bef7b3afdbb216c8462fb2vboxsync <directive>User</directive> directive defines the user ID for the
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync main server and the fallback for <directive type="section"
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync module="core">VirtualHost</directive> sections without an
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <directive module="perchild">AssignUserID</directive> directive.</p>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <p>Special note: Use of this directive in <directive module="core"
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync type="section">VirtualHost</directive> is no longer supported. To
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync configure your server for <program>suexec</program> use
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <directive module="mod_suexec">SuexecUserGroup</directive>.</p>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <note><title>Note</title>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync <p>Although the <directive>User</directive> directive is present
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync in the <module>beos</module> and <module>mpmt_os2</module> MPMs,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync it is actually a no-op there and only exists for compatibility
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync reasons.</p>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync </note>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync</usage>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync</directivesynopsis>
66ce29e79816b3397896b0a0b273a3a61e4ceb74vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<name>ChrootDir</name>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<description>Directory for apache to run chroot(8) after startup.</description>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<syntax>ChrootDir <var>/path/to/directory</var></syntax>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<default>none</default>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<contextlist><context>server config</context></contextlist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<modulelist><module>event</module>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<module>prefork</module><module>worker</module></modulelist>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync<usage>
559d5e8e1743b9f63230f21d3e167a553e5199ffvboxsync <p>This directive, available in httpd 2.2.9(?) and later, tells the
559d5e8e1743b9f63230f21d3e167a553e5199ffvboxsync server to <var>chroot(8)</var> to the specified directory after
559d5e8e1743b9f63230f21d3e167a553e5199ffvboxsync startup, but before accepting requests over the 'net.</p>
559d5e8e1743b9f63230f21d3e167a553e5199ffvboxsync <p>Note that running the server under chroot is not simple,
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync and requires additional setup, particularly if you are running
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync scripts such as CGI or PHP. Please make sure you are properly
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync familiar with the operation of chroot before attempting to use
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync this feature.</p>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</usage>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</directivesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync</modulesynopsis>
bff1915a855c5b71d76f6391549eadda348e33b0vboxsync