core.html revision 61a8652e827e9682430e985d4bf51c991de3e39f
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--#include virtual="header.html" -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThese configuration parameters control the core Apache features, and are
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenalways available.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#accessfilename">AccessFileName</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#clearmodulelist">ClearModuleList</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#hostnamelookups">HostNameLookups</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#keepalivetimeout">KeepAliveTimeout</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#maxkeepaliverequests">MaxKeepAliveRequests</a>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#maxrequestsperchild">MaxRequestsPerChild</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#maxspareservers">MaxSpareServers</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#minspareservers">MinSpareServers</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#resourceconfig">ResourceConfig</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li><A HREF="#virtualhost"><VirtualHost></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="accessconfig"><h2>AccessConfig directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AccessConfig} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AccessConfig <em>filename</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Default:</strong> <code>AccessConfig conf/access.conf</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThe server will read this file for more directives after reading the
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainen<A HREF="#resourceconfig">ResourceConfig</A> file. <em>Filename</em> is
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainenrelative to the <A HREF="#serverroot">ServerRoot</A>.
9644b7914445f0fb1098038218bfcb7d135a8698Timo SirainenThis feature can be disabled using:
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<blockquote><code>AccessConfig /dev/null</code></blockquote>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenHistorically, this file only contained
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#directory"><Directory></A> sections; in fact it can now
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainencontain any server directive allowed in the <em>server config</em> context.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="accessfilename"><h2>AccessFileName directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AccessFileName} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AccessFileName <em>filename</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Default:</strong> <code>AccessFileName .htaccess</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenWhen returning a document to the client the server looks for an
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenaccess control file with this name in every directory of the path to
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthe document, if access control files are enabled for that directory.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<blockquote><code>AccessFileName .acl</code></blockquote>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenbefore returning the document /usr/local/web/index.html, the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenserver will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenfor directives, unless they have been disabled with
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<Directory /><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllowOverride None<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="addmodule"><h2>AddModule directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AddModule} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AddModule <em>module module ...</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Compatibility:</strong> AddModule is only available in Apache 1.2 and later<p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThe server can have modules compiled in which are not actively in use.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis directive can be used to enable the use of those modules. The
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenserver comes with a pre-loaded list of active modules; this list can
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenbe cleared with the <A HREF="#clearmodulelist">ClearModuleList</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="allowoverride"><h2>AllowOverride directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AllowOverride} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AllowOverride <em>override override ...</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Default:</strong> <code>AllowOverride All</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenWhen the server finds an .htaccess file (as specified by
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#accessfilename">AccessFileName</A>) it needs to know which
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainendirectives declared in that file can override earlier access information.<p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<em>Override</em> can be set to <code>None</code>, in which case the server
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwill not read the file, <code>All</code> in which case the server will
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenallow all the directives, or one or more of the following:
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<dt>AuthConfig
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainen<!--%plaintext <?INDEX {\tt AuthConfig} override> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllow use of the authorization directives
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen(<A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#authname">AuthName</A>, <A HREF="#authtype">AuthType</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authuserfile">AuthUserFile</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt FileInfo} override> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllow use of the directives controlling document types
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen(<A HREF="mod_mime.html#addencoding">AddEncoding</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_mime.html#addlanguage">AddLanguage</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A>, etc.).
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt Indexes} override> -->
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo SirainenAllow use of the directives controlling directory indexing
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen(<A HREF="mod_dir.html#adddescription">AddDescription</A>,
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainen<A HREF="mod_dir.html#addiconbyencoding">AddIconByEncoding</A>,
9644b7914445f0fb1098038218bfcb7d135a8698Timo Sirainen<A HREF="mod_dir.html#addiconbytype">AddIconByType</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#defaulticon">DefaultIcon</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#directoryindex">DirectoryIndex</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#fancyindexing">FancyIndexing</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#headername">HeaderName</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#indexignore">IndexIgnore</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#indexoptions">IndexOptions</A>,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_dir.html#readmename">ReadmeName</A>, etc.).
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt Limit} override> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllow use of the directives controlling host access (allow, deny and order).
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt Options} override> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllow use of the directives controlling specific directory features
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_include.html#xbithack">XBitHack</A>).
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="authname"><h2>AuthName directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AuthName} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AuthName <em>auth-domain</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> directory, .htaccess<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis directive sets the name of the authorization realm for a directory.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis realm is given to the client so that the user knows which username and
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenpassword to send.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenIt must be accompanied by <A HREF="#authtype">AuthType</A> and
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#require">require</A> directives, and directives such as
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="authtype"><h2>AuthType directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt AuthType} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> AuthType <em>type</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> directory, .htaccess<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis directive selects the type of user authentication for a directory.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenOnly <code>Basic</code> is currently implemented.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt Basic} authentication scheme> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenIt must be accompanied by <A HREF="#authname">AuthName</A> and
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#require">require</A> directives, and directives such as
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="bindaddress"><h2>BindAddress directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt BindAddress} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> BindAddress <em>saddr</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Default:</strong> <code>BindAddress *</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenA Unix® http server can either listen for connections to every
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenIP address of the server machine, or just one IP address of the server
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li>An IP address
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li>A fully-qualified internet domain name
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenIf the value is *, then the server will listen for connections on
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenevery IP address, otherwise it will only listen on the IP address
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenspecified. <p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis option can be used as an alternative method for supporting
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="/virtual-host.html">virtual hosts</A> instead of using
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#virtualhost"><VirtualHost></A> sections.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<a href="/bind.html">Setting which addresses and ports Apache uses</a></p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="clearmodulelist"><h2>ClearModuleList directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt ClearModuleList} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Compatibility:</strong> ClearModuleList is only available in Apache 1.2 and later<p>
b71e08759c02a49d02cdfb28343351ad28fc10b5Timo SirainenThe server comes with a built-in list of active modules. This
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainendirective clears the list. It is assumed that the list will then be
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenre-populated using the <A HREF="#addmodule">AddModule</A> directive.<p><hr>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="defaulttype"><h2>DefaultType directive</h2></A>
e20e638805c4bd54e039891a3e92760b1dfa189aTimo Sirainen<!--%plaintext <?INDEX {\tt DefaultType} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> DefaultType <em>mime-type</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Default:</strong> <code>DefaultType text/html</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThere will be times when the server is asked to provide a document
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwhose type cannot be determined by its MIME types mappings.<p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThe server must inform the client of the content-type of the document, so in
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthe event of an unknown type it uses the <CODE>DefaultType</CODE>. For
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<blockquote><code>DefaultType image/gif</code></blockquote>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwould be appropriate for a directory which contained many gif images
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwith filenames missing the .gif extension.<p><hr>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="directory"><h2><Directory> directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt Directory} section directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> <Directory <em>directory</em>> ... </Directory> <br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<Directory> and </Directory> are used to enclose a group of
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainendirectives which will apply only to the named directory and sub-directories
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenof that directory. Any directive which is allowed in a directory
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainencontext may be used. <em>Directory</em> is either the full path to a directory,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenor a wild-card string. In a wild-card string, `?' matches any single character,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenand `*' matches any sequences of characters. Example:
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen Options Indexes FollowSymLinks
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen </Directory>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenExtended regular expressions can also be used, with the addition of the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen <Directory ~ "^/www/.*/[0-9]{3}">
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwould match directories in /www/ that consisted of three numbers.<p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<p>If multiple directory sections match the directory (or its parents) containing
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainena document, then the directives are applied in the order of shortest match
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenfirst, interspersed with the directives from the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A HREF="#accessfilename">.htaccess</A> files. For example, with
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<Directory /><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllowOverride None<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<Directory /home/*><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenAllowOverride FileInfo<br>
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainenfor access to the document <code>/home/web/dir/doc.html</code> the
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<li>Apply directive <code>AllowOverride None</code> (disabling
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<li>Apply directive <code>AllowOverride FileInfo</code> (for directory
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<li>Apply any FileInfo directives in <code>/home/web/.htaccess</code>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenNote that the default Apache access for <Directory /> is
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<SAMP>Allow from All</SAMP>. This means that Apache will serve any file
48325adac125d7ff275ec69b05b7a92be9637630Timo Sirainenmapped from an URL. It is recommended that you change this with a block
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen <Directory />
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen Order Deny,Allow
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen Deny from All
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen </Directory>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenand then override this for directories you <EM>want</EM> accessible.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen>Security Tips</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenpage for more details.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThe directory sections typically occur in the access.conf file, but they
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenmay appear in any configuration file. <Directory> directives cannot
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainennest, and cannot appear in a <A HREF="#limit"><Limit></A> section.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A NAME="documentroot"><h2>DocumentRoot directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt DocumentRoot} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> DocumentRoot <em>directory-filename</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host<br>
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo SirainenThis directive sets the directory from which httpd will serve files.
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo SirainenUnless matched by a directive like Alias, the server appends the path
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainenfrom the requested URL to the document root to make the path to the
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainendocument. Example:
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainen<blockquote><code>DocumentRoot /usr/web</code></blockquote>
45b0d8d0b97be14d10e3a3c12c169e4b352b2aacTimo Sirainenthen an access to <code>http://www.my.host.com/index.html</code> refers
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P>There appears to be a bug in mod_dir which causes problems when the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenDocumentRoot has a trailing slash (i.e. "DocumentRoot /usr/web/") so
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenplease avoid that.
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<A name="errordocument"><h2>ErrorDocument directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt ErrorDocument} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> ErrorDocument <em>error-code document</em><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context</strong> server config, virtual host, directory, .htaccess<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Compatibility:</strong> The directory and .htaccess contexts
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenare only available in Apache 1.1 and later.<p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenIn the event of a problem or error, Apache can be configured to do
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenone of four things,
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<LI>output a simple hardcoded error message
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<LI>output a customized message
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<LI>redirect to a local URL to handle the problem/error
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<LI>redirect to an external URL to handle the problem/error
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P>The first option is the default, while options 2-4 are configured
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenusing the <CODE>ErrorDocument</CODE> directive, which is followed by
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthe HTTP response code and a message or URL.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P><em>Messages</em> in this context begin with a single quote
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen(<code>"</code>), which does not form part of the message itself.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenApache will sometimes offer additional information regarding the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P>URLs can begin with a slash (/) for local URLs, or be a full
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenURL which the client can resolve. Examples:
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo SirainenErrorDocument 500 http://foo.example.com/cgi-bin/tester<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenErrorDocument 403 "Sorry can't allow you access today
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P>Note that when you specify an <CODE>ErrorDocument</CODE> that
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainenpoints to a remote URL (ie. anything with a method such as "http" in
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenfront of it) Apache will send a redirect to the client to tell it
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwhere to find the document, even if the document ends up being
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenon the same server.. This has several implications, the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenmost important being that <STRONG>if you use an "ErrorDocument 401"
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainendirective then it must refer to a local document.</STRONG> This results
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenfrom the nature of the HTTP basic authentication scheme.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<P>See Also: <A HREF="/custom-error.html">documentation of customizable
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<A name="errorlog"><h2>ErrorLog directive</h2></A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<!--%plaintext <?INDEX {\tt ErrorLog} directive> -->
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Syntax:</strong> ErrorLog <em>filename</em><br>
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<strong>Default:</strong> <code>ErrorLog logs/error_log</code><br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<strong>Context:</strong> server config, virtual host<br>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThe error log directive sets the name of the file to which the server will log
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenany errors it encounters. If the filename does not begin with a slash (/)
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthen it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>.
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<blockquote><code>ErrorLog /dev/null</code></blockquote>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo SirainenThis effectively turns off error logging.<p>
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo SirainenSECURITY: See the <A HREF="/misc/security_tips.html">security tips</A>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainendocument for details on why your security could be compromised if
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthe directory where logfiles are stored is writable by anyone other
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenthan the user that starts the server.
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen<strong>Syntax:</strong> <Files <em>filename</em>>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen... </Files><br>
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainen<strong>Context:</strong> server config, virtual host, htaccess<br>
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainen<strong>Compatibility:</strong> only available in Apache
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainen1.2 and above.<p>
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainen<p>The <Files> directive provides for access control by
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainenfilename. It is comparable to the <a
ca2f3260811c4ccd0afb774d7e13a5bd64d0cc34Timo Sirainenhref="#directory"><Directory></a> directive and
c734f70a462bb01a1b8b902375b5b3c7f78d9857Timo Sirainen<a href="#location"><Location></a> directives. It
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenshould be matched with a </Files> directive. Directives that
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenapply to the filename given should be listed
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwithin. <code><Files></code> sections are processed in the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenorder they appear in the configuration file, after the
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<Directory> sections and <code>.htaccess</code> files are
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenread, but before <Location> sections.</p>
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainen<p>The <em>filename</em> argument should include a filename, or a
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainenwild-card string, where `?' matches any single character, and `*' matches any
7a896d960824c93e2f04ac21e8eae0f892bf8d20Timo Sirainensequences of characters. Extended regular expressions can also be used, with the addition of
href="mod_mime.html#sethandler">SetHandler</a></code> directive. For example, to enable status requests, but allow them only
from 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
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" -->