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