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