97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is generated from xml source: DO NOT EDIT
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>core - Apache HTTP Server Version 2.5</title>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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.5</a> > <a href="./">Modules</a></div>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
4aa805f8500255bc52a4c03259fe46df10a1d07cyoshiki<a href="/en/mod/core.html" title="English"> en </a> |
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen<a href="/es/mod/core.html" hreflang="es" rel="alternate" title="Espa�ol"> es </a> |
dfb59c684345700bf9186b8d44936f8b1ba082ffgryzor<a href="/fr/mod/core.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
ecc5150d35c0dc5ee5119c2717e6660fa331abbftakashi<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/core.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div id="quickview"><h3 class="directives">Directives</h3>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<li><img alt="" src="/images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><img alt="" src="/images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<li><img alt="" src="/images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
bed3c2e56e8f3328e780200466b9d009093db468sf<li><img alt="" src="/images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<li><img alt="" src="/images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<li><img alt="" src="/images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
9597f440430d8c876dd64f5f78066804650a18ecnoodl<li><img alt="" src="/images/down.gif" /> <a href="#define">Define</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#directory"><Directory></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><img alt="" src="/images/down.gif" /> <a href="#else"><Else></a></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><img alt="" src="/images/down.gif" /> <a href="#elseif"><ElseIf></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh<li><img alt="" src="/images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<li><img alt="" src="/images/down.gif" /> <a href="#error">Error</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<li><img alt="" src="/images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<li><img alt="" src="/images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#fileetag">FileETag</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#files"><Files></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#forcetype">ForceType</a></li>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<li><img alt="" src="/images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<li><img alt="" src="/images/down.gif" /> <a href="#if"><If></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#ifmodule"><IfModule></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#include">Include</a></li>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<li><img alt="" src="/images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limit"><Limit></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<li><img alt="" src="/images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#location"><Location></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><img alt="" src="/images/down.gif" /> <a href="#logleveloverride">LogLevelOverride</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<li><img alt="" src="/images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<li><img alt="" src="/images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<li><img alt="" src="/images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<li><img alt="" src="/images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li>
709e3a21ba73b8433462959cd56c773454b34441trawick<li><img alt="" src="/images/down.gif" /> <a href="#mutex">Mutex</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#options">Options</a></li>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<li><img alt="" src="/images/down.gif" /> <a href="#protocol">Protocol</a></li>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<li><img alt="" src="/images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<li><img alt="" src="/images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#servername">ServerName</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#timeout">TimeOut</a></li>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<li><img alt="" src="/images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<li><img alt="" src="/images/down.gif" /> <a href="#undefine">UnDefine</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><img alt="" src="/images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
117c1f888a14e73cdd821dc6c23eb0411144a41cnd<li><img alt="" src="/images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><img alt="" src="/images/down.gif" /> <a href="#warning">Warning</a></li>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh<ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen <p>This directive enables operating system specific optimizations for a
173e5f4d5ec46b5febb74ce860d753bb1faaba0fsf listening socket by the <code class="directive">Protocol</code> type.
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen The basic premise is for the kernel to not send a socket to the server
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen process until either data is received or an entire HTTP Request is buffered.
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor FreeBSD's Accept Filters</a>, Linux's more primitive
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe are currently supported.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Using <code>none</code> for an argument will disable any accept filters
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe for that protocol. This is useful for protocols that require a server
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
20f499565e77defe9dab24dd85c02f38a1175855nd <pre class="prettyprint lang-config">AcceptFilter nntp none</pre>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener <p>The default protocol names are <code>https</code> for port 443
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener and <code>http</code> for all other ports. To specify another protocol
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener is being used with a listening port, add the <var>protocol</var>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener argument to the <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener directive.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">AcceptFilter http httpready
4aa603e6448b99f9371397d439795c91a93637eandAcceptFilter https dataready</pre>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the kernel level. Once an entire request is received, the kernel then
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor sends it to the server. See the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor accf_http(9)</a> man page for more details. Since HTTPS requests are
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">AcceptFilter http data
4aa603e6448b99f9371397d439795c91a93637eandAcceptFilter https data</pre>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor requests. Any value besides <code>none</code> will enable
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor see the Linux
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">AcceptFilter http data
4aa603e6448b99f9371397d439795c91a93637eandAcceptFilter https data</pre>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe API, and does not support http protocol buffering. There are two values
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe which utilize the Windows AcceptEx() API and will recycle network
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe sockets between connections. <code>data</code> waits until data has
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe been transmitted as documented above, and the initial data buffer and
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network endpoint addresses are all retrieved from the single AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe invocation. <code>connect</code> will use the AcceptEx() API, also
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe retrieve the network endpoint addresses, but like <code>none</code>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe the <code>connect</code> option does not wait for the initial data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe transmission.</p>
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen <p>On Windows, <code>none</code> uses accept() rather than AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe and will not recycle sockets between connections. This is useful for
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network adapters with broken driver support, as well as some virtual
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network providers such as vpn drivers, or spam, virus or spyware
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor filters.</p>
c3c006c28c5b03892ccaef6e4d2cbb15a13a2072rbowen<li><code class="directive"><a href="#protocol">Protocol</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive controls whether requests that contain trailing
06ba4a61654b3763ad65f52283832ebf058fdf1cslive pathname information that follows an actual filename (or
06ba4a61654b3763ad65f52283832ebf058fdf1cslive non-existent file in an existing directory) will be accepted or
06ba4a61654b3763ad65f52283832ebf058fdf1cslive rejected. The trailing pathname information can be made
fb77c505254b6e9c925e23e734463e87574f8f40kess available to scripts in the <code>PATH_INFO</code> environment
fb77c505254b6e9c925e23e734463e87574f8f40kess variable.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>For example, assume the location <code>/test/</code> points to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive a directory that contains only the single file
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The three possible arguments for the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code class="directive">AcceptPathInfo</code> directive are:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><code>Off</code></dt><dd>A request will only be accepted if it
06ba4a61654b3763ad65f52283832ebf058fdf1cslive maps to a literal path that exists. Therefore a request with
06ba4a61654b3763ad65f52283832ebf058fdf1cslive trailing pathname information after the true filename such as
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>/test/here.html/more</code> in the above example will return
06ba4a61654b3763ad65f52283832ebf058fdf1cslive a 404 NOT FOUND error.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><code>On</code></dt><dd>A request will be accepted if a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive leading path component maps to a file that exists. The above
06ba4a61654b3763ad65f52283832ebf058fdf1cslive example <code>/test/here.html/more</code> will be accepted if
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>/test/here.html</code> maps to a valid file.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><code>Default</code></dt><dd>The treatment of requests with
06ba4a61654b3763ad65f52283832ebf058fdf1cslive trailing pathname information is determined by the <a href="/handler.html">handler</a> responsible for the request.
fb77c505254b6e9c925e23e734463e87574f8f40kess The core handler for normal files defaults to rejecting
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen <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
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The primary purpose of the <code>AcceptPathInfo</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive is to allow you to override the handler's choice of
fb77c505254b6e9c925e23e734463e87574f8f40kess accepting or rejecting <code>PATH_INFO</code>. This override is required,
fb77c505254b6e9c925e23e734463e87574f8f40kess for example, when you use a <a href="/filter.html">filter</a>, such
06ba4a61654b3763ad65f52283832ebf058fdf1cslive as <a href="mod_include.html">INCLUDES</a>, to generate content
fb77c505254b6e9c925e23e734463e87574f8f40kess based on <code>PATH_INFO</code>. The core handler would usually reject
fb77c505254b6e9c925e23e734463e87574f8f40kess the request, so you can use the following configuration to enable
06ba4a61654b3763ad65f52283832ebf058fdf1cslive such a script:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Files "mypaths.shtml">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options +Includes
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen SetOutputFilter INCLUDES
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen AcceptPathInfo On
4aa603e6448b99f9371397d439795c91a93637eand</Files></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>While processing a request the server looks for
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive the first existing configuration file from this list of names in
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive every directory of the path to the document, if distributed
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess configuration files are <a href="#allowoverride">enabled for that
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">AccessFileName .acl</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>before returning the document
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>/usr/local/web/index.html</code>, the server will read
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive for directives, unless they have been disabled with</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Directory "/">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen AllowOverride None
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><a href="/configuring.html">Configuration Files</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
627c978514c54179736d152923478be7c8707f9bndcontent-type is <code>text/plain</code> or <code>text/html</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd <p>This directive specifies a default value for the media type
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd charset parameter (the name of a character encoding) to be added
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd to a response if and only if the response's content-type is either
888b616027180cc8aaa4d2bee5ecc6acec175bc5nd <code>text/plain</code> or <code>text/html</code>. This should override
b95ae799514ad86a15610ad75808d7065e9847c9kess any charset specified in the body of the response via a <code>META</code>
888b616027180cc8aaa4d2bee5ecc6acec175bc5nd element, though the exact behavior is often dependent on the user's client
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd configuration. A setting of <code>AddDefaultCharset Off</code>
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd disables this functionality. <code>AddDefaultCharset On</code> enables
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd a default charset of <code>iso-8859-1</code>. Any other value is assumed
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd to be the <var>charset</var> to be used, which should be one of the
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd <a href="http://www.iana.org/assignments/character-sets">IANA registered
604c89126c27104f659d7a51b0113e3bd435faf8fielding charset values</a> for use in Internet media types (MIME types).
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd For example:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre>
888b616027180cc8aaa4d2bee5ecc6acec175bc5nd <p><code class="directive">AddDefaultCharset</code> should only be used when all
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd of the text resources to which it applies are known to be in that
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd character encoding and it is too inconvenient to label their charset
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd individually. One such example is to add the charset parameter
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd to resources containing generated content, such as legacy CGI
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd scripts, that might be vulnerable to cross-site scripting attacks
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd due to user-provided data being included in the output. Note, however,
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd that a better solution is to just fix (or delete) those scripts, since
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd setting a default charset does not protect users that have enabled
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd the "auto-detect character encoding" feature on their browser.</p>
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd<li><code class="directive"><a href="/mod/mod_mime.html#addcharset">AddCharset</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
9583adab6bc4b3758e41963c905d9dad9f067131nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirierNoDecode option available in 2.3.12 and later.</td></tr>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd which contain encoded path separators (<code>%2F</code> for <code>/</code>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd and additionally <code>%5C</code> for <code>\</code> on according systems)
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier to be used in the path info.</p>
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier <p>With the default value, <code>Off</code>, such URLs are refused
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier with a 404 (Not found) error.</p>
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier <p>With the value <code>On</code>, such URLs are accepted, and encoded
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier slashes are decoded like all other encoded characters.</p>
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier <p>With the value <code>NoDecode</code>, such URLs are accepted, but
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier encoded slashes are not decoded but left in their encoded state.</p>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier strongly recommended as a security measure. Allowing slashes
2509f1cd3be884abbe4852e15b8da00bebaad5b1poirier to be decoded could potentially allow unsafe paths.</p>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
6f7c18e70781deff3d1129774221de81b43c828end<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When the server finds an <code>.htaccess</code> file (as
fb77c505254b6e9c925e23e734463e87574f8f40kess specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
fb77c505254b6e9c925e23e734463e87574f8f40kess it needs to know which directives declared in that file can override
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess earlier configuration directives.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <div class="note"><h3>Only available in <Directory> sections</h3>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <code class="directive">AllowOverride</code> is valid only in
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#directory"><Directory></a></code>
ed0dae472b518c553c923a86fb4322d4c50d86a6nd 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
ed0dae472b518c553c923a86fb4322d4c50d86a6nd <code class="directive"><a href="#files"><Files></a></code> sections.
bed3c2e56e8f3328e780200466b9d009093db468sf <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> is set to
bed3c2e56e8f3328e780200466b9d009093db468sf <code>None</code> <a href="#accessfilename">.htaccess</a> files are
bed3c2e56e8f3328e780200466b9d009093db468sf completely ignored. In this case, the server will not even attempt
bed3c2e56e8f3328e780200466b9d009093db468sf to read <code>.htaccess</code> files in the filesystem.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>When this directive is set to <code>All</code>, then any
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>directive-type</var> can be one of the following
06ba4a61654b3763ad65f52283832ebf058fdf1cslive groupings of directives.</p>
262bea1fd79e346411f28f66dbbb3aebc72ae42arbowen Allow use of the authorization directives (<code class="directive"><a href="/mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz <code class="directive"><a href="/mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
cb3a1082aec4b3b4f4ed238c93c3cc54933a7f0end <code class="directive"><a href="/mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
9335f6d807d76d60e54af4ededdebebddb3e3d13noodl <code class="directive"><a href="/mod/mod_authn_core.html#authname">AuthName</a></code>,
9335f6d807d76d60e54af4ededdebebddb3e3d13noodl <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>
604c89126c27104f659d7a51b0113e3bd435faf8fielding Allow use of the directives controlling document types
604c89126c27104f659d7a51b0113e3bd435faf8fielding (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="#forcetype">ForceType</a></code>,
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="/mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="#sethandler">SetHandler</a></code>,
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="module"><a href="/mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
604c89126c27104f659d7a51b0113e3bd435faf8fielding 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>),
e6342815b6b2be821ab51f5e867e210b47203429humbedooh <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>),
e6342815b6b2be821ab51f5e867e210b47203429humbedooh <code class="module"><a href="/mod/mod_alias.html">mod_alias</a></code> directives (<code class="directive"><a href="/mod/mod_alias.html#redirect">Redirect</a></code>, <code class="directive"><a href="/mod/mod_alias.html#redirecttemp">RedirectTemp</a></code>, <code class="directive"><a href="/mod/mod_alias.html#redirectpermanent">RedirectPermanent</a></code>, <code class="directive"><a href="/mod/mod_alias.html#redirectmatch">RedirectMatch</a></code>), and
909ce17e2bd0faef7b1c294f2307f009793fd493nd <code class="directive"><a href="/mod/mod_actions.html#action">Action</a></code> from
909ce17e2bd0faef7b1c294f2307f009793fd493nd <code class="module"><a href="/mod/mod_actions.html">mod_actions</a></code>.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive Allow use of the directives controlling directory indexing
97a9a944b5887e91042b019776c41d5dd74557aferikabele (<code class="directive"><a href="/mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
97a9a944b5887e91042b019776c41d5dd74557aferikabele <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>,
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="/mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
9da97ff0bac3a0ff56a9cdebe6e5ab563636aa86jailletc <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_dir.html#fallbackresource">FallbackResource</a></code>, <a href="mod_autoindex.html#indexoptions.fancyindexing"><code>FancyIndexing</code></a>, <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>,
897b9432efe6e6effa0939f700b1ccc50b29698crbowen Allow use of the directives controlling host access (<code class="directive"><a href="/mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="/mod/mod_access_compat.html#deny">Deny</a></code> and <code class="directive"><a href="/mod/mod_access_compat.html#order">Order</a></code>).</dd>
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen Allow use of AllowOverride option to treat syntax errors in
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen .htaccess as non-fatal: instead of causing an Internal Server
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen Error, disallowed or unrecognised directives will be ignored
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen and a warning logged:
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen <li><strong>Nonfatal=Override</strong> treats directives
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen forbidden by AllowOverride as non-fatal.</li>
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen <li><strong>Nonfatal=Unknown</strong> treats unknown directives
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen as non-fatal. This covers typos and directives implemented
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen by a module that's not present.</li>
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen <li><strong>Nonfatal=All</strong> treats both the above as non-fatal.</li>
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen <p>Note that a syntax error in a valid directive will still cause
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen an internal server error.</p>
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen Nonfatal errors may have security implications for .htaccess users.
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen For example, if AllowOverride disallows AuthConfig, users'
d1636bdc2e674b84ee46f534b51be18ecac6bef5rbowen configuration designed to restrict access to a site will be disabled.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive Allow use of the directives controlling specific directory
97a9a944b5887e91042b019776c41d5dd74557aferikabele features (<code class="directive"><a href="#options">Options</a></code> and
8e31885fc494b603e0650113dde9e29d1b1d2602maczniak <code class="directive"><a href="/mod/mod_include.html#xbithack">XBitHack</a></code>).
8e31885fc494b603e0650113dde9e29d1b1d2602maczniak An equal sign may be given followed by a comma (but no spaces)
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener <div class="note"><h3>Implicit disabling of Options</h3>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <p>Even though the list of options that may be used in .htaccess files
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener can be limited with this directive, as long as any <code class="directive"><a href="#options">Options</a></code> directive is allowed any
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener other inherited option can be disabled by using the non-relative
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener syntax. In other words, this mechanism cannot force a specific option
a011221d1a3bfb6ec07a3596c6dc962c58041ee6covener to remain <em>set</em> while allowing any others to be set.
173e5f4d5ec46b5febb74ce860d753bb1faaba0fsf AllowOverride Options=Indexes,MultiViews
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre>
ed0dae472b518c553c923a86fb4322d4c50d86a6nd <p>In the example above all directives that are neither in the group
ed0dae472b518c553c923a86fb4322d4c50d86a6nd <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
ed0dae472b518c553c923a86fb4322d4c50d86a6nd server error.</p>
da637bcae7b6e150470e701af29da5604a34a17erbowen <div class="note"><p>For security and performance reasons, do not set
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>AllowOverride</code> to anything other than <code>None</code>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar in your <code><Directory "/"></code> block. Instead, find (or
da637bcae7b6e150470e701af29da5604a34a17erbowen create) the <code><Directory></code> block that refers to the
da637bcae7b6e150470e701af29da5604a34a17erbowen directory where you're actually planning to place a
7802d43d20007fa575e43b6ae77d5177ceffdb71sf<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf<li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf<li><a href="/configuring.html">Configuration Files</a></li>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
bed3c2e56e8f3328e780200466b9d009093db468sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
bed3c2e56e8f3328e780200466b9d009093db468sf<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directive</a></h2>
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Individual directives that are allowed in
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var>
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverrideList None</code></td></tr>
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
bed3c2e56e8f3328e780200466b9d009093db468sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
bed3c2e56e8f3328e780200466b9d009093db468sf <p>When the server finds an <code>.htaccess</code> file (as
bed3c2e56e8f3328e780200466b9d009093db468sf specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
bed3c2e56e8f3328e780200466b9d009093db468sf it needs to know which directives declared in that file can override
bed3c2e56e8f3328e780200466b9d009093db468sf earlier configuration directives.</p>
bed3c2e56e8f3328e780200466b9d009093db468sf <div class="note"><h3>Only available in <Directory> sections</h3>
bed3c2e56e8f3328e780200466b9d009093db468sf <code class="directive">AllowOverrideList</code> is valid only in
bed3c2e56e8f3328e780200466b9d009093db468sf <code class="directive"><a href="#directory"><Directory></a></code>
bed3c2e56e8f3328e780200466b9d009093db468sf 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
bed3c2e56e8f3328e780200466b9d009093db468sf <code class="directive"><a href="#files"><Files></a></code> sections.
bed3c2e56e8f3328e780200466b9d009093db468sf <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverride">AllowOverride</a></code> is set to <code>None</code>,
bed3c2e56e8f3328e780200466b9d009093db468sf then <a href="#accessfilename">.htaccess</a> files are completely
bed3c2e56e8f3328e780200466b9d009093db468sf ignored. In this case, the server will not even attempt to read
4aa603e6448b99f9371397d439795c91a93637eandAllowOverrideList Redirect RedirectMatch</pre>
bed3c2e56e8f3328e780200466b9d009093db468sf <p>In the example above only the <code>Redirect</code> and
bed3c2e56e8f3328e780200466b9d009093db468sf <code>RedirectMatch</code> directives are allowed. All others will
bed3c2e56e8f3328e780200466b9d009093db468sf cause an internal server error.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">AllowOverride AuthConfig
4aa603e6448b99f9371397d439795c91a93637eandAllowOverrideList CookieTracking CookieName</pre>
b244bbf442a0aea3dc397b4d0d751f4716c5891dnd <p>In the example above <code class="directive"><a href="#allowoverride">AllowOverride
bed3c2e56e8f3328e780200466b9d009093db468sf </a></code> grants permission to the <code>AuthConfig</code>
bed3c2e56e8f3328e780200466b9d009093db468sf directive grouping and <code class="directive">AllowOverrideList</code> grants
173e5f4d5ec46b5febb74ce860d753bb1faaba0fsf permission to only two directives from the <code>FileInfo</code> directive
bed3c2e56e8f3328e780200466b9d009093db468sf grouping. All others will cause an internal server error.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
bed3c2e56e8f3328e780200466b9d009093db468sf<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><a href="/configuring.html">Configuration Files</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><a href="/howto/htaccess.html">.htaccess Files</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
c985aca104389df30d6ec0a637ce0ccaac904362nd<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>This directive is used to control how Apache httpd finds the
fb77c505254b6e9c925e23e734463e87574f8f40kess interpreter used to run CGI scripts. For example, setting
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess cause all CGI script files with a <code>.foo</code> extension to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess be passed to the FOO interpreter.</p>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">Directive</a></h2>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIPassAuth On|Off</code></td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CGIPassAuth Off</code></td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0bd1ddab48139fbbe68f4e257fe669dc19f58fe9rbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr>
c1621f589e6e26efc55db89e59c9f445580856cctrawick <p><code class="directive">CGIPassAuth</code> allows scripts access to HTTP
c1621f589e6e26efc55db89e59c9f445580856cctrawick authorization headers such as <code>Authorization</code>, which is
c1621f589e6e26efc55db89e59c9f445580856cctrawick required for scripts that implement HTTP Basic authentication.
c1621f589e6e26efc55db89e59c9f445580856cctrawick Normally these HTTP headers are hidden from scripts, as it allows
c1621f589e6e26efc55db89e59c9f445580856cctrawick scripts to see user ids and passwords used to access the server when
c1621f589e6e26efc55db89e59c9f445580856cctrawick HTTP Basic authentication is enabled in the web server. This directive
c1621f589e6e26efc55db89e59c9f445580856cctrawick should be used when scripts are allowed to implement HTTP Basic
c1621f589e6e26efc55db89e59c9f445580856cctrawick authentication.</p>
c1621f589e6e26efc55db89e59c9f445580856cctrawick <p>This directive can be used instead of the compile-time setting
c1621f589e6e26efc55db89e59c9f445580856cctrawick <code>SECURITY_HOLE_PASS_AUTHORIZATION</code> which has been available
c1621f589e6e26efc55db89e59c9f445580856cctrawick in previous versions of Apache HTTP Server.</p>
c1621f589e6e26efc55db89e59c9f445580856cctrawick <p>The setting is respected by any modules which use
c1621f589e6e26efc55db89e59c9f445580856cctrawick <code>ap_add_common_vars()</code>, such as <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>,
c1621f589e6e26efc55db89e59c9f445580856cctrawick <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code>, <code class="module"><a href="/mod/mod_proxy_fcgi.html">mod_proxy_fcgi</a></code>,
c1621f589e6e26efc55db89e59c9f445580856cctrawick <code class="module"><a href="/mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>, and so on. Notably, it affects
c1621f589e6e26efc55db89e59c9f445580856cctrawick modules which don't handle the request in the usual sense but
c1621f589e6e26efc55db89e59c9f445580856cctrawick still use this API; examples of this are <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>
c1621f589e6e26efc55db89e59c9f445580856cctrawick and <code class="module"><a href="/mod/mod_ext_filter.html">mod_ext_filter</a></code>. Third-party modules that don't
c1621f589e6e26efc55db89e59c9f445580856cctrawick use <code>ap_add_common_vars()</code> may choose to respect the setting
c1621f589e6e26efc55db89e59c9f445580856cctrawick as well.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
627c978514c54179736d152923478be7c8707f9bnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive enables the generation of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>Content-MD5</code> headers as defined in RFC1864
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl respectively RFC2616.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>MD5 is an algorithm for computing a "message digest"
06ba4a61654b3763ad65f52283832ebf058fdf1cslive (sometimes called "fingerprint") of arbitrary-length data, with
06ba4a61654b3763ad65f52283832ebf058fdf1cslive a high degree of confidence that any alterations in the data
06ba4a61654b3763ad65f52283832ebf058fdf1cslive will be reflected in alterations in the message digest.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code>Content-MD5</code> header provides an end-to-end
06ba4a61654b3763ad65f52283832ebf058fdf1cslive message integrity check (MIC) of the entity-body. A proxy or
06ba4a61654b3763ad65f52283832ebf058fdf1cslive client may check this header for detecting accidental
06ba4a61654b3763ad65f52283832ebf058fdf1cslive modification of the entity-body in transit. Example header:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Note that this can cause performance problems on your server
06ba4a61654b3763ad65f52283832ebf058fdf1cslive since the message digest is computed on every request (the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive values are not cached).</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code>Content-MD5</code> is only sent for documents served
fb77c505254b6e9c925e23e734463e87574f8f40kess by the <code class="module"><a href="/mod/core.html">core</a></code>, and not by any module. For example,
fb77c505254b6e9c925e23e734463e87574f8f40kess SSI documents, output from CGI scripts, and byte range responses
fb77c505254b6e9c925e23e734463e87574f8f40kess do not have this header.</p>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directive</a></h2>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server run-time files</td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0237f43ab925775250e266e479d0a337ff374a4btakashi<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.4.2 and later</td></tr>
9464a57d17bd3db87268f8eed322ceb65cfec818jim <p>The <code class="directive">DefaultRuntimeDir</code> directive sets the
9464a57d17bd3db87268f8eed322ceb65cfec818jim directory in which the server will create various run-time files
9464a57d17bd3db87268f8eed322ceb65cfec818jim (shared memory, locks, etc.). If set as a relative path, the full path
9a2ff606f1e9b86fdb5ab5d9738a8deb648cbd0btrawick will be relative to <code class="directive">ServerRoot</code>.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">DefaultRuntimeDir scratch/</pre>
9464a57d17bd3db87268f8eed322ceb65cfec818jim <p>The default location of <code class="directive">DefaultRuntimeDir</code> may be
9464a57d17bd3db87268f8eed322ceb65cfec818jim modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define
9464a57d17bd3db87268f8eed322ceb65cfec818jim at build time.</p>
9464a57d17bd3db87268f8eed322ceb65cfec818jim <p>Note: <code class="directive">ServerRoot</code> should be specified before this
9464a57d17bd3db87268f8eed322ceb65cfec818jim directive is used, otherwise the default value of <code class="directive">ServerRoot</code>
9464a57d17bd3db87268f8eed322ceb65cfec818jim would be used to set the base directory.</p>
9464a57d17bd3db87268f8eed322ceb65cfec818jim security tips</a> for information on how to properly set
9464a57d17bd3db87268f8eed322ceb65cfec818jim permissions on the <code class="directive">ServerRoot</code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
604c89126c27104f659d7a51b0113e3bd435faf8fielding<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings
604c89126c27104f659d7a51b0113e3bd435faf8fieldingif the value is not <code>none</code>. In prior versions, DefaultType
604c89126c27104f659d7a51b0113e3bd435faf8fieldingwould specify a default media type to assign to response content for
604c89126c27104f659d7a51b0113e3bd435faf8fieldingwhich no other media type configuration could be found.
604c89126c27104f659d7a51b0113e3bd435faf8fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
604c89126c27104f659d7a51b0113e3bd435faf8fielding<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType none</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>All choices except <code>none</code> are DISABLED for 2.3.x and later.
604c89126c27104f659d7a51b0113e3bd435faf8fielding <p>This directive has been disabled. For backwards compatibility
604c89126c27104f659d7a51b0113e3bd435faf8fielding of configuration files, it may be specified with the value
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code>none</code>, meaning no default media type. For example:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">DefaultType None</pre>
604c89126c27104f659d7a51b0113e3bd435faf8fielding <p><code>DefaultType None</code> is only available in
604c89126c27104f659d7a51b0113e3bd435faf8fielding httpd-2.2.7 and later.</p>
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> to configure media
604c89126c27104f659d7a51b0113e3bd435faf8fielding type assignments via file extensions, or the
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
604c89126c27104f659d7a51b0113e3bd435faf8fielding the media type for specific resources. Otherwise, the server will
604c89126c27104f659d7a51b0113e3bd435faf8fielding send the response without a Content-Type header field and the
604c89126c27104f659d7a51b0113e3bd435faf8fielding recipient may attempt to guess the media type.</p>
9597f440430d8c876dd64f5f78066804650a18ecnoodl<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9597f440430d8c876dd64f5f78066804650a18ecnoodl<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define a variable</td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var> [<var>parameter-value</var>]</code></td></tr>
1723928efa40774afc394d9e6b2b974c1f49330dnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
9597f440430d8c876dd64f5f78066804650a18ecnoodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
9597f440430d8c876dd64f5f78066804650a18ecnoodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>In its one parameter form, <code class="directive">Define</code> is equivalent
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf to passing the <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>. It
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf can be used to toggle the use of
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <code class="directive"><a href="#ifdefine"><IfDefine></a></code> sections
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf without needing to alter <code>-D</code> arguments in any startup
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf scripts.</p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>In addition to that, if the second parameter is given, a config variable
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf is set to this value. The variable can be used in the configuration using
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf the <code>${VAR}</code> syntax. The variable is always globally defined
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf and not limited to the scope of the surrounding config section.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><IfDefine TEST>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Define servername test.example.com
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfDefine>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfDefine !TEST>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Define servername www.example.com
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfDefine>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf <p>Variable names may not contain colon ":" characters, to avoid clashes
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf with <code class="directive"><a href="/mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p>
1723928efa40774afc394d9e6b2b974c1f49330dnd <p>While this directive is supported in virtual host context,
1723928efa40774afc394d9e6b2b974c1f49330dnd the changes it makes are visible to any later configuration
1723928efa40774afc394d9e6b2b974c1f49330dnd directives, beyond any enclosing virtual host</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
cb43ec0a02f97651bf2f46c9f4b9b48d5cb22df7rbowennamed file-system directory, sub-directories, and their contents.</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Directory <var>directory-path</var>>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><Directory></code> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code></Directory></code> are used to enclose a group of
cb43ec0a02f97651bf2f46c9f4b9b48d5cb22df7rbowen directives that will apply only to the named directory,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor sub-directories of that directory, and the files within the respective
cb43ec0a02f97651bf2f46c9f4b9b48d5cb22df7rbowen directories. Any directive that is allowed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd in a directory context may be used. <var>Directory-path</var> is
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive either the full path to a directory, or a wild-card string using
fb77c505254b6e9c925e23e734463e87574f8f40kess Unix shell-style matching. In a wild-card string, <code>?</code> matches
fb77c505254b6e9c925e23e734463e87574f8f40kess any single character, and <code>*</code> matches any sequences of
fb77c505254b6e9c925e23e734463e87574f8f40kess characters. You may also use <code>[]</code> character ranges. None
fb77c505254b6e9c925e23e734463e87574f8f40kess of the wildcards match a `/' character, so <code><Directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar "/*/public_html"></code> will not match
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive <code>/home/user/public_html</code>, but <code><Directory
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar "/home/*/public_html"></code> will match. Example:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/usr/local/httpd/htdocs">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options Indexes FollowSymLinks
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
ebd09f6552c1608b4e427b75471e72aff8dcef33rbowen <p>Directory paths <em>may</em> be quoted, if you like, however, it
ebd09f6552c1608b4e427b75471e72aff8dcef33rbowen <em>must</em> be quoted if the path contains spaces. This is because a
ebd09f6552c1608b4e427b75471e72aff8dcef33rbowen space would otherwise indicate the end of an argument.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Be careful with the <var>directory-path</var> arguments:
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen They have to literally match the filesystem path which Apache httpd uses
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to access the files. Directives applied to a particular
fb77c505254b6e9c925e23e734463e87574f8f40kess <code><Directory></code> will not apply to files accessed from
fb77c505254b6e9c925e23e734463e87574f8f40kess that same directory via a different path, such as via different symbolic
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd links.</p>
d1348237b33bc1755b9f1165eea52317465a7671nd <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular
d1348237b33bc1755b9f1165eea52317465a7671nd expressions</a> can also be used, with the addition of the
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory ~ "^/www/[0-9]{3}">
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match directories in <code>/www/</code> that consisted of
fb77c505254b6e9c925e23e734463e87574f8f40kess three numbers.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>If multiple (non-regular expression) <code class="directive"><Directory></code> sections
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess match the directory (or one of its parents) containing a document,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive then the directives are applied in the order of shortest match
06ba4a61654b3763ad65f52283832ebf058fdf1cslive first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Directory "/">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen AllowOverride None
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</Directory>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<Directory "/home">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen AllowOverride FileInfo
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>for access to the document <code>/home/web/dir/doc.html</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the steps are:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <li>Apply directive <code>AllowOverride FileInfo</code> (for
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/home/web/dir/.htaccess</code> in that order.</li>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Regular expressions are not considered until after all of the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive normal sections have been applied. Then all of the regular
06ba4a61654b3763ad65f52283832ebf058fdf1cslive expressions are tested in the order they appeared in the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configuration file. For example, with</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory ~ "abc$">
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh # ... directives here ...
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>the regular expression section won't be considered until after
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess all normal <code class="directive"><Directory></code>s and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>.htaccess</code> files have been applied. Then the regular
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess expression will match on <code>/home/abc/public_html/abc</code> and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the corresponding <code class="directive"><Directory></code> will
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess be applied.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code><Directory "/"></code> is to permit all access.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen This means that Apache httpd will serve any file mapped from an URL. It is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive recommended that you change this with a block such
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Directory "/">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Require all denied
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <em>want</em> accessible. See the <a href="/misc/security_tips.html">Security Tips</a> page for more
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The directory sections occur in the <code>httpd.conf</code> file.
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><Directory></code> directives
97a9a944b5887e91042b019776c41d5dd74557aferikabele 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <Location> and <Files> sections work</a> for an
06ba4a61654b3763ad65f52283832ebf058fdf1cslive explanation of how these different sections are combined when a
fe64b2ba25510d8c9dba5560a2d537763566cf40nd request is received</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
cb43ec0a02f97651bf2f46c9f4b9b48d5cb22df7rbowenthe contents of file-system directories matching a regular expression.</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><DirectoryMatch <var>regex</var>>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><DirectoryMatch></code> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code></DirectoryMatch></code> are used to enclose a group
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of directives which will apply only to the named directory (and the files within),
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the same as <code class="directive"><a href="#directory"><Directory></a></code>.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor However, it takes as an argument a
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>. For example:</p>
9a73a4c53f0e587b13c2be814538d90488290266rbowen <pre class="prettyprint lang-config"><DirectoryMatch "^/www/(.+/)?[0-9]{3}/">
4aa603e6448b99f9371397d439795c91a93637eand</DirectoryMatch></pre>
9a73a4c53f0e587b13c2be814538d90488290266rbowen <p>matches directories in <code>/www/</code> (or any subdirectory thereof)
9a73a4c53f0e587b13c2be814538d90488290266rbowen that consist of three numbers.</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener Prior to 2.3.9, this directive implicitly applied to sub-directories
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener (like <code class="directive"><a href="#directory"><Directory></a></code>) and
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener could not match the end of line symbol ($). In 2.3.9 and later,
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener only directories that match the expression are affected by the enclosed
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener directives.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor This directive applies to requests for directories that may or may
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor not end in a trailing slash, so expressions that are anchored to the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener end of line ($) must be written with care.
f4cbda69df0490c6deaacb8d04f103d200ddd183nd <p>From 2.4.8 onwards, named groups and backreferences are captured and
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin written to the environment with the corresponding name prefixed with
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin "MATCH_" and in upper case. This allows elements of paths to be referenced
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cnd from within <a href="/expr.html">expressions</a> and modules like
d1e976f5d61801abdaf621b7546944168be40ce9minfrin <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
d1e976f5d61801abdaf621b7546944168be40ce9minfrin (unnamed) backreferences are ignored. Use named groups instead.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<pre class="prettyprint lang-config"><DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)">
9a73a4c53f0e587b13c2be814538d90488290266rbowen Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
4aa603e6448b99f9371397d439795c91a93637eand</DirectoryMatch></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#directory"><Directory></a></code> for
06ba4a61654b3763ad65f52283832ebf058fdf1cslivea description of how regular expressions are mixed in with normal
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location> and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<Files> sections work</a> for an explanation of how these different
313bb560bc5c323cfd40c9cad7335b4b8e060aedkesssections are combined when a request is received</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
9bcfc3697a91b5215893a7d0206865b13fc72148nd <p>This directive sets the directory from which <code class="program"><a href="/programs/httpd.html">httpd</a></code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess path from the requested URL to the document root to make the
fb77c505254b6e9c925e23e734463e87574f8f40kess path to the document. Example:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>then an access to
d565edaec710102f7e7d06252aaf1de67b7ddd25rbowen <code>http://my.example.com/index.html</code> refers to
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">DocumentRoot</code> should be specified without
06ba4a61654b3763ad65f52283832ebf058fdf1cslive a trailing slash.</p>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen<li><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8559a67073808d84d85bb5dd552d4247caafe709sf<div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">Directive</a></h2>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a
8559a67073808d84d85bb5dd552d4247caafe709sfprevious <code class="directive"><a href="#if"><If></a></code> or
8559a67073808d84d85bb5dd552d4247caafe709sf<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Else> ... </Else></code></td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf <p>The <code class="directive"><Else></code> applies the enclosed
8559a67073808d84d85bb5dd552d4247caafe709sf directives if and only if the most recent
8559a67073808d84d85bb5dd552d4247caafe709sf in the same scope has not been applied.
8559a67073808d84d85bb5dd552d4247caafe709sf For example: In </p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><If "-z req('Host')">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<Else>
4aa603e6448b99f9371397d439795c91a93637eand</Else></pre>
8559a67073808d84d85bb5dd552d4247caafe709sf <p> The <code class="directive"><If></code> would match HTTP/1.0
8559a67073808d84d85bb5dd552d4247caafe709sf <code class="directive"><Else></code> would match requests
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#if"><If></a></code></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><a href="/sections.html">How <Directory>, <Location>,
8559a67073808d84d85bb5dd552d4247caafe709sf <Files> sections work</a> for an explanation of how these
8559a67073808d84d85bb5dd552d4247caafe709sf different sections are combined when a request is received.
8559a67073808d84d85bb5dd552d4247caafe709sf <code class="directive"><Else></code> are applied last.</li>
8559a67073808d84d85bb5dd552d4247caafe709sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
8559a67073808d84d85bb5dd552d4247caafe709sf<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">Directive</a></h2>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied
8559a67073808d84d85bb5dd552d4247caafe709sfby a request at runtime while the condition of a previous
8559a67073808d84d85bb5dd552d4247caafe709sf<code class="directive"><a href="#if"><If></a></code> or
8559a67073808d84d85bb5dd552d4247caafe709sf<code class="directive"><ElseIf></code> section is not
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf <p>The <code class="directive"><ElseIf></code> applies the enclosed
8559a67073808d84d85bb5dd552d4247caafe709sf directives if and only if both the given condition evaluates to true and
8559a67073808d84d85bb5dd552d4247caafe709sf the most recent <code class="directive"><If></code> or
8559a67073808d84d85bb5dd552d4247caafe709sf <code class="directive"><ElseIf></code> section in the same scope has
8559a67073808d84d85bb5dd552d4247caafe709sf not been applied. For example: In </p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><If "-R '10.1.0.0/16'">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<ElseIf "-R '10.0.0.0/8'">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</ElseIf>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<Else>
4aa603e6448b99f9371397d439795c91a93637eand</Else></pre>
8559a67073808d84d85bb5dd552d4247caafe709sf <p>The <code class="directive"><ElseIf></code> would match if
8559a67073808d84d85bb5dd552d4247caafe709sf the remote address of a request belongs to the subnet 10.0.0.0/8 but
8559a67073808d84d85bb5dd552d4247caafe709sf<li><a href="/expr.html">Expressions in Apache HTTP Server</a>,
8559a67073808d84d85bb5dd552d4247caafe709sffor a complete reference and more examples.</li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#if"><If></a></code></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#else"><Else></a></code></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><a href="/sections.html">How <Directory>, <Location>,
8559a67073808d84d85bb5dd552d4247caafe709sf <Files> sections work</a> for an explanation of how these
8559a67073808d84d85bb5dd552d4247caafe709sf different sections are combined when a request is received.
8559a67073808d84d85bb5dd552d4247caafe709sf <code class="directive"><Else></code> are applied last.</li>
8559a67073808d84d85bb5dd552d4247caafe709sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
9bcfc3697a91b5215893a7d0206865b13fc72148nd <p>This directive controls whether the <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive memory-mapping if it needs to read the contents of a file during
ff797e743eb73c1d45b08158aa6b288c2d0c46eeslive delivery. By default, when the handling of a request requires
fb77c505254b6e9c925e23e734463e87574f8f40kess access to the data within a file -- for example, when delivering a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen server-parsed file using <code class="module"><a href="/mod/mod_include.html">mod_include</a></code> -- Apache httpd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd memory-maps the file if the OS supports it.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This memory-mapping sometimes yields a performance improvement.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive But in some environments, it is better to disable the memory-mapping
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to prevent operational problems:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <li>On some multiprocessor systems, memory-mapping can reduce the
9bcfc3697a91b5215893a7d0206865b13fc72148nd performance of the <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</li>
e4286c93598ad346ac365e59ac9c6f9e6e9fd324poirier <li>Deleting or truncating a file while <code class="program"><a href="/programs/httpd.html">httpd</a></code>
e4286c93598ad346ac365e59ac9c6f9e6e9fd324poirier has it memory-mapped can cause <code class="program"><a href="/programs/httpd.html">httpd</a></code> to
e4286c93598ad346ac365e59ac9c6f9e6e9fd324poirier crash with a segmentation fault.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For server configurations that are vulnerable to these problems,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd you should disable memory-mapping of delivered files by specifying:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">EnableMMAP Off</pre>
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh <p>For NFS mounted files, this feature may be disabled explicitly for
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh the offending files by specifying:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen EnableMMAP Off
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Default changed to Off in
9bcfc3697a91b5215893a7d0206865b13fc72148nd <p>This directive controls whether <code class="program"><a href="/programs/httpd.html">httpd</a></code> may use the
9bcfc3697a91b5215893a7d0206865b13fc72148nd sendfile support from the kernel to transmit file contents to the client.
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh By default, when the handling of a request requires no access
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh to the data within a file -- for example, when delivering a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen static file -- Apache httpd uses sendfile to deliver the file contents
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh without ever reading the file if the OS supports it.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>This sendfile mechanism avoids separate read and send operations,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and buffer allocations. But on some platforms or within some
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess filesystems, it is better to disable this feature to avoid
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh operational problems:</p>
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh <li>Some platforms may have broken sendfile support that the build
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh system did not detect, especially if the binaries were built on
9fb925624300c864fe3969a264e52aa83f3c2dd0slive another box and moved to such a machine with broken sendfile
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess support.</li>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley <li>On Linux the use of sendfile triggers TCP-checksum
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley offloading bugs on certain networking cards when using IPv6.</li>
f653ca260580e6d64d92ae29963f207b94e87353nd <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle
f653ca260580e6d64d92ae29963f207b94e87353nd files over 2GB in size.</li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the kernel may be unable to serve the network file through
9fb925624300c864fe3969a264e52aa83f3c2dd0slive its own cache.</li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>For server configurations that are not vulnerable to these problems,
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf you may enable this feature by specifying:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">EnableSendfile On</pre>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>For network mounted files, this feature may be disabled explicitly
9fb925624300c864fe3969a264e52aa83f3c2dd0slive for the offending files by specifying:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/path-to-nfs-files">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen EnableSendfile Off
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <p>Please note that the per-directory and .htaccess configuration
832853bb93c1831daf24e4727c5ca0e1b1786e83lars of <code class="directive">EnableSendfile</code> is not supported by
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <code class="module"><a href="/mod/mod_cache_disk.html">mod_cache_disk</a></code>.
832853bb93c1831daf24e4727c5ca0e1b1786e83lars Only global definition of <code class="directive">EnableSendfile</code>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars is taken into account by the module.
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directive</a></h2>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Error <var>message</var></code></td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.9 and later</td></tr>
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick <p>If an error can be detected within the configuration, this
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick directive can be used to generate a custom error message, and halt
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick configuration parsing. The typical use is for reporting required
dce2bc31f4940687c7ffabb80570bc37ea7296d8trawick modules which are missing from the configuration.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# ensure that mod_include is loaded
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfModule !include_module>
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh Error "mod_include is required by mod_foo. Load it with LoadModule."
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfModule>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# ensure that exactly one of SSL,NOSSL is defined
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfDefine SSL>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfDefine NOSSL>
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh Error "Both SSL and NOSSL are defined. Define only one of them."
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfDefine>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfDefine>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfDefine !SSL>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<IfDefine !NOSSL>
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh Error "Either SSL or NOSSL must be defined."
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</IfDefine>
4aa603e6448b99f9371397d439795c91a93637eand</IfDefine></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>In the event of a problem or error, Apache httpd can be configured
06ba4a61654b3763ad65f52283832ebf058fdf1cslive to do one of four things,</p>
1126fe9569c24b1ef2acb98df6b84d4d7d934c82minfrin <li>internally redirect to a local <var>URL-path</var> to handle the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The first option is the default, while options 2-4 are
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configured using the <code class="directive">ErrorDocument</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive, which is followed by the HTTP response code and a URL
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen or a message. Apache httpd will sometimes offer additional information
bb7915b2b753442f98a887bec18d0267c9ce92bdsf <p>From 2.4.13, <a href="/expr.html">expression syntax</a> can be
bb7915b2b753442f98a887bec18d0267c9ce92bdsf used inside the directive to produce dynamic strings and URLs.</p>
59cd19c3d75e35ae820e23f6b0161910784fce4eslive <p>URLs can begin with a slash (/) for local web-paths (relative
59cd19c3d75e35ae820e23f6b0161910784fce4eslive to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
59cd19c3d75e35ae820e23f6b0161910784fce4eslive full URL which the client can resolve. Alternatively, a message
bb7915b2b753442f98a887bec18d0267c9ce92bdsf can be provided to be displayed by the browser. Note that deciding
bb7915b2b753442f98a887bec18d0267c9ce92bdsf whether the parameter is an URL, a path or a message is performed
bb7915b2b753442f98a887bec18d0267c9ce92bdsf before any expression is parsed. Examples:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">ErrorDocument 500 http://foo.example.com/cgi-bin/tester
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorDocument 401 /subscription_info.html
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorDocument 403 "Sorry can't allow you access today"
bb7915b2b753442f98a887bec18d0267c9ce92bdsfErrorDocument 403 Forbidden!
bb7915b2b753442f98a887bec18d0267c9ce92bdsfErrorDocument 403 /cgi-bin/forbidden.pl?referrer=%{escape:%{HTTP_REFERER}}</pre>
7a497a1b89d0b52f5284854eb12662b4bd80ba5cnd <p>Additionally, the special value <code>default</code> can be used
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen to specify Apache httpd's simple hardcoded message. While not required
7a497a1b89d0b52f5284854eb12662b4bd80ba5cnd under normal circumstances, <code>default</code> will restore
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd's simple hardcoded message for configurations that would
7a497a1b89d0b52f5284854eb12662b4bd80ba5cnd otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen ErrorDocument 404 default
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Note that when you specify an <code class="directive">ErrorDocument</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive that points to a remote URL (ie. anything with a method such as
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive client to tell it where to find the document, even if the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive document ends up being on the same server. This has several
06ba4a61654b3763ad65f52283832ebf058fdf1cslive implications, the most important being that the client will not
06ba4a61654b3763ad65f52283832ebf058fdf1cslive receive the original error status code, but instead will
06ba4a61654b3763ad65f52283832ebf058fdf1cslive receive a redirect status code. This in turn can confuse web
06ba4a61654b3763ad65f52283832ebf058fdf1cslive robots and other clients which try to determine if a URL is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive valid using the status code. In addition, if you use a remote
06ba4a61654b3763ad65f52283832ebf058fdf1cslive URL in an <code>ErrorDocument 401</code>, the client will not
06ba4a61654b3763ad65f52283832ebf058fdf1cslive know to prompt the user for a password since it will not
06ba4a61654b3763ad65f52283832ebf058fdf1cslive receive the 401 status code. Therefore, <strong>if you use an
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>ErrorDocument 401</code> directive then it must refer to a local
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Microsoft Internet Explorer (MSIE) will by default ignore
fb77c505254b6e9c925e23e734463e87574f8f40kess server-generated error messages when they are "too small" and substitute
fb77c505254b6e9c925e23e734463e87574f8f40kess its own "friendly" error messages. The size threshold varies depending on
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive the type of error, but in general, if you make your error document
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive greater than 512 bytes, then MSIE will show the server-generated
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive error rather than masking it. More information is available in
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh <p>Although most error messages can be overridden, there are certain
59cd19c3d75e35ae820e23f6b0161910784fce4eslive circumstances where the internal messages are used regardless of the
59cd19c3d75e35ae820e23f6b0161910784fce4eslive setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>. In
59cd19c3d75e35ae820e23f6b0161910784fce4eslive particular, if a malformed request is detected, normal request processing
59cd19c3d75e35ae820e23f6b0161910784fce4eslive will be immediately halted and the internal error message returned.
59cd19c3d75e35ae820e23f6b0161910784fce4eslive This is necessary to guard against security problems caused by
59cd19c3d75e35ae820e23f6b0161910784fce4eslive bad requests.</p>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <p>If you are using mod_proxy, you may wish to enable
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <code class="directive"><a href="/mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will not generate custom error documents for proxied content.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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>
c1fcddc76fd5db5ac4ccd7c6ae839d53d128f354minfrin<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">ErrorLog</code> directive sets the name of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the file to which the server will log any errors it encounters. If
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the <var>file-path</var> is not absolute then it is assumed to be
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre>
db2474c3448fc75c325aa43ba0144fced1a38c53rjung begins with a pipe character "<code>|</code>" then it is assumed to be a
db2474c3448fc75c325aa43ba0144fced1a38c53rjung command to spawn to handle the error log.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre>
db2474c3448fc75c325aa43ba0144fced1a38c53rjung <p>See the notes on <a href="/logs.html#piped">piped logs</a> for
db2474c3448fc75c325aa43ba0144fced1a38c53rjung more information.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Using <code>syslog</code> instead of a filename enables logging
4044e4b6cb07cf7fa8e90676fafffe543c1d439bjim via syslogd(8) if the system supports it and if <code class="module"><a href="/mod/mod_syslog.html">mod_syslog</a></code>
4044e4b6cb07cf7fa8e90676fafffe543c1d439bjim is loaded. The default is to use syslog facility <code>local7</code>,
4044e4b6cb07cf7fa8e90676fafffe543c1d439bjim but you can override this by using the <code>syslog:<var>facility</var></code>
4044e4b6cb07cf7fa8e90676fafffe543c1d439bjim syntax where <var>facility</var> can be one of the names usually documented in
5155e92c6100b47513159eee1b2b9914ab204a5acovener syslog(1). The facility is effectively global, and if it is changed
5155e92c6100b47513159eee1b2b9914ab204a5acovener in individual virtual hosts, the final facility specified affects the
5155e92c6100b47513159eee1b2b9914ab204a5acovener entire server.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ErrorLog syslog:user</pre>
4044e4b6cb07cf7fa8e90676fafffe543c1d439bjim <p>Additional modules can provide their own ErrorLog providers. The syntax
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>SECURITY: See the <a href="/misc/security_tips.html#serverroot">security tips</a>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive document for details on why your security could be compromised
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick if the directory where log files are stored is writable by
06ba4a61654b3763ad65f52283832ebf058fdf1cslive anyone other than the user that starts the server.</p>
c023f60e35022146373e40249f0c8c8d623b6fcfnd <p>When entering a file path on non-Unix platforms, care should be taken
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen to make sure that only forward slashes are used even though the platform
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor may allow the use of back slashes. In general it is a good idea to always
c023f60e35022146373e40249f0c8c8d623b6fcfnd use forward slashes throughout the configuration files.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><a href="/logs.html">Apache HTTP Server Log Files</a></li>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directive</a></h2>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format specification for error log entries</td></tr>
2851546ce44280e54301016a7e92b00a87745509sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p><code class="directive">ErrorLogFormat</code> allows to specify what
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf supplementary information is logged in the error log in addition to the
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf actual log message.</p>
4aa603e6448b99f9371397d439795c91a93637eandErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>Specifying <code>connection</code> or <code>request</code> as first
4cb65c31bc681540ea623e1cb2bdd09749fb8d7esf parameter allows to specify additional formats, causing additional
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf information to be logged when the first message is logged for a specific
2bb4320391b88748dc6e851deca941b058231664rbowen connection or request, respectively. This additional information is only
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf logged once per connection/request. If a connection or request is processed
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf without causing any log message, the additional information is not logged
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf either.</p>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>It can happen that some format string items do not produce output. For
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf example, the Referer header is only present if the log message is
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf associated to a request and the log message happens at a time when the
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf Referer header has already been read from the client. If no output is
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh produced, the default behavior is to delete everything from the preceding
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf space character to the next space character. This means the log line is
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf implicitly divided into fields on non-whitespace to whitespace transitions.
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf If a format string item does not produce output, the whole field is
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh omitted. For example, if the remote address <code>%a</code> in the log
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf format <code>[%t] [%l] [%a] %M </code> is not available, the surrounding
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf brackets are not logged either. Space characters can be escaped with a
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf backslash to prevent them from delimiting a field. The combination '% '
198c35e2b8696f42f3b2a4130f2ae1225b26d2c6humbedooh (percent space) is a zero-width field delimiter that does not produce any
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf output.</p>
2bb4320391b88748dc6e851deca941b058231664rbowen <p>The above behavior can be changed by adding modifiers to the format
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf respective item does not produce any output. In once-per-connection/request
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen formats, it is also possible to use the <code>+</code> (plus) modifier. If an
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen item with the plus modifier does not produce any output, the whole line is
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh omitted.</p>
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen <p>A number as modifier can be used to assign a log severity level to a
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen format item. The item will only be logged if the severity of the log
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen message is not higher than the specified log severity level. The number can
a547340d7d0f0e79c9ba921c7dec7b18d0c800ffrbowen range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
221a06bb836af6024708190895834af79c90d1c8rbowen <p>For example, here's what would happen if you added modifiers to
2bb4320391b88748dc6e851deca941b058231664rbowen <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr>
2bb4320391b88748dc6e851deca941b058231664rbowen <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
2bb4320391b88748dc6e851deca941b058231664rbowen <td>Omits the entire line if <code>Referer</code> is not set.</td>
2bb4320391b88748dc6e851deca941b058231664rbowen <td>Logs the <code>Referer</code> only if the log message severity
2bb4320391b88748dc6e851deca941b058231664rbowen is higher than 4.</td>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>Some format string items accept additional parameters in braces.</p>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <table class="bordered"><tr class="header"><th>Format String</th> <th>Description</th></tr>
59877c2b4bb77f563370d7fb238f4a6d7a0e7f44minfrin <td>Client IP address and port of the request</td></tr>
59877c2b4bb77f563370d7fb238f4a6d7a0e7f44minfrin <td>Underlying peer IP address and port of the connection (see the
57b31f30545668d28e895efe7f5c0eb15d37a03figalic <code class="module"><a href="/mod/mod_remoteip.html">mod_remoteip</a></code> module)</td></tr>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen <td>Request environment variable <em>name</em></td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <td>Source file name and line number of the log call</td></tr>
57b31f30545668d28e895efe7f5c0eb15d37a03figalic<tr class="odd"><td><code>%{<em>name</em>}i</code></td>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <td>Number of keep-alive requests on this connection</td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
57b31f30545668d28e895efe7f5c0eb15d37a03figalic<tr class="odd"><td><code>%{<em>name</em>}n</code></td>
ffb01336be79c64046b636e59fa8ddca8ec029edsf <td>System unique thread ID of current thread (the same ID as
ffb01336be79c64046b636e59fa8ddca8ec029edsf displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <td>The current time in compact ISO 8601 format, including
e80f65dadea03d04ee5b9e2d3de8c5fcef9e6714minfrin <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
e80f65dadea03d04ee5b9e2d3de8c5fcef9e6714minfrin <td>The server name of the server serving the request according to the
e80f65dadea03d04ee5b9e2d3de8c5fcef9e6714minfrin <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
57b31f30545668d28e895efe7f5c0eb15d37a03figalic<tr class="odd"><td><code>% </code> (percent space)</td>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>The log ID format <code>%L</code> produces a unique id for a connection
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf or request. This can be used to correlate which log lines belong to the
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf same connection or request, which request happens on which connection.
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <code class="module"><a href="/mod/mod_log_config.html">mod_log_config</a></code>, to allow to correlate access log entries
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic with error log lines. If <code class="module"><a href="/mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic unique id will be used as log ID for requests.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">#Example (default format for threaded MPMs)
4aa603e6448b99f9371397d439795c91a93637eandErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%�,\�referer\�%{Referer}i"</pre>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh <p>Notice that, as discussed above, some fields are omitted
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen entirely because they are not defined.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">#Example (similar to the 2.2.x format)
4aa603e6448b99f9371397d439795c91a93637eandErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%�,\�referer\�%{Referer}i"</pre>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">#Advanced example with request/connection log IDs
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
4aa603e6448b99f9371397d439795c91a93637eandErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"</pre>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<li><a href="/logs.html">Apache HTTP Server Log Files</a></li>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <p>This option tracks additional data per worker about the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor currently executing request, and a utilization summary; you
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor can see these variables during runtime by configuring
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <code class="module"><a href="/mod/mod_status.html">mod_status</a></code>. Note that other modules may
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin rely on this scoreboard.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <p>This setting applies to the entire server, and cannot be
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin enabled or disabled on a virtualhost-by-virtualhost basis.
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin The collection of extended status information can slow down
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin the server. Also note that this setting cannot be changed
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin during a graceful restart.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Note that loading <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> will change
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin the default behavior to ExtendedStatus On, while other
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin third party modules may do the same. Such modules rely on
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin collecting detailed information about the state of all workers.
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin The default is changed by <code class="module"><a href="/mod/mod_status.html">mod_status</a></code> beginning
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin with version 2.3.6; the previous default was always Off.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
3b344f09f974c861c700f6cbcb0682b40e79dd66sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag MTime Size</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3b344f09f974c861c700f6cbcb0682b40e79dd66sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default used to be "INode MTime Size" in 2.3.14 and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive The <code class="directive">FileETag</code> directive configures the file
fb77c505254b6e9c925e23e734463e87574f8f40kess 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.
fb77c505254b6e9c925e23e734463e87574f8f40kess (The <code>ETag</code> value is used in cache management to save
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen network bandwidth.) The
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive">FileETag</code> directive allows you to choose
fb77c505254b6e9c925e23e734463e87574f8f40kess which of these -- if any -- should be used. The recognized keywords are:
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <dd>The file's i-node number will be included in the calculation</dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <dd>The date and time the file was last modified will be included</dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <dd>The number of bytes in the file will be included</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>All available fields will be used. This is equivalent to:
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">FileETag INode MTime Size</pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>If a document is file-based, no <code>ETag</code> field will be
fb77c505254b6e9c925e23e734463e87574f8f40kess included in the response</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd keywords may be prefixed with either <code>+</code> or <code>-</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd which allow changes to be made to the default setting inherited
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from a broader scope. Any keyword appearing without such a prefix
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd immediately and completely cancels the inherited setting.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If a directory's configuration includes
db99fa79ac42b9cc42b63386eb289aecb0f3cb9cnd <code>FileETag INode MTime Size</code>, and a
db99fa79ac42b9cc42b63386eb289aecb0f3cb9cnd subdirectory's includes <code>FileETag -INode</code>,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the setting for that subdirectory (which will be inherited by
06ba4a61654b3763ad65f52283832ebf058fdf1cslive any sub-subdirectories that don't override it) will be equivalent to
8010b66c363b5b847dc83d9d23f12c68e5bf3a56rpluem Do not change the default for directories or locations that have WebDAV
8010b66c363b5b847dc83d9d23f12c68e5bf3a56rpluem enabled and use <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
3b344f09f974c861c700f6cbcb0682b40e79dd66sf <code class="module"><a href="/mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>MTime Size</code>
8010b66c363b5b847dc83d9d23f12c68e5bf3a56rpluem as a fixed format for <code>ETag</code> comparisons on conditional requests.
8010b66c363b5b847dc83d9d23f12c68e5bf3a56rpluem These conditional requests will break if the <code>ETag</code> format is
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor An ETag is not generated for responses parsed by <code class="module"><a href="/mod/mod_include.html">mod_include</a></code>,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor since the response entity can change without a change of the INode, MTime, or Size
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener of the static file with embedded SSI directives.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive"><Files></code> directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess limits the scope of the enclosed directives by filename. It is comparable
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to the <code class="directive"><a href="#directory"><Directory></a></code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and <code class="directive"><a href="#location"><Location></a></code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directives. It should be matched with a <code></Files></code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directive. The directives given within this section will be applied to
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess any object with a basename (last component of filename) matching the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive specified filename. <code class="directive"><Files></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive sections are processed in the order they appear in the
97a9a944b5887e91042b019776c41d5dd74557aferikabele configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location"><Location></a></code> sections. Note
06ba4a61654b3763ad65f52283832ebf058fdf1cslive that <code class="directive"><Files></code> can be nested
97a9a944b5887e91042b019776c41d5dd74557aferikabele inside <code class="directive"><a href="#directory"><Directory></a></code> sections to restrict the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive portion of the filesystem they apply to.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>filename</var> argument should include a filename, or
fb77c505254b6e9c925e23e734463e87574f8f40kess a wild-card string, where <code>?</code> matches any single character,
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh and <code>*</code> matches any sequences of characters.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Files "cat.html">
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh # Insert stuff that applies to cat.html here
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh</Files>
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh<Files "?at.*">
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh # This would apply to cat.html, bat.html, hat.php and so on.
4aa603e6448b99f9371397d439795c91a93637eand</Files></pre>
979d0b61c033b0e14157d025b71b0f12e06c89a9humbedooh <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
d1348237b33bc1755b9f1165eea52317465a7671nd can also be used, with the addition of the
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Files ~ "\.(gif|jpe?g|png)$">
4aa603e6448b99f9371397d439795c91a93637eand</Files></pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch"><FilesMatch></a></code> is preferred,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess however.</p>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <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
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>.htaccess</code> files. This allows users to control access to
fb77c505254b6e9c925e23e734463e87574f8f40kess their own files, at a file-by-file level.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <Files> sections work</a> for an explanation of how these
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess different sections are combined when a request is received</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive"><FilesMatch></code> directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess limits the scope of the enclosed directives by filename, just as the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code class="directive"><a href="#files"><Files></a></code> directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor does. However, it accepts a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen<pre class="prettyprint lang-config"><FilesMatch ".+\.(gif|jpe?g|png)$">
4aa603e6448b99f9371397d439795c91a93637eand</FilesMatch></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>would match most common Internet graphics formats.</p>
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen <div class="note">The <code>.+</code> at the start of the regex ensures that
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen files named <code>.png</code>, or <code>.gif</code>, for example,
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen are not matched.</div>
f4cbda69df0490c6deaacb8d04f103d200ddd183nd <p>From 2.4.8 onwards, named groups and backreferences are captured and
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin written to the environment with the corresponding name prefixed with
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin "MATCH_" and in upper case. This allows elements of files to be referenced
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cnd from within <a href="/expr.html">expressions</a> and modules like
d1e976f5d61801abdaf621b7546944168be40ce9minfrin <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
d1e976f5d61801abdaf621b7546944168be40ce9minfrin (unnamed) backreferences are ignored. Use named groups instead.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<pre class="prettyprint lang-config"><FilesMatch "^(?<sitename>[^/]+)">
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
4aa603e6448b99f9371397d439795c91a93637eand</FilesMatch></pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <Files> sections work</a> for an explanation of how these
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess different sections are combined when a request is received</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
604c89126c27104f659d7a51b0113e3bd435faf8fieldingmedia type in the HTTP Content-Type header field</td></tr>
604c89126c27104f659d7a51b0113e3bd435faf8fielding<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>When placed into an <code>.htaccess</code> file or a
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#directory"><Directory></a></code>, or
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive"><a href="#location"><Location></a></code> or
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#files"><Files></a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive section, this directive forces all matching files to be served
06ba4a61654b3763ad65f52283832ebf058fdf1cslive with the content type identification given by
604c89126c27104f659d7a51b0113e3bd435faf8fielding <var>media-type</var>. For example, if you had a directory full of
fb77c505254b6e9c925e23e734463e87574f8f40kess GIF files, but did not want to label them all with <code>.gif</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess you might want to use:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ForceType image/gif</pre>
604c89126c27104f659d7a51b0113e3bd435faf8fielding <p>Note that this directive overrides other indirect media type
604c89126c27104f659d7a51b0113e3bd435faf8fielding associations defined in mime.types or via the
604c89126c27104f659d7a51b0113e3bd435faf8fielding <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code>.</p>
604c89126c27104f659d7a51b0113e3bd435faf8fielding <p>You can also override more general
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"># force all files to be image/gif:
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<Location "/images">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</Location>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen# but normal mime-type associations here:
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen ForceType None
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf <p>This directive primarily overrides the content types generated for
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor static files served out of the filesystem. For resources other than
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor static files, where the generator of the response typically specifies
29b517f9fe7f32a2c3fbdc53e359b6db6f8e8c2csf a Content-Type, this directive has no effect.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directive</a></h2>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory to write gmon.out profiling data to. </td></tr>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh <p>When the server has been compiled with gprof profiling support,
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener be written to the specified directory when the process exits. If the
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener argument ends with a percent symbol ('%'), subdirectories are created
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener for each process id.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive currently only works with the <code class="module"><a href="/mod/prefork.html">prefork</a></code>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive enables DNS lookups so that host names can be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
fb77c505254b6e9c925e23e734463e87574f8f40kess The value <code>Double</code> refers to doing double-reverse
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess DNS lookup. That is, after a reverse lookup is performed, a forward
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick lookup is then performed on that result. At least one of the IP
06ba4a61654b3763ad65f52283832ebf058fdf1cslive addresses in the forward lookup must match the original
06ba4a61654b3763ad65f52283832ebf058fdf1cslive address. (In "tcpwrappers" terminology this is called
cb3a1082aec4b3b4f4ed238c93c3cc54933a7f0end <p>Regardless of the setting, when <code class="module"><a href="/mod/mod_authz_host.html">mod_authz_host</a></code> is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive used for controlling access by hostname, a double reverse lookup
06ba4a61654b3763ad65f52283832ebf058fdf1cslive will be performed. This is necessary for security. Note that the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive result of this double-reverse isn't generally available unless you
fb77c505254b6e9c925e23e734463e87574f8f40kess set <code>HostnameLookups Double</code>. For example, if only
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>HostnameLookups On</code> and a request is made to an object
06ba4a61654b3763ad65f52283832ebf058fdf1cslive that is protected by hostname restrictions, regardless of whether
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the double-reverse fails or not, CGIs will still be passed the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive single-reverse result in <code>REMOTE_HOST</code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The default is <code>Off</code> in order to save the network
06ba4a61654b3763ad65f52283832ebf058fdf1cslive traffic for those sites that don't truly need the reverse
06ba4a61654b3763ad65f52283832ebf058fdf1cslive lookups done. It is also better for the end users because they
06ba4a61654b3763ad65f52283832ebf058fdf1cslive don't have to suffer the extra latency that a lookup entails.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive Heavily loaded sites should leave this directive
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>Off</code>, since DNS lookups can take considerable
9bcfc3697a91b5215893a7d0206865b13fc72148nd amounts of time. The utility <code class="program"><a href="/programs/logresolve.html">logresolve</a></code>, compiled by
9bcfc3697a91b5215893a7d0206865b13fc72148nd default to the <code>bin</code> subdirectory of your installation
9bcfc3697a91b5215893a7d0206865b13fc72148nd directory, can be used to look up host names from logged IP addresses
9bcfc3697a91b5215893a7d0206865b13fc72148nd offline.</p>
db8dceaf53a26fba6048c2ad4d86c5507344187drbowen <p>Finally, if you have <a href="mod_authz_host.html#reqhost">hostname-based Require
db8dceaf53a26fba6048c2ad4d86c5507344187drbowen directives</a>, a hostname lookup will be performed regardless of
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">Directive</a></h2>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl <p>The <code class="directive"><If></code> directive
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl evaluates an expression at runtime, and applies the enclosed
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl directives if and only if the expression evaluates to true.
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl For example:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config"><If "-z req('Host')"></pre>
8559a67073808d84d85bb5dd552d4247caafe709sf <p>would match HTTP/1.0 requests without a <var>Host:</var> header.
8559a67073808d84d85bb5dd552d4247caafe709sf Expressions may contain various shell-like operators for string
7d8ed65c15484727bedbcc4070eca9c6248be6d0jailletc comparison (<code>==</code>, <code>!=</code>, <code><</code>, ...),
8559a67073808d84d85bb5dd552d4247caafe709sf integer comparison (<code>-eq</code>, <code>-ne</code>, ...),
8559a67073808d84d85bb5dd552d4247caafe709sf and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...).
8559a67073808d84d85bb5dd552d4247caafe709sf It is also possible to use regular expressions, </p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config"><If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"></pre>
8559a67073808d84d85bb5dd552d4247caafe709sf <p>shell-like pattern matches and many other operations. These operations
8559a67073808d84d85bb5dd552d4247caafe709sf can be done on request headers (<code>req</code>), environment variables
8559a67073808d84d85bb5dd552d4247caafe709sf (<code>env</code>), and a large number of other properties. The full
8559a67073808d84d85bb5dd552d4247caafe709sf documentation is available in <a href="/expr.html">Expressions in
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cnd <p>Only directives that support the <a href="directive-dict.html#Context">directory context</a> can be used within this configuration section.</p>
39d35b1debe4d06abe46e7085235cfbd01eca2b0rbowen Certain variables, such as <code>CONTENT_TYPE</code> and other
39d35b1debe4d06abe46e7085235cfbd01eca2b0rbowen response headers, are set after <If> conditions have already
39d35b1debe4d06abe46e7085235cfbd01eca2b0rbowen been evaluated, and so will not be available to use in this
c8c717fafa0a09ed13469a603a178921b851dd22igalic<li><a href="/expr.html">Expressions in Apache HTTP Server</a>,
c8c717fafa0a09ed13469a603a178921b851dd22igalicfor a complete reference and more examples.</li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li>
8559a67073808d84d85bb5dd552d4247caafe709sf<li><code class="directive"><a href="#else"><Else></a></code></li>
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl<li><a href="/sections.html">How <Directory>, <Location>,
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl <Files> sections work</a> for an explanation of how these
3cc4ff86e6cc4cfd7d4ccfc58dedff599091444bnoodl different sections are combined when a request is received.
8559a67073808d84d85bb5dd552d4247caafe709sf <code class="directive"><Else></code> are applied last.</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code><IfDefine <var>test</var>>...</IfDefine>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </code> section is used to mark directives that are conditional. The
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives within an <code class="directive"><IfDefine></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd section are only processed if the <var>test</var> is true. If <var>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd test</var> is false, everything between the start and end markers is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ignored.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>test</var> in the <code class="directive"><IfDefine></code> section directive can be one of two forms:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>In the former case, the directives between the start and end
06ba4a61654b3763ad65f52283832ebf058fdf1cslive markers are only processed if the parameter named
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>parameter-name</var> is defined. The second format reverses
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the test, and only processes the directives if
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>parameter-name</var> is <strong>not</strong> defined.</p>
9597f440430d8c876dd64f5f78066804650a18ecnoodl <p>The <var>parameter-name</var> argument is a define as given on the
9597f440430d8c876dd64f5f78066804650a18ecnoodl <code class="program"><a href="/programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
9597f440430d8c876dd64f5f78066804650a18ecnoodl </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><IfDefine></code> sections are
06ba4a61654b3763ad65f52283832ebf058fdf1cslive nest-able, which can be used to implement simple
06ba4a61654b3763ad65f52283832ebf058fdf1cslive multiple-parameter tests. Example:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><IfDefine ReverseProxy>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen LoadModule proxy_http_module modules/mod_proxy_http.so
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <IfDefine UseCache>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <IfDefine MemCache>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen </IfDefine>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <IfDefine !MemCache>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen LoadModule cache_disk_module modules/mod_cache_disk.so
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen </IfDefine>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen </IfDefine>
4aa603e6448b99f9371397d439795c91a93637eand</IfDefine></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
a850a44a7d6af013c766944483e00c2a1c8b183dnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code><IfModule <var>test</var>>...</IfModule></code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is true. If <var>test</var> is false, everything between the start and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd end markers is ignored.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>test</var> in the <code class="directive"><IfModule></code> section directive can be one of two forms:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>In the former case, the directives between the start and end
a850a44a7d6af013c766944483e00c2a1c8b183dnd markers are only processed if the module named <var>module</var>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen is included in Apache httpd -- either compiled in or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd dynamically loaded using <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
a850a44a7d6af013c766944483e00c2a1c8b183dnd and only processes the directives if <var>module</var> is
a850a44a7d6af013c766944483e00c2a1c8b183dnd <p>The <var>module</var> argument can be either the module identifier or
a850a44a7d6af013c766944483e00c2a1c8b183dnd the file name of the module, at the time it was compiled. For example,
a850a44a7d6af013c766944483e00c2a1c8b183dnd <code>mod_rewrite.c</code> is the file name. If a module consists of
a850a44a7d6af013c766944483e00c2a1c8b183dnd several source files, use the name of the file containing the string
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><IfModule></code> sections are
06ba4a61654b3763ad65f52283832ebf058fdf1cslive nest-able, which can be used to implement simple multiple-module
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <div class="note">This section should only be used if you need to have one
bea526116133aa3d7dabd1924bfc580b37fbf22aslive configuration file that works whether or not a specific module
fb77c505254b6e9c925e23e734463e87574f8f40kess is available. In normal operation, directives need not be
bea526116133aa3d7dabd1924bfc580b37fbf22aslive placed in <code class="directive"><IfModule></code>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive sections.</div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directory
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrinwildcard matching available in 2.3.6 and later</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive allows inclusion of other configuration files
06ba4a61654b3763ad65f52283832ebf058fdf1cslive from within the server configuration files.</p>
5b258a8d58679c6587757189339bb3c2d0488f93poirier <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin in the filename or directory parts of the path to include several files
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin at once, in alphabetical order. In addition, if
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin <code class="directive">Include</code> points to a directory, rather than a file,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will read all files in that directory and any subdirectory.
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin However, including entire directories is not recommended, because it is
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin easy to accidentally leave temporary files in a directory that can cause
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin <code class="program"><a href="/programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin wildcard syntax shown below, to include files that match a particular
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin pattern, such as *.conf, for example.</p>
0193f13df922db31ff281e3e5ce9632fe42bac87sf <p>The <code class="directive"><a href="#include">Include</a></code> directive will
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf <strong>fail with an error</strong> if a wildcard expression does not
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf match any file. The <code class="directive"><a href="#includeoptional">IncludeOptional</a></code>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf directive can be used if non-matching wildcards should be ignored.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The file path specified may be an absolute path, or may be relative
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">Include /usr/local/apache2/conf/ssl.conf
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">Include conf/ssl.conf
09b49da7bdbc59b56fb52d19a092e30d7d4a1bbaminfrin <p>Wildcards may be included in the directory or file portion of the
0193f13df922db31ff281e3e5ce9632fe42bac87sf path. This example will fail if there is no subdirectory in conf/vhosts
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf that contains at least one *.conf file:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre>
0193f13df922db31ff281e3e5ce9632fe42bac87sf <p>Alternatively, the following command will just be ignored in case of
0193f13df922db31ff281e3e5ce9632fe42bac87sf missing files or directories:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directive</a></h2>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.3.6 and later</td></tr>
0193f13df922db31ff281e3e5ce9632fe42bac87sf <p>This directive allows inclusion of other configuration files
0193f13df922db31ff281e3e5ce9632fe42bac87sf from within the server configuration files. It works identically to the
0193f13df922db31ff281e3e5ce9632fe42bac87sf <code class="directive"><a href="#include">Include</a></code> directive, with the
0193f13df922db31ff281e3e5ce9632fe42bac87sf exception that if wildcards do not match any file or directory, the
0193f13df922db31ff281e3e5ce9632fe42bac87sf <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> directive will be
0193f13df922db31ff281e3e5ce9632fe42bac87sf silently ignored instead of causing an error.</p>
0193f13df922db31ff281e3e5ce9632fe42bac87sf<li><code class="directive"><a href="#include">Include</a></code></li>
9bcfc3697a91b5215893a7d0206865b13fc72148nd<li><code class="program"><a href="/programs/apachectl.html">apachectl</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
06ba4a61654b3763ad65f52283832ebf058fdf1cslive connection feature of HTTP/1.1 provide long-lived HTTP sessions
06ba4a61654b3763ad65f52283832ebf058fdf1cslive which allow multiple requests to be sent over the same TCP
06ba4a61654b3763ad65f52283832ebf058fdf1cslive connection. In some cases this has been shown to result in an
06ba4a61654b3763ad65f52283832ebf058fdf1cslive almost 50% speedup in latency times for HTML documents with
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess many images. To enable Keep-Alive connections, set
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive used if they are specifically requested by a client. In
06ba4a61654b3763ad65f52283832ebf058fdf1cslive addition, a Keep-Alive connection with an HTTP/1.0 client can
06ba4a61654b3763ad65f52283832ebf058fdf1cslive only be used when the length of the content is known in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive advance. This implies that dynamic content such as CGI output,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive SSI pages, and server-generated directory listings will
06ba4a61654b3763ad65f52283832ebf058fdf1cslive generally not use Keep-Alive connections to HTTP/1.0 clients.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive For HTTP/1.1 clients, persistent connections are the default
06ba4a61654b3763ad65f52283832ebf058fdf1cslive unless otherwise specified. If the client requests it, chunked
06ba4a61654b3763ad65f52283832ebf058fdf1cslive encoding will be used in order to send content of unknown
06ba4a61654b3763ad65f52283832ebf058fdf1cslive length over persistent connections.</p>
7a9fd3b88382052ae000d95ff0d35a1f318d6b23pquerna <p>When a client uses a Keep-Alive connection it will be counted
4a31db3c3a0202003c1b9f87affa7cc143e120e5sf as a single "request" for the <code class="directive"><a href="/mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless
7a9fd3b88382052ae000d95ff0d35a1f318d6b23pquerna of how many requests are sent using the connection.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
50cb7e2b30597f481fee57bac945190f06ebcc58jorton<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
ee1af2aeb57527f33baa4737aa431e4aef997855rbowen<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>The number of seconds Apache httpd will wait for a subsequent
50cb7e2b30597f481fee57bac945190f06ebcc58jorton request before closing the connection. By adding a postfix of ms the
50cb7e2b30597f481fee57bac945190f06ebcc58jorton timeout can be also set in milliseconds. Once a request has been
06ba4a61654b3763ad65f52283832ebf058fdf1cslive received, the timeout value specified by the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
06ba4a61654b3763ad65f52283832ebf058fdf1cslive may cause performance problems in heavily loaded servers. The
06ba4a61654b3763ad65f52283832ebf058fdf1cslive higher the timeout, the more server processes will be kept
06ba4a61654b3763ad65f52283832ebf058fdf1cslive occupied waiting on connections with idle clients.</p>
694390dc2444235cbd378d1c2711d5b698cf95ccrbowen <p>If <code class="directive">KeepAliveTimeout</code> is <strong>not</strong>
694390dc2444235cbd378d1c2711d5b698cf95ccrbowen set for a name-based virtual host, the value of the first defined
694390dc2444235cbd378d1c2711d5b698cf95ccrbowen virtual host best matching the local IP and port will be used.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Access controls are normally effective for
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <strong>all</strong> access methods, and this is the usual
06ba4a61654b3763ad65f52283832ebf058fdf1cslive desired behavior. <strong>In the general case, access control
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directives should not be placed within a
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code class="directive"><Limit></code> section.</strong></p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The purpose of the <code class="directive"><Limit></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive is to restrict the effect of the access controls to the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive nominated HTTP methods. For all other methods, the access
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess restrictions that are enclosed in the <code class="directive"><Limit></code> bracket <strong>will have no
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess effect</strong>. The following example applies the access control
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess only to the methods <code>POST</code>, <code>PUT</code>, and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>DELETE</code>, leaving all other methods unprotected:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Limit POST PUT DELETE>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Require valid-user
4aa603e6448b99f9371397d439795c91a93637eand</Limit></pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The method names listed can be one or more of: <code>GET</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd case-sensitive.</strong> If <code>GET</code> is used it will also
6c5c651b0b97607b8c8b4965c1385c67699f217fnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <div class="warning">A <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section should always be
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem used in preference to a <code class="directive"><Limit></code>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem section when restricting access, since a <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> section provides protection
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive against arbitrary methods.</div>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <p>The <code class="directive"><Limit></code> and
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <code class="directive"><a href="#limitexcept"><LimitExcept></a></code>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem directives may be nested. In this case, each successive level of
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <code class="directive"><Limit></code> or <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> directives must
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem further restrict the set of methods to which access controls apply.</p>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <code class="directive"><LimitExcept></code> directives with
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem the <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directive,
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem note that the first <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem to succeed authorizes the request, regardless of the presence of other
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <code class="directive"><a href="/mod/mod_authz_core.html#require">Require</a></code> directives.</div>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <p>For example, given the following configuration, all users will
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem be authorized for <code>POST</code> requests, and the
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem <code>Require group editors</code> directive will be ignored
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem in all cases:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><LimitExcept GET>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Require valid-user
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</LimitExcept>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen<Limit POST>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Require group editors
4aa603e6448b99f9371397d439795c91a93637eand</Limit></pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
5f00eedb74adc88b8282475faf6275dad390c9a3rpluem<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><LimitExcept></code> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive a group of access control directives which will then apply to any
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess HTTP access method <strong>not</strong> listed in the arguments;
97a9a944b5887e91042b019776c41d5dd74557aferikabele i.e., it is the opposite of a <code class="directive"><a href="#limit"><Limit></a></code> section and can be used to control
06ba4a61654b3763ad65f52283832ebf058fdf1cslive both standard and nonstandard/unrecognized methods. See the
97a9a944b5887e91042b019776c41d5dd74557aferikabele documentation for <code class="directive"><a href="#limit"><Limit></a></code> for more details.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><LimitExcept POST GET>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Require valid-user
4aa603e6448b99f9371397d439795c91a93637eand</LimitExcept></pre>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd <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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen redirects the original request to a CGI script. A subrequest is Apache httpd's
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd mechanism to find out what would happen for some URI if it were requested.
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd For example, <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd files listed in the <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd directive.</p>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd <p><code class="directive">LimitInternalRecursion</code> prevents the server
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd from crashing when entering an infinite loop of internal redirects or
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd subrequests. Such loops are usually caused by misconfigurations.</p>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd <p>The directive stores two different limits, which are evaluated on
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd per-request basis. The first <var>number</var> is the maximum number of
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd internal redirects, that may follow each other. The second <var>number</var>
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd determines, how deep subrequests may be nested. If you specify only one
6c45910d5394acbc3f20ab3f2615d9ed2b4e6533nd <var>number</var>, it will be assigned to both limits.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive specifies the number of <var>bytes</var> from 0
06ba4a61654b3763ad65f52283832ebf058fdf1cslive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener request body. See the note below for the limited applicability
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener to proxy requests.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">LimitRequestBody</code> directive allows
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the user to set a limit on the allowed size of an HTTP request
06ba4a61654b3763ad65f52283832ebf058fdf1cslive message body within the context in which the directive is given
06ba4a61654b3763ad65f52283832ebf058fdf1cslive (server, per-directory, per-file or per-location). If the client
06ba4a61654b3763ad65f52283832ebf058fdf1cslive request exceeds that limit, the server will return an error
06ba4a61654b3763ad65f52283832ebf058fdf1cslive response instead of servicing the request. The size of a normal
06ba4a61654b3763ad65f52283832ebf058fdf1cslive request message body will vary greatly depending on the nature of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the resource and the methods allowed on that resource. CGI scripts
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess typically use the message body for retrieving form information.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Implementations of the <code>PUT</code> method will require
fb77c505254b6e9c925e23e734463e87574f8f40kess a value at least as large as any representation that the server
fb77c505254b6e9c925e23e734463e87574f8f40kess wishes to accept for that resource.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive gives the server administrator greater
06ba4a61654b3763ad65f52283832ebf058fdf1cslive control over abnormal client request behavior, which may be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive useful for avoiding some forms of denial-of-service
06ba4a61654b3763ad65f52283832ebf058fdf1cslive attacks.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>If, for example, you are permitting file upload to a particular
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess location, and wish to limit the size of the uploaded file to 100K,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive you might use the following directive:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitRequestBody 102400</pre>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <div class="note"><p>For a full description of how this directive is interpreted by
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener proxy requests, see the <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><var>Number</var> is an integer from 0 (meaning unlimited) to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive 32767. The default value is defined by the compile-time
06ba4a61654b3763ad65f52283832ebf058fdf1cslive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
06ba4a61654b3763ad65f52283832ebf058fdf1cslive distributed).</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">LimitRequestFields</code> directive allows
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the server administrator to modify the limit on the number of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive request header fields allowed in an HTTP request. A server needs
06ba4a61654b3763ad65f52283832ebf058fdf1cslive this value to be larger than the number of fields that a normal
06ba4a61654b3763ad65f52283832ebf058fdf1cslive client request might include. The number of request header fields
06ba4a61654b3763ad65f52283832ebf058fdf1cslive used by a client rarely exceeds 20, but this may vary among
06ba4a61654b3763ad65f52283832ebf058fdf1cslive different client implementations, often depending upon the extent
06ba4a61654b3763ad65f52283832ebf058fdf1cslive to which a user has configured their browser to support detailed
06ba4a61654b3763ad65f52283832ebf058fdf1cslive content negotiation. Optional HTTP extensions are often expressed
06ba4a61654b3763ad65f52283832ebf058fdf1cslive using request header fields.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive gives the server administrator greater
06ba4a61654b3763ad65f52283832ebf058fdf1cslive control over abnormal client request behavior, which may be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive useful for avoiding some forms of denial-of-service attacks.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive The value should be increased if normal clients see an error
06ba4a61654b3763ad65f52283832ebf058fdf1cslive response from the server that indicates too many fields were
06ba4a61654b3763ad65f52283832ebf058fdf1cslive sent in the request.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitRequestFields 50</pre>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p> When name-based virtual hosting is used, the value for this
f6066dc0a6ad0432b74774e290c04c3cc4aa2dafrbowen directive is taken from the default (first-listed) virtual host for the
dab8f7bd6e7dcf38489845dbce884de6f4436abfhumbedooh local IP and port combination.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
4c881d2fffa365e2e0c5e25eb1cf77f4f9406e44chrisd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
4c881d2fffa365e2e0c5e25eb1cf77f4f9406e44chrisd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
cf2d22edbf77991ac7736f56b324b978093db17end <p>This directive specifies the number of <var>bytes</var>
cf2d22edbf77991ac7736f56b324b978093db17end that will be allowed in an HTTP request header.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code class="directive">LimitRequestFieldSize</code> directive
fa1d0100240db107ab637571e7ab6bec971b1032rbowen allows the server administrator to set the limit
cf2d22edbf77991ac7736f56b324b978093db17end on the allowed size of an HTTP request header field. A server
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor needs this value to be large enough to hold any one header field
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor from a normal client request. The size of a normal request header
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor field will vary greatly among different client implementations,
cf2d22edbf77991ac7736f56b324b978093db17end often depending upon the extent to which a user has configured
56155d38d40d2acf4082ae58fac635e5bcb1bc23kess their browser to support detailed content negotiation. SPNEGO
cf2d22edbf77991ac7736f56b324b978093db17end authentication headers can be up to 12392 bytes.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive gives the server administrator greater
06ba4a61654b3763ad65f52283832ebf058fdf1cslive control over abnormal client request behavior, which may be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive useful for avoiding some forms of denial-of-service attacks.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <div class="note">Under normal conditions, the value should not be changed from
f6457ee8e686bb9f1d9a5d0e354f7f2e1e357a29sf the default.</div>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p> When name-based virtual hosting is used, the value for this
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim directive is taken from the default (first-listed) virtual host best
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf matching the current IP address and port combination.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive sets the number of <var>bytes</var> that will be
cf2d22edbf77991ac7736f56b324b978093db17end allowed on the HTTP request-line.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">LimitRequestLine</code> directive allows
fa1d0100240db107ab637571e7ab6bec971b1032rbowen the server administrator to set the limit on the allowed size
cf2d22edbf77991ac7736f56b324b978093db17end of a client's HTTP request-line. Since the request-line consists of the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive HTTP method, URI, and protocol version, the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code class="directive">LimitRequestLine</code> directive places a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive restriction on the length of a request-URI allowed for a request
06ba4a61654b3763ad65f52283832ebf058fdf1cslive on the server. A server needs this value to be large enough to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive hold any of its resource names, including any information that
fb77c505254b6e9c925e23e734463e87574f8f40kess might be passed in the query part of a <code>GET</code> request.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive gives the server administrator greater
06ba4a61654b3763ad65f52283832ebf058fdf1cslive control over abnormal client request behavior, which may be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive useful for avoiding some forms of denial-of-service attacks.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitRequestLine 4094</pre>
97a9a944b5887e91042b019776c41d5dd74557aferikabele <div class="note">Under normal conditions, the value should not be changed from
9f42bcd0c49a1e8ca25cdc601eeafb0f09529dd1trawick the default.</div>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p> When name-based virtual hosting is used, the value for this
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim directive is taken from the default (first-listed) virtual host best
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf matching the current IP address and port combination.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Limit (in bytes) on maximum size of an XML-based request
06ba4a61654b3763ad65f52283832ebf058fdf1cslive body. A value of <code>0</code> will disable any checking.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LimitXMLRequestBody 0</pre>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive"><Location></code> directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess limits the scope of the enclosed directives by URL. It is similar to the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#directory"><Directory></a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive, and starts a subsection which is terminated with a
b21197dc8e6b8c764fdcc24d4bae8b0eebb6bc4end <code></Location></code> directive. <code class="directive"><Location></code> sections are processed in the
97a9a944b5887e91042b019776c41d5dd74557aferikabele order they appear in the configuration file, after the <code class="directive"><a href="#directory"><Directory></a></code> sections and
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files"><Files></a></code> sections.</p>
5be034d8e3b6d25c474060cc29a3e0407c388939slive <p><code class="directive"><Location></code> sections operate
5be034d8e3b6d25c474060cc29a3e0407c388939slive completely outside the filesystem. This has several consequences.
5be034d8e3b6d25c474060cc29a3e0407c388939slive Most importantly, <code class="directive"><Location></code>
5be034d8e3b6d25c474060cc29a3e0407c388939slive directives should not be used to control access to filesystem
5be034d8e3b6d25c474060cc29a3e0407c388939slive locations. Since several different URLs may map to the same
5be034d8e3b6d25c474060cc29a3e0407c388939slive filesystem location, such access controls may by circumvented.</p>
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen <p>The enclosed directives will be applied to the request if the path component
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen of the URL meets <em>any</em> of the following criteria:
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen <li>The specified location matches exactly the path component of the URL.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <li>The specified location, which ends in a forward slash, is a prefix
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen of the path component of the URL (treated as a context root).
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <li>The specified location, with the addition of a trailing slash, is a
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen prefix of the path component of the URL (also treated as a context root).
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor In the example below, where no trailing slash is used, requests to
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen /private1, /private1/ and /private1/file.txt will have the enclosed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives applied, but /private1other would not.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Location "/private1">
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor In the example below, where a trailing slash is used, requests to
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen /private2/ and /private2/file.txt will have the enclosed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives applied, but /private2 and /private2other would not.
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Location "/private2<em>/</em>">
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
5be034d8e3b6d25c474060cc29a3e0407c388939slive <div class="note"><h3>When to use <code class="directive"><Location></code></h3>
5be034d8e3b6d25c474060cc29a3e0407c388939slive <p>Use <code class="directive"><Location></code> to apply
5be034d8e3b6d25c474060cc29a3e0407c388939slive directives to content that lives outside the filesystem. For
5be034d8e3b6d25c474060cc29a3e0407c388939slive 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
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <code><Location "/"></code>, which is an easy way to
5be034d8e3b6d25c474060cc29a3e0407c388939slive apply a configuration to the entire server.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>For all origin (non-proxy) requests, the URL to be matched is a
1e367a83311e5243e04d68857d007d04765a48f9chrisd URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
1e367a83311e5243e04d68857d007d04765a48f9chrisd port, or query string may be included.</em> For proxy requests, the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive URL to be matched is of the form
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>scheme://servername/path</code>, and you must include the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive prefix.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
fb77c505254b6e9c925e23e734463e87574f8f40kess any single character, and <code>*</code> matches any sequences of
d8c44cd75cf575fe51319280c12445109e878523noodl characters. Neither wildcard character matches a / in the URL-path.</p>
d1348237b33bc1755b9f1165eea52317465a7671nd <p><a class="glossarylink" href="/glossary.html#regex" title="see glossary">Regular expressions</a>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor can also be used, with the addition of the <code>~</code>
37742b630743e470b94618ecb3560fbd82e50b59rbowen character. For example:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Location ~ "/(extra|special)/data">
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match URLs that contained the substring <code>/extra/data</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
37742b630743e470b94618ecb3560fbd82e50b59rbowen simple reason that <code>~</code> is hard to distinguish from
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive"><Location></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive functionality is especially useful when combined with the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#sethandler">SetHandler</a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive. For example, to enable status requests, but allow them
82178a3043043b8813c0d7288a06ca1b7d110d4atakashi only from browsers at <code>example.com</code>, you might use:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><Location "/status">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen SetHandler server-status
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
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
05201775eaa6b363b8a119c8aea5db246b967591yoshiki slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/home/foo</code>). In URL-space this is not necessarily true.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The <code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive and the regex version of <code class="directive"><Location></code> require you to explicitly specify multiple
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd slashes if that is your intention.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <p>For example, <code><LocationMatch "^/abc"></code> would match
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the request URL <code>/abc</code> but not the request URL <code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd //abc</code>. The (non-regex) <code class="directive"><Location></code> directive behaves similarly when used for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd proxy requests. But when (non-regex) <code class="directive"><Location></code> is used for non-proxy requests it will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd implicitly match multiple slashes with a single slash. For example,
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar if you specify <code><Location "/abc/def"></code> and the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request is to <code>/abc//def</code> then it will match.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <Files> sections work</a> for an explanation of how these
37742b630743e470b94618ecb3560fbd82e50b59rbowen different sections are combined when a request is received.</li>
37742b630743e470b94618ecb3560fbd82e50b59rbowen<li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><LocationMatch
fe64b2ba25510d8c9dba5560a2d537763566cf40nd <var>regex</var>> ... </LocationMatch></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive"><LocationMatch></code> directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess limits the scope of the enclosed directives by URL, in an identical manner
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to <code class="directive"><a href="#location"><Location></a></code>. However,
d1348237b33bc1755b9f1165eea52317465a7671nd it takes a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>
d1348237b33bc1755b9f1165eea52317465a7671nd as an argument instead of a simple string. For example:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><LocationMatch "/(extra|special)/data">
4aa603e6448b99f9371397d439795c91a93637eand</LocationMatch></pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match URLs that contained the substring <code>/extra/data</code>
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen <div class="note"><p>If the intent is that a URL <strong>starts with</strong>
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen <strong>contains</strong> <code>/extra/data</code>, prefix the
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen regular expression with a <code>^</code> to require this.</p>
c825a9a0a782de9a5fb05c8808de744e54c89742rbowen <pre class="prettyprint lang-config"><LocationMatch "^/(extra|special)/data"></pre>
f4cbda69df0490c6deaacb8d04f103d200ddd183nd <p>From 2.4.8 onwards, named groups and backreferences are captured and
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin written to the environment with the corresponding name prefixed with
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin "MATCH_" and in upper case. This allows elements of URLs to be referenced
b6e6d2139d50d64fc4bbd01c4f07d7a4accfec8cnd from within <a href="/expr.html">expressions</a> and modules like
d1e976f5d61801abdaf621b7546944168be40ce9minfrin <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
d1e976f5d61801abdaf621b7546944168be40ce9minfrin (unnamed) backreferences are ignored. Use named groups instead.</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar<pre class="prettyprint lang-config"><LocationMatch "^/combined/(?<sitename>[^/]+)">
b0ffb6279db3bd422faeff9a59a43dc762afe148minfrin require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
4aa603e6448b99f9371397d439795c91a93637eand</LocationMatch></pre>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <Files> sections work</a> for an explanation of how these
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess different sections are combined when a request is received</li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Per-module and per-directory configuration is available in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive">LogLevel</code> adjusts the verbosity of the
97a9a944b5887e91042b019776c41d5dd74557aferikabele messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
06ba4a61654b3763ad65f52283832ebf058fdf1cslive significance:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <td>"getpwuid: couldn't determine user name from uid"</td>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <td>"socket: Failed to get a socket, exiting child"</td>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <td>"child process 1234 did not exit, sending another
06ba4a61654b3763ad65f52283832ebf058fdf1cslive SIGHUP"</td>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <td>"httpd: caught SIGBUS, attempting to dump core in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <td>"Server seems busy, (you may need to increase
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>When a particular level is specified, messages from all
06ba4a61654b3763ad65f52283832ebf058fdf1cslive other levels of higher significance will be reported as well.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive then messages with log levels of <code>notice</code> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive recommended.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">LogLevel notice</pre>
8b052d682204371decc64f942aede5ef1da98955erikabele <p>When logging to a regular file messages of the level
8b052d682204371decc64f942aede5ef1da98955erikabele <code>notice</code> cannot be suppressed and thus are always
8b052d682204371decc64f942aede5ef1da98955erikabele logged. However, this doesn't apply when logging is done
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <p>Specifying a level without a module name will reset the level
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf for all modules to that level. Specifying a level with a module
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf name will set the level for that module only. It is possible to
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf use the module source file name, the module identifier, or the
98ccaa63a1c82ead7a360754f10534b3d36ba099igalic module identifier with the trailing <code>_module</code> omitted
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf as module specification. This means the following three specifications
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf are equivalent:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">LogLevel info ssl:warn
51b60896224b408a35684bd6ec0fafe5e4abe322rbowenLogLevel info mod_ssl.c:warn
4aa603e6448b99f9371397d439795c91a93637eandLogLevel info ssl_module:warn</pre>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf <p>It is also possible to change the level per directory:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen LogLevel debug
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
b41a0dbe6310c576e96b7ea6910051fd84fb06f5sf Per directory loglevel configuration only affects messages that are
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf logged after the request has been parsed and that are associated with
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf the request. Log messages which are associated with the server or
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf the connection are not affected. The latter can be influenced by the
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#logleveloverride">LogLevelOverride</a></code> directive,
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><code class="directive"><a href="#logleveloverride">LogLevelOverride</a></code></li>
1a1356f375e36db7bee379ea0684ab389579f798rbowen<li><a href="/logs.html">Apache HTTP Server Log Files</a></li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<div class="directive-section"><h2><a name="LogLevelOverride" id="LogLevelOverride">LogLevelOverride</a> <a name="logleveloverride" id="logleveloverride">Directive</a></h2>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Override the verbosity of the ErrorLog for certain clients</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>ipaddress</var>[/<var>prefixlen</var>]
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf [<var>module</var>:]<var>level</var> [<var>module</var>:<var>level</var>] ...
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>unset</code></td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.5.0 and later</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <p><code class="directive">LogLevelOverride</code> adjusts the
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#loglevel">LogLevel</a></code> for requests coming from
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf certain client IP addresses.
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf This allows to enable verbose logging only for certain test clients.
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf The IP address is checked at a very early state in the connection
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf processing. Therefore, <code class="directive">LogLevelOverride</code> allows to
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf change the log level for things like the SSL handshake which happen before
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf a <code class="directive"><a href="#loglevel">LogLevel</a></code> directive in an
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#if"><If></a></code> container would
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf be evaluated.</p>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <p><code class="directive">LogLevelOverride</code> accepts either a single
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf IP-address or a CIDR IP-address/len subnet specification.
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf For the syntax of the loglevel specification, see the
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#loglevel">LogLevel</a></code> directive.</p>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <p>For requests that match a <code class="directive">LogLevelOverride</code>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf directive, per-directory specifications of
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#loglevel">LogLevel</a></code> are ignored.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"> LogLevelOverride 192.0.2.0/24 ssl:trace6
4aa603e6448b99f9371397d439795c91a93637eand LogLevelOverride 192.0.2.7 ssl:trace8</pre>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <code class="directive"><a href="#logleveloverride">LogLevelOverride</a></code> only affects
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf log messages that are associated with the request or the connection.
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf Log messages which are associated with the server not affected.
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">MaxKeepAliveRequests</code> directive
06ba4a61654b3763ad65f52283832ebf058fdf1cslive limits the number of requests allowed per connection when
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
fb77c505254b6e9c925e23e734463e87574f8f40kess set to <code>0</code>, unlimited requests will be allowed. We
06ba4a61654b3763ad65f52283832ebf058fdf1cslive recommend that this setting be kept to a high value for maximum
06ba4a61654b3763ad65f52283832ebf058fdf1cslive server performance.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <p>The <code class="directive">MaxRangeOverlaps</code> directive
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim limits the number of overlapping HTTP ranges the server is willing to
c417c34be03acec7a46cbc2ea63c659870090081igalic return to the client. If more overlapping ranges than permitted are requested,
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim the complete resource is returned instead.</p>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>The server does not limit the number of overlapping ranges it is
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim willing to satisfy.</dd>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>A positive number representing the maximum number of overlapping ranges the
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim server is willing to satisfy.</dd>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <p>The <code class="directive">MaxRangeReversals</code> directive
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim limits the number of HTTP Range reversals the server is willing to
c417c34be03acec7a46cbc2ea63c659870090081igalic return to the client. If more ranges reversals than permitted are requested,
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim the complete resource is returned instead.</p>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>Limits the number of range reversals to a compile-time default of 20.</dd>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>The server does not limit the number of range reversals it is
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim willing to satisfy.</dd>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <dd>A positive number representing the maximum number of range reversals the
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim server is willing to satisfy.</dd>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete
190240988946204427a80158f9533b7fc77ce4adjim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxRanges default | unlimited | none | <var>number-of-ranges</var></code></td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>The <code class="directive">MaxRanges</code> directive
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim limits the number of HTTP ranges the server is willing to
22ee81ec34e791340f0e4832e50b578ab71273b3igalic return to the client. If more ranges than permitted are requested,
6beba165aeced2ca77a6f1593ee08c47a32099efcovener the complete resource is returned instead.</p>
190240988946204427a80158f9533b7fc77ce4adjim <dd>Limits the number of ranges to a compile-time default of 200.</dd>
190240988946204427a80158f9533b7fc77ce4adjim <dd>The server does not limit the number of ranges it is
190240988946204427a80158f9533b7fc77ce4adjim willing to satisfy.</dd>
190240988946204427a80158f9533b7fc77ce4adjim <dd>A positive number representing the maximum number of ranges the
190240988946204427a80158f9533b7fc77ce4adjim server is willing to satisfy.</dd>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Directive</a></h2>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determins whether trailers are merged into headers</td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeTrailers [on|off]</code></td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MergeTrailers off</code></td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
9da97ff0bac3a0ff56a9cdebe6e5ab563636aa86jailletc<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.10 and later</td></tr>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd <p>This directive controls whether HTTP trailers are copied into the
5d01f40ffd657dd2ac567aacd93cabd162ddfa79coar internal representation of HTTP headers. This mergeing occurs when the
5d01f40ffd657dd2ac567aacd93cabd162ddfa79coar request body has been completely consumed, long after most header
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd processing would have a chance to examine or modify request headers.</p>
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd <p>This option is provided for compatibility with releases prior to 2.4.10,
6c4ef4a72d9897e53365b94103f4bd819fd0d3acnd where trailers were always merged.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
709e3a21ba73b8433462959cd56c773454b34441trawick<div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2>
709e3a21ba73b8433462959cd56c773454b34441trawick<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd<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>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</code></td></tr>
709e3a21ba73b8433462959cd56c773454b34441trawick<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
709e3a21ba73b8433462959cd56c773454b34441trawick<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
709e3a21ba73b8433462959cd56c773454b34441trawick<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>The <code class="directive">Mutex</code> directive sets the mechanism,
709e3a21ba73b8433462959cd56c773454b34441trawick and optionally the lock file location, that httpd and modules use
709e3a21ba73b8433462959cd56c773454b34441trawick to serialize access to resources. Specify <code>default</code> as
709e3a21ba73b8433462959cd56c773454b34441trawick the first argument to change the settings for all mutexes; specify
709e3a21ba73b8433462959cd56c773454b34441trawick a mutex name (see table below) as the first argument to override
709e3a21ba73b8433462959cd56c773454b34441trawick defaults only for that mutex.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>The <code class="directive">Mutex</code> directive is typically used in
709e3a21ba73b8433462959cd56c773454b34441trawick the following exceptional situations:</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <li>change the mutex mechanism when the default mechanism selected
709e3a21ba73b8433462959cd56c773454b34441trawick by <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> has a functional or performance
709e3a21ba73b8433462959cd56c773454b34441trawick problem</li>
709e3a21ba73b8433462959cd56c773454b34441trawick <li>change the directory used by file-based mutexes when the
709e3a21ba73b8433462959cd56c773454b34441trawick default directory does not support locking</li>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This directive only configures mutexes which have been registered
709e3a21ba73b8433462959cd56c773454b34441trawick with the core server using the <code>ap_mutex_register()</code> API.
709e3a21ba73b8433462959cd56c773454b34441trawick All modules bundled with httpd support the <code class="directive">Mutex</code>
709e3a21ba73b8433462959cd56c773454b34441trawick directive, but third-party modules may not. Consult the documentation
709e3a21ba73b8433462959cd56c773454b34441trawick of the third-party module, which must indicate the mutex name(s) which
709e3a21ba73b8433462959cd56c773454b34441trawick can be configured if this directive is supported.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>The following mutex <em>mechanisms</em> are available:</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This selects the default locking implementation, as determined by
709e3a21ba73b8433462959cd56c773454b34441trawick <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a>. The default locking implementation can
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor be displayed by running <code class="program"><a href="/programs/httpd.html">httpd</a></code> with the
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This effectively disables the mutex, and is only allowed for a
709e3a21ba73b8433462959cd56c773454b34441trawick mutex if the module indicates that it is a valid choice. Consult the
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This is a mutex variant based on a Posix semaphore.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>The semaphore ownership is not recovered if a thread in the process
709e3a21ba73b8433462959cd56c773454b34441trawick holding the mutex segfaults, resulting in a hang of the web server.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>It is possible to "leak" SysV semaphores if processes crash
709e3a21ba73b8433462959cd56c773454b34441trawick before the semaphore is removed.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>The semaphore API allows for a denial of service attack by any
709e3a21ba73b8433462959cd56c773454b34441trawick CGIs running under the same uid as the webserver (<em>i.e.</em>,
709e3a21ba73b8433462959cd56c773454b34441trawick all CGIs, unless you use something like <code class="program"><a href="/programs/suexec.html">suexec</a></code>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This selects the "best" available semaphore implementation, choosing
709e3a21ba73b8433462959cd56c773454b34441trawick between Posix and SystemV IPC semaphores, in that order.</p></li>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This is a mutex variant based on cross-process Posix thread
709e3a21ba73b8433462959cd56c773454b34441trawick mutexes.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>On most systems, if a child process terminates abnormally while
709e3a21ba73b8433462959cd56c773454b34441trawick holding a mutex that uses this implementation, the server will deadlock
709e3a21ba73b8433462959cd56c773454b34441trawick and stop responding to requests. When this occurs, the server will
709e3a21ba73b8433462959cd56c773454b34441trawick require a manual restart to recover.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>Solaris is a notable exception as it provides a mechanism which
709e3a21ba73b8433462959cd56c773454b34441trawick usually allows the mutex to be recovered after a child process
709e3a21ba73b8433462959cd56c773454b34441trawick terminates abnormally while holding a mutex.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>If your system implements the
709e3a21ba73b8433462959cd56c773454b34441trawick <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This is a mutex variant where a physical (lock-)file and the
709e3a21ba73b8433462959cd56c773454b34441trawick <code>fcntl()</code> function are used as the mutex.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>When multiple mutexes based on this mechanism are used within
709e3a21ba73b8433462959cd56c773454b34441trawick multi-threaded, multi-process environments, deadlock errors (EDEADLK)
709e3a21ba73b8433462959cd56c773454b34441trawick can be reported for valid mutex operations if <code>fcntl()</code>
709e3a21ba73b8433462959cd56c773454b34441trawick is not thread-aware, such as on Solaris.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
709e3a21ba73b8433462959cd56c773454b34441trawick with the exception that the <code>flock()</code> function is used to
709e3a21ba73b8433462959cd56c773454b34441trawick <p>This selects the "best" available file locking implementation,
709e3a21ba73b8433462959cd56c773454b34441trawick choosing between <code>fcntl</code> and <code>flock</code>, in that
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Most mechanisms are only available on selected platforms, where the
709e3a21ba73b8433462959cd56c773454b34441trawick underlying platform and <a class="glossarylink" href="/glossary.html#apr" title="see glossary">APR</a> support it. Mechanisms
ba1761b7cdc483fa8460f183a95b520e789a161and which aren't available on all platforms are <em>posixsem</em>,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
709e3a21ba73b8433462959cd56c773454b34441trawick <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
709e3a21ba73b8433462959cd56c773454b34441trawick the path, if provided, is a directory where the lock file will be created.
0fff3a0d83319f226dc84f0ffbf9b3ac0030f170trawick The default directory is httpd's run-time file directory,
0fff3a0d83319f226dc84f0ffbf9b3ac0030f170trawick <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>. If a relative
0fff3a0d83319f226dc84f0ffbf9b3ac0030f170trawick path is provided, it is relative to
0fff3a0d83319f226dc84f0ffbf9b3ac0030f170trawick <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>. Always use a local
0fff3a0d83319f226dc84f0ffbf9b3ac0030f170trawick disk filesystem for <code>/path/to/mutex</code> and never a directory residing
709e3a21ba73b8433462959cd56c773454b34441trawick on a NFS- or AFS-filesystem. The basename of the file will be the mutex
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd type, an optional instance string provided by the module, and unless the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>OmitPID</code> keyword is specified, the process id of the httpd
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd parent process will be appended to to make the file name unique, avoiding
709e3a21ba73b8433462959cd56c773454b34441trawick conflicts when multiple httpd instances share a lock file directory. For
709e3a21ba73b8433462959cd56c773454b34441trawick example, if the mutex name is <code>mpm-accept</code> and the lock file
709e3a21ba73b8433462959cd56c773454b34441trawick directory is <code>/var/httpd/locks</code>, the lock file name for the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor httpd instance with parent process id 12345 would be
709e3a21ba73b8433462959cd56c773454b34441trawick <p>It is best to <em>avoid</em> putting mutex files in a world-writable
709e3a21ba73b8433462959cd56c773454b34441trawick directory such as <code>/var/tmp</code> because someone could create
709e3a21ba73b8433462959cd56c773454b34441trawick a denial of service attack and prevent the server from starting by
709e3a21ba73b8433462959cd56c773454b34441trawick creating a lockfile with the same name as the one the server will try
709e3a21ba73b8433462959cd56c773454b34441trawick to create.</p>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <p>The following table documents the names of mutexes used by httpd
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd and bundled modules.</p>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <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>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td>incoming connections, to avoid the thundering herd problem;
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd for more information, refer to the
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd documentation</td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_ldap.html">mod_ldap</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td>communication with external mapping programs, to avoid
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd intermixed I/O from multiple requests</td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <td><code class="module"><a href="/mod/mod_watchdog.html">mod_watchdog</a></code></td>
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
c2a88a7ef740c408aba42af38ddfb9ab8a7398d9nd parent process id from the lock file name.</p>
709e3a21ba73b8433462959cd56c773454b34441trawick <p>In the following example, the mutex mechanism for the MPM accept
709e3a21ba73b8433462959cd56c773454b34441trawick mutex will be changed from the compiled-in default to <code>fcntl</code>,
709e3a21ba73b8433462959cd56c773454b34441trawick with the associated lock file created in directory
709e3a21ba73b8433462959cd56c773454b34441trawick <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
709e3a21ba73b8433462959cd56c773454b34441trawick will be changed from the compiled-in default to <code>sysvsem</code>.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config">Mutex sysvsem default
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
5997560e9031b7b0fd0c392512f6cf5ee737b89bjim<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf<p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required
6e14faf37935e36804b8bad802bc9dd58f3cf65dsfto instruct the server that a particular IP address and port combination
6e14faf37935e36804b8bad802bc9dd58f3cf65dsfwas usable as a name-based virtual host. In 2.3.11 and later,
6e14faf37935e36804b8bad802bc9dd58f3cf65dsfany time an IP address and port combination is used in multiple virtual
6e14faf37935e36804b8bad802bc9dd58f3cf65dsfhosts, name-based virtual hosting is automatically enabled for that address.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
fe64b2ba25510d8c9dba5560a2d537763566cf40nd [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
6d45c0bac5f2531e97e6b697c2c395c69b5995a5igalic<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
6d45c0bac5f2531e97e6b697c2c395c69b5995a5igalic<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default was changed from All to FollowSymlinks in 2.3.11</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">Options</code> directive controls which
06ba4a61654b3763ad65f52283832ebf058fdf1cslive server features are available in a particular directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><var>option</var> can be set to <code>None</code>, in which
06ba4a61654b3763ad65f52283832ebf058fdf1cslive case none of the extra features are enabled, or one or more of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the following:</p>
6d45c0bac5f2531e97e6b697c2c395c69b5995a5igalic <dd>All options except for <code>MultiViews</code>.</dd>
13e5182a0c199ecc7a73db97b6448a544e940868slive Execution of CGI scripts using <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>
13e5182a0c199ecc7a73db97b6448a544e940868slive is permitted.</dd>
6d45c0bac5f2531e97e6b697c2c395c69b5995a5igalic The server will follow symbolic links in this directory. This is
6d45c0bac5f2531e97e6b697c2c395c69b5995a5igalic the default setting.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Even though the server follows the symlink it does <em>not</em>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd change the pathname used to match against <code class="directive"><a href="#directory"><Directory></a></code> sections.</p>
198c35e2b8696f42f3b2a4130f2ae1225b26d2c6humbedooh <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory"><Directory></a></code> sections or
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <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
b00583f8e126bbb00b06dcf06af06c9d07978701kess <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
13e5182a0c199ecc7a73db97b6448a544e940868slive directories.</dd>
41816f0971c9fca2fd7bf74b9c03b34666b069b8kess If a URL which maps to a directory is requested, and there
13e5182a0c199ecc7a73db97b6448a544e940868slive is no <code class="directive"><a href="/mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
13e5182a0c199ecc7a73db97b6448a544e940868slive (<em>e.g.</em>, <code>index.html</code>) in that directory, then
13e5182a0c199ecc7a73db97b6448a544e940868slive <code class="module"><a href="/mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
13e5182a0c199ecc7a73db97b6448a544e940868slive of the directory.</dd>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <a href="/content-negotiation.html">Content negotiated</a>
13e5182a0c199ecc7a73db97b6448a544e940868slive "MultiViews" are allowed using
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>.
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <div class="note"><h3>Note</h3> <p>This option gets ignored if set
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic anywhere other than <code class="directive"><a href="#directory"><Directory></a></code>, as <code class="module"><a href="/mod/mod_negotiation.html">mod_negotiation</a></code>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic needs real resources to compare against and evaluate from.</p></div>
13e5182a0c199ecc7a73db97b6448a544e940868slive <dd>The server will only follow symbolic links for which the
13e5182a0c199ecc7a73db97b6448a544e940868slive target file or directory is owned by the same user id as the
198c35e2b8696f42f3b2a4130f2ae1225b26d2c6humbedooh <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory"><Directory></a></code> sections or
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>This option should not be considered a security restriction,
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive since symlink testing is subject to race conditions that make it
198c35e2b8696f42f3b2a4130f2ae1225b26d2c6humbedooh circumventable.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Normally, if multiple <code class="directive">Options</code> could
13e5182a0c199ecc7a73db97b6448a544e940868slive apply to a directory, then the most specific one is used and
13e5182a0c199ecc7a73db97b6448a544e940868slive others are ignored; the options are not merged. (See <a href="/sections.html#mergin">how sections are merged</a>.)
13e5182a0c199ecc7a73db97b6448a544e940868slive <code class="directive">Options</code> directive are preceded by a
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>+</code> or <code>-</code> symbol, the options are
13e5182a0c199ecc7a73db97b6448a544e940868slive merged. Any options preceded by a <code>+</code> are added to the
13e5182a0c199ecc7a73db97b6448a544e940868slive options currently in force, and any options preceded by a
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>-</code> are removed from the options currently in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive force. </p>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
db682a46f5cc4672f043df7dcdadb5b165749f77nd <code>-</code> with those without is not valid syntax, and will be
db682a46f5cc4672f043df7dcdadb5b165749f77nd rejected during server startup by the syntax check with an abort.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/web/docs">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options Indexes FollowSymLinks
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</Directory>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options Includes
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>then only <code>Includes</code> will be set for the
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/web/docs/spec</code> directory. However if the second
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive">Options</code> directive uses the <code>+</code> and
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/web/docs">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options Indexes FollowSymLinks
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen</Directory>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen Options +Includes -Indexes
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>Includes</code> are set for the <code>/web/docs/spec</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess directory.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>-Includes</code> disables server-side includes completely
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess regardless of the previous setting.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The default in the absence of any other settings is
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directive</a></h2>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocol for a listening socket</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></code></td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>On Windows only available from Apache 2.3.3 and later.</td></tr>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>This directive specifies the protocol used for a specific listening socket.
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen The protocol is used to determine which module should handle a request, and
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen directive.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>You only need to set the protocol if you are running on non-standard ports, otherwise <code>http</code> is assumed for port 80 and <code>https</code> for port 443.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">Protocol https</pre>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>You can also specify the protocol using the <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code> directive.</p>
c3c006c28c5b03892ccaef6e4d2cbb15a13a2072rbowen<li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directive</a></h2>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register non-standard HTTP methods</td></tr>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsf<p>HTTP Methods that are not conforming to the relvant RFCs are normally
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsfrejected by request processing in Apache HTTPD. To avoid this, modules
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsfcan register non-standard HTTP methods they support.
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsfThe <code class="directive">RegisterHttpMethod</code> allows to register such
17f88acd0b3fba7eddb6fd974927edf8f5dbe41dsfmethods manually. This can be useful for if such methods are forwared
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Takes 1 or 2 parameters. The first parameter sets the soft
06ba4a61654b3763ad65f52283832ebf058fdf1cslive resource limit for all processes and the second parameter sets
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the maximum resource limit. Either parameter can be a number,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>max</code> to indicate to the server that the limit should
06ba4a61654b3763ad65f52283832ebf058fdf1cslive be set to the maximum allowed by the operating system
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configuration. Raising the maximum resource limit requires that
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the server is running as <code>root</code>, or in the initial startup
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>This applies to processes forked off from Apache httpd children
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen servicing requests, not the Apache httpd children themselves. This
06ba4a61654b3763ad65f52283832ebf058fdf1cslive includes CGI scripts and SSI exec commands, but not any
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen processes forked off from the Apache httpd parent such as piped
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>CPU resource limits are expressed in seconds per
06ba4a61654b3763ad65f52283832ebf058fdf1cslive process.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Takes 1 or 2 parameters. The first parameter sets the soft
06ba4a61654b3763ad65f52283832ebf058fdf1cslive resource limit for all processes and the second parameter sets
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the maximum resource limit. Either parameter can be a number,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>max</code> to indicate to the server that the limit should
06ba4a61654b3763ad65f52283832ebf058fdf1cslive be set to the maximum allowed by the operating system
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configuration. Raising the maximum resource limit requires that
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the server is running as <code>root</code>, or in the initial startup
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>This applies to processes forked off from Apache httpd children
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen servicing requests, not the Apache httpd children themselves. This
06ba4a61654b3763ad65f52283832ebf058fdf1cslive includes CGI scripts and SSI exec commands, but not any
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen processes forked off from the Apache httpd parent such as piped
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Memory resource limits are expressed in bytes per
06ba4a61654b3763ad65f52283832ebf058fdf1cslive process.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Takes 1 or 2 parameters. The first parameter sets the soft
06ba4a61654b3763ad65f52283832ebf058fdf1cslive resource limit for all processes and the second parameter sets
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the maximum resource limit. Either parameter can be a number,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive or <code>max</code> to indicate to the server that the limit
06ba4a61654b3763ad65f52283832ebf058fdf1cslive should be set to the maximum allowed by the operating system
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configuration. Raising the maximum resource limit requires that
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the server is running as <code>root</code>, or in the initial startup
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>This applies to processes forked off from Apache httpd children
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen servicing requests, not the Apache httpd children themselves. This
06ba4a61654b3763ad65f52283832ebf058fdf1cslive includes CGI scripts and SSI exec commands, but not any
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen processes forked off from the Apache httpd parent such as piped
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Process limits control the number of processes per user.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick under user ids other than the web server user id, this directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess will limit the number of processes that the server itself can
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess create. Evidence of this situation will be indicated by
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <strong><code>cannot fork</code></strong> messages in the
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<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
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b09fcdfc59ada4712150e7bcc7b502bb9e4601d8rjung<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only.</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>This directive is used to control how Apache httpd finds the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess interpreter used to run CGI scripts. The default setting is
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
4cafc94e99922f00654e1779d30c2cccf5278c4fkess by the shebang line (first line, starting with <code>#!</code>) in the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess script. On Win32 systems this line usually looks like:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre>
e3aa87805bb87e37d4a9cd31a7d49c55624ac73and <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Setting <code>ScriptInterpreterSource Registry</code> will
4cafc94e99922f00654e1779d30c2cccf5278c4fkess cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
4cafc94e99922f00654e1779d30c2cccf5278c4fkess searched using the script file extension (e.g., <code>.pl</code>) as a
4cafc94e99922f00654e1779d30c2cccf5278c4fkess search key. The command defined by the registry subkey
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd <code>Shell\Open\Command</code> is used to open the script file. If the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen registry keys cannot be found, Apache httpd falls back to the behavior of the
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd Registry</code> with <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will try to execute <strong>every</strong> file within this
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd directory. The <code>Registry</code> setting may cause undesired
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd program calls on files which are typically not executed. For
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd example, the default open command on <code>.htm</code> files on
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd most Windows systems will execute Microsoft Internet Explorer, so
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd any HTTP request for an <code>.htm</code> file existing within the
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd script directory would start the browser in the background on the
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd server. This is a good way to crash your system within a minute or
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd 2.0 does the same thing as <code>Registry</code> but uses only the
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd configured manually in the windows registry and hence prevents
aaf7b7f4cc1be050310c3d7f48bce0ec67e174e4nd accidental program calls on your system.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directive</a></h2>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine if mod_status displays the first 63 characters
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrinof a request or the last 63, assuming the request itself is greater than
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SeeRequestTail Off</code></td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor displays the actual request being handled.
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin For historical purposes, only 63 characters of the request
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin are actually stored for display purposes. This directive
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin controls whether the 1st 63 characters are stored (the previous
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin behavior and the default) or if the last 63 characters are. This
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin is only applicable, of course, if the length of the request is
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin 64 characters or greater.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <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:
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
704a040e5d7d75387c08eb77b0acd414197d9554nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
704a040e5d7d75387c08eb77b0acd414197d9554nd <p>The <code class="directive">ServerAdmin</code> sets the contact address
06ba4a61654b3763ad65f52283832ebf058fdf1cslive that the server includes in any error messages it returns to the
733738e83a9b0113476e3f67992c2278d61ee4dakess client. If the <code>httpd</code> doesn't recognize the supplied argument
733738e83a9b0113476e3f67992c2278d61ee4dakess as an URL, it
704a040e5d7d75387c08eb77b0acd414197d9554nd assumes, that it's an <var>email-address</var> and prepends it with
704a040e5d7d75387c08eb77b0acd414197d9554nd <code>mailto:</code> in hyperlink targets. However, it's recommended to
704a040e5d7d75387c08eb77b0acd414197d9554nd actually use an email address, since there are a lot of CGI scripts that
704a040e5d7d75387c08eb77b0acd414197d9554nd make that assumption. If you want to use an URL, it should point to another
704a040e5d7d75387c08eb77b0acd414197d9554nd server under your control. Otherwise users may not be able to contact you in
704a040e5d7d75387c08eb77b0acd414197d9554nd case of errors.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>It may be worth setting up a dedicated address for this, e.g.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>as users do not always mention that they are talking about the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive server!</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">ServerAlias</code> directive sets the
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin alternate names for a host, for use with <a href="/vhosts/name-based.html">name-based virtual hosts</a>. The
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><VirtualHost *:80>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh ServerAlias server server2.example.com server2
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh UseCanonicalName Off
4aa603e6448b99f9371397d439795c91a93637eand</VirtualHost></pre>
7f1788016c02e671dc8e3f12ab33747de4d7ebb2humbedooh <p>Name-based virtual hosts for the best-matching set of <code class="directive"><a href="#virtualhost"><virtualhost></a></code>s are processed
93ba02fbe3bb9ce8bb06af6b8ecdb88288e1c0c2covener in the order they appear in the configuration. The first matching <code class="directive"><a href="#servername">ServerName</a></code> or <code class="directive"><a href="#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards
93ba02fbe3bb9ce8bb06af6b8ecdb88288e1c0c2covener (nor for ServerName vs. ServerAlias). </p>
c9d6480dce82f1c386bba7a29baa867ecddf2daecovener <p>The complete list of names in the <code class="directive">VirtualHost</code>
5d01f40ffd657dd2ac567aacd93cabd162ddfa79coar directive are treated just like a (non wildcard)
0dca7153a9bd4a72ca2672cfaaa71773b7aa510arjung<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
e08ad1a326852610a7930269638a43657fc50d06sctemme<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>The <code class="directive">ServerName</code> directive sets the
e08ad1a326852610a7930269638a43657fc50d06sctemme request scheme, hostname and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive port that the server uses to identify itself. This is used when
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen creating redirection URLs.</p>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <p>Additionally, <code class="directive">ServerName</code> is used (possibly
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen in conjunction with <code class="directive">ServerAlias</code>) to uniquely
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen identify a virtual host, when using <a href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <p>For example, if the name of the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick machine hosting the web server is <code>simple.example.com</code>,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive but the machine also has the DNS alias <code>www.example.com</code>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick and you wish the web server to be so identified, the following
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive should be used:</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ServerName www.example.com</pre>
60a4b2c422dcbb08a554fb193105c08da592718bpoirier <p>The <code class="directive">ServerName</code> directive
60a4b2c422dcbb08a554fb193105c08da592718bpoirier may appear anywhere within the definition of a server. However,
60a4b2c422dcbb08a554fb193105c08da592718bpoirier each appearance overrides the previous appearance (within that
60a4b2c422dcbb08a554fb193105c08da592718bpoirier server).</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>If no <code class="directive">ServerName</code> is specified, then the
205f749042ed530040a4f0080dbcb47ceae8a374rjung server attempts to deduce the client visible hostname by performing a
205f749042ed530040a4f0080dbcb47ceae8a374rjung reverse lookup on an IP address of the systems hostname.</p>
205f749042ed530040a4f0080dbcb47ceae8a374rjung <p>If no port is specified in the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code class="directive">ServerName</code>, then the server will use the
e08ad1a326852610a7930269638a43657fc50d06sctemme port from the incoming request. For optimal reliability and
e08ad1a326852610a7930269638a43657fc50d06sctemme predictability, you should specify an explicit hostname and port
e08ad1a326852610a7930269638a43657fc50d06sctemme using the <code class="directive">ServerName</code> directive.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>If you are using <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the <code class="directive">ServerName</code> inside a
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#virtualhost"><VirtualHost></a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive section specifies what hostname must appear in the request's
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>Host:</code> header to match this virtual host.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>Sometimes, the server runs behind a device that processes SSL,
e08ad1a326852610a7930269638a43657fc50d06sctemme such as a reverse proxy, load balancer or SSL offload
e08ad1a326852610a7930269638a43657fc50d06sctemme appliance. When this is the case, specify the
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>https://</code> scheme and the port number to which the
e08ad1a326852610a7930269638a43657fc50d06sctemme clients connect in the <code class="directive">ServerName</code> directive
e08ad1a326852610a7930269638a43657fc50d06sctemme to make sure that the server generates the correct
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor self-referential URLs.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>See the description of the
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
29edaaeea24c41820e486944635348cd7fae1d11rbowen <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
e08ad1a326852610a7930269638a43657fc50d06sctemme settings which determine whether self-referential URLs (e.g., by the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="module"><a href="/mod/mod_dir.html">mod_dir</a></code> module) will refer to the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive specified port, or to the port number given in the client's request.
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <p>Failure to set <code class="directive">ServerName</code> to a name that
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen your server can resolve to an IP address will result in a startup
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen warning. <code>httpd</code> will then use whatever hostname it can
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen determine, using the system's <code>hostname</code> command. This
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen will almost never be the hostname you actually want.</p>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<li><a href="/dns-caveats.html">Issues Regarding DNS and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><a href="/vhosts/">Apache HTTP Server virtual host
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">ServerPath</code> directive sets the legacy
06ba4a61654b3763ad65f52283832ebf058fdf1cslive URL pathname for a host, for use with <a href="/vhosts/">name-based virtual hosts</a>.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">ServerRoot</code> directive sets the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directory in which the server lives. Typically it will contain the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive subdirectories <code>conf/</code> and <code>logs/</code>. Relative
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 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
67c9cb8a211ba641c62f3c8db6fb5b7abc2a6ea8rbowen relative to this directory.</p>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre>
fe9f851e55506793276ffaac89106433572868a8rbowen <p>The default location of <code class="directive">ServerRoot</code> may be
fe9f851e55506793276ffaac89106433572868a8rbowen modified by using the <code>--prefix</code> argument to
fe9f851e55506793276ffaac89106433572868a8rbowen <a href="/programs/configure.html"><code>configure</code></a>, and
fe9f851e55506793276ffaac89106433572868a8rbowen most third-party distributions of the server have a different
fe9f851e55506793276ffaac89106433572868a8rbowen default location from the one listed above.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive security tips</a> for information on how to properly set
ef8e89e090461194ecadd31e8796a2c51e0531a2kess permissions on the <code class="directive">ServerRoot</code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">ServerSignature</code> directive allows the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive configuration of a trailing footer line under server-generated
fb77c505254b6e9c925e23e734463e87574f8f40kess documents (error messages, <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> ftp directory
fb77c505254b6e9c925e23e734463e87574f8f40kess listings, <code class="module"><a href="/mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
fb77c505254b6e9c925e23e734463e87574f8f40kess would want to enable such a footer line is that in a chain of proxies,
fb77c505254b6e9c925e23e734463e87574f8f40kess the user often has no possibility to tell which of the chained servers
ef8e89e090461194ecadd31e8796a2c51e0531a2kess actually produced a returned error message.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess setting, which is the default, suppresses the footer line (and is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive therefore compatible with the behavior of Apache-1.2 and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive below). The <code>On</code> setting simply adds a line with the
97a9a944b5887e91042b019776c41d5dd74557aferikabele server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive and the <code>EMail</code> setting additionally creates a
97a9a944b5887e91042b019776c41d5dd74557aferikabele "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
06ba4a61654b3763ad65f52283832ebf058fdf1cslive document.</p>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz <p>After version 2.0.44, the details of the server version number
7b5535ed88e0f561b3bfb3330137bd804846afd4slive presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
627c978514c54179736d152923478be7c8707f9bnd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
8cc194918514dea341631244ef48442b44175bdejim<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>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This directive controls whether <code>Server</code> response
06ba4a61654b3763ad65f52283832ebf058fdf1cslive header field which is sent back to clients includes a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive description of the generic OS-type of the server as well as
06ba4a61654b3763ad65f52283832ebf058fdf1cslive information about compiled-in modules.</p>
9a354e2f1bae7db60331801d79328f4565410e36jim <dt><code>ServerTokens Full</code> (or not specified)</dt>
c3c006c28c5b03892ccaef6e4d2cbb15a13a2072rbowen <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
c3c006c28c5b03892ccaef6e4d2cbb15a13a2072rbowen <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>This setting applies to the entire server, and cannot be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz <p>After version 2.0.44, this directive also controls the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
9a354e2f1bae7db60331801d79328f4565410e36jim <div class="note">Setting <code class="directive">ServerTokens</code> to less than
9a354e2f1bae7db60331801d79328f4565410e36jim <code>minimal</code> is not recommended because it makes it more
9a354e2f1bae7db60331801d79328f4565410e36jim difficult to debug interoperational problems. Also note that
9a354e2f1bae7db60331801d79328f4565410e36jim disabling the Server: header does nothing at all to make your
9a354e2f1bae7db60331801d79328f4565410e36jim server more secure; the idea of "security through obscurity"
9a354e2f1bae7db60331801d79328f4565410e36jim is a myth and leads to a false sense of safety.</div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>When placed into an <code>.htaccess</code> file or a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code class="directive"><a href="#directory"><Directory></a></code> or
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="#location"><Location></a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive section, this directive forces all matching files to be parsed
06ba4a61654b3763ad65f52283832ebf058fdf1cslive through the <a href="/handler.html">handler</a> given by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>handler-name</var>. For example, if you had a directory you
06ba4a61654b3763ad65f52283832ebf058fdf1cslive wanted to be parsed entirely as imagemap rule files, regardless
06ba4a61654b3763ad65f52283832ebf058fdf1cslive of extension, you might put the following into an
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen <pre class="prettyprint lang-config">SetHandler imap-file</pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Another example: if you wanted to have the server display a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive status report whenever a URL of
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>http://servername/status</code> was called, you might put
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Location "/status">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen SetHandler server-status
4aa603e6448b99f9371397d439795c91a93637eand</Location></pre>
75905a92eaee6d405d059adb82dbeb857b77ea93rbowen <p>You could also use this directive to configure a particular
75905a92eaee6d405d059adb82dbeb857b77ea93rbowen handler for files with a particular file extension. For example:</p>
1f1b6bf13313fdd14a45e52e553d3ff28689b717coar <pre class="prettyprint lang-config"><FilesMatch "\.php$">
4aa603e6448b99f9371397d439795c91a93637eand</FilesMatch></pre>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>You can override an earlier defined <code class="directive">SetHandler</code>
e781272ab7c3bb5e1688b73d9625b161d8317f46nd <p>Because <code class="directive">SetHandler</code> overrides default handlers,
2bb4320391b88748dc6e851deca941b058231664rbowen normal behavior such as handling of URLs ending in a slash (/) as
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">SetInputFilter</code> directive sets the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive filter or filters which will process client requests and POST
06ba4a61654b3763ad65f52283832ebf058fdf1cslive input when they are received by the server. This is in addition to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive any filters defined elsewhere, including the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="/mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>If more than one filter is specified, they must be separated
06ba4a61654b3763ad65f52283832ebf058fdf1cslive by semicolons in the order in which they should process the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive content.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
06ba4a61654b3763ad65f52283832ebf058fdf1cslive which will process responses from the server before they are
06ba4a61654b3763ad65f52283832ebf058fdf1cslive sent to the client. This is in addition to any filters defined
06ba4a61654b3763ad65f52283832ebf058fdf1cslive elsewhere, including the
97a9a944b5887e91042b019776c41d5dd74557aferikabele <code class="directive"><a href="/mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directive.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>For example, the following configuration will process all files
06ba4a61654b3763ad65f52283832ebf058fdf1cslive in the <code>/www/data/</code> directory for server-side
06ba4a61654b3763ad65f52283832ebf058fdf1cslive includes.</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><Directory "/www/data/">
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen SetOutputFilter INCLUDES
4aa603e6448b99f9371397d439795c91a93637eand</Directory></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>If more than one filter is specified, they must be separated
06ba4a61654b3763ad65f52283832ebf058fdf1cslive by semicolons in the order in which they should process the
06ba4a61654b3763ad65f52283832ebf058fdf1cslive content.</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
eceded617d1b6f35497902cea1788f87596d9854rjung<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 60</code></td></tr>
bf876fa45c212a18d7aa07504e872cf63a0c247cnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>The <code class="directive">TimeOut</code> directive defines the length
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen of time Apache httpd will wait for I/O in various circumstances:</p>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When reading data from the client, the length of time to
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton wait for a TCP packet to arrive if the read buffer is
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton empty.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>When writing data to the client, the length of time to wait
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton for an acknowledgement of a packet if the send buffer is
5d01f40ffd657dd2ac567aacd93cabd162ddfa79coar <li>In <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> and <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code>,
a1ceb0cd0152edea3c72f4d9dcb352bae6ef273fjorton the length of time to wait for output from a CGI script.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>In <code class="module"><a href="/mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton wait for output from a filtering process.</li>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <li>In <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code class="directive"><a href="/mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton configured.</li>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
2bb4320391b88748dc6e851deca941b058231664rbowen<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
8559a67073808d84d85bb5dd552d4247caafe709sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd <p>This directive overrides the behavior of <code>TRACE</code> for both
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd the core server and <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. The default
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd <code>TraceEnable on</code> permits <code>TRACE</code> requests per
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd RFC 2616, which disallows any request body to accompany the request.
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd allowed) error to the client.</p>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>Finally, for testing and diagnostic purposes only, request
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor bodies may be allowed using the non-compliant <code>TraceEnable
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe extended</code> directive. The core (as an origin server) will
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe restrict the request body to 64k (plus 8k for chunk headers if
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd <code>Transfer-Encoding: chunked</code> is used). The core will
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd reflect the full headers and all chunk headers with the response
7c92df02f82de3f6682f48fcf1b8c5ebe2c02b45nd body. As a proxy server, the request body is not restricted to 64k.</p>
b6d833a4ca6779b4795bac6e2efada798e8e5b82jim <p>Despite claims to the contrary, <code>TRACE</code> is not
b6d833a4ca6779b4795bac6e2efada798e8e5b82jim a security vulnerability and there is no viable reason for
b6d833a4ca6779b4795bac6e2efada798e8e5b82jim it to be disabled. Doing so necessarily makes your server
b6d833a4ca6779b4795bac6e2efada798e8e5b82jim non-compliant.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine the existence of a variable</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
1723928efa40774afc394d9e6b2b974c1f49330dnd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin of passing a <code>-D</code> argument to <code class="program"><a href="/programs/httpd.html">httpd</a></code>.</p>
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <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
e797af4d7b0cada1278d72d6c8ac77210ef78632minfrin <code>-D</code> arguments in any startup scripts.</p>
1723928efa40774afc394d9e6b2b974c1f49330dnd <p>While this directive is supported in virtual host context,
1723928efa40774afc394d9e6b2b974c1f49330dnd the changes it makes are visible to any later configuration
1723928efa40774afc394d9e6b2b974c1f49330dnd directives, beyond any enclosing virtual host</p>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
fb77c505254b6e9c925e23e734463e87574f8f40kess<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>In many situations Apache httpd must construct a <em>self-referential</em>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL -- that is, a URL that refers back to the same server. With
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specified in the <code class="directive"><a href="#servername">ServerName</a></code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive to construct the canonical name for the server. This name
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is used in all self-referential URLs, and for the values of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>With <code>UseCanonicalName Off</code> Apache httpd will form
06ba4a61654b3763ad65f52283832ebf058fdf1cslive self-referential URLs using the hostname and port supplied by
06ba4a61654b3763ad65f52283832ebf058fdf1cslive the client if any are supplied (otherwise it will use the
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen canonical name, as defined above). These values are the same
3c13a815670b54d1c17bf02954f7d2b066cde95cnd that are used to implement <a href="/vhosts/name-based.html">name-based virtual hosts</a>,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and are available with the same clients. The CGI variables
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen constructed from the client supplied values as well.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>An example where this may be useful is on an intranet server
06ba4a61654b3763ad65f52283832ebf058fdf1cslive where you have users connecting to the machine using short
06ba4a61654b3763ad65f52283832ebf058fdf1cslive names such as <code>www</code>. You'll notice that if the users
06ba4a61654b3763ad65f52283832ebf058fdf1cslive type a shortname, and a URL which is a directory, such as
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>http://www/splat</code>, <em>without the trailing
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen slash</em> then Apache httpd will redirect them to
d565edaec710102f7e7d06252aaf1de67b7ddd25rbowen <code>http://www.example.com/splat/</code>. If you have
06ba4a61654b3763ad65f52283832ebf058fdf1cslive authentication enabled, this will cause the user to have to
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen authenticate twice (once for <code>www</code> and once again
bd668e1f15c276a07ba9b4bf5bd4b9357dbe55dehumbedooh for <code>www.example.com</code> -- see <a href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">
bd668e1f15c276a07ba9b4bf5bd4b9357dbe55dehumbedooh the FAQ on this subject for more information</a>). But if
fb77c505254b6e9c925e23e734463e87574f8f40kess <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will redirect to <code>http://www/splat/</code>.</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>There is a third option, <code>UseCanonicalName DNS</code>,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive which is intended for use with mass IP-based virtual hosting to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive support ancient clients that do not provide a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>Host:</code> header. With this option Apache httpd does a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive reverse DNS lookup on the server IP address that the client
06ba4a61654b3763ad65f52283832ebf058fdf1cslive connected to in order to work out self-referential URLs.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd they may be broken by this option. The client is essentially free
130d299c4b2b15be45532a176604c71fdc7bea5bnd to give whatever value they want as a hostname. But if the CGI is
130d299c4b2b15be45532a176604c71fdc7bea5bnd only using <code>SERVER_NAME</code> to construct self-referential URLs
06ba4a61654b3763ad65f52283832ebf058fdf1cslive then it should be just fine.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#servername">ServerName</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
8dcaf01df6ee1e6cb1d7a9eafe056006c5e4fdcesf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own port</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim constructing the canonical port for the server to honor
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim provide the actual physical port number being used by this request
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will not ever use the actual physical port number, instead
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim relying on all configured information to construct a valid port number.</p>
8dcaf01df6ee1e6cb1d7a9eafe056006c5e4fdcesf <p>The ordering of the lookup when the physical port is used is as
8dcaf01df6ee1e6cb1d7a9eafe056006c5e4fdcesf follows:</p>
8dcaf01df6ee1e6cb1d7a9eafe056006c5e4fdcesf <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
8dcaf01df6ee1e6cb1d7a9eafe056006c5e4fdcesf <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim physical ports are removed from the ordering.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="#servername">ServerName</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<li><code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code></li>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost"><VirtualHost></a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><VirtualHost
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
fe64b2ba25510d8c9dba5560a2d537763566cf40nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p><code class="directive"><VirtualHost></code> and
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code></VirtualHost></code> are used to enclose a group of
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive directives that will apply only to a particular virtual host. Any
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive directive that is allowed in a virtual host context may be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive used. When the server receives a request for a document on a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive particular virtual host, it uses the configuration directives
06ba4a61654b3763ad65f52283832ebf058fdf1cslive enclosed in the <code class="directive"><VirtualHost></code>
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf section. <var>Addr</var> can be any of the following, optionally followed by
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf a colon and a port number (or *):</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <li>A fully qualified domain name for the IP address of the
4c881d2fffa365e2e0c5e25eb1cf77f4f9406e44chrisd virtual host (not recommended);</li>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <li>The character <code>*</code>, which acts as a wildcard and matches
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf any IP address.</li>
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf <li>The string <code>_default_</code>, which is an alias for <code>*</code></li>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><VirtualHost 10.1.2.3:80>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen ServerAdmin webmaster@host.example.com
4aa603e6448b99f9371397d439795c91a93637eand</VirtualHost></pre>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>IPv6 addresses must be specified in square brackets because
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the optional port number could not be determined otherwise. An
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd IPv6 example is shown below:</p>
4aa603e6448b99f9371397d439795c91a93637eand <pre class="prettyprint lang-config"><VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
51b60896224b408a35684bd6ec0fafe5e4abe322rbowen ServerAdmin webmaster@host.example.com
4aa603e6448b99f9371397d439795c91a93637eand</VirtualHost></pre>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>Each Virtual Host must correspond to a different IP address,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive different port number or a different host name for the server,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive in the former case the server machine must be configured to
06ba4a61654b3763ad65f52283832ebf058fdf1cslive accept IP packets for multiple addresses. (If the machine does
06ba4a61654b3763ad65f52283832ebf058fdf1cslive not have multiple network interfaces, then this can be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess accomplished with the <code>ifconfig alias</code> command -- if
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive your OS supports it).</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The use of <code class="directive"><VirtualHost></code> does
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <strong>not</strong> affect what addresses Apache httpd listens on. You
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen may need to ensure that Apache httpd is listening on the correct addresses
130d299c4b2b15be45532a176604c71fdc7bea5bnd using <code class="directive"><a href="/mod/mpm_common.html#listen">Listen</a></code>.</p>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive specified inside each <code class="directive"><VirtualHost></code> block. If it is absent, the
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive server configuration will be inherited.</p>
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <p>When a request is received, the server first maps it to the best matching
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim <code class="directive"><VirtualHost></code> based on the local
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim IP address and port combination only. Non-wildcards have a higher
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim precedence. If no match based on IP and port occurs at all, the
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf "main" server configuration is used.</p>
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf <p>If multiple virtual hosts contain the best matching IP address and port,
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim the server selects from these virtual hosts the best match based on the
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim requested hostname. If no matching name-based virtual host is found,
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim then the first listed virtual host that matched the IP address will be
4cb65c31bc681540ea623e1cb2bdd09749fb8d7esf used. As a consequence, the first listed virtual host for a given IP address
2b6565aedca9e9c10691b12fd2f3689bf4c85bc7jim and port combination is default virtual host for that IP and port
6e14faf37935e36804b8bad802bc9dd58f3cf65dsf combination.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>See the <a href="/misc/security_tips.html">security tips</a>
130d299c4b2b15be45532a176604c71fdc7bea5bnd document for details on why your security could be compromised if the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick directory where log files are stored is writable by anyone other
06ba4a61654b3763ad65f52283832ebf058fdf1cslive than the user that starts the server.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<li><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<li><a href="/dns-caveats.html">Issues Regarding DNS and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen which addresses and ports Apache HTTP Server uses</a></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<li><a href="/sections.html">How <Directory>, <Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <Files> sections work</a> for an explanation of how these
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess different sections are combined when a request is received</li>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<div class="directive-section"><h2><a name="Warning" id="Warning">Warning</a> <a name="warning" id="warning">Directive</a></h2>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Warn from configuration parsing with a custom message</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Warning <var>message</var></code></td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5 and later</td></tr>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf <p>If an issue can be detected from within the configuration, this
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf directive can be used to generate a custom warning message. The
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf configuration parsing is not halted. The typical use it to check
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf whether some user define options are set, and warn if not.</p>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf# tell when ReverseProxy is not set
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<IfDefine !ReverseProxy>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf Warning "reverse proxy is not started, hope this is okay!"
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf</IfDefine>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf<IfDefine ReverseProxy>
e83cd73f10044371dd9dfa5f46b6d7d5c585fe54sf # define custom proxy configuration
4aa603e6448b99f9371397d439795c91a93637eand</IfDefine></pre>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
4aa805f8500255bc52a4c03259fe46df10a1d07cyoshiki<a href="/en/mod/core.html" title="English"> en </a> |
d972e4a0688f66b1402473dd9dacfecefa2132a8rbowen<a href="/es/mod/core.html" hreflang="es" rel="alternate" title="Espa�ol"> es </a> |
dfb59c684345700bf9186b8d44936f8b1ba082ffgryzor<a href="/fr/mod/core.html" hreflang="fr" rel="alternate" title="Fran�ais"> fr </a> |
ecc5150d35c0dc5ee5119c2717e6660fa331abbftakashi<a href="/ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/core.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
ccb709596bad11241fad96d128bbaae408ad78a7rbowen</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
ccb709596bad11241fad96d128bbaae408ad78a7rbowenvar comments_shortname = 'httpd';
ccb709596bad11241fad96d128bbaae408ad78a7rbowenvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/core.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
ccb709596bad11241fad96d128bbaae408ad78a7rbowen d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
ccb709596bad11241fad96d128bbaae408ad78a7rbowen d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
205f749042ed530040a4f0080dbcb47ceae8a374rjung<p class="apache">Copyright 2015 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>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();