core.html revision d2355288f753a1c5d88dc1d1efc86b7533b3b443
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<HTML>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<HEAD>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<TITLE>Apache Core Features</TITLE>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</HEAD>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<BODY
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering BGCOLOR="#FFFFFF"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering TEXT="#000000"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering LINK="#0000FF"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering VLINK="#000080"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering ALINK="#FF0000"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--#include virtual="header.html" -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<H1 ALIGN="CENTER">Apache Core Features</h1>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThese configuration parameters control the core Apache features, and are
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poetteringalways available.
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering</P>
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ceLennart Poettering<H2>Directives</H2>
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ceLennart Poettering<ul>
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering<li><A HREF="#accessconfig">AccessConfig</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#accessfilename">AccessFileName</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#addmodule">AddModule</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#allowoverride">AllowOverride</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#authname">AuthName</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#authtype">AuthType</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#bindaddress">BindAddress</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#clearmodulelist">ClearModuleList</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#defaulttype">DefaultType</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#directory">&lt;Directory&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#directorymatch">&lt;DirectoryMatch&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#documentroot">DocumentRoot</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#errordocument">ErrorDocument</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#errorlog">ErrorLog</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#files">&lt;Files&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#filesmatch">&lt;FilesMatch&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#group">Group</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#hostnamelookups">HostNameLookups</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#identitycheck">IdentityCheck</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#ifmodule">&lt;IfModule&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#keepalive">KeepAlive</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#keepalivetimeout">KeepAliveTimeout</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#limit">&lt;Limit&gt;</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#listen">Listen</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#listenbacklog">ListenBacklog</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#location">&lt;Location&gt;</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#locationmatch">&lt;LocationMatch&gt;</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#lockfile">LockFile</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#maxclients">MaxClients</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#maxkeepaliverequests">MaxKeepAliveRequests</a>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#maxrequestsperchild">MaxRequestsPerChild</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#maxspareservers">MaxSpareServers</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#minspareservers">MinSpareServers</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#options">Options</A>
a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5bLennart Poettering<li><A HREF="#pidfile">PidFile</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#port">Port</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#require">require</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#resourceconfig">ResourceConfig</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#rlimitcpu">RLimitCPU</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#rlimitmem">RLimitMEM</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#rlimitnproc">RLimitNPROC</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#satisfy">Satisfy</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#scoreboardfile">ScoreBoardFile</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#sendbuffersize">SendBufferSize</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#serveradmin">ServerAdmin</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#serveralias">ServerAlias</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#servername">ServerName</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#serverpath">ServerPath</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#serverroot">ServerRoot</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#servertype">ServerType</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#startservers">StartServers</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#threadsperchild">ThreadsPerChild</a>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#timeout">TimeOut</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#user">User</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#virtualhost">&lt;VirtualHost&gt;</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</ul>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="accessconfig">AccessConfig directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AccessConfig} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AccessConfig <em>filename</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>AccessConfig conf/access.conf</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe server will read this file for more directives after reading the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#resourceconfig">ResourceConfig</A> file. <em>Filename</em> is
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringrelative to the <A HREF="#serverroot">ServerRoot</A>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis feature can be disabled using:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>AccessConfig /dev/null</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringHistorically, this file only contained
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#directory">&lt;Directory&gt;</A> sections; in fact it can now
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringcontain any server directive allowed in the <em>server config</em> context.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="accessfilename">AccessFileName directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AccessFileName} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AccessFileName <em>filename filename ...</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>AccessFileName .htaccess</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> AccessFileName can accept more than one filename only in Apache 1.3 and later<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringWhen returning a document to the client the server looks for the first existing
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringaccess control file from this list of names in every directory of the path to
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe document, if access control files are enabled for that directory.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringFor example:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>AccessFileName .acl</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringbefore returning the document /usr/local/web/index.html, the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringserver will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfor directives, unless they have been disabled with
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory /&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride None<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;/Directory&gt;</code></blockquote><p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="addmodule">AddModule directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AddModule} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AddModule <em>module module ...</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config <br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Compatibility:</strong> AddModule is only available in Apache 1.2 and later<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThe server can have modules compiled in which are not actively in use.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive can be used to enable the use of those modules. The
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringserver comes with a pre-loaded list of active modules; this list can
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringbe cleared with the <A HREF="#clearmodulelist">ClearModuleList</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirective.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="allowoverride">AllowOverride directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AllowOverride} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AllowOverride <em>override override ...</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>AllowOverride All</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> directory<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringWhen the server finds an .htaccess file (as specified by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#accessfilename">AccessFileName</A>) it needs to know which
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirectives declared in that file can override earlier access information.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<em>Override</em> can be set to <code>None</code>, in which case the server
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwill not read the file, <code>All</code> in which case the server will
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringallow all the directives, or one or more of the following:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dl>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>AuthConfig
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AuthConfig} override&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the authorization directives
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering(<A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#authname">AuthName</A>, <A HREF="#authtype">AuthType</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authuserfile">AuthUserFile</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#require">require</A>, etc.).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>FileInfo
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt FileInfo} override&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling document types
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering(<A HREF="mod_mime.html#addencoding">AddEncoding</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_mime.html#addlanguage">AddLanguage</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_mime.html#addtype">AddType</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#defaulttype">DefaultType</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#errordocument">ErrorDocument</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A>, etc.).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>Indexes
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Indexes} override&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling directory indexing
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering(<A HREF="mod_autoindex.html#adddescription">AddDescription</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#addicon">AddIcon</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#addiconbyencoding">AddIconByEncoding</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#addiconbytype">AddIconByType</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#defaulticon">DefaultIcon</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#directoryindex">DirectoryIndex</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#fancyindexing">FancyIndexing</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#headername">HeaderName</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#indexignore">IndexIgnore</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#indexoptions">IndexOptions</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_autoindex.html#readmename">ReadmeName</A>, etc.).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>Limit
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Limit} override&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling host access (allow, deny and order).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>Options
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Options} override&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling specific directory features
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering(<A HREF="#options">Options</A> and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_include.html#xbithack">XBitHack</A>).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</dl><p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="authname">AuthName directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AuthName} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AuthName <em>auth-domain</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> directory, .htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Override:</strong> AuthConfig<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis directive sets the name of the authorization realm for a directory.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis realm is given to the client so that the user knows which username and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringpassword to send.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIt must be accompanied by <A HREF="#authtype">AuthType</A> and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#require">require</A> directives, and directives such as
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="authtype">AuthType directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt AuthType} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AuthType <em>type</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> directory, .htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Override:</strong> AuthConfig<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive selects the type of user authentication for a directory.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringOnly <code>Basic</code> is currently implemented.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Basic} authentication scheme&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIt must be accompanied by <A HREF="#authname">AuthName</A> and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#require">require</A> directives, and directives such as
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="bindaddress">BindAddress directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt BindAddress} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> BindAddress <em>saddr</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>BindAddress *</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringA Unix&#174; http server can either listen for connections to every
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIP address of the server machine, or just one IP address of the server
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringmachine. <em>Saddr</em> can be
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<menu>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li>*
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li>An IP address
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li>A fully-qualified Internet domain name
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</menu>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIf the value is *, then the server will listen for connections on
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringevery IP address, otherwise it will only listen on the IP address
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringspecified. <p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis option can be used as an alternative method for supporting
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="/virtual-host.html">virtual hosts</A> instead of using
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#virtualhost">&lt;VirtualHost&gt;</A> sections.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><strong>See Also:</strong>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/dns-caveats.html">DNS Issues</a><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>See Also:</strong>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/bind.html">Setting which addresses and ports Apache uses</a></p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="clearmodulelist">ClearModuleList directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt ClearModuleList} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> ClearModuleList<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> ClearModuleList is only available in Apache 1.2 and later<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe server comes with a built-in list of active modules. This
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirective clears the list. It is assumed that the list will then be
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringre-populated using the <A HREF="#addmodule">AddModule</A> directive.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="defaulttype">DefaultType directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt DefaultType} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> DefaultType <em>mime-type</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>DefaultType text/html</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Override:</strong> FileInfo<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThere will be times when the server is asked to provide a document
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwhose type cannot be determined by its MIME types mappings.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe server must inform the client of the content-type of the document, so in
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe event of an unknown type it uses the <CODE>DefaultType</CODE>. For
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringexample:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>DefaultType image/gif</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwould be appropriate for a directory which contained many gif images
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwith filenames missing the .gif extension.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="directory">&lt;Directory&gt; directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Directory} section directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> &lt;Directory <em>directory</em>&gt; ... &lt;/Directory&gt; <br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> Core. <p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory&gt; and &lt;/Directory&gt; are used to enclose a group of
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirectives which will apply only to the named directory and sub-directories
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringof that directory. Any directive which is allowed in a directory
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringcontext may be used. <em>Directory</em> is either the full path to a directory,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringor a wild-card string. In a wild-card string, `?' matches any single character,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringand `*' matches any sequences of characters. Example:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;Directory /usr/local/httpd/htdocs&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering Options Indexes FollowSymLinks
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;/Directory&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><strong>Apache 1.2 and above:</strong>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringExtended regular expressions can also be used, with the addition of the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<code>~</code> character. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;Directory ~ &quot;^/www/.*/[0-9]{3}&quot;&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwould match directories in /www/ that consisted of three numbers. In
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringApache 1.3 and later, it is reccomended to use
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="#directorymatch">&lt;DirectoryMatch&gt;</a> instead.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>If multiple directory sections match the directory (or its parents) containing
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringa document, then the directives are applied in the order of shortest match
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringfirst, interspersed with the directives from the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#accessfilename">.htaccess</A> files. For example, with
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<blockquote><code>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory /&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride None<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;/Directory&gt;<br><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory /home/*&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride FileInfo<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;/Directory&gt;</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfor access to the document <code>/home/web/dir/doc.html</code> the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsteps are:
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<menu>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply directive <code>AllowOverride None</code> (disabling
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<code>.htaccess</code> files).
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply directive <code>AllowOverride FileInfo</code> (for directory
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<code>/home/web</code>).
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply any FileInfo directives in <code>/home/web/.htaccess</code>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering</menu>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<P>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<STRONG>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringNote that the default Apache access for &lt;Directory /&gt; is
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<SAMP>Allow from All</SAMP>. This means that Apache will serve any file
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringmapped from an URL. It is recommended that you change this with a block
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsuch as
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering</STRONG>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<PRE>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;Directory /&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering Order Deny,Allow
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering Deny from All
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;/Directory&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</PRE>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<STRONG>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringand then override this for directories you <EM>want</EM> accessible.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringSee the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<A
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering HREF="/misc/security_tips.html"
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering>Security Tips</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringpage for more details.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering</STRONG>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</P>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe directory sections typically occur in the access.conf file, but they
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringmay appear in any configuration file. &lt;Directory&gt; directives cannot
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringnest, and cannot appear in a <A HREF="#limit">&lt;Limit&gt;</A> section.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="directorymatch">&lt;DirectoryMatch&gt;</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> &lt;DirectoryMatch <em>regex</em>&gt; ... &lt;/DirectoryMatch&gt; <br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> Core.<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Available in Apache 1.3 and later
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>&lt;DirectoryMatch&gt; and &lt;/DirectoryMatch&gt; are used to enclose a group of
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirectives which will apply only to the named directory and sub-directories
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringof that directory, the same as <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory">&lt;Directory&gt;</a>. However, it takes as an
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringargument a regular expression. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;DirectoryMatch &quot;^/www/.*/[0-9]{3}&quot;&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>would match directories in /www/ that consisted of three numbers.</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A NAME="documentroot">DocumentRoot directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt DocumentRoot} directive&gt; -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong> DocumentRoot <em>directory-filename</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Default:</strong> <code>DocumentRoot
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering/usr/local/etc/httpd/htdocs</code><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis directive sets the directory from which httpd will serve files.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringUnless matched by a directive like Alias, the server appends the path
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringfrom the requested URL to the document root to make the path to the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringdocument. Example:
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<blockquote><code>DocumentRoot /usr/web</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthen an access to <code>http://www.my.host.com/index.html</code> refers
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringto <code>/usr/web/index.html</code>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<P>There appears to be a bug in mod_dir which causes problems when the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringDocumentRoot has a trailing slash (i.e. "DocumentRoot /usr/web/") so
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringplease avoid that.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="errordocument">ErrorDocument directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt ErrorDocument} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> ErrorDocument <em>error-code document</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context</strong> server config, virtual host, directory, .htaccess<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Override:</strong> FileInfo<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Compatibility:</strong> The directory and .htaccess contexts
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringare only available in Apache 1.1 and later.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringIn the event of a problem or error, Apache can be configured to do
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringone of four things,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<OL>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<LI>output a simple hardcoded error message
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<LI>output a customized message
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<LI>redirect to a local URL to handle the problem/error
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<LI>redirect to an external URL to handle the problem/error
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</OL>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P>The first option is the default, while options 2-4 are configured
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringusing the <CODE>ErrorDocument</CODE> directive, which is followed by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe HTTP response code and a message or URL.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P><em>Messages</em> in this context begin with a single quote
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering(<code>"</code>), which does not form part of the message itself.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringApache will sometimes offer additional information regarding the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringproblem/error.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P>URLs can begin with a slash (/) for local URLs, or be a full
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringURL which the client can resolve. Examples:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringErrorDocument 500 http://foo.example.com/cgi-bin/tester<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringErrorDocument 404 /cgi-bin/bad_urls.pl<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringErrorDocument 401 /subscription_info.html<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringErrorDocument 403 "Sorry can't allow you access today
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P>Note that when you specify an <CODE>ErrorDocument</CODE> that
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringpoints to a remote URL (ie. anything with a method such as "http" in
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfront of it) Apache will send a redirect to the client to tell it
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwhere to find the document, even if the document ends up being
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringon the same server.. This has several implications, the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringmost important being that <STRONG>if you use an "ErrorDocument 401"
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringdirective then it must refer to a local document.</STRONG> This results
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringfrom the nature of the HTTP basic authentication scheme.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<P>See Also: <A HREF="/custom-error.html">documentation of customizable
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringresponses.</A><p><hr>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="errorlog">ErrorLog directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext &lt;?INDEX {\tt ErrorLog} directive&gt; -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong> ErrorLog <em>filename</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Default:</strong> <code>ErrorLog logs/error_log</code><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
97b11eedff9d2e17101ad453caf9e48b73246719David HerrmannThe error log directive sets the name of the file to which the server will log
97b11eedff9d2e17101ad453caf9e48b73246719David Herrmannany errors it encounters. If the filename does not begin with a slash (/)
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringthen it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringExample:
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<blockquote><code>ErrorLog /dev/null</code></blockquote>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis effectively turns off error logging.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringSECURITY: See the <A HREF="/misc/security_tips.html">security tips</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdocument for details on why your security could be compromised if
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe directory where logfiles are stored is writable by anyone other
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthan the user that starts the server.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="files">&lt;Files&gt; directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> &lt;Files <em>filename</em>&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... &lt;/Files&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host, htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.2 and above.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The &lt;Files&gt; directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfilename. It is comparable to the <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory">&lt;Directory&gt;</a> directive and
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="#location">&lt;Location&gt;</a> directives. It
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringshould be matched with a &lt;/Files&gt; directive. Directives that
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringapply to the filename given should be listed
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwithin. <code>&lt;Files&gt;</code> sections are processed in the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringorder they appear in the configuration file, after the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory&gt; sections and <code>.htaccess</code> files are
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringread, but before &lt;Location&gt; sections.</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The <em>filename</em> argument should include a filename, or a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwild-card string, where `?' matches any single character, and `*' matches any
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsequences of characters. Extended regular expressions can also be used,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringwith the addition of
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe <code>~</code> character. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering &lt;Files ~ &quot;\.(gif|jpe?g|png)$&quot;&gt;
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering</pre>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwould match most common Internet graphics formats. In Apache 1.3 and
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringlater, <a href="#filesmatch">&lt;FilesMatch&gt;</a> is perferred,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhowever.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>Note that unlike <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory"><code>&lt;Directory&gt;</code></a> and <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#location"><code>&lt;Location&gt;</code></a> sections,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<code>&lt;Files&gt;</code> sections can be used inside .htaccess
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfiles. This allows users to control access to their own files, at a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfile-by-file level. When used in an .htaccess file, if the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<em>filename</em> does not begin with a <code>/</code> character,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe directory being applied will be prefixed automatically.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p> <hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="filesmatch">&lt;FilesMatch&gt;</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> &lt;FilesMatch <em>regex</em>&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... &lt;/Files&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host, htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.3 and above.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The &lt;FilesMatch&gt; directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfilename, just as the <a href="#files">&lt;Files&gt;</a> directive
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdoes. However, it accepts a regular expression. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;FilesMatch &quot;\.(gif|jpe?g|png)$&quot;&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p>would match most common Internet graphics formats.</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<hr>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="group">Group directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Group} directive&gt; -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong> Group <em>unix-group</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Default:</strong> <code>Group #-1</code><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe Group directive sets the group under which the server will answer requests.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIn order to use this directive, the stand-alone server must be run initially
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringas root. <em>Unix-group</em> is one of:
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<dl>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt>A group name
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>Refers to the given group by name.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dt># followed by a group number.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<dd>Refers to a group by its number.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</dl>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIt is recommended that you set up a new group specifically for running the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringserver. Some admins use user <code>nobody</code>, but this is not always
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringpossible or desirable.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringNote: if you start the server as a non-root user, it will fail to change
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringto the specified group, and will instead continue to run as the group of the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringoriginal user. <p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringSpecial note: Use of this directive in &lt;VirtualHost&gt; requires a
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringproperly configured <A HREF="/suexec.html">suEXEC wrapper</A>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringWhen used inside a &lt;VirtualHost&gt; in this manner, only the group
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringthat CGIs are run as is affected. Non-CGI requests are still processed
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringas the group specified in the main Group directive.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringSECURITY: See <A HREF="#user">User</A> for a discussion of the security
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringconsiderations.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="hostnamelookups">HostNameLookups directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt HostNameLookups} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> HostNameLookups <em>boolean</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>HostNameLookups on</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive enables DNS lookups so that host names can be logged.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringHaving this directive set <code>on</code> also enables the use of names
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringin &lt;Limit&gt; blocks for access control.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringHeavily loaded sites should set this directive <code>off</code>, since DNS
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringlookups can take considerable amounts of time. The utility <i>logresolve</i>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringprovided in the <i>/support</i> directory, can be used to look up host names
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfrom logged IP addresses offline.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="identitycheck">IdentityCheck directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext &lt;?INDEX {\tt IdentityCheck} directive&gt; -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> IdentityCheck <em>boolean</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>IdentityCheck off</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis directive enables RFC1413-compliant logging of the remote user name
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfor each connection, where the client machine runs identd or something similar.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis information is logged in the access log. <em>Boolean</em> is either
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<code>on</code> or <code>off</code>.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe information should not be trusted in any way except for rudimentary usage
97b11eedff9d2e17101ad453caf9e48b73246719David Herrmanntracking.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringNote that this can cause serious latency problems accessing your server
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringsince every request requires one of these lookups to be performed. When
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringfirewalls are involved each lookup might possibly fail and add 30 seconds
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringof latency to each hit. So in general this is not very useful on public
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringservers accessible from the Internet.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<H2><A NAME="ifmodule">&lt;IfModule&gt; directive</A></H2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<b>Syntax:</b> &lt;IfModule [!]<i>module-name</i>&gt; <i>...</i>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;/IfModule&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<b>Default:</b> None<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<b>Context:</b> all<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<b>Status:</b> Core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> IfModule is only available in 1.2 and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringlater.<P>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe &lt;IfModule <i>test</i>&gt;...&lt;/IfModule&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsection is used to mark directives that are conditional. The
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirectives within an IfModule section are only
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringprocessed if the <i>test</i> is true. If <i>test</i>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringis false, everything between the start and end markers
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringis ignored.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThe <i>test</i> in the &lt;IfModule&gt; section directive
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringcan be one of two forms:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<ul>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><i>module name</i>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li>!<i>module name</i>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</ul>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>In the former case, the directives between the start and end markers
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringare only processed if the module named <i>module name</i> is compiled
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringin to Apache. The second format reverses the test, and only processes
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe directives if <i>module name</i> is <b>not</b> compiled in.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The <i>module name</i> argument is a module name as given as the file
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringname of the module, at the time it was compiled. For example,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<code>mod_rewrite.c</code>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>&lt;IfModule&gt; sections are nest-able, which can be used to implement
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsimple multiple-module tests.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<P> <hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><a name="keepalive">KeepAlive directive</a></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax: (Apache 1.1)</strong> KeepAlive <em>max-requests</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default: (Apache 1.1)</strong> <code>KeepAlive 5</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax: (Apache 1.2)</strong> KeepAlive <em>on/off</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default: (Apache 1.2)</strong> <code>KeepAlive On</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> Core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> KeepAlive is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive enables
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/keepalive.html">Keep-Alive</a>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsupport.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p><strong>Apache 1.1</strong>: Set <em>max-requests</em>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringto the maximum number of requests you want Apache to entertain per
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringrequest. A limit is imposed to prevent a client from hogging your
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringserver resources. Set this to <code>0</code> to disable support.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p><strong>Apache 1.2 and later</strong>: Set to "On" to enable
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringpersistent connections, "Off" to disable. See also the <a
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringhref="#maxkeepaliverequests">MaxKeepAliveRequests</a> directive.</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><a name="keepalivetimeout">KeepAliveTimeout directive</a></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> KeepAliveTimeout <em>seconds</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>KeepAliveTimeout 15</code><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> Core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> KeepAliveTimeout is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe number of seconds Apache will wait for a subsequent request before
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringclosing the connection. Once a request has been received, the timeout
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringvalue specified by the <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#timeout"><code>Timeout</code></a> directive
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringapplies.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<hr>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="listen">Listen directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringListen [<em>IP address</em>:]<em>port number</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Listen is only available in Apache
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The Listen directive instructs Apache to listen to more than one IP
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringaddress or port; by default it responds to requests on all IP
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringinterfaces, but only on the port given by the <a href="#port">Port</a>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdirective.</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><strong>See Also:</strong>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/dns-caveats.html">DNS Issues</a><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>See Also:</strong>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="/bind.html">Setting which addresses and ports Apache uses</a><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>See Also:</strong>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="/misc/known_bugs.html#listenbug">Known Bugs</a></p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<hr>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<H2><A NAME="listenbacklog">ListenBacklog directive</A></H2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong> ListenBacklog <em>backlog</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>ListenBacklog 511</code><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> Core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> ListenBacklog is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringversions after 1.2.0.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe maximum length of the queue of pending connections. Generally no
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringtuning is needed or desired, however on some systems it is desirable
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringto increase this when under a TCP SYN flood attack. See
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe backlog parameter to the <code>listen(2)</code> system call.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="limit">&lt;Limit&gt; directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext &lt;?INDEX {\tt Limit} section directive&gt; -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering &lt;Limit <em>method method</em> ... &gt; ... &lt;/Limit&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> any<br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Status:</strong> core<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Limit&gt; and &lt;/Limit&gt; are used to enclose a group of
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringaccess control directives which will then apply only to the specified
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringaccess methods, where <em>method</em> is any valid HTTP method.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAny directive except another &lt;Limit&gt; or
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#directory">&lt;Directory&gt;</A> may be used; the majority will be
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringunaffected by the &lt;Limit&gt;. Example:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<blockquote><code>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Limit GET POST&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringrequire valid-user<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;/Limit&gt;</code></blockquote>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIf an access control directive appears outside a &lt;Limit&gt; directive,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthen it applies to all access methods.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><a name="location">&lt;Location&gt; directive</a></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> &lt;Location <em>URL</em>&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... &lt;/Location&gt;<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Status:</strong> core<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Location is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The &lt;Location&gt; directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringURL. It is comparable to the <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory">&lt;Directory&gt;</a> directive, and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringshould be matched with a &lt;/Location&gt; directive. Directives that
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringapply to the URL given should be listed
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwithin. <code>&lt;Location&gt;</code> sections are processed in the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringorder they appear in the configuration file, after the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering&lt;Directory&gt; sections and <code>.htaccess</code> files are
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringread.</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>Note that, due to the way HTTP functions, <em>URL prefix</em>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringshould, save for proxy requests, be of the form <code>/path/</code>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringand should not include the <code>http://servername</code>. It doesn't
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringnecessarily have to protect a directory (it can be an individual
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfile, or a number of files), and can include wild-cards. In a wild-card
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringstring, `?' matches any single character, and `*' matches any
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsequences of characters.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p><strong>Apache 1.2 and above:</strong>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringExtended regular expressions can also be used, with the addition of
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthe
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<code>~</code> character. For example:</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<pre>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering &lt;Location ~ &quot;/(extra|special)/data&quot;&gt;
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</pre>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p>would match URLs that contained the substring "/extra/data" or
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering"/special/data". However, in Apache 1.3 and above, use of <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#locationmatch">&lt;LocationMatch&gt;</a> is perferred.</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p>The <code>Location</code> functionality is especially useful when
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringcombined with the <code><a
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringhref="mod_mime.html#sethandler">SetHandler</a></code> directive. For example, to enable status requests, but allow them only
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringfrom browsers at foo.com, you might use:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering
<pre>
&lt;Location /status&gt;
SetHandler server-status
order deny,allow
deny from all
allow from .foo.com
&lt;/Location&gt;
</pre>
<hr>
<h2><a name="locationmatch">&lt;LocationMatch&gt;</a></h2>
<strong>Syntax:</strong> &lt;LocationMatch <em>regex</em>&gt;
... &lt;/LocationMatch&gt;<br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> Location is only available in Apache
1.3 and later.<p>
<p>The &lt;LocationMatch&gt; directive provides for access control by
URL, in an identical manner to <a
href="#location">&lt;Location&gt;</a>. However, it takes a regular
expression as an argument instead of a simple string. For example:</p>
<pre>
&lt;LocationMatch &quot;/(extra|special)/data&quot;&gt;
</pre>
<p>would match URLs that contained the substring "/extra/data" or
"/special/data".</p>
<hr>
<H2><A NAME="lockfile">LockFile directive</A></H2>
<strong>Syntax:</strong> LockFile <em>filename</em><BR>
<strong>Default:</strong> <code>LockFile logs/accept.lock</code><BR>
<strong>Context:</strong> server config<BR>
<strong>Status:</strong> core<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 the lockfile
should be stored on a local disk if possible. The PID of the main
server process is automatically appended to the filename.
<P><HR>
<h2><A name="maxclients">MaxClients directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt MaxClients} directive&gt; -->
<strong>Syntax:</strong> MaxClients <em>number</em><br>
<strong>Default:</strong> <code>MaxClients 256</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The MaxClients directive sets the limit on the number of simultaneous
requests that can be supported; not more than this number of child server
processes will be created.<p><hr>
<h2><A name="maxkeepaliverequests">MaxKeepAliveRequests directive</A></h2>
<strong>Syntax:</strong> MaxKeepAliveRequests <em>number</em><br>
<strong>Default:</strong> <code>MaxKeepAliveRequests 100</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> Only available in Apache
1.2 and later.
<p>The MaxKeepAliveRequests directive limits the number of requests
allowed per connection when <a href="#keepalive">KeepAlive</a> is
on. If it is set to "<code>0</code>", unlimited requests will be
allowed. We recommend that this setting be kept to a high value for
maximum server performance.
<h2><A name="maxrequestsperchild">MaxRequestsPerChild directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt MaxRequestsPerChild} directive&gt; -->
<strong>Syntax:</strong> MaxRequestsPerChild <em>number</em><br>
<strong>Default:</strong> <code>MaxRequestsPerChild 0</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<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:
<ul>
<li>it limits the amount of memory that process can consume by (accidental)
memory leakage;
<li> by giving processes a finite lifetime, it helps reduce the
number of processes when the server load reduces.
</ul><p><hr>
<h2><A name="maxspareservers">MaxSpareServers directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt MaxSpareServers} directive&gt; -->
<strong>Syntax:</strong> MaxSpareServers <em>number</em><br>
<strong>Default:</strong> <code>MaxSpareServers 10</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The MaxSpareServers directive sets the desired maximum number of <em>idle</em>
child server processes. An idle process is one which is not handling
a request. If there are more than MaxSpareServers idle, then the parent
process will kill off the excess processes.<p>
Tuning of this parameter should only be necessary on very busy sites.
Setting this parameter to a large number is almost always a bad idea.<p>
See also <A HREF="#minspareservers">MinSpareServers</A> and
<A HREF="#startservers">StartServers</A>.<p><hr>
<h2><A name="minspareservers">MinSpareServers directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt MinSpareServers} directive&gt; -->
<strong>Syntax:</strong> MinSpareServers <em>number</em><br>
<strong>Default:</strong> <code>MinSpareServers 5</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The MinSpareServers directive sets the desired minimum number of <em>idle</em>
child server processes. An idle process is one which is not handling
a request. If there are fewer than MinSpareServers idle, then the parent
process creates new children at a maximum rate of 1 per second.<p>
Tuning of this parameter should only be necessary on very busy sites.
Setting this parameter to a large number is almost always a bad idea.<p>
See also <A HREF="#maxspareservers">MaxSpareServers</A> and
<A HREF="#startservers">StartServers</A>.<p><hr>
<h2><A name="options">Options directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt Options} directive&gt; -->
<strong>Syntax:</strong> Options <em>[+|-]option [+|-]option ...</em><br>
<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
<strong>Override:</strong> Options<br>
<strong>Status:</strong> core<p>
The Options directive controls which server features are available in
a particular directory.
<p>
<em>option</em> can be set to <code>None</code>, in which case none of
the extra features are enabled, or one or more of the following:
<dl>
<dt>All
<dd>All options except for MultiViews.
<dt>ExecCGI
<dd>
<!--%plaintext &lt;?INDEX {\tt ExecCGI} option&gt; -->
Execution of CGI scripts is permitted.
<dt>FollowSymLinks
<dd>
<!--%plaintext &lt;?INDEX {\tt FollowSymLinks} option&gt; -->
The server will follow symbolic links in this directory.
<b>Note</b>: even though the server follows the symlink it does <i>not</i>
change the pathname used to match against <code>&lt;Directory&gt;</code>
sections.
<dt>Includes
<dd>
<!--%plaintext &lt;?INDEX {\tt Includes} option&gt; -->
Server-side includes are permitted.
<dt>IncludesNOEXEC
<dd>
<!--%plaintext &lt;?INDEX {\tt IncludesNOEXEC} option&gt; -->
Server-side includes are permitted, but the #exec command and
#include of CGI scripts are disabled.
<dt>Indexes
<dd>
<!--%plaintext &lt;?INDEX {\tt Indexes} option&gt; -->
If a URL which maps to a directory is requested, and the there is no
DirectoryIndex (e.g. index.html) in that directory, then the server will
return a formatted listing of the directory.
<dt>MultiViews
<dd>
<!--%plaintext &lt;?INDEX {\tt MultiViews} option&gt; -->
<A HREF="/content-negotiation.html">Content negotiated</A> MultiViews are
allowed.
<dt>SymLinksIfOwnerMatch
<dd>
<!--%plaintext &lt;?INDEX {\tt SymLinksIfOwnerMatch} option&gt; -->
The server will only follow symbolic links for which the target
file or directory is owned by the same user id as the link.
</dl>
Normally, if multiple <code>Options</code> could apply to a directory,
then the most specific one is taken complete; the options are not
merged. However if <i>all</i> the options on the <code>Options</code>
directive are preceded by a + or - symbol, the options are
merged. Any options preceded by a + are added to the options
currently in force, and any options preceded by a - are removed from
the options currently in force. <P>
For example, without any + and - symbols:
<blockquote><code>
&lt;Directory /web/docs&gt; <br>
Options Indexes FollowSymLinks<br>
&lt;/Directory&gt;<br>
&lt;Directory /web/docs/spec&gt; <br>
Options Includes<br>
&lt;/Directory&gt;
</code></blockquote>
then only <code>Includes</code> will be set for the /web/docs/spec
directory. However if the second <code>Options</code> directive uses the +
and - symbols:<p>
<blockquote><code>
&lt;Directory /web/docs&gt; <br>
Options Indexes FollowSymLinks<br>
&lt;/Directory&gt;<br>
&lt;Directory /web/docs/spec&gt; <br>
Options +Includes -Indexes<br>
&lt;/Directory&gt;
</code></blockquote>
then the options <code>FollowSymLinks</code> and <code>Includes</code>
are set for the /web/docs/spec directory.
<hr>
<h2><A name="pidfile">PidFile directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt PidFile} directive&gt; -->
<strong>Syntax:</strong> PidFile <em>filename</em><br>
<strong>Default:</strong> <code>PidFile logs/httpd.pid</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<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 <A HREF="#serverroot">ServerRoot</A>.
The PidFile is only used in <A HREF="#servertype">standalone</A> mode.<p>
It is often useful to be able to send the server a signal, so that it closes
and then reopens its <A HREF="#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>
The PidFile is subject to the same warnings about log file placement and
<a href="/misc/security_tips.html">security</a>.
<p><hr>
<h2><A name="port">Port directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt Port} directive&gt; -->
<strong>Syntax:</strong> Port <em>number</em><br>
<strong>Default:</strong> <code>Port 80</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
<em>Number</em> is a number from 0 to 65535; some port numbers (especially below
1024) are reserved for particular protocols. See <code>/etc/services</code>
for a list of some defined ports; the standard port for the http protocol
is 80.<p>
The Port directive has two behaviors, the first of which is necessary for
NCSA backwards compatibility (and which is confusing in the context of
Apache).<p>
<ul>
<li>
In the absence of any <a href="#listen">Listen</a> or
<a href="#bindaddress">BindAddress</a> directives specifying a port number,
the Port directive sets the network port on which the server listens.
If there are any Listen or BindAddress directives specifying
<code>:number</code> then Port has no effect on what address the server
listens at.
<li>The Port directive
sets the <code>SERVER_PORT</code> environment variable (for
<a href="mod_cgi.html">CGI</a> and <a href="mod_include.html">SSI</a>),
and is used when the server must generate a URL that refers to itself
(for example when creating an external redirect to itself).
</ul>
In no event does a Port setting affect
what ports a <a href="#virtualhost">VirtualHost</a> responds on, the
VirtualHost directive itself is used for that.<p>
The primary behaviour of Port should be considered to be similar to that of
the <a href="#servername">ServerName</a> directive. The ServerName
and Port together specify what you consider to be the <i>canonical</i>
address of the server.<p>
Port 80 is one of Unix's special ports. All ports numbered
below 1024 are reserved for system use, i.e. regular (non-root) users cannot
make use of them; instead they can only use higher port numbers.
To use port 80, you must start the server from the root account.
After binding to the port and before accepting requests, Apache will change
to a low privileged user as set by the <A HREF="#user">User directive</A>.<p>
If you cannot use port 80, choose any other unused port. Non-root users
will have to choose a port number higher than 1023, such as 8000.<p>
SECURITY: if you do start the server as root, be sure
not to set <A HREF="#user">User</A> to root. If you run the server as
root whilst handling connections, your site may be open to a major security
attack.<p><hr>
<h2><A name="require">require directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt require} directive&gt; -->
<strong>Syntax:</strong> require <em>entity-name entity entity...</em><br>
<strong>Context:</strong> directory, .htaccess<br>
<strong>Override:</strong> AuthConfig<br>
<strong>Status:</strong> core<p>
This directive selects which authenticated users can access a directory.
The allowed syntaxes are:
<ul>
<li>require user <em>userid userid ...</em><p>
Only the named users can access the directory.<p>
<li>require group <em>group-name group-name ...</em><p>
Only users in the named groups can access the directory.<p>
<li>require valid-user<p>
All valid users can access the directory.
</ul>
<p>
If <code>require</code> appears in a <A HREF="#limit">&lt;Limit&gt;</A>
section, then it restricts access to the named methods, otherwise
it restricts access for all methods. Example:
<blockquote><code>
AuthType Basic<br>
AuthName somedomain<br>
AuthUserFile /web/users<br>
AuthGroupFile /web/groups<br>
&lt;Limit GET POST&gt;<br>
require group admin<br>
&lt;/Limit&gt;
</code></blockquote>
Require must be accompanied by <A HREF="#authname">AuthName</A> and
<A HREF="#authtype">AuthType</A> directives, and directives such as
<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> (to define users and
groups) in order to work correctly.<p><hr>
<h2><A name="resourceconfig">ResourceConfig directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ResourceConfig} directive&gt; -->
<strong>Syntax:</strong> ResourceConfig <em>filename</em><br>
<strong>Default:</strong> <code>ResourceConfig conf/srm.conf</code><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<p>
The server will read this file for more directives after reading the
httpd.conf file. <em>Filename</em> is relative to the
<A HREF="#serverroot">ServerRoot</A>.
This feature can be disabled using:
<blockquote><code>ResourceConfig /dev/null</code></blockquote>
Historically, this file contained most directives except for server
configuration directives and <A HREF="#directory">&lt;Directory&gt;</A>
sections; in fact it can now contain any server directive allowed in the
<em>server config</em> context.<p>
See also <A HREF="#accessconfig">AccessConfig</A>.<p><hr>
<H2><A name="rlimit">RLimitCPU</A> <A NAME="rlimitcpu">directive</A></H2>
<!--%plaintext &lt;?INDEX {\tt RLimitCPU} directive&gt; -->
<strong>Syntax:</strong> RLimitCPU <em># or 'max'</em> <em>[# or 'max']</em><br>
<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> RLimitCPU is only available in Apache 1.2 and later<p>
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all
processes and the second parameter sets the maximum resource limit. Either parameter
can be a number, or <em>max</em> to indicate to the server that the limit should
be set to the maximum allowed by the operating system configuration. Raising the
maximum resource limit requires that the server is running as root, or in the initial
startup phase.<p>
CPU resource limits are expressed in seconds per process.<p>
See also <A HREF="#rlimitmem">RLimitMEM</A> or <A HREF="#rlimitnproc">RLimitNPROC</A>.<p><hr>
<h2><A name="rlimitmem">RLimitMEM directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt RLimitMEM} directive&gt; -->
<strong>Syntax:</strong> RLimitMEM <em># or 'max'</em> <em>[# or 'max']</em><br>
<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> RLimitMEM is only available in Apache 1.2 and later<p>
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all
processes and the second parameter sets the maximum resource limit. Either parameter
can be a number, or <em>max</em> to indicate to the server that the limit should
be set to the maximum allowed by the operating system configuration. Raising the
maximum resource limit requires that the server is running as root, or in the initial
startup phase.<p>
Memory resource limits are expressed in bytes per process.<p>
See also <A HREF="#rlimitcpu">RLimitCPU</A> or <A HREF="#rlimitnproc">RLimitNPROC</A>.<p><hr>
<h2><A name="rlimitnproc">RLimitNPROC directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt RLimitNPROC} directive&gt; -->
<strong>Syntax:</strong> RLimitNPROC <em># or 'max'</em> <em>[# or 'max']</em><br>
<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> RLimitNPROC is only available in Apache 1.2 and later<p>
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all
processes and the second parameter sets the maximum resource limit. Either parameter
can be a number, or <em>max</em> to indicate to the server that the limit should
be set to the maximum allowed by the operating system configuration. Raising the
maximum resource limit requires that the server is running as root, or in the initial
startup phase.<p>
Process limits control the number of processes per user.<p>
Note: If CGI processes are <b>not</b> running under userids other than the
web server userid, this directive will limit the number of processes that the
server itself can create. Evidence of this situation will be indicated by
<b><em>cannot fork</em></b> messages in the error_log.<p>
See also <A HREF="#rlimitmem">RLimitMEM</A> or <A HREF="#rlimitcpu">RLimitCPU</A>.
<p><hr>
<h2><A name="satisfy">Satisfy directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt Satisfy} directive&gt; -->
<strong>Syntax:</strong> Satisfy <em>'any' or 'all'</em><br>
<strong>Default:</strong> Satisfy all<br>
<strong>Context:</strong> directory, .htaccess<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> Satisfy is only available in Apache 1.2 and later<p>
Access policy if both allow and require used. The parameter can be
either <em>'all'</em> or <em>'any'</em>. This directive is only useful
if access to a particular area is being restricted by both
username/password <i>and</i> client host address. In this case the
default behavior ("all") is to require that the client passes the
address access restriction <i>and</i> enters a valid username and
password. With the "any" option the client will be granted access if
they either pass the host restriction or enter a valid username and
password. This can be used to password restrict an area, but to let
clients from particular addresses in without prompting for a password.
<p><hr>
<h2><A name="scoreboardfile">ScoreBoardFile directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ScoreBoardFile} directive&gt; -->
<strong>Syntax:</strong> ScoreBoardFile <em>filename</em><br>
<strong>Default:</strong> <code>ScoreBoardFile logs/apache_status</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<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
of Apache.<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
<a href="/misc/security_tips.html">security</a>.<p>
Apache 1.2 and above:<p>
Linux 1.x users might be able to add <code>-DHAVE_SHMGET</code> to
the <code>EXTRA_CFLAGS</code> in your <code>Configuration</code>. This
might work with some 1.x installations, but won't work with all of
them.<p>
SVR4 users should consider adding <code>-DHAVE_SHMGET</code> to the
<code>EXTRA_CFLAGS</code> in your <code>Configuration</code>. This
is believed to work, but we were unable to test it in time for 1.2
release.<p>
<strong>See Also</strong>:
<a href="/stopping.html">Stopping and Restarting Apache</a></p>
<p><hr>
<h2><A name="sendbuffersize">SendBufferSize directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt SendBufferSize} directive&gt; -->
<strong>Syntax:</strong> SendBufferSize <em>bytes</em><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<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 (i.e. 100ms or so, such as transcontinental
fast pipes)
<p><hr>
<h2><A name="serveradmin">ServerAdmin directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ServerAdmin} directive&gt; -->
<strong>Syntax:</strong> ServerAdmin <em>email-address</em><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<p>
The ServerAdmin sets the e-mail address that the server includes in any
error messages it returns to the client.<p>
It may be worth setting up a dedicated address for this, e.g.
<blockquote><code>ServerAdmin www-admin@foo.bar.com</code></blockquote>
as users do not always mention that they are talking about the server!<p><hr>
<h2><A name="serveralias">ServerAlias directive</A></h2>
<strong>Syntax:</strong> ServerAlias <em>host1 host2 ...</em><br>
<strong>Context:</strong> virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> ServerAlias is only available in Apache
1.1 and later.<p>
The ServerAlias directive sets the alternate names for a host, for use
with
<a href="/host.html">Host-header based virtual hosts</a>.
<p><strong>See Also</strong>:
<a href="/vhosts-in-depth.html">In-depth description of Virtual Host matching</a></p>
<hr>
<h2><A name="servername">ServerName directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ServerName} directive&gt; -->
<strong>Syntax:</strong> ServerName <em>fully-qualified domain name</em><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<p>
The ServerName directive sets the hostname of the server; this is only
used when creating redirection URLs. If it is not specified, then the
server attempts to deduce it from its own IP address; however this may
not work reliably, or may not return the preferred hostname. For example:
<blockquote><code>ServerName www.wibble.com</code></blockquote>
would be used if the canonical (main) name of the actual machine
were <code>monster.wibble.com</code>.<p>
<p><strong>See Also</strong>:
<a href="/dns-caveats.html">DNS Issues</a></p>
<hr>
<h2><A name="serverpath">ServerPath directive</A></h2>
<strong>Syntax:</strong> ServerPath <em>pathname</em><br>
<strong>Context:</strong> virtual host<br>
<strong>Status:</strong> core<br>
<strong>Compatibility:</strong> ServerPath is only available in Apache
1.1 and later.<p>
The ServerPath directive sets the legacy URL pathname for a host, for
use with <a href="/host.html">Host-header based virtual hosts</a>.
<p><strong>See Also</strong>:
<a href="/vhosts-in-depth.html">In-depth description of Virtual Host matching</a></p>
<hr>
<h2><A name="serverroot">ServerRoot directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ServerRoot} directive&gt; -->
<strong>Syntax:</strong> ServerRoot <em>directory-filename</em><br>
<strong>Default:</strong> <code>ServerRoot /usr/local/etc/httpd</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The ServerRoot directive sets the directory in which the server lives.
Typically it will contain the subdirectories <code>conf/</code> and
<code>logs/</code>. Relative paths for other configuration files are taken
as relative to this directory.<br>
See also <a href="/invoking.html">the <code>-d</code> option to httpd</a>.<p><hr>
<h2><A name="servertype">ServerType directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt ServerType} directive&gt; -->
<strong>Syntax:</strong> ServerType <em>type</em><br>
<strong>Default:</strong> <code>ServerType standalone</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The ServerType directive sets how the server is executed by the system.
<em>Type</em> is one of
<dl>
<dt>inetd
<dd>The server will be run from the system process inetd; the command to start
the server is added to <code>/etc/inetd.conf</code>
<dt>standalone
<dd>The server will run as a daemon process; the command to start the server
is added to the system startup scripts. (<code>/etc/rc.local</code> or
<code>/etc/rc3.d/...</code>.)
</dl>
Inetd is the lesser used of the two options. For each http
connection received, a new copy of the server is started from scratch;
after the connection is complete, this program exits. There is a high price to
pay per connection, but for security reasons, some admins prefer this option.
<p>
Standalone is the most common setting for ServerType since
it is far more efficient. The server is started once, and services all
subsequent connections. If you intend running Apache to serve a busy site,
standalone will probably be your only option.<p>
SECURITY: if you are paranoid about security, run in inetd mode. Security
cannot be guaranteed in either, but whilst most people are happy to use
standalone, inetd is probably least prone to attack.<p><hr>
<h2><A name="startservers">StartServers directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt StartServers} directive&gt; -->
<strong>Syntax:</strong> StartServers <em>number</em><br>
<strong>Default:</strong> <code>StartServers 5</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<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>When running with Microsoft Windows, this directive sets the total
number of child processes running. Since the Windows version of Apache
is multithreaded, one processes handles all the requests. The rest are
held in reserve until the main processes dies.
See also <A HREF="#minspareservers">MinSpareServers</A> and
<A HREF="#maxspareservers">MaxSpareServers</A>.<p><hr>
<h2><A name="threadsperchild">ThreadsPerChild</A></h2>
<strong>Syntax:</strong> ThreadsPerChild <em>number</em><br>
<strong>Default:</strong> <code>ThreadsPerChild 50</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core (Windows)<br>
<strong>Compatbility:</strong> Available only with Apache 1.3 and later
with Windows
<p>This directive tells the server how many threads it should use. This
is the maximum number of connections the server can handle at once; be
sure and set this number high enough for your site if you get a lot of
hits.
<p>See also <A HREF="#startservers">StartServers</A> and <A
HREF="#maxrequestsperchild">MaxRequestsPerChild</A>.</p>
<hr>
<h2><A name="timeout">TimeOut directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt TimeOut} directive&gt; -->
<strong>Syntax:</strong> TimeOut <em>number</em><br>
<strong>Default:</strong> <code>TimeOut 300</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> core<p>
The TimeOut directive currently defines the amount of time Apache will
wait for three things:
<OL>
<LI>The total amount of time it takes to receive a GET request.
<LI>The amount of time between receipt of TCP packets on a POST or
PUT request.
<LI>The amount of time between ACKs on transmissions of TCP packets
in responses.
</OL>
We plan on making these separately configurable at some point down the
road. The timer used to default to 1200 before 1.2, but has been
lowered to 300 which is still far more than necessary in most
situations. It is not set any lower by default because there may
still be odd places in the code where the timer is not reset when
a packet is sent.
<p><hr>
<h2><A name="user">User directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt User} directive&gt; -->
<strong>Syntax:</strong> User <em>unix-userid</em><br>
<strong>Default:</strong> <code>User #-1</code><br>
<strong>Context:</strong> server config, virtual host<br>
<strong>Status:</strong> core<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:
<dl>
<dt>A username
<dd>Refers to the given user by name.
<dt># followed by a user number.
<dd>Refers to a user by their number.
</dl>
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.<p>
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 &lt;VirtualHost&gt; requires a
properly configured <A HREF="/suexec.html">suEXEC wrapper</A>.
When used inside a &lt;VirtualHost&gt; 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
dangers are.<p><hr>
<h2><A name="virtualhost">&lt;VirtualHost&gt; directive</A></h2>
<!--%plaintext &lt;?INDEX {\tt VirtualHost} section directive&gt; -->
<strong>Syntax:</strong> &lt;VirtualHost <em>addr</em>[:<em>port</em>] ...&gt; ...
&lt;/VirtualHost&gt; <br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> Core.<br>
<strong>Compatibility:</strong> Non-IP address-based Virtual Hosting only
available in Apache 1.1 and later.<br>
<strong>Compatibility:</strong> Multiple address support only available in
Apache 1.2 and later.<p>
&lt;VirtualHost&gt; and &lt;/VirtualHost&gt; are used to enclose a group of
directives which will apply only to a particular virtual host.
Any directive which is allowed in a virtual host context may be used.
When the server receives a request for a document on a particular virtual
host, it uses the configuration directives enclosed in the &lt;VirtualHost&gt;
section. <em>Addr</em> can be
<menu>
<li>The IP address of the virtual host
<li>A fully qualified domain name for the IP address of the virtual host.
</menu> Example:
<blockquote>
<code>
&lt;VirtualHost 10.1.2.3&gt; <br>
ServerAdmin webmaster@host.foo.com <br>
DocumentRoot /www/docs/host.foo.com <br>
ServerName host.foo.com <br>
ErrorLog logs/host.foo.com-error_log <br>
TransferLog logs/host.foo.com-access_log <br>
&lt;/VirtualHost&gt;
</code></blockquote>
Each VirtualHost must correspond to a different IP address or a
different host name for the server, in the latter case the server
machine must be configured to accept IP packets for multiple
addresses. (If the machine does not have multiple network interfaces,
then this can be accomplished with the <code>ifconfig alias</code>
command (if your OS supports it), or with kernel patches like <A
HREF="/misc/vif-info.html">VIF</A> (for SunOS(TM) 4.1.x)).<p>
The special name <code>_default_</code> can be specified in which case
this virtual host will match any IP address that is not explicitly listed
in another virtual host. In the absence of any _default_ virtual host
the "main" server config, consisting of all those definitions outside
any VirtualHost section, is used when no match occurs.<p>
You can specify a <code>:port</code> to change the port that is matched.
If unspecified then it defaults to the same port as the most recent
<code><a href="#port">Port</a></code> statement of the main server. You
may also specify <code>:*</code> to match all ports on that address.
(This is recommended when used with <code>_default_</code>.)<p>
<strong>SECURITY</strong>: See the
<A HREF="/misc/security_tips.html">security tips</A>
document for details on why your security could be compromised if
the directory where logfiles are stored is writable by anyone other
than the user that starts the server.
<p><strong>See also:</strong>
<A HREF="/dns-caveats.html">Warnings about DNS and Apache</a><br>
<strong>See also:</strong>
<A HREF="/virtual-host.html">Information on Virtual Hosts.
(multihome)</A><br>
<strong>See also:</strong>
<a href="/host.html">Non-IP address-based Virtual Hosts</a><br>
<strong>See also:</strong>
<a href="/vhosts-in-depth.html">In-depth description of Virtual Host matching</a>
</p>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>