core.html revision e10c7703114de421bfd2772a0265691884bafdb8
1N/A<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
1N/A<HTML>
1N/A<HEAD>
1N/A<TITLE>Apache Core Features</TITLE>
1N/A</HEAD>
1N/A
1N/A<BODY>
1N/A<!--#include virtual="header.html" -->
1N/A
1N/A<H1>Apache Core Features</h1>
1N/A
1N/AThese configuration parameters control the core Apache features, and are
1N/Aalways available.
1N/A
1N/A
1N/A<ul>
1N/A<li><A HREF="#accessconfig">AccessConfig</A>
1N/A<li><A HREF="#accessfilename">AccessFileName</A>
1N/A<li><A HREF="#addmodule">AddModule</A>
1N/A<li><A HREF="#allowoverride">AllowOverride</A>
1N/A<li><A HREF="#authname">AuthName</A>
1N/A<li><A HREF="#authtype">AuthType</A>
1N/A<li><A HREF="#bindaddress">BindAddress</A>
1N/A<li><A HREF="#clearmodulelist">ClearModuleList</A>
1N/A<li><A HREF="#defaulttype">DefaultType</A>
1N/A<li><A HREF="#directory">&lt;Directory&gt;</A>
1N/A<li><A HREF="#documentroot">DocumentRoot</A>
1N/A<li><A HREF="#errordocument">ErrorDocument</A>
1N/A<li><A HREF="#errorlog">ErrorLog</A>
1N/A<li><A HREF="#files">&lt;Files&gt;</A>
1N/A<li><A HREF="#group">Group</A>
1N/A<li><A HREF="#hostnamelookups">HostNameLookups</A>
1N/A<li><A HREF="#identitycheck">IdentityCheck</A>
1N/A<li><A HREF="#ifmodule">&lt;IfModule&gt;</A>
1N/A<li><A HREF="#keepalive">KeepAlive</A>
1N/A<li><A HREF="#keepalivetimeout">KeepAliveTimeout</A>
1N/A<li><A HREF="#limit">&lt;Limit&gt;</A>
1N/A<li><A HREF="#listen">Listen</A>
1N/A<li><A HREF="#location">&lt;Location&gt;</A>
1N/A<li><A HREF="#maxclients">MaxClients</A>
1N/A<li><A HREF="#maxrequestsperchild">MaxRequestsPerChild</A>
1N/A<li><A HREF="#maxspareservers">MaxSpareServers</A>
1N/A<li><A HREF="#minspareservers">MinSpareServers</A>
1N/A<li><A HREF="#options">Options</A>
1N/A<li><A HREF="#pidfile">PidFile</A>
1N/A<li><A HREF="#port">Port</A>
1N/A<li><A HREF="#require">require</A>
1N/A<li><A HREF="#resourceconfig">ResourceConfig</A>
1N/A<li><A HREF="#rlimitcpu">RLimitCPU</A>
1N/A<li><A HREF="#rlimitmem">RLimitMEM</A>
1N/A<li><A HREF="#rlimitnproc">RLimitNPROC</A>
1N/A<li><A HREF="#satisfy">Satisfy</A>
1N/A<li><A HREF="#sendbuffersize">SendBufferSize</A>
1N/A<li><A HREF="#serveradmin">ServerAdmin</A>
1N/A<li><A HREF="#serveralias">ServerAlias</A>
1N/A<li><A HREF="#servername">ServerName</A>
1N/A<li><A HREF="#serverpath">ServerPath</A>
1N/A<li><A HREF="#serverroot">ServerRoot</A>
1N/A<li><A HREF="#servertype">ServerType</A>
1N/A<li><A HREF="#startservers">StartServers</A>
1N/A<li><A HREF="#timeout">TimeOut</A>
1N/A<li><A HREF="#user">User</A>
1N/A<li><A HREF="#virtualhost">&lt;VirtualHost&gt;</A>
1N/A</ul>
1N/A<hr>
1N/A
1N/A<A name="accessconfig"><h2>AccessConfig directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AccessConfig} directive&gt; -->
1N/A<strong>Syntax:</strong> AccessConfig <em>filename</em><br>
1N/A<strong>Default:</strong> <code>AccessConfig conf/access.conf</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe server will read this file for more directives after reading the
1N/A<A HREF="#resourceconfig">ResourceConfig</A> file. <em>Filename</em> is
1N/Arelative to the <A HREF="#serverroot">ServerRoot</A>.
1N/AThis feature can be disabled using:
1N/A<blockquote><code>AccessConfig /dev/null</code></blockquote>
1N/AHistorically, this file only contained
1N/A<A HREF="#directory">&lt;Directory&gt;</A> sections; in fact it can now
1N/Acontain any server directive allowed in the <em>server config</em> context.
1N/A<p><hr>
1N/A
1N/A<A name="accessfilename"><h2>AccessFileName directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AccessFileName} directive&gt; -->
1N/A<strong>Syntax:</strong> AccessFileName <em>filename</em><br>
1N/A<strong>Default:</strong> <code>AccessFileName .htaccess</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AWhen returning a document to the client the server looks for an
1N/Aaccess control file with this name in every directory of the path to
1N/Athe document, if access control files are enabled for that directory.
1N/A
1N/AFor example:
1N/A<blockquote><code>AccessFileName .acl</code></blockquote>
1N/Abefore returning the document /usr/local/web/index.html, the
1N/Aserver will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl
1N/Afor directives, unless they have been disabled with
1N/A<blockquote><code>
1N/A&lt;Directory /&gt;<br>
1N/AAllowOverride None<br>
1N/A&lt;/Directory&gt;</code></blockquote><p><hr>
1N/A
1N/A<A name="addmodule"><h2>AddModule directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AddModule} directive&gt; -->
1N/A<strong>Syntax:</strong> AddModule <em>module module ...</em><br>
1N/A<strong>Context:</strong> server config <br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> AddModule is only available in Apache 1.2 and later<p>
1N/A
1N/AThe server can have modules compiled in which are not actively in use.
1N/AThis directive can be used to enable the use of those modules. The
1N/Aserver comes with a pre-loaded list of active modules; this list can
1N/Abe cleared with the <A HREF="#clearmodulelist">ClearModuleList</A>
1N/Adirective.<p><hr>
1N/A
1N/A<A name="allowoverride"><h2>AllowOverride directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AllowOverride} directive&gt; -->
1N/A<strong>Syntax:</strong> AllowOverride <em>override override ...</em><br>
1N/A<strong>Default:</strong> <code>AllowOverride All</code><br>
1N/A<strong>Context:</strong> directory<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AWhen the server finds an .htaccess file (as specified by
1N/A<A HREF="#accessfilename">AccessFileName</A>) it needs to know which
1N/Adirectives declared in that file can override earlier access information.<p>
1N/A
1N/A<em>Override</em> can be set to <code>None</code>, in which case the server
1N/Awill not read the file, <code>All</code> in which case the server will
1N/Aallow all the directives, or one or more of the following:
1N/A<dl>
1N/A<dt>AuthConfig
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt AuthConfig} override&gt; -->
1N/AAllow use of the authorization directives
1N/A(<A HREF="mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</A>,
1N/A<A HREF="mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</A>,
1N/A<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A>,
1N/A<A HREF="#authname">AuthName</A>, <A HREF="#authtype">AuthType</A>,
1N/A<A HREF="mod_auth.html#authuserfile">AuthUserFile</A>,
1N/A<A HREF="#require">require</A>, etc.).
1N/A<dt>FileInfo
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt FileInfo} override&gt; -->
1N/AAllow use of the directives controlling document types
1N/A(<A HREF="mod_mime.html#addencoding">AddEncoding</A>,
1N/A<A HREF="mod_mime.html#addlanguage">AddLanguage</A>,
1N/A<A HREF="mod_mime.html#addtype">AddType</A>,
1N/A<A HREF="#defaulttype">DefaultType</A>,
1N/A<A HREF="#errordocment">ErrorDocument</A>,
1N/A<A HREF="mod_negotiation.html#languagepriority">LanguagePriority</A>, etc.).
1N/A<dt>Indexes
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt Indexes} override&gt; -->
1N/AAllow use of the directives controlling directory indexing
1N/A(<A HREF="mod_dir.html#adddescription">AddDescription</A>,
1N/A<A HREF="mod_dir.html#addicon">AddIcon</A>,
1N/A<A HREF="mod_dir.html#addiconbyencoding">AddIconByEncoding</A>,
1N/A<A HREF="mod_dir.html#addiconbytype">AddIconByType</A>,
1N/A<A HREF="mod_dir.html#defaulticon">DefaultIcon</A>,
1N/A<A HREF="mod_dir.html#directoryindex">DirectoryIndex</A>,
1N/A<A HREF="mod_dir.html#fancyindexing">FancyIndexing</A>,
1N/A<A HREF="mod_dir.html#headername">HeaderName</A>,
1N/A<A HREF="mod_dir.html#indexignore">IndexIgnore</A>,
1N/A<A HREF="mod_dir.html#indexoptions">IndexOptions</A>,
1N/A<A HREF="mod_dir.html#readmename">ReadmeName</A>, etc.).
1N/A<dt>Limit
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt Limit} override&gt; -->
1N/AAllow use of the directives controlling host access (allow, deny and order).
1N/A<dt>Options
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt Options} override&gt; -->
1N/AAllow use of the directives controlling specific directory features
1N/A(<A HREF="#options">Options</A> and
1N/A<A HREF="mod_include.html#xbithack">XBitHack</A>).
1N/A</dl><p><hr>
1N/A
1N/A<A name="authname"><h2>AuthName directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AuthName} directive&gt; -->
1N/A<strong>Syntax:</strong> AuthName <em>auth-domain</em><br>
1N/A<strong>Context:</strong> directory, .htaccess<br>
1N/A<strong>Override:</strong> AuthConfig<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive sets the name of the authorization realm for a directory.
1N/AThis realm is given to the client so that the user knows which username and
1N/Apassword to send.
1N/AIt must be accompanied by <A HREF="#authtype">AuthType</A> and
1N/A<A HREF="#require">require</A> directives, and directives such as
1N/A<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
1N/A<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
1N/A
1N/A<A name="authtype"><h2>AuthType directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt AuthType} directive&gt; -->
1N/A<strong>Syntax:</strong> AuthType <em>type</em><br>
1N/A<strong>Context:</strong> directory, .htaccess<br>
1N/A<strong>Override:</strong> AuthConfig<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive selects the type of user authentication for a directory.
1N/AOnly <code>Basic</code> is currently implemented.
1N/A<!--%plaintext &lt;?INDEX {\tt Basic} authentication scheme&gt; -->
1N/AIt must be accompanied by <A HREF="#authname">AuthName</A> and
1N/A<A HREF="#require">require</A> directives, and directives such as
1N/A<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
1N/A<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> to work.<p><hr>
1N/A
1N/A<A name="clearmodulelist"><h2>ClearModuleList directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt ClearModuleList} directive&gt; -->
1N/A<strong>Syntax:</strong> ClearModuleList<br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> ClearModuleList is only available in Apache 1.2 and later<p>
1N/A
1N/AThe server comes with a built-in list of active modules. This
1N/Adirective clears the list. It is assumed that the list will then be
1N/Are-populated using the <A HREF="#addmodule">AddModule</A> directive.<p><hr>
1N/A
1N/A<A name="bindaddress"><h2>BindAddress directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt BindAddress} directive&gt; -->
1N/A<strong>Syntax:</strong> BindAddress <em>saddr</em><br>
1N/A<strong>Default:</strong> <code>BindAddress *</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AA Unix&#174; http server can either listen for connections to every
1N/AIP address of the server machine, or just one IP address of the server
1N/Amachine. <em>Saddr</em> can be
1N/A
1N/A<menu>
1N/A<li>*
1N/A<li>An IP address
1N/A<li>A fully-qualified internet domain name
1N/A</menu>
1N/AIf the value is *, then the server will listen for connections on
1N/Aevery IP address, otherwise it will only listen on the IP address
1N/Aspecified. <p>
1N/A
1N/AThis option can be used as an alternative method for supporting
1N/A<A HREF="/virtual-host.html">virtual hosts</A> instead of using
1N/A<A HREF="#virtualhost">&lt;VirtualHost&gt;</A> sections.
1N/A
1N/A<p><strong>See Also:</strong>
1N/A<a href="/bind.html">Setting which addresses and ports Apache uses</a></p>
1N/A
1N/A<hr>
1N/A
1N/A<A name="defaulttype"><h2>DefaultType directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt DefaultType} directive&gt; -->
1N/A<strong>Syntax:</strong> DefaultType <em>mime-type</em><br>
1N/A<strong>Default:</strong> <code>DefaultType text/html</code><br>
1N/A<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Override:</strong> FileInfo<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThere will be times when the server is asked to provide a document
1N/Awhose type cannot be determined by its MIME types mappings.<p>
1N/A
1N/AThe server must inform the client of the content-type of the document, so in
1N/Athe event of an unknown type it uses the <CODE>DefaultType</CODE>. For
1N/Aexample:
1N/A<blockquote><code>DefaultType image/gif</code></blockquote>
1N/Awould be appropriate for a directory which contained many gif images
1N/Awith filenames missing the .gif extension.<p><hr>
1N/A
1N/A<A name="directory"><h2>&lt;Directory&gt; directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Directory} section directive&gt; -->
1N/A<strong>Syntax:</strong> &lt;Directory <em>directory</em>&gt; ... &lt;/Directory&gt; <br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> Core. <p>
1N/A
1N/A&lt;Directory&gt; and &lt;/Directory&gt; are used to enclose a group of
1N/Adirectives which will apply only to the named directory and sub-directories
1N/Aof that directory. Any directive which is allowed in a directory
1N/Acontext may be used. <em>Directory</em> is either the full path to a directory,
1N/Aor a wild-card string. In a wild-card string, `?' matches any single character,
1N/Aand `*' matches any sequences of characters. Example:
1N/A<pre>
1N/A &lt;Directory /usr/local/httpd/htdocs&gt;
1N/A Options Indexes FollowSymLinks
1N/A &lt;/Directory&gt;
1N/A</pre>
1N/A
1N/A<p><strong>Apache 1.2 and above:</strong>
1N/AExtended regular expressions can also be used, with the addition of the
1N/A<code>~</code> character. For example:</p>
1N/A
1N/A<pre>
1N/A &lt;Directory ~ &quot;^/www/.*/[0-9]{3}&quot;&gt;
1N/A</pre>
1N/A
1N/Awould match directories in /www/ that consisted of three numbers.<p>
1N/A
1N/A<p>If multiple directory sections match the directory (or its parents) containing
1N/Aa document, then the directives are applied in the order of shortest match
1N/Afirst, interspersed with the directives from the
1N/A<A HREF="#accessfilename">.htaccess</A> files. For example, with
1N/A<blockquote><code>
1N/A&lt;Directory /&gt;<br>
1N/AAllowOverride None<br>
1N/A&lt;/Directory&gt;<br><br>
1N/A&lt;Directory /home/*&gt;<br>
1N/AAllowOverride FileInfo<br>
1N/A&lt;/Directory&gt;</code></blockquote>
1N/AThe for access to the document <code>/home/web/dir/doc.html</code> the
1N/Asteps are:
1N/A<menu>
1N/A<li>Apply directive <code>AllowOverride None</code> (disabling
1N/A<code>.htaccess</code> files).
1N/A<li>Apply directive <code>AllowOverride FileInfo</code> (for directory
1N/A<code>/home/web</code>).
1N/A<li>Apply any FileInfo directives in <code>/home/web/.htaccess</code>
1N/A</menu>
1N/A
1N/AThe directory sections typically occur in the access.conf file, but they
1N/Amay appear in any configuration file. &lt;Directory&gt; directives cannot
1N/Anest, and cannot appear in a <A HREF="#limit">&lt;Limit&gt;</A> section.
1N/A<p><hr>
1N/A
1N/A<A NAME="documentroot"><h2>DocumentRoot directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt DocumentRoot} directive&gt; -->
1N/A<strong>Syntax:</strong> DocumentRoot <em>directory-filename</em><br>
1N/A<strong>Default:</strong> <code>DocumentRoot
1N/A/usr/local/etc/httpd/htdocs</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive sets the directory from which httpd will serve files.
1N/AUnless matched by a directive like Alias, the server appends the path
1N/Afrom the requested URL to the document root to make the path to the
1N/Adocument. Example:
1N/A<blockquote><code>DocumentRoot /usr/web</code></blockquote>
1N/Athen an access to <code>http://www.my.host.com/index.html</code> refers
1N/Ato <code>/usr/web/index.html</code>.
1N/A
1N/A<P>There appears to be a bug in mod_dir which causes problems when the
1N/ADocumentRoot has a trailing slash (i.e. "DocumentRoot /usr/web/") so
1N/Aplease avoid that.
1N/A
1N/A<p><hr>
1N/A
1N/A<A name="errordocument"><h2>ErrorDocument directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt ErrorDocument} directive&gt; -->
1N/A<strong>Syntax:</strong> ErrorDocument <em>error-code document</em><br>
1N/A<strong>Context</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Override:</strong> FileInfo<br>
1N/A<strong>Compatibility:</strong> The directory and .htaccess contexts
1N/Aare only available in Apache 1.1 and later.<p>
1N/A
1N/AIn the event of a problem or error, Apache can be configured to do
1N/Aone of four things,
1N/A
1N/A<OL>
1N/A<LI>behave like NCSA httpd 1.3
1N/A<LI>output a customized message
1N/A<LI>redirect to a local URL to handle the problem/error
1N/A<LI>redirect to an external URL to handle the problem/error
1N/A</OL>
1N/A
1N/A<P>2-4 are configured using <CODE>ErrorDocument</CODE>, which
1N/Ais followed by the HTTP response code and a message or URL.
1N/A
1N/A<P><em>Messages</em> in this context, begin with a single quote
1N/A(<code>"</code>), which does not form part of the message itself. Apache will
1N/Asometime offer additional information regarding the problem/error.
1N/A
1N/A<P>URLs will begin with a slash (/) for local URLs, or will be a full
1N/AURL which the client can resolve. Examples:
1N/A<blockquote><code>
1N/AErrorDocument 500 /cgi-bin/tester<br>
1N/AErrorDocument 404 /cgi-bin/bad_urls.pl<br>
1N/AErrorDocument 401 http://www2.foo.bar/subscription_info.html<br>
1N/AErrorDocument 403 "Sorry can't allow you access today
1N/A</code></blockquote>
1N/A
1N/ASee Also: <A HREF="/custom-error.html">documentation of customizable
1N/Aresponses.</A><p><hr>
1N/A
1N/A<A name="errorlog"><h2>ErrorLog directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt ErrorLog} directive&gt; -->
1N/A<strong>Syntax:</strong> ErrorLog <em>filename</em><br>
1N/A<strong>Default:</strong> <code>ErrorLog logs/error_log</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe error log directive sets the name of the file to which the server will log
1N/Aany errors it encounters. If the filename does not begin with a slash (/)
1N/Athen it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>.
1N/AExample:
1N/A<blockquote><code>ErrorLog /dev/null</code></blockquote>
1N/AThis effectively turns off error logging.<p>
1N/A
1N/ASECURITY: See the <A HREF="/misc/security_tips.html">security tips</A>
1N/Adocument for details on why your security could be compromised if
1N/Athe directory where logfiles are stored is writable by anyone other
1N/Athan the user that starts the server.
1N/A
1N/A<p><hr>
1N/A
1N/A<A name="files"><h2>&lt;Files&gt;</h2></A>
1N/A<strong>Syntax:</strong> &lt;Files <em>filename</em>&gt;
1N/A... &lt;/Files&gt;<br>
1N/A<strong>Context:</strong> server config, virtual host, htaccess<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> only available in Apache
1N/A1.2 and above.<p>
1N/A
1N/A<p>The &lt;Files&gt; directive provides for access control by
1N/Afilename. It is comparable to the <a
1N/Ahref="#directory">&lt;Directory&gt;</a> directive and
1N/A<a href="#location">&lt;Location&gt;</a> directives. It
1N/Ashould be matched with a &lt;/Files&gt; directive. Directives that
1N/Aapply to the filename given should be listed
1N/Awithin. <code>&lt;Files&gt;</code> sections are processed in the
1N/Aorder they appear in the configuration file, after the
1N/A&lt;Directory&gt; sections and <code>.htaccess</code> files are
1N/Aread, but before &lt;Location&gt; sections.</p>
1N/A
1N/A<p>The <em>filename</em> argument should include a filename, or a
1N/Awild-card string, where `?' matches any single character, and `*' matches any
1N/Asequences of characters. Extended regular expressions can also be used, with the addition of
1N/Athe <code>~</code> character. For example:</p>
1N/A
1N/A<pre>
1N/A &lt;Files ~ &quot;\.(gif|jpe?g|png)$&quot;&gt;
1N/A</pre>
1N/A
1N/Awould match most common Internet graphics formats.
1N/A
1N/A<p>Note that unlike <a
1N/Ahref="#directory"><code>&lt;Directory&gt;</code></a> and <a
1N/Ahref="#location"><code>&lt;Location&gt;</code></a> sections,
1N/A<code>&lt;Files&gt;</code> sections can be used inside .htaccess
1N/Afiles. This allows users to control access to their own files, at a
1N/Afile-by-file level. When used in an .htaccess file, if the
1N/A<em>filename</em> does not begin with a <code>/</code> character,
1N/Athe directory being applied will be prefixed automatically.
1N/A
1N/A<p> <hr>
1N/A
1N/A<A name="group"><h2>Group directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Group} directive&gt; -->
1N/A<strong>Syntax:</strong> Group <em>unix-group</em><br>
1N/A<strong>Default:</strong> <code>Group #-1</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe Group directive sets the group under which the server will answer requests.
1N/AIn order to use this directive, the stand-alone server must be run initially
1N/Aas root. <em>Unix-group</em> is one of:
1N/A<dl>
1N/A<dt>A group name
1N/A<dd>Refers to the given group by name.
1N/A<dt># followed by a group number.
1N/A<dd>Refers to a group by its number.
1N/A</dl>
1N/A
1N/AIt is recommended that you set up a new group specifically for running the
1N/Aserver. Some admins use user <code>nobody</code>, but this is not always
1N/Apossible or desirable.<p>
1N/A
1N/ANote: if you start the server as a non-root user, it will fail to change
1N/Ato the specified group, and will instead continue to run as the group of the
1N/Aoriginal user. <p>
1N/A
1N/ASpecial note: Use of this directive in &lt;VirtualHost&gt; requires a
1N/Aproperly configured <A HREF="/suexec.html">SUEXEC wrapper</A>.<p>
1N/A
1N/ASECURITY: See <A HREF="#user">User</A> for a discussion of the security
1N/Aconsiderations.<p><hr>
1N/A
1N/A<A name="hostnamelookups"><h2>HostNameLookups directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt HostNameLookups} directive&gt; -->
1N/A<strong>Syntax:</strong> HostNameLookups <em>boolean</em><br>
1N/A<strong>Default:</strong> <code>HostNameLookups on</code><br>
1N/A<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive enables DNS lookups so that host names can be logged.
1N/AHaving this directive set <code>on</code> also enables the use of names
1N/Ain &lt;Limit&gt; blocks for access control.<p>
1N/A
1N/AHeavily loaded sites should set this directive <code>off</code>, since DNS
1N/Alookups can take considerable amounts of time. The utility <i>logresolve</i>,
1N/Aprovided in the <i>/support</i> directory, can be used to look up host names
1N/Afrom logged IP addresses offline.<p><hr>
1N/A
1N/A<A name="identitycheck"><h2>IdentityCheck directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt IdentityCheck} directive&gt; -->
1N/A<strong>Syntax:</strong> IdentityCheck <em>boolean</em><br>
1N/A<strong>Default:</strong> <code>IdentityCheck off</code><br>
1N/A<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive enables RFC931-compliant logging of the remote user name
1N/Afor each connection, where the client machine runs identd or something similar.
1N/AThis information is logged in the access log. <em>Boolean</em> is either
1N/A<code>on</code> or <code>off</code>.<p>
1N/A
1N/AThe information should not be trusted in any way except for rudimentary usage
1N/Atracking.<p><hr>
1N/A
1N/A<A NAME="ifmodule"><H2>&lt;IfModule&gt;</H2></A>
1N/A<b>Syntax:</b> &lt;IfModule [!]<i>module-name</i>&gt; <i>...</i>
1N/A&lt;/IfModule&gt;<br>
1N/A<b>Default:</b> None<br>
1N/A<b>Context:</b> all<br>
1N/A<b>Status:</b> Core
1N/A<strong>Compatibility:</strong> ScriptLog is only available in 1.2 and
1N/Alater.<P>
1N/A
1N/A<p>
1N/A
1N/AThe &lt;IfModule <i>test</i>&gt;...&lt;/IfModule&gt;
1N/Asection is used to mark directives that are conditional. The
1N/Adirectives within an IfModule section are only
1N/Aprocessed if the <i>test</i> is true. If <i>test</i>
1N/Ais false, everything between the start and end markers
1N/Ais ignored.<p>
1N/A
1N/AThe <i>test</i> in the &lt;IfModule&gt; section directive
1N/Acan be one of two forms:
1N/A
1N/A<ul>
1N/A<li><i>module name</i>
1N/A<li>!<i>module name</i>
1N/A</ul>
1N/A
1N/A<p>In the former case, the directives between the start and end markers
1N/Aare only processed if the module named <i>module name</i> is compiled
1N/Ain to Apache. The second format reverses the test, and only processes
1N/Athe directives if <i>module name</i> is <b>not</b> compiled in.
1N/A
1N/A<p>The <i>module name</i> argument is a module name as given as the file
1N/Aname of the module, at the time it was compiled. For example,
1N/A<code>mod_rewrite.c</code>.
1N/A
1N/A<p>&lt;IfModule&gt; sections are nest-able, which can be used to implement
1N/Asimple multiple-module tests.
1N/A
1N/A<P> <hr>
1N/A
1N/A<h2><a name="keepalive">KeepAlive</a></h2>
1N/A<strong>Syntax:</strong> KeepAlive <em>max-requests</em><br>
1N/A<strong>Default:</strong> <code>KeepAlive 5</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> Core<br>
1N/A<strong>Compatibility:</strong> KeepAlive is only available in Apache
1N/A1.1 and later.<p>
1N/A
1N/AThis directive enables
1N/A<a href="/keepalive.html">Keep-Alive</a>
1N/Asupport. Set <em>max-requests</em>
1N/Ato the maximum number of requests you want Apache to entertain per
1N/Arequest. A limit is imposed to prevent a client from hogging your
1N/Aserver resources. Set this to <code>0</code> to disable support.
1N/A
1N/A<h2><a name="keepalivetimeout">KeepAliveTimeout</a></h2>
1N/A<strong>Syntax:</strong> KeepAliveTimeout <em>seconds</em><br>
1N/A<strong>Default:</strong> <code>KeepAliveTimeout 15</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> Core<br>
1N/A<strong>Compatibility:</strong> KeepAliveTimeout is only available in Apache
1N/A1.1 and later.<p>
1N/A
1N/AThe number of seconds Apache will wait for a subsequent request before
1N/Aclosing the connection. Once a request has been received, the timeout
1N/Avalue specified by the <a
1N/Ahref="#timeout"><code>Timeout</code></a> directive
1N/Aapplies.
1N/A<hr>
1N/A
1N/A<A name="listen"><h2>Listen</h2></A>
1N/A<strong>Syntax:</strong>
1N/AListen [<em>IP address</em>:]<em>port number</em><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> Listen is only available in Apache
1N/A1.1 and later.<p>
1N/A
1N/A<p>The Listen directive instructs Apache to listen to more than one IP
1N/Aaddress or port; by default it responds to requests on all IP
1N/Ainterfaces, but only on the port given by the <a href="#port">Port</a>
1N/Adirective.</p>
1N/A
1N/A<p><strong>See Also</strong>:
1N/A<a href="/bind.html">Setting which addresses and ports Apache uses</a></p>
1N/A<hr>
1N/A
1N/A<A name="limit"><h2>&lt;Limit&gt; directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Limit} section directive&gt; -->
1N/A<strong>Syntax:</strong>
1N/A &lt;Limit <em>method method</em> ... &gt; ... &lt;/Limit&gt;<br>
1N/A<strong>Context:</strong> any<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/A&lt;Limit&gt; and &lt;/Limit&gt; are used to enclose a group of
1N/Aaccess control directives which will then apply only to the specified
1N/Aaccess methods, where <em>method</em> is any valid HTTP method.
1N/AAny directive except another &lt;Limit&gt; or
1N/A<A HREF="#directory">&lt;Directory&gt;</A> may be used; the majority will be
1N/Aunaffected by the &lt;Limit&gt;. Example:
1N/A<blockquote><code>
1N/A&lt;Limit GET POST&gt;<br>
1N/Arequire valid-user<br>
1N/A&lt;/Limit&gt;</code></blockquote>
1N/AIf an access control directive appears outside a &lt;Limit&gt; directive,
1N/Athen it applies to all access methods.<p><hr>
1N/A
1N/A<h2><a name="location">&lt;Location&gt;</a></h2>
1N/A
1N/A<strong>Syntax:</strong> &lt;Location <em>URL</em>&gt;
1N/A... &lt;/Location&gt;<br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> Location is only available in Apache
1N/A1.1 and later.<p>
1N/A
1N/A<p>The &lt;Location&gt; directive provides for access control by
1N/AURL. It is comparable to the <a
1N/Ahref="#directory">&lt;Directory&gt;</a> directive, and
1N/Ashould be matched with a &lt;/Location&gt; directive. Directives that
1N/Aapply to the URL given should be listen
1N/Awithin. <code>&lt;Location&gt;</code> sections are processed in the
1N/Aorder they appear in the configuration file, after the
1N/A&lt;Directory&gt; sections and <code>.htaccess</code> files are
1N/Aread.</p>
1N/A
1N/A<p>Note that, due to the way HTTP functions, <em>URL prefix</em>
1N/Ashould, save for proxy requests, be of the form <code>/path/</code>,
1N/Aand should not include the <code>http://servername</code>. It doesn't
1N/Anecessarily have to protect a directory (it can be an individual
1N/Afile, or a number of files), and can include wild-cards. In a wild-card
1N/Astring, `?' matches any single character, and `*' matches any
1N/Asequences of characters.
1N/A
1N/A<p><strong>Apache 1.2 and above:</strong>
1N/AExtended regular expressions can also be used, with the addition of
1N/Athe
1N/A<code>~</code> character. For example:</p>
1N/A
1N/A<pre>
1N/A &lt;Location ~ &quot;/(extra|special)/data&quot;&gt;
1N/A</pre>
1N/A
1N/Awould match URLs that contained the substring "/extra/data" or
1N/A"/special/data".</p>
1N/A
1N/A<p>The <code>Location</code> functionality is especially useful when
1N/Acombined with the <code><a
1N/Ahref="mod_mime.html#sethandler">SetHandler</a></code> directive. For example, to enable status requests, but allow them only
1N/Afrom browsers at foo.com, you might use:
1N/A
1N/A<pre>
1N/A &lt;Location /status&gt;
1N/A SetHandler server-status
1N/A <Limit GET>
1N/A order deny,allow
1N/A deny from all
1N/A allow from .foo.com
1N/A </Limit>
1N/A &lt;/Location&gt;
1N/A</pre>
1N/A<hr>
1N/A
1N/A<A name="maxclients"><h2>MaxClients directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt MaxClients} directive&gt; -->
1N/A<strong>Syntax:</strong> MaxClients <em>number</em><br>
1N/A<strong>Default:</strong> <code>MaxClients 256</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe MaxClients directive sets the limit on the number of simultaneous
1N/Arequests that can be supported; not more than this number of child server
1N/Aprocesses will be created.<p><hr>
1N/A
1N/A<A name="maxrequestsperchild"><h2>MaxRequestsPerChild directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt MaxRequestsPerChild} directive&gt; -->
1N/A<strong>Syntax:</strong> MaxRequestsPerChild <em>number</em><br>
1N/A<strong>Default:</strong> <code>MaxRequestsPerChild 0</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe MaxRequestsPerChild directive sets the limit on the number of requests
1N/Athat an individual child server process will handle. After MaxRequestsPerChild
1N/Arequests, the child process will die. If MaxRequestsPerChild is 0, then
1N/Athe process will never expire.<p>
1N/A
1N/ASetting MaxRequestsPerChild to a non-zero limit has two beneficial effects:
1N/A<ul>
1N/A<li>it limits the amount of memory that process can consume by (accidental)
1N/Amemory leakage;
1N/A<li> by giving processes a finite lifetime, it helps reduce the
1N/Anumber of processes when the server load reduces.
1N/A</ul><p><hr>
1N/A
1N/A<A name="maxspareservers"><h2>MaxSpareServers directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt MaxSpareServers} directive&gt; -->
1N/A<strong>Syntax:</strong> MaxSpareServers <em>number</em><br>
1N/A<strong>Default:</strong> <code>MaxSpareServers 10</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe MaxSpareServers directive sets the desired maximum number of <em>idle</em>
1N/Achild server processes. An idle process is one which is not handling
1N/Aa request. If there are more than MaxSpareServers idle, then the parent
1N/Aprocess will kill off the excess processes.<p>
1N/A
1N/ATuning of this parameter should only be necessary on very busy sites.
1N/ASetting this parameter to a large number is almost always a bad idea.<p>
1N/A
1N/ASee also <A HREF="#minspareservers">MinSpareServers</A> and
1N/A<A HREF="#startservers">StartServers</A>.<p><hr>
1N/A
1N/A<A name="minspareservers"><h2>MinSpareServers directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt MinSpareServers} directive&gt; -->
1N/A<strong>Syntax:</strong> MinSpareServers <em>number</em><br>
1N/A<strong>Default:</strong> <code>MinSpareServers 5</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe MinSpareServers directive sets the desired minimum number of <em>idle</em>
1N/Achild server processes. An idle process is one which is not handling
1N/Aa request. If there are fewer than MinSpareServers idle, then the parent
1N/Aprocess creates new children at a maximum rate of 1 per second.<p>
1N/A
1N/ATuning of this parameter should only be necessary on very busy sites.
1N/ASetting this parameter to a large number is almost always a bad idea.<p>
1N/A
1N/ASee also <A HREF="#maxspareservers">MaxSpareServers</A> and
1N/A<A HREF="#startservers">StartServers</A>.<p><hr>
1N/A
1N/A<A name="options"><h2>Options directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Options} directive&gt; -->
1N/A<strong>Syntax:</strong> Options <em>[+|-]option [+|-]option ...</em><br>
1N/A<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Override:</strong> Options<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe Options directive controls which server features are available in
1N/Aa particular directory.
1N/A<p>
1N/A<em>option</em> can be set to <code>None</code>, in which case none of
1N/Athe extra features are enabled, or one or more of the following:
1N/A<dl>
1N/A<dt>All
1N/A<dd>All options except for MultiViews.
1N/A<dt>ExecCGI
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt ExecCGI} option&gt; -->
1N/AExecution of CGI scripts is permitted.
1N/A<dt>FollowSymLinks
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt FollowSymLinks} option&gt; -->
1N/AThe server will follow symbolic links in this directory.
1N/A<dt>Includes
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt Includes} option&gt; -->
1N/AServer-side includes are permitted.
1N/A<dt>IncludesNOEXEC
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt IncludesNOEXEC} option&gt; -->
1N/AServer-side includes are permitted, but the #exec command and
1N/A#include of CGI scripts are disabled.
1N/A<dt>Indexes
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt Indexes} option&gt; -->
1N/AIf a URL which maps to a directory is requested, and the there is no
1N/ADirectoryIndex (e.g. index.html) in that directory, then the server will
1N/Areturn a formatted listing of the directory.
1N/A<dt>MultiViews
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt MultiViews} option&gt; -->
1N/A<A HREF="/content-negotiation.html">Content negotiated</A> MultiViews are
1N/Aallowed.
1N/A<dt>SymLinksIfOwnerMatch
1N/A<dd>
1N/A<!--%plaintext &lt;?INDEX {\tt SymLinksIfOwnerMatch} option&gt; -->
1N/AThe server will only follow symbolic links for which the target
1N/Afile or directory is owned by the same user id as the link.
1N/A</dl>
1N/A
1N/ANormally, if multiple <code>Options</code> could apply to a directory,
1N/Athen the most specific one is taken complete; the options are not
1N/Amerged. However if <i>all</i> the options on the <code>Options</code>
1N/Adirective are preceeded by a + or - symbol, the options are
1N/Amerged. Any options preceeded by a + are added to the options
1N/Acurrently in force, and any options preceeded by a - are removed from
1N/Athe options currently in force. <P>
1N/A
1N/AFor example, without any + and - symbols:
1N/A
1N/A<blockquote><code>
1N/A&lt;Directory /web/docs&gt; <br>
1N/AOptions Indexes FollowSymLinks<br>
1N/A&lt;/Directory&gt;<br>
1N/A&lt;Directory /web/docs/spec&gt; <br>
1N/AOptions Includes<br>
1N/A&lt;/Directory&gt;
1N/A</code></blockquote>
1N/Athen only <code>Includes</code> will be set for the /web/docs/spec
1N/Adirectory. However if the second <code>Options</code> directive uses the +
1N/Aand - symbols:<p>
1N/A
1N/A<blockquote><code>
1N/A&lt;Directory /web/docs&gt; <br>
1N/AOptions Indexes FollowSymLinks<br>
1N/A&lt;/Directory&gt;<br>
1N/A&lt;Directory /web/docs/spec&gt; <br>
1N/AOptions +Includes -Indexes<br>
1N/A&lt;/Directory&gt;
1N/A</code></blockquote>
1N/Athen the options <code>FollowSymLinks</code> and <code>Includes</code>
1N/Aare set for the /web/docs/spec directory.
1N/A<hr>
1N/A
1N/A<A name="pidfile"><h2>PidFile directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt PidFile} directive&gt; -->
1N/A<strong>Syntax:</strong> PidFile <em>filename</em><br>
1N/A<strong>Default:</strong> <code>PidFile logs/httpd.pid</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe PidFile directive sets the file to which the server records the
1N/Aprocess id of the daemon. If the filename does not begin with a slash (/)
1N/Athen it is assumed to be relative to the <A HREF="#serverroot">ServerRoot</A>.
1N/AThe PidFile is only used in <A HREF="#servertype">standalone</A> mode.<p>
1N/A
1N/AIt is often useful to be able to send the server a signal, so that it closes
1N/Aand then reopens its <A HREF="#errorlog">ErrorLog</A> and TransferLog, and
1N/Are-reads its configuration files. This is done by sending a SIGHUP (kill -1)
1N/Asignal to the process id listed in the PidFile.<p><hr>
1N/A
1N/A<A name="port"><h2>Port directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Port} directive&gt; -->
1N/A<strong>Syntax:</strong> Port <em>number</em><br>
1N/A<strong>Default:</strong> <code>Port 80</code><br>
1N/A<strong>Context:</strong> server config<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe Port directive sets the network port on which the server listens.
1N/A<em>Num</em> is a number from 0 to 65535; some port numbers (especially below
1N/A1024) are reserved for particular protocols. See <code>/etc/services</code>
1N/Afor a list of some defined ports; the standard port for the http protocol
1N/Ais 80.<p>
1N/A
1N/APort 80 is one of Unix's special ports. All ports numbered
1N/Abelow 1024 are reserved for system use, i.e. regular (non-root) users cannot
1N/Amake use of them; instead they can only use higher port numbers.<p>
1N/A
1N/ATo use port 80, you must start the server from the root account.
1N/AAfter binding to the port and before accepting requests, Apache will change
1N/Ato a low privileged user as set by the <A HREF="#user">User directive</A>.<p>
1N/A
1N/AIf you cannot use port 80, choose any other unused port. Non-root users
1N/Awill have to choose a port number higher than 1023, such as 8000.<p>
1N/A
1N/ASECURITY: if you do start the server as root, be sure
1N/Anot to set <A HREF="#user">User</A> to root. If you run the server as
1N/Aroot whilst handling connections, your site may be open to a major security
1N/Aattack.<p><hr>
1N/A
1N/A<A name="require"><h2>require directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt require} directive&gt; -->
1N/A<strong>Syntax:</strong> require <em>entity-name entity entity...</em><br>
1N/A<strong>Context:</strong> directory, .htaccess<br>
1N/A<strong>Override:</strong> AuthConfig<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThis directive selects which authenticated users can access a directory.
1N/AThe allowed syntaxes are:
1N/A<ul>
1N/A<li>require user <em>userid userid ...</em><p>
1N/AOnly the named users can access the directory.<p>
1N/A<li>require group <em>group-name group-name ...</em><p>
1N/AOnly users in the named groups can access the directory.<p>
1N/A<li>require valid-user<p>
1N/AAll valid users can access the directory.
1N/A</ul>
1N/A<p>
1N/AIf <code>require</code> appears in a <A HREF="#limit">&lt;Limit&gt;</A>
1N/Asection, then it restricts access to the named methods, otherwise
1N/Ait restricts access for all methods. Example:
1N/A<blockquote><code>
1N/AAuthType Basic<br>
1N/AAuthName somedomain<br>
1N/AAuthUserFile /web/users<br>
1N/AAuthGroupFile /web/groups<br>
1N/A&lt;Limit GET POST&gt;<br>
1N/Arequire group admin<br>
1N/A&lt;/Limit&gt;
1N/A</code></blockquote>
1N/A
1N/ARequire must be accompanied by <A HREF="#authname">AuthName</A> and
1N/A<A HREF="#authtype">AuthType</A> directives, and directives such as
1N/A<A HREF="mod_auth.html#authuserfile">AuthUserFile</A> and
1N/A<A HREF="mod_auth.html#authgroupfile">AuthGroupFile</A> (to define users and
1N/Agroups) in order to work correctly.<p><hr>
1N/A
1N/A<A name="resourceconfig"><h2>ResourceConfig directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt ResourceConfig} directive&gt; -->
1N/A<strong>Syntax:</strong> ResourceConfig <em>filename</em><br>
1N/A<strong>Default:</strong> <code>ResourceConfig conf/srm.conf</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe server will read this file for more directives after reading the
1N/Ahttpd.conf file. <em>Filename</em> is relative to the
1N/A<A HREF="#serverroot">ServerRoot</A>.
1N/AThis feature can be disabled using:
1N/A<blockquote><code>ResourceConfig /dev/null</code></blockquote>
1N/AHistorically, this file contained most directives except for server
1N/Aconfiguration directives and <A HREF="#directory">&lt;Directory&gt;</A>
1N/Asections; in fact it can now contain any server directive allowed in the
1N/A<em>server config</em> context.<p>
1N/A
1N/ASee also <A HREF="#accessconfig">AccessConfig</A>.<p><hr>
1N/A
1N/A<A name="rlimit">
1N/A<A name="rlimitcpu"><h2>RLimitCPU directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt RLimitCPU} directive&gt; -->
1N/A<strong>Syntax:</strong> RLimitCPU <em># or 'max'</em> <em>[# or 'max']</em><br>
1N/A<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> RLimitCPU is only available in Apache 1.2 and later<p>
1N/A
1N/ATakes 1 or 2 parameters. The first parameter sets the soft resource limit for all
1N/Aprocesses and the second parameter sets the maximum resource limit. Either parameter
1N/Acan be a number, or <em>max</em> to indicate to the server that the limit should
1N/Abe set to the maximum allowed by the operating system configuration. Raising the
1N/Amaximum resource limit requires that the server is running as root, or in the initial
1N/Astartup phase.<p>
1N/A
1N/ACPU resource limits are expressed in seconds per process.<p>
1N/A
1N/ASee also <A HREF="#rlimitmem">RLimitMEM</A> or <A HREF="#rlimitnproc">RLimitNPROC</A>.<p><hr>
1N/A
1N/A<A name="rlimitmem"><h2>RLimitMEM directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt RLimitMEM} directive&gt; -->
1N/A<strong>Syntax:</strong> RLimitMEM <em># or 'max'</em> <em>[# or 'max']</em><br>
1N/A<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> RLimitMEM is only available in Apache 1.2 and later<p>
1N/A
1N/ATakes 1 or 2 parameters. The first parameter sets the soft resource limit for all
1N/Aprocesses and the second parameter sets the maximum resource limit. Either parameter
1N/Acan be a number, or <em>max</em> to indicate to the server that the limit should
1N/Abe set to the maximum allowed by the operating system configuration. Raising the
1N/Amaximum resource limit requires that the server is running as root, or in the initial
1N/Astartup phase.<p>
1N/A
1N/AMemory resource limits are expressed in bytes per process.<p>
1N/A
1N/ASee also <A HREF="#rlimitcpu">RLimitCPU</A> or <A HREF="#rlimitnproc">RLimitNPROC</A>.<p><hr>
1N/A
1N/A<A name="rlimitnproc"><h2>RLimitNPROC directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt RLimitNPROC} directive&gt; -->
1N/A<strong>Syntax:</strong> RLimitNPROC <em># or 'max'</em> <em>[# or 'max']</em><br>
1N/A<strong>Default:</strong> <code>Unset uses operating system defaults</code><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> RLimitNPROC is only available in Apache 1.2 and later<p>
1N/A
1N/ATakes 1 or 2 parameters. The first parameter sets the soft resource limit for all
1N/Aprocesses and the second parameter sets the maximum resource limit. Either parameter
1N/Acan be a number, or <em>max</em> to indicate to the server that the limit should
1N/Abe set to the maximum allowed by the operating system configuration. Raising the
1N/Amaximum resource limit requires that the server is running as root, or in the initial
1N/Astartup phase.<p>
1N/A
1N/AProcess limits control the number of processes per user.<p>
1N/A
1N/ANote: If CGI processes are <b>not</b> running under userids other than the
1N/Aweb server userid, this directive will limit the number of processes that the
1N/Aserver itself can create. Evidence of this situation will be indicated by
1N/A<b><em>cannot fork</em></b> messages in the error_log.<p>
1N/A
1N/ASee also <A HREF="#rlimitmem">RLimitMEM</A> or <A HREF="#rlimitcpu">RLimitCPU</A>.
1N/A
1N/A<p><hr>
1N/A
1N/A<A name="satisfy"><h2>Satisfy</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt Satisfy} directive&gt; -->
1N/A<strong>Syntax:</strong> Satisfy <em>'any' or 'all'</em><br>
1N/A<strong>Context:</strong> server config, virtual host, directory, .htaccess<br>
1N/A<strong>Status:</strong> core<br>
1N/A<strong>Compatibility:</strong> Satisfy is only available in Apache 1.2 and later<p>
1N/A
1N/AAccess policy if both allow and require used. The parameter can be either
1N/A<em>'all'</em> or <em>'any'</em>.
1N/A
1N/A<p><hr>
1N/A
1N/A<A name="sendbuffersize"><h2>SendBufferSize</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt SendBufferSize} directive&gt; -->
1N/A<strong>Syntax:</strong> SendBufferSize <em>bytes</em><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe server will set the TCP buffer size to the number of bytes
1N/Aspecified. Very useful to increase past standard OS defaults on high
1N/Aspeed high latency (i.e. 100ms or so, such as transcontinental
1N/Afast pipes)
1N/A<p><hr>
1N/A
1N/A<A name="serveradmin"><h2>ServerAdmin directive</h2></A>
1N/A<!--%plaintext &lt;?INDEX {\tt ServerAdmin} directive&gt; -->
1N/A<strong>Syntax:</strong> ServerAdmin <em>email-address</em><br>
1N/A<strong>Context:</strong> server config, virtual host<br>
1N/A<strong>Status:</strong> core<p>
1N/A
1N/AThe ServerAdmin sets the e-mail address that the server includes in any
1N/Aerror messages it returns to the client.<p>
1N/A
1N/AIt 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>
<A name="serveralias"><h2>ServerAlias directive</h2></A>
<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><hr>
<A name="servername"><h2>ServerName directive</h2></A>
<!--%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><hr>
<A name="serverpath"><h2>ServerPath directive</h2></A>
<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>.
<hr>
<A name="serverroot"><h2>ServerRoot directive</h2></A>
<!--%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>
<A name="servertype"><h2>ServerType directive</h2></A>
<!--%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>
<A name="startservers"><h2>StartServers directive</h2></A>
<!--%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>
See also <A HREF="#minspareservers">MinSpareServers</A> and
<A HREF="#maxspareservers">MaxSpareServers</A>.<p><hr>
<A name="timeout"><h2>TimeOut directive</h2></A>
<!--%plaintext &lt;?INDEX {\tt TimeOut} directive&gt; -->
<strong>Syntax:</strong> TimeOut <em>number</em><br>
<strong>Default:</strong> <code>TimeOut 1200</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. 1200 is very generous - you may consider turning it down to
something smaller if you find the server getting swamped by
half-completed connections from buggy browsers.
<p><hr>
<A name="user"><h2>User directive</h2></A>
<!--%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>.<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>
<A name="virtualhost"><h2>&lt;VirtualHost&gt; directive</h2></A>
<!--%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 is
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 host.foo.com&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>
SECURITY: 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="/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>
</p>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>