]> granicus.if.org Git - apache/blob - docs/manual/mod/core.html.en
xforms
[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         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>core - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <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.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Core Features</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
25 <a href="../en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
26 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
27 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
28 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
29 </div>
30 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Core Apache HTTP Server features that are always
31 available</td></tr>
32 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Core</td></tr></table>
33 </div>
34 <div id="quickview"><h3 class="directives">Directives</h3>
35 <ul id="toc">
36 <li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
37 <li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
38 <li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
39 <li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
40 <li><img alt="" src="../images/down.gif" /> <a href="#addoutputfilterbytype">AddOutputFilterByType</a></li>
41 <li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
42 <li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
43 <li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
44 <li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#directory">&lt;Directory&gt;</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#directorymatch">&lt;DirectoryMatch&gt;</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#files">&lt;Files&gt;</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#filesmatch">&lt;FilesMatch&gt;</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#if">&lt;If&gt;</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#ifdefine">&lt;IfDefine&gt;</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#ifmodule">&lt;IfModule&gt;</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#limit">&lt;Limit&gt;</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#limitexcept">&lt;LimitExcept&gt;</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#location">&lt;Location&gt;</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#locationmatch">&lt;LocationMatch&gt;</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
91 <li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
92 <li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
93 <li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
94 <li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
95 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#virtualhost">&lt;VirtualHost&gt;</a></li>
98 </ul>
99 </div>
100
101 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
102 <div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">Directive</a></h2>
103 <table class="directive">
104 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures optimizations for a Protocol's Listener Sockets</td></tr>
105 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
106 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
107 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
108 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
109 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1.5 and later.
110 On Windows from Apache 2.3.3 and later.</td></tr>
111 </table>
112     <p>This directive enables operating system specific optimizations for a 
113        listening socket by the Protocol type. The basic premise is for the 
114        kernel to not send a socket to the server process until either data 
115        is received or an entire HTTP Request is buffered. Only
116        <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
117        FreeBSD's Accept Filters</a>, Linux's more primitive 
118        <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
119        are currently supported.</p>
120
121     <p>Using <code>none</code> for an argument will disable any accept filters 
122        for that protocol.  This is useful for protocols that require a server
123        send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
124     <div class="example"><p><code>AcceptFilter nntp none</code></p></div>
125
126     <p>The default values on FreeBSD are:</p>
127     <div class="example"><p><code>
128         AcceptFilter http httpready <br />
129         AcceptFilter https dataready
130     </code></p></div>
131     
132     <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
133        the kernel level.  Once an entire request is received, the kernel then 
134        sends it to the server. See the 
135        <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
136        accf_http(9)</a> man page for more details.  Since HTTPS requests are 
137        encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
138        accf_data(9)</a> filter is used.</p>
139
140     <p>The default values on Linux are:</p>
141     <div class="example"><p><code>
142         AcceptFilter http data <br />
143         AcceptFilter https data
144     </code></p></div>
145
146     <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
147        requests.  Any value besides <code>none</code> will enable 
148        <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
149        see the Linux 
150        <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
151        tcp(7)</a> man page.</p>
152
153     <p>The default values on Windows are:</p>
154     <div class="example"><p><code>
155         AcceptFilter http data <br />
156         AcceptFilter https data
157     </code></p></div>
158
159     <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
160        API, and does not support http protocol buffering.  There are two values
161        which utilize the Windows AcceptEx() API and will recycle network
162        sockets between connections.  <code>data</code> waits until data has
163        been transmitted as documented above, and the initial data buffer and
164        network endpoint addresses are all retrieved from the single AcceptEx()
165        invocation.  <code>connect</code> will use the AcceptEx() API, also
166        retrieve the network endpoint addresses, but like <code>none</code>
167        the <code>connect</code> option does not wait for the initial data
168        transmission.</p>
169
170     <p>On Windows, <code>none</code> uses accept() rather than than AcceptEx()
171        and will not recycle sockets between connections.  This is useful for
172        network adapters with broken driver support, as well as some virtual
173        network providers such as vpn drivers, or spam, virus or spyware
174        filters.</p>  
175
176
177 </div>
178 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
179 <div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">Directive</a></h2>
180 <table class="directive">
181 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Resources accept trailing pathname information</td></tr>
182 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
183 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
184 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
185 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
186 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
187 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
188 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.30 and later</td></tr>
189 </table>
190
191     <p>This directive controls whether requests that contain trailing
192     pathname information that follows an actual filename (or
193     non-existent file in an existing directory) will be accepted or
194     rejected.  The trailing pathname information can be made
195     available to scripts in the <code>PATH_INFO</code> environment
196     variable.</p>
197
198     <p>For example, assume the location <code>/test/</code> points to
199     a directory that contains only the single file
200     <code>here.html</code>.  Then requests for
201     <code>/test/here.html/more</code> and
202     <code>/test/nothere.html/more</code> both collect
203     <code>/more</code> as <code>PATH_INFO</code>.</p>
204
205     <p>The three possible arguments for the
206     <code class="directive">AcceptPathInfo</code> directive are:</p>
207     <dl>
208     <dt><code>Off</code></dt><dd>A request will only be accepted if it
209     maps to a literal path that exists.  Therefore a request with
210     trailing pathname information after the true filename such as
211     <code>/test/here.html/more</code> in the above example will return
212     a 404 NOT FOUND error.</dd>
213
214     <dt><code>On</code></dt><dd>A request will be accepted if a
215     leading path component maps to a file that exists.  The above
216     example <code>/test/here.html/more</code> will be accepted if
217     <code>/test/here.html</code> maps to a valid file.</dd>
218
219     <dt><code>Default</code></dt><dd>The treatment of requests with
220     trailing pathname information is determined by the <a href="../handler.html">handler</a> responsible for the request.
221     The core handler for normal files defaults to rejecting
222     <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
223     <code>PATH_INFO</code> by default.</dd>
224     </dl>
225
226     <p>The primary purpose of the <code>AcceptPathInfo</code>
227     directive is to allow you to override the handler's choice of
228     accepting or rejecting <code>PATH_INFO</code>. This override is required,
229     for example, when you use a <a href="../filter.html">filter</a>, such
230     as <a href="mod_include.html">INCLUDES</a>, to generate content
231     based on <code>PATH_INFO</code>.  The core handler would usually reject
232     the request, so you can use the following configuration to enable
233     such a script:</p>
234
235     <div class="example"><p><code>
236       &lt;Files "mypaths.shtml"&gt;<br />
237       <span class="indent">
238         Options +Includes<br />
239         SetOutputFilter INCLUDES<br />
240         AcceptPathInfo On<br />
241       </span>
242       &lt;/Files&gt;
243     </code></p></div>
244
245
246 </div>
247 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
248 <div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">Directive</a></h2>
249 <table class="directive">
250 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Name of the distributed configuration file</td></tr>
251 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
252 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
253 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
254 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
255 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
256 </table>
257     <p>While processing a request the server looks for
258     the first existing configuration file from this list of names in
259     every directory of the path to the document, if distributed
260     configuration files are <a href="#allowoverride">enabled for that
261     directory</a>. For example:</p>
262
263     <div class="example"><p><code>
264       AccessFileName .acl
265     </code></p></div>
266
267     <p>before returning the document
268     <code>/usr/local/web/index.html</code>, the server will read
269     <code>/.acl</code>, <code>/usr/.acl</code>,
270     <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
271     for directives, unless they have been disabled with</p>
272
273     <div class="example"><p><code>
274       &lt;Directory /&gt;<br />
275       <span class="indent">
276         AllowOverride None<br />
277       </span>
278       &lt;/Directory&gt;
279     </code></p></div>
280
281 <h3>See also</h3>
282 <ul>
283 <li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
284 <li><a href="../configuring.html">Configuration Files</a></li>
285 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
286 </ul>
287 </div>
288 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
289 <div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">Directive</a></h2>
290 <table class="directive">
291 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default charset parameter to be added when a response
292 content-type is <code>text/plain</code> or <code>text/html</code></td></tr>
293 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
294 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
295 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
296 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
297 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
298 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
299 </table>
300     <p>This directive specifies a default value for the media type
301     charset parameter (the name of a character encoding) to be added
302     to a response if and only if the response's content-type is either
303     <code>text/plain</code> or <code>text/html</code>.  This should override
304     any charset specified in the body of the response via a <code>META</code>
305     element, though the exact behavior is often dependent on the user's client
306     configuration. A setting of <code>AddDefaultCharset Off</code>
307     disables this functionality. <code>AddDefaultCharset On</code> enables
308     a default charset of <code>iso-8859-1</code>. Any other value is assumed
309     to be the <var>charset</var> to be used, which should be one of the
310     <a href="http://www.iana.org/assignments/character-sets">IANA registered
311     charset values</a> for use in Internet media types (MIME types).
312     For example:</p>
313
314     <div class="example"><p><code>
315       AddDefaultCharset utf-8
316     </code></p></div>
317
318     <p><code class="directive">AddDefaultCharset</code> should only be used when all
319     of the text resources to which it applies are known to be in that
320     character encoding and it is too inconvenient to label their charset
321     individually. One such example is to add the charset parameter
322     to resources containing generated content, such as legacy CGI
323     scripts, that might be vulnerable to cross-site scripting attacks
324     due to user-provided data being included in the output.  Note, however,
325     that a better solution is to just fix (or delete) those scripts, since
326     setting a default charset does not protect users that have enabled
327     the "auto-detect character encoding" feature on their browser.</p>
328
329 <h3>See also</h3>
330 <ul>
331 <li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li>
332 </ul>
333 </div>
334 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
335 <div class="directive-section"><h2><a name="AddOutputFilterByType" id="AddOutputFilterByType">AddOutputFilterByType</a> <a name="addoutputfilterbytype" id="addoutputfilterbytype">Directive</a></h2>
336 <table class="directive">
337 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>assigns an output filter to a particular media-type</td></tr>
338 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
339 <var>media-type</var> [<var>media-type</var>] ...</code></td></tr>
340 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
341 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
342 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
343 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
344 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</td></tr>
345 </table>
346     <p>This directive activates a particular output <a href="../filter.html">filter</a> for a request depending on the
347     response <a class="glossarylink" href="../glossary.html#media-type" title="see glossary">media-type</a>.  Because of certain
348     problems discussed below, this directive is deprecated.  The same
349     functionality is available using <code class="module"><a href="../mod/mod_filter.html">mod_filter</a></code>.</p>
350
351     <p>The following example uses the <code>DEFLATE</code> filter, which
352     is provided by <code class="module"><a href="../mod/mod_deflate.html">mod_deflate</a></code>. It will compress all
353     output (either static or dynamic) which is labeled as
354     <code>text/html</code> or <code>text/plain</code> before it is sent
355     to the client.</p>
356
357     <div class="example"><p><code>
358       AddOutputFilterByType DEFLATE text/html text/plain
359     </code></p></div>
360
361     <p>If you want the content to be processed by more than one filter, their
362     names have to be separated by semicolons. It's also possible to use one
363     <code class="directive">AddOutputFilterByType</code> directive for each of
364     these filters.</p>
365
366     <p>The configuration below causes all script output labeled as
367     <code>text/html</code> to be processed at first by the
368     <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
369     filter.</p>
370
371     <div class="example"><p><code>
372     &lt;Location /cgi-bin/&gt;<br />
373     <span class="indent">
374       Options Includes<br />
375       AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
376     </span>
377     &lt;/Location&gt;
378     </code></p></div>
379
380     <div class="warning"><h3>Note</h3>
381       <p>Enabling filters with <code class="directive">AddOutputFilterByType</code>
382       may fail partially or completely in some cases. For example, no
383       filters are applied if the <a class="glossarylink" href="../glossary.html#media-type" title="see glossary">media-type</a> could not
384       be determined.  If you want to make sure that the filters will be
385       applied, assign the content type to a resource explicitly; for
386       example, with <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> or
387       <code class="directive"><a href="#forcetype">ForceType</a></code>. Setting the
388       content type within a (non-nph) CGI script is also safe.</p>
389
390     </div>
391
392 <h3>See also</h3>
393 <ul>
394 <li><code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code></li>
395 <li><code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code></li>
396 <li><a href="../filter.html">filters</a></li>
397 </ul>
398 </div>
399 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
400 <div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">Directive</a></h2>
401 <table class="directive">
402 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines whether encoded path separators in URLs are allowed to
403 be passed through</td></tr>
404 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
405 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
406 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
407 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
408 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
409 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.46 and later</td></tr>
410 </table>
411     <p>The <code class="directive">AllowEncodedSlashes</code> directive allows URLs
412     which contain encoded path separators (<code>%2F</code> for <code>/</code>
413     and additionally <code>%5C</code> for <code>\</code> on according systems)
414     to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
415
416     <p>Turning <code class="directive">AllowEncodedSlashes</code> <code>On</code> is
417     mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
418
419     <div class="note"><h3>Note</h3>
420       <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
421       Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
422       according systems) will be left as such in the otherwise decoded URL
423       string.</p>
424     </div>
425
426 <h3>See also</h3>
427 <ul>
428 <li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
429 </ul>
430 </div>
431 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
432 <div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">Directive</a></h2>
433 <table class="directive">
434 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Types of directives that are allowed in
435 <code>.htaccess</code> files</td></tr>
436 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
437 [<var>directive-type</var>] ...</code></td></tr>
438 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowOverride All</code></td></tr>
439 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
440 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
441 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
442 </table>
443     <p>When the server finds an <code>.htaccess</code> file (as
444     specified by <code class="directive"><a href="#accessfilename">AccessFileName</a></code>)
445     it needs to know which directives declared in that file can override
446     earlier configuration directives.</p>
447
448     <div class="note"><h3>Only available in &lt;Directory&gt; sections</h3>
449     <code class="directive">AllowOverride</code> is valid only in
450     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
451     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
452     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.
453     </div>
454
455     <p>When this directive is set to <code>None</code>, then
456     <a href="#accessfilename">.htaccess</a> files are completely ignored.
457     In this case, the server will not even attempt to read
458     <code>.htaccess</code> files in the filesystem.</p>
459
460     <p>When this directive is set to <code>All</code>, then any
461     directive which has the .htaccess <a href="directive-dict.html#Context">Context</a> is allowed in
462     <code>.htaccess</code> files.</p>
463
464     <p>The <var>directive-type</var> can be one of the following
465     groupings of directives.</p>
466
467     <dl>
468       <dt>AuthConfig</dt>
469
470       <dd>
471
472       Allow use of the authorization directives (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
473       <code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
474       <code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
475       <code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
476       <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>
477
478       <dt>FileInfo</dt>
479
480       <dd>
481       Allow use of the directives controlling document types
482      (<code class="directive"><a href="#errordocument">ErrorDocument</a></code>,
483       <code class="directive"><a href="#forcetype">ForceType</a></code>,
484       <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
485       <code class="directive"><a href="#sethandler">SetHandler</a></code>,
486       <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>,
487       <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>, and
488       <code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> Add* and Remove* directives),
489       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>),
490       <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> directives <code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) and
491       <code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code> from
492       <code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code>.
493       </dd>
494
495       <dt>Indexes</dt>
496
497       <dd>
498       Allow use of the directives controlling directory indexing
499       (<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
500       <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>,
501       <code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
502       <code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>,
503       <em>etc.</em>).</dd>
504
505       <dt>Limit</dt>
506
507       <dd>
508       Allow use of the directives controlling host access (<code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code> and <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code>).</dd>
509
510       <dt>Options[=<var>Option</var>,...]</dt>
511
512       <dd>
513       Allow use of the directives controlling specific directory
514       features (<code class="directive"><a href="#options">Options</a></code> and
515       <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>).
516       An equal sign may be given followed by a comma (but no spaces)
517       separated lists of options that may be set using the <code class="directive"><a href="#options">Options</a></code> command.</dd>
518     </dl>
519
520     <p>Example:</p>
521
522     <div class="example"><p><code>
523       AllowOverride AuthConfig Indexes
524     </code></p></div>
525
526     <p>In the example above all directives that are neither in the group
527     <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
528     server error.</p>
529
530     <div class="note"><p>For security and performance reasons, do not set
531     <code>AllowOverride</code> to anything other than <code>None</code> 
532     in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
533     create) the <code>&lt;Directory&gt;</code> block that refers to the
534     directory where you're actually planning to place a
535     <code>.htaccess</code> file.</p>
536     </div>
537
538 <h3>See also</h3>
539 <ul>
540 <li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
541 <li><a href="../configuring.html">Configuration Files</a></li>
542 <li><a href="../howto/htaccess.html">.htaccess Files</a></li>
543 </ul>
544 </div>
545 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
546 <div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">Directive</a></h2>
547 <table class="directive">
548 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
549 scripts</td></tr>
550 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
551 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
552 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
553 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
554 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
555 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>NetWare only</td></tr>
556 </table>
557     <p>This directive is used to control how Apache finds the
558     interpreter used to run CGI scripts. For example, setting
559     <code>CGIMapExtension sys:\foo.nlm .foo</code> will
560     cause all CGI script files with a <code>.foo</code> extension to
561     be passed to the FOO interpreter.</p>
562
563 </div>
564 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
565 <div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">Directive</a></h2>
566 <table class="directive">
567 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables the generation of <code>Content-MD5</code> HTTP Response
568 headers</td></tr>
569 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ContentDigest On|Off</code></td></tr>
570 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ContentDigest Off</code></td></tr>
571 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
572 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
573 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
574 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
575 </table>
576     <p>This directive enables the generation of
577     <code>Content-MD5</code> headers as defined in RFC1864
578     respectively RFC2616.</p>
579
580     <p>MD5 is an algorithm for computing a "message digest"
581     (sometimes called "fingerprint") of arbitrary-length data, with
582     a high degree of confidence that any alterations in the data
583     will be reflected in alterations in the message digest.</p>
584
585     <p>The <code>Content-MD5</code> header provides an end-to-end
586     message integrity check (MIC) of the entity-body. A proxy or
587     client may check this header for detecting accidental
588     modification of the entity-body in transit. Example header:</p>
589
590     <div class="example"><p><code>
591       Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
592     </code></p></div>
593
594     <p>Note that this can cause performance problems on your server
595     since the message digest is computed on every request (the
596     values are not cached).</p>
597
598     <p><code>Content-MD5</code> is only sent for documents served
599     by the <code class="module"><a href="../mod/core.html">core</a></code>, and not by any module. For example,
600     SSI documents, output from CGI scripts, and byte range responses
601     do not have this header.</p>
602
603 </div>
604 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
605 <div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">Directive</a></h2>
606 <table class="directive">
607 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>This directive has no effect other than to emit warnings
608 if the value is not <code>none</code>. In prior versions, DefaultType
609 would specify a default media type to assign to response content for
610 which no other media type configuration could be found.
611 </td></tr>
612 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DefaultType <var>media-type|none</var></code></td></tr>
613 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DefaultType none</code></td></tr>
614 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
615 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
616 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
617 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
618 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The argument <code>none</code> is available in Apache 2.2.7 and later.  All other choices are DISABLED for 2.3.x and later.</td></tr>
619 </table>
620     <p>This directive has been disabled.  For backwards compatibility
621     of configuration files, it may be specified with the value
622     <code>none</code>, meaning no default media type. For example:</p>
623
624     <div class="example"><p><code>
625       DefaultType None
626     </code></p></div>
627
628     <p><code>DefaultType None</code> is only available in
629     httpd-2.2.7 and later.</p>
630
631     <p>Use the mime.types configuration file and the
632     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code> to configure media
633     type assignments via file extensions, or the
634     <code class="directive"><a href="#forcetype">ForceType</a></code> directive to configure
635     the media type for specific resources. Otherwise, the server will
636     send the response without a Content-Type header field and the
637     recipient may attempt to guess the media type.</p>
638
639 </div>
640 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
641 <div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">Directive</a></h2>
642 <table class="directive">
643 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the existence of a variable</td></tr>
644 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
645 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
646 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
647 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
648 </table>
649     <p>Equivalent to passing the <code>-D</code> argument to <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</p>
650     <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
651     <code>-D</code> arguments in any startup scripts.</p>
652
653 </div>
654 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
655 <div class="directive-section"><h2><a name="Directory" id="Directory">&lt;Directory&gt;</a> <a name="directory" id="directory">Directive</a></h2>
656 <table class="directive">
657 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose a group of directives that apply only to the
658 named file-system directory and sub-directories</td></tr>
659 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Directory <var>directory-path</var>&gt;
660 ... &lt;/Directory&gt;</code></td></tr>
661 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
662 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
663 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
664 </table>
665     <p><code class="directive">&lt;Directory&gt;</code> and
666     <code>&lt;/Directory&gt;</code> are used to enclose a group of
667     directives that will apply only to the named directory and
668     sub-directories of that directory. Any directive that is allowed
669     in a directory context may be used. <var>Directory-path</var> is
670     either the full path to a directory, or a wild-card string using
671     Unix shell-style matching. In a wild-card string, <code>?</code> matches
672     any single character, and <code>*</code> matches any sequences of
673     characters. You may also use <code>[]</code> character ranges. None
674     of the wildcards match a `/' character, so <code>&lt;Directory
675     /*/public_html&gt;</code> will not match
676     <code>/home/user/public_html</code>, but <code>&lt;Directory
677     /home/*/public_html&gt;</code> will match. Example:</p>
678
679     <div class="example"><p><code>
680       &lt;Directory /usr/local/httpd/htdocs&gt;<br />
681       <span class="indent">
682         Options Indexes FollowSymLinks<br />
683       </span>
684       &lt;/Directory&gt;
685     </code></p></div>
686
687     <div class="note">
688       <p>Be careful with the <var>directory-path</var> arguments:
689       They have to literally match the filesystem path which Apache uses
690       to access the files. Directives applied to a particular
691       <code>&lt;Directory&gt;</code> will not apply to files accessed from
692       that same directory via a different path, such as via different symbolic
693       links.</p>
694     </div>
695
696     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular
697     expressions</a> can also be used, with the addition of the
698     <code>~</code> character. For example:</p>
699
700     <div class="example"><p><code>
701       &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
702     </code></p></div>
703
704     <p>would match directories in <code>/www/</code> that consisted of
705     three numbers.</p>
706
707     <p>If multiple (non-regular expression) <code class="directive">&lt;Directory&gt;</code> sections
708     match the directory (or one of its parents) containing a document,
709     then the directives are applied in the order of shortest match
710     first, interspersed with the directives from the <a href="#accessfilename">.htaccess</a> files. For example,
711     with</p>
712
713     <div class="example"><p><code>
714       &lt;Directory /&gt;<br />
715       <span class="indent">
716         AllowOverride None<br />
717       </span>
718       &lt;/Directory&gt;<br />
719       <br />
720       &lt;Directory /home/&gt;<br />
721       <span class="indent">
722         AllowOverride FileInfo<br />
723       </span>
724       &lt;/Directory&gt;
725     </code></p></div>
726
727     <p>for access to the document <code>/home/web/dir/doc.html</code>
728     the steps are:</p>
729
730     <ul>
731       <li>Apply directive <code>AllowOverride None</code>
732       (disabling <code>.htaccess</code> files).</li>
733
734       <li>Apply directive <code>AllowOverride FileInfo</code> (for
735       directory <code>/home</code>).</li>
736
737       <li>Apply any <code>FileInfo</code> directives in
738       <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
739       <code>/home/web/dir/.htaccess</code> in that order.</li>
740     </ul>
741
742     <p>Regular expressions are not considered until after all of the
743     normal sections have been applied. Then all of the regular
744     expressions are tested in the order they appeared in the
745     configuration file. For example, with</p>
746
747     <div class="example"><p><code>
748       &lt;Directory ~ abc$&gt;<br />
749       <span class="indent">
750         # ... directives here ...<br />
751       </span>
752       &lt;/Directory&gt;
753     </code></p></div>
754
755     <p>the regular expression section won't be considered until after
756     all normal <code class="directive">&lt;Directory&gt;</code>s and
757     <code>.htaccess</code> files have been applied. Then the regular
758     expression will match on <code>/home/abc/public_html/abc</code> and
759     the corresponding <code class="directive">&lt;Directory&gt;</code> will
760     be applied.</p>
761
762    <p><strong>Note that the default Apache access for
763     <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
764     This means that Apache will serve any file mapped from an URL. It is
765     recommended that you change this with a block such
766     as</strong></p>
767
768     <div class="example"><p><code>
769       &lt;Directory /&gt;<br />
770       <span class="indent">
771         Order Deny,Allow<br />
772         Deny from All<br />
773       </span>
774       &lt;/Directory&gt;
775     </code></p></div>
776
777     <p><strong>and then override this for directories you
778     <em>want</em> accessible. See the <a href="../misc/security_tips.html">Security Tips</a> page for more
779     details.</strong></p>
780
781     <p>The directory sections occur in the <code>httpd.conf</code> file.
782     <code class="directive">&lt;Directory&gt;</code> directives
783     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>
784
785 <h3>See also</h3>
786 <ul>
787 <li><a href="../sections.html">How &lt;Directory&gt;,
788     &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
789     explanation of how these different sections are combined when a
790     request is received</li>
791 </ul>
792 </div>
793 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
794 <div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch">&lt;DirectoryMatch&gt;</a> <a name="directorymatch" id="directorymatch">Directive</a></h2>
795 <table class="directive">
796 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enclose directives that apply to
797 file-system directories matching a regular expression and their
798 subdirectories</td></tr>
799 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;DirectoryMatch <var>regex</var>&gt;
800 ... &lt;/DirectoryMatch&gt;</code></td></tr>
801 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
802 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
803 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
804 </table>
805     <p><code class="directive">&lt;DirectoryMatch&gt;</code> and
806     <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
807     of directives which will apply only to the named directory and
808     sub-directories of that directory, the same as <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>. However, it
809     takes as an argument a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular 
810     expression</a>. For example:</p>
811
812     <div class="example"><p><code>
813       &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
814     </code></p></div>
815
816     <p>would match directories in <code>/www/</code> that consisted of three
817     numbers.</p>
818
819 <h3>See also</h3>
820 <ul>
821 <li><code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> for
822 a description of how regular expressions are mixed in with normal
823 <code class="directive">&lt;Directory&gt;</code>s</li>
824 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
825 &lt;Files&gt; sections work</a> for an explanation of how these different
826 sections are combined when a request is received</li>
827 </ul>
828 </div>
829 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
830 <div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">Directive</a></h2>
831 <table class="directive">
832 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory that forms the main document tree visible
833 from the web</td></tr>
834 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
835 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
836 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
837 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
838 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
839 </table>
840     <p>This directive sets the directory from which <code class="program"><a href="../programs/httpd.html">httpd</a></code>
841     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
842     path from the requested URL to the document root to make the
843     path to the document. Example:</p>
844
845     <div class="example"><p><code>
846       DocumentRoot /usr/web
847     </code></p></div>
848
849     <p>then an access to
850     <code>http://www.my.host.com/index.html</code> refers to
851     <code>/usr/web/index.html</code>. If the <var>directory-path</var> is 
852     not absolute then it is assumed to be relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
853
854     <p>The <code class="directive">DocumentRoot</code> should be specified without
855     a trailing slash.</p>
856
857 <h3>See also</h3>
858 <ul>
859 <li><a href="../urlmapping.html#documentroot">Mapping URLs to Filesystem
860 Locations</a></li>
861 </ul>
862 </div>
863 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
864 <div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">Directive</a></h2>
865 <table class="directive">
866 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use memory-mapping to read files during delivery</td></tr>
867 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
868 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableMMAP On</code></td></tr>
869 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
870 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
871 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
872 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
873 </table>
874     <p>This directive controls whether the <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use
875     memory-mapping if it needs to read the contents of a file during
876     delivery.  By default, when the handling of a request requires
877     access to the data within a file -- for example, when delivering a
878     server-parsed file using <code class="module"><a href="../mod/mod_include.html">mod_include</a></code> -- Apache
879     memory-maps the file if the OS supports it.</p>
880
881     <p>This memory-mapping sometimes yields a performance improvement.
882     But in some environments, it is better to disable the memory-mapping
883     to prevent operational problems:</p>
884
885     <ul>
886     <li>On some multiprocessor systems, memory-mapping can reduce the
887     performance of the <code class="program"><a href="../programs/httpd.html">httpd</a></code>.</li>
888     <li>Deleting or truncating a file while <code class="program"><a href="../programs/httpd.html">httpd</a></code>
889       has it memory-mapped can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to
890       crash with a segmentation fault.
891     </li>
892     </ul>
893
894     <p>For server configurations that are vulnerable to these problems,
895     you should disable memory-mapping of delivered files by specifying:</p>
896
897     <div class="example"><p><code>
898       EnableMMAP Off
899     </code></p></div>
900
901     <p>For NFS mounted files, this feature may be disabled explicitly for
902     the offending files by specifying:</p>
903
904     <div class="example"><p><code>
905       &lt;Directory "/path-to-nfs-files"&gt;
906       <span class="indent">
907         EnableMMAP Off
908       </span>
909       &lt;/Directory&gt;
910     </code></p></div>
911
912 </div>
913 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
914 <div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">Directive</a></h2>
915 <table class="directive">
916 <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>
917 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
918 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>EnableSendfile On</code></td></tr>
919 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
920 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
921 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
922 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
923 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0.44 and later</td></tr>
924 </table>
925     <p>This directive controls whether <code class="program"><a href="../programs/httpd.html">httpd</a></code> may use the
926     sendfile support from the kernel to transmit file contents to the client.
927     By default, when the handling of a request requires no access
928     to the data within a file -- for example, when delivering a
929     static file -- Apache uses sendfile to deliver the file contents
930     without ever reading the file if the OS supports it.</p>
931
932     <p>This sendfile mechanism avoids separate read and send operations,
933     and buffer allocations. But on some platforms or within some
934     filesystems, it is better to disable this feature to avoid
935     operational problems:</p>
936
937     <ul>
938     <li>Some platforms may have broken sendfile support that the build
939     system did not detect, especially if the binaries were built on
940     another box and moved to such a machine with broken sendfile
941     support.</li>
942     <li>On Linux the use of sendfile triggers TCP-checksum
943     offloading bugs on certain networking cards when using IPv6.</li>
944     <li>On Linux on Itanium, sendfile may be unable to handle files
945     over 2GB in size.</li>
946     <li>With a network-mounted <code class="directive"><a href="#documentroot">DocumentRoot</a></code> (e.g., NFS or SMB),
947     the kernel may be unable to serve the network file through
948     its own cache.</li>
949     </ul>
950
951     <p>For server configurations that are vulnerable to these problems,
952     you should disable this feature by specifying:</p>
953
954     <div class="example"><p><code>
955       EnableSendfile Off
956     </code></p></div>
957
958     <p>For NFS or SMB mounted files, this feature may be disabled explicitly
959     for the offending files by specifying:</p>
960
961     <div class="example"><p><code>
962       &lt;Directory "/path-to-nfs-files"&gt;
963       <span class="indent">
964         EnableSendfile Off
965       </span>
966       &lt;/Directory&gt;
967     </code></p></div>
968     <p>Please note that the per-directory and .htaccess configuration
969        of <code class="directive">EnableSendfile</code> is not supported by
970        <code class="module"><a href="../mod/mod_disk_cache.html">mod_disk_cache</a></code>.
971        Only global definition of <code class="directive">EnableSendfile</code>
972        is taken into account by the module.
973     </p>
974
975 </div>
976 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
977 <div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">Directive</a></h2>
978 <table class="directive">
979 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>What the server will return to the client
980 in case of an error</td></tr>
981 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ErrorDocument <var>error-code</var> <var>document</var></code></td></tr>
982 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
983 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
984 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
985 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
986 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Quoting syntax for text messages is different in Apache
987 2.0</td></tr>
988 </table>
989     <p>In the event of a problem or error, Apache can be configured
990     to do one of four things,</p>
991
992     <ol>
993       <li>output a simple hardcoded error message</li>
994
995       <li>output a customized message</li>
996
997       <li>redirect to a local <var>URL-path</var> to handle the
998       problem/error</li>
999
1000       <li>redirect to an external <var>URL</var> to handle the
1001       problem/error</li>
1002     </ol>
1003
1004     <p>The first option is the default, while options 2-4 are
1005     configured using the <code class="directive">ErrorDocument</code>
1006     directive, which is followed by the HTTP response code and a URL
1007     or a message. Apache will sometimes offer additional information
1008     regarding the problem/error.</p>
1009
1010     <p>URLs can begin with a slash (/) for local web-paths (relative
1011     to the <code class="directive"><a href="#documentroot">DocumentRoot</a></code>), or be a
1012     full URL which the client can resolve. Alternatively, a message
1013     can be provided to be displayed by the browser. Examples:</p>
1014
1015     <div class="example"><p><code>
1016       ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
1017       ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
1018       ErrorDocument 401 /subscription_info.html<br />
1019       ErrorDocument 403 "Sorry can't allow you access today"
1020     </code></p></div>
1021
1022     <p>Additionally, the special value <code>default</code> can be used
1023     to specify Apache's simple hardcoded message.  While not required
1024     under normal circumstances, <code>default</code> will restore
1025     Apache's simple hardcoded message for configurations that would
1026     otherwise inherit an existing <code class="directive">ErrorDocument</code>.</p>
1027
1028     <div class="example"><p><code>
1029       ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
1030       &lt;Directory /web/docs&gt;<br />
1031       <span class="indent">
1032         ErrorDocument 404 default<br />
1033       </span>
1034       &lt;/Directory&gt;
1035     </code></p></div>
1036
1037     <p>Note that when you specify an <code class="directive">ErrorDocument</code>
1038     that points to a remote URL (ie. anything with a method such as
1039     <code>http</code> in front of it), Apache will send a redirect to the
1040     client to tell it where to find the document, even if the
1041     document ends up being on the same server. This has several
1042     implications, the most important being that the client will not
1043     receive the original error status code, but instead will
1044     receive a redirect status code. This in turn can confuse web
1045     robots and other clients which try to determine if a URL is
1046     valid using the status code. In addition, if you use a remote
1047     URL in an <code>ErrorDocument 401</code>, the client will not
1048     know to prompt the user for a password since it will not
1049     receive the 401 status code. Therefore, <strong>if you use an
1050     <code>ErrorDocument 401</code> directive then it must refer to a local
1051     document.</strong></p>
1052
1053     <p>Microsoft Internet Explorer (MSIE) will by default ignore
1054     server-generated error messages when they are "too small" and substitute
1055     its own "friendly" error messages. The size threshold varies depending on
1056     the type of error, but in general, if you make your error document
1057     greater than 512 bytes, then MSIE will show the server-generated
1058     error rather than masking it.  More information is available in
1059     Microsoft Knowledge Base article <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
1060
1061     <p>Although most error messages can be overriden, there are certain
1062     circumstances where the internal messages are used regardless of the
1063     setting of <code class="directive"><a href="#errordocument">ErrorDocument</a></code>.  In
1064     particular, if a malformed request is detected, normal request processing
1065     will be immediately halted and the internal error message returned.
1066     This is necessary to guard against security problems caused by
1067     bad requests.</p>
1068
1069     <p>Prior to version 2.0, messages were indicated by prefixing
1070     them with a single unmatched double quote character.</p>
1071
1072 <h3>See also</h3>
1073 <ul>
1074 <li><a href="../custom-error.html">documentation of
1075     customizable responses</a></li>
1076 </ul>
1077 </div>
1078 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1079 <div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">Directive</a></h2>
1080 <table class="directive">
1081 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location where the server will log errors</td></tr>
1082 <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>
1083 <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>
1084 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1085 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1086 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1087 </table>
1088     <p>The <code class="directive">ErrorLog</code> directive sets the name of
1089     the file to which the server will log any errors it encounters. If
1090     the <var>file-path</var> is not absolute then it is assumed to be 
1091     relative to the <code class="directive"><a href="#serverroot">ServerRoot</a></code>.</p>
1092
1093     <div class="example"><h3>Example</h3><p><code>
1094     ErrorLog /var/log/httpd/error_log
1095     </code></p></div>
1096
1097     <p>If the <var>file-path</var>
1098     begins with a pipe (|) then it is assumed to be a command to spawn
1099     to handle the error log.</p>
1100
1101     <div class="example"><h3>Example</h3><p><code>
1102     ErrorLog "|/usr/local/bin/httpd_errors"
1103     </code></p></div>
1104
1105     <p>Using <code>syslog</code> instead of a filename enables logging
1106     via syslogd(8) if the system supports it. The default is to use
1107     syslog facility <code>local7</code>, but you can override this by
1108     using the <code>syslog:<var>facility</var></code> syntax where
1109     <var>facility</var> can be one of the names usually documented in
1110     syslog(1).</p>
1111
1112     <div class="example"><h3>Example</h3><p><code>
1113     ErrorLog syslog:user
1114     </code></p></div>
1115
1116     <p>SECURITY: See the <a href="../misc/security_tips.html#serverroot">security tips</a>
1117     document for details on why your security could be compromised
1118     if the directory where log files are stored is writable by
1119     anyone other than the user that starts the server.</p>
1120     <div class="warning"><h3>Note</h3>
1121       <p>When entering a file path on non-Unix platforms, care should be taken
1122       to make sure that only forward slashed are used even though the platform
1123       may allow the use of back slashes. In general it is a good idea to always 
1124       use forward slashes throughout the configuration files.</p>
1125     </div>
1126
1127 <h3>See also</h3>
1128 <ul>
1129 <li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
1130 <li><a href="../logs.html">Apache Log Files</a></li>
1131 </ul>
1132 </div>
1133 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1134 <div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">Directive</a></h2>
1135 <table class="directive">
1136 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File attributes used to create the ETag
1137 HTTP response header</td></tr>
1138 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
1139 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
1140 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1141 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1142 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1143 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1144 </table>
1145     <p>
1146     The <code class="directive">FileETag</code> directive configures the file
1147     attributes that are used to create the <code>ETag</code> (entity
1148     tag) response header field when the document is based on a file.
1149     (The <code>ETag</code> value is used in cache management to save
1150     network bandwidth.) In Apache 1.3.22 and earlier, the
1151     <code>ETag</code> value was <em>always</em> formed
1152     from the file's inode, size, and last-modified time (mtime). The
1153     <code class="directive">FileETag</code> directive allows you to choose
1154     which of these -- if any -- should be used. The recognized keywords are:
1155     </p>
1156
1157     <dl>
1158      <dt><strong>INode</strong></dt>
1159      <dd>The file's i-node number will be included in the calculation</dd>
1160      <dt><strong>MTime</strong></dt>
1161      <dd>The date and time the file was last modified will be included</dd>
1162      <dt><strong>Size</strong></dt>
1163      <dd>The number of bytes in the file will be included</dd>
1164      <dt><strong>All</strong></dt>
1165      <dd>All available fields will be used. This is equivalent to:
1166          <div class="example"><p><code>FileETag INode MTime Size</code></p></div></dd>
1167      <dt><strong>None</strong></dt>
1168      <dd>If a document is file-based, no <code>ETag</code> field will be
1169        included in the response</dd>
1170     </dl>
1171
1172     <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
1173     keywords may be prefixed with either <code>+</code> or <code>-</code>,
1174     which allow changes to be made to the default setting inherited
1175     from a broader scope. Any keyword appearing without such a prefix
1176     immediately and completely cancels the inherited setting.</p>
1177
1178     <p>If a directory's configuration includes
1179     <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
1180     subdirectory's includes <code>FileETag&nbsp;-INode</code>,
1181     the setting for that subdirectory (which will be inherited by
1182     any sub-subdirectories that don't override it) will be equivalent to
1183     <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
1184     <div class="warning"><h3>Warning</h3>
1185     Do not change the default for directories or locations that have WebDAV
1186     enabled and use <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> as a storage provider.
1187     <code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> uses <code>INode&nbsp;MTime&nbsp;Size</code>
1188     as a fixed format for <code>ETag</code> comparisons on conditional requests.
1189     These conditional requests will break if the <code>ETag</code> format is
1190     changed via <code class="directive">FileETag</code>.
1191     </div>
1192
1193 </div>
1194 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1195 <div class="directive-section"><h2><a name="Files" id="Files">&lt;Files&gt;</a> <a name="files" id="files">Directive</a></h2>
1196 <table class="directive">
1197 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to matched
1198 filenames</td></tr>
1199 <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>
1200 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1201 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1202 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1203 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1204 </table>
1205     <p>The <code class="directive">&lt;Files&gt;</code> directive
1206     limits the scope of the enclosed directives by filename. It is comparable
1207     to the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
1208     and <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
1209     directives. It should be matched with a <code>&lt;/Files&gt;</code>
1210     directive. The directives given within this section will be applied to
1211     any object with a basename (last component of filename) matching the
1212     specified filename. <code class="directive">&lt;Files&gt;</code>
1213     sections are processed in the order they appear in the
1214     configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
1215     <code>.htaccess</code> files are read, but before <code class="directive"><a href="#location">&lt;Location&gt;</a></code> sections. Note
1216     that <code class="directive">&lt;Files&gt;</code> can be nested
1217     inside <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections to restrict the
1218     portion of the filesystem they apply to.</p>
1219
1220     <p>The <var>filename</var> argument should include a filename, or
1221     a wild-card string, where <code>?</code> matches any single character,
1222     and <code>*</code> matches any sequences of characters.
1223     <a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a> 
1224     can also be used, with the addition of the
1225     <code>~</code> character. For example:</p>
1226
1227     <div class="example"><p><code>
1228       &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
1229     </code></p></div>
1230
1231     <p>would match most common Internet graphics formats. <code class="directive"><a href="#filesmatch">&lt;FilesMatch&gt;</a></code> is preferred,
1232     however.</p>
1233
1234     <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
1235     <code>.htaccess</code> files. This allows users to control access to
1236     their own files, at a file-by-file level.</p>
1237
1238
1239 <h3>See also</h3>
1240 <ul>
1241 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1242     and &lt;Files&gt; sections work</a> for an explanation of how these
1243     different sections are combined when a request is received</li>
1244 </ul>
1245 </div>
1246 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1247 <div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch">&lt;FilesMatch&gt;</a> <a name="filesmatch" id="filesmatch">Directive</a></h2>
1248 <table class="directive">
1249 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply to regular-expression matched
1250 filenames</td></tr>
1251 <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>
1252 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1253 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1254 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1255 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1256 </table>
1257     <p>The <code class="directive">&lt;FilesMatch&gt;</code> directive
1258     limits the scope of the enclosed directives by filename, just as the
1259     <code class="directive"><a href="#files">&lt;Files&gt;</a></code> directive
1260     does. However, it accepts a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular 
1261     expression</a>. For example:</p>
1262
1263     <div class="example"><p><code>
1264       &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
1265     </code></p></div>
1266
1267     <p>would match most common Internet graphics formats.</p>
1268
1269 <h3>See also</h3>
1270 <ul>
1271 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
1272     and &lt;Files&gt; sections work</a> for an explanation of how these
1273     different sections are combined when a request is received</li>
1274 </ul>
1275 </div>
1276 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1277 <div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">Directive</a></h2>
1278 <table class="directive">
1279 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be served with the specified
1280 media type in the HTTP Content-Type header field</td></tr>
1281 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ForceType <var>media-type</var>|None</code></td></tr>
1282 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1283 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
1284 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1285 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1286 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved to the core in Apache 2.0</td></tr>
1287 </table>
1288     <p>When placed into an <code>.htaccess</code> file or a
1289     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>, or
1290     <code class="directive"><a href="#location">&lt;Location&gt;</a></code> or
1291     <code class="directive"><a href="#files">&lt;Files&gt;</a></code>
1292     section, this directive forces all matching files to be served
1293     with the content type identification given by
1294     <var>media-type</var>. For example, if you had a directory full of
1295     GIF files, but did not want to label them all with <code>.gif</code>,
1296     you might want to use:</p>
1297
1298     <div class="example"><p><code>
1299       ForceType image/gif
1300     </code></p></div>
1301
1302     <p>Note that this directive overrides other indirect media type
1303     associations defined in mime.types or via the
1304     <code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code>.</p>
1305
1306     <p>You can also override more general
1307     <code class="directive">ForceType</code> settings
1308     by using the value of <code>None</code>:</p>
1309
1310     <div class="example"><p><code>
1311       # force all files to be image/gif:<br />
1312       &lt;Location /images&gt;<br />
1313         <span class="indent">
1314           ForceType image/gif<br />
1315         </span>
1316       &lt;/Location&gt;<br />
1317       <br />
1318       # but normal mime-type associations here:<br />
1319       &lt;Location /images/mixed&gt;<br />
1320       <span class="indent">
1321         ForceType None<br />
1322       </span>
1323       &lt;/Location&gt;
1324     </code></p></div>
1325
1326 </div>
1327 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1328 <div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">Directive</a></h2>
1329 <table class="directive">
1330 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables DNS lookups on client IP addresses</td></tr>
1331 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
1332 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>HostnameLookups Off</code></td></tr>
1333 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1334 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1335 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1336 </table>
1337     <p>This directive enables DNS lookups so that host names can be
1338     logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
1339     The value <code>Double</code> refers to doing double-reverse
1340     DNS lookup. That is, after a reverse lookup is performed, a forward
1341     lookup is then performed on that result. At least one of the IP
1342     addresses in the forward lookup must match the original
1343     address. (In "tcpwrappers" terminology this is called
1344     <code>PARANOID</code>.)</p>
1345
1346     <p>Regardless of the setting, when <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> is
1347     used for controlling access by hostname, a double reverse lookup
1348     will be performed.  This is necessary for security. Note that the
1349     result of this double-reverse isn't generally available unless you
1350     set <code>HostnameLookups Double</code>. For example, if only
1351     <code>HostnameLookups On</code> and a request is made to an object
1352     that is protected by hostname restrictions, regardless of whether
1353     the double-reverse fails or not, CGIs will still be passed the
1354     single-reverse result in <code>REMOTE_HOST</code>.</p>
1355
1356     <p>The default is <code>Off</code> in order to save the network
1357     traffic for those sites that don't truly need the reverse
1358     lookups done. It is also better for the end users because they
1359     don't have to suffer the extra latency that a lookup entails.
1360     Heavily loaded sites should leave this directive
1361     <code>Off</code>, since DNS lookups can take considerable
1362     amounts of time. The utility <code class="program"><a href="../programs/logresolve.html">logresolve</a></code>, compiled by
1363     default to the <code>bin</code> subdirectory of your installation
1364     directory, can be used to look up host names from logged IP addresses
1365     offline.</p>
1366
1367 </div>
1368 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1369 <div class="directive-section"><h2><a name="If" id="If">&lt;If&gt;</a> <a name="if" id="if">Directive</a></h2>
1370 <table class="directive">
1371 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only if a condition is
1372 satisfied by a request at runtime</td></tr>
1373 <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>
1374 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1375 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1376 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1377 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1378 </table>
1379     <p>The <code class="directive">&lt;If&gt;</code> directive
1380     evaluates an expression at runtime, and applies the enclosed
1381     directives if and only if the expression evaluates to true.
1382     For example:</p>
1383
1384     <div class="example"><p><code>
1385         &lt;If "$req{Host} = ''"&gt;
1386     </code></p></div>
1387
1388     <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
1389
1390     <p>You may compare the value of any variable in the request headers
1391     ($req), response headers ($resp) or environment ($env) in your
1392     expression.</p>
1393
1394 <h3>See also</h3>
1395 <ul>
1396 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
1397     &lt;Files&gt; sections work</a> for an explanation of how these
1398     different sections are combined when a request is received.
1399     <code class="directive">&lt;If&gt;</code> has the same precedence
1400     and usage as <code class="directive">&lt;Files&gt;</code></li>
1401 </ul>
1402 </div>
1403 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1404 <div class="directive-section"><h2><a name="IfDefine" id="IfDefine">&lt;IfDefine&gt;</a> <a name="ifdefine" id="ifdefine">Directive</a></h2>
1405 <table class="directive">
1406 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that will be processed only
1407 if a test is true at startup</td></tr>
1408 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
1409     &lt;/IfDefine&gt;</code></td></tr>
1410 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1411 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1412 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1413 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1414 </table>
1415     <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
1416     </code> section is used to mark directives that are conditional. The
1417     directives within an <code class="directive">&lt;IfDefine&gt;</code>
1418     section are only processed if the <var>test</var> is true. If <var>
1419     test</var> is false, everything between the start and end markers is
1420     ignored.</p>
1421
1422     <p>The <var>test</var> in the <code class="directive">&lt;IfDefine&gt;</code> section directive can be one of two forms:</p>
1423
1424     <ul>
1425       <li><var>parameter-name</var></li>
1426
1427       <li><code>!</code><var>parameter-name</var></li>
1428     </ul>
1429
1430     <p>In the former case, the directives between the start and end
1431     markers are only processed if the parameter named
1432     <var>parameter-name</var> is defined. The second format reverses
1433     the test, and only processes the directives if
1434     <var>parameter-name</var> is <strong>not</strong> defined.</p>
1435
1436     <p>The <var>parameter-name</var> argument is a define as given on the
1437     <code class="program"><a href="../programs/httpd.html">httpd</a></code> command line via <code>-D<var>parameter</var>
1438     </code> at the time the server was started or by the <code class="directive"><a href="#define">Define</a></code> directive.</p>
1439
1440     <p><code class="directive">&lt;IfDefine&gt;</code> sections are
1441     nest-able, which can be used to implement simple
1442     multiple-parameter tests. Example:</p>
1443
1444     <div class="example"><p><code>
1445       httpd -DReverseProxy -DUseCache -DMemCache ...<br />
1446       <br />
1447       # httpd.conf<br />
1448       &lt;IfDefine ReverseProxy&gt;<br />
1449       <span class="indent">
1450         LoadModule proxy_module   modules/mod_proxy.so<br />
1451         LoadModule proxy_http_module   modules/mod_proxy_http.so<br />
1452         &lt;IfDefine UseCache&gt;<br />
1453         <span class="indent">
1454           LoadModule cache_module   modules/mod_cache.so<br />
1455           &lt;IfDefine MemCache&gt;<br />
1456           <span class="indent">
1457             LoadModule mem_cache_module   modules/mod_mem_cache.so<br />
1458           </span>
1459           &lt;/IfDefine&gt;<br />
1460           &lt;IfDefine !MemCache&gt;<br />
1461           <span class="indent">
1462             LoadModule disk_cache_module   modules/mod_disk_cache.so<br />
1463           </span>
1464           &lt;/IfDefine&gt;
1465         </span>
1466         &lt;/IfDefine&gt;
1467       </span>
1468       &lt;/IfDefine&gt;
1469     </code></p></div>
1470
1471 </div>
1472 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1473 <div class="directive-section"><h2><a name="IfModule" id="IfModule">&lt;IfModule&gt;</a> <a name="ifmodule" id="ifmodule">Directive</a></h2>
1474 <table class="directive">
1475 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Encloses directives that are processed conditional on the
1476 presence or absence of a specific module</td></tr>
1477 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
1478     &lt;/IfModule&gt;</code></td></tr>
1479 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1480 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1481 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1482 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1483 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Module identifiers are available in version 2.1 and
1484 later.</td></tr>
1485 </table>
1486     <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
1487     section is used to mark directives that are conditional on the presence of
1488     a specific module. The directives within an <code class="directive">&lt;IfModule&gt;</code> section are only processed if the <var>test</var>
1489     is true. If <var>test</var> is false, everything between the start and
1490     end markers is ignored.</p>
1491
1492     <p>The <var>test</var> in the <code class="directive">&lt;IfModule&gt;</code> section directive can be one of two forms:</p>
1493
1494     <ul>
1495       <li><var>module</var></li>
1496
1497       <li>!<var>module</var></li>
1498     </ul>
1499
1500     <p>In the former case, the directives between the start and end
1501     markers are only processed if the module named <var>module</var>
1502     is included in Apache -- either compiled in or
1503     dynamically loaded using <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>. The second format reverses the test,
1504     and only processes the directives if <var>module</var> is
1505     <strong>not</strong> included.</p>
1506
1507     <p>The <var>module</var> argument can be either the module identifier or
1508     the file name of the module, at the time it was compiled.  For example,
1509     <code>rewrite_module</code> is the identifier and
1510     <code>mod_rewrite.c</code> is the file name. If a module consists of
1511     several source files, use the name of the file containing the string
1512     <code>STANDARD20_MODULE_STUFF</code>.</p>
1513
1514     <p><code class="directive">&lt;IfModule&gt;</code> sections are
1515     nest-able, which can be used to implement simple multiple-module
1516     tests.</p>
1517
1518     <div class="note">This section should only be used if you need to have one
1519     configuration file that works whether or not a specific module
1520     is available. In normal operation, directives need not be
1521     placed in <code class="directive">&lt;IfModule&gt;</code>
1522     sections.</div>
1523
1524 </div>
1525 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1526 <div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">Directive</a></h2>
1527 <table class="directive">
1528 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Includes other configuration files from within
1529 the server configuration files</td></tr>
1530 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr>
1531 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1532 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1533 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1534 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Wildcard matching available in 2.0.41 and later</td></tr>
1535 </table>
1536     <p>This directive allows inclusion of other configuration files
1537     from within the server configuration files.</p>
1538
1539     <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
1540     include several files at once, in alphabetical order. In
1541     addition, if <code class="directive">Include</code> points to a directory,
1542     rather than a file, Apache will read all files in that directory
1543     and any subdirectory.  However, including entire directories is not
1544     recommended, because it is easy to accidentally leave temporary
1545     files in a directory that can cause <code class="program"><a href="../programs/httpd.html">httpd</a></code> to
1546     fail. Instead, we encourage you to use the wildcard syntax shown
1547     below, to include files that match a particular pattern, such as
1548     *.conf, for example.</p>
1549
1550     <p>The file path specified may be an absolute path, or may be relative 
1551     to the <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory.</p>
1552
1553     <p>Examples:</p>
1554
1555     <div class="example"><p><code>
1556       Include /usr/local/apache2/conf/ssl.conf<br />
1557       Include /usr/local/apache2/conf/vhosts/*.conf
1558     </code></p></div>
1559
1560     <p>Or, providing paths relative to your <code class="directive"><a href="#serverroot">ServerRoot</a></code> directory:</p>
1561
1562     <div class="example"><p><code>
1563       Include conf/ssl.conf<br />
1564       Include conf/vhosts/*.conf
1565     </code></p></div>
1566
1567 <h3>See also</h3>
1568 <ul>
1569 <li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
1570 </ul>
1571 </div>
1572 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1573 <div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">Directive</a></h2>
1574 <table class="directive">
1575 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables HTTP persistent connections</td></tr>
1576 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAlive On|Off</code></td></tr>
1577 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAlive On</code></td></tr>
1578 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1579 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1580 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1581 </table>
1582     <p>The Keep-Alive extension to HTTP/1.0 and the persistent
1583     connection feature of HTTP/1.1 provide long-lived HTTP sessions
1584     which allow multiple requests to be sent over the same TCP
1585     connection. In some cases this has been shown to result in an
1586     almost 50% speedup in latency times for HTML documents with
1587     many images. To enable Keep-Alive connections, set
1588     <code>KeepAlive On</code>.</p>
1589
1590     <p>For HTTP/1.0 clients, Keep-Alive connections will only be
1591     used if they are specifically requested by a client. In
1592     addition, a Keep-Alive connection with an HTTP/1.0 client can
1593     only be used when the length of the content is known in
1594     advance. This implies that dynamic content such as CGI output,
1595     SSI pages, and server-generated directory listings will
1596     generally not use Keep-Alive connections to HTTP/1.0 clients.
1597     For HTTP/1.1 clients, persistent connections are the default
1598     unless otherwise specified. If the client requests it, chunked
1599     encoding will be used in order to send content of unknown
1600     length over persistent connections.</p>
1601
1602     <p>When a client uses a Keep-Alive connection it will be counted
1603     as a single "request" for the <code class="directive"><a href="../mod/mpm_common.html#maxrequestsperchild">MaxRequestsPerChild</a></code> directive, regardless
1604     of how many requests are sent using the connection.</p>
1605
1606 <h3>See also</h3>
1607 <ul>
1608 <li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
1609 </ul>
1610 </div>
1611 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1612 <div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">Directive</a></h2>
1613 <table class="directive">
1614 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for subsequent
1615 requests on a persistent connection</td></tr>
1616 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>KeepAliveTimeout <var>num</var>[ms]</code></td></tr>
1617 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
1618 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1619 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1620 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1621 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Specifying a value in milliseconds is available in 
1622 Apache 2.3.2 and later</td></tr>
1623 </table>
1624     <p>The number of seconds Apache will wait for a subsequent
1625     request before closing the connection. By adding a postfix of ms the
1626     timeout can be also set in milliseconds. Once a request has been
1627     received, the timeout value specified by the
1628     <code class="directive"><a href="#timeout">Timeout</a></code> directive applies.</p>
1629
1630     <p>Setting <code class="directive">KeepAliveTimeout</code> to a high value
1631     may cause performance problems in heavily loaded servers. The
1632     higher the timeout, the more server processes will be kept
1633     occupied waiting on connections with idle clients.</p>
1634     
1635     <p>In a name-based virtual host context, the value of the first
1636     defined virtual host (the default host) in a set of <code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code> will be used.
1637     The other values will be ignored.</p>
1638
1639 </div>
1640 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1641 <div class="directive-section"><h2><a name="Limit" id="Limit">&lt;Limit&gt;</a> <a name="limit" id="limit">Directive</a></h2>
1642 <table class="directive">
1643 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict enclosed access controls to only certain HTTP
1644 methods</td></tr>
1645 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
1646     &lt;/Limit&gt;</code></td></tr>
1647 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1648 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
1649 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1650 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1651 </table>
1652     <p>Access controls are normally effective for
1653     <strong>all</strong> access methods, and this is the usual
1654     desired behavior. <strong>In the general case, access control
1655     directives should not be placed within a
1656     <code class="directive">&lt;Limit&gt;</code> section.</strong></p>
1657
1658     <p>The purpose of the <code class="directive">&lt;Limit&gt;</code>
1659     directive is to restrict the effect of the access controls to the
1660     nominated HTTP methods. For all other methods, the access
1661     restrictions that are enclosed in the <code class="directive">&lt;Limit&gt;</code> bracket <strong>will have no
1662     effect</strong>. The following example applies the access control
1663     only to the methods <code>POST</code>, <code>PUT</code>, and
1664     <code>DELETE</code>, leaving all other methods unprotected:</p>
1665
1666     <div class="example"><p><code>
1667       &lt;Limit POST PUT DELETE&gt;<br />
1668       <span class="indent">
1669         Require valid-user<br />
1670       </span>
1671       &lt;/Limit&gt;
1672     </code></p></div>
1673
1674     <p>The method names listed can be one or more of: <code>GET</code>,
1675     <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
1676     <code>CONNECT</code>, <code>OPTIONS</code>,
1677     <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
1678     <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
1679     <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
1680     case-sensitive.</strong> If <code>GET</code> is used it will also
1681     restrict <code>HEAD</code> requests. The <code>TRACE</code> method
1682     cannot be limited (see <code class="directive"><a href="#traceenable">TraceEnable</a></code>).</p>
1683
1684     <div class="warning">A <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section should always be
1685     used in preference to a <code class="directive">&lt;Limit&gt;</code>
1686     section when restricting access, since a <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> section provides protection
1687     against arbitrary methods.</div>
1688
1689     <p>The <code class="directive">&lt;Limit&gt;</code> and
1690     <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code>
1691     directives may be nested.  In this case, each successive level of
1692     <code class="directive">&lt;Limit&gt;</code> or <code class="directive"><a href="#limitexcept">&lt;LimitExcept&gt;</a></code> directives must
1693     further restrict the set of methods to which access controls apply.</p>
1694
1695     <div class="warning">When using
1696     <code class="directive">&lt;Limit&gt;</code> or
1697     <code class="directive">&lt;LimitExcept&gt;</code> directives with
1698     the <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directive,
1699     note that the first <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code>
1700     to succeed authorizes the request, regardless of the presence of other
1701     <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> directives.</div>
1702
1703     <p>For example, given the following configuration, all users will
1704     be authorized for <code>POST</code> requests, and the
1705     <code>Require group editors</code> directive will be ignored
1706     in all cases:</p>
1707
1708     <div class="example"><p><code>
1709       &lt;LimitExcept GET&gt;
1710       <span class="indent">
1711         Require valid-user
1712       </span> 
1713       &lt;/LimitExcept&gt;<br />
1714       &lt;Limit POST&gt;
1715       <span class="indent">
1716         Require group editors
1717       </span> 
1718       &lt;/Limit&gt;
1719     </code></p></div>
1720
1721 </div>
1722 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1723 <div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept">&lt;LimitExcept&gt;</a> <a name="limitexcept" id="limitexcept">Directive</a></h2>
1724 <table class="directive">
1725 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restrict access controls to all HTTP methods
1726 except the named ones</td></tr>
1727 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
1728     &lt;/LimitExcept&gt;</code></td></tr>
1729 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1730 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig, Limit</td></tr>
1731 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1732 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1733 </table>
1734     <p><code class="directive">&lt;LimitExcept&gt;</code> and
1735     <code>&lt;/LimitExcept&gt;</code> are used to enclose
1736     a group of access control directives which will then apply to any
1737     HTTP access method <strong>not</strong> listed in the arguments;
1738     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
1739     both standard and nonstandard/unrecognized methods. See the
1740     documentation for <code class="directive"><a href="#limit">&lt;Limit&gt;</a></code> for more details.</p>
1741
1742     <p>For example:</p>
1743
1744     <div class="example"><p><code>
1745       &lt;LimitExcept POST GET&gt;<br />
1746       <span class="indent">
1747         Require valid-user<br />
1748       </span>
1749       &lt;/LimitExcept&gt;
1750     </code></p></div>
1751
1752
1753 </div>
1754 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1755 <div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">Directive</a></h2>
1756 <table class="directive">
1757 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine maximum number of internal redirects and nested
1758 subrequests</td></tr>
1759 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
1760 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
1761 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1762 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1763 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1764 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.47 and later</td></tr>
1765 </table>
1766     <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
1767     redirects the original request to a CGI script. A subrequest is Apache's
1768     mechanism to find out what would happen for some URI if it were requested.
1769     For example, <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> uses subrequests to look for the
1770     files listed in the <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
1771     directive.</p>
1772
1773     <p><code class="directive">LimitInternalRecursion</code> prevents the server
1774     from crashing when entering an infinite loop of internal redirects or
1775     subrequests. Such loops are usually caused by misconfigurations.</p>
1776
1777     <p>The directive stores two different limits, which are evaluated on
1778     per-request basis. The first <var>number</var> is the maximum number of
1779     internal redirects, that may follow each other. The second <var>number</var>
1780     determines, how deep subrequests may be nested. If you specify only one
1781     <var>number</var>, it will be assigned to both limits.</p>
1782
1783     <div class="example"><h3>Example</h3><p><code>
1784       LimitInternalRecursion 5
1785     </code></p></div>
1786
1787 </div>
1788 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1789 <div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">Directive</a></h2>
1790 <table class="directive">
1791 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Restricts the total size of the HTTP request body sent
1792 from the client</td></tr>
1793 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
1794 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestBody 0</code></td></tr>
1795 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1796 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1797 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1798 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1799 </table>
1800     <p>This directive specifies the number of <var>bytes</var> from 0
1801     (meaning unlimited) to 2147483647 (2GB) that are allowed in a
1802     request body.</p>
1803
1804     <p>The <code class="directive">LimitRequestBody</code> directive allows
1805     the user to set a limit on the allowed size of an HTTP request
1806     message body within the context in which the directive is given
1807     (server, per-directory, per-file or per-location). If the client
1808     request exceeds that limit, the server will return an error
1809     response instead of servicing the request. The size of a normal
1810     request message body will vary greatly depending on the nature of
1811     the resource and the methods allowed on that resource. CGI scripts
1812     typically use the message body for retrieving form information.
1813     Implementations of the <code>PUT</code> method will require
1814     a value at least as large as any representation that the server
1815     wishes to accept for that resource.</p>
1816
1817     <p>This directive gives the server administrator greater
1818     control over abnormal client request behavior, which may be
1819     useful for avoiding some forms of denial-of-service
1820     attacks.</p>
1821
1822     <p>If, for example, you are permitting file upload to a particular
1823     location, and wish to limit the size of the uploaded file to 100K,
1824     you might use the following directive:</p>
1825
1826     <div class="example"><p><code>
1827       LimitRequestBody 102400
1828     </code></p></div>
1829
1830
1831 </div>
1832 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1833 <div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">Directive</a></h2>
1834 <table class="directive">
1835 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of HTTP request header fields that
1836 will be accepted from the client</td></tr>
1837 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
1838 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFields 100</code></td></tr>
1839 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1840 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1841 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1842 </table>
1843     <p><var>Number</var> is an integer from 0 (meaning unlimited) to
1844     32767. The default value is defined by the compile-time
1845     constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
1846     distributed).</p>
1847
1848     <p>The <code class="directive">LimitRequestFields</code> directive allows
1849     the server administrator to modify the limit on the number of
1850     request header fields allowed in an HTTP request. A server needs
1851     this value to be larger than the number of fields that a normal
1852     client request might include. The number of request header fields
1853     used by a client rarely exceeds 20, but this may vary among
1854     different client implementations, often depending upon the extent
1855     to which a user has configured their browser to support detailed
1856     content negotiation. Optional HTTP extensions are often expressed
1857     using request header fields.</p>
1858
1859     <p>This directive gives the server administrator greater
1860     control over abnormal client request behavior, which may be
1861     useful for avoiding some forms of denial-of-service attacks.
1862     The value should be increased if normal clients see an error
1863     response from the server that indicates too many fields were
1864     sent in the request.</p>
1865
1866     <p>For example:</p>
1867
1868     <div class="example"><p><code>
1869       LimitRequestFields 50
1870     </code></p></div>
1871
1872
1873 </div>
1874 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1875 <div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">Directive</a></h2>
1876 <table class="directive">
1877 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of the HTTP request header allowed from the
1878 client</td></tr>
1879 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
1880 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
1881 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1882 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1883 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1884 </table>
1885     <p>This directive specifies the number of <var>bytes</var>
1886     that will be allowed in an HTTP request header.</p>
1887
1888     <p>The <code class="directive">LimitRequestFieldSize</code> directive
1889     allows the server administrator to reduce or increase the limit 
1890     on the allowed size of an HTTP request header field. A server
1891     needs this value to be large enough to hold any one header field 
1892     from a normal client request. The size of a normal request header 
1893     field will vary greatly among different client implementations, 
1894     often depending upon the extent to which a user has configured
1895     their browser to support detailed content negotiation. SPNEGO
1896     authentication headers can be up to 12392 bytes.</p>
1897
1898     <p>This directive gives the server administrator greater
1899     control over abnormal client request behavior, which may be
1900     useful for avoiding some forms of denial-of-service attacks.</p>
1901
1902     <p>For example:</p>
1903
1904     <div class="example"><p><code>
1905       LimitRequestFieldSize 4094
1906     </code></p></div>
1907
1908     <div class="note">Under normal conditions, the value should not be changed from
1909     the default.</div>
1910
1911
1912 </div>
1913 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1914 <div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">Directive</a></h2>
1915 <table class="directive">
1916 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limit the size of the HTTP request line that will be accepted
1917 from the client</td></tr>
1918 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
1919 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
1920 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1921 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1922 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1923 </table>
1924     <p>This directive sets the number of <var>bytes</var> that will be 
1925     allowed on the HTTP request-line.</p>
1926
1927     <p>The <code class="directive">LimitRequestLine</code> directive allows
1928     the server administrator to reduce or increase the limit on the allowed size
1929     of a client's HTTP request-line. Since the request-line consists of the
1930     HTTP method, URI, and protocol version, the
1931     <code class="directive">LimitRequestLine</code> directive places a
1932     restriction on the length of a request-URI allowed for a request
1933     on the server. A server needs this value to be large enough to
1934     hold any of its resource names, including any information that
1935     might be passed in the query part of a <code>GET</code> request.</p>
1936
1937     <p>This directive gives the server administrator greater
1938     control over abnormal client request behavior, which may be
1939     useful for avoiding some forms of denial-of-service attacks.</p>
1940
1941     <p>For example:</p>
1942
1943     <div class="example"><p><code>
1944       LimitRequestLine 4094
1945     </code></p></div>
1946
1947     <div class="note">Under normal conditions, the value should not be changed from
1948     the default.</div>
1949
1950 </div>
1951 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1952 <div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">Directive</a></h2>
1953 <table class="directive">
1954 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the size of an XML-based request body</td></tr>
1955 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
1956 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
1957 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1958 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
1959 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1960 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1961 </table>
1962     <p>Limit (in bytes) on maximum size of an XML-based request
1963     body. A value of <code>0</code> will disable any checking.</p>
1964
1965     <p>Example:</p>
1966
1967     <div class="example"><p><code>
1968       LimitXMLRequestBody 0
1969     </code></p></div>
1970
1971
1972 </div>
1973 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1974 <div class="directive-section"><h2><a name="Location" id="Location">&lt;Location&gt;</a> <a name="location" id="location">Directive</a></h2>
1975 <table class="directive">
1976 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to matching
1977 URLs</td></tr>
1978 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Location
1979     <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</code></td></tr>
1980 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1981 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
1982 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
1983 </table>
1984     <p>The <code class="directive">&lt;Location&gt;</code> directive
1985     limits the scope of the enclosed directives by URL. It is similar to the
1986     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code>
1987     directive, and starts a subsection which is terminated with a
1988     <code>&lt;/Location&gt;</code> directive. <code class="directive">&lt;Location&gt;</code> sections are processed in the
1989     order they appear in the configuration file, after the <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections and
1990     <code>.htaccess</code> files are read, and after the <code class="directive"><a href="#files">&lt;Files&gt;</a></code> sections.</p>
1991
1992     <p><code class="directive">&lt;Location&gt;</code> sections operate
1993     completely outside the filesystem.  This has several consequences.
1994     Most importantly, <code class="directive">&lt;Location&gt;</code>
1995     directives should not be used to control access to filesystem
1996     locations.  Since several different URLs may map to the same
1997     filesystem location, such access controls may by circumvented.</p>
1998
1999     <div class="note"><h3>When to use <code class="directive">&lt;Location&gt;</code></h3>
2000
2001     <p>Use <code class="directive">&lt;Location&gt;</code> to apply
2002     directives to content that lives outside the filesystem.  For
2003     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
2004     <code>&lt;Location /&gt;</code>, which is an easy way to 
2005     apply a configuration to the entire server.</p>
2006     </div>
2007
2008     <p>For all origin (non-proxy) requests, the URL to be matched is a
2009     URL-path of the form <code>/path/</code>.  <em>No scheme, hostname,
2010     port, or query string may be included.</em>  For proxy requests, the
2011     URL to be matched is of the form
2012     <code>scheme://servername/path</code>, and you must include the
2013     prefix.</p>
2014
2015     <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
2016     any single character, and <code>*</code> matches any sequences of
2017     characters. Neither wildcard character matches a / in the URL-path.</p>
2018
2019     <p><a class="glossarylink" href="../glossary.html#regex" title="see glossary">Regular expressions</a>
2020     can also be used, with the addition of the <code>~</code> 
2021     character. For example:</p>
2022
2023     <div class="example"><p><code>
2024       &lt;Location ~ "/(extra|special)/data"&gt;
2025     </code></p></div>
2026
2027     <p>would match URLs that contained the substring <code>/extra/data</code>
2028     or <code>/special/data</code>. The directive <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code> behaves
2029     identical to the regex version of <code class="directive">&lt;Location&gt;</code>, and is preferred, for the
2030     simple reason that <code>~</code> is hard to distinguish from
2031     <code>-</code> in many fonts.</p>
2032
2033     <p>The <code class="directive">&lt;Location&gt;</code>
2034     functionality is especially useful when combined with the
2035     <code class="directive"><a href="#sethandler">SetHandler</a></code>
2036     directive. For example, to enable status requests, but allow them
2037     only from browsers at <code>example.com</code>, you might use:</p>
2038
2039     <div class="example"><p><code>
2040       &lt;Location /status&gt;<br />
2041       <span class="indent">
2042         SetHandler server-status<br />
2043         Order Deny,Allow<br />
2044         Deny from all<br />
2045         Allow from .example.com<br />
2046       </span>
2047       &lt;/Location&gt;
2048     </code></p></div>
2049
2050     <div class="note"><h3>Note about / (slash)</h3>
2051       <p>The slash character has special meaning depending on where in a
2052       URL it appears. People may be used to its behavior in the filesystem
2053       where multiple adjacent slashes are frequently collapsed to a single
2054       slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
2055       <code>/home/foo</code>). In URL-space this is not necessarily true.
2056       The <code class="directive"><a href="#locationmatch">&lt;LocationMatch&gt;</a></code>
2057       directive and the regex version of <code class="directive">&lt;Location&gt;</code> require you to explicitly specify multiple
2058       slashes if that is your intention.</p>
2059
2060       <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
2061       the request URL <code>/abc</code> but not the request URL <code>
2062       //abc</code>. The (non-regex) <code class="directive">&lt;Location&gt;</code> directive behaves similarly when used for
2063       proxy requests. But when (non-regex) <code class="directive">&lt;Location&gt;</code> is used for non-proxy requests it will
2064       implicitly match multiple slashes with a single slash. For example,
2065       if you specify <code>&lt;Location /abc/def&gt;</code> and the
2066       request is to <code>/abc//def</code> then it will match.</p>
2067     </div>
2068
2069 <h3>See also</h3>
2070 <ul>
2071 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2072     and &lt;Files&gt; sections work</a> for an explanation of how these
2073     different sections are combined when a request is received.</li>
2074 <li><code class="directive"><a href="#locationmatch">LocationMatch</a></code></li>
2075 </ul>
2076 </div>
2077 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2078 <div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch">&lt;LocationMatch&gt;</a> <a name="locationmatch" id="locationmatch">Directive</a></h2>
2079 <table class="directive">
2080 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Applies the enclosed directives only to regular-expression
2081 matching URLs</td></tr>
2082 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;LocationMatch
2083     <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</code></td></tr>
2084 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2085 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2086 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2087 </table>
2088     <p>The <code class="directive">&lt;LocationMatch&gt;</code> directive
2089     limits the scope of the enclosed directives by URL, in an identical manner
2090     to <code class="directive"><a href="#location">&lt;Location&gt;</a></code>. However,
2091     it takes a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
2092     as an argument instead of a simple string. For example:</p>
2093
2094     <div class="example"><p><code>
2095       &lt;LocationMatch "/(extra|special)/data"&gt;
2096     </code></p></div>
2097
2098     <p>would match URLs that contained the substring <code>/extra/data</code>
2099     or <code>/special/data</code>.</p>
2100
2101 <h3>See also</h3>
2102 <ul>
2103 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
2104     and &lt;Files&gt; sections work</a> for an explanation of how these
2105     different sections are combined when a request is received</li>
2106 </ul>
2107 </div>
2108 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2109 <div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">Directive</a></h2>
2110 <table class="directive">
2111 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Controls the verbosity of the ErrorLog</td></tr>
2112 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogLevel <var>level</var></code></td></tr>
2113 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>LogLevel warn</code></td></tr>
2114 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2115 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2116 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2117 </table>
2118     <p><code class="directive">LogLevel</code> adjusts the verbosity of the
2119     messages recorded in the error logs (see <code class="directive"><a href="#errorlog">ErrorLog</a></code> directive). The following
2120     <var>level</var>s are available, in order of decreasing
2121     significance:</p>
2122
2123     <table class="bordered">
2124     
2125       <tr>
2126         <th><strong>Level</strong> </th>
2127
2128         <th><strong>Description</strong> </th>
2129
2130         <th><strong>Example</strong> </th>
2131       </tr>
2132
2133       <tr>
2134         <td><code>emerg</code> </td>
2135
2136         <td>Emergencies - system is unusable.</td>
2137
2138         <td>"Child cannot open lock file. Exiting"</td>
2139       </tr>
2140
2141       <tr>
2142         <td><code>alert</code> </td>
2143
2144         <td>Action must be taken immediately.</td>
2145
2146         <td>"getpwuid: couldn't determine user name from uid"</td>
2147       </tr>
2148
2149       <tr>
2150         <td><code>crit</code> </td>
2151
2152         <td>Critical Conditions.</td>
2153
2154         <td>"socket: Failed to get a socket, exiting child"</td>
2155       </tr>
2156
2157       <tr>
2158         <td><code>error</code> </td>
2159
2160         <td>Error conditions.</td>
2161
2162         <td>"Premature end of script headers"</td>
2163       </tr>
2164
2165       <tr>
2166         <td><code>warn</code> </td>
2167
2168         <td>Warning conditions.</td>
2169
2170         <td>"child process 1234 did not exit, sending another
2171         SIGHUP"</td>
2172       </tr>
2173
2174       <tr>
2175         <td><code>notice</code> </td>
2176
2177         <td>Normal but significant condition.</td>
2178
2179         <td>"httpd: caught SIGBUS, attempting to dump core in
2180         ..."</td>
2181       </tr>
2182
2183       <tr>
2184         <td><code>info</code> </td>
2185
2186         <td>Informational.</td>
2187
2188         <td>"Server seems busy, (you may need to increase
2189         StartServers, or Min/MaxSpareServers)..."</td>
2190       </tr>
2191
2192       <tr>
2193         <td><code>debug</code> </td>
2194
2195         <td>Debug-level messages</td>
2196
2197         <td>"Opening config file ..."</td>
2198       </tr>
2199     </table>
2200
2201     <p>When a particular level is specified, messages from all
2202     other levels of higher significance will be reported as well.
2203     <em>E.g.</em>, when <code>LogLevel info</code> is specified,
2204     then messages with log levels of <code>notice</code> and
2205     <code>warn</code> will also be posted.</p>
2206
2207     <p>Using a level of at least <code>crit</code> is
2208     recommended.</p>
2209
2210     <p>For example:</p>
2211
2212     <div class="example"><p><code>
2213       LogLevel notice
2214     </code></p></div>
2215
2216     <div class="note"><h3>Note</h3>
2217       <p>When logging to a regular file messages of the level
2218       <code>notice</code> cannot be suppressed and thus are always
2219       logged. However, this doesn't apply when logging is done
2220       using <code>syslog</code>.</p>
2221     </div>
2222
2223 </div>
2224 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2225 <div class="directive-section"><h2><a name="MaxKeepAliveRequests" id="MaxKeepAliveRequests">MaxKeepAliveRequests</a> <a name="maxkeepaliverequests" id="maxkeepaliverequests">Directive</a></h2>
2226 <table class="directive">
2227 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of requests allowed on a persistent
2228 connection</td></tr>
2229 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>MaxKeepAliveRequests <var>number</var></code></td></tr>
2230 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>MaxKeepAliveRequests 100</code></td></tr>
2231 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2232 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2233 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2234 </table>
2235     <p>The <code class="directive">MaxKeepAliveRequests</code> directive
2236     limits the number of requests allowed per connection when
2237     <code class="directive"><a href="#keepalive">KeepAlive</a></code> is on. If it is
2238     set to <code>0</code>, unlimited requests will be allowed. We
2239     recommend that this setting be kept to a high value for maximum
2240     server performance.</p>
2241
2242     <p>For example:</p>
2243
2244     <div class="example"><p><code>
2245       MaxKeepAliveRequests 500
2246     </code></p></div>
2247
2248 </div>
2249 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2250 <div class="directive-section"><h2><a name="NameVirtualHost" id="NameVirtualHost">NameVirtualHost</a> <a name="namevirtualhost" id="namevirtualhost">Directive</a></h2>
2251 <table class="directive">
2252 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Designates an IP address for name-virtual
2253 hosting</td></tr>
2254 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NameVirtualHost <var>addr</var>[:<var>port</var>]</code></td></tr>
2255 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
2256 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2257 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2258 </table>
2259
2260 <p>A single <code class="directive">NameVirtualHost</code> directive 
2261 identifies a set of identical virtual hosts on which the server will  
2262 further select from on the basis of the <em>hostname</em> 
2263 requested by the client.  The <code class="directive">NameVirtualHost</code>
2264 directive is a required directive if you want to configure 
2265 <a href="../vhosts/">name-based virtual hosts</a>.</p>
2266
2267 <p>This directive, and the corresponding <code class="directive">VirtualHost</code>,
2268 <em>must</em> be qualified with a port number if the server supports both HTTP 
2269 and HTTPS connections.</p>
2270
2271 <p>Although <var>addr</var> can be a hostname, it is recommended
2272 that you always use an IP address or a wildcard.  A wildcard
2273 NameVirtualHost matches only virtualhosts that also have a literal wildcard
2274 as their argument.</p>
2275
2276 <p>In cases where a firewall or other proxy receives the requests and 
2277 forwards them on a different IP address to the server, you must specify the
2278 IP address of the physical interface on the machine which will be
2279 servicing the requests. </p>
2280
2281 <p> In the example below, requests received on interface 192.0.2.1 and port 80 
2282 will only select among the first two virtual hosts. Requests received on
2283 port 80 on any other interface will only select among the third and fourth
2284 virtual hosts. In the common case where the interface isn't important 
2285 to the mapping, only the "*:80" NameVirtualHost and VirtualHost directives 
2286 are necessary.</p>
2287
2288    <div class="example"><p><code>
2289       NameVirtualHost 192.0.2.1:80<br />
2290       NameVirtualHost *:80<br /><br />
2291
2292       &lt;VirtualHost 192.0.2.1:80&gt;<br />
2293       &nbsp; ServerName namebased-a.example.com<br />
2294       &lt;/VirtualHost&gt;<br />
2295       <br />
2296       &lt;VirtualHost 192.0.2.1:80&gt;<br />
2297       &nbsp; Servername namebased-b.example.com<br />
2298       &lt;/VirtualHost&gt;<br />
2299       <br />
2300       &lt;VirtualHost *:80&gt;<br />
2301       &nbsp; ServerName namebased-c.example.com <br />
2302       &lt;/VirtualHost&gt;<br />
2303       <br />
2304       &lt;VirtualHost *:80&gt;<br />
2305       &nbsp; ServerName namebased-d.example.com <br />
2306       &lt;/VirtualHost&gt;<br />
2307       <br />
2308
2309     </code></p></div>
2310
2311     <p>IPv6 addresses must be enclosed in square brackets, as shown
2312     in the following example:</p>
2313
2314     <div class="example"><p><code>
2315       NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
2316     </code></p></div>
2317
2318     <div class="note"><h3>Argument to <code class="directive">&lt;VirtualHost&gt;</code>
2319       directive</h3>
2320       <p>Note that the argument to the <code class="directive">&lt;VirtualHost&gt;</code> directive must
2321       exactly match the argument to the <code class="directive">NameVirtualHost</code> directive.</p>
2322
2323       <div class="example"><p><code>
2324         NameVirtualHost 192.0.2.2:80<br />
2325         &lt;VirtualHost 192.0.2.2:80&gt;<br />
2326         # ...<br />
2327         &lt;/VirtualHost&gt;<br />
2328       </code></p></div>
2329     </div>
2330
2331 <h3>See also</h3>
2332 <ul>
2333 <li><a href="../vhosts/">Virtual Hosts
2334 documentation</a></li>
2335 </ul>
2336 </div>
2337 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2338 <div class="directive-section"><h2><a name="Options" id="Options">Options</a> <a name="options" id="options">Directive</a></h2>
2339 <table class="directive">
2340 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures what features are available in a particular
2341 directory</td></tr>
2342 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Options
2343     [+|-]<var>option</var> [[+|-]<var>option</var>] ...</code></td></tr>
2344 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Options All</code></td></tr>
2345 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2346 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
2347 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2348 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2349 </table>
2350     <p>The <code class="directive">Options</code> directive controls which
2351     server features are available in a particular directory.</p>
2352
2353     <p><var>option</var> can be set to <code>None</code>, in which
2354     case none of the extra features are enabled, or one or more of
2355     the following:</p>
2356
2357     <dl>
2358       <dt><code>All</code></dt>
2359
2360       <dd>All options except for <code>MultiViews</code>. This is the default
2361       setting.</dd>
2362
2363       <dt><code>ExecCGI</code></dt>
2364
2365       <dd>
2366       Execution of CGI scripts using <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>
2367       is permitted.</dd>
2368
2369       <dt><code>FollowSymLinks</code></dt>
2370
2371       <dd>
2372
2373       The server will follow symbolic links in this directory.
2374       <div class="note">
2375       <p>Even though the server follows the symlink it does <em>not</em>
2376       change the pathname used to match against <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> sections.</p>
2377       <p>Note also, that this option <strong>gets ignored</strong> if set
2378       inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
2379       section.</p>
2380       <p>Omitting this option should not be considered a security restriction,
2381       since symlink testing is subject to race conditions that make it
2382       circumventable.</p>
2383       </div></dd>
2384
2385       <dt><code>Includes</code></dt>
2386
2387       <dd>
2388       Server-side includes provided by <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
2389       are permitted.</dd>
2390
2391       <dt><code>IncludesNOEXEC</code></dt>
2392
2393       <dd>
2394
2395       Server-side includes are permitted, but the <code>#exec
2396       cmd</code> and <code>#exec cgi</code> are disabled. It is still
2397       possible to <code>#include virtual</code> CGI scripts from
2398       <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>ed
2399       directories.</dd>
2400
2401       <dt><code>Indexes</code></dt>
2402
2403       <dd>
2404       If a URL which maps to a directory is requested, and there
2405       is no <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>
2406       (<em>e.g.</em>, <code>index.html</code>) in that directory, then
2407       <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> will return a formatted listing
2408       of the directory.</dd>
2409
2410       <dt><code>MultiViews</code></dt>
2411
2412       <dd>
2413       <a href="../content-negotiation.html">Content negotiated</a>
2414       "MultiViews" are allowed using
2415       <code class="module"><a href="../mod/mod_negotiation.html">mod_negotiation</a></code>.</dd>
2416
2417       <dt><code>SymLinksIfOwnerMatch</code></dt>
2418
2419       <dd>The server will only follow symbolic links for which the
2420       target file or directory is owned by the same user id as the
2421       link.
2422
2423       <div class="note"><h3>Note</h3> <p>This option gets ignored if
2424       set inside a <code class="directive"><a href="#location">&lt;Location&gt;</a></code> section.</p>
2425       <p>This option should not be considered a security restriction,
2426       since symlink testing is subject to race conditions that make it
2427       circumventable.</p></div>
2428       </dd>
2429     </dl>
2430
2431     <p>Normally, if multiple <code class="directive">Options</code> could
2432     apply to a directory, then the most specific one is used and
2433     others are ignored; the options are not merged. (See <a href="../sections.html#mergin">how sections are merged</a>.)
2434     However if <em>all</em> the options on the
2435     <code class="directive">Options</code> directive are preceded by a
2436     <code>+</code> or <code>-</code> symbol, the options are
2437     merged. Any options preceded by a <code>+</code> are added to the
2438     options currently in force, and any options preceded by a
2439     <code>-</code> are removed from the options currently in
2440     force. </p>
2441
2442     <div class="warning"><h3>Warning</h3>
2443     <p>Mixing <code class="directive">Options</code> with a <code>+</code> or
2444     <code>-</code> with those without is not valid syntax, and is likely
2445     to cause unexpected results.</p>
2446     </div>
2447
2448     <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
2449
2450     <div class="example"><p><code>
2451       &lt;Directory /web/docs&gt;<br />
2452       <span class="indent">
2453         Options Indexes FollowSymLinks<br />
2454       </span>
2455       &lt;/Directory&gt;<br />
2456       <br />
2457       &lt;Directory /web/docs/spec&gt;<br />
2458       <span class="indent">
2459         Options Includes<br />
2460       </span>
2461       &lt;/Directory&gt;
2462     </code></p></div>
2463
2464     <p>then only <code>Includes</code> will be set for the
2465     <code>/web/docs/spec</code> directory. However if the second
2466     <code class="directive">Options</code> directive uses the <code>+</code> and
2467     <code>-</code> symbols:</p>
2468
2469     <div class="example"><p><code>
2470       &lt;Directory /web/docs&gt;<br />
2471       <span class="indent">
2472         Options Indexes FollowSymLinks<br />
2473       </span>
2474       &lt;/Directory&gt;<br />
2475       <br />
2476       &lt;Directory /web/docs/spec&gt;<br />
2477       <span class="indent">
2478         Options +Includes -Indexes<br />
2479       </span>
2480       &lt;/Directory&gt;
2481     </code></p></div>
2482
2483     <p>then the options <code>FollowSymLinks</code> and
2484     <code>Includes</code> are set for the <code>/web/docs/spec</code>
2485     directory.</p>
2486
2487     <div class="note"><h3>Note</h3>
2488       <p>Using <code>-IncludesNOEXEC</code> or
2489       <code>-Includes</code> disables server-side includes completely
2490       regardless of the previous setting.</p>
2491     </div>
2492
2493     <p>The default in the absence of any other settings is
2494     <code>All</code>.</p>
2495
2496 </div>
2497 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2498 <div class="directive-section"><h2><a name="RLimitCPU" id="RLimitCPU">RLimitCPU</a> <a name="rlimitcpu" id="rlimitcpu">Directive</a></h2>
2499 <table class="directive">
2500 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the CPU consumption of processes launched
2501 by Apache children</td></tr>
2502 <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>
2503 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
2504 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2505 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2506 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2507 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2508 </table>
2509     <p>Takes 1 or 2 parameters. The first parameter sets the soft
2510     resource limit for all processes and the second parameter sets
2511     the maximum resource limit. Either parameter can be a number,
2512     or <code>max</code> to indicate to the server that the limit should
2513     be set to the maximum allowed by the operating system
2514     configuration. Raising the maximum resource limit requires that
2515     the server is running as <code>root</code>, or in the initial startup
2516     phase.</p>
2517
2518     <p>This applies to processes forked off from Apache children
2519     servicing requests, not the Apache children themselves. This
2520     includes CGI scripts and SSI exec commands, but not any
2521     processes forked off from the Apache parent such as piped
2522     logs.</p>
2523
2524     <p>CPU resource limits are expressed in seconds per
2525     process.</p>
2526
2527 <h3>See also</h3>
2528 <ul>
2529 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
2530 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
2531 </ul>
2532 </div>
2533 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2534 <div class="directive-section"><h2><a name="RLimitMEM" id="RLimitMEM">RLimitMEM</a> <a name="rlimitmem" id="rlimitmem">Directive</a></h2>
2535 <table class="directive">
2536 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the memory consumption of processes launched
2537 by Apache children</td></tr>
2538 <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>
2539 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
2540 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2541 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2542 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2543 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2544 </table>
2545     <p>Takes 1 or 2 parameters. The first parameter sets the soft
2546     resource limit for all processes and the second parameter sets
2547     the maximum resource limit. Either parameter can be a number,
2548     or <code>max</code> to indicate to the server that the limit should
2549     be set to the maximum allowed by the operating system
2550     configuration. Raising the maximum resource limit requires that
2551     the server is running as <code>root</code>, or in the initial startup
2552     phase.</p>
2553
2554     <p>This applies to processes forked off from Apache children
2555     servicing requests, not the Apache children themselves. This
2556     includes CGI scripts and SSI exec commands, but not any
2557     processes forked off from the Apache parent such as piped
2558     logs.</p>
2559
2560     <p>Memory resource limits are expressed in bytes per
2561     process.</p>
2562
2563 <h3>See also</h3>
2564 <ul>
2565 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
2566 <li><code class="directive"><a href="#rlimitnproc">RLimitNPROC</a></code></li>
2567 </ul>
2568 </div>
2569 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2570 <div class="directive-section"><h2><a name="RLimitNPROC" id="RLimitNPROC">RLimitNPROC</a> <a name="rlimitnproc" id="rlimitnproc">Directive</a></h2>
2571 <table class="directive">
2572 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Limits the number of processes that can be launched by
2573 processes launched by Apache children</td></tr>
2574 <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>
2575 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset; uses operating system defaults</code></td></tr>
2576 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2577 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2578 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2579 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2580 </table>
2581     <p>Takes 1 or 2 parameters. The first parameter sets the soft
2582     resource limit for all processes and the second parameter sets
2583     the maximum resource limit. Either parameter can be a number,
2584     or <code>max</code> to indicate to the server that the limit
2585     should be set to the maximum allowed by the operating system
2586     configuration. Raising the maximum resource limit requires that
2587     the server is running as <code>root</code>, or in the initial startup
2588     phase.</p>
2589
2590     <p>This applies to processes forked off from Apache children
2591     servicing requests, not the Apache children themselves. This
2592     includes CGI scripts and SSI exec commands, but not any
2593     processes forked off from the Apache parent such as piped
2594     logs.</p>
2595
2596     <p>Process limits control the number of processes per user.</p>
2597
2598     <div class="note"><h3>Note</h3>
2599       <p>If CGI processes are <strong>not</strong> running
2600       under user ids other than the web server user id, this directive
2601       will limit the number of processes that the server itself can
2602       create. Evidence of this situation will be indicated by
2603       <strong><code>cannot fork</code></strong> messages in the
2604       <code>error_log</code>.</p>
2605     </div>
2606
2607 <h3>See also</h3>
2608 <ul>
2609 <li><code class="directive"><a href="#rlimitmem">RLimitMEM</a></code></li>
2610 <li><code class="directive"><a href="#rlimitcpu">RLimitCPU</a></code></li>
2611 </ul>
2612 </div>
2613 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2614 <div class="directive-section"><h2><a name="ScriptInterpreterSource" id="ScriptInterpreterSource">ScriptInterpreterSource</a> <a name="scriptinterpretersource" id="scriptinterpretersource">Directive</a></h2>
2615 <table class="directive">
2616 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Technique for locating the interpreter for CGI
2617 scripts</td></tr>
2618 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ScriptInterpreterSource Registry|Registry-Strict|Script</code></td></tr>
2619 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ScriptInterpreterSource Script</code></td></tr>
2620 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2621 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
2622 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2623 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2624 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Win32 only;
2625 option <code>Registry-Strict</code> is available in Apache 2.0 and
2626 later</td></tr>
2627 </table>
2628     <p>This directive is used to control how Apache finds the
2629     interpreter used to run CGI scripts. The default setting is
2630     <code>Script</code>. This causes Apache to use the interpreter pointed to
2631     by the shebang line (first line, starting with <code>#!</code>) in the
2632     script. On Win32 systems this line usually looks like:</p>
2633
2634     <div class="example"><p><code>
2635       #!C:/Perl/bin/perl.exe
2636     </code></p></div>
2637
2638     <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
2639
2640     <div class="example"><p><code>
2641       #!perl
2642     </code></p></div>
2643
2644     <p>Setting <code>ScriptInterpreterSource Registry</code> will
2645     cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
2646     searched using the script file extension (e.g., <code>.pl</code>) as a
2647     search key. The command defined by the registry subkey
2648     <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
2649     <code>Shell\Open\Command</code> is used to open the script file. If the
2650     registry keys cannot be found, Apache falls back to the behavior of the
2651     <code>Script</code> option.</p>
2652
2653     <div class="warning"><h3>Security</h3>
2654     <p>Be careful when using <code>ScriptInterpreterSource
2655     Registry</code> with <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>'ed directories, because
2656     Apache will try to execute <strong>every</strong> file within this
2657     directory. The <code>Registry</code> setting may cause undesired
2658     program calls on files which are typically not executed. For
2659     example, the default open command on <code>.htm</code> files on
2660     most Windows systems will execute Microsoft Internet Explorer, so
2661     any HTTP request for an <code>.htm</code> file existing within the
2662     script directory would start the browser in the background on the
2663     server. This is a good way to crash your system within a minute or
2664     so.</p>
2665     </div>
2666
2667     <p>The option <code>Registry-Strict</code> which is new in Apache
2668     2.0 does the same thing as <code>Registry</code> but uses only the
2669     subkey <code>Shell\ExecCGI\Command</code>. The
2670     <code>ExecCGI</code> key is not a common one. It must be
2671     configured manually in the windows registry and hence prevents
2672     accidental program calls on your system.</p>
2673
2674 </div>
2675 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2676 <div class="directive-section"><h2><a name="ServerAdmin" id="ServerAdmin">ServerAdmin</a> <a name="serveradmin" id="serveradmin">Directive</a></h2>
2677 <table class="directive">
2678 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Email address that the server includes in error
2679 messages sent to the client</td></tr>
2680 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAdmin <var>email-address</var>|<var>URL</var></code></td></tr>
2681 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2682 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2683 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2684 </table>
2685     <p>The <code class="directive">ServerAdmin</code> sets the contact address
2686     that the server includes in any error messages it returns to the
2687     client. If the <code>httpd</code> doesn't recognize the supplied argument
2688     as an URL, it
2689     assumes, that it's an <var>email-address</var> and prepends it with
2690     <code>mailto:</code> in hyperlink targets. However, it's recommended to
2691     actually use an email address, since there are a lot of CGI scripts that
2692     make that assumption. If you want to use an URL, it should point to another
2693     server under your control. Otherwise users may not be able to contact you in
2694     case of errors.</p>
2695
2696     <p>It may be worth setting up a dedicated address for this, e.g.</p>
2697
2698     <div class="example"><p><code>
2699       ServerAdmin www-admin@foo.example.com
2700     </code></p></div>
2701     <p>as users do not always mention that they are talking about the
2702     server!</p>
2703
2704 </div>
2705 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2706 <div class="directive-section"><h2><a name="ServerAlias" id="ServerAlias">ServerAlias</a> <a name="serveralias" id="serveralias">Directive</a></h2>
2707 <table class="directive">
2708 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Alternate names for a host used when matching requests
2709 to name-virtual hosts</td></tr>
2710 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</code></td></tr>
2711 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
2712 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2713 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2714 </table>
2715     <p>The <code class="directive">ServerAlias</code> directive sets the
2716     alternate names for a host, for use with <a href="../vhosts/name-based.html">name-based virtual hosts</a>. The
2717     <code class="directive">ServerAlias</code> may include wildcards, if appropriate.</p>
2718
2719     <div class="example"><p><code>
2720       &lt;VirtualHost *:80&gt;<br />
2721       ServerName server.domain.com<br />
2722       ServerAlias server server2.domain.com server2<br />
2723       ServerAlias *.example.com<br />
2724       # ...<br />
2725       &lt;/VirtualHost&gt;
2726     </code></p></div>
2727
2728 <h3>See also</h3>
2729 <ul>
2730 <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
2731 </ul>
2732 </div>
2733 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2734 <div class="directive-section"><h2><a name="ServerName" id="ServerName">ServerName</a> <a name="servername" id="servername">Directive</a></h2>
2735 <table class="directive">
2736 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hostname and port that the server uses to identify
2737 itself</td></tr>
2738 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</code></td></tr>
2739 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
2740 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2741 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2742 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>In version 2.0, this
2743      directive supersedes the functionality of the <code class="directive">Port</code>
2744      directive from version 1.3.</td></tr>
2745 </table>
2746     <p>The <code class="directive">ServerName</code> directive sets the
2747     request scheme, hostname and
2748     port that the server uses to identify itself.  This is used when
2749     creating redirection URLs. For example, if the name of the
2750     machine hosting the web server is <code>simple.example.com</code>,
2751     but the machine also has the DNS alias <code>www.example.com</code>
2752     and you wish the web server to be so identified, the following
2753     directive should be used:</p>
2754
2755     <div class="example"><p><code>
2756       ServerName www.example.com:80
2757     </code></p></div>
2758
2759     <p>If no <code class="directive">ServerName</code> is specified, then the
2760     server attempts to deduce the hostname by performing a reverse
2761     lookup on the IP address. If no port is specified in the
2762     <code class="directive">ServerName</code>, then the server will use the
2763     port from the incoming request. For optimal reliability and
2764     predictability, you should specify an explicit hostname and port
2765     using the <code class="directive">ServerName</code> directive.</p>
2766
2767     <p>If you are using <a href="../vhosts/name-based.html">name-based virtual hosts</a>,
2768     the <code class="directive">ServerName</code> inside a
2769     <code class="directive"><a href="#virtualhost">&lt;VirtualHost&gt;</a></code>
2770     section specifies what hostname must appear in the request's
2771     <code>Host:</code> header to match this virtual host.</p>
2772
2773
2774     <p>Sometimes, the server runs behind a device that processes SSL,
2775     such as a reverse proxy, load balancer or SSL offload
2776     appliance. When this is the case, specify the
2777     <code>https://</code> scheme and the port number to which the
2778     clients connect in the <code class="directive">ServerName</code> directive
2779     to make sure that the server generates the correct
2780     self-referential URLs. 
2781     </p>
2782
2783     <p>See the description of the
2784     <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> and
2785     <code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code> directives for
2786     settings which determine whether self-referential URLs (e.g., by the
2787     <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> module) will refer to the
2788     specified port, or to the port number given in the client's request.
2789     </p>
2790
2791
2792 <h3>See also</h3>
2793 <ul>
2794 <li><a href="../dns-caveats.html">Issues Regarding DNS and
2795     Apache</a></li>
2796 <li><a href="../vhosts/">Apache virtual host
2797     documentation</a></li>
2798 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
2799 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
2800 <li><code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code></li>
2801 <li><code class="directive"><a href="#serveralias">ServerAlias</a></code></li>
2802 </ul>
2803 </div>
2804 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2805 <div class="directive-section"><h2><a name="ServerPath" id="ServerPath">ServerPath</a> <a name="serverpath" id="serverpath">Directive</a></h2>
2806 <table class="directive">
2807 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Legacy URL pathname for a name-based virtual host that
2808 is accessed by an incompatible browser</td></tr>
2809 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerPath <var>URL-path</var></code></td></tr>
2810 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>virtual host</td></tr>
2811 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2812 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2813 </table>
2814     <p>The <code class="directive">ServerPath</code> directive sets the legacy
2815     URL pathname for a host, for use with <a href="../vhosts/">name-based virtual hosts</a>.</p>
2816
2817 <h3>See also</h3>
2818 <ul>
2819 <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
2820 </ul>
2821 </div>
2822 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2823 <div class="directive-section"><h2><a name="ServerRoot" id="ServerRoot">ServerRoot</a> <a name="serverroot" id="serverroot">Directive</a></h2>
2824 <table class="directive">
2825 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Base directory for the server installation</td></tr>
2826 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerRoot <var>directory-path</var></code></td></tr>
2827 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerRoot /usr/local/apache</code></td></tr>
2828 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
2829 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2830 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2831 </table>
2832     <p>The <code class="directive">ServerRoot</code> directive sets the
2833     directory in which the server lives. Typically it will contain the
2834     subdirectories <code>conf/</code> and <code>logs/</code>. Relative
2835     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 
2836     relative to this directory.</p>
2837
2838     <div class="example"><h3>Example</h3><p><code>
2839       ServerRoot /home/httpd
2840     </code></p></div>
2841
2842
2843 <h3>See also</h3>
2844 <ul>
2845 <li><a href="../invoking.html">the <code>-d</code>
2846     option to <code>httpd</code></a></li>
2847 <li><a href="../misc/security_tips.html#serverroot">the
2848     security tips</a> for information on how to properly set
2849     permissions on the <code class="directive">ServerRoot</code></li>
2850 </ul>
2851 </div>
2852 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2853 <div class="directive-section"><h2><a name="ServerSignature" id="ServerSignature">ServerSignature</a> <a name="serversignature" id="serversignature">Directive</a></h2>
2854 <table class="directive">
2855 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the footer on server-generated documents</td></tr>
2856 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerSignature On|Off|EMail</code></td></tr>
2857 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerSignature Off</code></td></tr>
2858 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2859 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>All</td></tr>
2860 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2861 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2862 </table>
2863     <p>The <code class="directive">ServerSignature</code> directive allows the
2864     configuration of a trailing footer line under server-generated
2865     documents (error messages, <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> ftp directory
2866     listings, <code class="module"><a href="../mod/mod_info.html">mod_info</a></code> output, ...). The reason why you
2867     would want to enable such a footer line is that in a chain of proxies,
2868     the user often has no possibility to tell which of the chained servers
2869     actually produced a returned error message.</p>
2870
2871     <p>The <code>Off</code>
2872     setting, which is the default, suppresses the footer line (and is
2873     therefore compatible with the behavior of Apache-1.2 and
2874     below). The <code>On</code> setting simply adds a line with the
2875     server version number and <code class="directive"><a href="#servername">ServerName</a></code> of the serving virtual host,
2876     and the <code>EMail</code> setting additionally creates a
2877     "mailto:" reference to the <code class="directive"><a href="#serveradmin">ServerAdmin</a></code> of the referenced
2878     document.</p>
2879
2880     <p>After version 2.0.44, the details of the server version number
2881     presented are controlled by the <code class="directive"><a href="#servertokens">ServerTokens</a></code> directive.</p>
2882
2883 <h3>See also</h3>
2884 <ul>
2885 <li><code class="directive"><a href="#servertokens">ServerTokens</a></code></li>
2886 </ul>
2887 </div>
2888 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2889 <div class="directive-section"><h2><a name="ServerTokens" id="ServerTokens">ServerTokens</a> <a name="servertokens" id="servertokens">Directive</a></h2>
2890 <table class="directive">
2891 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures the <code>Server</code> HTTP response
2892 header</td></tr>
2893 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full|Off|Set</code></td></tr>
2894 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ServerTokens Full</code></td></tr>
2895 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
2896 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2897 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2898 </table>
2899     <p>This directive controls whether <code>Server</code> response
2900     header field which is sent back to clients includes a
2901     description of the generic OS-type of the server as well as
2902     information about compiled-in modules.</p>
2903
2904     <dl>
2905       <dt><code>ServerTokens Full</code> (or not specified)</dt>
2906
2907       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
2908       (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
2909
2910       <dt><code>ServerTokens Prod[uctOnly]</code></dt>
2911
2912       <dd>Server sends (<em>e.g.</em>): <code>Server:
2913       Apache</code></dd>
2914
2915       <dt><code>ServerTokens Major</code></dt>
2916
2917       <dd>Server sends (<em>e.g.</em>): <code>Server:
2918       Apache/2</code></dd>
2919
2920       <dt><code>ServerTokens Minor</code></dt>
2921
2922       <dd>Server sends (<em>e.g.</em>): <code>Server:
2923       Apache/2.0</code></dd>
2924
2925       <dt><code>ServerTokens Min[imal]</code></dt>
2926
2927       <dd>Server sends (<em>e.g.</em>): <code>Server:
2928       Apache/2.0.41</code></dd>
2929
2930       <dt><code>ServerTokens OS</code></dt>
2931
2932       <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
2933       (Unix)</code></dd>
2934
2935       <dt><code>ServerTokens Set <em>"String"</em></code></dt>
2936
2937       <dd>Server sends user specified string
2938       (<em>e.g.</em>): <code>Server: MyWebServer/8.6</code><br />
2939       <strong>Note:</strong> The string must be in quotes if
2940       there are any embedded spaces.
2941       </dd>
2942
2943       <dt><code>ServerTokens Off</code></dt>
2944
2945       <dd>Server sends no <code>Server:</code> header
2946       (and <code>SERVER_SOFTWARE</code> is blank)</dd>
2947
2948     </dl>
2949
2950     <p>This setting applies to the entire server, and cannot be
2951     enabled or disabled on a virtualhost-by-virtualhost basis.</p>
2952
2953     <p>After version 2.0.44, this directive also controls the
2954     information presented by the <code class="directive"><a href="#serversignature">ServerSignature</a></code> directive.</p>
2955     
2956     <div class="note">Setting <code class="directive">ServerTokens</code> to less than
2957     <code>minimal</code> is not recommended because it makes it more
2958     difficult to debug interoperational problems. Also note that
2959     disabling the Server: header does nothing at all to make your
2960     server more secure; the idea of "security through obscurity"
2961     is a myth and leads to a false sense of safety.</div>
2962
2963
2964 <h3>See also</h3>
2965 <ul>
2966 <li><code class="directive"><a href="#serversignature">ServerSignature</a></code></li>
2967 </ul>
2968 </div>
2969 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
2970 <div class="directive-section"><h2><a name="SetHandler" id="SetHandler">SetHandler</a> <a name="sethandler" id="sethandler">Directive</a></h2>
2971 <table class="directive">
2972 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Forces all matching files to be processed by a
2973 handler</td></tr>
2974 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetHandler <var>handler-name</var>|None</code></td></tr>
2975 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
2976 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
2977 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
2978 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
2979 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Moved into the core in Apache 2.0</td></tr>
2980 </table>
2981     <p>When placed into an <code>.htaccess</code> file or a
2982     <code class="directive"><a href="#directory">&lt;Directory&gt;</a></code> or
2983     <code class="directive"><a href="#location">&lt;Location&gt;</a></code>
2984     section, this directive forces all matching files to be parsed
2985     through the <a href="../handler.html">handler</a> given by
2986     <var>handler-name</var>. For example, if you had a directory you
2987     wanted to be parsed entirely as imagemap rule files, regardless
2988     of extension, you might put the following into an
2989     <code>.htaccess</code> file in that directory:</p>
2990
2991     <div class="example"><p><code>
2992       SetHandler imap-file
2993     </code></p></div>
2994
2995     <p>Another example: if you wanted to have the server display a
2996     status report whenever a URL of
2997     <code>http://servername/status</code> was called, you might put
2998     the following into <code>httpd.conf</code>:</p>
2999
3000     <div class="example"><p><code>
3001       &lt;Location /status&gt;<br />
3002       <span class="indent">
3003         SetHandler server-status<br />
3004       </span>
3005       &lt;/Location&gt;
3006     </code></p></div>
3007
3008     <p>You can override an earlier defined <code class="directive">SetHandler</code>
3009     directive by using the value <code>None</code>.</p>
3010     <p><strong>Note:</strong> because SetHandler overrides default handlers,
3011     normal behaviour such as handling of URLs ending in a slash (/) as
3012     directories or index files is suppressed.</p>
3013
3014 <h3>See also</h3>
3015 <ul>
3016 <li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li>
3017 </ul>
3018 </div>
3019 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3020 <div class="directive-section"><h2><a name="SetInputFilter" id="SetInputFilter">SetInputFilter</a> <a name="setinputfilter" id="setinputfilter">Directive</a></h2>
3021 <table class="directive">
3022 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process client requests and POST
3023 input</td></tr>
3024 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetInputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
3025 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3026 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
3027 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3028 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3029 </table>
3030     <p>The <code class="directive">SetInputFilter</code> directive sets the
3031     filter or filters which will process client requests and POST
3032     input when they are received by the server. This is in addition to
3033     any filters defined elsewhere, including the
3034     <code class="directive"><a href="../mod/mod_mime.html#addinputfilter">AddInputFilter</a></code>
3035     directive.</p>
3036
3037     <p>If more than one filter is specified, they must be separated
3038     by semicolons in the order in which they should process the
3039     content.</p>
3040
3041 <h3>See also</h3>
3042 <ul>
3043 <li><a href="../filter.html">Filters</a> documentation</li>
3044 </ul>
3045 </div>
3046 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3047 <div class="directive-section"><h2><a name="SetOutputFilter" id="SetOutputFilter">SetOutputFilter</a> <a name="setoutputfilter" id="setoutputfilter">Directive</a></h2>
3048 <table class="directive">
3049 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Sets the filters that will process responses from the
3050 server</td></tr>
3051 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</code></td></tr>
3052 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
3053 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
3054 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3055 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3056 </table>
3057     <p>The <code class="directive">SetOutputFilter</code> directive sets the filters
3058     which will process responses from the server before they are
3059     sent to the client. This is in addition to any filters defined
3060     elsewhere, including the
3061     <code class="directive"><a href="../mod/mod_mime.html#addoutputfilter">AddOutputFilter</a></code>
3062     directive.</p>
3063
3064     <p>For example, the following configuration will process all files
3065     in the <code>/www/data/</code> directory for server-side
3066     includes.</p>
3067
3068     <div class="example"><p><code>
3069       &lt;Directory /www/data/&gt;<br />
3070       <span class="indent">
3071         SetOutputFilter INCLUDES<br />
3072       </span>
3073       &lt;/Directory&gt;
3074     </code></p></div>
3075
3076     <p>If more than one filter is specified, they must be separated
3077     by semicolons in the order in which they should process the
3078     content.</p>
3079
3080 <h3>See also</h3>
3081 <ul>
3082 <li><a href="../filter.html">Filters</a> documentation</li>
3083 </ul>
3084 </div>
3085 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3086 <div class="directive-section"><h2><a name="TimeOut" id="TimeOut">TimeOut</a> <a name="timeout" id="timeout">Directive</a></h2>
3087 <table class="directive">
3088 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Amount of time the server will wait for
3089 certain events before failing a request</td></tr>
3090 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TimeOut <var>seconds</var></code></td></tr>
3091 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TimeOut 300</code></td></tr>
3092 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
3093 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3094 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3095 </table>
3096     <p>The <code class="directive">TimeOut</code> directive defines the length
3097     of time Apache will wait for I/O in various circumstances:</p>
3098
3099     <ol>
3100       <li>When reading data from the client, the length of time to
3101       wait for a TCP packet to arrive if the read buffer is
3102       empty.</li>
3103
3104       <li>When writing data to the client, the length of time to wait
3105       for an acknowledgement of a packet if the send buffer is
3106       full.</li>
3107
3108       <li>In <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, the length of time to wait for
3109       output from a CGI script.</li>
3110
3111       <li>In <code class="module"><a href="../mod/mod_ext_filter.html">mod_ext_filter</a></code>, the length of time to
3112       wait for output from a filtering process.</li>
3113
3114       <li>In <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>, the default timeout value if
3115       <code class="directive"><a href="../mod/mod_proxy.html#proxytimeout">ProxyTimeout</a></code> is not
3116       configured.</li>
3117     </ol>
3118
3119
3120 </div>
3121 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3122 <div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
3123 <table class="directive">
3124 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code>
3125 requests</td></tr>
3126 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
3127 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
3128 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3129 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3130 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3131 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 1.3.34, 2.0.55 and later</td></tr>
3132 </table>
3133     <p>This directive overrides the behavior of <code>TRACE</code> for both
3134     the core server and <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>.  The default
3135     <code>TraceEnable on</code> permits <code>TRACE</code> requests per
3136     RFC 2616, which disallows any request body to accompany the request.
3137     <code>TraceEnable off</code> causes the core server and
3138     <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> to return a <code>405</code> (Method not
3139     allowed) error to the client.</p>
3140
3141     <p>Finally, for testing and diagnostic purposes only, request
3142     bodies may be allowed using the non-compliant <code>TraceEnable 
3143     extended</code> directive.  The core (as an origin server) will
3144     restrict the request body to 64k (plus 8k for chunk headers if
3145     <code>Transfer-Encoding: chunked</code> is used).  The core will
3146     reflect the full headers and all chunk headers with the response
3147     body.  As a proxy server, the request body is not restricted to 64k.</p>
3148
3149 </div>
3150 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3151 <div class="directive-section"><h2><a name="UseCanonicalName" id="UseCanonicalName">UseCanonicalName</a> <a name="usecanonicalname" id="usecanonicalname">Directive</a></h2>
3152 <table class="directive">
3153 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
3154 port</td></tr>
3155 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalName On|Off|DNS</code></td></tr>
3156 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalName Off</code></td></tr>
3157 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3158 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3159 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3160 </table>
3161     <p>In many situations Apache must construct a <em>self-referential</em>
3162     URL -- that is, a URL that refers back to the same server. With
3163     <code>UseCanonicalName On</code> Apache will use the hostname and port
3164     specified in the <code class="directive"><a href="#servername">ServerName</a></code>
3165     directive to construct the canonical name for the server. This name
3166     is used in all self-referential URLs, and for the values of
3167     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
3168
3169     <p>With <code>UseCanonicalName Off</code> Apache will form
3170     self-referential URLs using the hostname and port supplied by
3171     the client if any are supplied (otherwise it will use the
3172     canonical name, as defined above). These values are the same
3173     that are used to implement <a href="../vhosts/name-based.html">name based virtual hosts</a>,
3174     and are available with the same clients. The CGI variables
3175     <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
3176     constructed from the client supplied values as well.</p>
3177
3178     <p>An example where this may be useful is on an intranet server
3179     where you have users connecting to the machine using short
3180     names such as <code>www</code>. You'll notice that if the users
3181     type a shortname, and a URL which is a directory, such as
3182     <code>http://www/splat</code>, <em>without the trailing
3183     slash</em> then Apache will redirect them to
3184     <code>http://www.domain.com/splat/</code>. If you have
3185     authentication enabled, this will cause the user to have to
3186     authenticate twice (once for <code>www</code> and once again
3187     for <code>www.domain.com</code> -- see <a href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
3188     FAQ on this subject for more information</a>). But if
3189     <code class="directive">UseCanonicalName</code> is set <code>Off</code>, then
3190     Apache will redirect to <code>http://www/splat/</code>.</p>
3191
3192     <p>There is a third option, <code>UseCanonicalName DNS</code>,
3193     which is intended for use with mass IP-based virtual hosting to
3194     support ancient clients that do not provide a
3195     <code>Host:</code> header. With this option Apache does a
3196     reverse DNS lookup on the server IP address that the client
3197     connected to in order to work out self-referential URLs.</p>
3198
3199     <div class="warning"><h3>Warning</h3>
3200     <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
3201     they may be broken by this option. The client is essentially free
3202     to give whatever value they want as a hostname. But if the CGI is
3203     only using <code>SERVER_NAME</code> to construct self-referential URLs
3204     then it should be just fine.</p>
3205     </div>
3206
3207 <h3>See also</h3>
3208 <ul>
3209 <li><code class="directive"><a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></code></li>
3210 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
3211 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
3212 </ul>
3213 </div>
3214 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3215 <div class="directive-section"><h2><a name="UseCanonicalPhysicalPort" id="UseCanonicalPhysicalPort">UseCanonicalPhysicalPort</a> <a name="usecanonicalphysicalport" id="usecanonicalphysicalport">Directive</a></h2>
3216 <table class="directive">
3217 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configures how the server determines its own name and
3218 port</td></tr>
3219 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UseCanonicalPhysicalPort On|Off</code></td></tr>
3220 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UseCanonicalPhysicalPort Off</code></td></tr>
3221 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
3222 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3223 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3224 </table>
3225     <p>In many situations Apache must construct a <em>self-referential</em>
3226     URL -- that is, a URL that refers back to the same server. With
3227     <code>UseCanonicalPhysicalPort On</code> Apache will, when
3228     constructing the canonical port for the server to honor
3229     the <code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code> directive,
3230     provide the actual physical port number being used by this request
3231     as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
3232     Apache will not ever use the actual physical port number, instead
3233     relying on all configured information to construct a valid port number.</p>
3234
3235     <div class="note"><h3>Note</h3>
3236     <p>The ordering of when the physical port is used is as follows:<br /><br />
3237      <code>UseCanonicalName On</code></p>
3238      <ul>
3239       <li>Port provided in <code>Servername</code></li>
3240       <li>Physical port</li>
3241       <li>Default port</li>
3242      </ul>
3243      <code>UseCanonicalName Off | DNS</code>
3244      <ul>
3245       <li>Parsed port from <code>Host:</code> header</li>
3246       <li>Physical port</li>
3247       <li>Port provided in <code>Servername</code></li>
3248       <li>Default port</li>
3249      </ul>
3250     
3251     <p>With <code>UseCanonicalPhysicalPort Off</code>, the
3252     physical ports are removed from the ordering.</p>
3253     </div>
3254
3255
3256 <h3>See also</h3>
3257 <ul>
3258 <li><code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code></li>
3259 <li><code class="directive"><a href="#servername">ServerName</a></code></li>
3260 <li><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code></li>
3261 </ul>
3262 </div>
3263 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
3264 <div class="directive-section"><h2><a name="VirtualHost" id="VirtualHost">&lt;VirtualHost&gt;</a> <a name="virtualhost" id="virtualhost">Directive</a></h2>
3265 <table class="directive">
3266 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Contains directives that apply only to a specific
3267 hostname or IP address</td></tr>
3268 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;VirtualHost
3269     <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
3270     ...&gt; ... &lt;/VirtualHost&gt;</code></td></tr>
3271 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
3272 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Core</td></tr>
3273 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>core</td></tr>
3274 </table>
3275     <p><code class="directive">&lt;VirtualHost&gt;</code> and
3276     <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
3277     directives that will apply only to a particular virtual host. Any
3278     directive that is allowed in a virtual host context may be
3279     used. When the server receives a request for a document on a
3280     particular virtual host, it uses the configuration directives
3281     enclosed in the <code class="directive">&lt;VirtualHost&gt;</code>
3282     section. <var>Addr</var> can be:</p>
3283
3284     <ul>
3285       <li>The IP address of the virtual host;</li>
3286
3287       <li>A fully qualified domain name for the IP address of the
3288       virtual host (not recommended);</li>
3289
3290       <li>The character <code>*</code>, which is used only in combination with
3291       <code>NameVirtualHost *</code> to match all IP addresses; or</li>
3292
3293       <li>The string <code>_default_</code>, which is used only
3294       with IP virtual hosting to catch unmatched IP addresses.</li>
3295     </ul>
3296
3297     <div class="example"><h3>Example</h3><p><code>
3298       &lt;VirtualHost 10.1.2.3&gt;<br />
3299       <span class="indent">
3300         ServerAdmin webmaster@host.example.com<br />
3301         DocumentRoot /www/docs/host.example.com<br />
3302         ServerName host.example.com<br />
3303         ErrorLog logs/host.example.com-error_log<br />
3304         TransferLog logs/host.example.com-access_log<br />
3305       </span>
3306       &lt;/VirtualHost&gt;
3307     </code></p></div>
3308
3309
3310     <p>IPv6 addresses must be specified in square brackets because
3311     the optional port number could not be determined otherwise.  An
3312     IPv6 example is shown below:</p>
3313
3314     <div class="example"><p><code>
3315       &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
3316       <span class="indent">
3317         ServerAdmin webmaster@host.example.com<br />
3318         DocumentRoot /www/docs/host.example.com<br />
3319         ServerName host.example.com<br />
3320         ErrorLog logs/host.example.com-error_log<br />
3321         TransferLog logs/host.example.com-access_log<br />
3322       </span>
3323       &lt;/VirtualHost&gt;
3324     </code></p></div>
3325
3326     <p>Each Virtual Host must correspond to a different IP address,
3327     different port number or a different host name for the server,
3328     in the former case the server machine must be configured to
3329     accept IP packets for multiple addresses. (If the machine does
3330     not have multiple network interfaces, then this can be
3331     accomplished with the <code>ifconfig alias</code> command -- if
3332     your OS supports it).</p>
3333
3334     <div class="note"><h3>Note</h3>
3335     <p>The use of <code class="directive">&lt;VirtualHost&gt;</code> does
3336     <strong>not</strong> affect what addresses Apache listens on. You
3337     may need to ensure that Apache is listening on the correct addresses
3338     using <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>.</p>
3339     </div>
3340
3341     <p>When using IP-based virtual hosting, the special name
3342     <code>_default_</code> can be specified in
3343     which case this virtual host will match any IP address that is
3344     not explicitly listed in another virtual host. In the absence
3345     of any <code>_default_</code> virtual host the "main" server config,
3346     consisting of all those definitions outside any VirtualHost
3347     section, is used when no IP-match occurs.</p>
3348
3349     <p>You can specify a <code>:port</code> to change the port that is
3350     matched. If unspecified then it defaults to the same port as the
3351     most recent <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
3352     statement of the main server. You may also specify <code>:*</code>
3353     to match all ports on that address. (This is recommended when used
3354     with <code>_default_</code>.)</p>
3355
3356     <p>A <code class="directive"><a href="#servername">ServerName</a></code> should be
3357     specified inside each <code class="directive">&lt;VirtualHost&gt;</code> block. If it is absent, the
3358     <code class="directive"><a href="#servername">ServerName</a></code> from the "main"
3359     server configuration will be inherited.</p>
3360
3361     <div class="warning"><h3>Security</h3>
3362     <p>See the <a href="../misc/security_tips.html">security tips</a>
3363     document for details on why your security could be compromised if the
3364     directory where log files are stored is writable by anyone other
3365     than the user that starts the server.</p>
3366     </div>
3367
3368 <h3>See also</h3>
3369 <ul>
3370 <li><a href="../vhosts/">Apache Virtual Host documentation</a></li>
3371 <li><a href="../dns-caveats.html">Issues Regarding DNS and
3372     Apache</a></li>
3373 <li><a href="../bind.html">Setting
3374     which addresses and ports Apache uses</a></li>
3375 <li><a href="../sections.html">How &lt;Directory&gt;, &lt;Location&gt;
3376     and &lt;Files&gt; sections work</a> for an explanation of how these
3377     different sections are combined when a request is received</li>
3378 </ul>
3379 </div>
3380 </div>
3381 <div class="bottomlang">
3382 <p><span>Available Languages: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
3383 <a href="../en/mod/core.html" title="English">&nbsp;en&nbsp;</a> |
3384 <a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
3385 <a href="../ja/mod/core.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
3386 <a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
3387 </div><div id="footer">
3388 <p class="apache">Copyright 2009 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>
3389 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
3390 </body></html>