server-wide.html.en revision 06446ae476296b502b18ac1c1cb20959e613af68
a546d8ff17af2eb98179377f39a02ac81459f0bend<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
a546d8ff17af2eb98179377f39a02ac81459f0bend BGCOLOR="#FFFFFF"
a546d8ff17af2eb98179377f39a02ac81459f0bend TEXT="#000000"
a546d8ff17af2eb98179377f39a02ac81459f0bend LINK="#0000FF"
a546d8ff17af2eb98179377f39a02ac81459f0bend VLINK="#000080"
a546d8ff17af2eb98179377f39a02ac81459f0bend ALINK="#FF0000"
a546d8ff17af2eb98179377f39a02ac81459f0bend<!--#include virtual="header.html" -->
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>This document explains some of the directives provided by
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html">core</A> server which are used to configure
a546d8ff17af2eb98179377f39a02ac81459f0bendthe basic operations of the server.</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<li><a href="#identification">Server Identification</a></li>
a546d8ff17af2eb98179377f39a02ac81459f0bend<h2><a name="identfication">Server Identification</a></h2>
a546d8ff17af2eb98179377f39a02ac81459f0bend<A HREF="mod/core.html#serversignature">ServerSignature</A><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<A HREF="mod/core.html#usecanonicalname">UseCanonicalName</A><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>The <code>ServerAdmin</code> and <code>ServerTokens</code>
a546d8ff17af2eb98179377f39a02ac81459f0benddirectives control what information about the server will be presented
a546d8ff17af2eb98179377f39a02ac81459f0bendin server-generated documents such as error messages.
184d5ca6f866f95a98dd0b58308df44a966fd874ndThe <code>ServerTokens</code> directive sets the value of the
a546d8ff17af2eb98179377f39a02ac81459f0bendServer HTTP response header field.</p>
184d5ca6f866f95a98dd0b58308df44a966fd874nd<p>The <code>ServerName</code> and <code>UseCanonicalName</code>
a546d8ff17af2eb98179377f39a02ac81459f0benddirectives are used by the server to determine how to construct
a546d8ff17af2eb98179377f39a02ac81459f0bendself-referential URLs. For example, when a client requests a
184d5ca6f866f95a98dd0b58308df44a966fd874nddirectory, but does not include the trailing slash in the directory
a546d8ff17af2eb98179377f39a02ac81459f0bendname, Apache must redirect the client to the full name including the
a546d8ff17af2eb98179377f39a02ac81459f0bendtrailing slash so that the client will correctly resolve relative
a546d8ff17af2eb98179377f39a02ac81459f0bendreferences in the document.</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#coredumpdirectory">CoreDumpDirectory</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#scoreboardfile">ScoreBoardFile</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>These directives control the locations of the various files that
a546d8ff17af2eb98179377f39a02ac81459f0bendApache needs for proper operation. When the pathname used does not
184d5ca6f866f95a98dd0b58308df44a966fd874ndbegin with a slash "/", the files are located relative to the
a546d8ff17af2eb98179377f39a02ac81459f0bend<code>ServerRoot</code>. Be careful about locating files in paths
a546d8ff17af2eb98179377f39a02ac81459f0bendwhich are writable by non-root users. See the <a
a546d8ff17af2eb98179377f39a02ac81459f0bendhref="misc/security_tips.html">security tips</a> documentation for
a546d8ff17af2eb98179377f39a02ac81459f0bendmore details.</p>
184d5ca6f866f95a98dd0b58308df44a966fd874nd<a href="mod/core.html#bs2000account">BS2000Account</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#maxrequestsperchild">MaxRequestsPerChild</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#maxspareservers">MaxSpareServers</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#minspareservers">MinSpareServers</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<a href="mod/core.html#threadsperchild">ThreadsPerChild</a><br>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>When <code>ServerType</code> is set to its recommended value of
a546d8ff17af2eb98179377f39a02ac81459f0bend<code>Standalone</code>, Apache 1.3 for Unix is a pre-forking web
a546d8ff17af2eb98179377f39a02ac81459f0bendserver. A single control process is responsible for launching child
a546d8ff17af2eb98179377f39a02ac81459f0bendprocesses which listen for connections and serve them when they
a546d8ff17af2eb98179377f39a02ac81459f0bendarrive. Apache always tries to maintain several <em>spare</em> or
a546d8ff17af2eb98179377f39a02ac81459f0bendidle server processes, which stand ready to serve incoming requests.
a546d8ff17af2eb98179377f39a02ac81459f0bendIn this way, clients do not need to wait for a new child processes to
a546d8ff17af2eb98179377f39a02ac81459f0bendbe forked before their requests can be served.</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>The <code>StartServers</code>, <code>MinSpareServers</code>,
a546d8ff17af2eb98179377f39a02ac81459f0bend<code>MaxSpareServers</code>, and <code>MaxServers</code> regulate how
a546d8ff17af2eb98179377f39a02ac81459f0bendthe parent process creates children to serve requests. In general,
184d5ca6f866f95a98dd0b58308df44a966fd874ndApache is very self-regulating, so most sites do not need to adjust
a546d8ff17af2eb98179377f39a02ac81459f0bendthese directives from their default values. Sites which need to serve
a546d8ff17af2eb98179377f39a02ac81459f0bendmore than 256 simultaneous requests may need to increase
a546d8ff17af2eb98179377f39a02ac81459f0bend<code>MaxClients</code>, while sites with limited memory may need to
a546d8ff17af2eb98179377f39a02ac81459f0benddecrease <code>MaxClients</code> to keep the server from thrashing
a546d8ff17af2eb98179377f39a02ac81459f0bend(swapping memory to disk and back).</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>While the parent process is usually started as root under Unix
a546d8ff17af2eb98179377f39a02ac81459f0bendin order to bind to port 80, the child processes are launched
a546d8ff17af2eb98179377f39a02ac81459f0bendby Apache as a less-privileged user. The <code>User</code> and
a546d8ff17af2eb98179377f39a02ac81459f0bend<code>Group</code> directives are used to set the privileges
a546d8ff17af2eb98179377f39a02ac81459f0bendof the Apache child processes. The child processes must
a546d8ff17af2eb98179377f39a02ac81459f0bendbe able to read all the content that will be served, but
a546d8ff17af2eb98179377f39a02ac81459f0bendshould have as few privileges beyond that as possible.
a546d8ff17af2eb98179377f39a02ac81459f0bendIn addition, unless <a href="suexec.html">suexec</a> is used,
a546d8ff17af2eb98179377f39a02ac81459f0bendthese directives also set the privileges which will be inherited
a546d8ff17af2eb98179377f39a02ac81459f0bendby CGI scripts.</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p><code>MaxRequestsPerChild</code> controls how frequently the server
184d5ca6f866f95a98dd0b58308df44a966fd874ndrecycles processes by killing old ones and launching new ones.</p>
a546d8ff17af2eb98179377f39a02ac81459f0bend<p>Under Windows, Apache launches one control process and one
184d5ca6f866f95a98dd0b58308df44a966fd874ndchild process. The child process creates multiple threads to
a546d8ff17af2eb98179377f39a02ac81459f0bendserve requests. The number of threads is controlled by the
<!--#include virtual="footer.html" -->