core.html.en revision c976a7c7d20f2be319b128dd7d0b1568da224c0a
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="/fr/mod/core.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
530eba85dbd41b8a0fa5255d3648d1440199a661slive<a href="/tr/mod/core.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<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>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#define">Define</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#directory"><Directory></a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<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="#extendedstatus">ExtendedStatus</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#fileetag">FileETag</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
90efa9f1730742d874edb5a7803adce11c9f08eanoodl<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="#mutex">Mutex</a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#servername">ServerName</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#timeout">TimeOut</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#undefine">UnDefine</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<li><img alt="" src="/images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
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 httpd 2.1.5 and later.
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabeleOn Windows from Apache httpd 2.3.3 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>, Linux's more primitive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
fb77c505254b6e9c925e23e734463e87574f8f40kess are currently supported.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using <code>none</code> for an argument will disable any accept filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for that protocol. This is useful for protocols that require a server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http httpready <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter https dataready
fb77c505254b6e9c925e23e734463e87574f8f40kess <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sends it to the server. See the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter http data <br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter https data
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess requests. Any value besides <code>none</code> will enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen see the Linux
fb77c505254b6e9c925e23e734463e87574f8f40kess <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter http data <br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AcceptFilter https data
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive API, and does not support http protocol buffering. There are two values
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd which utilize the Windows AcceptEx() API and will recycle network
130d299c4b2b15be45532a176604c71fdc7bea5bnd sockets between connections. <code>data</code> waits until data has
130d299c4b2b15be45532a176604c71fdc7bea5bnd been transmitted as documented above, and the initial data buffer and
130d299c4b2b15be45532a176604c71fdc7bea5bnd network endpoint addresses are all retrieved from the single AcceptEx()
130d299c4b2b15be45532a176604c71fdc7bea5bnd invocation. <code>connect</code> will use the AcceptEx() API, also
130d299c4b2b15be45532a176604c71fdc7bea5bnd retrieve the network endpoint addresses, but like <code>none</code>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the <code>connect</code> option does not wait for the initial data
130d299c4b2b15be45532a176604c71fdc7bea5bnd transmission.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>On Windows, <code>none</code> uses accept() rather than than AcceptEx()
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and will not recycle sockets between connections. This is useful for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network adapters with broken driver support, as well as some virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network providers such as vpn drivers, or spam, virus or spyware
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filters.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.30 and later</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive controls whether requests that contain trailing
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd pathname information that follows an actual filename (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The three possible arguments for the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">AcceptPathInfo</code> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Off</code></dt><dd>A request will only be accepted if it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive maps to a literal path that exists. Therefore a request with
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen trailing pathname information after the true filename such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> in the above example will return
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding leading path component maps to a file that exists. The above
684f2a9a422185adda0692a1203c5ad6687fc5c5nd example <code>/test/here.html/more</code> will be accepted if
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.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The core handler for normal files defaults to rejecting
003f0c9fda6664daf5092a0e42f65ede20098153slive <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
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>The primary purpose of the <code>AcceptPathInfo</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding directive is to allow you to override the handler's choice of
684f2a9a422185adda0692a1203c5ad6687fc5c5nd accepting or rejecting <code>PATH_INFO</code>. This override is required,
a8ce9095d102e43fecb81093a132b90b9a227f78kess for example, when you use a <a href="/filter.html">filter</a>, such
684f2a9a422185adda0692a1203c5ad6687fc5c5nd 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options +Includes<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SetOutputFilter INCLUDES<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AcceptPathInfo On<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </Files>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd <p>While processing a request the server looks for
58699879a562774640b95e9eedfd891f336e38c2nd the first existing configuration file from this list of names in
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding every directory of the path to the document, if distributed
fb77c505254b6e9c925e23e734463e87574f8f40kess configuration files are <a href="#allowoverride">enabled for that
58699879a562774640b95e9eedfd891f336e38c2nd AccessFileName .acl
58699879a562774640b95e9eedfd891f336e38c2nd <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>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding for directives, unless they have been disabled with</p>
58699879a562774640b95e9eedfd891f336e38c2nd <Directory /><br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </Directory>
58699879a562774640b95e9eedfd891f336e38c2nd<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
58699879a562774640b95e9eedfd891f336e38c2nd<li><a href="/configuring.html">Configuration Files</a></li>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
fb77c505254b6e9c925e23e734463e87574f8f40kesscontent-type is <code>text/plain</code> or <code>text/html</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<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>
58699879a562774640b95e9eedfd891f336e38c2nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
58699879a562774640b95e9eedfd891f336e38c2nd<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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess any charset specified in the body of the response via a <code>META</code>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd element, though the exact behavior is often dependent on the user's client
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick configuration. A setting of <code>AddDefaultCharset Off</code>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding disables this functionality. <code>AddDefaultCharset On</code> enables
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding a default charset of <code>iso-8859-1</code>. Any other value is assumed
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding to be the <var>charset</var> to be used, which should be one of the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <a href="http://www.iana.org/assignments/character-sets">IANA registered
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd charset values</a> for use in Internet media types (MIME types).
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd For example:</p>
58699879a562774640b95e9eedfd891f336e38c2nd AddDefaultCharset utf-8
58699879a562774640b95e9eedfd891f336e38c2nd <p><code class="directive">AddDefaultCharset</code> should only be used when all
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd of the text resources to which it applies are known to be in that
58699879a562774640b95e9eedfd891f336e38c2nd character encoding and it is too inconvenient to label their charset
58699879a562774640b95e9eedfd891f336e38c2nd individually. One such example is to add the charset parameter
77ead9e0262e4f08ec336d1a65b2edef7705c839nd to resources containing generated content, such as legacy CGI
77ead9e0262e4f08ec336d1a65b2edef7705c839nd scripts, that might be vulnerable to cross-site scripting attacks
9583adab6bc4b3758e41963c905d9dad9f067131nd due to user-provided data being included in the output. Note, however,
77ead9e0262e4f08ec336d1a65b2edef7705c839nd that a better solution is to just fix (or delete) those scripts, since
77ead9e0262e4f08ec336d1a65b2edef7705c839nd setting a default charset does not protect users that have enabled
77ead9e0262e4f08ec336d1a65b2edef7705c839nd the "auto-detect character encoding" feature on their browser.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<li><code class="directive"><a href="/mod/mod_mime.html#addcharset">AddCharset</a></code></li>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<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 media-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>media-type</var> [<var>media-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>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<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 httpd 2.0.33 and later; deprecated in Apache httpd 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#media-type" title="see glossary">media-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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following example uses the <code>DEFLATE</code> filter, which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is provided by <code class="module"><a href="/mod/mod_deflate.html">mod_deflate</a></code>. It will compress all
003f0c9fda6664daf5092a0e42f65ede20098153slive output (either static or dynamic) which is labeled as
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>text/html</code> or <code>text/plain</code> before it is sent
fb77c505254b6e9c925e23e734463e87574f8f40kess to the client.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>If you want the content to be processed by more than one filter, their
fb77c505254b6e9c925e23e734463e87574f8f40kess names have to be separated by semicolons. It's also possible to use one
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive">AddOutputFilterByType</code> directive for each of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess these filters.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The configuration below causes all script output labeled as
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <code>text/html</code> to be processed at first by the
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd filter.</p>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <Location /cgi-bin/><br />
10673857794a4b3d9568ca2d983722a87ed352f1rbowen Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Enabling filters with <code class="directive">AddOutputFilterByType</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may fail partially or completely in some cases. For example, no
fb77c505254b6e9c925e23e734463e87574f8f40kess filters are applied if the <a class="glossarylink" href="/glossary.html#media-type" title="see glossary">media-type</a> could not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be determined. If you want to make sure that the filters will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<li><code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code></li>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<li><code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code></li>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.46 and later</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding which contain encoded path separators (<code>%2F</code> for <code>/</code>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding and additionally <code>%5C</code> for <code>\</code> on according systems)
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride All</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <a href="#accessfilename">.htaccess</a> files are completely ignored.
9ed9eaf871c58d281af02e76125ceadb5060afa5nd In this case, the server will not even attempt to read
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>directive-type</var> can be one of the following
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the authorization directives (<code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="/mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code>,
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <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>
da637bcae7b6e150470e701af29da5604a34a17erbowen Allow use of the directives controlling document types
da637bcae7b6e150470e701af29da5604a34a17erbowen (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <code class="directive"><a href="#forcetype">ForceType</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <code class="directive"><a href="/mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <code class="directive"><a href="#sethandler">SetHandler</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> from
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen <code class="module"><a href="/mod/mod_actions.html">mod_actions</a></code>.
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Allow use of the directives controlling directory indexing
fb77c505254b6e9c925e23e734463e87574f8f40kess (<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>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <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>,
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Allow use of the directives controlling specific directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive features (<code class="directive"><a href="#options">Options</a></code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_include.html#xbithack">XBitHack</a></code>).
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess An equal sign may be given followed by a comma (but no spaces)
fb77c505254b6e9c925e23e734463e87574f8f40kess separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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 <div class="note"><p>For security and performance reasons, do not set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>AllowOverride</code> to anything other than <code>None</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in your <code><Directory /></code> block. Instead, find (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create) the <code><Directory></code> block that refers to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory where you're actually planning to place a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<li><a href="/configuring.html">Configuration Files</a></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>NetWare only</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache httpd finds the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding interpreter used to run CGI scripts. For example, setting
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>CGIMapExtension sys:\foo.nlm .foo</code> will
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding cause all CGI script files with a <code>.foo</code> extension to
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding be passed to the FOO interpreter.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<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
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e4881891552e185a7408318dfc7f62ebabe73cf6niq <p>This directive enables the generation of
e4881891552e185a7408318dfc7f62ebabe73cf6niq respectively RFC2616.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>MD5 is an algorithm for computing a "message digest"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding (sometimes called "fingerprint") of arbitrary-length data, with
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding a high degree of confidence that any alterations in the data
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding will be reflected in alterations in the message digest.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>The <code>Content-MD5</code> header provides an end-to-end
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding message integrity check (MIC) of the entity-body. A proxy or
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding client may check this header for detecting accidental
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding modification of the entity-body in transit. Example header:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>Note that this can cause performance problems on your server
20b0f809c3823eda58808be053ffc305dfa9c785sf since the message digest is computed on every request (the
20b0f809c3823eda58808be053ffc305dfa9c785sf values are not cached).</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p><code>Content-MD5</code> is only sent for documents served
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl by the <code class="module"><a href="/mod/core.html">core</a></code>, and not by any module. For example,
ccf2a600dd72cc3c3c44f5d4126d9bb60fa83894takashi SSI documents, output from CGI scripts, and byte range responses
ccf2a600dd72cc3c3c44f5d4126d9bb60fa83894takashi do not have this header.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif the value is not <code>none</code>. In prior versions, DefaultType
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewould specify a default media type to assign to response content for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewhich no other media type configuration could be found.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType 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>
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>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This directive has been disabled. For backwards compatibility
003f0c9fda6664daf5092a0e42f65ede20098153slive of configuration files, it may be specified with the value
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>none</code>, meaning no default media type. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess DefaultType None
003f0c9fda6664daf5092a0e42f65ede20098153slive httpd-2.2.7 and later.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> to configure media
130d299c4b2b15be45532a176604c71fdc7bea5bnd type assignments via file extensions, or the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
130d299c4b2b15be45532a176604c71fdc7bea5bnd the media type for specific resources. Otherwise, the server will
130d299c4b2b15be45532a176604c71fdc7bea5bnd send the response without a Content-Type header field and the
130d299c4b2b15be45532a176604c71fdc7bea5bnd recipient may attempt to guess the media type.</p>
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="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the existence of a variable</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</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>
030108b1816bcda3d925df65357feabdce83bc94slive <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</p>
030108b1816bcda3d925df65357feabdce83bc94slive <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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<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"><Directory></code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code></Directory></code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory and
130d299c4b2b15be45532a176604c71fdc7bea5bnd sub-directories of that directory. Any directive that is allowed
130d299c4b2b15be45532a176604c71fdc7bea5bnd in a directory context may be used. <var>Directory-path</var> is
130d299c4b2b15be45532a176604c71fdc7bea5bnd either the full path to a directory, or a wild-card string using
130d299c4b2b15be45532a176604c71fdc7bea5bnd Unix shell-style matching. In a wild-card string, <code>?</code> matches
130d299c4b2b15be45532a176604c71fdc7bea5bnd any single character, and <code>*</code> matches any sequences of
130d299c4b2b15be45532a176604c71fdc7bea5bnd characters. You may also use <code>[]</code> character ranges. None
130d299c4b2b15be45532a176604c71fdc7bea5bnd of the wildcards match a `/' character, so <code><Directory
130d299c4b2b15be45532a176604c71fdc7bea5bnd /*/public_html></code> will not match
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/user/public_html</code>, but <code><Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful with the <var>directory-path</var> arguments:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive They have to literally match the filesystem path which Apache httpd uses
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to access the files. Directives applied to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code><Directory></code> will not apply to files accessed from
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess that same directory via a different path, such as via different symbolic
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess 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}">
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>would match directories in <code>/www/</code> that consisted of
130d299c4b2b15be45532a176604c71fdc7bea5bnd three numbers.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd match the directory (or one of its parents) containing a document,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then the directives are applied in the order of shortest match
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory /home/><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride FileInfo<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>for access to the document <code>/home/web/dir/doc.html</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/web/dir/.htaccess</code> in that order.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Regular expressions are not considered until after all of the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess normal sections have been applied. Then all of the regular
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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 />
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive </Directory>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>the regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all normal <code class="directive"><Directory></code>s and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files have been applied. Then the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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 httpd will serve any file mapped from an URL. It is
030108b1816bcda3d925df65357feabdce83bc94slive recommended that you change this with a block such
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen <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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The directory sections occur in the <code>httpd.conf</code> file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><Directory></code> directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Location> and <Files> sections work</a> for an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive explanation of how these different sections are combined when a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is received</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
fb77c505254b6e9c925e23e734463e87574f8f40kessfile-system directories matching a regular expression and their
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>>
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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code class="directive"><DirectoryMatch></code> and
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <code></DirectoryMatch></code> are used to enclose a group
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess of directives which will apply only to the named directory and
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess sub-directories of that directory, the same as <code class="directive"><a href="#directory"><Directory></a></code>. However, it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive takes as an argument a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen <DirectoryMatch "^/www/(.+/)?[0-9]{3}">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of three
af18698b10b429b270551ca3a5d51a75e1c9db22brianp numbers.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#directory"><Directory></a></code> for
af18698b10b429b270551ca3a5d51a75e1c9db22brianpa description of how regular expressions are mixed in with normal
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<code class="directive"><Directory></code>s</li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<li><a href="/sections.html">How <Directory>, <Location> and
003f0c9fda6664daf5092a0e42f65ede20098153slive<Files> sections work</a> for an explanation of how these different
af18698b10b429b270551ca3a5d51a75e1c9db22brianpsections are combined when a request is received</li>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
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>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This directive sets the directory from which <code class="program"><a href="/programs/httpd.html">httpd</a></code>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd 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
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier path from the requested URL to the document root to make the
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier path to the document. Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>then an access to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
fb77c505254b6e9c925e23e734463e87574f8f40kess not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>The <code class="directive">DocumentRoot</code> should be specified without
41ef8b3051855b802104193ee0a587515af60a37wrowe a trailing slash.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe<li><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
41ef8b3051855b802104193ee0a587515af60a37wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
41ef8b3051855b802104193ee0a587515af60a37wrowe<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe<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>
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>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This directive controls whether the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-mapping if it needs to read the contents of a file during
41ef8b3051855b802104193ee0a587515af60a37wrowe delivery. By default, when the handling of a request requires
9fb925624300c864fe3969a264e52aa83f3c2dd0slive 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 httpd
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-maps the file if the OS supports it.</p>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <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>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>On some multiprocessor systems, memory-mapping can reduce the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick performance of the <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</li>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <li>Deleting or truncating a file while <code class="program"><a href="/programs/httpd.html">httpd</a></code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess has it memory-mapped can cause <code class="program"><a href="/programs/httpd.html">httpd</a></code> to
41ef8b3051855b802104193ee0a587515af60a37wrowe crash with a segmentation fault.
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>For server configurations that are vulnerable to these problems,
9fb925624300c864fe3969a264e52aa83f3c2dd0slive you should disable memory-mapping of delivered files by specifying:</p>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley EnableMMAP Off
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <p>For NFS mounted files, this feature may be disabled explicitly for
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the offending files by specifying:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe <Directory "/path-to-nfs-files">
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
41ef8b3051855b802104193ee0a587515af60a37wrowe </Directory>
41ef8b3051855b802104193ee0a587515af60a37wrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fb77c505254b6e9c925e23e734463e87574f8f40kess<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
41ef8b3051855b802104193ee0a587515af60a37wrowe<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>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile On</code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>FileInfo</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
41ef8b3051855b802104193ee0a587515af60a37wrowe<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later</td></tr>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <p>This directive controls whether <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use the
832853bb93c1831daf24e4727c5ca0e1b1786e83lars sendfile support from the kernel to transmit file contents to the client.
832853bb93c1831daf24e4727c5ca0e1b1786e83lars By default, when the handling of a request requires no access
832853bb93c1831daf24e4727c5ca0e1b1786e83lars to the data within a file -- for example, when delivering a
832853bb93c1831daf24e4727c5ca0e1b1786e83lars static file -- Apache httpd uses sendfile to deliver the file contents
af18698b10b429b270551ca3a5d51a75e1c9db22brianp without ever reading the file if the OS supports it.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This sendfile mechanism avoids separate read and send operations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and buffer allocations. But on some platforms or within some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystems, it is better to disable this feature to avoid
003f0c9fda6664daf5092a0e42f65ede20098153slive operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Some platforms may have broken sendfile support that the build
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive system did not detect, especially if the binaries were built on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offloading bugs on certain networking cards when using IPv6.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux on Itanium, sendfile may be unable to handle files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory "/path-to-nfs-files">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>Please note that the per-directory and .htaccess configuration
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive of <code class="directive">EnableSendfile</code> is not supported by
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <code class="module"><a href="/mod/mod_disk_cache.html">mod_disk_cache</a></code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Only global definition of <code class="directive">EnableSendfile</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is taken into account by the module.
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="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Quoting syntax for text messages is different in Apache HTTP Server
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>In the event of a problem or error, Apache httpd can be configured
f7fe99050600166042c04b8e595fb75499eed7f0geoff to do one of four things,</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to a local <var>URL-path</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to an external <var>URL</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The first option is the default, while options 2-4 are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured using the <code class="directive">ErrorDocument</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, which is followed by the HTTP response code and a URL
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess or a message. Apache httpd will sometimes offer additional information
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>URLs can begin with a slash (/) for local web-paths (relative
fb77c505254b6e9c925e23e734463e87574f8f40kess to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
fb77c505254b6e9c925e23e734463e87574f8f40kess full URL which the client can resolve. Alternatively, a message
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive can be provided to be displayed by the browser. Examples:</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive ErrorDocument 403 "Sorry can't allow you access today"
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>Additionally, the special value <code>default</code> can be used
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive to specify Apache httpd's simple hardcoded message. While not required
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive under normal circumstances, <code>default</code> will restore
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive Apache httpd's simple hardcoded message for configurations that would
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 default<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that when you specify an <code class="directive">ErrorDocument</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that points to a remote URL (ie. anything with a method such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess client to tell it where to find the document, even if the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd document ends up being on the same server. This has several
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh 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
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess receive the 401 status code. Therefore, <strong>if you use an
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <code>ErrorDocument 401</code> directive then it must refer to a local
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>Microsoft Internet Explorer (MSIE) will by default ignore
fb109b84906e3ee61680aa289953c2f9e859354erbowen server-generated error messages when they are "too small" and substitute
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess its own "friendly" error messages. The size threshold varies depending on
fb109b84906e3ee61680aa289953c2f9e859354erbowen 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>
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>Although most error messages can be overriden, there are certain
fb109b84906e3ee61680aa289953c2f9e859354erbowen circumstances where the internal messages are used regardless of the
fb109b84906e3ee61680aa289953c2f9e859354erbowen setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive particular, if a malformed request is detected, normal request processing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be immediately halted and the internal error message returned.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This is necessary to guard against security problems caused by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd bad requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using mod_proxy, you may wish to enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
fb109b84906e3ee61680aa289953c2f9e859354erbowen custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
fb109b84906e3ee61680aa289953c2f9e859354erbowen Apache httpd will not generate custom error documents for proxied content.</p>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<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>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<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>
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">ErrorLog</code> directive sets the name of
a8ee031b2224ce5473826c9d4f603681589245fawrowe the file to which the server will log any errors it encounters. If
a8ee031b2224ce5473826c9d4f603681589245fawrowe the <var>file-path</var> is not absolute then it is assumed to be
a8ee031b2224ce5473826c9d4f603681589245fawrowe relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe begins with a pipe (|) then it is assumed to be a command to spawn
a8ee031b2224ce5473826c9d4f603681589245fawrowe to handle the error log.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>Using <code>syslog</code> instead of a filename enables logging
a8ee031b2224ce5473826c9d4f603681589245fawrowe via syslogd(8) if the system supports it. The default is to use
a8ee031b2224ce5473826c9d4f603681589245fawrowe syslog facility <code>local7</code>, but you can override this by
a8ee031b2224ce5473826c9d4f603681589245fawrowe using the <code>syslog:<var>facility</var></code> syntax where
a8ee031b2224ce5473826c9d4f603681589245fawrowe <var>facility</var> can be one of the names usually documented in
34b157732214cedcd129cd9fe7c4290757505d60minfrin syslog(1).</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe ErrorLog syslog:user
02c86afa991026c4146423dc84bc126e57d28df6wrowe <p>SECURITY: See the <a href="/misc/security_tips.html#serverroot">security tips</a>
34b157732214cedcd129cd9fe7c4290757505d60minfrin document for details on why your security could be compromised
34b157732214cedcd129cd9fe7c4290757505d60minfrin if the directory where log files are stored is writable by
34b157732214cedcd129cd9fe7c4290757505d60minfrin anyone other than the user that starts the server.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>When entering a file path on non-Unix platforms, care should be taken
a8ee031b2224ce5473826c9d4f603681589245fawrowe to make sure that only forward slashed are used even though the platform
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may allow the use of back slashes. In general it is a good idea to always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive use forward slashes throughout the configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/logs.html">Apache HTTP Server Log 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="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This option tracks additional data per worker about the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive currently executing request, and a utilization summary; you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can see these variables during runtime by configuring
530eba85dbd41b8a0fa5255d3648d1440199a661slive <code class="module"><a href="/mod/mod_status.html">mod_status</a></code>. Note that other modules may
530eba85dbd41b8a0fa5255d3648d1440199a661slive rely on this scoreboard.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.
530eba85dbd41b8a0fa5255d3648d1440199a661slive The collection of extended status information can slow down
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server. Also note that this setting cannot be changed
530eba85dbd41b8a0fa5255d3648d1440199a661slive during a graceful restart.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Note that loading <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> will change
fb77c505254b6e9c925e23e734463e87574f8f40kess the default behavior to ExtendedStatus On, while other
fb77c505254b6e9c925e23e734463e87574f8f40kess third party modules may do the same. Such modules rely on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive collecting detailed information about the state of all workers.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The default is changed by <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> beginning
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd with version 2.3.6; the previous default was always Off.</p>
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="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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem The <code class="directive">FileETag</code> directive configures the file
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem attributes that are used to create the <code>ETag</code> (entity
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener tag) response header field when the document is based on a static file.
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener (The <code>ETag</code> value is used in cache management to save
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener network bandwidth.) The
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener <code class="directive">FileETag</code> directive allows you to choose
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener which of these -- if any -- should be used. The recognized keywords are:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The file's i-node number will be included in the calculation</dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dd>The date and time the file was last modified will be included</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive included in the response</dd>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess keywords may be prefixed with either <code>+</code> or <code>-</code>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess which allow changes to be made to the default setting inherited
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess from a broader scope. Any keyword appearing without such a prefix
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess immediately and completely cancels the inherited setting.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If a directory's configuration includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag INode MTime Size</code>, and a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectory's includes <code>FileETag -INode</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the setting for that subdirectory (which will be inherited by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd as a fixed format for <code>ETag</code> comparisons on conditional requests.
fb77c505254b6e9c925e23e734463e87574f8f40kess These conditional requests will break if the <code>ETag</code> format is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive An ETag is not generated for responses parsed by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd since the response entity can change without a change of the INode, MTime, or Size
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the static file with embedded SSI directives.
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="Files" id="Files"><Files></a> <a name="files" id="files">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>
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
003f0c9fda6664daf5092a0e42f65ede20098153slive specified filename. <code class="directive"><Files></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections are processed in the order they appear in the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the
003f0c9fda6664daf5092a0e42f65ede20098153slive 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,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and <code>*</code> matches any sequences of characters.
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
030108b1816bcda3d925df65357feabdce83bc94slive can also be used, with the addition of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>.htaccess</code> files. This allows users to control access to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess their own files, at a file-by-file level.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How <Directory>, <Location>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding and <Files> sections work</a> for an explanation of how these
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding different sections are combined when a request is received</li>
003f0c9fda6664daf5092a0e42f65ede20098153slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code class="directive"><FilesMatch></code> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess limits the scope of the enclosed directives by filename, just as the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive"><a href="#files"><Files></a></code> directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd does. However, it accepts a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <FilesMatch "\.(gif|jpe?g|png)$">
7654193c1faf603feec999850322ad79e6c551bcnd <p>would match most common Internet graphics formats.</p>
7654193c1faf603feec999850322ad79e6c551bcnd<li><a href="/sections.html">How <Directory>, <Location>
7654193c1faf603feec999850322ad79e6c551bcnd and <Files> sections work</a> for an explanation of how these
7654193c1faf603feec999850322ad79e6c551bcnd different sections are combined when a request is received</li>
7654193c1faf603feec999850322ad79e6c551bcnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
7654193c1faf603feec999850322ad79e6c551bcnd<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
7654193c1faf603feec999850322ad79e6c551bcndmedia type in the HTTP Content-Type header field</td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
7654193c1faf603feec999850322ad79e6c551bcnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<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 httpd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#location"><Location></a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#files"><Files></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be served
fb77c505254b6e9c925e23e734463e87574f8f40kess with the content type identification given by
fb77c505254b6e9c925e23e734463e87574f8f40kess <var>media-type</var>. For example, if you had a directory full of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive GIF files, but did not want to label them all with <code>.gif</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might want to use:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Note that this directive overrides other indirect media type
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick associations defined in mime.types or via the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can also override more general
fb77c505254b6e9c925e23e734463e87574f8f40kess <Location /images><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location><br />
fb77c505254b6e9c925e23e734463e87574f8f40kess # but normal mime-type associations here:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </Location>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
750d12c59545dbbac70390988de94f7e901b08f2niq <p>This directive enables DNS lookups so that host names can be
750d12c59545dbbac70390988de94f7e901b08f2niq logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
750d12c59545dbbac70390988de94f7e901b08f2niq The value <code>Double</code> refers to doing double-reverse
750d12c59545dbbac70390988de94f7e901b08f2niq DNS lookup. That is, after a reverse lookup is performed, a forward
750d12c59545dbbac70390988de94f7e901b08f2niq lookup is then performed on that result. At least one of the IP
750d12c59545dbbac70390988de94f7e901b08f2niq 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
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen that is protected by hostname restrictions, regardless of whether
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen the double-reverse fails or not, CGIs will still be passed the
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen single-reverse result in <code>REMOTE_HOST</code>.</p>
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offline.</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="If" id="If"><If></a> <a name="if" id="if">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code class="directive"><If></code> directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd evaluates an expression at runtime, and applies the enclosed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives if and only if the expression evaluates to true.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <If "$req{Host} = ''">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>You may compare the value of any variable in the request headers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ($req), response headers ($resp) or environment ($env) in your
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expression.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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.
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <code class="directive"><If></code> has the same precedence
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl 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
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</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>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi <p>The <code><IfDefine <var>test</var>>...</IfDefine>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi </code> section is used to mark directives that are conditional. The
955d7fc3e7adb6463b7243e15c04e858718e799etakashi directives within an <code class="directive"><IfDefine></code>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi section are only processed if the <var>test</var> is true. If <var>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi test</var> is false, everything between the start and end markers is
955d7fc3e7adb6463b7243e15c04e858718e799etakashi ignored.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <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
130d299c4b2b15be45532a176604c71fdc7bea5bnd markers are only processed if the parameter named
130d299c4b2b15be45532a176604c71fdc7bea5bnd <var>parameter-name</var> is defined. The second format reverses
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the test, and only processes the directives if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is <strong>not</strong> defined.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>parameter-name</var> argument is a define as given on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="program"><a href="/programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki <p><code class="directive"><IfDefine></code> sections are
55d36f9b61520c2374ab463e77e8a62daa416398nd nest-able, which can be used to implement simple
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess multiple-parameter tests. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive httpd -DReverseProxy -DUseCache -DMemCache ...<br />
55d36f9b61520c2374ab463e77e8a62daa416398nd <IfDefine ReverseProxy><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LoadModule proxy_http_module modules/mod_proxy_http.so<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <IfDefine UseCache><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <IfDefine MemCache><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LoadModule mem_cache_module modules/mod_mem_cache.so<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </IfDefine><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <IfDefine !MemCache><br />
55d36f9b61520c2374ab463e77e8a62daa416398nd LoadModule disk_cache_module modules/mod_disk_cache.so<br />
55d36f9b61520c2374ab463e77e8a62daa416398nd </IfDefine>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </IfDefine>
55d36f9b61520c2374ab463e77e8a62daa416398nd </IfDefine>
55d36f9b61520c2374ab463e77e8a62daa416398nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
55d36f9b61520c2374ab463e77e8a62daa416398nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<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<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>The <code><IfModule <var>test</var>>...</IfModule></code>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive section is used to mark directives that are conditional on the presence of
fb77c505254b6e9c925e23e734463e87574f8f40kess a specific module. The directives within an <code class="directive"><IfModule></code> section are only processed if the <var>test</var>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive is true. If <var>test</var> is false, everything between the start and
bea526116133aa3d7dabd1924bfc580b37fbf22aslive 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>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>In the former case, the directives between the start and end
003f0c9fda6664daf5092a0e42f65ede20098153slive markers are only processed if the module named <var>module</var>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin is included in Apache httpd -- either compiled in or
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin dynamically loaded using <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and only processes the directives if <var>module</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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,
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <code>mod_rewrite.c</code> is the file name. If a module consists of
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin several source files, use the name of the file containing the string
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p><code class="directive"><IfModule></code> sections are
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin nest-able, which can be used to implement simple multiple-module
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <div class="note">This section should only be used if you need to have one
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin configuration file that works whether or not a specific module
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin is available. In normal operation, directives need not be
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin placed in <code class="directive"><IfModule></code>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin sections.</div>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include [<var>optional</var>|<var>strict</var>] <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<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, directory
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>This directive allows inclusion of other configuration files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from within the server configuration files.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
7b5535ed88e0f561b3bfb3330137bd804846afd4slive in the filename or directory parts of the path to include several files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd at once, in alphabetical order. In addition, if
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="directive">Include</code> points to a directory, rather than a file,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache httpd will read all files in that directory and any subdirectory.
7b5535ed88e0f561b3bfb3330137bd804846afd4slive However, including entire directories is not recommended, because it is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd easy to accidentally leave temporary files in a directory that can cause
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <code class="program"><a href="/programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin wildcard syntax shown below, to include files that match a particular
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin pattern, such as *.conf, for example.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p>When a wildcard is specified for a <strong>file</strong> component of
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin the path, and no file matches the wildcard, the
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <code class="directive"><a href="#include">Include</a></code>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin directive will be <strong>silently ignored</strong>. When a wildcard is
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin specified for a <strong>directory</strong> component of the path, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive no directory matches the wildcard, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#include">Include</a></code> directive will
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <strong>fail with an error</strong> saying the directory cannot be found.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For further control over the behaviour of the server when no files or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories match, prefix the path with the modifiers <var>optional</var>
003f0c9fda6664daf5092a0e42f65ede20098153slive or <var>strict</var>. If <var>optional</var> is specified, any wildcard
fb77c505254b6e9c925e23e734463e87574f8f40kess file or directory that does not match will be silently ignored. If
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>strict</var> is specified, any wildcard file or directory that does
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele not match at least one file will cause server startup to fail.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a directory or file component of the path is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified exactly, and that directory or file does not exist,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#include">Include</a></code> directive will fail with an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error saying the file or directory cannot be found.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path, or may be relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <p>Wildcards may be included in the directory or file portion of the
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi path. In the following example, the server will fail to load if no
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi directories match conf/vhosts/*, but will load successfully if no
891df99fdfa41fc8a486568f4d31ddf4a571258adreid files match *.conf.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>In this example, the server will fail to load if either
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick conf/vhosts/* matches no directories, or if *.conf matches no files:</p>
9f38f3ec3e8087985d108a24ae796962fef83644takashi <p>In this example, the server load successfully if either conf/vhosts/*
9f38f3ec3e8087985d108a24ae796962fef83644takashi matches no directories, or if *.conf matches no files:</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
c6f90ef0e93c077924fd0c3c0200dba0cb1777c6takashi<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
003f0c9fda6664daf5092a0e42f65ede20098153slive connection feature of HTTP/1.1 provide long-lived HTTP sessions
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess which allow multiple requests to be sent over the same TCP
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd connection. In some cases this has been shown to result in an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive almost 50% speedup in latency times for HTML documents with
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd 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
130d299c4b2b15be45532a176604c71fdc7bea5bnd generally not use Keep-Alive connections to HTTP/1.0 clients.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For HTTP/1.1 clients, persistent connections are the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unless otherwise specified. If the client requests it, chunked
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encoding will be used in order to send content of unknown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive length over persistent connections.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>When a client uses a Keep-Alive connection it will be counted
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess as a single "request" for the <code class="directive"><a href="/mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></code> directive, regardless
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess of how many requests are sent using the connection.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
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="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</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>
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>Specifying a value in milliseconds is available in
750d12c59545dbbac70390988de94f7e901b08f2niq <p>The number of seconds Apache httpd will wait for a subsequent
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive request before closing the connection. By adding a postfix of ms the
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive timeout can be also set in milliseconds. Once a request has been
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive received, the timeout value specified by the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive may cause performance problems in heavily loaded servers. The
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive higher the timeout, the more server processes will be kept
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd occupied waiting on connections with idle clients.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>In a name-based virtual host context, the value of the first
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used.
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd The other values will be ignored.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directive</a></h2>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>Access controls are normally effective for
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <strong>all</strong> access methods, and this is the usual
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd desired behavior. <strong>In the general case, access control
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directives should not be placed within a
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code class="directive"><Limit></code> section.</strong></p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The purpose of the <code class="directive"><Limit></code>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directive is to restrict the effect of the access controls to the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd nominated HTTP methods. For all other methods, the access
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd effect</strong>. The following example applies the access control
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd only to the methods <code>POST</code>, <code>PUT</code>, and
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>DELETE</code>, leaving all other methods unprotected:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Limit POST PUT DELETE><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </Limit>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The method names listed can be one or more of: <code>GET</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen case-sensitive.</strong> If <code>GET</code> is used it will also
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen restrict <code>HEAD</code> requests. The <code>TRACE</code> method
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used in preference to a <code class="directive"><Limit></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section when restricting access, since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive against arbitrary methods.</div>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive"><Limit></code> and
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directives may be nested. In this case, each successive level of
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive"><Limit></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> directives must
130d299c4b2b15be45532a176604c71fdc7bea5bnd further restrict the set of methods to which access controls apply.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code class="directive"><LimitExcept></code> directives with
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directive,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive note that the first <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to succeed authorizes the request, regardless of the presence of other
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directives.</div>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For example, given the following configuration, all users will
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>Require group editors</code> directive will be ignored
03e0a375c2435102fb2b51e34cccff52acbfddcdnd in all cases:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <LimitExcept GET>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require valid-user
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </LimitExcept><br />
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <Limit POST>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require group editors
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </Limit>
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="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</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 <p><code class="directive"><LimitExcept></code> and
03e0a375c2435102fb2b51e34cccff52acbfddcdnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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 />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </LimitExcept>
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="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache httpd 2.0.47 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive redirects the original request to a CGI script. A subrequest is Apache httpd's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mechanism to find out what would happen for some URI if it were requested.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For example, <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen files listed in the <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directive.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p><code class="directive">LimitInternalRecursion</code> prevents the server
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen from crashing when entering an infinite loop of internal redirects or
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen subrequests. Such loops are usually caused by misconfigurations.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The directive stores two different limits, which are evaluated on
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen per-request basis. The first <var>number</var> is the maximum number of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive internal redirects, that may follow each other. The second <var>number</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive determines, how deep subrequests may be nested. If you specify only one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>number</var>, it will be assigned to both limits.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitInternalRecursion 5
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="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</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>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource and the methods allowed on that resource. CGI scripts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive typically use the message body for retrieving form information.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Implementations of the <code>PUT</code> method will require
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen a value at least as large as any representation that the server
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen wishes to accept for that resource.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen control over abnormal client request behavior, which may be
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen useful for avoiding some forms of denial-of-service
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If, for example, you are permitting file upload to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen LimitRequestBody 102400
72580dbc2a55511f13f377063725b9f143b20826stoddard<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
72580dbc2a55511f13f377063725b9f143b20826stoddard<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
72580dbc2a55511f13f377063725b9f143b20826stoddard<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard <p><var>Number</var> is an integer from 0 (meaning unlimited) to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed).</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive">LimitRequestFields</code> directive allows
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the server administrator to modify the limit on the number of
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen request header fields allowed in an HTTP request. A server needs
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen this value to be larger than the number of fields that a normal
ef8e89e090461194ecadd31e8796a2c51e0531a2kess client request might include. The number of request header fields
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen used by a client rarely exceeds 20, but this may vary among
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen different client implementations, often depending upon the extent
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen to which a user has configured their browser to support detailed
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen content negotiation. Optional HTTP extensions are often expressed
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen 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
72580dbc2a55511f13f377063725b9f143b20826stoddard<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
72580dbc2a55511f13f377063725b9f143b20826stoddard<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive specifies the number of <var>bytes</var>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen that will be allowed in an HTTP request header.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <code class="directive">LimitRequestFieldSize</code> directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen allows the server administrator to reduce or increase the limit
ef8e89e090461194ecadd31e8796a2c51e0531a2kess on the allowed size of an HTTP request header field. A server
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen needs this value to be large enough to hold any one header field
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen from a normal client request. The size of a normal request header
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen field will vary greatly among different client implementations,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen often depending upon the extent to which a user has configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive their browser to support detailed content negotiation. SPNEGO
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication headers can be up to 12392 bytes.</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>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele LimitRequestFieldSize 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <div class="note">Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</div>
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="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
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive HTTP method, URI, and protocol version, the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <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
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd hold any of its resource names, including any information that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive LimitRequestLine 4094
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <div class="note">Under normal conditions, the value should not be changed from
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive the default.</div>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<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>
dc223428958ad9ff05011545bcdda000887b93e5slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj <p>Limit (in bytes) on maximum size of an XML-based request
dc223428958ad9ff05011545bcdda000887b93e5slive body. A value of <code>0</code> will disable any checking.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess LimitXMLRequestBody 0
37742b630743e470b94618ecb3560fbd82e50b59rbowen<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
fb77c505254b6e9c925e23e734463e87574f8f40kess <var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</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>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>The <code class="directive"><Location></code> directive
37742b630743e470b94618ecb3560fbd82e50b59rbowen 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><code class="directive"><Location></code> sections operate
130d299c4b2b15be45532a176604c71fdc7bea5bnd completely outside the filesystem. This has several consequences.
130d299c4b2b15be45532a176604c71fdc7bea5bnd Most importantly, <code class="directive"><Location></code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directives should not be used to control access to filesystem
130d299c4b2b15be45532a176604c71fdc7bea5bnd locations. Since several different URLs may map to the same
130d299c4b2b15be45532a176604c71fdc7bea5bnd filesystem location, such access controls may by circumvented.</p>
e8811b6d38f756b325446ded5d96857d13856511takashi <div class="note"><h3>When to use <code class="directive"><Location></code></h3>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Use <code class="directive"><Location></code> to apply
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives to content that lives outside the filesystem. For
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd apply a configuration to the entire server.</p>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <p>For all origin (non-proxy) requests, the URL to be matched is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd port, or query string may be included.</em> For proxy requests, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL to be matched is of the form
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>scheme://servername/path</code>, and you must include the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd prefix.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any single character, and <code>*</code> matches any sequences of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd characters. Neither wildcard character matches a / in the URL-path.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can also be used, with the addition of the <code>~</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd character. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Location ~ "/(extra|special)/data">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match URLs that contained the substring <code>/extra/data</code>
37742b630743e470b94618ecb3560fbd82e50b59rbowen or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch"><LocationMatch></a></code> behaves
37742b630743e470b94618ecb3560fbd82e50b59rbowen identical to the regex version of <code class="directive"><Location></code>, and is preferred, for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive simple reason that <code>~</code> is hard to distinguish from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code class="directive"><Location></code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#sethandler">SetHandler</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. For example, to enable status requests, but allow them
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick only from browsers at <code>example.com</code>, you might use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location /status><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Order Deny,Allow<br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd where multiple adjacent slashes are frequently collapsed to a single
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/foo</code>). In URL-space this is not necessarily true.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess slashes if that is your intention.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, <code><LocationMatch ^/abc></code> would match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request URL <code>/abc</code> but not the request URL <code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if you specify <code><Location /abc/def></code> and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is to <code>/abc//def</code> then it will match.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/sections.html">How <Directory>, <Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <Files> sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>regex</var>> ... </LocationMatch></code></td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<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"><LocationMatch></code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>level</var></code></td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
8b052d682204371decc64f942aede5ef1da98955erikabele <td>"child process 1234 did not exit, sending another
8b052d682204371decc64f942aede5ef1da98955erikabele 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,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick then messages with log levels of <code>notice</code> and
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick recommended.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick LogLevel notice
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>When logging to a regular file messages of the level
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>notice</code> cannot be suppressed and thus are always
a0fed3e26656887c8458aa1081d516d08ced3c84trawick logged. However, this doesn't apply when logging is done
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <code class="directive">MaxKeepAliveRequests</code> directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick limits the number of requests allowed per connection when
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick set to <code>0</code>, unlimited requests will be allowed. We
a0fed3e26656887c8458aa1081d516d08ced3c84trawick recommend that this setting be kept to a high value for maximum
a0fed3e26656887c8458aa1081d516d08ced3c84trawick server performance.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick MaxKeepAliveRequests 500
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</code></td></tr>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</code></td></tr>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>The <code class="directive">Mutex</code> directive sets the mechanism,
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick and optionally the lock file location, that httpd and modules use
a0fed3e26656887c8458aa1081d516d08ced3c84trawick to serialize access to resources. Specify <code>default</code> as
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the first argument to change the settings for all mutexes; specify
a0fed3e26656887c8458aa1081d516d08ced3c84trawick a mutex name (see table below) as the first argument to override
a0fed3e26656887c8458aa1081d516d08ced3c84trawick defaults only for that mutex.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <code class="directive">Mutex</code> directive is typically used in
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the following exceptional situations:</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <li>change the mutex mechanism when the default mechanism selected
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick by <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> has a functional or performance
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick problem</li>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <li>change the directory used by file-based mutexes when the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick default directory does not support locking</li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This directive only configures mutexes which have been registered
a0fed3e26656887c8458aa1081d516d08ced3c84trawick with the core server using the <code>ap_mutex_register()</code> API.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick All modules bundled with httpd support the <code class="directive">Mutex</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directive, but third-party modules may not. Consult the documentation
a0fed3e26656887c8458aa1081d516d08ced3c84trawick of the third-party module, which must indicate the mutex name(s) which
a0fed3e26656887c8458aa1081d516d08ced3c84trawick can be configured if this directive is supported.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The following mutex <em>mechanisms</em> are available:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This selects the default locking implementation, as determined by
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a>. The default locking implementation can
a0fed3e26656887c8458aa1081d516d08ced3c84trawick be displayed by running <code class="program"><a href="/programs/httpd.html">httpd</a></code> with the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This effectively disables the mutex, and is only allowed for a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick mutex if the module indicates that it is a valid choice. Consult the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on a Posix semaphore.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The semaphore ownership is not recovered if a thread in the process
a0fed3e26656887c8458aa1081d516d08ced3c84trawick holding the mutex segfaults, resulting in a hang of the web server.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>It is possible to "leak" SysV semaphores if processes crash
a0fed3e26656887c8458aa1081d516d08ced3c84trawick before the semaphore is removed.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The semaphore API allows for a denial of service attack by any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick CGIs running under the same uid as the webserver (<em>i.e.</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick all CGIs, unless you use something like <code class="program"><a href="/programs/suexec.html">suexec</a></code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This selects the "best" available semaphore implementation, choosing
a0fed3e26656887c8458aa1081d516d08ced3c84trawick between Posix and SystemV IPC semaphores, in that order.</p></li>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on cross-process Posix thread
a0fed3e26656887c8458aa1081d516d08ced3c84trawick mutexes.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>On most systems, if a child process terminates abnormally while
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick holding a mutex that uses this implementation, the server will deadlock
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick and stop responding to requests. When this occurs, the server will
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick require a manual restart to recover.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Solaris is a notable exception as it provides a mechanism which
a0fed3e26656887c8458aa1081d516d08ced3c84trawick usually allows the mutex to be recovered after a child process
a0fed3e26656887c8458aa1081d516d08ced3c84trawick terminates abnormally while holding a mutex.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>If your system implements the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant where a physical (lock-)file and the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>fcntl()</code> function are used as the mutex.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>When multiple mutexes based on this mechanism are used within
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick multi-threaded, multi-process environments, deadlock errors (EDEADLK)
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick can be reported for valid mutex operations if <code>fcntl()</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick is not thread-aware, such as on Solaris.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick with the exception that the <code>flock()</code> function is used to
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This selects the "best" available file locking implementation,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick choosing between <code>fcntl</code> and <code>flock</code>, in that
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Most mechanisms are only available on selected platforms, where the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick underlying platform and <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> support it. Mechanisms
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick which aren't available on all platforms are <em>posixsem</em>,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the path, if provided, is a directory where the lock file will be created.
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick The default directory is httpd's run-time file directory relative to
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code class="directive"><a href="#serverroot">ServerRoot</a></code>. Always use a local disk
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick filesystem for <code>/path/to/mutex</code> and never a directory residing
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick on a NFS- or AFS-filesystem. The basename of the file will be the mutex
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick type, an optional instance string provided by the module, and unless the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code>OmitPID</code> keyword is specified, the process id of the httpd
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick parent process will be appended to to make the file name unique, avoiding
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick conflicts when multiple httpd instances share a lock file directory. For
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick example, if the mutex name is <code>mpm-accept</code> and the lock file
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick directory is <code>/var/httpd/locks</code>, the lock file name for the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick httpd instance with parent process id 12345 would be
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>It is best to <em>avoid</em> putting mutex files in a world-writable
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick directory such as <code>/var/tmp</code> because someone could create
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick a denial of service attack and prevent the server from starting by
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick creating a lockfile with the same name as the one the server will try
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick to create.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The following table documents the names of mutexes used by httpd
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick and bundled modules.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <td><code class="module"><a href="/mod/prefork.html">prefork</a></code> and <code class="module"><a href="/mod/worker.html">worker</a></code> MPMs</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td>incoming connections, to avoid the thundering herd problem;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick for more information, refer to the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <a href="/misc/perf-tuning.html">performance tuning</a>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick documentation</td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td><code class="module"><a href="/mod/mod_ldap.html">mod_ldap</a></code></td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td><code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code></td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td>communication with external mapping programs, to avoid
4025ef5b9785f4cc9e6456a1c0177383a8503361covener intermixed I/O from multiple requests</td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td><code class="module"><a href="/mod/mod_watchdog.html">mod_watchdog</a></code></td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <td>callback function of a particular client module</td>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
4025ef5b9785f4cc9e6456a1c0177383a8503361covener parent process id from the lock file name.</p>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>In the following example, the mutex mechanism for the MPM accept
4025ef5b9785f4cc9e6456a1c0177383a8503361covener mutex will be changed from the compiled-in default to <code>fcntl</code>,
4025ef5b9785f4cc9e6456a1c0177383a8503361covener with the associated lock file created in directory
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
4025ef5b9785f4cc9e6456a1c0177383a8503361covener will be changed from the compiled-in default to <code>sysvsem</code>.</p>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener Mutex default sysvsem<br />
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<p>A single <code class="directive">NameVirtualHost</code> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveidentifies a set of identical virtual hosts on which the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequested by the client. The <code class="directive">NameVirtualHost</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnddirective is a required directive if you want to configure
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<p>This directive, and the corresponding <code class="directive">VirtualHost</code>,
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm<em>must</em> be qualified with a port number if the server supports both HTTP
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndand HTTPS connections.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<p>Although <var>addr</var> can be a hostname, it is recommended
fb77c505254b6e9c925e23e734463e87574f8f40kessthat you always use an IP address or a wildcard. A wildcard
fb77c505254b6e9c925e23e734463e87574f8f40kessNameVirtualHost matches only virtualhosts that also have a literal wildcard
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshikias their argument.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<p>In cases where a firewall or other proxy receives the requests and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndforwards them on a different IP address to the server, you must specify the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndIP address of the physical interface on the machine which will be
4025ef5b9785f4cc9e6456a1c0177383a8503361covenerservicing the requests. </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<p> In the example below, requests received on interface 192.0.2.1 and port 80
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndwill only select among the first two virtual hosts. Requests received on
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndport 80 on any other interface will only select among the third and fourth
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndvirtual hosts. In the common case where the interface isn't important
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badsliveto the mapping, only the "*:80" NameVirtualHost and VirtualHost directives
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badsliveare necessary.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen NameVirtualHost 192.0.2.1:80<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost 192.0.2.1:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost 192.0.2.1:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost *:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost *:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be enclosed in square brackets, as shown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the following example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="note"><h3>Argument to <code class="directive"><VirtualHost></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive</h3>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that the argument to the <code class="directive"><VirtualHost></code> directive must
13e5182a0c199ecc7a73db97b6448a544e940868slive exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess NameVirtualHost 192.0.2.2:80<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost 192.0.2.2:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options All</code></td></tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive<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>Options</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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">Options</code> directive controls which
13e5182a0c199ecc7a73db97b6448a544e940868slive server features are available in a particular directory.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p><var>option</var> can be set to <code>None</code>, in which
b00583f8e126bbb00b06dcf06af06c9d07978701kess case none of the extra features are enabled, or one or more of
13e5182a0c199ecc7a73db97b6448a544e940868slive the following:</p>
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess <dd>All options except for <code>MultiViews</code>. This is the default
13e5182a0c199ecc7a73db97b6448a544e940868slive setting.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Execution of CGI scripts using <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is permitted.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess The server will follow symbolic links in this directory.
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Even though the server follows the symlink it does <em>not</em>
13e5182a0c199ecc7a73db97b6448a544e940868slive change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Note also, that this option <strong>gets ignored</strong> if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside a <code class="directive"><a href="#location"><Location></a></code>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive section.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Omitting this option should not be considered a security restriction,
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive since symlink testing is subject to race conditions that make it
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive circumventable.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive Server-side includes provided by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
13e5182a0c199ecc7a73db97b6448a544e940868slive are permitted.</dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive Server-side includes are permitted, but the <code>#exec
13e5182a0c199ecc7a73db97b6448a544e940868slive cmd</code> and <code>#exec cgi</code> are disabled. It is still
13e5182a0c199ecc7a73db97b6448a544e940868slive possible to <code>#include virtual</code> CGI scripts from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories.</dd>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen If a URL which maps to a directory is requested, and there
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen is no <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
fb77c505254b6e9c925e23e734463e87574f8f40kess (<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
130d299c4b2b15be45532a176604c71fdc7bea5bnd of the directory.</dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <a href="/content-negotiation.html">Content negotiated</a>
130d299c4b2b15be45532a176604c71fdc7bea5bnd "MultiViews" are allowed using
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>.</dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dd>The server will only follow symbolic links for which the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd target file or directory is owned by the same user id as the
fb77c505254b6e9c925e23e734463e87574f8f40kess <div class="note"><h3>Note</h3> <p>This option gets ignored if
fb77c505254b6e9c925e23e734463e87574f8f40kess set inside a <code class="directive"><a href="#location"><Location></a></code> section.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Normally, if multiple <code class="directive">Options</code> could
130d299c4b2b15be45532a176604c71fdc7bea5bnd apply to a directory, then the most specific one is used and
130d299c4b2b15be45532a176604c71fdc7bea5bnd others are ignored; the options are not merged. (See <a href="/sections.html#mergin">how sections are merged</a>.)
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive">Options</code> directive are preceded by a
130d299c4b2b15be45532a176604c71fdc7bea5bnd merged. Any options preceded by a <code>+</code> are added to the
130d299c4b2b15be45532a176604c71fdc7bea5bnd options currently in force, and any options preceded by a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd force. </p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>-</code> with those without is not valid syntax, and is likely
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess to cause unexpected results.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>then only <code>Includes</code> will be set for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/web/docs/spec</code> directory. However if the second
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive">Options</code> directive uses the <code>+</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options +Includes -Indexes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Includes</code> are set for the <code>/web/docs/spec</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The default in the absence of any other settings is
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache httpd children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache httpd children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache httpd parent such as piped
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>CPU resource limits are expressed in seconds per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<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="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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess configuration. Raising the maximum resource limit requires that
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the server is running as <code>root</code>, or in the initial startup
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This applies to processes forked off from Apache httpd children
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess servicing requests, not the Apache httpd children themselves. This
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess includes CGI scripts and SSI exec commands, but not any
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess processes forked off from the Apache httpd parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
003f0c9fda6664daf5092a0e42f65ede20098153slive<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>Takes 1 or 2 parameters. The first parameter sets the soft
4cafc94e99922f00654e1779d30c2cccf5278c4fkess resource limit for all processes and the second parameter sets
4cafc94e99922f00654e1779d30c2cccf5278c4fkess the maximum resource limit. Either parameter can be a number,
4cafc94e99922f00654e1779d30c2cccf5278c4fkess or <code>max</code> to indicate to the server that the limit
4cafc94e99922f00654e1779d30c2cccf5278c4fkess should be set to the maximum allowed by the operating system
4cafc94e99922f00654e1779d30c2cccf5278c4fkess configuration. Raising the maximum resource limit requires that
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki the server is running as <code>root</code>, or in the initial startup
4cafc94e99922f00654e1779d30c2cccf5278c4fkess phase.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>This applies to processes forked off from Apache httpd children
4cafc94e99922f00654e1779d30c2cccf5278c4fkess servicing requests, not the Apache httpd children themselves. This
fb77c505254b6e9c925e23e734463e87574f8f40kess includes CGI scripts and SSI exec commands, but not any
fb77c505254b6e9c925e23e734463e87574f8f40kess processes forked off from the Apache httpd parent such as piped
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>Process limits control the number of processes per user.</p>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess under user ids other than the web server user id, this directive
4cafc94e99922f00654e1779d30c2cccf5278c4fkess will limit the number of processes that the server itself can
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki create. Evidence of this situation will be indicated by
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <strong><code>cannot fork</code></strong> messages in the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<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 HTTP Server 2.0 and
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>This directive is used to control how Apache httpd finds the
a8ee031b2224ce5473826c9d4f603681589245fawrowe interpreter used to run CGI scripts. The default setting is
a8ee031b2224ce5473826c9d4f603681589245fawrowe <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
a8ee031b2224ce5473826c9d4f603681589245fawrowe by the shebang line (first line, starting with <code>#!</code>) in the
a8ee031b2224ce5473826c9d4f603681589245fawrowe script. On Win32 systems this line usually looks like:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>Setting <code>ScriptInterpreterSource Registry</code> will
a8ee031b2224ce5473826c9d4f603681589245fawrowe cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
a8ee031b2224ce5473826c9d4f603681589245fawrowe searched using the script file extension (e.g., <code>.pl</code>) as a
a8ee031b2224ce5473826c9d4f603681589245fawrowe search key. The command defined by the registry subkey
a8ee031b2224ce5473826c9d4f603681589245fawrowe <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
a8ee031b2224ce5473826c9d4f603681589245fawrowe <code>Shell\Open\Command</code> is used to open the script file. If the
a8ee031b2224ce5473826c9d4f603681589245fawrowe registry keys cannot be found, Apache httpd falls back to the behavior of the
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>Be careful when using <code>ScriptInterpreterSource
a8ee031b2224ce5473826c9d4f603681589245fawrowe Registry</code> with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
a8ee031b2224ce5473826c9d4f603681589245fawrowe Apache httpd will try to execute <strong>every</strong> file within this
a8ee031b2224ce5473826c9d4f603681589245fawrowe directory. The <code>Registry</code> setting may cause undesired
a8ee031b2224ce5473826c9d4f603681589245fawrowe program calls on files which are typically not executed. For
a8ee031b2224ce5473826c9d4f603681589245fawrowe example, the default open command on <code>.htm</code> files on
a8ee031b2224ce5473826c9d4f603681589245fawrowe most Windows systems will execute Microsoft Internet Explorer, so
a8ee031b2224ce5473826c9d4f603681589245fawrowe any HTTP request for an <code>.htm</code> file existing within the
a8ee031b2224ce5473826c9d4f603681589245fawrowe script directory would start the browser in the background on the
a8ee031b2224ce5473826c9d4f603681589245fawrowe server. This is a good way to crash your system within a minute or
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 2.0 does the same thing as <code>Registry</code> but uses only the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ExecCGI</code> key is not a common one. It must be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured manually in the windows registry and hence prevents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accidental program calls on your system.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
733738e83a9b0113476e3f67992c2278d61ee4dakess<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directive</a></h2>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine if mod_status displays the first 63 characters
2e5e2673cb64d3e4d445d911c6f61ac171020725ndof a request or the last 63, assuming the request itself is greater than
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SeeRequestTail Off</code></td></tr>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<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>
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>Available in Apache httpd 2.2.7 and later.</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd displays the actual request being handled.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For historical purposes, only 63 characters of the request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are actually stored for display purposes. This directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive controls whether the 1st 63 characters are stored (the previous
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive behavior and the default) or if the last 63 characters are. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is only applicable, of course, if the length of the request is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 64 characters or greater.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>If Apache httpd is handling <code>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code> mod_status displays as follows:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td>
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="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</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 <p>The <code class="directive">ServerAdmin</code> sets the contact address
e08ad1a326852610a7930269638a43657fc50d06sctemme 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
e08ad1a326852610a7930269638a43657fc50d06sctemme case of errors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin www-admin@foo.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>as users do not always mention that they are talking about the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server!</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme<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 *:80><br />
e08ad1a326852610a7930269638a43657fc50d06sctemme # ...<br />
e08ad1a326852610a7930269638a43657fc50d06sctemme </VirtualHost>
e08ad1a326852610a7930269638a43657fc50d06sctemme<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
29edaaeea24c41820e486944635348cd7fae1d11rbowen<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
e08ad1a326852610a7930269638a43657fc50d06sctemme<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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <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
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If no <code class="directive">ServerName</code> is specified, then the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port from the incoming request. For optimal reliability and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive predictability, you should specify an explicit hostname and port
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section specifies what hostname must appear in the request's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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.
fcc04773f0f2cc73650485facef9cd77f2d5bd65nd <p>See the description of the
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen settings which determine whether self-referential URLs (e.g., by the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> module) will refer to the
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen specified port, or to the port number given in the client's request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/dns-caveats.html">Issues Regarding DNS and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code class="directive">ServerPath</code> directive sets the legacy
ef8e89e090461194ecadd31e8796a2c51e0531a2kess URL pathname for a host, for use with <a href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></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="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>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
f35c904c3b359610a46e94fbb4ba8495b2338521slive <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>
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<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>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<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>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <p>The <code class="directive">ServerSignature</code> directive allows the
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh configuration of a trailing footer line under server-generated
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh documents (error messages, <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> ftp directory
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh listings, <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh would want to enable such a footer line is that in a chain of proxies,
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen the user often has no possibility to tell which of the chained servers
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh actually produced a returned error message.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive setting, which is the default, suppresses the footer line (and is
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen therefore compatible with the behavior of Apache-1.2 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive below). The <code>On</code> setting simply adds a line with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
530eba85dbd41b8a0fa5255d3648d1440199a661slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<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>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<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>
f35c904c3b359610a46e94fbb4ba8495b2338521slive<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This setting applies to the entire server, and cannot be
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd enabled or disabled on a virtualhost-by-virtualhost basis.</p>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>After version 2.0.44, this directive also controls the
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq <div class="note">Setting <code class="directive">ServerTokens</code> to less than
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>minimal</code> is not recommended because it makes it more
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen difficult to debug interoperational problems. Also note that
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen disabling the Server: header does nothing at all to make your
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen server more secure; the idea of "security through obscurity"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is a myth and leads to a false sense of safety.</div>
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
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>Moved into the core in Apache httpd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
003f0c9fda6664daf5092a0e42f65ede20098153slive status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location /status><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <code class="directive">SetHandler</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p><strong>Note:</strong> because SetHandler overrides default handlers,
130d299c4b2b15be45532a176604c71fdc7bea5bnd normal behaviour such as handling of URLs ending in a slash (/) as
130d299c4b2b15be45532a176604c71fdc7bea5bnd directories or index files is suppressed.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive<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">SetInputFilter</code> directive sets the
fa71303e53e7ef460728446b8290d05ed0895136trawick 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
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code class="directive"><a href="/mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton by semicolons in the order in which they should process the
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton content.</p>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<li><a href="/filter.html">Filters</a> documentation</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<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
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe elsewhere, including the
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
12099dff89f3135d53929f4f1bdb42c7d044d928nd directive.</p>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>For example, the following configuration will process all files
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe in the <code>/www/data/</code> directory for server-side
12099dff89f3135d53929f4f1bdb42c7d044d928nd includes.</p>
12099dff89f3135d53929f4f1bdb42c7d044d928nd SetOutputFilter INCLUDES<br />
12099dff89f3135d53929f4f1bdb42c7d044d928nd </Directory>
12099dff89f3135d53929f4f1bdb42c7d044d928nd <p>If more than one filter is specified, they must be separated
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe by semicolons in the order in which they should process the
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe content.</p>
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="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
20b0f809c3823eda58808be053ffc305dfa9c785sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
20b0f809c3823eda58808be053ffc305dfa9c785sf <p>The <code class="directive">TimeOut</code> directive defines the length
20b0f809c3823eda58808be053ffc305dfa9c785sf of time Apache httpd will wait for I/O in various circumstances:</p>
20b0f809c3823eda58808be053ffc305dfa9c785sf <li>When reading data from the client, the length of time to
20b0f809c3823eda58808be053ffc305dfa9c785sf wait for a TCP packet to arrive if the read buffer is
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe empty.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>When writing data to the client, the length of time to wait
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for an acknowledgement of a packet if the send buffer is
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim <li>In <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive output from a CGI script.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>In <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive"><a href="/mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configured.</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="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code>
1fd5131d5732e639b0b4225ca0afea717c41bc11trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<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 HTTP Server 1.3.34, 2.0.55 and later</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive overrides the behavior of <code>TRACE</code> for both
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the core server and <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. The default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TraceEnable on</code> permits <code>TRACE</code> requests per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive RFC 2616, which disallows any request body to accompany the request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TraceEnable off</code> causes the core server and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen allowed) error to the client.</p>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <p>Finally, for testing and diagnostic purposes only, request
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen bodies may be allowed using the non-compliant <code>TraceEnable
fb77c505254b6e9c925e23e734463e87574f8f40kess extended</code> directive. The core (as an origin server) will
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
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="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine the existence of a variable</td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<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>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of passing a <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <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
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="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">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>UseCanonicalName On|Off|DNS</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName 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 httpd must construct a <em>self-referential</em>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim URL -- that is, a URL that refers back to the same server. With
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim specified in the <code class="directive"><a href="#servername">ServerName</a></code>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim directive to construct the canonical name for the server. This name
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim is used in all self-referential URLs, and for the values of
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>With <code>UseCanonicalName Off</code> Apache httpd will form
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim self-referential URLs using the hostname and port supplied by
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim the client if any are supplied (otherwise it will use the
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim canonical name, as defined above). These values are the same
b3ec2c7988894fc3722521c0a61fcb2ddab31c33colm that are used to implement <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim and are available with the same clients. The CGI variables
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim constructed from the client supplied values as well.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>An example where this may be useful is on an intranet server
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim where you have users connecting to the machine using short
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim names such as <code>www</code>. You'll notice that if the users
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim type a shortname, and a URL which is a directory, such as
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim slash</em> then Apache httpd will redirect them to
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim authentication enabled, this will cause the user to have to
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim authenticate twice (once for <code>www</code> and once again
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim FAQ on this subject for more information</a>). But if
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim Apache httpd will redirect to <code>http://www/splat/</code>.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header. With this option Apache httpd does a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive they may be broken by this option. The client is essentially free
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to give whatever value they want as a hostname. But if the CGI is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only using <code>SERVER_NAME</code> to construct self-referential URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then it should be just fine.</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
01710fa5f312f3a9cd1969d1809cf6c19a7f3d31niq<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <p>In many situations Apache httpd must construct a <em>self-referential</em>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess constructing the canonical port for the server to honor
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd provide the actual physical port number being used by this request
130d299c4b2b15be45532a176604c71fdc7bea5bnd as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
e8811b6d38f756b325446ded5d96857d13856511takashi Apache httpd will not ever use the actual physical port number, instead
e8811b6d38f756b325446ded5d96857d13856511takashi relying on all configured information to construct a valid port number.</p>
e8811b6d38f756b325446ded5d96857d13856511takashi <p>The ordering of when the physical port is used is as follows:<br /><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd physical ports are removed from the ordering.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost
130d299c4b2b15be45532a176604c71fdc7bea5bnd <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
130d299c4b2b15be45532a176604c71fdc7bea5bnd<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>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<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
fb77c505254b6e9c925e23e734463e87574f8f40kess directives that will apply only to a particular virtual host. Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive that is allowed in a virtual host context may be
4025ef5b9785f4cc9e6456a1c0177383a8503361covener used. When the server receives a request for a document on a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive particular virtual host, it uses the configuration directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enclosed in the <code class="directive"><VirtualHost></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>A fully qualified domain name for the IP address of the
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive virtual host (not recommended);</li>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <li>The character <code>*</code>, which is used only in combination with
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <code>NameVirtualHost *</code> to match all IP addresses; or</li>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <li>The string <code>_default_</code>, which is used only
130d299c4b2b15be45532a176604c71fdc7bea5bnd with IP virtual hosting to catch unmatched IP addresses.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost 10.1.2.3><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.example.com<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </VirtualHost>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
7db9f691a00ead175b03335457ca296a33ddf31bnd the optional port number could not be determined otherwise. An
specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the
<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<p class="apache">Copyright 2010 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>