The
If this directive is set to Default
, then the
compile-time selected default will be used. Other possible
methods are listed below. Note that not all methods are
available on all platforms. If a method is specified which is
not available, a message will be written to the error log
listing the available methods.
flock
flock(2)
system call to lock the
file defined by the fcntl
fnctl(2)
system call to lock the
file defined by the posixsem
pthread
sysvsem
If you want to find out the compile time chosen default
for your system, you may set your debug
. Then the default
The SYSROOT
.
Only one BS2000Account
directive can be used.
This controls the directory to which Apache attempts to
switch before dumping core. The default is in the
Linux 2.4 and beyond: If you start Apache as root and you explicitly code CoreDumpDirectory, Apache enables core dumps.
The
#
followed by a group number.It is recommended that you set up a new group specifically for
running the server. Some admins use user nobody
,
but this is not always possible or desirable.
Don't set root
unless
you know exactly what you are doing, and what the dangers are.
Special note: Use of this directive in
Although the
The
It is often useful to be able to send the server a signal,
so that it closes and then re-opens its
The PidFile is subject to the same warnings about log file placement and security.
The
The
Multiple
For example, to make the server accept connections on both port 80 and port 8000, use:
To make the server accept connections on two specified interfaces and port numbers, use
IPv6 addresses must be surrounded in square brackets, as in the following example:
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
listen(2)
system call.
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.
The fcntl
or flock
. This directive should
normally be left at its default value. The main reason for changing
it is if the logs
directory is NFS mounted, since
the lockfile must be stored on a local disk. The PID
of the main server process is automatically appended to the
filename.
It is best to avoid putting this file in a world writable
directory such as /var/tmp
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.
The
For non-threaded servers (i.e.,
For threaded and hybrid servers (e.g. 50
. For
hybrid MPMs the default value is 16
(25
(
free()
The free()
. When not set, or when set
to zero, the threshold will be set to unlimited.
The 0
, then the process will never expire.
The default value for 0
.
Setting
For
Maximum number of idle threads. Different MPMs deal with this directive differently.
For MaxSpareThreads 10
. This MPM monitors the number of
idle threads on a per-child basis. If there are too many idle
threads in that child, the server will begin to kill threads
within that child.
For MaxSpareThreads 250
.
These MPMs deal with idle threads on a server-wide basis. If there
are too many idle threads in the server then child processes are
killed until the number of idle threads is less than this number.
For MaxSpareThreads 100
. Since this MPM runs a
single-process, the spare thread count is also server-wide.
MaxSpareThreads 50
. For
10
.
The range of the
Minimum number of idle threads to handle request spikes. Different MPMs deal with this directive differently.
MinSpareThreads 5
and monitors the number of idle
threads on a per-child basis. If there aren't enough idle threads
in that child, the server will begin to create new threads within
that child. Thus, if you set 10
and a 5
, you'll have
at least 50 idle threads on your system.
MinSpareThreads
75
and deal with idle threads on a server-wide basis. If
there aren't enough idle threads in the server then child
processes are created until the number of idle threads is greater
than number.
MinSpareThreads 10
and, since it is a single-process
MPM, tracks this on a server-wide bases.
MinSpareThreads 1
. For
5
.
Apache uses a scoreboard to communicate between its parent and child processes. Some architectures require a file to facilitate this communication. If the file is left unspecified, Apache first attempts to create the scoreboard entirely in memory (using anonymous shared memory) and, failing that, will attempt to create the file on disk (using file-based shared memory). Specifying this directive causes Apache to always create the file on the disk.
File-based shared memory is useful for third-party applications that require direct access to the scoreboard.
If you use a
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 (i.e., 100ms or so, such as transcontinental fast pipes).
If set to the value of 0
, the server will use the
OS deault.
For the
Special care must be taken when using this directive. If
With the
With
With the
There is a hard limit of ServerLimit 20000
compiled
into the server. This is intended to avoid nasty effects caused by
typos.
The
The default value differs from MPM to MPM. For
StartServers 3
.
For 5
and for
2
.
Number of threads created on startup. As the number of threads is dynamically controlled depending on the load, there is usually little reason to adjust this parameter.
For StartThreads
5
and this directive tracks the number of threads per
process at startup.
For StartThreads 50
and, since there is only a single
process, this is the total number of threads created at startup to
serve requests.
For StartThreads
10
. It also reflects the total number of threads created
at startup to serve requests.
This directive sets the maximum configured value for
Special care must be taken when using this directive. If
The default value for 1920
when used with 64
when used with the others.
There is a hard limit of ThreadLimit 20000
(or
ThreadLimit 15000
with
This directive sets the number of threads created by each
child process. The child creates these threads at startup and
never creates more. If using an MPM like
The default value for 64
when used with 25
when used with the others.
The root
.
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.
Unix-userid is one of:
The user should have no privileges that result in it being
able to access files that are not intended to be visible to the
outside world, and similarly, the user should not be able to
execute code that is not meant for HTTP requests. It is
recommended that you set up a new user and group specifically for
running the server. Some admins use user nobody
, but
this is not always desirable, since the nobody
user
can have other uses on the system.
Don't set root
unless
you know exactly what you are doing, and what the dangers are.
With the
Special note: Use of this directive in
Although the