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