<
li><
a href="#group">Group</
a></
li>
<
li><
a href="#pidfile">PidFile</
a></
li>
<
li><
a href="#listen">Listen</
a></
li>
<
li><
a href="#listenbacklog">ListenBacklog</
a></
li>
<
li><
a href="#lockfile">LockFile</
a></
li>
<
li><
a href="#maxclients">MaxClients</
a></
li>
<
li><
a href="#maxrequestsperchild">MaxRequestsPerChild</
a></
li>
<
li><
a href="#maxsparethreads">MaxSpareThreads</
a></
li>
<
li><
a href="#minsparethreads">MinSpareThreads</
a></
li>
<
li><
a href="#scoreboardfile">ScoreBoardFile</
a></
li>
<
li><
a href="#sendbuffersize">SendBufferSize</
a></
li>
<
li><
a href="#startservers">StartServers</
a></
li>
<
li><
a href="#threadsperchild">ThreadsPerChild</
a></
li>
<
li><
a href="#user">User</
a></
li>
<
H2><
A NAME="coredumpdirectory">CoreDumpDirectory directive</
A></
H2>
<!--%plaintext <?INDEX {\tt CoreDumpDirectory} directive> --> ><
STRONG>Syntax:</
STRONG></
A> CoreDumpDirectory <
EM>directory</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> the same location as ServerRoot<
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
<
p>This controls the directory to which Apache attempts to switch
before dumping core. The default is in the <
AHREF="core.html#serverroot">ServerRoot</
A> directory, however since
this should not be writable by the user the server runs as, core dumps
won't normally get written. If you want a core dump for debugging,
you can use this directive to place it in a different location.<
P><
HR>
<
H2><
A NAME="group">Group directive</
A></
H2>
<!--%plaintext <?INDEX {\tt Group} directive> --> ><
STRONG>Syntax:</
STRONG></
A> Group <
EM>unix-group</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>Group #-1</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config, virtual host<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork</
p>
The Group directive sets the group under which the server will answer requests.
In order to use this directive, the stand-alone server must be run initially
as root. <
EM>Unix-group</
EM> is one of:
<
DD>Refers to the given group by name.
<
DT># followed by a group number.
<
DD>Refers to a group by its number.
It is recommended that you set up a new group specifically for running the
server. Some admins use user <
CODE>nobody</
CODE>, but this is not always
possible or desirable.<
P>
Note: if you start the server as a non-root user, it will fail to change
to the specified group, and will instead continue to run as the group of the
Special note: Use of this directive in <VirtualHost> requires a
properly configured <
A HREF="/suexec.html">suEXEC wrapper</
A>.
When used inside a <VirtualHost> in this manner, only the group
that CGIs are run as is affected. Non-CGI requests are still processed
as the group specified in the main Group directive.<
P>
SECURITY: See <
A HREF="#user">User</
A> for a discussion of the security
<
H2><
A NAME="pidfile">PidFile directive</
A></
H2>
<!--%plaintext <?INDEX {\tt PidFile} directive> --> ><
STRONG>Syntax:</
STRONG></
A> PidFile <
EM>filename</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>PidFile
logs/
httpd.pid</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
<
p>The PidFile directive sets the file to which the server records the
process id of the daemon. If the filename does not begin with a slash
(/) then it is assumed to be relative to the <
AHREF="core.html#serverroot">ServerRoot</
A>.</
p>
<
p>It is often useful to be able to send the server a signal, so that
it closes and then reopens its <
AHREF="core.html#errorlog">ErrorLog</
A> and TransferLog, and re-reads
its configuration files. This is done by sending a SIGHUP (kill -1)
signal to the process id listed in the PidFile.</
p>
<
p>The PidFile is subject to the same warnings about log file placement and
<
H2><
A NAME="listen">Listen directive</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A>
Listen [<
EM>IP address</
EM>:]<
EM>port number</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
<
P>The Listen directive instructs Apache to listen to more than one IP
address or port; by default it responds to requests on all IP
interfaces, but only on the port given by the <
CODE><
AHREF="#port">Port</
A></
CODE> directive.</
P>
<
TT>Listen</
TT> can be used instead of <
TT><
AHREF="#bindaddress">BindAddress</
A></
TT> and <
TT>Port</
TT>. It tells
the server to accept incoming requests on the specified port or
address-and-port combination. If the first format is used, with a port
number only, the server listens to the given port on all interfaces,
instead of the port given by the <
TT>Port</
TT> directive. If an IP
address is given as well as a port, the server will listen on the
given port and interface. <
P>
Note that you may still require a <
TT>Port</
TT> directive so
that URLs that Apache generates that point to your server still
Multiple Listen directives may be used
to specify a number of addresses and ports to listen to. The server
will respond to requests from any of the listed addresses and
For example, to make the server accept connections on both port
To make the server accept connections on two specified
interfaces and port numbers, use
<
P><
STRONG>See Also:</
STRONG>
<
STRONG>See Also:</
STRONG>
<
A HREF="/bind.html">Setting which addresses and ports Apache uses</
A><
BR>
<
STRONG>See Also:</
STRONG>
<
H2><
A NAME="listenbacklog">ListenBacklog directive</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A> ListenBacklog <
EM>backlog</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>ListenBacklog 511</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
<
P>The maximum length of the queue of pending connections. Generally no
tuning is needed or desired, however on some systems it is desirable
to increase this when under a TCP SYN flood attack. See
the backlog parameter to the <
CODE>listen(2)</
CODE> system call.
<
P>This will often be limited to a smaller number by the operating
system. This varies from OS to OS. Also note that many OSes do not
use exactly what is specified as the backlog, but use a number based on
(but normally larger than) what is set.
<
H2><
A NAME="lockfile">LockFile directive</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A> LockFile <
EM>filename</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork</
p>
<
p>The LockFile directive sets the path to the lockfile used when
Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be
left at its default value. The main reason for changing it is if
the <
CODE>logs</
CODE> directory is NFS mounted, since <
STRONG>the lockfile
must be stored on a local disk</
STRONG>. The PID of the main
server process is automatically appended to the filename. <
P>
<
p><
STRONG>SECURITY:</
STRONG> It is best to avoid putting this file in a
world writable directory such as <
CODE>/
var/
tmp</
CODE> because someone
could create a denial of service attack and prevent the server from
starting by creating a lockfile with the same name as the one the
server will try to create.</
p>
<
H2><
A NAME="maxclients">MaxClients directive</
A></
H2>
<!--%plaintext <?INDEX {\tt MaxClients} directive> --> ><
STRONG>Syntax:</
STRONG></
A> MaxClients <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>MaxClients 8</
code> (with threads)
<
code>MaxClients 256</
code> (no threads)<
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> mpmt_pthread, prefork</
p>
<
P>The MaxClients directive sets the limit on the number of child
processes that will be created to serve requests. When the server is
built without threading, no more than this number of clients can be
served simultaneously. To configure more than 256 clients, you must
edit the <
code>HARD_SERVER_LIMIT</
code> entry in
<
P>Any connection attempts over the MaxClients limit will normally
be queued, up to a number based on the <
A HREF="#listenbacklog">
ListenBacklog</
A> directive. Once a child process is freed at the
end of a different request, the connection will then be serviced.</
p>
<
p>When the server is compiled with threading, then the maximum number
of simultaneous requests that can be served is obtained from the value
of this directive multiplied by <
ahref="#threadsperchild">ThreadsPerChild</
a>.</
p>
<
H2><
A NAME="maxrequestsperchild">MaxRequestsPerChild directive</
A></
H2>
<!--%plaintext <?INDEX {\tt MaxRequestsPerChild} directive> --> ><
STRONG>Syntax:</
STRONG></
A> MaxRequestsPerChild <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>MaxRequestsPerChild 10000</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
<
p>The MaxRequestsPerChild directive sets the limit on the number of requests
that an individual child server process will handle. After MaxRequestsPerChild
requests, the child process will die. If MaxRequestsPerChild is 0, then
the process will never expire.<
P>
Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects:
<
LI>it limits the amount of memory that process can consume by (accidental)
<
LI> by giving processes a finite lifetime, it helps reduce the
number of processes when the server load reduces.
<
P><
STRONG>NOTE:</
STRONG> For <
EM>KeepAlive</
EM> requests, only the first
request is counted towards this limit. In effect, it changes the
behavior to limit the number of <
EM>connections</
EM> per child.
<
H2><
A NAME="maxsparethreads">MaxSpareThreads directive</
A></
H2>
<!--%plaintext <?INDEX {\tt MaxSpareServers} directive> --> ><
STRONG>Syntax:</
STRONG></
A> MaxSpareThreads <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>MaxSpareThreads ??</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> core<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread</
p>
<
P>Maximum number of idle threads.</
p>
<
p>See also <
A HREF="#minsparethreads">MinSpareThreads</
A> and
<
A HREF="#startservers">StartServers</
A>.
<
H2><
A NAME="minsparethreads">MinSpareThreads directive</
A></
H2>
<!--%plaintext <?INDEX {\tt MinSpareServers} directive> --> ><
STRONG>Syntax:</
STRONG></
A> MinSpareServers <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>MinSpareServers ???</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> core<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread</
p>
<
p>Minimum number of idle threads to handle request spikes.
See also <
A HREF="#maxsparethreads">MaxSpareThreads</
A> and
<
A HREF="#startservers">StartServers</
A>.<
P><
HR>
<
H2><
A NAME="scoreboardfile">ScoreBoardFile directive</
A></
H2>
<!--%plaintext <?INDEX {\tt ScoreBoardFile} directive> --> ><
STRONG>Syntax:</
STRONG></
A> ScoreBoardFile <
EM>filename</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork</
p>
<
p>The ScoreBoardFile directive is required on some architectures to place
a file that the server will use to communicate between its children and
the parent. The easiest way to find out if your architecture requires
a scoreboard file is to run Apache and see if it creates the file named
by the directive. If your architecture requires it then you must ensure
that this file is not used at the same time by more than one invocation
<
p>If you have to use a ScoreBoardFile then you may see improved speed by
placing it on a RAM disk. But be careful that you heed the same warnings
about log file placement and
<
p><
STRONG>See Also</
STRONG>:
<
H2><
A NAME="sendbuffersize">SendBufferSize directive</
A></
H2>
<!--%plaintext <?INDEX {\tt SendBufferSize} directive> --> ><
STRONG>Syntax:</
STRONG></
A> SendBufferSize <
EM>bytes</
EM><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork, mpm_winnt</
p>
The server will set the TCP buffer size to the number of bytes
specified. Very useful to increase past standard OS defaults on high
speed high latency (<
EM>
i.e.</
EM>, 100ms or so, such as transcontinental
<
H2><
A NAME="startservers">StartServers directive</
A></
H2>
<!--%plaintext <?INDEX {\tt StartServers} directive> --> ><
STRONG>Syntax:</
STRONG></
A> StartServers <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>StartServers 5</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> mpmt_pthread, prefork</
p>
<
p>The StartServers directive sets the number of child server processes created
on startup. As the number of processes is dynamically controlled depending
on the load, there is usually little reason to adjust this parameter.</
P>
<
P>See also <
A HREF="#minsparethreads">MinSpareThreads</
A> and
<
A HREF="#maxsparethreads">MaxSpareThreads</
A>.<
P><
HR>
<
H2><
A NAME="threadsperchild">ThreadsPerChild</
A></
H2>
><
STRONG>Syntax:</
STRONG></
A> ThreadsPerChild <
EM>number</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>ThreadsPerChild 50</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config<
BR>
><
STRONG>Status:</
STRONG></
A> MPM<
BR>
><
STRONG>Module:</
STRONG></
A> mpmt_pthread, mpm_winnt</
p>
<
P>This directive sets the number of threads created by each child
<
H2><
A NAME="user">User directive</
A></
H2>
<!--%plaintext <?INDEX {\tt User} directive> --> ><
STRONG>Syntax:</
STRONG></
A> User <
EM>unix-userid</
EM><
BR>
><
STRONG>Default:</
STRONG></
A> <
CODE>User #-1</
CODE><
BR>
><
STRONG>Context:</
STRONG></
A> server config, virtual host<
BR>
><
STRONG>Status:</
STRONG></
A> core<
BR>
><
STRONG>Module:</
STRONG></
A> dexter, mpmt_pthread, prefork</
p>
The User directive sets the userid as which the server will answer requests.
In order to use this directive, the standalone server must be run initially
as root. <
EM>Unix-userid</
EM> is one of:
<
DD>Refers to the given user by name.
<
DT># followed by a user number.
<
DD>Refers to a user by their number.
The user should have no privileges which result in it being able to access
files which are not intended to be visible to the outside world, and
similarly, the user should not be able to execute code which is not
meant for httpd requests. It is recommended that you set up a new user and
group specifically for running the server. Some admins use user
<
CODE>nobody</
CODE>, but this is not always possible or desirable.
For example mod_proxy's cache, when enabled, must be accessible to this user
Notes: If you start the server as a non-root user, it will fail to change
to the lesser privileged user, and will instead continue to run as
that original user. If you do start the server as root, then it is normal
for the parent process to remain running as root.<
P>
Special note: Use of this directive in <VirtualHost> requires a
properly configured <
A HREF="/suexec.html">suEXEC wrapper</
A>.
When used inside a <VirtualHost> in this manner, only the user
that CGIs are run as is affected. Non-CGI requests are still processed
with the user specified in the main User directive.<
P>
SECURITY: Don't set User (or <
A HREF="#group">Group</
A>) to
<
CODE>root</
CODE> unless you know exactly what you are doing, and what the