This document explains some of the directives provided by the core server which are used to configure the basic operations of the server.
directives control what information about the server will be
presented in server-generated documents such as error messages.
ServerTokens directive sets the value of the
Server HTTP response header field.
UseCanonicalName directives are used by the server
to determine how to construct self-referential URLs. For
example, when a client requests a directory, but does not
include the trailing slash in the directory name, Apache must
redirect the client to the full name including the trailing
slash so that the client will correctly resolve relative
references in the document.
These directives control the locations of the various files
that Apache needs for proper operation. When the pathname used
does not begin with a slash "/", the files are located relative
ServerRoot. Be careful about locating files
in paths which are writable by non-root users. See the security tips documentation
for more details.
ServerType is set to its recommended value
Standalone, Apache 1.3 for Unix is a
pre-forking web server. A single control process is responsible
for launching child processes which listen for connections and
serve them when they arrive. Apache always tries to maintain
several spare or idle server processes, which stand
ready to serve incoming requests. In this way, clients do not
need to wait for a new child processes to be forked before
their requests can be served.
regulate how the parent process creates children to serve
requests. In general, Apache is very self-regulating, so most
sites do not need to adjust these directives from their default
values. Sites which need to serve more than 256 simultaneous
requests may need to increase
sites with limited memory may need to decrease
MaxClients to keep the server from thrashing
(swapping memory to disk and back). More information about
tuning process creation is provided in the performance hints
While the parent process is usually started as root under
Unix in order to bind to port 80, the child processes are
launched by Apache as a less-privileged user. The
Group directives are used to
set the privileges of the Apache child processes. The child
processes must be able to read all the content that will be
served, but should have as few privileges beyond that as
possible. In addition, unless suexec
is used, these directives also set the privileges which will be
inherited by CGI scripts.
sets rlimits on a child process to prevent a leaky module from
taking down the whole server.
MaxRequestsPerChild controls how frequently the
server recycles processes by killing old ones and launching new
Under Windows, Apache launches one control process and one
child process. The child process creates multiple threads to
serve requests. The number of threads is controlled by the
When Apache starts, it connects to some port and address on
the local machine and waits for incoming requests. By default,
it listens to all addresses on the machine, and to the port as
specified by the
Port directive in the server
configuration. However, it can be told to listen to more than
one port, to listen to only selected addresses, or a
combination. This is often combined with the Virtual Host feature which determines how
Apache responds to different IP addresses, hostnames and
There are two directives used to restrict or specify which
addresses and ports Apache listens to. The
BindAddress directive is used to restrict the
server to listening to a single IP address. The
Listen directive can be used to specify multiple
IP addresses and/or Ports to which Apache will listen.
TimeOut directives are used to adjust how
Apache interacts with the network.
controls a BSD specific filter optimization. See the BSD
section on performance hints
AcceptMutex controls which accept
mutex method will be used. For an explanation of what this is
and why it's needed, see the performance tuning guide
MaxKeepAliveRequests directives are used to
configure how Apache handles persistent connections.
LimitRequest* directives are used to place
limits on the amount of resources Apache will use in reading
requests from clients. By limiting these values, some kinds of
denial of service attacks can be mitigated.
RLimit* directives are used to limit the
amount of resources which can be used by processes forked off
from the Apache children. In particular, this will control
resources used by CGI scripts and SSI exec commands.
ThreadStackSize directive is used only on
Netware to control the stack size.