]> granicus.if.org Git - apache/blob - docs/manual/mod/core.html.en
Docs regen
[apache] / docs / manual / mod / core.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
5 <!--
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7               This file is generated from xml source: DO NOT EDIT
8         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9       -->
10 <title>core - Apache HTTP Server Version 2.5</title>
11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
13 <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" />
14 <script src="../style/scripts/prettify.min.js" type="text/javascript">
15 </script>
16
17 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
18 <body>
19 <div id="page-header">
20 <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>
21 <p class="apache">Apache HTTP Server Version 2.5</p>
22 <img alt="" src="../images/feather.png" /></div>
23 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
24 <div id="path">
25 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.5</a> &gt; <a href="./">Modules</a></div>
26 <div id="page-content">
27 <div id="preamble"><h1>Apache Core Features</h1>
28 <div class="toplang">
29 <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
30 <a href="../en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
31 <a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español">&nbsp;es&nbsp;</a> |
32 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
33 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
34 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
35 </div>
36 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
37 available</td></tr>
38 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
39 </div>
40 <div id="quickview"><h3 class="directives">Directives</h3>
41 <ul id="toc">
42 <li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
43 <li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#asyncfilter">AsyncFilter</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch">&lt;DirectoryMatch&gt;</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#else">&lt;Else&gt;</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#elseif">&lt;ElseIf&gt;</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#files">&lt;Files&gt;</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#filesmatch">&lt;FilesMatch&gt;</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HTTPProtocolOptions</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#if">&lt;If&gt;</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine">&lt;IfDefine&gt;</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule">&lt;IfModule&gt;</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#limitexcept">&lt;LimitExcept&gt;</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#location">&lt;Location&gt;</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch">&lt;LocationMatch&gt;</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#logleveloverride">LogLevelOverride</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
103 <li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li>
104 <li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li>
105 <li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li>
106 <li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li>
107 <li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li>
108 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
109 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
110 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
111 <li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
112 <li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
113 <li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
114 <li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
115 <li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
116 <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
117 <li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
118 <li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
119 <li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
120 <li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
121 <li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
122 <li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
123 <li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
124 <li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
125 <li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li>
126 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
127 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
128 <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost">&lt;VirtualHost&gt;</a></li>
129 <li><img alt="" src="../images/down.gif" /> <a href="#warning">Warning</a></li>
130 </ul>
131 <h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component=core">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component=core">Report a bug</a></li></ul><h3>See also</h3>
132 <ul class="seealso">
133 <li><a href="#comments_section">Comments</a></li></ul></div>
134
135 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
136 <div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
137 <table class="directive">
138 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
139 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
140 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
141 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
142 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
143 </table>
144     <p>This directive enables operating system specific optimizations for a
145        listening socket by the <code class="directive">Protocol</code> type.
146        The basic premise is for the kernel to not send a socket to the server
147        process until either data is received or an entire HTTP Request is buffered.
148        Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
149        FreeBSD's Accept Filters</a>, Linux's more primitive
150        <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
151        are currently supported.</p>
152
153     <p>Using <code>none</code> for an argument will disable any accept filters
154        for that protocol.  This is useful for protocols that require a server
155        send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
156     <pre class="prettyprint lang-config">AcceptFilter nntp none</pre>
157
158
159     <p>The default protocol names are <code>https</code> for port 443
160        and <code>http</code> for all other ports.  To specify that another
161        protocol is being used with a listening port, add the <var>protocol</var>
162        argument to the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
163        directive.</p>
164
165     <p>The default values on FreeBSD are:</p>
166     <pre class="prettyprint lang-config">AcceptFilter http httpready
167 AcceptFilter https dataready</pre>
168
169
170     <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
171        the kernel level.  Once an entire request is received, the kernel then
172        sends it to the server. See the
173        <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
174        accf_http(9)</a> man page for more details.  Since HTTPS requests are
175        encrypted, only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
176        accf_data(9)</a> filter is used.</p>
177
178     <p>The default values on Linux are:</p>
179     <pre class="prettyprint lang-config">AcceptFilter http data
180 AcceptFilter https data</pre>
181
182
183     <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
184        requests.  Any value besides <code>none</code> will enable
185        <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
186        see the Linux
187        <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
188        tcp(7)</a> man page.</p>
189
190     <p>The default values on Windows are:</p>
191     <pre class="prettyprint lang-config">AcceptFilter http data
192 AcceptFilter https data</pre>
193
194
195     <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
196        API, and does not support http protocol buffering.  There are two values
197        which utilize the Windows AcceptEx() API and will recycle network
198        sockets between connections.  <code>data</code> waits until data has
199        been transmitted as documented above, and the initial data buffer and
200        network endpoint addresses are all retrieved from the single AcceptEx()
201        invocation.  <code>connect</code> will use the AcceptEx() API, also
202        retrieve the network endpoint addresses, but like <code>none</code>
203        the <code>connect</code> option does not wait for the initial data
204        transmission.</p>
205
206     <p>On Windows, <code>none</code> uses accept() rather than AcceptEx()
207        and will not recycle sockets between connections.  This is useful for
208        network adapters with broken driver support, as well as some virtual
209        network providers such as vpn drivers, or spam, virus or spyware
210        filters.</p>
211
212
213 <h3>See also</h3>
214 <ul>
215 <li><code class="directive"><a href="#protocol">Protocol</a></code></li>
216 </ul>
217 </div>
218 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
219 <div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
220 <table class="directive">
221 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
222 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
223 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
224 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
225 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
226 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
227 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
228 </table>
229
230     <p>This directive controls whether requests that contain trailing
231     pathname information that follows an actual filename (or
232     non-existent file in an existing directory) will be accepted or
233     rejected.  The trailing pathname information can be made
234     available to scripts in the <code>PATH_INFO</code> environment
235     variable.</p>
236
237     <p>For example, assume the location <code>/test/</code> points to
238     a directory that contains only the single file
239     <code>here.html</code>.  Then requests for
240     <code>/test/here.html/more</code> and
241     <code>/test/nothere.html/more</code> both collect
242     <code>/more</code> as <code>PATH_INFO</code>.</p>
243
244     <p>The three possible arguments for the
245     <code class="directive">AcceptPathInfo</code> directive are:</p>
246     <dl>
247     <dt><code>Off</code></dt><dd>A request will only be accepted if it
248     maps to a literal path that exists.  Therefore a request with
249     trailing pathname information after the true filename such as
250     <code>/test/here.html/more</code> in the above example will return
251     a 404 NOT FOUND error.</dd>
252
253     <dt><code>On</code></dt><dd>A request will be accepted if a
254     leading path component maps to a file that exists.  The above
255     example <code>/test/here.html/more</code> will be accepted if
256     <code>/test/here.html</code> maps to a valid file.</dd>
257
258     <dt><code>Default</code></dt><dd>The treatment of requests with
259     trailing pathname information is determined by the <a href="../handler.html">handler</a> responsible for the request.
260     The core handler for normal files defaults to rejecting
261     <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
262     <code>PATH_INFO</code> by default.</dd>
263     </dl>
264
265     <p>The primary purpose of the <code>AcceptPathInfo</code>
266     directive is to allow you to override the handler's choice of
267     accepting or rejecting <code>PATH_INFO</code>. This override is required,
268     for example, when you use a <a href="../filter.html">filter</a>, such
269     as <a href="mod_include.html">INCLUDES</a>, to generate content
270     based on <code>PATH_INFO</code>.  The core handler would usually reject
271     the request, so you can use the following configuration to enable
272     such a script:</p>
273
274     <pre class="prettyprint lang-config">&lt;Files "mypaths.shtml"&gt;
275   Options +Includes
276   SetOutputFilter INCLUDES
277   AcceptPathInfo On
278 &lt;/Files&gt;</pre>
279
280
281
282 </div>
283 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
284 <div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
285 <table class="directive">
286 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
287 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
288 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
289 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
290 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
291 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
292 </table>
293     <p>While processing a request, the server looks for
294     the first existing configuration file from this list of names in
295     every directory of the path to the document, if distributed
296     configuration files are <a href="#allowoverride">enabled for that
297     directory</a>. For example:</p>
298
299     <pre class="prettyprint lang-config">AccessFileName .acl</pre>
300
301
302     <p>Before returning the document
303     <code>/usr/local/web/index.html</code>, the server will read
304     <code>/.acl</code>, <code>/usr/.acl</code>,
305     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
306     for directives unless they have been disabled with:</p>
307
308     <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
309     AllowOverride None
310 &lt;/Directory&gt;</pre>
311
312
313 <h3>See also</h3>
314 <ul>
315 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
316 <li><a href="../configuring.html">Configuration Files</a></li>
317 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
318 </ul>
319 </div>
320 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
321 <div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
322 <table class="directive">
323 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
324 content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
325 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
326 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
327 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
328 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
329 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
330 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
331 </table>
332     <p>This directive specifies a default value for the media type
333     charset parameter (the name of a character encoding) to be added
334     to a response if and only if the response's content-type is either
335     <code>text/plain</code> or <code>text/html</code>.  This should override
336     any charset specified in the body of the response via a <code>META</code>
337     element, though the exact behavior is often dependent on the user's client
338     configuration. A setting of <code>AddDefaultCharset Off</code>
339     disables this functionality. <code>AddDefaultCharset On</code> enables
340     a default charset of <code>iso-8859-1</code>. Any other value is assumed
341     to be the <var>charset</var> to be used, which should be one of the
342     <a href="http://www.iana.org/assignments/character-sets">IANA registered
343     charset values</a> for use in Internet media types (MIME types).
344     For example:</p>
345
346     <pre class="prettyprint lang-config">AddDefaultCharset utf-8</pre>
347
348
349     <p><code class="directive">AddDefaultCharset</code> should only be used when all
350     of the text resources to which it applies are known to be in that
351     character encoding and it is too inconvenient to label their charset
352     individually. One such example is to add the charset parameter
353     to resources containing generated content, such as legacy CGI
354     scripts, that might be vulnerable to cross-site scripting attacks
355     due to user-provided data being included in the output.  Note, however,
356     that a better solution is to just fix (or delete) those scripts, since
357     setting a default charset does not protect users that have enabled
358     the "auto-detect character encoding" feature on their browser.</p>
359
360 <h3>See also</h3>
361 <ul>
362 <li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li>
363 </ul>
364 </div>
365 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
366 <div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
367 <table class="directive">
368 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
369 be passed through</td></tr>
370 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off|NoDecode</code></td></tr>
371 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
372 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
373 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
374 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
375 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>
376 NoDecode option available in 2.3.12 and later.</td></tr>
377 </table>
378     <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
379     which contain encoded path separators (<code>%2F</code> for <code>/</code>
380     and additionally <code>%5C</code> for <code>\</code> on accordant systems)
381     to be used in the path info.</p>
382
383     <p>With the default value, <code>Off</code>, such URLs are refused
384     with a 404 (Not found) error.</p>
385
386     <p>With the value <code>On</code>, such URLs are accepted, and encoded
387       slashes are decoded like all other encoded characters.</p>
388
389     <p>With the value <code>NoDecode</code>, such URLs are accepted, but
390       encoded slashes are not decoded but left in their encoded state.</p>
391
392     <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
393     mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
394
395     <div class="note"><h3>Note</h3>
396       <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is
397       strongly recommended as a security measure.  Allowing slashes
398       to be decoded could potentially allow unsafe paths.</p>
399     </div>
400
401 <h3>See also</h3>
402 <ul>
403 <li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
404 </ul>
405 </div>
406 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
407 <div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
408 <table class="directive">
409 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
410 <code>.htaccess</code> files</td></tr>
411 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
412 [<var>directive-type</var>] ...</code></td></tr>
413 <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>
414 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
415 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
416 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
417 </table>
418     <p>When the server finds an <code>.htaccess</code> file (as
419     specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>),
420     it needs to know which directives declared in that file can override
421     earlier configuration directives.</p>
422
423     <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
424     <code class="directive">AllowOverride</code> is valid only in
425     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
426     sections specified without regular expressions, not in <code class="directive"><a href="#location">&lt;Location&gt;</a></code>, <code class="directive"><a href="#directorymatch">&lt;DirectoryMatch&gt;</a></code> or
427     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
428     </div>
429
430     <p>When this directive is set to <code>None</code> and <code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code> is set to
431     <code>None</code>, <a href="#accessfilename">.htaccess</a> files are
432     completely ignored. In this case, the server will not even attempt
433     to read <code>.htaccess</code> files in the filesystem.</p>
434
435     <p>When this directive is set to <code>All</code>, then any
436     directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
437     <code>.htaccess</code> files.</p>
438
439     <p>The <var>directive-type</var> can be one of the following
440     groupings of directives.</p>
441
442     <dl>
443       <dt>AuthConfig</dt>
444
445       <dd>
446
447       Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authz_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
448       <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
449       <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
450       <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
451       <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>
452
453       <dt>FileInfo</dt>
454
455       <dd>
456       Allow use of the directives controlling document types
457      (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
458       <code class="directive"><a href="#forcetype">ForceType</a></code>,
459       <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
460       <code class="directive"><a href="#sethandler">SetHandler</a></code>,
461       <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
462       <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
463       <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
464       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>),
465       <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>),
466       <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
467       <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from
468       <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>.
469       </dd>
470
471       <dt>Indexes</dt>
472
473       <dd>
474       Allow use of the directives controlling directory indexing
475       (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
476       <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>,
477       <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
478       <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>,
479       <em>etc.</em>).</dd>
480
481       <dt>Limit</dt>
482
483       <dd>
484       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>
485
486
487
488
489       <dt>Nonfatal=[Override|Unknown|All]</dt>
490
491       <dd>
492       Allow use of AllowOverride option to treat invalid (unrecognized
493       or disallowed) directives in
494       .htaccess as nonfatal. Instead of causing an Internal Server
495       Error, disallowed or unrecognised directives will be ignored
496       and a warning logged:
497       <ul>
498           <li><strong>Nonfatal=Override</strong> treats directives
499               forbidden by AllowOverride as nonfatal.</li>
500           <li><strong>Nonfatal=Unknown</strong> treats unknown directives
501               as nonfatal.  This covers typos and directives implemented
502               by a module that's not present.</li>
503           <li><strong>Nonfatal=All</strong> treats both the above as nonfatal.</li>
504       </ul>
505       <p>Note that a syntax error in a valid directive will still cause
506       an Internal Server Error.</p>
507       <div class="warning"><h3>Security</h3>
508           Nonfatal errors may have security implications for .htaccess users.
509           For example, if AllowOverride disallows AuthConfig, users'
510           configuration designed to restrict access to a site will be disabled.
511       </div>
512       </dd>
513
514       <dt>Options[=<var>Option</var>,...]</dt>
515
516       <dd>
517       Allow use of the directives controlling specific directory
518       features (<code class="directive"><a href="#options">Options</a></code> and
519       <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).
520       An equal sign may be given followed by a comma-separated list, without
521       spaces, of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.
522
523       <div class="note"><h3>Implicit disabling of Options</h3>
524       <p>Even though the list of options that may be used in .htaccess files
525          can be limited with this directive, as long as any <code class="directive"><a href="#options">Options</a></code> directive is allowed any
526          other inherited option can be disabled by using the non-relative
527          syntax.  In other words, this mechanism cannot force a specific option
528          to remain <em>set</em> while allowing any others to be set.
529       </p></div>
530
531       <div class="example"><p><code>
532       AllowOverride Options=Indexes,MultiViews
533       </code></p></div>
534       </dd>
535     </dl>
536
537     <p>Example:</p>
538
539     <pre class="prettyprint lang-config">AllowOverride AuthConfig Indexes</pre>
540
541
542     <p>In the example above, all directives that are neither in the group
543     <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
544     server error.</p>
545
546     <div class="note"><p>For security and performance reasons, do not set
547     <code>AllowOverride</code> to anything other than <code>None</code>
548     in your <code>&lt;Directory "/"&gt;</code> block. Instead, find (or
549     create) the <code>&lt;Directory&gt;</code> block that refers to the
550     directory where you're actually planning to place a
551     <code>.htaccess</code> file.</p>
552     </div>
553
554 <h3>See also</h3>
555 <ul>
556 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
557 <li><code class="directive"><a href="#allowoverridelist">AllowOverrideList</a></code></li>
558 <li><a href="../configuring.html">Configuration Files</a></li>
559 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
560 </ul>
561 </div>
562 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
563 <div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">Directive</a></h2>
564 <table class="directive">
565 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Individual directives that are allowed in
566 <code>.htaccess</code> files</td></tr>
567 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverrideList None|<var>directive</var>
568 [<var>directive-type</var>] ...</code></td></tr>
569 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverrideList None</code></td></tr>
570 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
571 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
572 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
573 </table>
574     <p>When the server finds an <code>.htaccess</code> file (as
575     specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>),
576     it needs to know which directives declared in that file can override
577     earlier configuration directives.</p>
578
579     <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
580     <code class="directive">AllowOverrideList</code> is valid only in
581     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
582     sections specified without regular expressions, not in <code class="directive"><a href="#location">&lt;Location&gt;</a></code>, <code class="directive"><a href="#directorymatch">&lt;DirectoryMatch&gt;</a></code> or
583     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
584     </div>
585
586     <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>,
587     then <a href="#accessfilename">.htaccess</a> files are completely
588     ignored.  In this case, the server will not even attempt to read
589     <code>.htaccess</code> files in the filesystem.</p>
590
591     <p>Example:</p>
592
593     <pre class="prettyprint lang-config">AllowOverride None
594 AllowOverrideList Redirect RedirectMatch</pre>
595
596
597     <p>In the example above, only the <code>Redirect</code> and
598     <code>RedirectMatch</code> directives are allowed. All others will
599     cause an Internal Server Error.</p>
600
601     <p>Example:</p>
602
603     <pre class="prettyprint lang-config">AllowOverride AuthConfig
604 AllowOverrideList CookieTracking CookieName</pre>
605
606
607     <p>In the example above, <code class="directive"><a href="#allowoverride">AllowOverride
608     </a></code> grants permission to the <code>AuthConfig</code>
609     directive grouping and <code class="directive">AllowOverrideList</code> grants
610     permission to only two directives from the <code>FileInfo</code> directive
611     grouping. All others will cause an Internal Server Error.</p>
612
613 <h3>See also</h3>
614 <ul>
615 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
616 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
617 <li><a href="../configuring.html">Configuration Files</a></li>
618 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
619 </ul>
620 </div>
621 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
622 <div class="directive-section"><h2><a name="AsyncFilter" id="AsyncFilter">AsyncFilter</a> <a name="asyncfilter" id="asyncfilter">Directive</a></h2>
623 <table class="directive">
624 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set the minimum filter type eligible for asynchronous handling</td></tr>
625 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AsyncFilter request|connection|network</code></td></tr>
626 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AsyncFilter request</code></td></tr>
627 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
628 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
629 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
630 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.5.0 and later.</td></tr>
631 </table>
632         <p>This directive controls the minimum filter levels that are eligible
633         for asynchronous handling. This may be necessary to support legacy external
634         filters that did not handle meta buckets correctly.</p>
635
636         <p>If set to "network", asynchronous handling will be limited to the network
637         filter only. If set to "connection", all connection and network filters
638         will be eligible for asynchronous handling, including <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code>.
639         If set to "request", all filters will be eligible for asynchronous handling.</p>
640     
641 </div>
642 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
643 <div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
644 <table class="directive">
645 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
646 scripts</td></tr>
647 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
648 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
649 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
650 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
651 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
652 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
653 </table>
654     <p>This directive is used to control how Apache httpd finds the
655     interpreter used to run CGI scripts. For example, setting
656     <code>CGIMapExtension sys:\foo.nlm .foo</code> will
657     cause all CGI script files with a <code>.foo</code> extension to
658     be passed to the FOO interpreter.</p>
659
660 </div>
661 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
662 <div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">Directive</a></h2>
663 <table class="directive">
664 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI
665 variables</td></tr>
666 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIPassAuth On|Off</code></td></tr>
667 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>CGIPassAuth Off</code></td></tr>
668 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
669 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
670 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
671 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
672 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr>
673 </table>
674     <p><code class="directive">CGIPassAuth</code> allows scripts access to HTTP
675     authorization headers such as <code>Authorization</code>, which is
676     required for scripts that implement HTTP Basic authentication.
677     Normally these HTTP headers are hidden from scripts. This is to disallow
678     scripts from seeing user ids and passwords used to access the server when
679     HTTP Basic authentication is enabled in the web server.  This directive
680     should be used when scripts are allowed to implement HTTP Basic
681     authentication.</p>
682
683     <p>This directive can be used instead of the compile-time setting
684     <code>SECURITY_HOLE_PASS_AUTHORIZATION</code> which has been available
685     in previous versions of Apache HTTP Server.</p>
686
687     <p>The setting is respected by any modules which use
688     <code>ap_add_common_vars()</code>, such as <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>,
689     <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>,
690     <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>, and so on.  Notably, it affects
691     modules which don't handle the request in the usual sense but
692     still use this API; examples of this are <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
693     and <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>.  Third-party modules that don't
694     use <code>ap_add_common_vars()</code> may choose to respect the setting
695     as well.</p>
696
697 </div>
698 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
699 <div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a> <a name="cgivar" id="cgivar">Directive</a></h2>
700 <table class="directive">
701 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls how some CGI variables are set</td></tr>
702 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr>
703 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
704 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
705 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
706 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
707 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr>
708 </table>
709   <p>This directive controls how some CGI variables are set.</p>
710
711   <p><strong>REQUEST_URI</strong> rules:</p>
712   <dl>
713     <dt><code>original-uri</code> (default)</dt>
714     <dd>The value is taken from the original request line, and will not
715     reflect internal redirects or subrequests which change the requested
716     resource.</dd>
717     <dt><code>current-uri</code></dt>
718     <dd>The value reflects the resource currently being processed,
719     which may be different than the original request from the client
720     due to internal redirects or subrequests.</dd>
721   </dl>
722
723 </div>
724 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
725 <div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
726 <table class="directive">
727 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
728 headers</td></tr>
729 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
730 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
731 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
732 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
733 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
734 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
735 </table>
736     <p>This directive enables the generation of
737     <code>Content-MD5</code> headers as defined in RFC1864
738     respectively RFC2616.</p>
739
740     <p>MD5 is an algorithm for computing a "message digest"
741     (sometimes called "fingerprint") of arbitrary-length data, with
742     a high degree of confidence that any alterations in the data
743     will be reflected in alterations in the message digest.</p>
744
745     <p>The <code>Content-MD5</code> header provides an end-to-end
746     message integrity check (MIC) of the entity-body. A proxy or
747     client may check this header for detecting accidental
748     modification of the entity-body in transit. Example header:</p>
749
750     <div class="example"><p><code>
751       Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
752     </code></p></div>
753
754     <p>Note that this can cause performance problems on your server
755     since the message digest is computed on every request (the
756     values are not cached).</p>
757
758     <p><code>Content-MD5</code> is only sent for documents served
759     by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example,
760     SSI documents, output from CGI scripts, and byte range responses
761     do not have this header.</p>
762
763 </div>
764 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
765 <div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">Directive</a></h2>
766 <table class="directive">
767 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server run-time files</td></tr>
768 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
769 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
770 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
771 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
772 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
773 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.4.2 and later</td></tr>
774 </table>
775     <p>The <code class="directive">DefaultRuntimeDir</code> directive sets the
776     directory in which the server will create various run-time files
777     (shared memory, locks, etc.). If set as a relative path, the full path
778     will be relative to <code class="directive">ServerRoot</code>.</p>
779
780     <p><strong>Example</strong></p>
781    <pre class="prettyprint lang-config">DefaultRuntimeDir scratch/</pre>
782
783
784     <p>The default location of <code class="directive">DefaultRuntimeDir</code> may be
785     modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define
786     at build time.</p>
787
788    <p>Note: <code class="directive">ServerRoot</code> should be specified before this
789    directive is used. Otherwise, the default value of <code class="directive">ServerRoot</code>
790    would be used to set the base directory.</p>
791
792
793 <h3>See also</h3>
794 <ul>
795 <li><a href="../misc/security_tips.html#serverroot">the
796     security tips</a> for information on how to properly set
797     permissions on the <code class="directive">ServerRoot</code></li>
798 </ul>
799 </div>
800 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
801 <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
802 <table class="directive">
803 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings
804 if the value is not <code>none</code>. In prior versions, DefaultType
805 would specify a default media type to assign to response content for
806 which no other media type configuration could be found.
807 </td></tr>
808 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
809 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType none</code></td></tr>
810 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
811 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
812 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
813 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
814 <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.
815 </td></tr>
816 </table>
817     <p>This directive has been disabled.  For backwards compatibility
818     of configuration files, it may be specified with the value
819     <code>none</code>, meaning no default media type. For example:</p>
820
821     <pre class="prettyprint lang-config">DefaultType None</pre>
822
823
824     <p><code>DefaultType None</code> is only available in
825     httpd-2.2.7 and later.</p>
826
827     <p>Use the mime.types configuration file and the
828     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media
829     type assignments via file extensions, or the
830     <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
831     the media type for specific resources. Otherwise, the server will
832     send the response without a Content-Type header field and the
833     recipient may attempt to guess the media type.</p>
834
835 </div>
836 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
837 <div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
838 <table class="directive">
839 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define a variable</td></tr>
840 <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>
841 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
842 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
843 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
844 </table>
845     <p>In its one parameter form, <code class="directive">Define</code> is equivalent
846     to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>. It
847     can be used to toggle the use of
848     <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections
849     without needing to alter <code>-D</code> arguments in any startup
850     scripts.</p>
851
852     <p>In addition to that, if the second parameter is given, a config variable
853     is set to this value. The variable can be used in the configuration using
854     the <code>${VAR}</code> syntax. The variable is always globally defined
855     and not limited to the scope of the surrounding config section.</p>
856
857     <pre class="prettyprint lang-config">&lt;IfDefine TEST&gt;
858   Define servername test.example.com
859 &lt;/IfDefine&gt;
860 &lt;IfDefine !TEST&gt;
861   Define servername www.example.com
862   Define SSL
863 &lt;/IfDefine&gt;
864
865 DocumentRoot "/var/www/${servername}/htdocs"</pre>
866
867
868     <p>Variable names may not contain colon ":" characters, to avoid clashes
869     with <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p>
870
871     <p>While this directive is supported in virtual host context,
872        the changes it makes are visible to any later configuration
873        directives, beyond any enclosing virtual host</p>
874
875 </div>
876 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
877 <div class="directive-section"><h2><a name="Directory" id="Directory">&lt;Directory&gt;</a> <a name="directory" id="directory">Directive</a></h2>
878 <table class="directive">
879 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
880 named file-system directory, sub-directories, and their contents.</td></tr>
881 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
882 ... &lt;/Directory&gt;</code></td></tr>
883 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
884 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
885 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
886 </table>
887     <p><code class="directive">&lt;Directory&gt;</code> and
888     <code>&lt;/Directory&gt;</code> are used to enclose a group of
889     directives that will apply only to the named directory,
890     sub-directories of that directory, and the files within the respective
891     directories.  Any directive that is allowed
892     in a directory context may be used. <var>Directory-path</var> is
893     either the full path to a directory, or a wild-card string using
894     Unix shell-style matching. In a wild-card string, <code>?</code> matches
895     any single character, and <code>*</code> matches any sequences of
896     characters. You may also use <code>[]</code> character ranges. None
897     of the wildcards match a `/' character, so <code>&lt;Directory
898     "/*/public_html"&gt;</code> will not match
899     <code>/home/user/public_html</code>, but <code>&lt;Directory
900     "/home/*/public_html"&gt;</code> will match. Example:</p>
901
902     <pre class="prettyprint lang-config">&lt;Directory "/usr/local/httpd/htdocs"&gt;
903   Options Indexes FollowSymLinks
904 &lt;/Directory&gt;</pre>
905
906
907     <p>Directory paths <em>may</em> be quoted, if you like, however, it
908     <em>must</em> be quoted if the path contains spaces. This is because a
909     space would otherwise indicate the end of an argument.</p>
910
911     <div class="note">
912       <p>Be careful with the <var>directory-path</var> arguments:
913       They have to literally match the filesystem path which Apache httpd uses
914       to access the files. Directives applied to a particular
915       <code>&lt;Directory&gt;</code> will not apply to files accessed from
916       that same directory via a different path, such as via different symbolic
917       links.</p>
918     </div>
919
920     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular
921     expressions</a> can also be used, with the addition of the
922     <code>~</code> character. For example:</p>
923
924     <pre class="prettyprint lang-config">&lt;Directory ~ "^/www/[0-9]{3}"&gt;
925
926 &lt;/Directory&gt;</pre>
927
928
929     <p>would match directories in <code>/www/</code> that consisted of
930     three numbers.</p>
931
932     <p>If multiple (non-regular expression) <code class="directive">&lt;Directory&gt;</code> sections
933     match the directory (or one of its parents) containing a document,
934     then the directives are applied in the order of shortest match
935     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
936     with</p>
937
938     <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
939   AllowOverride None
940 &lt;/Directory&gt;
941
942 &lt;Directory "/home"&gt;
943   AllowOverride FileInfo
944 &lt;/Directory&gt;</pre>
945
946
947     <p>for access to the document <code>/home/web/dir/doc.html</code>
948     the steps are:</p>
949
950     <ul>
951       <li>Apply directive <code>AllowOverride None</code>
952       (disabling <code>.htaccess</code> files).</li>
953
954       <li>Apply directive <code>AllowOverride FileInfo</code> (for
955       directory <code>/home</code>).</li>
956
957       <li>Apply any <code>FileInfo</code> directives in
958       <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
959       <code>/home/web/dir/.htaccess</code> in that order.</li>
960     </ul>
961
962     <p>Regular expressions are not considered until after all of the
963     normal sections have been applied. Then all of the regular
964     expressions are tested in the order they appeared in the
965     configuration file. For example, with</p>
966
967     <pre class="prettyprint lang-config">&lt;Directory ~ "abc$"&gt;
968   # ... directives here ...
969 &lt;/Directory&gt;</pre>
970
971
972     <p>the regular expression section won't be considered until after
973     all normal <code class="directive">&lt;Directory&gt;</code>s and
974     <code>.htaccess</code> files have been applied. Then the regular
975     expression will match on <code>/home/abc/public_html/abc</code> and
976     the corresponding <code class="directive">&lt;Directory&gt;</code> will
977     be applied.</p>
978
979    <p><strong>Note that the default access for
980     <code>&lt;Directory "/"&gt;</code> is to permit all access.
981     This means that Apache httpd will serve any file mapped from an URL. It is
982     recommended that you change this with a block such
983     as</strong></p>
984
985     <pre class="prettyprint lang-config">&lt;Directory "/"&gt;
986   Require all denied
987 &lt;/Directory&gt;</pre>
988
989
990     <p><strong>and then override this for directories you
991     <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
992     details.</strong></p>
993
994     <p>The directory sections occur in the <code>httpd.conf</code> file.
995     <code class="directive">&lt;Directory&gt;</code> directives
996     cannot nest, and cannot appear in a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section.</p>
997
998 <h3>See also</h3>
999 <ul>
1000 <li><a href="../sections.html">How &lt;Directory&gt;,
1001     &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
1002     explanation of how these different sections are combined when a
1003     request is received</li>
1004 </ul>
1005 </div>
1006 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1007 <div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
1008 <table class="directive">
1009 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
1010 the contents of file-system directories matching a regular expression.</td></tr>
1011 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
1012 ... &lt;/DirectoryMatch&gt;</code></td></tr>
1013 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1014 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1015 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1016 </table>
1017     <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
1018     <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
1019     of directives which will apply only to the named directory (and the files within),
1020     the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>.
1021     However, it takes as an argument a
1022     <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>.  For example:</p>
1023
1024     <pre class="prettyprint lang-config">&lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}/"&gt;
1025     # ...
1026 &lt;/DirectoryMatch&gt;</pre>
1027
1028
1029     <p>matches directories in <code>/www/</code> (or any subdirectory thereof)
1030     that consist of three numbers.</p>
1031
1032    <div class="note"><h3>Compatability</h3>
1033       Prior to 2.3.9, this directive implicitly applied to sub-directories
1034       (like <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>) and
1035       could not match the end of line symbol ($).  In 2.3.9 and later,
1036       only directories that match the expression are affected by the enclosed
1037       directives.
1038     </div>
1039
1040     <div class="note"><h3>Trailing Slash</h3>
1041       This directive applies to requests for directories that may or may
1042       not end in a trailing slash, so expressions that are anchored to the
1043       end of line ($) must be written with care.
1044     </div>
1045
1046     <p>From 2.4.8 onwards, named groups and backreferences are captured and
1047     written to the environment with the corresponding name prefixed with
1048     "MATCH_" and in upper case. This allows elements of paths to be referenced
1049     from within <a href="../expr.html">expressions</a> and modules like
1050     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
1051     (unnamed) backreferences are ignored. Use named groups instead.</p>
1052
1053     <pre class="prettyprint lang-config">&lt;DirectoryMatch "^/var/www/combined/(?&lt;sitename&gt;[^/]+)"&gt;
1054     Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
1055 &lt;/DirectoryMatch&gt;</pre>
1056
1057
1058 <h3>See also</h3>
1059 <ul>
1060 <li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
1061 a description of how regular expressions are mixed in with normal
1062 <code class="directive">&lt;Directory&gt;</code>s</li>
1063 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
1064 &lt;Files&gt; sections work</a> for an explanation of how these different
1065 sections are combined when a request is received</li>
1066 </ul>
1067 </div>
1068 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1069 <div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
1070 <table class="directive">
1071 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
1072 from the web</td></tr>
1073 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
1074 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot "/usr/local/apache/htdocs"</code></td></tr>
1075 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1076 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1077 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1078 </table>
1079     <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
1080     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
1081     path from the requested URL to the document root to make the
1082     path to the document. Example:</p>
1083
1084     <pre class="prettyprint lang-config">DocumentRoot "/usr/web"</pre>
1085
1086
1087     <p>then an access to
1088     <code>http://my.example.com/index.html</code> refers to
1089     <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
1090     not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
1091
1092     <p>The <code class="directive">DocumentRoot</code> should be specified without
1093     a trailing slash.</p>
1094
1095 <h3>See also</h3>
1096 <ul>
1097 <li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem
1098 Locations</a></li>
1099 </ul>
1100 </div>
1101 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1102 <div class="directive-section"><h2><a name="Else" id="Else">&lt;Else&gt;</a> <a name="else" id="else">Directive</a></h2>
1103 <table class="directive">
1104 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if the condition of a
1105 previous <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
1106 <code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code> section is not
1107 satisfied by a request at runtime</td></tr>
1108 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Else&gt; ... &lt;/Else&gt;</code></td></tr>
1109 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1110 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1111 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1112 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1113 </table>
1114     <p>The <code class="directive">&lt;Else&gt;</code> applies the enclosed
1115     directives if and only if the most recent
1116     <code class="directive">&lt;If&gt;</code> or
1117     <code class="directive">&lt;ElseIf&gt;</code> section
1118     in the same scope has not been applied.
1119     For example: In </p>
1120
1121     <pre class="prettyprint lang-config">&lt;If "-z req('Host')"&gt;
1122   # ...
1123 &lt;/If&gt;
1124 &lt;Else&gt;
1125   # ...
1126 &lt;/Else&gt;</pre>
1127
1128
1129     <p> The <code class="directive">&lt;If&gt;</code> would match HTTP/1.0
1130         requests without a <var>Host:</var> header and the
1131         <code class="directive">&lt;Else&gt;</code> would match requests
1132         with a <var>Host:</var> header.</p>
1133
1134
1135 <h3>See also</h3>
1136 <ul>
1137 <li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
1138 <li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
1139 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
1140     &lt;Files&gt; sections work</a> for an explanation of how these
1141     different sections are combined when a request is received.
1142     <code class="directive">&lt;If&gt;</code>,
1143     <code class="directive">&lt;ElseIf&gt;</code>, and
1144     <code class="directive">&lt;Else&gt;</code> are applied last.</li>
1145 </ul>
1146 </div>
1147 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1148 <div class="directive-section"><h2><a name="ElseIf" id="ElseIf">&lt;ElseIf&gt;</a> <a name="elseif" id="elseif">Directive</a></h2>
1149 <table class="directive">
1150 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is satisfied
1151 by a request at runtime while the condition of a previous
1152 <code class="directive"><a href="#if">&lt;If&gt;</a></code> or
1153 <code class="directive">&lt;ElseIf&gt;</code> section is not
1154 satisfied</td></tr>
1155 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;ElseIf <var>expression</var>&gt; ... &lt;/ElseIf&gt;</code></td></tr>
1156 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1157 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1158 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1159 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1160 </table>
1161     <p>The <code class="directive">&lt;ElseIf&gt;</code> applies the enclosed
1162     directives if and only if both the given condition evaluates to true and
1163     the most recent <code class="directive">&lt;If&gt;</code> or
1164     <code class="directive">&lt;ElseIf&gt;</code> section in the same scope has
1165     not been applied.  For example: In </p>
1166
1167     <pre class="prettyprint lang-config">&lt;If "-R '10.1.0.0/16'"&gt;
1168   #...
1169 &lt;/If&gt;
1170 &lt;ElseIf "-R '10.0.0.0/8'"&gt;
1171   #...
1172 &lt;/ElseIf&gt;
1173 &lt;Else&gt;
1174   #...
1175 &lt;/Else&gt;</pre>
1176
1177
1178     <p>The <code class="directive">&lt;ElseIf&gt;</code> would match if
1179     the remote address of a request belongs to the subnet 10.0.0.0/8 but
1180     not to the subnet 10.1.0.0/16.</p>
1181
1182
1183 <h3>See also</h3>
1184 <ul>
1185 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
1186 for a complete reference and more examples.</li>
1187 <li><code class="directive"><a href="#if">&lt;If&gt;</a></code></li>
1188 <li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
1189 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
1190     &lt;Files&gt; sections work</a> for an explanation of how these
1191     different sections are combined when a request is received.
1192     <code class="directive">&lt;If&gt;</code>,
1193     <code class="directive">&lt;ElseIf&gt;</code>, and
1194     <code class="directive">&lt;Else&gt;</code> are applied last.</li>
1195 </ul>
1196 </div>
1197 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1198 <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
1199 <table class="directive">
1200 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
1201 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
1202 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
1203 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1204 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1205 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1206 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1207 </table>
1208     <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use
1209     memory-mapping if it needs to read the contents of a file during
1210     delivery.  By default, when the handling of a request requires
1211     access to the data within a file -- for example, when delivering a
1212     server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache httpd
1213     memory-maps the file if the OS supports it.</p>
1214
1215     <p>This memory-mapping sometimes yields a performance improvement.
1216     But in some environments, it is better to disable the memory-mapping
1217     to prevent operational problems:</p>
1218
1219     <ul>
1220     <li>On some multiprocessor systems, memory-mapping can reduce the
1221     performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li>
1222     <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code>
1223       has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to
1224       crash with a segmentation fault.
1225     </li>
1226     </ul>
1227
1228     <p>For server configurations that are vulnerable to these problems,
1229     you should disable memory-mapping of delivered files by specifying:</p>
1230
1231     <pre class="prettyprint lang-config">EnableMMAP Off</pre>
1232
1233
1234     <p>For NFS mounted files, this feature may be disabled explicitly for
1235     the offending files by specifying:</p>
1236
1237     <pre class="prettyprint lang-config">&lt;Directory "/path-to-nfs-files"&gt;
1238   EnableMMAP Off
1239 &lt;/Directory&gt;</pre>
1240
1241
1242 </div>
1243 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1244 <div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
1245 <table class="directive">
1246 <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>
1247 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
1248 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile Off</code></td></tr>
1249 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1250 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1251 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1252 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1253 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Default changed to Off in
1254 version 2.3.9.</td></tr>
1255 </table>
1256     <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the
1257     sendfile support from the kernel to transmit file contents to the client.
1258     By default, when the handling of a request requires no access
1259     to the data within a file -- for example, when delivering a
1260     static file -- Apache httpd uses sendfile to deliver the file contents
1261     without ever reading the file if the OS supports it.</p>
1262
1263     <p>This sendfile mechanism avoids separate read and send operations,
1264     and buffer allocations. But on some platforms or within some
1265     filesystems, it is better to disable this feature to avoid
1266     operational problems:</p>
1267
1268     <ul>
1269     <li>Some platforms may have broken sendfile support that the build
1270     system did not detect, especially if the binaries were built on
1271     another box and moved to such a machine with broken sendfile
1272     support.</li>
1273     <li>On Linux the use of sendfile triggers TCP-checksum
1274     offloading bugs on certain networking cards when using IPv6.</li>
1275     <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle
1276     files over 2GB in size.</li>
1277     <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS, SMB, CIFS, FUSE),
1278     the kernel may be unable to serve the network file through
1279     its own cache.</li>
1280     </ul>
1281
1282     <p>For server configurations that are not vulnerable to these problems,
1283     you may enable this feature by specifying:</p>
1284
1285     <pre class="prettyprint lang-config">EnableSendfile On</pre>
1286
1287
1288     <p>For network mounted files, this feature may be disabled explicitly
1289     for the offending files by specifying:</p>
1290
1291     <pre class="prettyprint lang-config">&lt;Directory "/path-to-nfs-files"&gt;
1292   EnableSendfile Off
1293 &lt;/Directory&gt;</pre>
1294
1295     <p>Please note that the per-directory and .htaccess configuration
1296        of <code class="directive">EnableSendfile</code> is not supported by
1297        <code class="module"><a href="../mod/mod_cache_disk.html">mod_cache_disk</a></code>.
1298        Only global definition of <code class="directive">EnableSendfile</code>
1299        is taken into account by the module.
1300     </p>
1301
1302 </div>
1303 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1304 <div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">Directive</a></h2>
1305 <table class="directive">
1306 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
1307 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Error <var>message</var></code></td></tr>
1308 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1309 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1310 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1311 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.3.9 and later</td></tr>
1312 </table>
1313     <p>If an error can be detected within the configuration, this
1314     directive can be used to generate a custom error message, and halt
1315     configuration parsing.  The typical use is for reporting required
1316     modules which are missing from the configuration.</p>
1317
1318     <pre class="prettyprint lang-config"># Example
1319 # ensure that mod_include is loaded
1320 &lt;IfModule !include_module&gt;
1321   Error "mod_include is required by mod_foo.  Load it with LoadModule."
1322 &lt;/IfModule&gt;
1323
1324 # ensure that exactly one of SSL,NOSSL is defined
1325 &lt;IfDefine SSL&gt;
1326 &lt;IfDefine NOSSL&gt;
1327   Error "Both SSL and NOSSL are defined.  Define only one of them."
1328 &lt;/IfDefine&gt;
1329 &lt;/IfDefine&gt;
1330 &lt;IfDefine !SSL&gt;
1331 &lt;IfDefine !NOSSL&gt;
1332   Error "Either SSL or NOSSL must be defined."
1333 &lt;/IfDefine&gt;
1334 &lt;/IfDefine&gt;</pre>
1335
1336
1337
1338 </div>
1339 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1340 <div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
1341 <table class="directive">
1342 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
1343 in case of an error</td></tr>
1344 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
1345 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1346 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1347 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1348 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1349 </table>
1350     <p>In the event of a problem or error, Apache httpd can be configured
1351     to do one of four things,</p>
1352
1353     <ol>
1354       <li>output a simple hardcoded error message</li>
1355
1356       <li>output a customized message</li>
1357
1358       <li>internally redirect to a local <var>URL-path</var> to handle the
1359       problem/error</li>
1360
1361       <li>redirect to an external <var>URL</var> to handle the
1362       problem/error</li>
1363     </ol>
1364
1365     <p>The first option is the default, while options 2-4 are
1366     configured using the <code class="directive">ErrorDocument</code>
1367     directive, which is followed by the HTTP response code and a URL
1368     or a message. Apache httpd will sometimes offer additional information
1369     regarding the problem/error.</p>
1370
1371     <p>From 2.4.13, <a href="../expr.html">expression syntax</a> can be
1372     used inside the directive to produce dynamic strings and URLs.</p>
1373
1374     <p>URLs can begin with a slash (/) for local web-paths (relative
1375     to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
1376     full URL which the client can resolve. Alternatively, a message
1377     can be provided to be displayed by the browser. Note that deciding
1378     whether the parameter is an URL, a path or a message is performed
1379     before any expression is parsed. Examples:</p>
1380
1381     <pre class="prettyprint lang-config">ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi
1382 ErrorDocument 404 /errors/bad_urls.php
1383 ErrorDocument 401 /subscription_info.html
1384 ErrorDocument 403 "Sorry, can't allow you access today"
1385 ErrorDocument 403 Forbidden!
1386 ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}</pre>
1387
1388
1389     <p>Additionally, the special value <code>default</code> can be used
1390     to specify Apache httpd's simple hardcoded message.  While not required
1391     under normal circumstances, <code>default</code> will restore
1392     Apache httpd's simple hardcoded message for configurations that would
1393     otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
1394
1395     <pre class="prettyprint lang-config">ErrorDocument 404 /cgi-bin/bad_urls.pl
1396
1397 &lt;Directory "/web/docs"&gt;
1398   ErrorDocument 404 default
1399 &lt;/Directory&gt;</pre>
1400
1401
1402     <p>Note that when you specify an <code class="directive">ErrorDocument</code>
1403     that points to a remote URL (ie. anything with a method such as
1404     <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
1405     client to tell it where to find the document, even if the
1406     document ends up being on the same server. This has several
1407     implications, the most important being that the client will not
1408     receive the original error status code, but instead will
1409     receive a redirect status code. This in turn can confuse web
1410     robots and other clients which try to determine if a URL is
1411     valid using the status code. In addition, if you use a remote
1412     URL in an <code>ErrorDocument 401</code>, the client will not
1413     know to prompt the user for a password since it will not
1414     receive the 401 status code. Therefore, <strong>if you use an
1415     <code>ErrorDocument 401</code> directive, then it must refer to a local
1416     document.</strong></p>
1417
1418     <p>Microsoft Internet Explorer (MSIE) will by default ignore
1419     server-generated error messages when they are "too small" and substitute
1420     its own "friendly" error messages. The size threshold varies depending on
1421     the type of error, but in general, if you make your error document
1422     greater than 512 bytes, then MSIE will show the server-generated
1423     error rather than masking it.  More information is available in
1424     Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
1425
1426     <p>Although most error messages can be overridden, there are certain
1427     circumstances where the internal messages are used regardless of the
1428     setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>.  In
1429     particular, if a malformed request is detected, normal request processing
1430     will be immediately halted and the internal error message returned.
1431     This is necessary to guard against security problems caused by
1432     bad requests.</p>
1433
1434     <p>If you are using mod_proxy, you may wish to enable
1435     <code class="directive"><a href="../mod/mod_proxy.html#proxyerroroverride">ProxyErrorOverride</a></code> so that you can provide
1436     custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
1437     Apache httpd will not generate custom error documents for proxied content.</p>
1438
1439 <h3>See also</h3>
1440 <ul>
1441 <li><a href="../custom-error.html">documentation of
1442     customizable responses</a></li>
1443 </ul>
1444 </div>
1445 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1446 <div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
1447 <table class="directive">
1448 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
1449 <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>
1450 <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>
1451 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1452 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1453 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1454 </table>
1455     <p>The <code class="directive">ErrorLog</code> directive sets the name of
1456     the file to which the server will log any errors it encounters. If
1457     the <var>file-path</var> is not absolute then it is assumed to be
1458     relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
1459
1460     <pre class="prettyprint lang-config">ErrorLog "/var/log/httpd/error_log"</pre>
1461
1462
1463     <p>If the <var>file-path</var>
1464     begins with a pipe character "<code>|</code>" then it is assumed to be a
1465     command to spawn to handle the error log.</p>
1466
1467     <pre class="prettyprint lang-config">ErrorLog "|/usr/local/bin/httpd_errors"</pre>
1468
1469
1470     <p>See the notes on <a href="../logs.html#piped">piped logs</a> for
1471     more information.</p>
1472
1473     <p>Using <code>syslog</code> instead of a filename enables logging
1474     via syslogd(8) if the system supports it and if <code class="module"><a href="../mod/mod_syslog.html">mod_syslog</a></code>
1475     is loaded. The default is to use syslog facility <code>local7</code>,
1476     but you can override this by using the <code>syslog:<var>facility</var></code>
1477     syntax where <var>facility</var> can be one of the names usually documented in
1478     syslog(1).  The facility is effectively global, and if it is changed
1479     in individual virtual hosts, the final facility specified affects the
1480     entire server.</p>
1481
1482     <pre class="prettyprint lang-config">ErrorLog syslog:user</pre>
1483
1484
1485     <p>Additional modules can provide their own ErrorLog providers. The syntax
1486     is similar to the <code>syslog</code> example above.</p>
1487
1488     <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
1489     document for details on why your security could be compromised
1490     if the directory where log files are stored is writable by
1491     anyone other than the user that starts the server.</p>
1492     <div class="warning"><h3>Note</h3>
1493       <p>When entering a file path on non-Unix platforms, care should be taken
1494       to make sure that only forward slashes are used even though the platform
1495       may allow the use of back slashes. In general it is a good idea to always
1496       use forward slashes throughout the configuration files.</p>
1497     </div>
1498
1499 <h3>See also</h3>
1500 <ul>
1501 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1502 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1503 </ul>
1504 </div>
1505 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1506 <div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">Directive</a></h2>
1507 <table class="directive">
1508 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Format specification for error log entries</td></tr>
1509 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr>
1510 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1511 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1512 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1513 </table>
1514     <p><code class="directive">ErrorLogFormat</code> allows to specify what
1515     supplementary information is logged in the error log in addition to the
1516     actual log message.</p>
1517
1518     <pre class="prettyprint lang-config">#Simple example
1519 ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"</pre>
1520
1521
1522     <p>Specifying <code>connection</code> or <code>request</code> as first
1523     parameter allows to specify additional formats, causing additional
1524     information to be logged when the first message is logged for a specific
1525     connection or request, respectively. This additional information is only
1526     logged once per connection/request. If a connection or request is processed
1527     without causing any log message, the additional information is not logged
1528     either.</p>
1529
1530     <p>It can happen that some format string items do not produce output.  For
1531     example, the Referer header is only present if the log message is
1532     associated to a request and the log message happens at a time when the
1533     Referer header has already been read from the client.  If no output is
1534     produced, the default behavior is to delete everything from the preceding
1535     space character to the next space character.  This means the log line is
1536     implicitly divided into fields on non-whitespace to whitespace transitions.
1537     If a format string item does not produce output, the whole field is
1538     omitted.  For example, if the remote address <code>%a</code> in the log
1539     format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
1540     brackets are not logged either.  Space characters can be escaped with a
1541     backslash to prevent them from delimiting a field.  The combination '%&nbsp;'
1542     (percent space) is a zero-width field delimiter that does not produce any
1543     output.</p>
1544
1545     <p>The above behavior can be changed by adding modifiers to the format
1546     string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
1547     respective item does not produce any output. In once-per-connection/request
1548     formats, it is also possible to use the <code>+</code> (plus) modifier. If an
1549     item with the plus modifier does not produce any output, the whole line is
1550     omitted.</p>
1551
1552     <p>A number as modifier can be used to assign a log severity level to a
1553     format item. The item will only be logged if the severity of the log
1554     message is not higher than the specified log severity level. The number can
1555     range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
1556
1557     <p>For example, here's what would happen if you added modifiers to
1558     the <code>%{Referer}i</code> token, which logs the
1559     <code>Referer</code> request header.</p>
1560
1561     <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr>
1562 <tr>
1563     <td><code>%-{Referer}i</code></td>
1564     <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
1565     </tr>
1566 <tr class="odd">
1567     <td><code>%+{Referer}i</code></td>
1568     <td>Omits the entire line if <code>Referer</code> is not set.</td>
1569     </tr>
1570 <tr>
1571     <td><code>%4{Referer}i</code></td>
1572     <td>Logs the <code>Referer</code> only if the log message severity
1573     is higher than 4.</td>
1574     </tr>
1575 </table>
1576
1577     <p>Some format string items accept additional parameters in braces.</p>
1578
1579     <table class="bordered"><tr class="header"><th>Format&nbsp;String</th> <th>Description</th></tr>
1580 <tr><td><code>%%</code></td>
1581         <td>The percent sign</td></tr>
1582 <tr class="odd"><td><code>%a</code></td>
1583         <td>Client IP address and port of the request</td></tr>
1584 <tr><td><code>%{c}a</code></td>
1585         <td>Underlying peer IP address and port of the connection (see the
1586             <code class="module"><a href="../mod/mod_remoteip.html">mod_remoteip</a></code> module)</td></tr>
1587 <tr class="odd"><td><code>%A</code></td>
1588         <td>Local IP-address and port</td></tr>
1589 <tr><td><code>%{<em>name</em>}e</code></td>
1590         <td>Request environment variable <em>name</em></td></tr>
1591 <tr class="odd"><td><code>%E</code></td>
1592         <td>APR/OS error status code and string</td></tr>
1593 <tr><td><code>%F</code></td>
1594         <td>Source file name and line number of the log call</td></tr>
1595 <tr class="odd"><td><code>%{<em>name</em>}i</code></td>
1596         <td>Request header <em>name</em></td></tr>
1597 <tr><td><code>%k</code></td>
1598         <td>Number of keep-alive requests on this connection</td></tr>
1599 <tr class="odd"><td><code>%l</code></td>
1600         <td>Loglevel of the message</td></tr>
1601 <tr><td><code>%L</code></td>
1602         <td>Log ID of the request</td></tr>
1603 <tr class="odd"><td><code>%{c}L</code></td>
1604         <td>Log ID of the connection</td></tr>
1605 <tr><td><code>%{C}L</code></td>
1606         <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
1607 <tr class="odd"><td><code>%m</code></td>
1608         <td>Name of the module logging the message</td></tr>
1609 <tr><td><code>%M</code></td>
1610         <td>The actual log message</td></tr>
1611 <tr class="odd"><td><code>%{<em>name</em>}n</code></td>
1612         <td>Request note <em>name</em></td></tr>
1613 <tr><td><code>%P</code></td>
1614         <td>Process ID of current process</td></tr>
1615 <tr class="odd"><td><code>%T</code></td>
1616         <td>Thread ID of current thread</td></tr>
1617 <tr><td><code>%{g}T</code></td>
1618         <td>System unique thread ID of current thread (the same ID as
1619             displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
1620 <tr class="odd"><td><code>%t</code></td>
1621         <td>The current time</td></tr>
1622 <tr><td><code>%{u}t</code></td>
1623         <td>The current time including micro-seconds</td></tr>
1624 <tr class="odd"><td><code>%{cu}t</code></td>
1625         <td>The current time in compact ISO 8601 format, including
1626             micro-seconds</td></tr>
1627 <tr><td><code>%v</code></td>
1628         <td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
1629             of the current server.</td></tr>
1630 <tr class="odd"><td><code>%V</code></td>
1631         <td>The server name of the server serving the request according to the
1632             <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
1633             setting.</td></tr>
1634 <tr><td><code>\&nbsp;</code> (backslash space)</td>
1635         <td>Non-field delimiting space</td></tr>
1636 <tr class="odd"><td><code>%&nbsp;</code> (percent space)</td>
1637         <td>Field delimiter (no output)</td></tr>
1638 </table>
1639
1640     <p>The log ID format <code>%L</code> produces a unique id for a connection
1641     or request. This can be used to correlate which log lines belong to the
1642     same connection or request, which request happens on which connection.
1643     A <code>%L</code> format string is also available in
1644     <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> to allow to correlate access log entries
1645     with error log lines. If <code class="module"><a href="../mod/mod_unique_id.html">mod_unique_id</a></code> is loaded, its
1646     unique id will be used as log ID for requests.</p>
1647
1648     <pre class="prettyprint lang-config">#Example (default format for threaded MPMs)
1649 ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre>
1650
1651
1652     <p>This would result in error messages such as:</p>
1653
1654     <div class="example"><p><code>
1655     [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
1656     </code></p></div>
1657
1658     <p>Notice that, as discussed above, some fields are omitted
1659     entirely because they are not defined.</p>
1660
1661     <pre class="prettyprint lang-config">#Example (similar to the 2.2.x format)
1662 ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"</pre>
1663
1664
1665     <pre class="prettyprint lang-config">#Advanced example with request/connection log IDs
1666 ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
1667 ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
1668 ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
1669 ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
1670 ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"</pre>
1671
1672
1673
1674 <h3>See also</h3>
1675 <ul>
1676 <li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
1677 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1678 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
1679 </ul>
1680 </div>
1681 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1682 <div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">Directive</a></h2>
1683 <table class="directive">
1684 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Keep track of extended status information for each
1685 request</td></tr>
1686 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
1687 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
1688 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1689 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1690 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1691 </table>
1692     <p>This option tracks additional data per worker about the
1693     currently executing request and creates a utilization summary.
1694     You can see these variables during runtime by configuring
1695     <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>.  Note that other modules may
1696     rely on this scoreboard.</p>
1697
1698     <p>This setting applies to the entire server and cannot be
1699     enabled or disabled on a virtualhost-by-virtualhost basis.
1700     The collection of extended status information can slow down
1701     the server.  Also note that this setting cannot be changed
1702     during a graceful restart.</p>
1703
1704     <div class="note">
1705     <p>Note that loading <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> will change
1706     the default behavior to ExtendedStatus On, while other
1707     third party modules may do the same.  Such modules rely on
1708     collecting detailed information about the state of all workers.
1709     The default is changed by <code class="module"><a href="../mod/mod_status.html">mod_status</a></code> beginning
1710     with version 2.3.6. The previous default was always Off.</p>
1711     </div>
1712
1713
1714 </div>
1715 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1716 <div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
1717 <table class="directive">
1718 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
1719 HTTP response header for static files</td></tr>
1720 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
1721 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag MTime Size</code></td></tr>
1722 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1723 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1724 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1725 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1726 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The default used to be "INode&nbsp;MTime&nbsp;Size" in 2.3.14 and
1727 earlier.</td></tr>
1728 </table>
1729     <p>
1730     The <code class="directive">FileETag</code> directive configures the file
1731     attributes that are used to create the <code>ETag</code> (entity
1732     tag) response header field when the document is based on a static file.
1733     (The <code>ETag</code> value is used in cache management to save
1734     network bandwidth.) The
1735     <code class="directive">FileETag</code> directive allows you to choose
1736     which of these -- if any -- should be used. The recognized keywords are:
1737     </p>
1738
1739     <dl>
1740      <dt><strong>INode</strong></dt>
1741      <dd>The file's i-node number will be included in the calculation</dd>
1742      <dt><strong>MTime</strong></dt>
1743      <dd>The date and time the file was last modified will be included</dd>
1744      <dt><strong>Size</strong></dt>
1745      <dd>The number of bytes in the file will be included</dd>
1746      <dt><strong>All</strong></dt>
1747      <dd>All available fields will be used. This is equivalent to:
1748          <pre class="prettyprint lang-config">FileETag INode MTime Size</pre>
1749 </dd>
1750      <dt><strong>None</strong></dt>
1751      <dd>If a document is file-based, no <code>ETag</code> field will be
1752        included in the response</dd>
1753     </dl>
1754
1755     <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
1756     keywords may be prefixed with either <code>+</code> or <code>-</code>,
1757     which allow changes to be made to the default setting inherited
1758     from a broader scope. Any keyword appearing without such a prefix
1759     immediately and completely cancels the inherited setting.</p>
1760
1761     <p>If a directory's configuration includes
1762     <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
1763     subdirectory's includes <code>FileETag&nbsp;-INode</code>,
1764     the setting for that subdirectory (which will be inherited by
1765     any sub-subdirectories that don't override it) will be equivalent to
1766     <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
1767     <div class="warning"><h3>Warning</h3>
1768     Do not change the default for directories or locations that have WebDAV
1769     enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
1770     <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>MTime&nbsp;Size</code>
1771     as a fixed format for <code>ETag</code> comparisons on conditional requests.
1772     These conditional requests will break if the <code>ETag</code> format is
1773     changed via <code class="directive">FileETag</code>.
1774     </div>
1775     <div class="note"><h3>Server Side Includes</h3>
1776     An ETag is not generated for responses parsed by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
1777     since the response entity can change without a change of the INode, MTime, or Size
1778     of the static file with embedded SSI directives.
1779     </div>
1780
1781
1782 </div>
1783 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1784 <div class="directive-section"><h2><a name="Files" id="Files">&lt;Files&gt;</a> <a name="files" id="files">Directive</a></h2>
1785 <table class="directive">
1786 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
1787 filenames</td></tr>
1788 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</code></td></tr>
1789 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1790 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1791 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1792 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1793 </table>
1794     <p>The <code class="directive">&lt;Files&gt;</code> directive
1795     limits the scope of the enclosed directives by filename. It is comparable
1796     to the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
1797     and <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
1798     directives. It should be matched with a <code>&lt;/Files&gt;</code>
1799     directive. The directives given within this section will be applied to
1800     any object with a basename (last component of filename) matching the
1801     specified filename. <code class="directive">&lt;Files&gt;</code>
1802     sections are processed in the order they appear in the
1803     configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
1804     <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections. Note
1805     that <code class="directive">&lt;Files&gt;</code> can be nested
1806     inside <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections to restrict the
1807     portion of the filesystem they apply to.</p>
1808
1809     <p>The <var>filename</var> argument should include a filename, or
1810     a wild-card string, where <code>?</code> matches any single character,
1811     and <code>*</code> matches any sequences of characters.</p>
1812     <pre class="prettyprint lang-config">&lt;Files "cat.html"&gt;
1813     # Insert stuff that applies to cat.html here
1814 &lt;/Files&gt;
1815
1816 &lt;Files "?at.*"&gt;
1817     # This would apply to cat.html, bat.html, hat.php and so on.
1818 &lt;/Files&gt;</pre>
1819
1820     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a>
1821     can also be used, with the addition of the
1822     <code>~</code> character. For example:</p>
1823
1824     <pre class="prettyprint lang-config">&lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
1825     #...
1826 &lt;/Files&gt;</pre>
1827
1828
1829     <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
1830     however.</p>
1831
1832     <p>Note that unlike <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections, <code class="directive">&lt;Files&gt;</code> sections can be used inside
1833     <code>.htaccess</code> files. This allows users to control access to
1834     their own files, at a file-by-file level.</p>
1835
1836
1837 <h3>See also</h3>
1838 <ul>
1839 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1840     and &lt;Files&gt; sections work</a> for an explanation of how these
1841     different sections are combined when a request is received</li>
1842 </ul>
1843 </div>
1844 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1845 <div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch">&lt;FilesMatch&gt;</a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
1846 <table class="directive">
1847 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
1848 filenames</td></tr>
1849 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</code></td></tr>
1850 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1851 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1852 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1853 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1854 </table>
1855     <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
1856     limits the scope of the enclosed directives by filename, just as the
1857     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> directive
1858     does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular
1859     expression</a>. For example:</p>
1860
1861     <pre class="prettyprint lang-config">&lt;FilesMatch ".+\.(gif|jpe?g|png)$"&gt;
1862     # ...
1863 &lt;/FilesMatch&gt;</pre>
1864
1865
1866     <p>would match most common Internet graphics formats.</p>
1867
1868     <div class="note">The <code>.+</code> at the start of the regex ensures that
1869     files named <code>.png</code>, or <code>.gif</code>, for example,
1870     are not matched.</div>
1871
1872     <p>From 2.4.8 onwards, named groups and backreferences are captured and
1873     written to the environment with the corresponding name prefixed with
1874     "MATCH_" and in upper case. This allows elements of files to be referenced
1875     from within <a href="../expr.html">expressions</a> and modules like
1876     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
1877     (unnamed) backreferences are ignored. Use named groups instead.</p>
1878
1879     <pre class="prettyprint lang-config">&lt;FilesMatch "^(?&lt;sitename&gt;[^/]+)"&gt;
1880     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
1881 &lt;/FilesMatch&gt;</pre>
1882
1883
1884 <h3>See also</h3>
1885 <ul>
1886 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1887     and &lt;Files&gt; sections work</a> for an explanation of how these
1888     different sections are combined when a request is received</li>
1889 </ul>
1890 </div>
1891 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1892 <div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
1893 <table class="directive">
1894 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
1895 media type in the HTTP Content-Type header field</td></tr>
1896 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
1897 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1898 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1899 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1900 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1901 </table>
1902     <p>When placed into an <code>.htaccess</code> file or a
1903     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, or
1904     <code class="directive"><a href="#location">&lt;Location&gt;</a></code> or
1905     <code class="directive"><a href="#files">&lt;Files&gt;</a></code>
1906     section, this directive forces all matching files to be served
1907     with the content type identification given by
1908     <var>media-type</var>. For example, if you had a directory full of
1909     GIF files, but did not want to label them all with <code>.gif</code>,
1910     you might want to use:</p>
1911
1912     <pre class="prettyprint lang-config">ForceType image/gif</pre>
1913
1914
1915     <p>Note that this directive overrides other indirect media type
1916     associations defined in mime.types or via the
1917     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p>
1918
1919     <p>You can also override more general
1920     <code class="directive">ForceType</code> settings
1921     by using the value of <code>None</code>:</p>
1922
1923     <pre class="prettyprint lang-config"># force all files to be image/gif:
1924 &lt;Location "/images"&gt;
1925   ForceType image/gif
1926 &lt;/Location&gt;
1927
1928 # but normal mime-type associations here:
1929 &lt;Location "/images/mixed"&gt;
1930   ForceType None
1931 &lt;/Location&gt;</pre>
1932
1933
1934     <p>This directive primarily overrides the content types generated for
1935     static files served out of the filesystem.  For resources other than
1936     static files, where the generator of the response typically specifies
1937     a Content-Type, this directive has no effect.</p>
1938
1939
1940     <div class="note"><h3>Note</h3>
1941     <p>If no handler is explicitly set for a request, the specified content
1942     type will also be used as the handler name. </p>
1943    
1944     <p>When explicit directives such as
1945     <code class="directive"><a href="#sethandler">SetHandler</a></code> or
1946     <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> do not apply
1947     to the current request, the internal handler name normally set by those
1948     directives is instead set to the content type specified by this directive.
1949     </p>
1950     <p>
1951     This is a historical behavior that some third-party modules
1952     (such as mod_php) may look for a "synthetic" content type used only to 
1953     signal the module to take responsibility for the matching request. 
1954     </p>
1955
1956     <p>Configurations that rely on such "synthetic" types should be avoided.
1957     Additionally, configurations that restrict access to
1958     <code class="directive"><a href="#sethandler">SetHandler</a></code> or
1959     <code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code> should
1960     restrict access to this directive as well.</p>
1961     </div>
1962
1963
1964 </div>
1965 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1966 <div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">Directive</a></h2>
1967 <table class="directive">
1968 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory to write gmon.out profiling data to.  </td></tr>
1969 <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>
1970 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1971 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1972 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1973 </table>
1974     <p>When the server has been compiled with gprof profiling support,
1975     <code class="directive">GprofDir</code> causes <code>gmon.out</code> files to
1976     be written to the specified directory when the process exits.  If the
1977     argument ends with a percent symbol ('%'), subdirectories are created
1978     for each process id.</p>
1979
1980     <p>This directive currently only works with the <code class="module"><a href="../mod/prefork.html">prefork</a></code>
1981     MPM.</p>
1982
1983 </div>
1984 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1985 <div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
1986 <table class="directive">
1987 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
1988 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
1989 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
1990 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1991 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1992 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1993 </table>
1994     <p>This directive enables DNS lookups so that host names can be
1995     logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
1996     The value <code>Double</code> refers to doing double-reverse
1997     DNS lookup. That is, after a reverse lookup is performed, a forward
1998     lookup is then performed on that result. At least one of the IP
1999     addresses in the forward lookup must match the original
2000     address. (In "tcpwrappers" terminology this is called
2001     <code>PARANOID</code>.)</p>
2002
2003     <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is
2004     used for controlling access by hostname, a double reverse lookup
2005     will be performed.  This is necessary for security. Note that the
2006     result of this double-reverse isn't generally available unless you
2007     set <code>HostnameLookups Double</code>. For example, if only
2008     <code>HostnameLookups On</code> and a request is made to an object
2009     that is protected by hostname restrictions, regardless of whether
2010     the double-reverse fails or not, CGIs will still be passed the
2011     single-reverse result in <code>REMOTE_HOST</code>.</p>
2012
2013     <p>The default is <code>Off</code> in order to save the network
2014     traffic for those sites that don't truly need the reverse
2015     lookups done. It is also better for the end users because they
2016     don't have to suffer the extra latency that a lookup entails.
2017     Heavily loaded sites should leave this directive
2018     <code>Off</code>, since DNS lookups can take considerable
2019     amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by
2020     default to the <code>bin</code> subdirectory of your installation
2021     directory, can be used to look up host names from logged IP addresses
2022     offline.</p>
2023
2024     <p>Finally, if you have <a href="mod_authz_host.html#reqhost">hostname-based Require
2025     directives</a>, a hostname lookup will be performed regardless of
2026     the setting of <code>HostnameLookups</code>.</p>
2027
2028 </div>
2029 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2030 <div class="directive-section"><h2><a name="HTTPProtocolOptions" id="HTTPProtocolOptions">HTTPProtocolOptions</a> <a name="httpprotocoloptions" id="httpprotocoloptions">Directive</a></h2>
2031 <table class="directive">
2032 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr>
2033 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HTTPProtocolOptions [Strict|Unsafe] [Allow0.9|Require1.0] 
2034 [StrictWhitespace|LenientWhitespace] [RegisteredMethods|LenientMethods]</code></td></tr>
2035 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HTTPProtocolOptions Strict Allow0.9 LenientWhitespace 
2036 LenientMethods</code></td></tr>
2037 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2038 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2039 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2040 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.2.32 or 2.4.24 and later</td></tr>
2041 </table>
2042     <p>This directive changes the rules applied to the HTTP Request Line
2043     (<a href="https://tools.ietf.org/html/rfc7230#section-3.1.1">RFC 7230 §3.1.1</a>) and the HTTP Request Header Fields
2044     (<a href="https://tools.ietf.org/html/rfc7230#section-3.2">RFC 7230 §3.2</a>), which are now applied by default or using
2045     the <code>Strict</code> option. Due to legacy modules, applications or
2046     custom user-agents which must be deperecated, an <code>Unsafe</code>
2047     option has been added to revert to the legacy behavior. These rules are
2048     applied prior to request processing, so must be configured at the global
2049     or default (first) matching virtual host section, by interface and not
2050     by name, to be honored.</p>
2051
2052     <p>Prior to the introduction of this directive, the Apache HTTP Server
2053     request message parsers were tolerant of a number of forms of input
2054     which did not conform to the protocol.
2055     <a href="https://tools.ietf.org/html/rfc7230#section-9.4">RFC 7230 §9.4 Request Splitting</a> and
2056     <a href="https://tools.ietf.org/html/rfc7230#section-9.5">§9.5 Response Smuggling</a> call out only two of the potential
2057     risks of accepting non-conformant request messages. As of the introduction
2058     of this directive, all grammer rules of the specification are enforced in
2059     the default <code>Strict</code> operating mode.</p>
2060
2061     <p>Users are strongly cautioned against toggling the <code>Unsafe</code>
2062     mode of operation for these reasons, most especially on outward-facing,
2063     publicly accessible server deployments. Reviewing the messages within the
2064     <code class="directive">ErrorLog</code>, configured with
2065     <code class="directive">LogLevel</code> <code>info</code> level or below,
2066     can help identify such faulty requests along with their origin.
2067     Users should pay particular attention to any 400 responses in the access
2068     log for indiciations that valid requests are unexpectedly rejected.</p>
2069
2070     <p><a href="https://tools.ietf.org/html/rfc2616#section-19.6">RFC 2616 §19.6</a> "Compatibility With Previous Versions" had
2071     encouraged HTTP servers to support legacy HTTP/0.9 requests. RFC 7230
2072     superceeds this with "The expectation to support HTTP/0.9 requests has
2073     been removed" and offers additional comments in 
2074     <a href="https://tools.ietf.org/html/rfc7230#appendix-A">RFC 2616 Appendix A</a>. The <code>Require1.0</code> option allows
2075     the user to remove support of the default <code>Allow0.9</code> option's
2076     behavior.</p>
2077
2078     <p><a href="https://tools.ietf.org/html/rfc7230#section-3.5">RFC 7230 §3.5</a> "Message Parsing Robustness" permits, and
2079     identifies potential risks of parsing messages containing non-space
2080     character whitespace. While the spec defines that exactly one space
2081     seperates the URI from the method, and the protocol from the URI, the
2082     Apache HTTP Server has traditionally been lenient in accepting other
2083     whitespace including one or more horizontal-tab or space characters.
2084     The default <code>LenientWhitespace</code> continues to accept such
2085     requests from non-conforming user-agents, but the administrator may toggle
2086     the <code>StrictWhitespace</code> option to insist on precisely two spaces
2087     in the request line. Other whitespace including vertical-tab, form-feed,
2088     and carriage-return characters are rejected and cannot be supported.</p>
2089
2090     <p><a href="https://tools.ietf.org/html/rfc7231#section-4.1">RFC 7231 §4.1</a> "Request Methods" "Overview" requires that
2091     origin servers shall respond with an error when an unsupported method
2092     is encountered in the request line. This already happens when the
2093     <code>LenientMethods</code> option is used, but administrators may wish
2094     to toggle the <code>RegisteredMethods</code> option and register all
2095     permitted method tokens using the <code class="directive">RegisterHttpMethod</code>
2096     directive, particularly if the <code>Unsafe</code> option has been toggled.
2097     The <code>RegisteredMethods</code> option should <strong>not</strong>
2098     be toggled for forward proxy hosts, as the methods supported by the
2099     origin servers are unknown to the proxy server.</p>
2100
2101 </div>
2102 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2103 <div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directive</a></h2>
2104 <table class="directive">
2105 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
2106 satisfied by a request at runtime</td></tr>
2107 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;If <var>expression</var>&gt; ... &lt;/If&gt;</code></td></tr>
2108 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2109 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2110 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2111 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2112 </table>
2113     <p>The <code class="directive">&lt;If&gt;</code> directive
2114     evaluates an expression at runtime, and applies the enclosed
2115     directives if and only if the expression evaluates to true.
2116     For example:</p>
2117
2118     <pre class="prettyprint lang-config">&lt;If "-z req('Host')"&gt;</pre>
2119
2120
2121     <p>would match HTTP/1.0 requests without a <var>Host:</var> header.
2122     Expressions may contain various shell-like operators for string
2123     comparison (<code>==</code>, <code>!=</code>, <code>&lt;</code>, ...),
2124     integer comparison (<code>-eq</code>, <code>-ne</code>, ...),
2125     and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...).
2126     It is also possible to use regular expressions, </p>
2127
2128     <pre class="prettyprint lang-config">&lt;If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"&gt;</pre>
2129
2130
2131     <p>shell-like pattern matches and many other operations. These operations
2132     can be done on request headers (<code>req</code>), environment variables
2133     (<code>env</code>), and a large number of other properties. The full
2134     documentation is available in <a href="../expr.html">Expressions in
2135     Apache HTTP Server</a>.</p>
2136
2137     <p>Only directives that support the <a href="directive-dict.html#Context">directory context</a> can be used within this configuration section.</p>
2138
2139     <div class="warning">
2140     Certain variables, such as <code>CONTENT_TYPE</code> and other
2141     response headers, are set after &lt;If&gt; conditions have already
2142     been evaluated, and so will not be available to use in this
2143     directive.
2144     </div>
2145
2146
2147 <h3>See also</h3>
2148 <ul>
2149 <li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
2150 for a complete reference and more examples.</li>
2151 <li><code class="directive"><a href="#elseif">&lt;ElseIf&gt;</a></code></li>
2152 <li><code class="directive"><a href="#else">&lt;Else&gt;</a></code></li>
2153 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
2154     &lt;Files&gt; sections work</a> for an explanation of how these
2155     different sections are combined when a request is received.
2156     <code class="directive">&lt;If&gt;</code>,
2157     <code class="directive">&lt;ElseIf&gt;</code>, and
2158     <code class="directive">&lt;Else&gt;</code> are applied last.</li>
2159 </ul>
2160 </div>
2161 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2162 <div class="directive-section"><h2><a name="IfDefine" id="IfDefine">&lt;IfDefine&gt;</a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
2163 <table class="directive">
2164 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
2165 if a test is true at startup</td></tr>
2166 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
2167     &lt;/IfDefine&gt;</code></td></tr>
2168 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2169 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2170 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2171 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2172 </table>
2173     <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
2174     </code> section is used to mark directives that are conditional. The
2175     directives within an <code class="directive">&lt;IfDefine&gt;</code>
2176     section are only processed if the <var>test</var> is true. If <var>
2177     test</var> is false, everything between the start and end markers is
2178     ignored.</p>
2179
2180     <p>The <var>test</var> in the <code class="directive">&lt;IfDefine&gt;</code> section directive can be one of two forms:</p>
2181
2182     <ul>
2183       <li><var>parameter-name</var></li>
2184
2185       <li><code>!</code><var>parameter-name</var></li>
2186     </ul>
2187
2188     <p>In the former case, the directives between the start and end
2189     markers are only processed if the parameter named
2190     <var>parameter-name</var> is defined. The second format reverses
2191     the test, and only processes the directives if
2192     <var>parameter-name</var> is <strong>not</strong> defined.</p>
2193
2194     <p>The <var>parameter-name</var> argument is a define as given on the
2195     <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
2196     </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
2197
2198     <p><code class="directive">&lt;IfDefine&gt;</code> sections are
2199     nest-able, which can be used to implement simple
2200     multiple-parameter tests. Example:</p>
2201
2202     <div class="example"><p><code>httpd -DReverseProxy -DUseCache -DMemCache ...</code></p></div>
2203     <pre class="prettyprint lang-config">&lt;IfDefine ReverseProxy&gt;
2204   LoadModule proxy_module   modules/mod_proxy.so
2205   LoadModule proxy_http_module   modules/mod_proxy_http.so
2206   &lt;IfDefine UseCache&gt;
2207     LoadModule cache_module   modules/mod_cache.so
2208     &lt;IfDefine MemCache&gt;
2209       LoadModule mem_cache_module   modules/mod_mem_cache.so
2210     &lt;/IfDefine&gt;
2211     &lt;IfDefine !MemCache&gt;
2212       LoadModule cache_disk_module   modules/mod_cache_disk.so
2213     &lt;/IfDefine&gt;
2214   &lt;/IfDefine&gt;
2215 &lt;/IfDefine&gt;</pre>
2216
2217
2218 </div>
2219 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2220 <div class="directive-section"><h2><a name="IfModule" id="IfModule">&lt;IfModule&gt;</a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
2221 <table class="directive">
2222 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
2223 presence or absence of a specific module</td></tr>
2224 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
2225     &lt;/IfModule&gt;</code></td></tr>
2226 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2227 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2228 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2229 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2230 </table>
2231     <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
2232     section is used to mark directives that are conditional on the presence of
2233     a specific module. The directives within an <code class="directive">&lt;IfModule&gt;</code> section are only processed if the <var>test</var>
2234     is true. If <var>test</var> is false, everything between the start and
2235     end markers is ignored.</p>
2236
2237     <p>The <var>test</var> in the <code class="directive">&lt;IfModule&gt;</code> section directive can be one of two forms:</p>
2238
2239     <ul>
2240       <li><var>module</var></li>
2241
2242       <li>!<var>module</var></li>
2243     </ul>
2244
2245     <p>In the former case, the directives between the start and end
2246     markers are only processed if the module named <var>module</var>
2247     is included in Apache httpd -- either compiled in or
2248     dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
2249     and only processes the directives if <var>module</var> is
2250     <strong>not</strong> included.</p>
2251
2252     <p>The <var>module</var> argument can be either the module identifier or
2253     the file name of the module, at the time it was compiled.  For example,
2254     <code>rewrite_module</code> is the identifier and
2255     <code>mod_rewrite.c</code> is the file name. If a module consists of
2256     several source files, use the name of the file containing the string
2257     <code>STANDARD20_MODULE_STUFF</code>.</p>
2258
2259     <p><code class="directive">&lt;IfModule&gt;</code> sections are
2260     nest-able, which can be used to implement simple multiple-module
2261     tests.</p>
2262
2263     <div class="note">This section should only be used if you need to have one
2264     configuration file that works whether or not a specific module
2265     is available. In normal operation, directives need not be
2266     placed in <code class="directive">&lt;IfModule&gt;</code>
2267     sections.</div>
2268
2269 </div>
2270 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2271 <div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
2272 <table class="directive">
2273 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
2274 the server configuration files</td></tr>
2275 <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>
2276 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
2277 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2278 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2279 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directory
2280 wildcard matching available in 2.3.6 and later</td></tr>
2281 </table>
2282     <p>This directive allows inclusion of other configuration files
2283     from within the server configuration files.</p>
2284
2285     <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
2286     in the filename or directory parts of the path to include several files
2287     at once, in alphabetical order. In addition, if
2288     <code class="directive">Include</code> points to a directory, rather than a file,
2289     Apache httpd will read all files in that directory and any subdirectory.
2290     However, including entire directories is not recommended, because it is
2291     easy to accidentally leave temporary files in a directory that can cause
2292     <code class="program"><a href="../programs/httpd.html">httpd</a></code> to fail. Instead, we encourage you to use the
2293     wildcard syntax shown below, to include files that match a particular
2294     pattern, such as *.conf, for example.</p>
2295
2296     <p>The <code class="directive"><a href="#include">Include</a></code> directive will
2297     <strong>fail with an error</strong> if a wildcard expression does not
2298     match any file. The <code class="directive"><a href="#includeoptional">IncludeOptional</a></code>
2299     directive can be used if non-matching wildcards should be ignored.</p>
2300
2301     <p>The file path specified may be an absolute path, or may be relative
2302     to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
2303
2304     <p>Examples:</p>
2305
2306     <pre class="prettyprint lang-config">Include /usr/local/apache2/conf/ssl.conf
2307 Include /usr/local/apache2/conf/vhosts/*.conf</pre>
2308
2309
2310     <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
2311
2312     <pre class="prettyprint lang-config">Include conf/ssl.conf
2313 Include conf/vhosts/*.conf</pre>
2314
2315
2316     <p>Wildcards may be included in the directory or file portion of the
2317     path. This example will fail if there is no subdirectory in conf/vhosts
2318     that contains at least one *.conf file:</p>
2319
2320     <pre class="prettyprint lang-config">Include conf/vhosts/*/*.conf</pre>
2321
2322
2323     <p>Alternatively, the following command will just be ignored in case of
2324     missing files or directories:</p>
2325
2326     <pre class="prettyprint lang-config">IncludeOptional conf/vhosts/*/*.conf</pre>
2327
2328
2329
2330 <h3>See also</h3>
2331 <ul>
2332 <li><code class="directive"><a href="#includeoptional">IncludeOptional</a></code></li>
2333 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
2334 </ul>
2335 </div>
2336 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2337 <div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">Directive</a></h2>
2338 <table class="directive">
2339 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
2340 the server configuration files</td></tr>
2341 <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>
2342 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
2343 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2344 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2345 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in 2.3.6 and later</td></tr>
2346 </table>
2347     <p>This directive allows inclusion of other configuration files
2348     from within the server configuration files. It works identically to the
2349     <code class="directive"><a href="#include">Include</a></code> directive, with the
2350     exception that if wildcards do not match any file or directory, the
2351     <code class="directive"><a href="#includeoptional">IncludeOptional</a></code> directive will be
2352     silently ignored instead of causing an error.</p>
2353
2354 <h3>See also</h3>
2355 <ul>
2356 <li><code class="directive"><a href="#include">Include</a></code></li>
2357 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
2358 </ul>
2359 </div>
2360 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2361 <div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
2362 <table class="directive">
2363 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
2364 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
2365 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
2366 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2367 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2368 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2369 </table>
2370     <p>The Keep-Alive extension to HTTP/1.0 and the persistent
2371     connection feature of HTTP/1.1 provide long-lived HTTP sessions
2372     which allow multiple requests to be sent over the same TCP
2373     connection. In some cases this has been shown to result in an
2374     almost 50% speedup in latency times for HTML documents with
2375     many images. To enable Keep-Alive connections, set
2376     <code>KeepAlive On</code>.</p>
2377
2378     <p>For HTTP/1.0 clients, Keep-Alive connections will only be
2379     used if they are specifically requested by a client. In
2380     addition, a Keep-Alive connection with an HTTP/1.0 client can
2381     only be used when the length of the content is known in
2382     advance. This implies that dynamic content such as CGI output,
2383     SSI pages, and server-generated directory listings will
2384     generally not use Keep-Alive connections to HTTP/1.0 clients.
2385     For HTTP/1.1 clients, persistent connections are the default
2386     unless otherwise specified. If the client requests it, chunked
2387     encoding will be used in order to send content of unknown
2388     length over persistent connections.</p>
2389
2390     <p>When a client uses a Keep-Alive connection, it will be counted
2391     as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code> directive, regardless
2392     of how many requests are sent using the connection.</p>
2393
2394 <h3>See also</h3>
2395 <ul>
2396 <li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
2397 </ul>
2398 </div>
2399 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2400 <div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
2401 <table class="directive">
2402 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
2403 requests on a persistent connection</td></tr>
2404 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
2405 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
2406 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2407 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2408 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2409 </table>
2410     <p>The number of seconds Apache httpd will wait for a subsequent
2411     request before closing the connection. By adding a postfix of ms the
2412     timeout can be also set in milliseconds. Once a request has been
2413     received, the timeout value specified by the
2414     <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
2415
2416     <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
2417     may cause performance problems in heavily loaded servers. The
2418     higher the timeout, the more server processes will be kept
2419     occupied waiting on connections with idle clients.</p>
2420
2421     <p>If <code class="directive">KeepAliveTimeout</code> is <strong>not</strong>
2422     set for a name-based virtual host, the value of the first defined
2423     virtual host best matching the local IP and port will be used.</p>
2424
2425 </div>
2426 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2427 <div class="directive-section"><h2><a name="Limit" id="Limit">&lt;Limit&gt;</a> <a name="limit" id="limit">Directive</a></h2>
2428 <table class="directive">
2429 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
2430 methods</td></tr>
2431 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
2432     &lt;/Limit&gt;</code></td></tr>
2433 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
2434 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
2435 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2436 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2437 </table>
2438     <p>Access controls are normally effective for
2439     <strong>all</strong> access methods, and this is the usual
2440     desired behavior. <strong>In the general case, access control
2441     directives should not be placed within a
2442     <code class="directive">&lt;Limit&gt;</code> section.</strong></p>
2443
2444     <p>The purpose of the <code class="directive">&lt;Limit&gt;</code>
2445     directive is to restrict the effect of the access controls to the
2446     nominated HTTP methods. For all other methods, the access
2447     restrictions that are enclosed in the <code class="directive">&lt;Limit&gt;</code> bracket <strong>will have no
2448     effect</strong>. The following example applies the access control
2449     only to the methods <code>POST</code>, <code>PUT</code>, and
2450     <code>DELETE</code>, leaving all other methods unprotected:</p>
2451
2452     <pre class="prettyprint lang-config">&lt;Limit POST PUT DELETE&gt;
2453   Require valid-user
2454 &lt;/Limit&gt;</pre>
2455
2456
2457     <p>The method names listed can be one or more of: <code>GET</code>,
2458     <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
2459     <code>CONNECT</code>, <code>OPTIONS</code>,
2460     <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
2461     <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
2462     <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
2463     case-sensitive.</strong> If <code>GET</code> is used, it will also
2464     restrict <code>HEAD</code> requests. The <code>TRACE</code> method
2465     cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
2466
2467     <div class="warning">A <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section should always be
2468     used in preference to a <code class="directive">&lt;Limit&gt;</code>
2469     section when restricting access, since a <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section provides protection
2470     against arbitrary methods.</div>
2471
2472     <p>The <code class="directive">&lt;Limit&gt;</code> and
2473     <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code>
2474     directives may be nested.  In this case, each successive level of
2475     <code class="directive">&lt;Limit&gt;</code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> directives must
2476     further restrict the set of methods to which access controls apply.</p>
2477
2478     <div class="warning">When using
2479     <code class="directive">&lt;Limit&gt;</code> or
2480     <code class="directive">&lt;LimitExcept&gt;</code> directives with
2481     the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive,
2482     note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>
2483     to succeed authorizes the request, regardless of the presence of other
2484     <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div>
2485
2486     <p>For example, given the following configuration, all users will
2487     be authorized for <code>POST</code> requests, and the
2488     <code>Require group editors</code> directive will be ignored
2489     in all cases:</p>
2490
2491     <pre class="prettyprint lang-config">&lt;LimitExcept GET&gt;
2492   Require valid-user
2493 &lt;/LimitExcept&gt;
2494 &lt;Limit POST&gt;
2495   Require group editors
2496 &lt;/Limit&gt;</pre>
2497
2498
2499 </div>
2500 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2501 <div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept">&lt;LimitExcept&gt;</a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
2502 <table class="directive">
2503 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
2504 except the named ones</td></tr>
2505 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
2506     &lt;/LimitExcept&gt;</code></td></tr>
2507 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
2508 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
2509 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2510 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2511 </table>
2512     <p><code class="directive">&lt;LimitExcept&gt;</code> and
2513     <code>&lt;/LimitExcept&gt;</code> are used to enclose
2514     a group of access control directives which will then apply to any
2515     HTTP access method <strong>not</strong> listed in the arguments;
2516     i.e., it is the opposite of a <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> section and can be used to control
2517     both standard and nonstandard/unrecognized methods. See the
2518     documentation for <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> for more details.</p>
2519
2520     <p>For example:</p>
2521
2522     <pre class="prettyprint lang-config">&lt;LimitExcept POST GET&gt;
2523   Require valid-user
2524 &lt;/LimitExcept&gt;</pre>
2525
2526
2527
2528 </div>
2529 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2530 <div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
2531 <table class="directive">
2532 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
2533 subrequests</td></tr>
2534 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
2535 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
2536 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2537 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2538 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2539 </table>
2540     <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
2541     redirects the original request to a CGI script. A subrequest is Apache httpd's
2542     mechanism to find out what would happen for some URI if it were requested.
2543     For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
2544     files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
2545     directive.</p>
2546
2547     <p><code class="directive">LimitInternalRecursion</code> prevents the server
2548     from crashing when entering an infinite loop of internal redirects or
2549     subrequests. Such loops are usually caused by misconfigurations.</p>
2550
2551     <p>The directive stores two different limits, which are evaluated on
2552     per-request basis. The first <var>number</var> is the maximum number of
2553     internal redirects that may follow each other. The second <var>number</var>
2554     determines how deeply subrequests may be nested. If you specify only one
2555     <var>number</var>, it will be assigned to both limits.</p>
2556
2557     <pre class="prettyprint lang-config">LimitInternalRecursion 5</pre>
2558
2559
2560 </div>
2561 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2562 <div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
2563 <table class="directive">
2564 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
2565 from the client</td></tr>
2566 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
2567 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
2568 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2569 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2570 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2571 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2572 </table>
2573     <p>This directive specifies the number of <var>bytes</var> from 0
2574     (meaning unlimited) to 2147483647 (2GB) that are allowed in a
2575     request body. See the note below for the limited applicability
2576     to proxy requests.</p>
2577
2578     <p>The <code class="directive">LimitRequestBody</code> directive allows
2579     the user to set a limit on the allowed size of an HTTP request
2580     message body within the context in which the directive is given
2581     (server, per-directory, per-file or per-location). If the client
2582     request exceeds that limit, the server will return an error
2583     response instead of servicing the request. The size of a normal
2584     request message body will vary greatly depending on the nature of
2585     the resource and the methods allowed on that resource. CGI scripts
2586     typically use the message body for retrieving form information.
2587     Implementations of the <code>PUT</code> method will require
2588     a value at least as large as any representation that the server
2589     wishes to accept for that resource.</p>
2590
2591     <p>This directive gives the server administrator greater
2592     control over abnormal client request behavior, which may be
2593     useful for avoiding some forms of denial-of-service
2594     attacks.</p>
2595
2596     <p>If, for example, you are permitting file upload to a particular
2597     location and wish to limit the size of the uploaded file to 100K,
2598     you might use the following directive:</p>
2599
2600     <pre class="prettyprint lang-config">LimitRequestBody 102400</pre>
2601
2602
2603     <div class="note"><p>For a full description of how this directive is interpreted by
2604     proxy requests, see the <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> documentation.</p>
2605     </div>
2606
2607
2608 </div>
2609 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2610 <div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
2611 <table class="directive">
2612 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
2613 will be accepted from the client</td></tr>
2614 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
2615 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
2616 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2617 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2618 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2619 </table>
2620     <p><var>Number</var> is an integer from 0 (meaning unlimited) to
2621     32767. The default value is defined by the compile-time
2622     constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
2623     distributed).</p>
2624
2625     <p>The <code class="directive">LimitRequestFields</code> directive allows
2626     the server administrator to modify the limit on the number of
2627     request header fields allowed in an HTTP request. A server needs
2628     this value to be larger than the number of fields that a normal
2629     client request might include. The number of request header fields
2630     used by a client rarely exceeds 20, but this may vary among
2631     different client implementations, often depending upon the extent
2632     to which a user has configured their browser to support detailed
2633     content negotiation. Optional HTTP extensions are often expressed
2634     using request header fields.</p>
2635
2636     <p>This directive gives the server administrator greater
2637     control over abnormal client request behavior, which may be
2638     useful for avoiding some forms of denial-of-service attacks.
2639     The value should be increased if normal clients see an error
2640     response from the server that indicates too many fields were
2641     sent in the request.</p>
2642
2643     <p>For example:</p>
2644
2645     <pre class="prettyprint lang-config">LimitRequestFields 50</pre>
2646
2647
2648      <div class="warning"><h3>Warning</h3>
2649      <p> When name-based virtual hosting is used, the value for this
2650      directive is taken from the default (first-listed) virtual host for the
2651      local IP and port combination.</p>
2652      </div>
2653
2654
2655 </div>
2656 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2657 <div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
2658 <table class="directive">
2659 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
2660 client</td></tr>
2661 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
2662 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
2663 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2664 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2665 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2666 </table>
2667     <p>This directive specifies the number of <var>bytes</var>
2668     that will be allowed in an HTTP request header.</p>
2669
2670     <p>The <code class="directive">LimitRequestFieldSize</code> directive
2671     allows the server administrator to set the limit
2672     on the allowed size of an HTTP request header field. A server
2673     needs this value to be large enough to hold any one header field
2674     from a normal client request. The size of a normal request header
2675     field will vary greatly among different client implementations,
2676     often depending upon the extent to which a user has configured
2677     their browser to support detailed content negotiation. SPNEGO
2678     authentication headers can be up to 12392 bytes.</p>
2679
2680     <p>This directive gives the server administrator greater
2681     control over abnormal client request behavior, which may be
2682     useful for avoiding some forms of denial-of-service attacks.</p>
2683
2684     <p>For example:</p>
2685
2686     <pre class="prettyprint lang-config">LimitRequestFieldSize 4094</pre>
2687
2688
2689     <div class="note">Under normal conditions, the value should not be changed from
2690     the default.</div>
2691
2692     <div class="warning"><h3>Warning</h3>
2693     <p> When name-based virtual hosting is used, the value for this
2694     directive is taken from the default (first-listed) virtual host best
2695     matching the current IP address and port combination.</p>
2696     </div>
2697
2698 </div>
2699 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2700 <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
2701 <table class="directive">
2702 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
2703 from the client</td></tr>
2704 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
2705 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
2706 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2707 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2708 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2709 </table>
2710     <p>This directive sets the number of <var>bytes</var> that will be
2711     allowed on the HTTP request-line.</p>
2712
2713     <p>The <code class="directive">LimitRequestLine</code> directive allows
2714     the server administrator to set the limit on the allowed size
2715     of a client's HTTP request-line. Since the request-line consists of the
2716     HTTP method, URI, and protocol version, the
2717     <code class="directive">LimitRequestLine</code> directive places a
2718     restriction on the length of a request-URI allowed for a request
2719     on the server. A server needs this value to be large enough to
2720     hold any of its resource names, including any information that
2721     might be passed in the query part of a <code>GET</code> request.</p>
2722
2723     <p>This directive gives the server administrator greater
2724     control over abnormal client request behavior, which may be
2725     useful for avoiding some forms of denial-of-service attacks.</p>
2726
2727     <p>For example:</p>
2728
2729     <pre class="prettyprint lang-config">LimitRequestLine 4094</pre>
2730
2731
2732     <div class="note">Under normal conditions, the value should not be changed from
2733     the default.</div>
2734
2735     <div class="warning"><h3>Warning</h3>
2736     <p> When name-based virtual hosting is used, the value for this
2737     directive is taken from the default (first-listed) virtual host best
2738     matching the current IP address and port combination.</p>
2739     </div>
2740
2741
2742 </div>
2743 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2744 <div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
2745 <table class="directive">
2746 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
2747 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
2748 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
2749 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2750 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2751 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2752 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2753 </table>
2754     <p>Limit (in bytes) on maximum size of an XML-based request
2755     body. A value of <code>0</code> will disable any checking.</p>
2756
2757     <p>Example:</p>
2758
2759     <pre class="prettyprint lang-config">LimitXMLRequestBody 0</pre>
2760
2761
2762
2763 </div>
2764 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2765 <div class="directive-section"><h2><a name="Location" id="Location">&lt;Location&gt;</a> <a name="location" id="location">Directive</a></h2>
2766 <table class="directive">
2767 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
2768 URLs</td></tr>
2769 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Location
2770     <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</code></td></tr>
2771 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2772 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2773 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2774 </table>
2775     <p>The <code class="directive">&lt;Location&gt;</code> directive
2776     limits the scope of the enclosed directives by URL. It is similar to the
2777     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
2778     directive, and starts a subsection which is terminated with a
2779     <code>&lt;/Location&gt;</code> directive. <code class="directive">&lt;Location&gt;</code> sections are processed in the
2780     order they appear in the configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
2781     <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.</p>
2782
2783     <p><code class="directive">&lt;Location&gt;</code> sections operate
2784     completely outside the filesystem.  This has several consequences.
2785     Most importantly, <code class="directive">&lt;Location&gt;</code>
2786     directives should not be used to control access to filesystem
2787     locations.  Since several different URLs may map to the same
2788     filesystem location, such access controls may by circumvented.</p>
2789
2790     <p>The enclosed directives will be applied to the request if the path component
2791     of the URL meets <em>any</em> of the following criteria:
2792     </p>
2793     <ul>
2794       <li>The specified location matches exactly the path component of the URL.
2795       </li>
2796       <li>The specified location, which ends in a forward slash, is a prefix
2797       of the path component of the URL (treated as a context root).
2798       </li>
2799       <li>The specified location, with the addition of a trailing slash, is a
2800       prefix of the path component of the URL (also treated as a context root).
2801       </li>
2802     </ul>
2803     <p>
2804     In the example below, where no trailing slash is used, requests to
2805     /private1, /private1/ and /private1/file.txt will have the enclosed
2806     directives applied, but /private1other would not.
2807     </p>
2808     <pre class="prettyprint lang-config">&lt;Location "/private1"&gt;
2809     #  ...
2810 &lt;/Location&gt;</pre>
2811
2812     <p>
2813     In the example below, where a trailing slash is used, requests to
2814     /private2/ and /private2/file.txt will have the enclosed
2815     directives applied, but /private2 and /private2other would not.
2816     </p>
2817     <pre class="prettyprint lang-config">&lt;Location "/private2<em>/</em>"&gt;
2818     # ...
2819 &lt;/Location&gt;</pre>
2820
2821
2822     <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
2823
2824     <p>Use <code class="directive">&lt;Location&gt;</code> to apply
2825     directives to content that lives outside the filesystem.  For
2826     content that lives in the filesystem, use <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> and <code class="directive"><a href="#files">&lt;Files&gt;</a></code>.  An exception is
2827     <code>&lt;Location "/"&gt;</code>, which is an easy way to
2828     apply a configuration to the entire server.</p>
2829     </div>
2830
2831     <p>For all origin (non-proxy) requests, the URL to be matched is a
2832     URL-path of the form <code>/path/</code>.  <em>No scheme, hostname,
2833     port, or query string may be included.</em>  For proxy requests, the
2834     URL to be matched is of the form
2835     <code>scheme://servername/path</code>, and you must include the
2836     prefix.</p>
2837
2838     <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
2839     any single character, and <code>*</code> matches any sequences of
2840     characters. Neither wildcard character matches a / in the URL-path.</p>
2841
2842     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a>
2843     can also be used, with the addition of the <code>~</code>
2844     character. For example:</p>
2845
2846     <pre class="prettyprint lang-config">&lt;Location ~ "/(extra|special)/data"&gt;
2847     #...
2848 &lt;/Location&gt;</pre>
2849
2850
2851     <p>would match URLs that contained the substring <code>/extra/data</code>
2852     or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
2853     identical to the regex version of <code class="directive">&lt;Location&gt;</code>, and is preferred, for the
2854     simple reason that <code>~</code> is hard to distinguish from
2855     <code>-</code> in many fonts.</p>
2856
2857     <p>The <code class="directive">&lt;Location&gt;</code>
2858     functionality is especially useful when combined with the
2859     <code class="directive"><a href="#sethandler">SetHandler</a></code>
2860     directive. For example, to enable status requests but allow them
2861     only from browsers at <code>example.com</code>, you might use:</p>
2862
2863     <pre class="prettyprint lang-config">&lt;Location "/status"&gt;
2864   SetHandler server-status
2865   Require host example.com
2866 &lt;/Location&gt;</pre>
2867
2868
2869     <div class="note"><h3>Note about / (slash)</h3>
2870       <p>The slash character has special meaning depending on where in a
2871       URL it appears. People may be used to its behavior in the filesystem
2872       where multiple adjacent slashes are frequently collapsed to a single
2873       slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
2874       <code>/home/foo</code>). In URL-space this is not necessarily true.
2875       The <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code>
2876       directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
2877       slashes if that is your intention.</p>
2878
2879       <p>For example, <code>&lt;LocationMatch "^/abc"&gt;</code> would match
2880       the request URL <code>/abc</code> but not the request URL <code>
2881       //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
2882       proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
2883       implicitly match multiple slashes with a single slash. For example,
2884       if you specify <code>&lt;Location "/abc/def"&gt;</code> and the
2885       request is to <code>/abc//def</code> then it will match.</p>
2886     </div>
2887
2888 <h3>See also</h3>
2889 <ul>
2890 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2891     and &lt;Files&gt; sections work</a> for an explanation of how these
2892     different sections are combined when a request is received.</li>
2893 <li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
2894 </ul>
2895 </div>
2896 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2897 <div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch">&lt;LocationMatch&gt;</a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
2898 <table class="directive">
2899 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
2900 matching URLs</td></tr>
2901 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LocationMatch
2902     <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
2903 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2904 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2905 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2906 </table>
2907     <p>The <code class="directive">&lt;LocationMatch&gt;</code> directive
2908     limits the scope of the enclosed directives by URL, in an identical manner
2909     to <code class="directive"><a href="#location">&lt;Location&gt;</a></code>. However,
2910     it takes a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
2911     as an argument instead of a simple string. For example:</p>
2912
2913     <pre class="prettyprint lang-config">&lt;LocationMatch "/(extra|special)/data"&gt;
2914     # ...
2915 &lt;/LocationMatch&gt;</pre>
2916
2917
2918     <p>would match URLs that contained the substring <code>/extra/data</code>
2919     or <code>/special/data</code>.</p>
2920
2921     <div class="note"><p>If the intent is that a URL <strong>starts with</strong>
2922     <code>/extra/data</code>, rather than merely
2923     <strong>contains</strong> <code>/extra/data</code>, prefix the
2924     regular expression with a <code>^</code> to require this.</p>
2925
2926     <pre class="prettyprint lang-config">&lt;LocationMatch "^/(extra|special)/data"&gt;</pre>
2927
2928     </div>
2929
2930     <p>From 2.4.8 onwards, named groups and backreferences are captured and
2931     written to the environment with the corresponding name prefixed with
2932     "MATCH_" and in upper case. This allows elements of URLs to be referenced
2933     from within <a href="../expr.html">expressions</a> and modules like
2934     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
2935     (unnamed) backreferences are ignored. Use named groups instead.</p>
2936
2937     <pre class="prettyprint lang-config">&lt;LocationMatch "^/combined/(?&lt;sitename&gt;[^/]+)"&gt;
2938     require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
2939 &lt;/LocationMatch&gt;</pre>
2940
2941
2942 <h3>See also</h3>
2943 <ul>
2944 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2945     and &lt;Files&gt; sections work</a> for an explanation of how these
2946     different sections are combined when a request is received</li>
2947 </ul>
2948 </div>
2949 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2950 <div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
2951 <table class="directive">
2952 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
2953 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel [<var>module</var>:]<var>level</var>
2954     [<var>module</var>:<var>level</var>] ...
2955 </code></td></tr>
2956 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
2957 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
2958 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2959 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2960 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Per-module and per-directory configuration is available in
2961     Apache HTTP Server 2.3.6 and later</td></tr>
2962 </table>
2963     <p><code class="directive">LogLevel</code> adjusts the verbosity of the
2964     messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
2965     <var>level</var>s are available, in order of decreasing
2966     significance:</p>
2967
2968     <table class="bordered">
2969     
2970       <tr>
2971         <th><strong>Level</strong> </th>
2972
2973         <th><strong>Description</strong> </th>
2974
2975         <th><strong>Example</strong> </th>
2976       </tr>
2977
2978       <tr>
2979         <td><code>emerg</code> </td>
2980
2981         <td>Emergencies - system is unusable.</td>
2982
2983         <td>"Child cannot open lock file. Exiting"</td>
2984       </tr>
2985
2986       <tr>
2987         <td><code>alert</code> </td>
2988
2989         <td>Action must be taken immediately.</td>
2990
2991         <td>"getpwuid: couldn't determine user name from uid"</td>
2992       </tr>
2993
2994       <tr>
2995         <td><code>crit</code> </td>
2996
2997         <td>Critical Conditions.</td>
2998
2999         <td>"socket: Failed to get a socket, exiting child"</td>
3000       </tr>
3001
3002       <tr>
3003         <td><code>error</code> </td>
3004
3005         <td>Error conditions.</td>
3006
3007         <td>"Premature end of script headers"</td>
3008       </tr>
3009
3010       <tr>
3011         <td><code>warn</code> </td>
3012
3013         <td>Warning conditions.</td>
3014
3015         <td>"child process 1234 did not exit, sending another
3016         SIGHUP"</td>
3017       </tr>
3018
3019       <tr>
3020         <td><code>notice</code> </td>
3021
3022         <td>Normal but significant condition.</td>
3023
3024         <td>"httpd: caught SIGBUS, attempting to dump core in
3025         ..."</td>
3026       </tr>
3027
3028       <tr>
3029         <td><code>info</code> </td>
3030
3031         <td>Informational.</td>
3032
3033         <td>"Server seems busy, (you may need to increase
3034         StartServers, or Min/MaxSpareServers)..."</td>
3035       </tr>
3036
3037       <tr>
3038         <td><code>debug</code> </td>
3039
3040         <td>Debug-level messages</td>
3041
3042         <td>"Opening config file ..."</td>
3043       </tr>
3044       <tr>
3045         <td><code>trace1</code> </td>
3046
3047         <td>Trace messages</td>
3048
3049         <td>"proxy: FTP: control connection complete"</td>
3050       </tr>
3051       <tr>
3052         <td><code>trace2</code> </td>
3053
3054         <td>Trace messages</td>
3055
3056         <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
3057       </tr>
3058       <tr>
3059         <td><code>trace3</code> </td>
3060
3061         <td>Trace messages</td>
3062
3063         <td>"openssl: Handshake: start"</td>
3064       </tr>
3065       <tr>
3066         <td><code>trace4</code> </td>
3067
3068         <td>Trace messages</td>
3069
3070         <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
3071       </tr>
3072       <tr>
3073         <td><code>trace5</code> </td>
3074
3075         <td>Trace messages</td>
3076
3077         <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
3078       </tr>
3079       <tr>
3080         <td><code>trace6</code> </td>
3081
3082         <td>Trace messages</td>
3083
3084         <td>"cache lookup FAILED, forcing new map lookup"</td>
3085       </tr>
3086       <tr>
3087         <td><code>trace7</code> </td>
3088
3089         <td>Trace messages, dumping large amounts of data</td>
3090
3091         <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
3092       </tr>
3093       <tr>
3094         <td><code>trace8</code> </td>
3095
3096         <td>Trace messages, dumping large amounts of data</td>
3097
3098         <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
3099       </tr>
3100     </table>
3101
3102     <p>When a particular level is specified, messages from all
3103     other levels of higher significance will be reported as well.
3104     <em>E.g.</em>, when <code>LogLevel info</code> is specified,
3105     then messages with log levels of <code>notice</code> and
3106     <code>warn</code> will also be posted.</p>
3107
3108     <p>Using a level of at least <code>crit</code> is
3109     recommended.</p>
3110
3111     <p>For example:</p>
3112
3113     <pre class="prettyprint lang-config">LogLevel notice</pre>
3114
3115
3116     <div class="note"><h3>Note</h3>
3117       <p>When logging to a regular file, messages of the level
3118       <code>notice</code> cannot be suppressed and thus are always
3119       logged. However, this doesn't apply when logging is done
3120       using <code>syslog</code>.</p>
3121     </div>
3122
3123     <p>Specifying a level without a module name will reset the level
3124     for all modules to that level.  Specifying a level with a module
3125     name will set the level for that module only. It is possible to
3126     use the module source file name, the module identifier, or the
3127     module identifier with the trailing <code>_module</code> omitted
3128     as module specification. This means the following three specifications
3129     are equivalent:</p>
3130
3131     <pre class="prettyprint lang-config">LogLevel info ssl:warn
3132 LogLevel info mod_ssl.c:warn
3133 LogLevel info ssl_module:warn</pre>
3134
3135
3136     <p>It is also possible to change the level per directory:</p>
3137
3138     <pre class="prettyprint lang-config">LogLevel info
3139 &lt;Directory "/usr/local/apache/htdocs/app"&gt;
3140   LogLevel debug
3141 &lt;/Directory&gt;</pre>
3142
3143
3144     <div class="note">
3145         Per directory loglevel configuration only affects messages that are
3146         logged after the request has been parsed and that are associated with
3147         the request. Log messages which are associated with the server or
3148         the connection are not affected. The latter can be influenced by the
3149         <code class="directive"><a href="#logleveloverride">LogLevelOverride</a></code> directive,
3150         though.
3151     </div>
3152
3153 <h3>See also</h3>
3154 <ul>
3155 <li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
3156 <li><code class="directive"><a href="#errorlogformat">ErrorLogFormat</a></code></li>
3157 <li><code class="directive"><a href="#logleveloverride">LogLevelOverride</a></code></li>
3158 <li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
3159 </ul>
3160 </div>
3161 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3162 <div class="directive-section"><h2><a name="LogLevelOverride" id="LogLevelOverride">LogLevelOverride</a> <a name="logleveloverride" id="logleveloverride">Directive</a></h2>
3163 <table class="directive">
3164 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Override the verbosity of the ErrorLog for certain clients</td></tr>
3165 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>ipaddress</var>[/<var>prefixlen</var>]
3166     [<var>module</var>:]<var>level</var> [<var>module</var>:<var>level</var>] ...
3167 </code></td></tr>
3168 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>unset</code></td></tr>
3169 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3170 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3171 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3172 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.5.0 and later</td></tr>
3173 </table>
3174     <p><code class="directive">LogLevelOverride</code> adjusts the
3175     <code class="directive"><a href="#loglevel">LogLevel</a></code> for requests coming from
3176     certain client IP addresses.
3177     This allows to enable verbose logging only for certain test clients.
3178     The IP address is checked at a very early state in the connection
3179     processing.  Therefore, <code class="directive">LogLevelOverride</code> allows to
3180     change the log level for things like the SSL handshake which happen before
3181     a <code class="directive"><a href="#loglevel">LogLevel</a></code> directive in an
3182     <code class="directive"><a href="#if">&lt;If&gt;</a></code> container would
3183     be evaluated.</p>
3184
3185     <p><code class="directive">LogLevelOverride</code> accepts either a single
3186     IP-address or a CIDR IP-address/len subnet specification.
3187     For the syntax of the loglevel specification, see the
3188     <code class="directive"><a href="#loglevel">LogLevel</a></code> directive.</p>
3189
3190     <p>For requests that match a <code class="directive">LogLevelOverride</code>
3191     directive, per-directory specifications of
3192     <code class="directive"><a href="#loglevel">LogLevel</a></code> are ignored.</p>
3193
3194     <p>Examples:</p>
3195
3196     <pre class="prettyprint lang-config">        LogLevelOverride 192.0.2.0/24 ssl:trace6
3197         LogLevelOverride 192.0.2.7 ssl:trace8</pre>
3198
3199
3200     <div class="note">
3201         <code class="directive">LogLevelOverride</code> only affects
3202         log messages that are associated with the request or the connection.
3203         Log messages which are associated with the server are not affected.
3204     </div>
3205
3206
3207 <h3>See also</h3>
3208 <ul>
3209 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
3210 </ul>
3211 </div>
3212 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3213 <div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
3214 <table class="directive">
3215 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
3216 connection</td></tr>
3217 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
3218 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
3219 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3220 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3221 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3222 </table>
3223     <p>The <code class="directive">MaxKeepAliveRequests</code> directive
3224     limits the number of requests allowed per connection when
3225     <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
3226     set to <code>0</code>, unlimited requests will be allowed. We
3227     recommend that this setting be kept to a high value for maximum
3228     server performance.</p>
3229
3230     <p>For example:</p>
3231
3232     <pre class="prettyprint lang-config">MaxKeepAliveRequests 500</pre>
3233
3234
3235 </div>
3236 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3237 <div class="directive-section"><h2><a name="MaxRangeOverlaps" id="MaxRangeOverlaps">MaxRangeOverlaps</a> <a name="maxrangeoverlaps" id="maxrangeoverlaps">Directive</a></h2>
3238 <table class="directive">
3239 <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
3240         resource </td></tr>
3241 <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>
3242 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeOverlaps 20</code></td></tr>
3243 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3244 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3245 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3246 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
3247 </table>
3248         <p>The <code class="directive">MaxRangeOverlaps</code> directive
3249             limits the number of overlapping HTTP ranges the server is willing to
3250             return to the client. If more overlapping ranges than permitted are requested,
3251             the complete resource is returned instead.</p>
3252
3253         <dl>
3254             <dt><strong>default</strong></dt>
3255             <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>
3256
3257             <dt><strong>none</strong></dt>
3258             <dd>No overlapping Range headers are allowed.</dd>
3259
3260             <dt><strong>unlimited</strong></dt>
3261             <dd>The server does not limit the number of overlapping ranges it is
3262                 willing to satisfy.</dd>
3263
3264             <dt><var>number-of-ranges</var></dt>
3265             <dd>A positive number representing the maximum number of overlapping ranges the
3266                 server is willing to satisfy.</dd>
3267         </dl>
3268     
3269 </div>
3270 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3271 <div class="directive-section"><h2><a name="MaxRangeReversals" id="MaxRangeReversals">MaxRangeReversals</a> <a name="maxrangereversals" id="maxrangereversals">Directive</a></h2>
3272 <table class="directive">
3273 <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
3274         resource </td></tr>
3275 <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>
3276 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRangeReversals 20</code></td></tr>
3277 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3278 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3279 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3280 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
3281 </table>
3282         <p>The <code class="directive">MaxRangeReversals</code> directive
3283             limits the number of HTTP Range reversals the server is willing to
3284             return to the client. If more ranges reversals than permitted are requested,
3285             the complete resource is returned instead.</p>
3286
3287         <dl>
3288             <dt><strong>default</strong></dt>
3289             <dd>Limits the number of range reversals to a compile-time default of 20.</dd>
3290
3291             <dt><strong>none</strong></dt>
3292             <dd>No Range reversals headers are allowed.</dd>
3293
3294             <dt><strong>unlimited</strong></dt>
3295             <dd>The server does not limit the number of range reversals it is
3296                 willing to satisfy.</dd>
3297
3298             <dt><var>number-of-ranges</var></dt>
3299             <dd>A positive number representing the maximum number of range reversals the
3300                 server is willing to satisfy.</dd>
3301         </dl>
3302     
3303 </div>
3304 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3305 <div class="directive-section"><h2><a name="MaxRanges" id="MaxRanges">MaxRanges</a> <a name="maxranges" id="maxranges">Directive</a></h2>
3306 <table class="directive">
3307 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of ranges allowed before returning the complete
3308 resource </td></tr>
3309 <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>
3310 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxRanges 200</code></td></tr>
3311 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3312 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3313 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3314 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.15 and later</td></tr>
3315 </table>
3316     <p>The <code class="directive">MaxRanges</code> directive
3317     limits the number of HTTP ranges the server is willing to
3318     return to the client. If more ranges than permitted are requested,
3319     the complete resource is returned instead.</p>
3320
3321     <dl>
3322       <dt><strong>default</strong></dt>
3323       <dd>Limits the number of ranges to a compile-time default of 200.</dd>
3324
3325       <dt><strong>none</strong></dt>
3326       <dd>Range headers are ignored.</dd>
3327
3328       <dt><strong>unlimited</strong></dt>
3329       <dd>The server does not limit the number of ranges it is
3330           willing to satisfy.</dd>
3331
3332       <dt><var>number-of-ranges</var></dt>
3333       <dd>A positive number representing the maximum number of ranges the
3334       server is willing to satisfy.</dd>
3335     </dl>
3336
3337 </div>
3338 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3339 <div class="directive-section"><h2><a name="MergeTrailers" id="MergeTrailers">MergeTrailers</a> <a name="mergetrailers" id="mergetrailers">Directive</a></h2>
3340 <table class="directive">
3341 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether trailers are merged into headers</td></tr>
3342 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MergeTrailers [on|off]</code></td></tr>
3343 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MergeTrailers off</code></td></tr>
3344 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3345 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3346 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3347 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.4.11 and later</td></tr>
3348 </table>
3349     <p>This directive controls whether HTTP trailers are copied into the
3350     internal representation of HTTP headers. This merging occurs when the
3351     request body has been completely consumed, long after most header
3352     processing would have a chance to examine or modify request headers.</p>
3353     <p>This option is provided for compatibility with releases prior to 2.4.11,
3354     where trailers were always merged.</p>
3355
3356 </div>
3357 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3358 <div class="directive-section"><h2><a name="Mutex" id="Mutex">Mutex</a> <a name="mutex" id="mutex">Directive</a></h2>
3359 <table class="directive">
3360 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures mutex mechanism and lock file directory for all
3361 or specified mutexes</td></tr>
3362 <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>
3363 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Mutex default</code></td></tr>
3364 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3365 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3366 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3367 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache HTTP Server 2.3.4 and later</td></tr>
3368 </table>
3369     <p>The <code class="directive">Mutex</code> directive sets the mechanism,
3370     and optionally the lock file location, that httpd and modules use
3371     to serialize access to resources.  Specify <code>default</code> as
3372     the second argument to change the settings for all mutexes; specify
3373     a mutex name (see table below) as the second argument to override
3374     defaults only for that mutex.</p>
3375
3376     <p>The <code class="directive">Mutex</code> directive is typically used in
3377     the following exceptional situations:</p>
3378
3379     <ul>
3380         <li>change the mutex mechanism when the default mechanism selected
3381         by <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> has a functional or performance
3382         problem</li>
3383
3384         <li>change the directory used by file-based mutexes when the
3385         default directory does not support locking</li>
3386     </ul>
3387
3388     <div class="note"><h3>Supported modules</h3>
3389     <p>This directive only configures mutexes which have been registered
3390     with the core server using the <code>ap_mutex_register()</code> API.
3391     All modules bundled with httpd support the <code class="directive">Mutex</code>
3392     directive, but third-party modules may not.  Consult the documentation
3393     of the third-party module, which must indicate the mutex name(s) which
3394     can be configured if this directive is supported.</p>
3395     </div>
3396
3397     <p>The following mutex <em>mechanisms</em> are available:</p>
3398     <ul>
3399         <li><code>default | yes</code>
3400         <p>This selects the default locking implementation, as determined by
3401         <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>.  The default locking implementation can
3402         be displayed by running <code class="program"><a href="../programs/httpd.html">httpd</a></code> with the
3403         <code>-V</code> option.</p></li>
3404
3405         <li><code>none | no</code>
3406         <p>This effectively disables the mutex, and is only allowed for a
3407         mutex if the module indicates that it is a valid choice.  Consult the
3408         module documentation for more information.</p></li>
3409
3410         <li><code>posixsem</code>
3411         <p>This is a mutex variant based on a Posix semaphore.</p>
3412
3413         <div class="warning"><h3>Warning</h3>
3414         <p>The semaphore ownership is not recovered if a thread in the process
3415         holding the mutex segfaults, resulting in a hang of the web server.</p>
3416         </div>
3417         </li>
3418
3419         <li><code>sysvsem</code>
3420         <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
3421
3422         <div class="warning"><h3>Warning</h3>
3423         <p>It is possible to "leak" SysV semaphores if processes crash
3424         before the semaphore is removed.</p>
3425         </div>
3426
3427         <div class="warning"><h3>Security</h3>
3428         <p>The semaphore API allows for a denial of service attack by any
3429         CGIs running under the same uid as the webserver (<em>i.e.</em>,
3430         all CGIs, unless you use something like <code class="program"><a href="../programs/suexec.html">suexec</a></code>
3431         or <code>cgiwrapper</code>).</p>
3432         </div>
3433         </li>
3434
3435         <li><code>sem</code>
3436         <p>This selects the "best" available semaphore implementation, choosing
3437         between Posix and SystemV IPC semaphores, in that order.</p></li>
3438
3439         <li><code>pthread</code>
3440         <p>This is a mutex variant based on cross-process Posix thread
3441         mutexes.</p>
3442
3443         <div class="warning"><h3>Warning</h3>
3444         <p>On most systems, if a child process terminates abnormally while
3445         holding a mutex that uses this implementation, the server will deadlock
3446         and stop responding to requests.  When this occurs, the server will
3447         require a manual restart to recover.</p>
3448         <p>Solaris and Linux are notable exceptions as they provide a mechanism which
3449         usually allows the mutex to be recovered after a child process
3450         terminates abnormally while holding a mutex.</p>
3451         <p>If your system is POSIX compliant or if it implements the
3452         <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
3453         to use the <code>pthread</code> option safely.</p>
3454         </div>
3455         </li>
3456
3457         <li><code>fcntl:/path/to/mutex</code>
3458         <p>This is a mutex variant where a physical (lock-)file and the
3459         <code>fcntl()</code> function are used as the mutex.</p>
3460
3461         <div class="warning"><h3>Warning</h3>
3462         <p>When multiple mutexes based on this mechanism are used within
3463         multi-threaded, multi-process environments, deadlock errors (EDEADLK)
3464         can be reported for valid mutex operations if <code>fcntl()</code>
3465         is not thread-aware, such as on Solaris.</p>
3466         </div>
3467         </li>
3468
3469         <li><code>flock:/path/to/mutex</code>
3470         <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
3471         with the exception that the <code>flock()</code> function is used to
3472         provide file locking.</p></li>
3473
3474         <li><code>file:/path/to/mutex</code>
3475         <p>This selects the "best" available file locking implementation,
3476         choosing between <code>fcntl</code> and <code>flock</code>, in that
3477         order.</p></li>
3478     </ul>
3479
3480     <p>Most mechanisms are only available on selected platforms, where the
3481     underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> support it.  Mechanisms
3482     which aren't available on all platforms are <em>posixsem</em>,
3483     <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
3484     <em>flock</em>, and <em>file</em>.</p>
3485
3486     <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
3487     the path, if provided, is a directory where the lock file will be created.
3488     The default directory is httpd's run-time file directory,
3489     <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>.  If a relative
3490     path is provided, it is relative to
3491     <code class="directive"><a href="#defaultruntimedir">DefaultRuntimeDir</a></code>.  Always use a local
3492     disk filesystem for <code>/path/to/mutex</code> and never a directory residing
3493     on a NFS- or AFS-filesystem.  The basename of the file will be the mutex
3494     type, an optional instance string provided by the module, and unless the
3495     <code>OmitPID</code> keyword is specified, the process id of the httpd
3496     parent process will be appended to make the file name unique, avoiding
3497     conflicts when multiple httpd instances share a lock file directory.  For
3498     example, if the mutex name is <code>mpm-accept</code> and the lock file
3499     directory is <code>/var/httpd/locks</code>, the lock file name for the
3500     httpd instance with parent process id 12345 would be
3501     <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
3502
3503     <div class="warning"><h3>Security</h3>
3504     <p>It is best to <em>avoid</em> putting mutex files in a world-writable
3505     directory such as <code>/var/tmp</code> because someone could create
3506     a denial of service attack and prevent the server from starting by
3507     creating a lockfile with the same name as the one the server will try
3508     to create.</p>
3509     </div>
3510
3511     <p>The following table documents the names of mutexes used by httpd
3512     and bundled modules.</p>
3513
3514     <table class="bordered"><tr class="header">
3515             <th>Mutex name</th>
3516             <th>Module(s)</th>
3517             <th>Protected resource</th>
3518         </tr>
3519 <tr>
3520             <td><code>mpm-accept</code></td>
3521             <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>
3522             <td>incoming connections, to avoid the thundering herd problem;
3523             for more information, refer to the
3524             <a href="../misc/perf-tuning.html">performance tuning</a>
3525             documentation</td>
3526         </tr>
3527 <tr class="odd">
3528             <td><code>authdigest-client</code></td>
3529             <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
3530             <td>client list in shared memory</td>
3531         </tr>
3532 <tr>
3533             <td><code>authdigest-opaque</code></td>
3534             <td><code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code></td>
3535             <td>counter in shared memory</td>
3536         </tr>
3537 <tr class="odd">
3538             <td><code>ldap-cache</code></td>
3539             <td><code class="module"><a href="../mod/mod_ldap.html">mod_ldap</a></code></td>
3540             <td>LDAP result cache</td>
3541         </tr>
3542 <tr>
3543             <td><code>rewrite-map</code></td>
3544             <td><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code></td>
3545             <td>communication with external mapping programs, to avoid
3546             intermixed I/O from multiple requests</td>
3547         </tr>
3548 <tr class="odd">
3549             <td><code>ssl-cache</code></td>
3550             <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
3551             <td>SSL session cache</td>
3552         </tr>
3553 <tr>
3554             <td><code>ssl-stapling</code></td>
3555             <td><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></td>
3556             <td>OCSP stapling response cache</td>
3557         </tr>
3558 <tr class="odd">
3559             <td><code>watchdog-callback</code></td>
3560             <td><code class="module"><a href="../mod/mod_watchdog.html">mod_watchdog</a></code></td>
3561             <td>callback function of a particular client module</td>
3562         </tr>
3563 </table>
3564
3565     <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
3566     parent process id from the lock file name.</p>
3567
3568     <p>In the following example, the mutex mechanism for the MPM accept
3569     mutex will be changed from the compiled-in default to <code>fcntl</code>,
3570     with the associated lock file created in directory
3571     <code>/var/httpd/locks</code>.  The mutex mechanism for all other mutexes
3572     will be changed from the compiled-in default to <code>sysvsem</code>.</p>
3573
3574     <pre class="prettyprint lang-config">Mutex sysvsem default
3575 Mutex fcntl:/var/httpd/locks mpm-accept</pre>
3576
3577
3578 </div>
3579 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3580 <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
3581 <table class="directive">
3582 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>DEPRECATED: Designates an IP address for name-virtual
3583 hosting</td></tr>
3584 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
3585 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3586 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3587 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3588 </table>
3589
3590 <p>Prior to 2.3.11, <code class="directive">NameVirtualHost</code> was required
3591 to instruct the server that a particular IP address and port combination
3592 was usable as a name-based virtual host.  In 2.3.11 and later,
3593 any time an IP address and port combination is used in multiple virtual
3594 hosts, name-based virtual hosting is automatically enabled for that address.</p>
3595
3596 <p>This directive currently has no effect.</p>
3597
3598 <h3>See also</h3>
3599 <ul>
3600 <li><a href="../vhosts/">Virtual Hosts
3601 documentation</a></li>
3602 </ul>
3603 </div>
3604 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3605 <div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
3606 <table class="directive">
3607 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
3608 directory</td></tr>
3609 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
3610     [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
3611 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options FollowSymlinks</code></td></tr>
3612 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3613 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
3614 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3615 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3616 <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>
3617 </table>
3618     <p>The <code class="directive">Options</code> directive controls which
3619     server features are available in a particular directory.</p>
3620
3621     <p><var>option</var> can be set to <code>None</code>, in which
3622     case none of the extra features are enabled, or one or more of
3623     the following:</p>
3624
3625     <dl>
3626       <dt><code>All</code></dt>
3627
3628       <dd>All options except for <code>MultiViews</code>.</dd>
3629
3630       <dt><code>ExecCGI</code></dt>
3631
3632       <dd>
3633       Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
3634       is permitted.</dd>
3635
3636       <dt><code>FollowSymLinks</code></dt>
3637
3638       <dd>
3639       The server will follow symbolic links in this directory. This is
3640       the default setting.
3641       <div class="note">
3642       <p>Even though the server follows the symlink it does <em>not</em>
3643       change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
3644
3645       <p>The <code>FollowSymLinks</code> and
3646       <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
3647       <code>.htaccess</code> files.</p>
3648
3649       <p>Omitting this option should not be considered a security restriction,
3650       since symlink testing is subject to race conditions that make it
3651       circumventable.</p>
3652       </div></dd>
3653
3654       <dt><code>Includes</code></dt>
3655
3656       <dd>
3657       Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
3658       are permitted.</dd>
3659
3660       <dt><code>IncludesNOEXEC</code></dt>
3661
3662       <dd>
3663
3664       Server-side includes are permitted, but the <code>#exec
3665       cmd</code> and <code>#exec cgi</code> are disabled. It is still
3666       possible to <code>#include virtual</code> CGI scripts from
3667       <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
3668       directories.</dd>
3669
3670       <dt><code>Indexes</code></dt>
3671
3672       <dd>
3673       If a URL which maps to a directory is requested and there
3674       is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
3675       (<em>e.g.</em>, <code>index.html</code>) in that directory, then
3676       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
3677       of the directory.</dd>
3678
3679       <dt><code>MultiViews</code></dt>
3680
3681       <dd>
3682       <a href="../content-negotiation.html">Content negotiated</a>
3683       "MultiViews" are allowed using
3684       <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.
3685       <div class="note"><h3>Note</h3> <p>This option gets ignored if set
3686       anywhere other than <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, as <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>
3687       needs real resources to compare against and evaluate from.</p></div>
3688       </dd>
3689
3690       <dt><code>SymLinksIfOwnerMatch</code></dt>
3691
3692       <dd>The server will only follow symbolic links for which the
3693       target file or directory is owned by the same user id as the
3694       link.
3695
3696       <div class="note"><h3>Note</h3>
3697       <p>The <code>FollowSymLinks</code> and
3698       <code>SymLinksIfOwnerMatch</code> <code class="directive"><a href="#options">Options</a></code> work only in <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections or
3699       <code>.htaccess</code> files.</p>
3700
3701       <p>This option should not be considered a security restriction,
3702       since symlink testing is subject to race conditions that make it
3703       circumventable.</p>
3704       </div> </dd>
3705     </dl>
3706
3707     <p>Normally, if multiple <code class="directive">Options</code> could
3708     apply to a directory, then the most specific one is used and
3709     others are ignored; the options are not merged. (See <a href="../sections.html#merging">how sections are merged</a>.)
3710     However if <em>all</em> the options on the
3711     <code class="directive">Options</code> directive are preceded by a
3712     <code>+</code> or <code>-</code> symbol, the options are
3713     merged. Any options preceded by a <code>+</code> are added to the
3714     options currently in force, and any options preceded by a
3715     <code>-</code> are removed from the options currently in
3716     force. </p>
3717
3718     <div class="note"><h3>Note</h3>
3719     <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
3720     <code>-</code> with those without is not valid syntax and will be
3721     rejected during server startup by the syntax check with an abort.</p>
3722     </div>
3723
3724     <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
3725
3726     <pre class="prettyprint lang-config">&lt;Directory "/web/docs"&gt;
3727   Options Indexes FollowSymLinks
3728 &lt;/Directory&gt;
3729
3730 &lt;Directory "/web/docs/spec"&gt;
3731   Options Includes
3732 &lt;/Directory&gt;</pre>
3733
3734
3735     <p>then only <code>Includes</code> will be set for the
3736     <code>/web/docs/spec</code> directory. However if the second
3737     <code class="directive">Options</code> directive uses the <code>+</code> and
3738     <code>-</code> symbols:</p>
3739
3740     <pre class="prettyprint lang-config">&lt;Directory "/web/docs"&gt;
3741   Options Indexes FollowSymLinks
3742 &lt;/Directory&gt;
3743
3744 &lt;Directory "/web/docs/spec"&gt;
3745   Options +Includes -Indexes
3746 &lt;/Directory&gt;</pre>
3747
3748
3749     <p>then the options <code>FollowSymLinks</code> and
3750     <code>Includes</code> are set for the <code>/web/docs/spec</code>
3751     directory.</p>
3752
3753     <div class="note"><h3>Note</h3>
3754       <p>Using <code>-IncludesNOEXEC</code> or
3755       <code>-Includes</code> disables server-side includes completely
3756       regardless of the previous setting.</p>
3757     </div>
3758
3759     <p>The default in the absence of any other settings is
3760     <code>FollowSymlinks</code>.</p>
3761
3762 </div>
3763 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3764 <div class="directive-section"><h2><a name="Protocol" id="Protocol">Protocol</a> <a name="protocol" id="protocol">Directive</a></h2>
3765 <table class="directive">
3766 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocol for a listening socket</td></tr>
3767 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocol <var>protocol</var></code></td></tr>
3768 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3769 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3770 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3771 <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>
3772 </table>
3773     <p>This directive specifies the protocol used for a specific listening socket.
3774        The protocol is used to determine which module should handle a request and
3775        to apply protocol specific optimizations with the <code class="directive">AcceptFilter</code>
3776        directive.</p>
3777
3778     <p>You only need to set the protocol if you are running on non-standard ports;
3779        otherwise, <code>http</code> is assumed for port 80 and <code>https</code>
3780        for port 443.</p>
3781
3782     <p>For example, if you are running <code>https</code> on a non-standard port,
3783        specify the protocol explicitly:</p>
3784
3785     <pre class="prettyprint lang-config">Protocol https</pre>
3786
3787
3788     <p>You can also specify the protocol using the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive.</p>
3789
3790 <h3>See also</h3>
3791 <ul>
3792 <li><code class="directive"><a href="#acceptfilter">AcceptFilter</a></code></li>
3793 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
3794 </ul>
3795 </div>
3796 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3797 <div class="directive-section"><h2><a name="Protocols" id="Protocols">Protocols</a> <a name="protocols" id="protocols">Directive</a></h2>
3798 <table class="directive">
3799 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Protocols available for a server/virtual host</td></tr>
3800 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Protocols <var>protocol</var> ...</code></td></tr>
3801 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Protocols http/1.1</code></td></tr>
3802 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3803 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3804 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3805 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr>
3806 </table>
3807         <p>This directive specifies the list of protocols supported for a
3808             server/virtual host. The list determines the allowed protocols
3809             a client may negotiate for this server/host.</p>
3810         
3811         <p>You need to set protocols if you want to extend the available
3812             protocols for a server/host. By default, only the http/1.1 protocol
3813             (which includes the compatibility with 1.0 and 0.9 clients) is
3814             allowed.</p>
3815         
3816         <p>For example, if you want to support HTTP/2 for a server with TLS, 
3817             specify:</p>
3818         
3819         <pre class="prettyprint lang-config">Protocols h2 http/1.1</pre>
3820
3821
3822         <p>Valid protocols are <code>http/1.1</code> for http and https connections,
3823             <code>h2</code> on https connections and <code>h2c</code> for http
3824             connections. Modules may enable more protocols.</p>
3825         
3826         <p>It is safe to specify protocols that are unavailable/disabled. Such
3827         protocol names will simply be ignored.</p>
3828         
3829         <p>Protocols specified in base servers are inherited for virtual hosts 
3830             only if the virtual host has no own Protocols directive. Or, the other
3831             way around, Protocols directives in virtual hosts replace any
3832             such directive in the base server.
3833         </p>
3834
3835     
3836 <h3>See also</h3>
3837 <ul>
3838 <li><code class="directive"><a href="#protocolshonororder">ProtocolsHonorOrder</a></code></li>
3839 </ul>
3840 </div>
3841 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3842 <div class="directive-section"><h2><a name="ProtocolsHonorOrder" id="ProtocolsHonorOrder">ProtocolsHonorOrder</a> <a name="protocolshonororder" id="protocolshonororder">Directive</a></h2>
3843 <table class="directive">
3844 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines if order of Protocols determines precedence during negotiation</td></tr>
3845 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProtocolsHonorOrder On|Off</code></td></tr>
3846 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProtocolsHonorOrder On</code></td></tr>
3847 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3848 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3849 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3850 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Only available from Apache 2.4.17 and later.</td></tr>
3851 </table>
3852         <p>This directive specifies if the server should honor the order in which
3853         the <code class="directive">Protocols</code> directive lists protocols.</p>
3854         
3855         <p>If configured Off, the client supplied list order of protocols has 
3856             precedence over the order in the server configuration.</p>
3857         
3858         <p>With <code class="directive">ProtocolsHonorOrder</code> set to <code>on</code> 
3859             (default), the client ordering does not matter and only the ordering 
3860             in the server settings influences the outcome of the protocol 
3861             negotiation.</p>
3862         
3863     
3864 <h3>See also</h3>
3865 <ul>
3866 <li><code class="directive"><a href="#protocols">Protocols</a></code></li>
3867 </ul>
3868 </div>
3869 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3870 <div class="directive-section"><h2><a name="QualifyRedirectURL" id="QualifyRedirectURL">QualifyRedirectURL</a> <a name="qualifyredirecturl" id="qualifyredirecturl">Directive</a></h2>
3871 <table class="directive">
3872 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls whether the REDIRECT_URL environment variable is
3873              fully qualified</td></tr>
3874 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>QualifyRedirectURL ON|OFF</code></td></tr>
3875 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>QualifyRedirectURL OFF</code></td></tr>
3876 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3877 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
3878 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3879 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3880 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Directive supported in 2.4.18 and later. 2.4.17 acted
3881 as if 'QualifyRedirectURL ON' was configured.</td></tr>
3882 </table>
3883     <p>This directive controls whether the server will ensure that the 
3884     REDIRECT_URL environment variable is fully qualified.  By default, 
3885     the variable contains the verbatim URL requested by the client, 
3886     such as "/index.html".  With <code class="directive"><a href="#qualifyredirecturl on">QualifyRedirectURL ON</a></code>, the same request would result in a
3887     value such as "http://www.example.com/index.html".</p>
3888     <p>Even without this directive set, when a request is issued against a 
3889     fully qualified URL, REDIRECT_URL will remain fully qualified.
3890     </p>
3891
3892 </div>
3893 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3894 <div class="directive-section"><h2><a name="RegisterHttpMethod" id="RegisterHttpMethod">RegisterHttpMethod</a> <a name="registerhttpmethod" id="registerhttpmethod">Directive</a></h2>
3895 <table class="directive">
3896 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Register non-standard HTTP methods</td></tr>
3897 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RegisterHttpMethod <var>method</var> [<var>method</var> [...]]</code></td></tr>
3898 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3899 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3900 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3901 </table>
3902 <p>HTTP Methods that are not conforming to the relvant RFCs are normally
3903 rejected by request processing in Apache HTTPD. To avoid this, modules
3904 can register non-standard HTTP methods they support.
3905 The <code class="directive">RegisterHttpMethod</code> allows to register such
3906 methods manually. This can be useful if such methods are forwarded
3907 for external processing, e.g. to a CGI script.</p>
3908
3909 </div>
3910 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3911 <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
3912 <table class="directive">
3913 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
3914 by Apache httpd children</td></tr>
3915 <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>
3916 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3917 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3918 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
3919 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3920 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3921 </table>
3922     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3923     resource limit for all processes and the second parameter sets
3924     the maximum resource limit. Either parameter can be a number,
3925     or <code>max</code> to indicate to the server that the limit should
3926     be set to the maximum allowed by the operating system
3927     configuration. Raising the maximum resource limit requires that
3928     the server is running as <code>root</code> or in the initial startup
3929     phase.</p>
3930
3931     <p>This applies to processes forked from Apache httpd children
3932     servicing requests, not the Apache httpd children themselves. This
3933     includes CGI scripts and SSI exec commands, but not any
3934     processes forked from the Apache httpd parent, such as piped
3935     logs.</p>
3936
3937     <p>CPU resource limits are expressed in seconds per
3938     process.</p>
3939
3940 <h3>See also</h3>
3941 <ul>
3942 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
3943 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3944 </ul>
3945 </div>
3946 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3947 <div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
3948 <table class="directive">
3949 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
3950 by Apache httpd children</td></tr>
3951 <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>
3952 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3953 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3954 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
3955 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3956 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3957 </table>
3958     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3959     resource limit for all processes and the second parameter sets
3960     the maximum resource limit. Either parameter can be a number,
3961     or <code>max</code> to indicate to the server that the limit should
3962     be set to the maximum allowed by the operating system
3963     configuration. Raising the maximum resource limit requires that
3964     the server is running as <code>root</code> or in the initial startup
3965     phase.</p>
3966
3967     <p>This applies to processes forked from Apache httpd children
3968     servicing requests, not the Apache httpd children themselves. This
3969     includes CGI scripts and SSI exec commands, but not any
3970     processes forked from the Apache httpd parent, such as piped
3971     logs.</p>
3972
3973     <p>Memory resource limits are expressed in bytes per
3974     process.</p>
3975
3976 <h3>See also</h3>
3977 <ul>
3978 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
3979 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
3980 </ul>
3981 </div>
3982 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3983 <div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
3984 <table class="directive">
3985 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
3986 processes launched by Apache httpd children</td></tr>
3987 <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>
3988 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
3989 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3990 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
3991 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3992 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3993 </table>
3994     <p>Takes 1 or 2 parameters. The first parameter sets the soft
3995     resource limit for all processes, and the second parameter sets
3996     the maximum resource limit. Either parameter can be a number,
3997     or <code>max</code> to indicate to the server that the limit
3998     should be set to the maximum allowed by the operating system
3999     configuration. Raising the maximum resource limit requires that
4000     the server is running as <code>root</code> or in the initial startup
4001     phase.</p>
4002
4003     <p>This applies to processes forked from Apache httpd children
4004     servicing requests, not the Apache httpd children themselves. This
4005     includes CGI scripts and SSI exec commands, but not any
4006     processes forked from the Apache httpd parent, such as piped
4007     logs.</p>
4008
4009     <p>Process limits control the number of processes per user.</p>
4010
4011     <div class="note"><h3>Note</h3>
4012       <p>If CGI processes are <strong>not</strong> running
4013       under user ids other than the web server user id, this directive
4014       will limit the number of processes that the server itself can
4015       create. Evidence of this situation will be indicated by
4016       <strong><code>cannot fork</code></strong> messages in the
4017       <code>error_log</code>.</p>
4018     </div>
4019
4020 <h3>See also</h3>
4021 <ul>
4022 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
4023 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
4024 </ul>
4025 </div>
4026 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4027 <div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
4028 <table class="directive">
4029 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
4030 scripts</td></tr>
4031 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
4032 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
4033 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4034 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
4035 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4036 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4037 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only.</td></tr>
4038 </table>
4039     <p>This directive is used to control how Apache httpd finds the
4040     interpreter used to run CGI scripts. The default setting is
4041     <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
4042     by the shebang line (first line, starting with <code>#!</code>) in the
4043     script. On Win32 systems this line usually looks like:</p>
4044
4045     <pre class="prettyprint lang-perl">#!C:/Perl/bin/perl.exe</pre>
4046
4047
4048     <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
4049
4050     <pre class="prettyprint lang-perl">#!perl</pre>
4051
4052
4053     <p>Setting <code>ScriptInterpreterSource Registry</code> will
4054     cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
4055     searched using the script file extension (e.g., <code>.pl</code>) as a
4056     search key. The command defined by the registry subkey
4057     <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
4058     <code>Shell\Open\Command</code> is used to open the script file. If the
4059     registry keys cannot be found, Apache httpd falls back to the behavior of the
4060     <code>Script</code> option.</p>
4061
4062     <div class="warning"><h3>Security</h3>
4063     <p>Be careful when using <code>ScriptInterpreterSource
4064     Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
4065     Apache httpd will try to execute <strong>every</strong> file within this
4066     directory. The <code>Registry</code> setting may cause undesired
4067     program calls on files which are typically not executed. For
4068     example, the default open command on <code>.htm</code> files on
4069     most Windows systems will execute Microsoft Internet Explorer, so
4070     any HTTP request for an <code>.htm</code> file existing within the
4071     script directory would start the browser in the background on the
4072     server. This is a good way to crash your system within a minute or
4073     so.</p>
4074     </div>
4075
4076     <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
4077     2.0 does the same thing as <code>Registry</code> but uses only the
4078     subkey <code>Shell\ExecCGI\Command</code>. The
4079     <code>ExecCGI</code> key is not a common one. It must be
4080     configured manually in the windows registry and hence prevents
4081     accidental program calls on your system.</p>
4082
4083 </div>
4084 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4085 <div class="directive-section"><h2><a name="SeeRequestTail" id="SeeRequestTail">SeeRequestTail</a> <a name="seerequesttail" id="seerequesttail">Directive</a></h2>
4086 <table class="directive">
4087 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine if mod_status displays the first 63 characters
4088 of a request or the last 63, assuming the request itself is greater than
4089 63 chars.</td></tr>
4090 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SeeRequestTail On|Off</code></td></tr>
4091 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SeeRequestTail Off</code></td></tr>
4092 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4093 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4094 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4095 </table>
4096     <p>mod_status with <code>ExtendedStatus On</code>
4097     displays the actual request being handled.
4098     For historical purposes, only 63 characters of the request
4099     are actually stored for display purposes. This directive
4100     controls whether the 1st 63 characters are stored (the previous
4101     behavior and the default) or if the last 63 characters are. This
4102     is only applicable, of course, if the length of the request is
4103     64 characters or greater.</p>
4104
4105     <p>If Apache httpd is handling <code>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</code> mod_status displays as follows:
4106     </p>
4107
4108     <table class="bordered">
4109       <tr>
4110         <th>Off (default)</th>
4111         <td>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
4112       </tr>
4113       <tr>
4114         <th>On</th>
4115         <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</td>
4116       </tr>
4117     </table>
4118
4119
4120 </div>
4121 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4122 <div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
4123 <table class="directive">
4124 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
4125 messages sent to the client</td></tr>
4126 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
4127 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4128 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4129 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4130 </table>
4131     <p>The <code class="directive">ServerAdmin</code> sets the contact address
4132     that the server includes in any error messages it returns to the
4133     client. If the <code>httpd</code> doesn't recognize the supplied argument
4134     as an URL, it
4135     assumes, that it's an <var>email-address</var> and prepends it with
4136     <code>mailto:</code> in hyperlink targets. However, it's recommended to
4137     actually use an email address, since there are a lot of CGI scripts that
4138     make that assumption. If you want to use an URL, it should point to another
4139     server under your control. Otherwise users may not be able to contact you in
4140     case of errors.</p>
4141
4142     <p>It may be worth setting up a dedicated address for this, e.g.</p>
4143
4144     <pre class="prettyprint lang-config">ServerAdmin www-admin@foo.example.com</pre>
4145
4146     <p>as users do not always mention that they are talking about the
4147     server!</p>
4148
4149 </div>
4150 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4151 <div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
4152 <table class="directive">
4153 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
4154 to name-virtual hosts</td></tr>
4155 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
4156 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
4157 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4158 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4159 </table>
4160     <p>The <code class="directive">ServerAlias</code> directive sets the
4161     alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The
4162     <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
4163
4164     <pre class="prettyprint lang-config">&lt;VirtualHost *:80&gt;
4165   ServerName server.example.com
4166   ServerAlias server server2.example.com server2
4167   ServerAlias *.example.com
4168   UseCanonicalName Off
4169   # ...
4170 &lt;/VirtualHost&gt;</pre>
4171
4172
4173     <p>Name-based virtual hosts for the best-matching set of  <code class="directive"><a href="#virtualhost">&lt;virtualhost&gt;</a></code>s are processed
4174     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
4175     (nor for ServerName vs. ServerAlias).  </p>
4176
4177     <p>The complete list of names in the <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
4178     directive are treated just like a (non wildcard)
4179     <code class="directive">ServerAlias</code>.</p>
4180
4181
4182 <h3>See also</h3>
4183 <ul>
4184 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
4185 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
4186 </ul>
4187 </div>
4188 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4189 <div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
4190 <table class="directive">
4191 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
4192 itself</td></tr>
4193 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName [<var>scheme</var>://]<var>domain-name</var>|<var>ip-address</var>[:<var>port</var>]</code></td></tr>
4194 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4195 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4196 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4197 </table>
4198     <p>The <code class="directive">ServerName</code> directive sets the
4199     request scheme, hostname and port that the server uses to identify itself.
4200     </p>
4201
4202     <p><code class="directive">ServerName</code> is used (possibly
4203     in conjunction with <code class="directive"><a href="#serveralias">ServerAlias</a></code>) to uniquely
4204     identify a virtual host, when using <a href="../vhosts/name-based.html">name-based virtual hosts</a>.</p>
4205
4206     <p>Additionally, this is used when
4207     creating self-referential redirection URLs when 
4208     <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> is set to a non-default
4209     value.</p>
4210
4211     <p>For example, if the name of the
4212     machine hosting the web server is <code>simple.example.com</code>,
4213     but the machine also has the DNS alias <code>www.example.com</code>
4214     and you wish the web server to be so identified, the following
4215     directive should be used:</p>
4216
4217     <pre class="prettyprint lang-config">ServerName www.example.com</pre>
4218
4219
4220     <p>The <code class="directive">ServerName</code> directive
4221     may appear anywhere within the definition of a server. However,
4222     each appearance overrides the previous appearance (within that
4223     server).</p>
4224
4225     <p>If no <code class="directive">ServerName</code> is specified, the
4226     server attempts to deduce the client visible hostname by first asking 
4227     the operating system for the system hostname, and if that fails, 
4228     performing a reverse lookup on an IP address present on the system.</p>
4229
4230     <p>If no port is specified in the
4231     <code class="directive">ServerName</code>, then the server will use the
4232     port from the incoming request. For optimal reliability and
4233     predictability, you should specify an explicit hostname and port
4234     using the <code class="directive">ServerName</code> directive.</p>
4235
4236     <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
4237     the <code class="directive">ServerName</code> inside a
4238     <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
4239     section specifies what hostname must appear in the request's
4240     <code>Host:</code> header to match this virtual host.</p>
4241
4242     <p>Sometimes, the server runs behind a device that processes SSL,
4243     such as a reverse proxy, load balancer or SSL offload
4244     appliance. When this is the case, specify the
4245     <code>https://</code> scheme and the port number to which the
4246     clients connect in the <code class="directive">ServerName</code> directive
4247     to make sure that the server generates the correct
4248     self-referential URLs.
4249     </p>
4250
4251     <p>See the description of the
4252     <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
4253     <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
4254     settings which determine whether self-referential URLs (e.g., by the
4255     <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the
4256     specified port, or to the port number given in the client's request.
4257     </p>
4258
4259     <div class="warning">
4260     <p>Failure to set <code class="directive">ServerName</code> to a name that
4261     your server can resolve to an IP address will result in a startup
4262     warning. <code>httpd</code> will then use whatever hostname it can
4263     determine, using the system's <code>hostname</code> command. This
4264     will almost never be the hostname you actually want.</p>
4265     <div class="example"><p><code>
4266     httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
4267     </code></p></div>
4268     </div>
4269
4270
4271 <h3>See also</h3>
4272 <ul>
4273 <li><a href="../dns-caveats.html">Issues Regarding DNS and
4274     Apache HTTP Server</a></li>
4275 <li><a href="../vhosts/">Apache HTTP Server virtual host
4276     documentation</a></li>
4277 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
4278 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
4279 <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
4280 </ul>
4281 </div>
4282 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4283 <div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
4284 <table class="directive">
4285 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
4286 is accessed by an incompatible browser</td></tr>
4287 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
4288 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
4289 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4290 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4291 </table>
4292     <p>The <code class="directive">ServerPath</code> directive sets the legacy
4293     URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
4294
4295 <h3>See also</h3>
4296 <ul>
4297 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
4298 </ul>
4299 </div>
4300 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4301 <div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
4302 <table class="directive">
4303 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
4304 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
4305 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
4306 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4307 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4308 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4309 </table>
4310     <p>The <code class="directive">ServerRoot</code> directive sets the
4311     directory in which the server lives. Typically it will contain the
4312     subdirectories <code>conf/</code> and <code>logs/</code>. Relative
4313     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
4314     relative to this directory.</p>
4315
4316     <pre class="prettyprint lang-config">ServerRoot "/home/httpd"</pre>
4317
4318
4319     <p>The default location of <code class="directive">ServerRoot</code> may be
4320     modified by using the <code>--prefix</code> argument to
4321     <a href="../programs/configure.html"><code>configure</code></a>, and
4322     most third-party distributions of the server have a different
4323     default location from the one listed above.</p>
4324
4325
4326 <h3>See also</h3>
4327 <ul>
4328 <li><a href="../invoking.html">the <code>-d</code>
4329     option to <code>httpd</code></a></li>
4330 <li><a href="../misc/security_tips.html#serverroot">the
4331     security tips</a> for information on how to properly set
4332     permissions on the <code class="directive">ServerRoot</code></li>
4333 </ul>
4334 </div>
4335 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4336 <div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
4337 <table class="directive">
4338 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
4339 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
4340 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
4341 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4342 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
4343 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4344 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4345 </table>
4346     <p>The <code class="directive">ServerSignature</code> directive allows the
4347     configuration of a trailing footer line under server-generated
4348     documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory
4349     listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
4350     would want to enable such a footer line is that in a chain of proxies,
4351     the user often has no possibility to tell which of the chained servers
4352     actually produced a returned error message.</p>
4353
4354     <p>The <code>Off</code>
4355     setting, which is the default, suppresses the footer line (and is
4356     therefore compatible with the behavior of Apache-1.2 and
4357     below). The <code>On</code> setting simply adds a line with the
4358     server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
4359     and the <code>EMail</code> setting additionally creates a
4360     "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
4361     document.</p>
4362
4363     <p>After version 2.0.44, the details of the server version number
4364     presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
4365
4366 <h3>See also</h3>
4367 <ul>
4368 <li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
4369 </ul>
4370 </div>
4371 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4372 <div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
4373 <table class="directive">
4374 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
4375 header</td></tr>
4376 <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>
4377 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
4378 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4379 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4380 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4381 </table>
4382     <p>This directive controls whether <code>Server</code> response
4383     header field which is sent back to clients includes a
4384     description of the generic OS-type of the server as well as
4385     information about compiled-in modules.</p>
4386
4387     <dl>
4388       <dt><code>ServerTokens Full</code> (or not specified)</dt>
4389
4390       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
4391       (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
4392
4393       <dt><code>ServerTokens Prod[uctOnly]</code></dt>
4394
4395       <dd>Server sends (<em>e.g.</em>): <code>Server:
4396       Apache</code></dd>
4397
4398       <dt><code>ServerTokens Major</code></dt>
4399
4400       <dd>Server sends (<em>e.g.</em>): <code>Server:
4401       Apache/2</code></dd>
4402
4403       <dt><code>ServerTokens Minor</code></dt>
4404
4405       <dd>Server sends (<em>e.g.</em>): <code>Server:
4406       Apache/2.4</code></dd>
4407
4408       <dt><code>ServerTokens Min[imal]</code></dt>
4409
4410       <dd>Server sends (<em>e.g.</em>): <code>Server:
4411       Apache/2.4.2</code></dd>
4412
4413       <dt><code>ServerTokens OS</code></dt>
4414
4415       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
4416       (Unix)</code></dd>
4417
4418     </dl>
4419
4420     <p>This setting applies to the entire server, and cannot be
4421     enabled or disabled on a virtualhost-by-virtualhost basis.</p>
4422
4423     <p>After version 2.0.44, this directive also controls the
4424     information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
4425
4426     <div class="note">Setting <code class="directive">ServerTokens</code> to less than
4427     <code>minimal</code> is not recommended because it makes it more
4428     difficult to debug interoperational problems. Also note that
4429     disabling the Server: header does nothing at all to make your
4430     server more secure. The idea of "security through obscurity"
4431     is a myth and leads to a false sense of safety.</div>
4432
4433 <h3>See also</h3>
4434 <ul>
4435 <li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
4436 </ul>
4437 </div>
4438 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4439 <div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
4440 <table class="directive">
4441 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
4442 handler</td></tr>
4443 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|none|<var>expression</var></code></td></tr>
4444 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4445 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
4446 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4447 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4448 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5 and later</td></tr>
4449 </table>
4450     <p>When placed into an <code>.htaccess</code> file or a
4451     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> or
4452     <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
4453     section, this directive forces all matching files to be parsed
4454     through the <a href="../handler.html">handler</a> given by
4455     <var>handler-name</var>. For example, if you had a directory you
4456     wanted to be parsed entirely as imagemap rule files, regardless
4457     of extension, you might put the following into an
4458     <code>.htaccess</code> file in that directory:</p>
4459
4460     <pre class="prettyprint lang-config">SetHandler imap-file</pre>
4461
4462
4463     <p>Another example: if you wanted to have the server display a
4464     status report whenever a URL of
4465     <code>http://servername/status</code> was called, you might put
4466     the following into <code>httpd.conf</code>:</p>
4467
4468     <pre class="prettyprint lang-config">&lt;Location "/status"&gt;
4469   SetHandler server-status
4470 &lt;/Location&gt;</pre>
4471
4472
4473     <p>You could also use this directive to configure a particular
4474     handler for files with a particular file extension. For example:</p>
4475
4476     <pre class="prettyprint lang-config">&lt;FilesMatch "\.php$"&gt;
4477     SetHandler application/x-httpd-php
4478 &lt;/FilesMatch&gt;</pre>
4479
4480
4481     <p>String-valued expressions can be used to reference per-request 
4482     variables, including backreferences to named regular expressions:</p>
4483
4484     <pre class="prettyprint lang-config">&lt;LocationMatch ^/app/(?&lt;sub&gt;[^/]+)/&gt;
4485      SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080"
4486 &lt;/LocationMatch&gt;</pre>
4487
4488
4489     <p>You can override an earlier defined <code class="directive">SetHandler</code>
4490     directive by using the value <code>None</code>.</p>
4491
4492     <div class="note"><h3>Note</h3>
4493     <p>Because <code class="directive">SetHandler</code> overrides default handlers,
4494     normal behavior such as handling of URLs ending in a slash (/) as
4495     directories or index files is suppressed.</p></div>
4496
4497 <h3>See also</h3>
4498 <ul>
4499 <li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li>
4500 </ul>
4501 </div>
4502 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4503 <div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
4504 <table class="directive">
4505 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
4506 input</td></tr>
4507 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
4508 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4509 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
4510 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4511 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4512 </table>
4513     <p>The <code class="directive">SetInputFilter</code> directive sets the
4514     filter or filters which will process client requests and POST
4515     input when they are received by the server. This is in addition to
4516     any filters defined elsewhere, including the
4517     <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
4518     directive.</p>
4519
4520     <p>If more than one filter is specified, they must be separated
4521     by semicolons in the order in which they should process the
4522     content.</p>
4523
4524 <h3>See also</h3>
4525 <ul>
4526 <li><a href="../filter.html">Filters</a> documentation</li>
4527 </ul>
4528 </div>
4529 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4530 <div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
4531 <table class="directive">
4532 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
4533 server</td></tr>
4534 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
4535 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4536 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
4537 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4538 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4539 </table>
4540     <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
4541     which will process responses from the server before they are
4542     sent to the client. This is in addition to any filters defined
4543     elsewhere, including the
4544     <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
4545     directive.</p>
4546
4547     <p>For example, the following configuration will process all files
4548     in the <code>/www/data/</code> directory for server-side
4549     includes.</p>
4550
4551     <pre class="prettyprint lang-config">&lt;Directory "/www/data/"&gt;
4552   SetOutputFilter INCLUDES
4553 &lt;/Directory&gt;</pre>
4554
4555
4556     <p>If more than one filter is specified, they must be separated
4557     by semicolons in the order in which they should process the
4558     content.</p>
4559
4560 <h3>See also</h3>
4561 <ul>
4562 <li><a href="../filter.html">Filters</a> documentation</li>
4563 </ul>
4564 </div>
4565 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4566 <div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
4567 <table class="directive">
4568 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
4569 certain events before failing a request</td></tr>
4570 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
4571 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 60</code></td></tr>
4572 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4573 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4574 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4575 </table>
4576     <p>The <code class="directive">TimeOut</code> directive defines the length
4577     of time Apache httpd will wait for I/O in various circumstances:</p>
4578
4579     <ul>
4580       <li><p>When reading data from the client, the length of time to
4581       wait for a TCP packet to arrive if the read buffer is
4582       empty.</p>
4583       <p> For initial data on a new connection, this directive doesn't
4584       take effect until after any configured <code class="directive"><a href="#acceptfilter">
4585       AcceptFilter</a></code> has passed the new connection to the server.</p>
4586       </li>
4587
4588       <li>When writing data to the client, the length of time to wait
4589       for an acknowledgement of a packet if the send buffer is
4590       full.</li>
4591
4592       <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>,
4593       the length of time to wait for output from a CGI script.</li>
4594
4595       <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
4596       wait for output from a filtering process.</li>
4597
4598       <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
4599       <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
4600       configured.</li>
4601     </ul>
4602
4603
4604 </div>
4605 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4606 <div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
4607 <table class="directive">
4608 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr>
4609 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
4610 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
4611 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4612 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4613 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4614 </table>
4615     <p>This directive overrides the behavior of <code>TRACE</code> for both
4616     the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>.  The default
4617     <code>TraceEnable on</code> permits <code>TRACE</code> requests per
4618     RFC 2616, which disallows any request body to accompany the request.
4619     <code>TraceEnable off</code> causes the core server and
4620     <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
4621     allowed) error to the client.</p>
4622
4623     <p>Finally, for testing and diagnostic purposes only, request
4624     bodies may be allowed using the non-compliant <code>TraceEnable
4625     extended</code> directive.  The core (as an origin server) will
4626     restrict the request body to 64Kb (plus 8Kb for chunk headers if
4627     <code>Transfer-Encoding: chunked</code> is used).  The core will
4628     reflect the full headers and all chunk headers with the response
4629     body.  As a proxy server, the request body is not restricted to 64Kb.</p>
4630
4631     <div class="note"><h3>Note</h3>
4632
4633     <p>Despite claims to the contrary, enabling the <code>TRACE</code>
4634     method does not expose any security vulnerability in Apache httpd.
4635     The <code>TRACE</code> method is defined by the HTTP/1.1
4636     specification and implementations are expected to support it.</p>
4637     
4638     </div>
4639
4640 </div>
4641 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4642 <div class="directive-section"><h2><a name="UnDefine" id="UnDefine">UnDefine</a> <a name="undefine" id="undefine">Directive</a></h2>
4643 <table class="directive">
4644 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Undefine the existence of a variable</td></tr>
4645 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UnDefine <var>parameter-name</var></code></td></tr>
4646 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
4647 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4648 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4649 </table>
4650     <p>Undoes the effect of a <code class="directive"><a href="#define">Define</a></code> or
4651     of passing a <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
4652     <p>This directive can be used to toggle the use of <code class="directive"><a href="#ifdefine">&lt;IfDefine&gt;</a></code> sections without needing to alter
4653     <code>-D</code> arguments in any startup scripts.</p>
4654     <p>While this directive is supported in virtual host context,
4655        the changes it makes are visible to any later configuration
4656        directives, beyond any enclosing virtual host.</p>
4657
4658 </div>
4659 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4660 <div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
4661 <table class="directive">
4662 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
4663 port</td></tr>
4664 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
4665 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
4666 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
4667 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4668 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4669 </table>
4670     <p>In many situations Apache httpd must construct a <em>self-referential</em>
4671     URL -- that is, a URL that refers back to the same server. With
4672     <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
4673     specified in the <code class="directive"><a href="#servername">ServerName</a></code>
4674     directive to construct the canonical name for the server. This name
4675     is used in all self-referential URLs, and for the values of
4676     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
4677
4678     <p>With <code>UseCanonicalName Off</code> Apache httpd will form
4679     self-referential URLs using the hostname and port supplied by
4680     the client if any are supplied (otherwise it will use the
4681     canonical name, as defined above). These values are the same
4682     that are used to implement <a href="../vhosts/name-based.html">name-based virtual hosts</a>
4683     and are available with the same clients. The CGI variables
4684     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
4685     constructed from the client supplied values as well.</p>
4686
4687     <p>An example where this may be useful is on an intranet server
4688     where you have users connecting to the machine using short
4689     names such as <code>www</code>. You'll notice that if the users
4690     type a shortname and a URL which is a directory, such as
4691     <code>http://www/splat</code>, <em>without the trailing
4692     slash</em>, then Apache httpd will redirect them to
4693     <code>http://www.example.com/splat/</code>. If you have
4694     authentication enabled, this will cause the user to have to
4695     authenticate twice (once for <code>www</code> and once again
4696     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">
4697     the FAQ on this subject for more information</a>). But if
4698     <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
4699     Apache httpd will redirect to <code>http://www/splat/</code>.</p>
4700
4701     <p>There is a third option, <code>UseCanonicalName DNS</code>,
4702     which is intended for use with mass IP-based virtual hosting to
4703     support ancient clients that do not provide a
4704     <code>Host:</code> header. With this option, Apache httpd does a
4705     reverse DNS lookup on the server IP address that the client
4706     connected to in order to work out self-referential URLs.</p>
4707
4708     <div class="warning"><h3>Warning</h3>
4709     <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>,
4710     they may be broken by this option. The client is essentially free
4711     to give whatever value they want as a hostname. But if the CGI is
4712     only using <code>SERVER_NAME</code> to construct self-referential URLs,
4713     then it should be just fine.</p>
4714     </div>
4715
4716 <h3>See also</h3>
4717 <ul>
4718 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
4719 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4720 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4721 </ul>
4722 </div>
4723 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4724 <div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
4725 <table class="directive">
4726 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own port</td></tr>
4727 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
4728 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
4729 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
4730 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4731 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4732 </table>
4733     <p>In many situations Apache httpd must construct a <em>self-referential</em>
4734     URL -- that is, a URL that refers back to the same server. With
4735     <code>UseCanonicalPhysicalPort On</code>, Apache httpd will, when
4736     constructing the canonical port for the server to honor
4737     the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
4738     provide the actual physical port number being used by this request
4739     as a potential port. With <code>UseCanonicalPhysicalPort Off</code>,
4740     Apache httpd will not ever use the actual physical port number, instead
4741     relying on all configured information to construct a valid port number.</p>
4742
4743     <div class="note"><h3>Note</h3>
4744     <p>The ordering of the lookup when the physical port is used is as
4745     follows:</p>
4746      <dl>
4747      <dt><code>UseCanonicalName On</code></dt>
4748      <dd>
4749      <ol>
4750       <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
4751       <li>Physical port</li>
4752       <li>Default port</li>
4753      </ol>
4754      </dd>
4755      <dt><code>UseCanonicalName Off | DNS</code></dt>
4756      <dd>
4757      <ol>
4758       <li>Parsed port from <code>Host:</code> header</li>
4759       <li>Physical port</li>
4760       <li>Port provided in <code class="directive"><a href="#servername">Servername</a></code></li>
4761       <li>Default port</li>
4762      </ol>
4763      </dd>
4764      </dl>
4765
4766     <p>With <code>UseCanonicalPhysicalPort Off</code>, the
4767     physical ports are removed from the ordering.</p>
4768     </div>
4769
4770
4771 <h3>See also</h3>
4772 <ul>
4773 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
4774 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
4775 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
4776 </ul>
4777 </div>
4778 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4779 <div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost">&lt;VirtualHost&gt;</a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
4780 <table class="directive">
4781 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
4782 hostname or IP address</td></tr>
4783 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;VirtualHost
4784     <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
4785     ...&gt; ... &lt;/VirtualHost&gt;</code></td></tr>
4786 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
4787 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4788 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4789 </table>
4790     <p><code class="directive">&lt;VirtualHost&gt;</code> and
4791     <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
4792     directives that will apply only to a particular virtual host. Any
4793     directive that is allowed in a virtual host context may be
4794     used. When the server receives a request for a document on a
4795     particular virtual host, it uses the configuration directives
4796     enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
4797     section. <var>Addr</var> can be any of the following, optionally followed by
4798     a colon and a port number (or *):</p>
4799
4800     <ul>
4801       <li>The IP address of the virtual host;</li>
4802
4803       <li>A fully qualified domain name for the IP address of the
4804       virtual host (not recommended);</li>
4805
4806       <li>The character <code>*</code>, which acts as a wildcard and matches
4807       any IP address.</li>
4808
4809       <li>The string <code>_default_</code>, which is an alias for <code>*</code></li>
4810
4811     </ul>
4812
4813     <pre class="prettyprint lang-config">&lt;VirtualHost 10.1.2.3:80&gt;
4814   ServerAdmin webmaster@host.example.com
4815   DocumentRoot "/www/docs/host.example.com"
4816   ServerName host.example.com
4817   ErrorLog "logs/host.example.com-error_log"
4818   TransferLog "logs/host.example.com-access_log"
4819 &lt;/VirtualHost&gt;</pre>
4820
4821
4822
4823     <p>IPv6 addresses must be specified in square brackets because
4824     the optional port number could not be determined otherwise.  An
4825     IPv6 example is shown below:</p>
4826
4827     <pre class="prettyprint lang-config">&lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80&gt;
4828   ServerAdmin webmaster@host.example.com
4829   DocumentRoot "/www/docs/host.example.com"
4830   ServerName host.example.com
4831   ErrorLog "logs/host.example.com-error_log"
4832   TransferLog "logs/host.example.com-access_log"
4833 &lt;/VirtualHost&gt;</pre>
4834
4835
4836     <p>Each Virtual Host must correspond to a different IP address,
4837     different port number, or a different host name for the server,
4838     in the former case the server machine must be configured to
4839     accept IP packets for multiple addresses. (If the machine does
4840     not have multiple network interfaces, then this can be
4841     accomplished with the <code>ifconfig alias</code> command -- if
4842     your OS supports it).</p>
4843
4844     <div class="note"><h3>Note</h3>
4845     <p>The use of <code class="directive">&lt;VirtualHost&gt;</code> does
4846     <strong>not</strong> affect what addresses Apache httpd listens on. You
4847     may need to ensure that Apache httpd is listening on the correct addresses
4848     using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
4849     </div>
4850
4851     <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
4852     specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
4853     <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
4854     server configuration will be inherited.</p>
4855
4856     <p>When a request is received, the server first maps it to the best matching
4857     <code class="directive">&lt;VirtualHost&gt;</code> based on the local
4858     IP address and port combination only.  Non-wildcards have a higher
4859     precedence. If no match based on IP and port occurs at all, the
4860     "main" server configuration is used.</p>
4861
4862     <p>If multiple virtual hosts contain the best matching IP address and port,
4863     the server selects from these virtual hosts the best match based on the
4864     requested hostname.  If no matching name-based virtual host is found,
4865     then the first listed virtual host that matched the IP address will be
4866     used.  As a consequence, the first listed virtual host for a given IP address
4867     and port combination is the default virtual host for that IP and port
4868     combination.</p>
4869
4870     <div class="warning"><h3>Security</h3>
4871     <p>See the <a href="../misc/security_tips.html">security tips</a>
4872     document for details on why your security could be compromised if the
4873     directory where log files are stored is writable by anyone other
4874     than the user that starts the server.</p>
4875     </div>
4876
4877 <h3>See also</h3>
4878 <ul>
4879 <li><a href="../vhosts/">Apache HTTP Server Virtual Host documentation</a></li>
4880 <li><a href="../dns-caveats.html">Issues Regarding DNS and
4881     Apache HTTP Server</a></li>
4882 <li><a href="../bind.html">Setting
4883     which addresses and ports Apache HTTP Server uses</a></li>
4884 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
4885     and &lt;Files&gt; sections work</a> for an explanation of how these
4886     different sections are combined when a request is received</li>
4887 </ul>
4888 </div>
4889 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
4890 <div class="directive-section"><h2><a name="Warning" id="Warning">Warning</a> <a name="warning" id="warning">Directive</a></h2>
4891 <table class="directive">
4892 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Warn from configuration parsing with a custom message</td></tr>
4893 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Warning <var>message</var></code></td></tr>
4894 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
4895 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
4896 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
4897 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>2.5 and later</td></tr>
4898 </table>
4899     <p>If an issue can be detected from within the configuration, this
4900     directive can be used to generate a custom warning message. The
4901     configuration parsing is not halted. The typical use is to check
4902     whether some user define options are set, and warn if not.</p>
4903
4904     <pre class="prettyprint lang-config"># Example
4905 # tell when ReverseProxy is not set
4906 &lt;IfDefine !ReverseProxy&gt;
4907   Warning "reverse proxy is not started, hope this is okay!"
4908 &lt;/IfDefine&gt;
4909
4910 &lt;IfDefine ReverseProxy&gt;
4911   # define custom proxy configuration
4912 &lt;/IfDefine&gt;</pre>
4913
4914
4915
4916 </div>
4917 </div>
4918 <div class="bottomlang">
4919 <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
4920 <a href="../en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
4921 <a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español">&nbsp;es&nbsp;</a> |
4922 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
4923 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
4924 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
4925 </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&amp;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>
4926 <script type="text/javascript"><!--//--><![CDATA[//><!--
4927 var comments_shortname = 'httpd';
4928 var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/core.html';
4929 (function(w, d) {
4930     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
4931         d.write('<div id="comments_thread"><\/div>');
4932         var s = d.createElement('script');
4933         s.type = 'text/javascript';
4934         s.async = true;
4935         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
4936         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
4937     }
4938     else {
4939         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
4940     }
4941 })(window, document);
4942 //--><!]]></script></div><div id="footer">
4943 <p class="apache">Copyright 2016 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>
4944 <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[//><!--
4945 if (typeof(prettyPrint) !== 'undefined') {
4946     prettyPrint();
4947 }
4948 //--><!]]></script>
4949 </body></html>