core.html.en revision 5bb5fba250bf526bc51d13b25378d54acb93c1cb
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
e942c741056732f50da2074b36fe59805d370650slive<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd This file is generated from xml source: DO NOT EDIT
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<link href="/images/favicon.ico" rel="shortcut icon" /></head>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/en/mod/core.html" title="English"> en </a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<div id="quickview"><h3 class="directives">Directives</h3>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#addoutputfilterbytype">AddOutputFilterByType</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#define">Define</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#directory"><Directory></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#fileetag">FileETag</a></li>
90efa9f1730742d874edb5a7803adce11c9f08eanoodl<li><img alt="" src="/images/down.gif" /> <a href="#files"><Files></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#forcetype">ForceType</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#if"><If></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#ifmodule"><IfModule></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#include">Include</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limit"><Limit></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#location"><Location></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
3139522a1418fa699dfd78dcf8dde54253f2c55cnoirin<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><img alt="" src="/images/down.gif" /> <a href="#servername">ServerName</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<li><img alt="" src="/images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#timeout">TimeOut</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><img alt="" src="/images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables operating system specific optimizations for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listening socket by the Protocol type. The basic premise is for the
fb77c505254b6e9c925e23e734463e87574f8f40kess kernel to not send a socket to the server process until either data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is received or an entire HTTP Request is buffered. Only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FreeBSD's Accept Filters</a> and Linux's more primitive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> are currently supported.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http httpready <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter https dataready
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the kernel level. Once an entire request is received, the kernel then
fb77c505254b6e9c925e23e734463e87574f8f40kess sends it to the server. See the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accf_http(9)</a> man page for more details. Since HTTPS requests are
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http data <br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter https data
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
fb77c505254b6e9c925e23e734463e87574f8f40kess requests. Any value besides <code>none</code> will enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd see the Linux
130d299c4b2b15be45532a176604c71fdc7bea5bnd <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Using <code>none</code> for an argument will disable any accept filters
130d299c4b2b15be45532a176604c71fdc7bea5bnd for that protocol. This is useful for protocols that require a server
130d299c4b2b15be45532a176604c71fdc7bea5bnd <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.30 and later</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This directive controls whether requests that contain trailing
003f0c9fda6664daf5092a0e42f65ede20098153slive pathname information that follows an actual filename (or
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess non-existent file in an existing directory) will be accepted or
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd variable.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive">AcceptPathInfo</code> directive are:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>Off</code></dt><dd>A request will only be accepted if it
130d299c4b2b15be45532a176604c71fdc7bea5bnd maps to a literal path that exists. Therefore a request with
130d299c4b2b15be45532a176604c71fdc7bea5bnd trailing pathname information after the true filename such as
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/test/here.html/more</code> in the above example will return
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive leading path component maps to a file that exists. The above
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Default</code></dt><dd>The treatment of requests with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive trailing pathname information is determined by the <a href="/handler.html">handler</a> responsible for the request.
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding The core handler for normal files defaults to rejecting
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a href="mod_cgi.html">cgi-script</a> and <a href="mod_isapi.html">isapi-handler</a>, generally accept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The primary purpose of the <code>AcceptPathInfo</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to allow you to override the handler's choice of
003f0c9fda6664daf5092a0e42f65ede20098153slive accepting or rejecting <code>PATH_INFO</code>. This override is required,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for example, when you use a <a href="/filter.html">filter</a>, such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <a href="mod_include.html">INCLUDES</a>, to generate content
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding based on <code>PATH_INFO</code>. The core handler would usually reject
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the request, so you can use the following configuration to enable
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding such a script:</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding Options +Includes<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding SetOutputFilter INCLUDES<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding AcceptPathInfo On<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </Files>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>While processing a request the server looks for
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding configuration files are <a href="#allowoverride">enabled for that
58699879a562774640b95e9eedfd891f336e38c2nd AccessFileName .acl
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>before returning the document
58699879a562774640b95e9eedfd891f336e38c2nd <code>/usr/local/web/index.html</code>, the server will read
58699879a562774640b95e9eedfd891f336e38c2nd <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
58699879a562774640b95e9eedfd891f336e38c2nd for directives, unless they have been disabled with</p>
58699879a562774640b95e9eedfd891f336e38c2nd <Directory /><br />
58699879a562774640b95e9eedfd891f336e38c2nd AllowOverride None<br />
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive </Directory>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/configuring.html">Configuration Files</a></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
58699879a562774640b95e9eedfd891f336e38c2nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
58699879a562774640b95e9eedfd891f336e38c2nd<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
6b64034fa2a644ba291c484c0c01c7df5b8d982ckesscontent-type is <code>text/plain</code> or <code>text/html</code></td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd <p>This directive specifies a default value for the media type
58699879a562774640b95e9eedfd891f336e38c2nd charset parameter (the name of a character encoding) to be added
58699879a562774640b95e9eedfd891f336e38c2nd to a response if and only if the response's content-type is either
58699879a562774640b95e9eedfd891f336e38c2nd <code>text/plain</code> or <code>text/html</code>. This should override
58699879a562774640b95e9eedfd891f336e38c2nd any charset specified in the body of the response via a <code>META</code>
58699879a562774640b95e9eedfd891f336e38c2nd element, though the exact behavior is often dependent on the user's client
58699879a562774640b95e9eedfd891f336e38c2nd configuration. A setting of <code>AddDefaultCharset Off</code>
58699879a562774640b95e9eedfd891f336e38c2nd disables this functionality. <code>AddDefaultCharset On</code> enables
58699879a562774640b95e9eedfd891f336e38c2nd a default charset of <code>iso-8859-1</code>. Any other value is assumed
58699879a562774640b95e9eedfd891f336e38c2nd to be the <var>charset</var> to be used, which should be one of the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <a href="http://www.iana.org/assignments/character-sets">IANA registered
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd charset values</a> for use in MIME media types.
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick For example:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess AddDefaultCharset utf-8
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <p><code class="directive">AddDefaultCharset</code> should only be used when all
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick of the text resources to which it applies are known to be in that
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd character encoding and it is too inconvenient to label their charset
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd individually. One such example is to add the charset parameter
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd to resources containing generated content, such as legacy CGI
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd scripts, that might be vulnerable to cross-site scripting attacks
58699879a562774640b95e9eedfd891f336e38c2nd due to user-provided data being included in the output. Note, however,
58699879a562774640b95e9eedfd891f336e38c2nd that a better solution is to just fix (or delete) those scripts, since
58699879a562774640b95e9eedfd891f336e38c2nd setting a default charset does not protect users that have enabled
58699879a562774640b95e9eedfd891f336e38c2nd the "auto-detect character encoding" feature on their browser.</p>
58699879a562774640b95e9eedfd891f336e38c2nd<li><code class="directive"><a href="/mod/mod_mime.html#addcharset">AddCharset</a></code></li>
9583adab6bc4b3758e41963c905d9dad9f067131nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<div class="directive-section"><h2><a name="AddOutputFilterByType" id="AddOutputFilterByType">AddOutputFilterByType</a> <a name="addoutputfilterbytype" id="addoutputfilterbytype">Directive</a></h2>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>assigns an output filter to a particular MIME-type</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<var>MIME-type</var> [<var>MIME-type</var>] ...</code></td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</td></tr>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>This directive activates a particular output <a href="/filter.html">filter</a> for a request depending on the
77ead9e0262e4f08ec336d1a65b2edef7705c839nd response <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a>. Because of certain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd problems discussed below, this directive is deprecated. The same
77ead9e0262e4f08ec336d1a65b2edef7705c839nd functionality is available using <code class="module"><a href="/mod/mod_filter.html">mod_filter</a></code>.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The following example uses the <code>DEFLATE</code> filter, which
77ead9e0262e4f08ec336d1a65b2edef7705c839nd is provided by <code class="module"><a href="/mod/mod_deflate.html">mod_deflate</a></code>. It will compress all
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick output (either static or dynamic) which is labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> or <code>text/plain</code> before it is sent
77ead9e0262e4f08ec336d1a65b2edef7705c839nd to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you want the content to be processed by more than one filter, their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names have to be separated by semicolons. It's also possible to use one
003f0c9fda6664daf5092a0e42f65ede20098153slive <code class="directive">AddOutputFilterByType</code> directive for each of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess these filters.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The configuration below causes all script output labeled as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>text/html</code> to be processed at first by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <Location /cgi-bin/><br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
10673857794a4b3d9568ca2d983722a87ed352f1rbowen </Location>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>Enabling filters with <code class="directive">AddOutputFilterByType</code>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd may fail partially or completely in some cases. For example, no
10673857794a4b3d9568ca2d983722a87ed352f1rbowen filters are applied if the <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME-type</a> could not be determined and falls
10673857794a4b3d9568ca2d983722a87ed352f1rbowen back to the <code class="directive"><a href="#defaulttype">DefaultType</a></code> setting,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive even if the <code class="directive"><a href="#defaulttype">DefaultType</a></code> is the
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>However, if you want to make sure, that the filters will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive applied, assign the content type to a resource explicitly, for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example with <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#forcetype">ForceType</a></code>. Setting the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content type within a (non-nph) CGI script is also safe.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.46 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which contain encoded path separators (<code>%2F</code> for <code>/</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and additionally <code>%5C</code> for <code>\</code> on according systems)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem according systems) will be left as such in the otherwise decoded URL
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem string.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride All</code></td></tr>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When the server finds an <code>.htaccess</code> file (as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it needs to know which directives declared in that file can override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive earlier configuration directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>Only available in <Directory> sections</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">AllowOverride</code> is valid only in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory"><Directory></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections specified without regular expressions, not in <code class="directive"><a href="#location"><Location></a></code>, <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#files"><Files></a></code> sections.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>None</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="#accessfilename">.htaccess</a> files are completely ignored.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In this case, the server will not even attempt to read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>All</code>, then any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p>The <var>directive-type</var> can be one of the following
9ed9eaf871c58d281af02e76125ceadb5060afa5nd groupings of directives.</p>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna Allow use of the authorization directives (<code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <code class="directive"><a href="/mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_authn_core.html#authtype">AuthType</a></code>, <code class="directive"><a href="/mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code>, <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code>, <em>etc.</em>).</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Allow use of the directives controlling document types (<code class="directive"><a href="#defaulttype">DefaultType</a></code>, <code class="directive"><a href="#errordocument">ErrorDocument</a></code>, <code class="directive"><a href="#forcetype">ForceType</a></code>, <code class="directive"><a href="/mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="#sethandler">SetHandler</a></code>, <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>, <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code class="module"><a href="/mod/mod_mime.html">mod_mime</a></code> Add* and Remove*
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd directives, <em>etc.</em>), document meta data (<code class="directive"><a href="/mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="/mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="/mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="/mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="/mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="/mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="/mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="/mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="/mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="/mod/mod_usertrack.html#cookiename">CookieName</a></code>),
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code> directives <code class="directive"><a href="/mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="/mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="/mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="/mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) and
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_actions.html">mod_actions</a></code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling directory indexing
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes (<code class="directive"><a href="/mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code class="directive"><a href="/mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="/mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code class="directive"><a href="/mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="/mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Allow use of the directives controlling host access (<code class="directive"><a href="/mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="/mod/mod_authz_host.html#deny">Deny</a></code> and <code class="directive"><a href="/mod/mod_authz_host.html#order">Order</a></code>).</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow use of the directives controlling specific directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess features (<code class="directive"><a href="#options">Options</a></code> and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code class="directive"><a href="/mod/mod_include.html#xbithack">XBitHack</a></code>).
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes An equal sign may be given followed by a comma (but no spaces)
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride AuthConfig Indexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the example above all directives that are neither in the group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl<li><a href="/configuring.html">Configuration Files</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause all CGI script files with a <code>.foo</code> extension to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be passed to the FOO interpreter.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
76f2a3125fb6aca59d43b02220dabac91175a281slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive respectively RFC2616.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>MD5 is an algorithm for computing a "message digest"
c14037646789087319802aaada2e8534ccab0158slive (sometimes called "fingerprint") of arbitrary-length data, with
c14037646789087319802aaada2e8534ccab0158slive a high degree of confidence that any alterations in the data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be reflected in alterations in the message digest.</p>
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq <p>The <code>Content-MD5</code> header provides an end-to-end
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq message integrity check (MIC) of the entity-body. A proxy or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client may check this header for detecting accidental
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modification of the entity-body in transit. Example header:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq values are not cached).</p>
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq <p><code>Content-MD5</code> is only sent for documents served
dcfabbc1bf4b0aa835e0c5ba7da3e8d12d8299c7niq by the <code class="module"><a href="/mod/core.html">core</a></code>, and not by any module. For example,
e4881891552e185a7408318dfc7f62ebabe73cf6niq SSI documents, output from CGI scripts, and byte range responses
e4881891552e185a7408318dfc7f62ebabe73cf6niq do not have this header.</p>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>MIME content-type that will be sent if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver cannot determine a type in any other way</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>MIME-type|none</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType text/plain</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>There will be times when the server is asked to provide a
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl document whose type cannot be determined by its <a class="glossarylink" href="/glossary.html#mime-type" title="see glossary">MIME types</a> mappings.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>The server SHOULD inform the client of the content-type of the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl document. If the server is unable to determine this by normal
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl means, it will set it to the configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would be appropriate for a directory which contained many GIF
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive images with filenames missing the <code>.gif</code> extension.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In cases where it can neither be determined by the server nor
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the administrator (e.g. a proxy), it is preferable to omit the MIME
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type altogether rather than provide information that may be false.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This can be accomplished using</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DefaultType None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>DefaultType None is only available in httpd-2.2.7 and later.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Note that unlike <code class="directive"><a href="#forcetype">ForceType</a></code>, this directive only
003f0c9fda6664daf5092a0e42f65ede20098153slive provides the default mime-type. All other mime-type definitions,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd including filename extensions, that might identify the media type
003f0c9fda6664daf5092a0e42f65ede20098153slive will override this default.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the existence of a variable</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Equivalent to passing the <code>-D</code> argument to <a href="/programs/httpd.html">httpd</a>.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections without needing to alter
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
fb77c505254b6e9c925e23e734463e87574f8f40kessnamed file-system directory and sub-directories</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
030108b1816bcda3d925df65357feabdce83bc94slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><Directory></code> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code></Directory></code> are used to enclose a group of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives that will apply only to the named directory and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd sub-directories of that directory. Any directive that is allowed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd in a directory context may be used. <var>Directory-path</var> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd either the full path to a directory, or a wild-card string using
fb77c505254b6e9c925e23e734463e87574f8f40kess Unix shell-style matching. In a wild-card string, <code>?</code> matches
fb77c505254b6e9c925e23e734463e87574f8f40kess any single character, and <code>*</code> matches any sequences of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive characters. You may also use <code>[]</code> character ranges. None
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess of the wildcards match a `/' character, so <code><Directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess /*/public_html></code> will not match
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/home/user/public_html</code>, but <code><Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /home/*/public_html></code> will match. Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options Indexes FollowSymLinks<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Be careful with the <var>directory-path</var> arguments:
130d299c4b2b15be45532a176604c71fdc7bea5bnd They have to literally match the filesystem path which Apache uses
130d299c4b2b15be45532a176604c71fdc7bea5bnd to access the files. Directives applied to a particular
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code><Directory></code> will not apply to files accessed from
130d299c4b2b15be45532a176604c71fdc7bea5bnd that same directory via a different path, such as via different symbolic
130d299c4b2b15be45532a176604c71fdc7bea5bnd links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions</a> can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory ~ "^/www/.*/[0-9]{3}">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess match the directory (or one of its parents) containing a document,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then the directives are applied in the order of shortest match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory /><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd AllowOverride None<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <Directory /home/><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AllowOverride FileInfo<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </Directory>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>for access to the document <code>/home/web/dir/doc.html</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Regular expressions are not considered until after all of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd normal sections have been applied. Then all of the regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions are tested in the order they appeared in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file. For example, with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory ~ abc$><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ... directives here ...<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>the regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all normal <code class="directive"><Directory></code>s and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>.htaccess</code> files have been applied. Then the regular
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess expression will match on <code>/home/abc/public_html/abc</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the corresponding <code class="directive"><Directory></code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be applied.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code><Directory /></code> is <code>Allow from All</code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This means that Apache will serve any file mapped from an URL. It is
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess recommended that you change this with a block such
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>want</em> accessible. See the <a href="/misc/security_tips.html">Security Tips</a> page for more
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The directory sections occur in the <code>httpd.conf</code> file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><Directory></code> directives
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen cannot nest, and cannot appear in a <code class="directive"><a href="#limit"><Limit></a></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location> and <Files> sections work</a> for an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive explanation of how these different sections are combined when a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is received</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefile-system directories matching a regular expression and their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><DirectoryMatch></code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code></DirectoryMatch></code> are used to enclose a group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of directives which will apply only to the named directory and
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd sub-directories of that directory, the same as <code class="directive"><a href="#directory"><Directory></a></code>. However, it
fb77c505254b6e9c925e23e734463e87574f8f40kess takes as an argument a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <DirectoryMatch "^/www/(.+/)?[0-9]{3}">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match directories in <code>/www/</code> that consisted of three
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd numbers.</p>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<li><code class="directive"><a href="#directory"><Directory></a></code> for
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckessa description of how regular expressions are mixed in with normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How <Directory>, <Location> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<Files> sections work</a> for an explanation of how these different
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesections are combined when a request is received</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This directive sets the directory from which <code class="program"><a href="/programs/httpd.html">httpd</a></code>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp will serve files. Unless matched by a directive like <code class="directive"><a href="/mod/mod_alias.html#alias">Alias</a></code>, the server appends the
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd path from the requested URL to the document root to make the
003f0c9fda6664daf5092a0e42f65ede20098153slive path to the document. Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>then an access to
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <code>http://www.my.host.com/index.html</code> refers to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>The <code class="directive">DocumentRoot</code> should be specified without
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd a trailing slash.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive controls whether the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess memory-mapping if it needs to read the contents of a file during
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess delivery. By default, when the handling of a request requires
41ef8b3051855b802104193ee0a587515af60a37wrowe access to the data within a file -- for example, when delivering a
41ef8b3051855b802104193ee0a587515af60a37wrowe server-parsed file using <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> -- Apache
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-maps the file if the OS supports it.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This memory-mapping sometimes yields a performance improvement.
41ef8b3051855b802104193ee0a587515af60a37wrowe But in some environments, it is better to disable the memory-mapping
41ef8b3051855b802104193ee0a587515af60a37wrowe to prevent operational problems:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>On some multiprocessor systems, memory-mapping can reduce the
41ef8b3051855b802104193ee0a587515af60a37wrowe performance of the <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</li>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>With an NFS-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code>,
41ef8b3051855b802104193ee0a587515af60a37wrowe the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may crash due to a segmentation fault if a file
41ef8b3051855b802104193ee0a587515af60a37wrowe is deleted or truncated while the <code class="program"><a href="/programs/httpd.html">httpd</a></code> has it
9fb925624300c864fe3969a264e52aa83f3c2dd0slive memory-mapped.</li>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>For server configurations that are vulnerable to these problems,
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd you should disable memory-mapping of delivered files by specifying:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>For NFS mounted files, this feature may be disabled explicitly for
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the offending files by specifying:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe <Directory "/path-to-nfs-files">
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
9fb925624300c864fe3969a264e52aa83f3c2dd0slive </Directory>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use the kernel sendfile support to deliver files to the client</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile On</code></td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive controls whether <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use the
41ef8b3051855b802104193ee0a587515af60a37wrowe sendfile support from the kernel to transmit file contents to the client.
41ef8b3051855b802104193ee0a587515af60a37wrowe By default, when the handling of a request requires no access
fb77c505254b6e9c925e23e734463e87574f8f40kess to the data within a file -- for example, when delivering a
9fb925624300c864fe3969a264e52aa83f3c2dd0slive static file -- Apache uses sendfile to deliver the file contents
41ef8b3051855b802104193ee0a587515af60a37wrowe without ever reading the file if the OS supports it.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This sendfile mechanism avoids separate read and send operations,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and buffer allocations. But on some platforms or within some
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess filesystems, it is better to disable this feature to avoid
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess operational problems:</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <li>Some platforms may have broken sendfile support that the build
af18698b10b429b270551ca3a5d51a75e1c9db22brianp system did not detect, especially if the binaries were built on
af18698b10b429b270551ca3a5d51a75e1c9db22brianp another box and moved to such a machine with broken sendfile
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux the use of sendfile triggers TCP-checksum
003f0c9fda6664daf5092a0e42f65ede20098153slive offloading bugs on certain networking cards when using IPv6.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux on Itanium, sendfile may be unable to handle files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd over 2GB in size.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS or SMB),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the kernel may be unable to serve the network file through
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own cache.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS or SMB mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Directory "/path-to-nfs-files">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Quoting syntax for text messages is different in Apache
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the event of a problem or error, Apache can be configured
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to do one of four things,</p>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to a local <var>URL-path</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to an external <var>URL</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>The first option is the default, while options 2-4 are
f7fe99050600166042c04b8e595fb75499eed7f0geoff configured using the <code class="directive">ErrorDocument</code>
f7fe99050600166042c04b8e595fb75499eed7f0geoff directive, which is followed by the HTTP response code and a URL
f7fe99050600166042c04b8e595fb75499eed7f0geoff or a message. Apache will sometimes offer additional information
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>URLs can begin with a slash (/) for local web-paths (relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive full URL which the client can resolve. Alternatively, a message
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be provided to be displayed by the browser. Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 403 "Sorry can't allow you access today"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Additionally, the special value <code>default</code> can be used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to specify Apache's simple hardcoded message. While not required
fb77c505254b6e9c925e23e734463e87574f8f40kess under normal circumstances, <code>default</code> will restore
fb77c505254b6e9c925e23e734463e87574f8f40kess Apache's simple hardcoded message for configurations that would
fb77c505254b6e9c925e23e734463e87574f8f40kess otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess ErrorDocument 404 default<br />
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive </Directory>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>Note that when you specify an <code class="directive">ErrorDocument</code>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive that points to a remote URL (ie. anything with a method such as
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <code>http</code> in front of it), Apache will send a redirect to the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive client to tell it where to find the document, even if the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive document ends up being on the same server. This has several
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive implications, the most important being that the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the original error status code, but instead will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive a redirect status code. This in turn can confuse web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive robots and other clients which try to determine if a URL is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive valid using the status code. In addition, if you use a remote
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL in an <code>ErrorDocument 401</code>, the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive know to prompt the user for a password since it will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the 401 status code. Therefore, <strong>if you use an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ErrorDocument 401</code> directive then it must refer to a local
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Microsoft Internet Explorer (MSIE) will by default ignore
3209c0009829fcf63b6213fb9c43d534f7906006slive server-generated error messages when they are "too small" and substitute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own "friendly" error messages. The size threshold varies depending on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the type of error, but in general, if you make your error document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive greater than 512 bytes, then MSIE will show the server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error rather than masking it. More information is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <p>Although most error messages can be overriden, there are certain
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess circumstances where the internal messages are used regardless of the
fb109b84906e3ee61680aa289953c2f9e859354erbowen setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
fb109b84906e3ee61680aa289953c2f9e859354erbowen particular, if a malformed request is detected, normal request processing
fb109b84906e3ee61680aa289953c2f9e859354erbowen will be immediately halted and the internal error message returned.
fb109b84906e3ee61680aa289953c2f9e859354erbowen This is necessary to guard against security problems caused by
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess bad requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Prior to version 2.0, messages were indicated by prefixing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them with a single unmatched double quote character.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ErrorLog</code> directive sets the name of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the file to which the server will log any errors it encounters. If
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick the <var>file-path</var> is not absolute then it is assumed to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive begins with a pipe (|) then it is assumed to be a command to spawn
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to handle the error log.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Using <code>syslog</code> instead of a filename enables logging
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive via syslogd(8) if the system supports it. The default is to use
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd syslog facility <code>local7</code>, but you can override this by
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele using the <code>syslog:<var>facility</var></code> syntax where
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>facility</var> can be one of the names usually documented in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive syslog(1).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog syslog:user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>SECURITY: See the <a href="/misc/security_tips.html#serverroot">security tips</a>
fb77c505254b6e9c925e23e734463e87574f8f40kess document for details on why your security could be compromised
fb77c505254b6e9c925e23e734463e87574f8f40kess if the directory where log files are stored is writable by
fb77c505254b6e9c925e23e734463e87574f8f40kess anyone other than the user that starts the server.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When entering a file path on non-Unix platforms, care should be taken
fb77c505254b6e9c925e23e734463e87574f8f40kess to make sure that only forward slashed are used even though the platform
fb77c505254b6e9c925e23e734463e87574f8f40kess may allow the use of back slashes. In general it is a good idea to always
fb77c505254b6e9c925e23e734463e87574f8f40kess use forward slashes throughout the configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The <code class="directive">FileETag</code> directive configures the file
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd attributes that are used to create the <code>ETag</code> (entity
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd tag) response header field when the document is based on a file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (The <code>ETag</code> value is used in cache management to save
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd network bandwidth.) In Apache 1.3.22 and earlier, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from the file's inode, size, and last-modified time (mtime). The
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">FileETag</code> directive allows you to choose
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem which of these -- if any -- should be used. The recognized keywords are:
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dd>The file's i-node number will be included in the calculation</dd>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <dd>The date and time the file was last modified will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The number of bytes in the file will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All available fields will be used. This is equivalent to:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>If a document is file-based, no <code>ETag</code> field will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd included in the response</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
003f0c9fda6664daf5092a0e42f65ede20098153slive keywords may be prefixed with either <code>+</code> or <code>-</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow changes to be made to the default setting inherited
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a broader scope. Any keyword appearing without such a prefix
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive immediately and completely cancels the inherited setting.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>If a directory's configuration includes
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>FileETag INode MTime Size</code>, and a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess subdirectory's includes <code>FileETag -INode</code>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the setting for that subdirectory (which will be inherited by
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess any sub-subdirectories that don't override it) will be equivalent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Do not change the default for directories or locations that have WebDAV
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled and use <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode MTime Size</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a fixed format for <code>ETag</code> comparisons on conditional requests.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive These conditional requests will break if the <code>ETag</code> format is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Directive</a></h2>
030108b1816bcda3d925df65357feabdce83bc94slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive"><Files></code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by filename. It is comparable
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess to the <code class="directive"><a href="#directory"><Directory></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code class="directive"><a href="#location"><Location></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives. It should be matched with a <code></Files></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. The directives given within this section will be applied to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any object with a basename (last component of filename) matching the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified filename. <code class="directive"><Files></code>
fb77c505254b6e9c925e23e734463e87574f8f40kess sections are processed in the order they appear in the
fb77c505254b6e9c925e23e734463e87574f8f40kess configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that <code class="directive"><Files></code> can be nested
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess portion of the filesystem they apply to.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>filename</var> argument should include a filename, or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a wild-card string, where <code>?</code> matches any single character,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>*</code> matches any sequences of characters.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
003f0c9fda6664daf5092a0e42f65ede20098153slive can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Files ~ "\.(gif|jpe?g|png)$">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive however.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Note that unlike <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#location"><Location></a></code> sections, <code class="directive"><Files></code> sections can be used inside
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>.htaccess</code> files. This allows users to control access to
030108b1816bcda3d925df65357feabdce83bc94slive their own files, at a file-by-file level.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How <Directory>, <Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <Files> sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive"><FilesMatch></code> directive
003f0c9fda6664daf5092a0e42f65ede20098153slive limits the scope of the enclosed directives by filename, just as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#files"><Files></a></code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive does. However, it accepts a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
fb77c505254b6e9c925e23e734463e87574f8f40kess <FilesMatch "\.(gif|jpe?g|png)$">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How <Directory>, <Location>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and <Files> sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>MIME-type</var>|None</code></td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved to the core in Apache 2.0</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#directory"><Directory></a></code>, or
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#location"><Location></a></code> or
7654193c1faf603feec999850322ad79e6c551bcnd <code class="directive"><a href="#files"><Files></a></code>
7654193c1faf603feec999850322ad79e6c551bcnd section, this directive forces all matching files to be served
7654193c1faf603feec999850322ad79e6c551bcnd with the content type identification given by
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <var>MIME-type</var>. For example, if you had a directory full of
7654193c1faf603feec999850322ad79e6c551bcnd GIF files, but did not want to label them all with <code>.gif</code>,
7654193c1faf603feec999850322ad79e6c551bcnd you might want to use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that unlike <code class="directive"><a href="#defaulttype">DefaultType</a></code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive this directive overrides all mime-type associations, including
fb77c505254b6e9c925e23e734463e87574f8f40kess filename extensions, that might identify the media type.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override any <code class="directive">ForceType</code> setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location /images><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # but normal mime-type associations here:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>This directive enables DNS lookups so that host names can be
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd The value <code>Double</code> refers to doing double-reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DNS lookup. That is, after a reverse lookup is performed, a forward
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup is then performed on that result. At least one of the IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addresses in the forward lookup must match the original
750d12c59545dbbac70390988de94f7e901b08f2niq address. (In "tcpwrappers" terminology this is called
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Regardless of the setting, when <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code> is
750d12c59545dbbac70390988de94f7e901b08f2niq used for controlling access by hostname, a double reverse lookup
750d12c59545dbbac70390988de94f7e901b08f2niq will be performed. This is necessary for security. Note that the
750d12c59545dbbac70390988de94f7e901b08f2niq result of this double-reverse isn't generally available unless you
750d12c59545dbbac70390988de94f7e901b08f2niq set <code>HostnameLookups Double</code>. For example, if only
750d12c59545dbbac70390988de94f7e901b08f2niq <code>HostnameLookups On</code> and a request is made to an object
750d12c59545dbbac70390988de94f7e901b08f2niq that is protected by hostname restrictions, regardless of whether
750d12c59545dbbac70390988de94f7e901b08f2niq the double-reverse fails or not, CGIs will still be passed the
750d12c59545dbbac70390988de94f7e901b08f2niq <p>The default is <code>Off</code> in order to save the network
750d12c59545dbbac70390988de94f7e901b08f2niq traffic for those sites that don't truly need the reverse
750d12c59545dbbac70390988de94f7e901b08f2niq lookups done. It is also better for the end users because they
750d12c59545dbbac70390988de94f7e901b08f2niq don't have to suffer the extra latency that a lookup entails.
750d12c59545dbbac70390988de94f7e901b08f2niq Heavily loaded sites should leave this directive
750d12c59545dbbac70390988de94f7e901b08f2niq <code>Off</code>, since DNS lookups can take considerable
750d12c59545dbbac70390988de94f7e901b08f2niq amounts of time. The utility <code class="program"><a href="/programs/logresolve.html">logresolve</a></code>, compiled by
750d12c59545dbbac70390988de94f7e901b08f2niq default to the <code>bin</code> subdirectory of your installation
750d12c59545dbbac70390988de94f7e901b08f2niq directory, can be used to look up host names from logged IP addresses
750d12c59545dbbac70390988de94f7e901b08f2niq offline.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
750d12c59545dbbac70390988de94f7e901b08f2niq<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">Directive</a></h2>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive"><If></code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive evaluates an expression at runtime, and applies the enclosed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives if and only if the expression evaluates to true.
003f0c9fda6664daf5092a0e42f65ede20098153slive For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <If "$req{Host} = ''">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How <Directory>, <Location>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Files> sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><If></code> has the same precedence
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and usage as <code class="directive"><Files></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code><IfDefine <var>test</var>>...</IfDefine>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> section is used to mark directives that are conditional. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives within an <code class="directive"><IfDefine></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
130d299c4b2b15be45532a176604c71fdc7bea5bnd ignored.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>In the former case, the directives between the start and end
955d7fc3e7adb6463b7243e15c04e858718e799etakashi markers are only processed if the parameter named
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <var>parameter-name</var> is defined. The second format reverses
955d7fc3e7adb6463b7243e15c04e858718e799etakashi the test, and only processes the directives if
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <var>parameter-name</var> is <strong>not</strong> defined.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>The <var>parameter-name</var> argument is a define as given on the
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <code class="program"><a href="/programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p><code class="directive"><IfDefine></code> sections are
955d7fc3e7adb6463b7243e15c04e858718e799etakashi nest-able, which can be used to implement simple
955d7fc3e7adb6463b7243e15c04e858718e799etakashi multiple-parameter tests. Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd httpd -DReverseProxy ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <IfDefine ReverseProxy><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule rewrite_module modules/mod_rewrite.so<br />
55d36f9b61520c2374ab463e77e8a62daa416398nd </IfDefine>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code><IfModule <var>test</var>>...</IfModule></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section is used to mark directives that are conditional on the presence of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var>
55d36f9b61520c2374ab463e77e8a62daa416398nd is true. If <var>test</var> is false, everything between the start and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive end markers is ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the former case, the directives between the start and end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive markers are only processed if the module named <var>module</var>
55d36f9b61520c2374ab463e77e8a62daa416398nd is included in Apache -- either compiled in or
55d36f9b61520c2374ab463e77e8a62daa416398nd dynamically loaded using <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
55d36f9b61520c2374ab463e77e8a62daa416398nd and only processes the directives if <var>module</var> is
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>The <var>module</var> argument can be either the module identifier or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the file name of the module, at the time it was compiled. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mod_rewrite.c</code> is the file name. If a module consists of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive several source files, use the name of the file containing the string
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p><code class="directive"><IfModule></code> sections are
fb77c505254b6e9c925e23e734463e87574f8f40kess nest-able, which can be used to implement simple multiple-module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note">This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive placed in <code class="directive"><IfModule></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Wildcard matching available in 2.0.41 and later</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive allows inclusion of other configuration files
7b5535ed88e0f561b3bfb3330137bd804846afd4slive from within the server configuration files.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
7b5535ed88e0f561b3bfb3330137bd804846afd4slive include several files at once, in alphabetical order. In
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd addition, if <code class="directive">Include</code> points to a directory,
7b5535ed88e0f561b3bfb3330137bd804846afd4slive rather than a file, Apache will read all files in that directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and any subdirectory. But including entire directories is not
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess recommended, because it is easy to accidentally leave temporary
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess files in a directory that can cause <code class="program"><a href="/programs/httpd.html">httpd</a></code> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path, or may be relative
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Running <code>apachectl configtest</code> will give you a list
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the files that are being processed during the configuration
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd check:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive root@host# apachectl configtest<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/ssl.conf<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The Keep-Alive extension to HTTP/1.0 and the persistent
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess connection feature of HTTP/1.1 provide long-lived HTTP sessions
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow multiple requests to be sent over the same TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection. In some cases this has been shown to result in an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive almost 50% speedup in latency times for HTML documents with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive many images. To enable Keep-Alive connections, set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI pages, and server-generated directory listings will
891df99fdfa41fc8a486568f4d31ddf4a571258adreid generally not use Keep-Alive connections to HTTP/1.0 clients.
891df99fdfa41fc8a486568f4d31ddf4a571258adreid For HTTP/1.1 clients, persistent connections are the default
891df99fdfa41fc8a486568f4d31ddf4a571258adreid unless otherwise specified. If the client requests it, chunked
891df99fdfa41fc8a486568f4d31ddf4a571258adreid encoding will be used in order to send content of unknown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive length over persistent connections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the MaxRequestsPerChild directive, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of how many requests are sent using the connection.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>seconds</var></code></td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>The number of seconds Apache will wait for a subsequent
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick request before closing the connection. Once a request has been
c6f90ef0e93c077924fd0c3c0200dba0cb1777c6takashi received, the timeout value specified by the
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi may cause performance problems in heavily loaded servers. The
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick higher the timeout, the more server processes will be kept
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick occupied waiting on connections with idle clients.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Access controls are normally effective for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>all</strong> access methods, and this is the usual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive desired behavior. <strong>In the general case, access control
130d299c4b2b15be45532a176604c71fdc7bea5bnd directives should not be placed within a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><Limit></code> section.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The purpose of the <code class="directive"><Limit></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to restrict the effect of the access controls to the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess nominated HTTP methods. For all other methods, the access
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess effect</strong>. The following example applies the access control
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess only to the methods <code>POST</code>, <code>PUT</code>, and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>DELETE</code>, leaving all other methods unprotected:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <Limit POST PUT DELETE><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Require valid-user<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Limit>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The method names listed can be one or more of: <code>GET</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd case-sensitive.</strong> If <code>GET</code> is used it will also
6c5c651b0b97607b8c8b4965c1385c67699f217fnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
750d12c59545dbbac70390988de94f7e901b08f2niq cannot be limited (see <code class="directive"><a href="#traceenable"><TraceEnable></a></code>).</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive used in preference to a <code class="directive"><a href="#limit"><Limit></a></code> section when restricting access,
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive against arbitrary methods.</div>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><LimitExcept></code> and
003f0c9fda6664daf5092a0e42f65ede20098153slive a group of access control directives which will then apply to any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive HTTP access method <strong>not</strong> listed in the arguments;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive both standard and nonstandard/unrecognized methods. See the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LimitExcept POST GET><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </LimitExcept>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.47 and later</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>An internal redirect happens, for example, when using the <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> directive, which internally
03e0a375c2435102fb2b51e34cccff52acbfddcdnd redirects the original request to a CGI script. A subrequest is Apache's
03e0a375c2435102fb2b51e34cccff52acbfddcdnd mechanism to find out what would happen for some URI if it were requested.
03e0a375c2435102fb2b51e34cccff52acbfddcdnd For example, <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
a51fafd9c1463954daf49f94e76d078c1eb5c9bdnd files listed in the <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directive.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p><code class="directive">LimitInternalRecursion</code> prevents the server
03e0a375c2435102fb2b51e34cccff52acbfddcdnd from crashing when entering an infinite loop of internal redirects or
03e0a375c2435102fb2b51e34cccff52acbfddcdnd subrequests. Such loops are usually caused by misconfigurations.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The directive stores two different limits, which are evaluated on
03e0a375c2435102fb2b51e34cccff52acbfddcdnd per-request basis. The first <var>number</var> is the maximum number of
03e0a375c2435102fb2b51e34cccff52acbfddcdnd internal redirects, that may follow each other. The second <var>number</var>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd determines, how deep subrequests may be nested. If you specify only one
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <var>number</var>, it will be assigned to both limits.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd LimitInternalRecursion 5
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var> from 0
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestBody</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
003f0c9fda6664daf5092a0e42f65ede20098153slive message body within the context in which the directive is given
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
89ea3e2b9591820407538ac250ec49a0f4f056d2nd the resource and the methods allowed on that resource. CGI scripts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive typically use the message body for retrieving form information.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Implementations of the <code>PUT</code> method will require
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a value at least as large as any representation that the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wishes to accept for that resource.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attacks.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If, for example, you are permitting file upload to a particular
fb77c505254b6e9c925e23e734463e87574f8f40kess location, and wish to limit the size of the uploaded file to 100K,
fb77c505254b6e9c925e23e734463e87574f8f40kess you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>Number</var> is an integer from 0 (meaning unlimited) to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd distributed).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestFields</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to modify the limit on the number of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request header fields allowed in an HTTP request. A server needs
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd this value to be larger than the number of fields that a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client request might include. The number of request header fields
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used by a client rarely exceeds 20, but this may vary among
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different client implementations, often depending upon the extent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which a user has configured their browser to support detailed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content negotiation. Optional HTTP extensions are often expressed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using request header fields.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFields 50
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen <p>The <code class="directive">LimitRequestFieldSize</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the allowed size of an HTTP request header field. A server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive needs this value to be large enough to hold any one header field
72580dbc2a55511f13f377063725b9f143b20826stoddard from a normal client request. The size of a normal request header
72580dbc2a55511f13f377063725b9f143b20826stoddard field will vary greatly among different client implementations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive often depending upon the extent to which a user has configured
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess their browser to support detailed content negotiation. SPNEGO
72580dbc2a55511f13f377063725b9f143b20826stoddard authentication headers can be up to 12392 bytes.</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard <p>This directive gives the server administrator greater
72580dbc2a55511f13f377063725b9f143b20826stoddard control over abnormal client request behavior, which may be
72580dbc2a55511f13f377063725b9f143b20826stoddard useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFieldSize 4094
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <div class="note">Under normal conditions, the value should not be changed from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the default.</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the number of <var>bytes</var> that will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd allowed on the HTTP request-line.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">LimitRequestLine</code> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to reduce or increase the limit on the allowed size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of a client's HTTP request-line. Since the request-line consists of the
72580dbc2a55511f13f377063725b9f143b20826stoddard HTTP method, URI, and protocol version, the
72580dbc2a55511f13f377063725b9f143b20826stoddard <code class="directive">LimitRequestLine</code> directive places a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restriction on the length of a request-URI allowed for a request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the server. A server needs this value to be large enough to
72580dbc2a55511f13f377063725b9f143b20826stoddard hold any of its resource names, including any information that
72580dbc2a55511f13f377063725b9f143b20826stoddard might be passed in the query part of a <code>GET</code> request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestLine 4094
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <div class="note">Under normal conditions, the value should not be changed from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the default.</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Limit (in bytes) on maximum size of an XML-based request
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele body. A value of <code>0</code> will disable any checking.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitXMLRequestBody 0
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Directive</a></h2>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Location
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive"><Location></code> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess limits the scope of the enclosed directives by URL. It is similar to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory"><Directory></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, and starts a subsection which is terminated with a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><Location></code> sections operate
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive completely outside the filesystem. This has several consequences.
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd Most importantly, <code class="directive"><Location></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives should not be used to control access to filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive locations. Since several different URLs may map to the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem location, such access controls may by circumvented.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note"><h3>When to use <code class="directive"><Location></code></h3>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>Use <code class="directive"><Location></code> to apply
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive directives to content that lives outside the filesystem. For
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive content that lives in the filesystem, use <code class="directive"><a href="#directory"><Directory></a></code> and <code class="directive"><a href="#files"><Files></a></code>. An exception is
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <code><Location /></code>, which is an easy way to
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive apply a configuration to the entire server.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>For all origin (non-proxy) requests, the URL to be matched is a
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive URL-path of the form <code>/path/</code>. No scheme, hostname,
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive port, or query string may be included. For proxy requests, the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive URL to be matched is of the form
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <code>scheme://servername/path</code>, and you must include the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive prefix.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive any single character, and <code>*</code> matches any sequences of
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive characters. Neither wildcard character matches a / in the URL-path.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
dc223428958ad9ff05011545bcdda000887b93e5slive can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location ~ "/(extra|special)/data">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match URLs that contained the substring <code>/extra/data</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves
d8c44cd75cf575fe51319280c12445109e878523noodl identical to the regex version of <code class="directive"><Location></code>.</p>
030108b1816bcda3d925df65357feabdce83bc94slive <p>The <code class="directive"><Location></code>
030108b1816bcda3d925df65357feabdce83bc94slive functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#sethandler">SetHandler</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive. For example, to enable status requests, but allow them
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd only from browsers at <code>foo.com</code>, you might use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location /status><br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess SetHandler server-status<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Order Deny,Allow<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
e8811b6d38f756b325446ded5d96857d13856511takashi <p>The slash character has special meaning depending on where in a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL it appears. People may be used to its behavior in the filesystem
130d299c4b2b15be45532a176604c71fdc7bea5bnd where multiple adjacent slashes are frequently collapsed to a single
130d299c4b2b15be45532a176604c71fdc7bea5bnd slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/foo</code>). In URL-space this is not necessarily true.
130d299c4b2b15be45532a176604c71fdc7bea5bnd The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple
130d299c4b2b15be45532a176604c71fdc7bea5bnd slashes if that is your intention.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example, <code><LocationMatch ^/abc></code> would match
130d299c4b2b15be45532a176604c71fdc7bea5bnd the request URL <code>/abc</code> but not the request URL <code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd implicitly match multiple slashes with a single slash. For example,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd if you specify <code><Location /abc/def></code> and the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request is to <code>/abc//def</code> then it will match.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/sections.html">How <Directory>, <Location>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and <Files> sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>regex</var>> ... </LocationMatch></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive"><LocationMatch></code> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by URL, in an identical manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to <code class="directive"><a href="#location"><Location></a></code>. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it takes a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an argument instead of a simple string. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LocationMatch "/(extra|special)/data">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<li><a href="/sections.html">How <Directory>, <Location>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and <Files> sections work</a> for an explanation of how these
030108b1816bcda3d925df65357feabdce83bc94slive different sections are combined when a request is received</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>level</var></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p><code class="directive">LogLevel</code> adjusts the verbosity of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"getpwuid: couldn't determine user name from uid"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"socket: Failed to get a socket, exiting child"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"child process 1234 did not exit, sending another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SIGHUP"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Server seems busy, (you may need to increase
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a particular level is specified, messages from all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive other levels of higher significance will be reported as well.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then messages with log levels of <code>notice</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LogLevel notice
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When logging to a regular file messages of the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>notice</code> cannot be suppressed and thus are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged. However, this doesn't apply when logging is done
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
8b052d682204371decc64f942aede5ef1da98955erikabele <p>The <code class="directive">MaxKeepAliveRequests</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the number of requests allowed per connection when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set to <code>0</code>, unlimited requests will be allowed. We
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommend that this setting be kept to a high value for maximum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server performance.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele MaxKeepAliveRequests 500
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code class="directive">NameVirtualHost</code> directive is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd required directive if you want to configure <a href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Although <var>addr</var> can be hostname it is recommended
003f0c9fda6664daf5092a0e42f65ede20098153slive NameVirtualHost 111.22.33.44
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With the <code class="directive">NameVirtualHost</code> directive you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specify the IP address on which the server will receive requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the name-based virtual hosts. This will usually be the address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which your name-based virtual host names resolve. In cases
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where a firewall or other proxy receives the requests and forwards
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them on a different IP address to the server, you must specify the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive IP address of the physical interface on the machine which will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd servicing the requests. If you have multiple name-based hosts on
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd multiple addresses, repeat the directive for each address.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note, that the "main server" and any <code>_default_</code> servers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">NameVirtualHost</code> IP address (unless for some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reason you specify <code class="directive">NameVirtualHost</code> but then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive don't define any <code class="directive">VirtualHost</code>s for that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Optionally you can specify a port number on which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 111.22.33.44:8080
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>IPv6 addresses must be enclosed in square brackets, as shown
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick in the following example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>To receive requests on all interfaces, you can use an argument of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd NameVirtualHost *
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <div class="note"><h3>Argument to <code class="directive"><VirtualHost></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive</h3>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that the argument to the <code class="directive"><VirtualHost></code> directive must
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 1.2.3.4<br />
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen <VirtualHost 1.2.3.4><br />
fb77c505254b6e9c925e23e734463e87574f8f40kess # ...<br />
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen </VirtualHost><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options All</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive">Options</code> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All options except for <code>MultiViews</code>. This is the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts using <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will follow symbolic links in this directory.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Even though the server follows the symlink it does <em>not</em>
fb77c505254b6e9c925e23e734463e87574f8f40kess change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note also, that this option <strong>gets ignored</strong> if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside a <code class="directive"><a href="#location"><Location></a></code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Omitting this option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
13e5182a0c199ecc7a73db97b6448a544e940868slive circumventable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes provided by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd are permitted.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Server-side includes are permitted, but the <code>#exec
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd cmd</code> and <code>#exec cgi</code> are disabled. It is still
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive possible to <code>#include virtual</code> CGI scripts from
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive directories.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and there
13e5182a0c199ecc7a73db97b6448a544e940868slive is no <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
13e5182a0c199ecc7a73db97b6448a544e940868slive (<em>e.g.</em>, <code>index.html</code>) in that directory, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess of the directory.</dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive <a href="/content-negotiation.html">Content negotiated</a>
13e5182a0c199ecc7a73db97b6448a544e940868slive "MultiViews" are allowed using
b00583f8e126bbb00b06dcf06af06c9d07978701kess <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The server will only follow symbolic links for which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive target file or directory is owned by the same user id as the
13e5182a0c199ecc7a73db97b6448a544e940868slive <div class="note"><h3>Note</h3> <p>This option gets ignored if
13e5182a0c199ecc7a73db97b6448a544e940868slive set inside a <code class="directive"><a href="#location"><Location></a></code> section.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>This option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Normally, if multiple <code class="directive">Options</code> could
13e5182a0c199ecc7a73db97b6448a544e940868slive apply to a directory, then the most specific one is used and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive others are ignored; the options are not merged. (See <a href="/sections.html#mergin">how sections are merged</a>.)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">Options</code> directive are preceded by a
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>+</code> or <code>-</code> symbol, the options are
13e5182a0c199ecc7a73db97b6448a544e940868slive merged. Any options preceded by a <code>+</code> are added to the
13e5182a0c199ecc7a73db97b6448a544e940868slive options currently in force, and any options preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> are removed from the options currently in
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive force. </p>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <code>-</code> with those without is not valid syntax, and is likely
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive to cause unexpected results.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive Options Indexes FollowSymLinks<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen </Directory>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <p>then only <code>Includes</code> will be set for the
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <code>/web/docs/spec</code> directory. However if the second
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <code class="directive">Options</code> directive uses the <code>+</code> and
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options Indexes FollowSymLinks<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options +Includes -Indexes<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory>
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>Includes</code> are set for the <code>/web/docs/spec</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess directory.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>-Includes</code> disables server-side includes completely
130d299c4b2b15be45532a176604c71fdc7bea5bnd regardless of the previous setting.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The default in the absence of any other settings is
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Takes 1 or 2 parameters. The first parameter sets the soft
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit should
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
ef8e89e090461194ecadd31e8796a2c51e0531a2kess processes forked off from the Apache parent such as piped
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>CPU resource limits are expressed in seconds per
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit should
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess should be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the server is running as <code>root</code>, or in the initial startup
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>This applies to processes forked off from Apache children
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Process limits control the number of processes per user.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess under user ids other than the web server user id, this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will limit the number of processes that the server itself can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong><code>cannot fork</code></strong> messages in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only;
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveoption <code>Registry-Strict</code> is available in Apache 2.0 and
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive is used to control how Apache finds the
fb77c505254b6e9c925e23e734463e87574f8f40kess interpreter used to run CGI scripts. The default setting is
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <code>Script</code>. This causes Apache to use the interpreter pointed to
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele by the shebang line (first line, starting with <code>#!</code>) in the
003f0c9fda6664daf5092a0e42f65ede20098153slive script. On Win32 systems this line usually looks like:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>Setting <code>ScriptInterpreterSource Registry</code> will
4cafc94e99922f00654e1779d30c2cccf5278c4fkess cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
4cafc94e99922f00654e1779d30c2cccf5278c4fkess searched using the script file extension (e.g., <code>.pl</code>) as a
4cafc94e99922f00654e1779d30c2cccf5278c4fkess search key. The command defined by the registry subkey
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <code>Shell\Open\Command</code> is used to open the script file. If the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess registry keys cannot be found, Apache falls back to the behavior of the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess Registry</code> with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
4cafc94e99922f00654e1779d30c2cccf5278c4fkess Apache will try to execute <strong>every</strong> file within this
4cafc94e99922f00654e1779d30c2cccf5278c4fkess directory. The <code>Registry</code> setting may cause undesired
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive program calls on files which are typically not executed. For
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive example, the default open command on <code>.htm</code> files on
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive most Windows systems will execute Microsoft Internet Explorer, so
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess any HTTP request for an <code>.htm</code> file existing within the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess script directory would start the browser in the background on the
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki server. This is a good way to crash your system within a minute or
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>The option <code>Registry-Strict</code> which is new in Apache
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive 2.0 does the same thing as <code>Registry</code> but uses only the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <code>ExecCGI</code> key is not a common one. It must be
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive configured manually in the windows registry and hence prevents
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive accidental program calls on your system.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerAdmin</code> sets the contact address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the server includes in any error messages it returns to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client. If the <code>httpd</code> doesn't recognize the supplied argument
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an URL, it
003f0c9fda6664daf5092a0e42f65ede20098153slive assumes, that it's an <var>email-address</var> and prepends it with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mailto:</code> in hyperlink targets. However, it's recommended to
2e5e2673cb64d3e4d445d911c6f61ac171020725nd actually use an email address, since there are a lot of CGI scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive make that assumption. If you want to use an URL, it should point to another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server under your control. Otherwise users may not be able to contact you in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case of errors.</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>It may be worth setting up a dedicated address for this, e.g.</p>
733738e83a9b0113476e3f67992c2278d61ee4dakess ServerAdmin www-admin@foo.example.com
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>as users do not always mention that they are talking about the
2e5e2673cb64d3e4d445d911c6f61ac171020725nd server!</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerAlias</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive alternate names for a host, for use with <a href="/vhosts/name-based.html">name-based virtual hosts</a>. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost *><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache Virtual Host documentation</a></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>In version 2.0, this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive supersedes the functionality of the <code class="directive">Port</code>
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>The <code class="directive">ServerName</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request scheme, hostname and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port that the server uses to identify itself. This is used when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating redirection URLs. For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the web server is <code>simple.example.com</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive but the machine also has the DNS alias <code>www.example.com</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and you wish the web server to be so identified, the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive should be used:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName www.example.com:80
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If no <code class="directive">ServerName</code> is specified, then the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">ServerName</code>, then the server will use the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd port from the incoming request. For optimal reliability and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd predictability, you should specify an explicit hostname and port
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd using the <code class="directive">ServerName</code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code class="directive">ServerName</code> inside a
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>
e08ad1a326852610a7930269638a43657fc50d06sctemme section specifies what hostname must appear in the request's
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Sometimes, the server runs behind a device that processes SSL,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such as a reverse proxy, load balancer or SSL offload
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appliance. When this is the case, specify the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>https://</code> scheme and the port number to which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive clients connect in the <code class="directive">ServerName</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to make sure that the server generates the correct
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs.
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>See the description of the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code>directives for
e08ad1a326852610a7930269638a43657fc50d06sctemme settings which determine whether self-referential URLs (e.g., by the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> module) will refer to the
e08ad1a326852610a7930269638a43657fc50d06sctemme specified port, or to the port number given in the client's request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
e08ad1a326852610a7930269638a43657fc50d06sctemme<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code class="directive">ServerPath</code> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache Virtual Host documentation</a></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">ServerRoot</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory in which the server lives. Typically it will contain the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectories <code>conf/</code> and <code>logs/</code>. Relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive paths in other configuration directives (such as <code class="directive"><a href="#include">Include</a></code> or <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>, for example) are taken as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to this directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive security tips</a> for information on how to properly set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permissions on the <code class="directive">ServerRoot</code></li>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <code class="directive">ServerSignature</code> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> ftp directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listings, <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
fb77c505254b6e9c925e23e734463e87574f8f40kess the user often has no possibility to tell which of the chained servers
fb77c505254b6e9c925e23e734463e87574f8f40kess actually produced a returned error message.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess setting, which is the default, suppresses the footer line (and is
ef8e89e090461194ecadd31e8796a2c51e0531a2kess therefore compatible with the behavior of Apache-1.2 and
ef8e89e090461194ecadd31e8796a2c51e0531a2kess below). The <code>On</code> setting simply adds a line with the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and the <code>EMail</code> setting additionally creates a
530eba85dbd41b8a0fa5255d3648d1440199a661slive "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>After version 2.0.44, the details of the server version number
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
f35c904c3b359610a46e94fbb4ba8495b2338521slive<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</code></td></tr>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
530eba85dbd41b8a0fa5255d3648d1440199a661slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, this directive also controls the
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved into the core in Apache 2.0</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#directory"><Directory></a></code> or
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive"><a href="#location"><Location></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be parsed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive through the <a href="/handler.html">handler</a> given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>handler-name</var>. For example, if you had a directory you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd wanted to be parsed entirely as imagemap rule files, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of extension, you might put the following into an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SetHandler imap-file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Location /status><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetHandler server-status<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Location>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>You can override an earlier defined <code class="directive">SetHandler</code>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p><strong>Note:</strong> because SetHandler overrides default handlers,
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq normal behaviour such as handling of URLs ending in a slash (/) as
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq directories or index files is suppressed.</p>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">SetInputFilter</code> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter or filters which will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive input when they are received by the server. This is in addition to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any filters defined elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/filter.html">Filters</a> documentation</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent to the client. This is in addition to any filters defined
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the <code>/www/data/</code> directory for server-side
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd includes.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetOutputFilter INCLUDES<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/filter.html">Filters</a> documentation</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
fa71303e53e7ef460728446b8290d05ed0895136trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>The <code class="directive">TimeOut</code> directive defines the length
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton of time Apache will wait for I/O in various circumstances:</p>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When reading data from the client, the length of time to
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton wait for a TCP packet to arrive if the read buffer is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive empty.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When writing data to the client, the length of time to wait
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton for an acknowledgement of a packet if the send buffer is
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>In <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton output from a CGI script.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>In <code class="module"><a href="/mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wait for output from a filtering process.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>In <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured.</li>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
cb646158ff2c192d4325a10a280e5006d191db8awrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 1.3.34, 2.0.55 and later</td></tr>
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>This directive overrides the behavior of <code>TRACE</code> for both
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe the core server and <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. The default
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code>TraceEnable on</code> permits <code>TRACE</code> requests per
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe RFC 2616, which disallows any request body to accompany the request.
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code>TraceEnable off</code> causes the core server and
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
12099dff89f3135d53929f4f1bdb42c7d044d928nd allowed) error to the client.</p>
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>Finally, for testing and diagnostic purposes only, request
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe bodies may be allowed using the non-compliant <code>TraceEnable
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe extended</code> directive. The core (as an origin server) will
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe restrict the request body to 64k (plus 8k for chunk headers if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Transfer-Encoding: chunked</code> is used). The core will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reflect the full headers and all chunk headers with the response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. As a proxy server, the request body is not restricted to 64k.</p>
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In many situations Apache must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>UseCanonicalName On</code> Apache will use the hostname and port
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified in the <code class="directive"><a href="#servername">ServerName</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive to construct the canonical name for the server. This name
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen is used in all self-referential URLs, and for the values of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>With <code>UseCanonicalName Off</code> Apache will form
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen self-referential URLs using the hostname and port supplied by
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a href="/vhosts/name-based.html">name based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructed from the client supplied values as well.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen type a shortname, and a URL which is a directory, such as
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <code>http://www/splat</code>, <em>without the trailing
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen slash</em> then Apache will redirect them to
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <code>http://www.domain.com/splat/</code>. If you have
fb77c505254b6e9c925e23e734463e87574f8f40kess authentication enabled, this will cause the user to have to
fb77c505254b6e9c925e23e734463e87574f8f40kess authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache will redirect to <code>http://www/splat/</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is a third option, <code>UseCanonicalName DNS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which is intended for use with mass IP-based virtual hosting to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support ancient clients that do not provide a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Host:</code> header. With this option Apache does a
130d299c4b2b15be45532a176604c71fdc7bea5bnd reverse DNS lookup on the server IP address that the client
130d299c4b2b15be45532a176604c71fdc7bea5bnd connected to in order to work out self-referential URLs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd they may be broken by this option. The client is essentially free
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to give whatever value they want as a hostname. But if the CGI is
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim only using <code>SERVER_NAME</code> to construct self-referential URLs
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim then it should be just fine.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#servername">ServerName</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>In many situations Apache must construct a <em>self-referential</em>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim URL -- that is, a URL that refers back to the same server. With
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>UseCanonicalPhysicalPort On</code> Apache will, when
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim constructing the canonical port for the server to honor
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
b3ec2c7988894fc3722521c0a61fcb2ddab31c33colm provide the actual physical port number being used by this request
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim Apache will not ever use the actual physical port number, instead
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim relying on all configured information to construct a valid port number.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>The ordering of when the physical port is used is as follows:<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With <code>UseCanonicalPhysicalPort Off</code>, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive physical ports are removed from the ordering.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><code class="directive"><a href="#servername">ServerName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><VirtualHost></code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code></VirtualHost></code> are used to enclose a group of
01710fa5f312f3a9cd1969d1809cf6c19a7f3d31niq directives that will apply only to a particular virtual host. Any
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive directive that is allowed in a virtual host context may be
fb77c505254b6e9c925e23e734463e87574f8f40kess used. When the server receives a request for a document on a
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive particular virtual host, it uses the configuration directives
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive enclosed in the <code class="directive"><VirtualHost></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>A fully qualified domain name for the IP address of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd virtual host (not recommended);</li>
e8811b6d38f756b325446ded5d96857d13856511takashi <li>The character <code>*</code>, which is used only in combination with
e8811b6d38f756b325446ded5d96857d13856511takashi <code>NameVirtualHost *</code> to match all IP addresses; or</li>
e8811b6d38f756b325446ded5d96857d13856511takashi <li>The string <code>_default_</code>, which is used only
130d299c4b2b15be45532a176604c71fdc7bea5bnd with IP virtual hosting to catch unmatched IP addresses.</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <VirtualHost 10.1.2.3><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerAdmin webmaster@host.foo.com<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </VirtualHost>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>IPv6 addresses must be specified in square brackets because
130d299c4b2b15be45532a176604c71fdc7bea5bnd the optional port number could not be determined otherwise. An
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd IPv6 example is shown below:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.example.com<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </VirtualHost>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Each Virtual Host must correspond to a different IP address,
130d299c4b2b15be45532a176604c71fdc7bea5bnd different port number or a different host name for the server,
130d299c4b2b15be45532a176604c71fdc7bea5bnd in the former case the server machine must be configured to
130d299c4b2b15be45532a176604c71fdc7bea5bnd accept IP packets for multiple addresses. (If the machine does
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive not have multiple network interfaces, then this can be
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive accomplished with the <code>ifconfig alias</code> command -- if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The use of <code class="directive"><VirtualHost></code> does
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <strong>not</strong> affect what addresses Apache listens on. You
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive may need to ensure that Apache is listening on the correct addresses
506ccad87840d0f348a9b9560b711f0a8398ce6aslive using <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>.</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <p>When using IP-based virtual hosting, the special name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which case this virtual host will match any IP address that is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not explicitly listed in another virtual host. In the absence
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of any <code>_default_</code> virtual host the "main" server config,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive consisting of all those definitions outside any VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, is used when no IP-match occurs. (But note that any IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address that matches a <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> directive will use neither
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the "main" server config nor the <code>_default_</code> virtual host.
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive See the <a href="/vhosts/name-based.html">name-based virtual hosting</a>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive documentation for further details.)</p>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <p>You can specify a <code>:port</code> to change the port that is
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive matched. If unspecified then it defaults to the same port as the
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive most recent <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd statement of the main server. You may also specify <code>:*</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd to match all ports on that address. (This is recommended when used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
130d299c4b2b15be45532a176604c71fdc7bea5bnd specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server configuration will be inherited.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the <a href="/misc/security_tips.html">security tips</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document for details on why your security could be compromised if the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directory where log files are stored is writable by anyone other
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess than the user that starts the server.</p>
<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<p class="apache">Copyright 2008 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>