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