core.html revision d2355288f753a1c5d88dc1d1efc86b7533b3b443
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering BGCOLOR="#FFFFFF"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering TEXT="#000000"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering LINK="#0000FF"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering VLINK="#000080"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering ALINK="#FF0000"
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--#include virtual="header.html" -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<H1 ALIGN="CENTER">Apache Core Features</h1>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThese configuration parameters control the core Apache features, and are
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poetteringalways available.
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering<li><A HREF="#accessconfig">AccessConfig</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#accessfilename">AccessFileName</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#allowoverride">AllowOverride</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"><Directory></A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#directorymatch"><DirectoryMatch></A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#documentroot">DocumentRoot</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#errordocument">ErrorDocument</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#filesmatch"><FilesMatch></A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#hostnamelookups">HostNameLookups</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#identitycheck">IdentityCheck</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#ifmodule"><IfModule></A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#keepalivetimeout">KeepAliveTimeout</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#listenbacklog">ListenBacklog</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#location"><Location></A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li><A HREF="#locationmatch"><LocationMatch></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="#resourceconfig">ResourceConfig</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#rlimitnproc">RLimitNPROC</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="#startservers">StartServers</A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#threadsperchild">ThreadsPerChild</a>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li><A HREF="#virtualhost"><VirtualHost></A>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="accessconfig">AccessConfig directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AccessConfig} directive> -->
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 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"><Directory></A> sections; in fact it can now
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringcontain any server directive allowed in the <em>server config</em> context.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="accessfilename">AccessFileName directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AccessFileName} directive> -->
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>Compatibility:</strong> AccessFileName can accept more than one filename only in Apache 1.3 and later<p>
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<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<Directory /><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride None<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</Directory></code></blockquote><p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="addmodule">AddModule directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AddModule} directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AddModule <em>module module ...</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config <br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Compatibility:</strong> AddModule is only available in Apache 1.2 and later<p>
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 Poettering<h2><A name="allowoverride">AllowOverride directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AllowOverride} directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AllowOverride <em>override override ...</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Default:</strong> <code>AllowOverride All</code><br>
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<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<!--%plaintext <?INDEX {\tt AuthConfig} override> -->
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<!--%plaintext <?INDEX {\tt FileInfo} override> -->
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="#errordocument">ErrorDocument</A>,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A>, etc.).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt Indexes} override> -->
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<!--%plaintext <?INDEX {\tt Limit} override> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling host access (allow, deny and order).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt Options} override> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllow use of the directives controlling specific directory features
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="mod_include.html#xbithack">XBitHack</A>).
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="authname">AuthName directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AuthName} directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AuthName <em>auth-domain</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> directory, .htaccess<br>
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<h2><A name="authtype">AuthType directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt AuthType} directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> AuthType <em>type</em><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> directory, .htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive selects the type of user authentication for a directory.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringOnly <code>Basic</code> is currently implemented.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt Basic} authentication scheme> -->
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<h2><A name="bindaddress">BindAddress directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt BindAddress} directive> -->
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 PoetteringA Unix® 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 Poettering<li>An IP address
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<li>A fully-qualified Internet domain name
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 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"><VirtualHost></A> sections.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/dns-caveats.html">DNS Issues</a><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<a href="/bind.html">Setting which addresses and ports Apache uses</a></p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="clearmodulelist">ClearModuleList directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt ClearModuleList} directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> ClearModuleList<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> ClearModuleList is only available in Apache 1.2 and later<p>
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<h2><A name="defaulttype">DefaultType directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt DefaultType} directive> -->
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 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 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 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<h2><A name="directory"><Directory> directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt Directory} section directive> -->
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> <Directory <em>directory</em>> ... </Directory> <br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Directory> and </Directory> 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 <Directory /usr/local/httpd/htdocs>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering Options Indexes FollowSymLinks
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering </Directory>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringExtended regular expressions can also be used, with the addition of the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<code>~</code> character. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering <Directory ~ "^/www/.*/[0-9]{3}">
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"><DirectoryMatch></a> instead.<p>
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
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Directory /><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride None<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Directory /home/*><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringAllowOverride FileInfo<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfor access to the document <code>/home/web/dir/doc.html</code> the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply directive <code>AllowOverride None</code> (disabling
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply directive <code>AllowOverride FileInfo</code> (for directory
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<li>Apply any FileInfo directives in <code>/home/web/.htaccess</code>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringNote that the default Apache access for <Directory /> 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 Poettering <Directory />
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering Order Deny,Allow
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering </Directory>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringand then override this for directories you <EM>want</EM> accessible.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering>Security Tips</A>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringpage for more details.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe directory sections typically occur in the access.conf file, but they
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringmay appear in any configuration file. <Directory> directives cannot
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringnest, and cannot appear in a <A HREF="#limit"><Limit></A> section.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="directorymatch"><DirectoryMatch></A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> <DirectoryMatch <em>regex</em>> ... </DirectoryMatch> <br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Available in Apache 1.3 and later
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p><DirectoryMatch> and </DirectoryMatch> 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"><Directory></a>. However, it takes as an
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringargument a regular expression. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering <DirectoryMatch "^/www/.*/[0-9]{3}">
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>would match directories in /www/ that consisted of three numbers.</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A NAME="documentroot">DocumentRoot directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt DocumentRoot} directive> -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Syntax:</strong> DocumentRoot <em>directory-filename</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Default:</strong> <code>DocumentRoot
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
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
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<h2><A name="errordocument">ErrorDocument directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt ErrorDocument} directive> -->
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>Compatibility:</strong> The directory and .htaccess contexts
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringare only available in Apache 1.1 and later.<p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringIn the event of a problem or error, Apache can be configured to do
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringone of four things,
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<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<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 Poettering<P>URLs can begin with a slash (/) for local URLs, or be a full
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringURL which the client can resolve. Examples:
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<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<P>See Also: <A HREF="/custom-error.html">documentation of customizable
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="errorlog">ErrorLog directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext <?INDEX {\tt ErrorLog} directive> -->
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>
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>.
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<blockquote><code>ErrorLog /dev/null</code></blockquote>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringThis effectively turns off error logging.<p>
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<h2><A name="files"><Files> directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> <Files <em>filename</em>>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... </Files><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host, htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.2 and above.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The <Files> directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfilename. It is comparable to the <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory"><Directory></a> directive and
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="#location"><Location></a> directives. It
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringshould be matched with a </Files> directive. Directives that
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringapply to the filename given should be listed
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwithin. <code><Files></code> sections are processed in the
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringorder they appear in the configuration file, after the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Directory> sections and <code>.htaccess</code> files are
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringread, but before <Location> sections.</p>
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>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering <Files ~ "\.(gif|jpe?g|png)$">
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwould match most common Internet graphics formats. In Apache 1.3 and
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringlater, <a href="#filesmatch"><FilesMatch></a> is perferred,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory"><code><Directory></code></a> and <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#location"><code><Location></code></a> sections,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<code><Files></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<h2><A name="filesmatch"><FilesMatch></A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> <FilesMatch <em>regex</em>>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... </Files><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host, htaccess<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.3 and above.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The <FilesMatch> directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringfilename, just as the <a href="#files"><Files></a> directive
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringdoes. However, it accepts a regular expression. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering <FilesMatch "\.(gif|jpe?g|png)$">
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p>would match most common Internet graphics formats.</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="group">Group directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext <?INDEX {\tt Group} directive> -->
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>
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 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 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 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 PoetteringSpecial note: Use of this directive in <VirtualHost> requires a
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringproperly configured <A HREF="/suexec.html">suEXEC wrapper</A>.
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringWhen used inside a <VirtualHost> 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 PoetteringSECURITY: See <A HREF="#user">User</A> for a discussion of the security
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><A name="hostnamelookups">HostNameLookups directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt HostNameLookups} directive> -->
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 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 <Limit> blocks for access control.<p>
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 Poettering<h2><A name="identitycheck">IdentityCheck directive</A></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<!--%plaintext <?INDEX {\tt IdentityCheck} directive> -->
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>
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
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe information should not be trusted in any way except for rudimentary usage
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<H2><A NAME="ifmodule"><IfModule> directive</A></H2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<b>Syntax:</b> <IfModule [!]<i>module-name</i>> <i>...</i>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering</IfModule><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> IfModule is only available in 1.2 and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThe <IfModule <i>test</i>>...</IfModule>
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 PoetteringThe <i>test</i> in the <IfModule> section directive
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringcan be one of two forms:
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<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<p><IfModule> sections are nest-able, which can be used to implement
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringsimple multiple-module tests.
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>Compatibility:</strong> KeepAlive is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringThis directive enables
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<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<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>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> KeepAliveTimeout is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
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
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<h2><A name="listen">Listen directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart PoetteringListen [<em>IP address</em>:]<em>port number</em><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<strong>Context:</strong> server config<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Listen is only available in Apache
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering1.1 and later.<p>
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 Poettering<a href="/dns-caveats.html">DNS Issues</a><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="/bind.html">Setting which addresses and ports Apache uses</a><br>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<a href="/misc/known_bugs.html#listenbug">Known Bugs</a></p>
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>Compatibility:</strong> ListenBacklog is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringversions after 1.2.0.<p>
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<h2><A name="limit"><Limit> directive</A></h2>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<!--%plaintext <?INDEX {\tt Limit} section directive> -->
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering <Limit <em>method method</em> ... > ... </Limit><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Limit> and </Limit> 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 <Limit> or
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<A HREF="#directory"><Directory></A> may be used; the majority will be
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringunaffected by the <Limit>. Example:
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Limit GET POST><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringrequire valid-user<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringIf an access control directive appears outside a <Limit> directive,
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringthen it applies to all access methods.<p><hr>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<h2><a name="location"><Location> directive</a></h2>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Syntax:</strong> <Location <em>URL</em>>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering... </Location><br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Context:</strong> server config, virtual host<br>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<strong>Compatibility:</strong> Location is only available in Apache
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering1.1 and later.<p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<p>The <Location> directive provides for access control by
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart PoetteringURL. It is comparable to the <a
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringhref="#directory"><Directory></a> directive, and
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringshould be matched with a </Location> directive. Directives that
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringapply to the URL given should be listed
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poetteringwithin. <code><Location></code> sections are processed in the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poetteringorder they appear in the configuration file, after the
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering<Directory> sections and <code>.htaccess</code> files are
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 PoetteringExtended regular expressions can also be used, with the addition of
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<code>~</code> character. For example:</p>
a1ad376761af16da46c9ad90fd8df41c8c5c0976Lennart Poettering <Location ~ "/(extra|special)/data">
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"><LocationMatch></a> is perferred.</p>
0171da06ef8bb19c175c5aa8aff8cf95f3de7dc1Lennart Poettering<p>The <code>Location</code> functionality is especially useful when
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:
allow from .foo.com
below 1024 are reserved for system use, i.e. regular (non-root) users cannot
might work with some 1.x installations, but won't work with all of
speed high latency (i.e. 100ms or so, such as transcontinental
It may be worth setting up a dedicated address for this, e.g.
<!--#include virtual="footer.html" -->