core.xml revision 55d36f9b61520c2374ab463e77e8a62daa416398
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $Revision: 1.87 $ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Copyright 2002-2004 The Apache Software Foundation
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed under the Apache License, Version 2.0 (the "License");
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding you may not use this file except in compliance with the License.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding You may obtain a copy of the License at
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<modulesynopsis metafile="core.xml.meta">
7db9f691a00ead175b03335457ca296a33ddf31bnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>core</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<status>Core</status>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>AcceptPathInfo</name>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Resources accept trailing pathname information</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<syntax>AcceptPathInfo On|Off|Default</syntax>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<default>AcceptPathInfo Default</default>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<contextlist><context>server config</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<context>virtual host</context><context>directory</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<context>.htaccess</context></contextlist>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<override>FileInfo</override>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<compatibility>Available in Apache 2.0.30 and later</compatibility>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<usage>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <p>This directive controls whether requests that contain trailing
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic pathname information that follows an actual filename (or
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor non-existent file in an existing directory) will be accepted or
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe rejected. The trailing pathname information can be made
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe available to scripts in the <code>PATH_INFO</code> environment
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe variable.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>For example, assume the location <code>/test/</code> points to
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe a directory that contains only the single file
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <code>here.html</code>. Then requests for
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html/more</code> and
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <code>/test/nothere.html/more</code> both collect
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <code>/more</code> as <code>PATH_INFO</code>.</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <p>The three possible arguments for the
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <directive>AcceptPathInfo</directive> directive are:</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <dl>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>Off</code></dt><dd>A request will only be accepted if it
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna maps to a literal path that exists. Therefore a request with
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna trailing pathname information after the true filename such as
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html/more</code> in the above example will return
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna a 404 NOT FOUND error.</dd>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>On</code></dt><dd>A request will be accepted if a
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor leading path component maps to a file that exists. The above
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor example <code>/test/here.html/more</code> will be accepted if
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html</code> maps to a valid file.</dd>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>Default</code></dt><dd>The treatment of requests with
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna trailing pathname information is determined by the <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="/handler.html">handler</a> responsible for the request.
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna The core handler for normal files defaults to rejecting
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="mod_cgi.html">cgi-script</a> and <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="mod_isapi.html">isapi-isa</a>, generally accept
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>PATH_INFO</code> by default.</dd>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </dl>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The primary purpose of the <code>AcceptPathInfo</code>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna directive is to allow you to override the handler's choice of
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor accepting or rejecting <code>PATH_INFO</code>. This override is required,
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna for example, when you use a <a href="/filter.html">filter</a>, such
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna as <a href="mod_include.html">INCLUDES</a>, to generate content
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna based on <code>PATH_INFO</code>. The core handler would usually reject
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe the request, so you can use the following configuration to enable
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe such a script:</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe &lt;Files "mypaths.shtml"&gt;<br />
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <indent>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe Options +Includes<br />
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe SetOutputFilter INCLUDES<br />
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe AcceptPathInfo On<br />
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe </indent>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe &lt;/Files&gt;
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe </example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</usage>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</directivesynopsis>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<directivesynopsis>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<name>AccessFileName</name>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<description>Name of the distributed configuration file</description>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<default>AccessFileName .htaccess</default>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<contextlist><context>server config</context><context>virtual host</context>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</contextlist>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>While processing a request the server looks for
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration files are <a href="#allowoverride">enabled for that
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directory</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AccessFileName .acl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>before returning the document
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>/usr/local/web/index.html</code>, the server will read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/.acl</code>, <code>/usr/.acl</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for directives, unless they have been disabled with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">AllowOverride</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/configuring.html">Configuration Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AddDefaultCharset</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default character set to be added for a
fb77c505254b6e9c925e23e734463e87574f8f40kessresponse without an explicit character set</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AddDefaultCharset Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the name of the character set that
fb77c505254b6e9c925e23e734463e87574f8f40kess will be added to any response that does not have any parameter on
fb77c505254b6e9c925e23e734463e87574f8f40kess the content type in the HTTP headers. This will override any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive character set specified in the body of the document via a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>META</code> tag. A setting of <code>AddDefaultCharset
fb77c505254b6e9c925e23e734463e87574f8f40kess Off</code> disables this
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess functionality. <code>AddDefaultCharset On</code> enables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache's internal default charset of <code>iso-8859-1</code> as
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen required by the directive. You can also specify an alternate
fb77c505254b6e9c925e23e734463e87574f8f40kess <var>charset</var> to be used. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddDefaultCharset utf-8
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>AddOutputFilterByType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>assigns an output filter to a particular MIME-type</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
130d299c4b2b15be45532a176604c71fdc7bea5bnd<var>MIME-type</var> [<var>MIME-type</var>] ...</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<context>virtual host</context><context>directory</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<context>.htaccess</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<override>FileInfo</override>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<compatibility>Available in Apache 2.0.33 and later</compatibility>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive activates a particular output <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/filter.html">filter</a> for a request depending on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response MIME-type.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following example uses the <code>DEFLATE</code> filter, which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is provided by <module>mod_deflate</module>. It will compress all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive output (either static or dynamic) which is labeled as
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>text/html</code> or <code>text/plain</code> before it is sent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType DEFLATE text/html text/plain
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If you want the content to be processed by more than one filter, their
003f0c9fda6664daf5092a0e42f65ede20098153slive names have to be separated by semicolons. It's also possible to use one
003f0c9fda6664daf5092a0e42f65ede20098153slive <directive>AddOutputFilterByType</directive> directive for each of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess these filters.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The configuration below causes all script output labeled as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>text/html</code> to be processed at first by the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /cgi-bin/&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Location&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <note type="warning"><title>Note</title>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Enabling filters with <directive>AddOutputFilterByType</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd may fail partially or completely in some cases. For example, no
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filters are applied if the MIME-type could not be determined and falls
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive back to the <directive module="core">DefaultType</directive> setting,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive even if the <directive module="core">DefaultType</directive> is the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive same.</p>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>However, if you want to make sure, that the filters will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive applied, assign the content type to a resource explicitly, for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example with <directive module="mod_mime">AddType</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>. Setting the
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding content type within a (non-nph) CGI script is also safe.</p>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The by-type output filters are never applied on proxy requests.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
003f0c9fda6664daf5092a0e42f65ede20098153slive<seealso><directive module="core">SetOutputFilter</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">filters</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<name>AllowEncodedSlashes</name>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<description>Determines whether encoded path separators in URLs are allowed to
a8ce9095d102e43fecb81093a132b90b9a227f78kessbe passed through</description>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<syntax>AllowEncodedSlashes On|Off</syntax>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<default>AllowEncodedSlashes Off</default>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<contextlist><context>server config</context><context>virtual host</context>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</contextlist>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<compatibility>Available in Apache 2.0.46 and later</compatibility>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which contain encoded path separators (<code>%2F</code> for <code>/</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and additionally <code>%5C</code> for <code>\</code> on according systems)
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
684f2a9a422185adda0692a1203c5ad6687fc5c5nd mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <note><title>Note</title>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding according systems) will be left as such in the otherwise decoded URL
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding string.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </note>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><directive module="core">AcceptPathInfo</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AllowOverride</name>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<description>Types of directives that are allowed in
9583adab6bc4b3758e41963c905d9dad9f067131nd<code>.htaccess</code> files</description>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<syntax>AllowOverride All|None|<var>directive-type</var>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier[<var>directive-type</var>] ...</syntax>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<default>AllowOverride All</default>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<contextlist><context>directory</context></contextlist>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<usage>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>When the server finds an <code>.htaccess</code> file (as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd specified by <directive module="core">AccessFileName</directive>)
77ead9e0262e4f08ec336d1a65b2edef7705c839nd it needs to know which directives declared in that file can override
77ead9e0262e4f08ec336d1a65b2edef7705c839nd earlier configuration directives.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <note><title>Only available in &lt;Directory&gt; sections</title>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <directive>AllowOverride</directive> is valid only in
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <directive type="section" module="core">Directory</directive>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier sections specified without regular expressions, not in <directive
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier type="section" module="core">Location</directive>, <directive
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier module="core" type="section">DirectoryMatch</directive> or
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <directive type="section" module="core">Files</directive> sections.
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier </note>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>When this directive is set to <code>None</code>, then
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <a href="#accessfilename">.htaccess</a> files are completely ignored.
77ead9e0262e4f08ec336d1a65b2edef7705c839nd In this case, the server will not even attempt to read
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>.htaccess</code> files in the filesystem.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>When this directive is set to <code>All</code>, then any
77ead9e0262e4f08ec336d1a65b2edef7705c839nd directive which has the .htaccess <a
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier href="directive-dict.html#Context">Context</a> is allowed in
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <code>.htaccess</code> files.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The <var>directive-type</var> can be one of the following
77ead9e0262e4f08ec336d1a65b2edef7705c839nd groupings of directives.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <dl>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow use of the authorization directives (<directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="mod_authn_dbm">AuthDBMGroupFile</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
4ea161d94782fa56f4b36d496f35ff8577c43065covener <directive module="mod_authz_groupfile">AuthGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthType</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authn_file">AuthUserFile</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Require</directive>, <em>etc.</em>).</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt>FileInfo</dt>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow use of the directives controlling document types (<directive
10673857794a4b3d9568ca2d983722a87ed352f1rbowen module="core">DefaultType</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">ErrorDocument</directive>, <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">ForceType</directive>, <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="mod_negotiation">LanguagePriority</directive>,
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <directive module="core">SetHandler</directive>, <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">SetInputFilter</directive>, <directive
10673857794a4b3d9568ca2d983722a87ed352f1rbowen module="core">SetOutputFilter</directive>, and
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <module>mod_mime</module> Add* and Remove*
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directives, <em>etc.</em>).</dd>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <dt>Indexes</dt>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling directory indexing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">AddDescription</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">AddIcon</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="mod_autoindex">AddIconByEncoding</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">AddIconByType</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_autoindex">DefaultIcon</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_dir">DirectoryIndex</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">FancyIndexing</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">HeaderName</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">IndexIgnore</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">IndexOptions</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">ReadmeName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>etc.</em>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz <dt>Limit</dt>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <dd>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl Allow use of the directives controlling host access (<directive
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl module="mod_authz_host">Allow</directive>, <directive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="mod_authz_host">Deny</directive> and <directive
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl module="mod_authz_host">Order</directive>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Options</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Allow use of the directives controlling specific directory
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding features (<directive module="core">Options</directive> and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="mod_include">XBitHack</directive>).</dd>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </dl>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Example:</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding AllowOverride AuthConfig Indexes
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem </example>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>In the example above all directives that are neither in the group
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem server error.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</usage>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<seealso><directive module="core">AccessFileName</directive></seealso>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<seealso><a href="/configuring.html">Configuration Files</a></seealso>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<name>AuthName</name>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<description>Authorization realm for use in HTTP
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluemauthentication</description>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<syntax>AuthName <var>auth-domain</var></syntax>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<contextlist><context>directory</context><context>.htaccess</context>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the name of the authorization realm for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. This realm is given to the client so that the user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive knows which username and password to send.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AuthName</directive> takes a single argument; if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive realm name contains spaces, it must be enclosed in quotation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive marks. It must be accompanied by <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">AuthType</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> directives, and directives such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <directive module="mod_authn_file">AuthUserFile</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authz_groupfile">AuthGroupFile</directive> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive work.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthName "Top Secret"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The string provided for the <code>AuthName</code> is what will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appear in the password dialog provided by most browsers.</p>
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen</usage>
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen<seealso><a
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen href="/howto/auth.html">Authentication, Authorization, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Access Control</a></seealso>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq</directivesynopsis>
e67969aeb443b18bbb3837690c4010c3f1961842jim
e67969aeb443b18bbb3837690c4010c3f1961842jim<directivesynopsis>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<name>AuthType</name>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<description>Type of user authentication</description>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<syntax>AuthType Basic|Digest</syntax>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<contextlist><context>directory</context><context>.htaccess</context>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq</contextlist>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<override>AuthConfig</override>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<usage>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <p>This directive selects the type of user authentication for a
eb73941bd697cd7e8226ceaf04183ade6c66934dniq directory. Only <code>Basic</code> and <code>Digest</code> are
eb73941bd697cd7e8226ceaf04183ade6c66934dniq currently implemented.
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq It must be accompanied by <directive
eb73941bd697cd7e8226ceaf04183ade6c66934dniq module="core">AuthName</directive> and <directive
184255c60354393e95feca30bbc8dec660f612abnd module="core">Require</directive> directives, and directives such
eb73941bd697cd7e8226ceaf04183ade6c66934dniq as <directive module="mod_authn_file">AuthUserFile</directive> and
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <directive module="mod_authz_groupfile">AuthGroupFile</directive> to
eb73941bd697cd7e8226ceaf04183ade6c66934dniq work.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq</usage>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<seealso><a href="/howto/auth.html">Authentication, Authorization,
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jimand Access Control</a></seealso>
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jim</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>CGIMapExtension</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Technique for locating the interpreter for CGI
103a93c625bcde1a6a7a5155b64dcda36f612180pquernascripts</description>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess<contextlist><context>directory</context><context>.htaccess</context>
9970ad80054f477c708284a0d030a5bd26e412a9covener</contextlist>
9970ad80054f477c708284a0d030a5bd26e412a9covener<override>FileInfo</override>
9970ad80054f477c708284a0d030a5bd26e412a9covener<compatibility>NetWare only</compatibility>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<usage>
9970ad80054f477c708284a0d030a5bd26e412a9covener <p>This directive is used to control how Apache finds the
9970ad80054f477c708284a0d030a5bd26e412a9covener interpreter used to run CGI scripts. For example, setting
9970ad80054f477c708284a0d030a5bd26e412a9covener <code>CGIMapExtension sys:\foo.nlm .foo</code> will
9970ad80054f477c708284a0d030a5bd26e412a9covener cause all CGI script files with a <code>.foo</code> extension to
9970ad80054f477c708284a0d030a5bd26e412a9covener be passed to the FOO interpreter.</p>
9970ad80054f477c708284a0d030a5bd26e412a9covener</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ContentDigest</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enables the generation of <code>Content-MD5</code> HTTP Response
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndheaders</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ContentDigest On|Off</syntax>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<default>ContentDigest Off</default>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<contextlist><context>server config</context><context>virtual host</context>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<context>directory</context><context>.htaccess</context>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd</contextlist>
da637bcae7b6e150470e701af29da5604a34a17erbowen<override>Options</override>
da637bcae7b6e150470e701af29da5604a34a17erbowen<status>Experimental</status>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
da637bcae7b6e150470e701af29da5604a34a17erbowen<usage>
da637bcae7b6e150470e701af29da5604a34a17erbowen <p>This directive enables the generation of
da637bcae7b6e150470e701af29da5604a34a17erbowen <code>Content-MD5</code> headers as defined in RFC1864
da637bcae7b6e150470e701af29da5604a34a17erbowen respectively RFC2068.</p>
da637bcae7b6e150470e701af29da5604a34a17erbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>MD5 is an algorithm for computing a "message digest"
7802d43d20007fa575e43b6ae77d5177ceffdb71sf (sometimes called "fingerprint") of arbitrary-length data, with
7802d43d20007fa575e43b6ae77d5177ceffdb71sf a high degree of confidence that any alterations in the data
7802d43d20007fa575e43b6ae77d5177ceffdb71sf will be reflected in alterations in the message digest.</p>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
86120957a14f91da0a1a103eaf4d7710b1dd9e2asf <p>The <code>Content-MD5</code> header provides an end-to-end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message integrity check (MIC) of the entity-body. A proxy or
113961f0559eb026ea0d379cb7350f82bc09d710druggeri client may check this header for detecting accidental
113961f0559eb026ea0d379cb7350f82bc09d710druggeri modification of the entity-body in transit. Example header:</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <example>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </example>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Note that this can cause performance problems on your server
113961f0559eb026ea0d379cb7350f82bc09d710druggeri since the message digest is computed on every request (the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri values are not cached).</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p><code>Content-MD5</code> is only sent for documents served
113961f0559eb026ea0d379cb7350f82bc09d710druggeri by the <module>core</module>, and not by any module. For example,
113961f0559eb026ea0d379cb7350f82bc09d710druggeri SSI documents, output from CGI scripts, and byte range responses
113961f0559eb026ea0d379cb7350f82bc09d710druggeri do not have this header.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<name>DefaultType</name>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<description>MIME content-type that will be sent if the
113961f0559eb026ea0d379cb7350f82bc09d710druggeriserver cannot determine a type in any other way</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<syntax>DefaultType <var>MIME-type</var></syntax>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<default>DefaultType text/plain</default>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>server config</context><context>virtual host</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<context>directory</context><context>.htaccess</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<override>FileInfo</override>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>There will be times when the server is asked to provide a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri document whose type cannot be determined by its MIME types
113961f0559eb026ea0d379cb7350f82bc09d710druggeri mappings.</p>
922f38e40c347359fdf7b4f94828cfb91237abd4rbowen
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>The server must inform the client of the content-type of the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri document, so in the event of an unknown type it uses the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>DefaultType</code>. For example:</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <example>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri DefaultType image/gif
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </example>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>would be appropriate for a directory which contained many GIF
113961f0559eb026ea0d379cb7350f82bc09d710druggeri images with filenames missing the <code>.gif</code> extension.</p>
922f38e40c347359fdf7b4f94828cfb91237abd4rbowen
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Note that unlike <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri module="core">ForceType</directive>, this directive only
113961f0559eb026ea0d379cb7350f82bc09d710druggeri provides the default mime-type. All other mime-type definitions,
113961f0559eb026ea0d379cb7350f82bc09d710druggeri including filename extensions, that might identify the media type
113961f0559eb026ea0d379cb7350f82bc09d710druggeri will override this default.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis type="section">
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<name>Directory</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enclose a group of directives that apply only to the
113961f0559eb026ea0d379cb7350f82bc09d710druggerinamed file-system directory and sub-directories</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;Directory <var>directory-path</var>&gt;
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen... &lt;/Directory&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive type="section">Directory</directive> and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code>&lt;/Directory&gt;</code> are used to enclose a group of
fb77c505254b6e9c925e23e734463e87574f8f40kess directives that will apply only to the named directory and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes sub-directories of that directory. Any directive that is allowed
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes in a directory context may be used. <var>Directory-path</var> is
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes either the full path to a directory, or a wild-card string using
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Unix shell-style matching. In a wild-card string, <code>?</code> matches
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes any single character, and <code>*</code> matches any sequences of
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes characters. You may also use <code>[]</code> character ranges. None
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen of the wildcards match a `/' character, so <code>&lt;Directory
fb77c505254b6e9c925e23e734463e87574f8f40kess /*/public_html&gt;</code> will not match
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/home/user/public_html</code>, but <code>&lt;Directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess /home/*/public_html&gt;</code> will match. Example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <example>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes &lt;Directory /usr/local/httpd/htdocs&gt;<br />
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/Directory&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful with the <var>directory-path</var> arguments:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive They have to literally match the filesystem path which Apache uses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to access the files. Directives applied to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory&gt;</code> will not apply to files accessed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that same directory via a different path, such as via different symbolic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Extended regular
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If multiple (non-regular expression) <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">Directory</directive> sections
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd match the directory (or one of its parents) containing a document,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd then the directives are applied in the order of shortest match
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd first, interspersed with the directives from the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="#accessfilename">.htaccess</a> files. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /home/&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim AllowOverride FileInfo<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;/Directory&gt;
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </example>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <p>for access to the document <code>/home/web/dir/doc.html</code>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim the steps are:</p>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <ul>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply directive <code>AllowOverride None</code>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim (disabling <code>.htaccess</code> files).</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply directive <code>AllowOverride FileInfo</code> (for
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim directory <code>/home</code>).</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply any <code>FileInfo</code> directives in
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <code>/home/web/dir/.htaccess</code> in that order.</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </ul>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <p>Regular expressions are not considered until after all of the
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim normal sections have been applied. Then all of the regular
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim expressions are tested in the order they appeared in the
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim configuration file. For example, with</p>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <example>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;Directory ~ abc$&gt;<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim # ... directives here ...<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>the regular expression section won't be considered until after
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding all normal <directive type="section">Directory</directive>s and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>.htaccess</code> files have been applied. Then the regular
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding expression will match on <code>/home/abc/public_html/abc</code> and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the corresponding <directive type="section">Directory</directive> will
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding be applied.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note that the default Apache access for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This means that Apache will serve any file mapped from an URL. It is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended that you change this with a block such
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen as</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;Directory /&gt;<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
e4881891552e185a7408318dfc7f62ebabe73cf6niq </indent>
e4881891552e185a7408318dfc7f62ebabe73cf6niq &lt;/Directory&gt;
e4881891552e185a7408318dfc7f62ebabe73cf6niq </example>
e4881891552e185a7408318dfc7f62ebabe73cf6niq
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p><strong>and then override this for directories you
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <em>want</em> accessible. See the <a
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding href="/misc/security_tips.html">Security Tips</a> page for more
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding details.</strong></p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>The directory sections occur in the <code>httpd.conf</code> file.
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive type="section">Directory</directive> directives
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding cannot nest, and cannot appear in a <directive module="core"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type="section">Limit</directive> or <directive module="core"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type="section">LimitExcept</directive> section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How &lt;Directory&gt;,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl explanation of how these different sections are combined when a
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl request is received</seealso>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</directivesynopsis>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<directivesynopsis type="section">
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<name>DirectoryMatch</name>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<description>Enclose directives that apply to
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodlfile-system directories matching a regular expression and their
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsfsubdirectories</description>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf... &lt;/DirectoryMatch&gt;</syntax>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<contextlist><context>server config</context><context>virtual host</context>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</contextlist>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<usage>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p><directive type="section">DirectoryMatch</directive> and
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf of directives which will apply only to the named directory and
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf sub-directories of that directory, the same as <directive
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf module="core" type="section">Directory</directive>. However, it
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf takes as an argument a regular expression. For example:</p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <example>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf &lt;DirectoryMatch "^/www/.*/[0-9]{3}"&gt;
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf </example>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>would match directories in <code>/www/</code> that consisted of three
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf numbers.</p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</usage>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf<seealso><directive type="section" module="core">Directory</directive> for
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sfa description of how regular expressions are mixed in with normal
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf<directive type="section">Directory</directive>s</seealso>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<seealso><a
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodlhref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl&lt;Files&gt; sections work</a> for an explanation of how these different
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
898475b582dd849de5915df0f2089b72ed8b2e2bcovener<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>DocumentRoot</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Directory that forms the main document tree visible
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the web</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>DocumentRoot <var>directory-path</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>DocumentRoot /usr/local/apache/htdocs</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
898475b582dd849de5915df0f2089b72ed8b2e2bcovener<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive sets the directory from which <code>httpd</code>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener will serve files. Unless matched by a directive like <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_alias">Alias</directive>, the server appends the
003f0c9fda6664daf5092a0e42f65ede20098153slive path from the requested URL to the document root to make the
fb77c505254b6e9c925e23e734463e87574f8f40kess path to the document. Example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess DocumentRoot /usr/web
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>then an access to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>http://www.my.host.com/index.html</code> refers to
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
130d299c4b2b15be45532a176604c71fdc7bea5bnd not absolute then it is assumed to be relative to the <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">ServerRoot</directive>.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <directive>DocumentRoot</directive> should be specified without
130d299c4b2b15be45532a176604c71fdc7bea5bnd a trailing slash.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/urlmapping.html">Mapping URLs to Filesystem
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndLocation</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>EnableMMAP</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Use memory-mapping to read files during delivery</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>EnableMMAP On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>EnableMMAP On</default>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen<contextlist><context>server config</context><context>virtual host</context>
030108b1816bcda3d925df65357feabdce83bc94slive<context>directory</context><context>.htaccess</context>
030108b1816bcda3d925df65357feabdce83bc94slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive controls whether the <code>httpd</code> may use
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd memory-mapping if it needs to read the contents of a file during
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd delivery. By default, when the handling of a request requires
fb77c505254b6e9c925e23e734463e87574f8f40kess access to the data within a file -- for example, when delivering a
fb77c505254b6e9c925e23e734463e87574f8f40kess server-parsed file using <module>mod_include</module> -- Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-maps the file if the OS supports it.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This memory-mapping sometimes yields a performance improvement.
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess But in some environments, it is better to disable the memory-mapping
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to prevent operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On some multiprocessor systems, memory-mapping can reduce the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive performance of the <code>httpd</code>.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>With an NFS-mounted <directive module="core">DocumentRoot</directive>,
130d299c4b2b15be45532a176604c71fdc7bea5bnd the <code>httpd</code> may crash due to a segmentation fault if a file
130d299c4b2b15be45532a176604c71fdc7bea5bnd is deleted or truncated while the <code>httpd</code> has it
130d299c4b2b15be45532a176604c71fdc7bea5bnd memory-mapped.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </ul>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For server configurations that are vulnerable to these problems,
cdffd1263801c18587cefdebc4510df486d5906brbowen you should disable memory-mapping of delivered files by specifying:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd EnableMMAP Off
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For NFS mounted files, this feature may be disabled explicitly for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory "/path-to-nfs-files"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableMMAP Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>EnableSendfile</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Use the kernel sendfile support to deliver files to the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>EnableSendfile On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>EnableSendfile On</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<override>FileInfo</override>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<compatibility>Available in version 2.0.44 and later</compatibility>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This directive controls whether <code>httpd</code> may use the sendfile
130d299c4b2b15be45532a176604c71fdc7bea5bnd support from the kernel to transmit file contents to the client.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd By default, when the handling of a request requires no access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the data within a file -- for example, when delivering a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess static file -- Apache uses sendfile to deliver the file contents
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess without ever reading the file if the OS supports it.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>This sendfile mechanism avoids separate read and send operations,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess and buffer allocations. But on some platforms or within some
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess filesystems, it is better to disable this feature to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive operational problems:</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
4e10c61d7f924071cad435df940a8f325015b2d3rbowen <ul>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>Some platforms may have broken sendfile support that the build
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive system did not detect, especially if the binaries were built on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive another box and moved to such a machine with broken sendfile
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>On Linux the use of sendfile triggers TCP-checksum
130d299c4b2b15be45532a176604c71fdc7bea5bnd offloading bugs on certain networking cards when using IPv6.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>With a network-mounted <directive
4e10c61d7f924071cad435df940a8f325015b2d3rbowen module="core">DocumentRoot</directive> (e.g., NFS or SMB),
130d299c4b2b15be45532a176604c71fdc7bea5bnd the kernel may be unable to serve the network file through
130d299c4b2b15be45532a176604c71fdc7bea5bnd its own cache.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS or SMB mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;Directory "/path-to-nfs-files"&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
898475b582dd849de5915df0f2089b72ed8b2e2bcovener<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ErrorDocument</name>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<description>What the server will return to the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivein case of an error</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<compatibility>Quoting syntax for text messages is different in Apache
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor2.0</compatibility>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the event of a problem or error, Apache can be configured
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to do one of four things,</p>
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <ol>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>output a simple hardcoded error message</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>output a customized message</li>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <li>redirect to a local <var>URL-path</var> to handle the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener problem/error</li>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <li>redirect to an external <var>URL</var> to handle the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener problem/error</li>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </ol>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>The first option is the default, while options 2-4 are
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener configured using the <directive>ErrorDocument</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directive, which is followed by the HTTP response code and a URL
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor or a message. Apache will sometimes offer additional information
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener regarding the problem/error.</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>URLs can begin with a slash (/) for local URLs, or be a full
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL which the client can resolve. Alternatively, a message can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be provided to be displayed by the browser. Examples:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 401 /subscription_info.html<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 403 "Sorry can't allow you access today"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Additionally, the special value <code>default</code> can be used
003f0c9fda6664daf5092a0e42f65ede20098153slive to specify Apache's simple hardcoded message. While not required
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive under normal circumstances, <code>default</code> will restore
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache's simple hardcoded message for configurations that would
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive otherwise inherit an existing <directive>ErrorDocument</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs&gt;<br />
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess ErrorDocument 404 default<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;/Directory&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note that when you specify an <directive>ErrorDocument</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that points to a remote URL (ie. anything with a method such as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>http</code> in front of it), Apache will send a redirect to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd client to tell it where to find the document, even if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document ends up being on the same server. This has several
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick implications, the most important being that the client will not
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor receive the original error status code, but instead will
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor receive a redirect status code. This in turn can confuse web
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess robots and other clients which try to determine if a URL is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive valid using the status code. In addition, if you use a remote
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL in an <code>ErrorDocument 401</code>, the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive know to prompt the user for a password since it will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the 401 status code. Therefore, <strong>if you use an
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen <code>ErrorDocument 401</code> directive then it must refer to a local
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen document.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Microsoft Internet Explorer (MSIE) will by default ignore
6b15044d54a096e6323ff1540f1a491e8de7622dsf server-generated error messages when they are "too small" and substitute
6b15044d54a096e6323ff1540f1a491e8de7622dsf its own "friendly" error messages. The size threshold varies depending on
6b15044d54a096e6323ff1540f1a491e8de7622dsf the type of error, but in general, if you make your error document
6b15044d54a096e6323ff1540f1a491e8de7622dsf greater than 512 bytes, then MSIE will show the server-generated
6b15044d54a096e6323ff1540f1a491e8de7622dsf error rather than masking it. More information is available in
6b15044d54a096e6323ff1540f1a491e8de7622dsf Microsoft Knowledge Base article <a
6b15044d54a096e6323ff1540f1a491e8de7622dsf href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
6b15044d54a096e6323ff1540f1a491e8de7622dsf >Q294807</a>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Prior to version 2.0, messages were indicated by prefixing
6b15044d54a096e6323ff1540f1a491e8de7622dsf them with a single unmatched double quote character.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a href="/custom-error.html">documentation of
6b15044d54a096e6323ff1540f1a491e8de7622dsf customizable responses</a></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<name>ErrorLog</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Location where the server will log errors</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <directive>ErrorLog</directive> directive sets the name of
6b15044d54a096e6323ff1540f1a491e8de7622dsf the file to which the server will log any errors it encounters. If
6b15044d54a096e6323ff1540f1a491e8de7622dsf the <var>file-path</var> is not absolute then it is assumed to be
6b15044d54a096e6323ff1540f1a491e8de7622dsf relative to the <directive module="core">ServerRoot</directive>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example><title>Example</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorLog /var/log/httpd/error_log
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>If the <var>file-path</var>
6b15044d54a096e6323ff1540f1a491e8de7622dsf begins with a pipe (|) then it is assumed to be a command to spawn
6b15044d54a096e6323ff1540f1a491e8de7622dsf to handle the error log.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example><title>Example</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorLog "|/usr/local/bin/httpd_errors"
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Using <code>syslog</code> instead of a filename enables logging
6b15044d54a096e6323ff1540f1a491e8de7622dsf via syslogd(8) if the system supports it. The default is to use
6b15044d54a096e6323ff1540f1a491e8de7622dsf syslog facility <code>local7</code>, but you can override this by
6b15044d54a096e6323ff1540f1a491e8de7622dsf using the <code>syslog:<var>facility</var></code> syntax where
6b15044d54a096e6323ff1540f1a491e8de7622dsf <var>facility</var> can be one of the names usually documented in
6b15044d54a096e6323ff1540f1a491e8de7622dsf syslog(1).</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example><title>Example</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorLog syslog:user
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>SECURITY: See the <a
6b15044d54a096e6323ff1540f1a491e8de7622dsf href="/misc/security_tips.html#serverroot">security tips</a>
6b15044d54a096e6323ff1540f1a491e8de7622dsf document for details on why your security could be compromised
6b15044d54a096e6323ff1540f1a491e8de7622dsf if the directory where log files are stored is writable by
6b15044d54a096e6323ff1540f1a491e8de7622dsf anyone other than the user that starts the server.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <note type="warning"><title>Note</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>When entering a file path on non-Unix platforms, care should be taken
6b15044d54a096e6323ff1540f1a491e8de7622dsf to make sure that only forward slashed are used even though the platform
6b15044d54a096e6323ff1540f1a491e8de7622dsf may allow the use of back slashes. In general it is a good idea to always
6b15044d54a096e6323ff1540f1a491e8de7622dsf use forward slashes throughout the configuration files.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf </note>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><directive module="core">LogLevel</directive></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a href="/logs.html">Apache Log Files</a></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<name>FileETag</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>File attributes used to create the ETag
6b15044d54a096e6323ff1540f1a491e8de7622dsfHTTP response header</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>FileETag <var>component</var> ...</syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<default>FileETag INode MTime Size</default>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<context>directory</context><context>.htaccess</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<override>FileInfo</override>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf The <directive>FileETag</directive> directive configures the file
6b15044d54a096e6323ff1540f1a491e8de7622dsf attributes that are used to create the <code>ETag</code> (entity
6b15044d54a096e6323ff1540f1a491e8de7622dsf tag) response header field when the document is based on a file.
6b15044d54a096e6323ff1540f1a491e8de7622dsf (The <code>ETag</code> value is used in cache management to save
6b15044d54a096e6323ff1540f1a491e8de7622dsf network bandwidth.) In Apache 1.3.22 and earlier, the
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>ETag</code> value was <em>always</em> formed
6b15044d54a096e6323ff1540f1a491e8de7622dsf from the file's inode, size, and last-modified time (mtime). The
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive>FileETag</directive> directive allows you to choose
6b15044d54a096e6323ff1540f1a491e8de7622dsf which of these -- if any -- should be used. The recognized keywords are:
6b15044d54a096e6323ff1540f1a491e8de7622dsf </p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <dl>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <dt><strong>INode</strong></dt>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <dd>The file's i-node number will be included in the calculation</dd>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <dt><strong>MTime</strong></dt>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dd>The date and time the file was last modified will be included</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><strong>Size</strong></dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>The number of bytes in the file will be included</dd>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <dt><strong>All</strong></dt>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <dd>All available fields will be used. This is equivalent to:
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <example>FileETag INode MTime Size</example></dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt><strong>None</strong></dt>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <dd>If a document is file-based, no <code>ETag</code> field will be
af18698b10b429b270551ca3a5d51a75e1c9db22brianp included in the response</dd>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </dl>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess keywords may be prefixed with either <code>+</code> or <code>-</code>,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen which allow changes to be made to the default setting inherited
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from a broader scope. Any keyword appearing without such a prefix
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd immediately and completely cancels the inherited setting.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>If a directory's configuration includes
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd subdirectory's includes <code>FileETag&nbsp;-INode</code>,
af18698b10b429b270551ca3a5d51a75e1c9db22brianp the setting for that subdirectory (which will be inherited by
af18698b10b429b270551ca3a5d51a75e1c9db22brianp any sub-subdirectories that don't override it) will be equivalent to
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</usage>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</directivesynopsis>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<directivesynopsis type="section">
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<name>Files</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Contains directives that apply to matched
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndfilenames</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>All</override>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>The <directive type="section">Files</directive> directive
41ef8b3051855b802104193ee0a587515af60a37wrowe limits the scope of the enclosed directives by filename. It is comparable
41ef8b3051855b802104193ee0a587515af60a37wrowe to the <directive module="core" type="section">Directory</directive>
41ef8b3051855b802104193ee0a587515af60a37wrowe and <directive module="core" type="section">Location</directive>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directives. It should be matched with a <code>&lt;/Files&gt;</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directive. The directives given within this section will be applied to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess any object with a basename (last component of filename) matching the
41ef8b3051855b802104193ee0a587515af60a37wrowe specified filename. <directive type="section">Files</directive>
41ef8b3051855b802104193ee0a587515af60a37wrowe sections are processed in the order they appear in the
41ef8b3051855b802104193ee0a587515af60a37wrowe configuration file, after the <directive module="core"
41ef8b3051855b802104193ee0a587515af60a37wrowe type="section">Directory</directive> sections and
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>.htaccess</code> files are read, but before <directive
41ef8b3051855b802104193ee0a587515af60a37wrowe type="section" module="core">Location</directive> sections. Note
41ef8b3051855b802104193ee0a587515af60a37wrowe that <directive type="section">Files</directive> can be nested
41ef8b3051855b802104193ee0a587515af60a37wrowe inside <directive type="section"
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Directory</directive> sections to restrict the
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf portion of the filesystem they apply to.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>The <var>filename</var> argument should include a filename, or
41ef8b3051855b802104193ee0a587515af60a37wrowe a wild-card string, where <code>?</code> matches any single character,
41ef8b3051855b802104193ee0a587515af60a37wrowe and <code>*</code> matches any sequences of characters. Extended regular
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf expressions can also be used, with the addition of the
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <code>~</code> character. For example:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <example>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>would match most common Internet graphics formats. <directive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen module="core" type="section">FilesMatch</directive> is preferred,
41ef8b3051855b802104193ee0a587515af60a37wrowe however.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>Note that unlike <directive type="section"
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess module="core">Directory</directive> and <directive type="section"
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="core">Location</directive> sections, <directive
41ef8b3051855b802104193ee0a587515af60a37wrowe type="section">Files</directive> sections can be used inside
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>.htaccess</code> files. This allows users to control access to
41ef8b3051855b802104193ee0a587515af60a37wrowe their own files, at a file-by-file level.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe</usage>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and &lt;Files&gt; sections work</a> for an explanation of how these
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley different sections are combined when a request is received</seealso>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley</directivesynopsis>
2025fe01de41805f6148851335693aa5ebe2faffnd
2025fe01de41805f6148851335693aa5ebe2faffnd<directivesynopsis type="section">
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<name>FilesMatch</name>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<description>Contains directives that apply to regular-expression matched
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessfilenames</description>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe<context>directory</context><context>.htaccess</context>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf</contextlist>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<override>All</override>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <p>The <directive type="section">FilesMatch</directive> directive
41ef8b3051855b802104193ee0a587515af60a37wrowe limits the scope of the enclosed directives by filename, just as the
41ef8b3051855b802104193ee0a587515af60a37wrowe <directive module="core" type="section">Files</directive> directive
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf does. However, it accepts a regular expression. For example:</p>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive
41ef8b3051855b802104193ee0a587515af60a37wrowe <example>
41ef8b3051855b802104193ee0a587515af60a37wrowe &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match most common Internet graphics formats.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
832853bb93c1831daf24e4727c5ca0e1b1786e83lars and &lt;Files&gt; sections work</a> for an explanation of how these
832853bb93c1831daf24e4727c5ca0e1b1786e83lars different sections are combined when a request is received</seealso>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin</directivesynopsis>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<directivesynopsis>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<name>ForceType</name>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<description>Forces all matching files to be served with the specified
af18698b10b429b270551ca3a5d51a75e1c9db22brianpMIME content-type</description>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<syntax>ForceType <var>MIME-type</var>|None</syntax>
79c754eb51681c3389cd966753e902c429f78939trawick<contextlist><context>directory</context><context>.htaccess</context>
79c754eb51681c3389cd966753e902c429f78939trawick</contextlist>
79c754eb51681c3389cd966753e902c429f78939trawick<override>FileInfo</override>
79c754eb51681c3389cd966753e902c429f78939trawick<compatibility>Moved to the core in Apache 2.0</compatibility>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick<usage>
79c754eb51681c3389cd966753e902c429f78939trawick <p>When placed into an <code>.htaccess</code> file or a
79c754eb51681c3389cd966753e902c429f78939trawick <directive type="section" module="core">Directory</directive>, or
79c754eb51681c3389cd966753e902c429f78939trawick <directive type="section" module="core">Location</directive> or
79c754eb51681c3389cd966753e902c429f78939trawick <directive type="section" module="core">Files</directive>
79c754eb51681c3389cd966753e902c429f78939trawick section, this directive forces all matching files to be served
79c754eb51681c3389cd966753e902c429f78939trawick with the content type identification given by
79c754eb51681c3389cd966753e902c429f78939trawick <var>MIME-type</var>. For example, if you had a directory full of
79c754eb51681c3389cd966753e902c429f78939trawick GIF files, but did not want to label them all with <code>.gif</code>,
79c754eb51681c3389cd966753e902c429f78939trawick you might want to use:</p>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <example>
79c754eb51681c3389cd966753e902c429f78939trawick ForceType image/gif
79c754eb51681c3389cd966753e902c429f78939trawick </example>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <p>Note that unlike <directive module="core">DefaultType</directive>,
79c754eb51681c3389cd966753e902c429f78939trawick this directive overrides all mime-type associations, including
79c754eb51681c3389cd966753e902c429f78939trawick filename extensions, that might identify the media type.</p>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <p>You can override any <directive>ForceType</directive> setting
79c754eb51681c3389cd966753e902c429f78939trawick by using the value of <code>None</code>:</p>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <example>
79c754eb51681c3389cd966753e902c429f78939trawick # force all files to be image/gif:<br />
79c754eb51681c3389cd966753e902c429f78939trawick &lt;Location /images&gt;<br />
79c754eb51681c3389cd966753e902c429f78939trawick <indent>
79c754eb51681c3389cd966753e902c429f78939trawick ForceType image/gif<br />
79c754eb51681c3389cd966753e902c429f78939trawick </indent>
79c754eb51681c3389cd966753e902c429f78939trawick &lt;/Location&gt;<br />
79c754eb51681c3389cd966753e902c429f78939trawick <br />
79c754eb51681c3389cd966753e902c429f78939trawick # but normal mime-type associations here:<br />
79c754eb51681c3389cd966753e902c429f78939trawick &lt;Location /images/mixed&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType None<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>HostnameLookups</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables DNS lookups on client IP addresses</description>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<syntax>HostnameLookups On|Off|Double</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>HostnameLookups Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables DNS lookups so that host names can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The value <code>Double</code> refers to doing double-reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DNS lookup. That is, after a reverse lookup is performed, a forward
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup is then performed on that result. At least one of the IP
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd addresses in the forward lookup must match the original
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address. (In "tcpwrappers" terminology this is called
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PARANOID</code>.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Regardless of the setting, when <module>mod_authz_host</module> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used for controlling access by hostname, a double reverse lookup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be performed. This is necessary for security. Note that the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen result of this double-reverse isn't generally available unless you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set <code>HostnameLookups Double</code>. For example, if only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>HostnameLookups On</code> and a request is made to an object
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive that is protected by hostname restrictions, regardless of whether
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive the double-reverse fails or not, CGIs will still be passed the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive single-reverse result in <code>REMOTE_HOST</code>.</p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default is <code>Off</code> in order to save the network
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd traffic for those sites that don't truly need the reverse
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd lookups done. It is also better for the end users because they
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd don't have to suffer the extra latency that a lookup entails.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Heavily loaded sites should leave this directive
b54e326eb56e35f5992bc2b2b8ccbca168150004sf <code>Off</code>, since DNS lookups can take considerable
f6e09cc3ef4c890a9a33f9ab9e845afb17703e85sf amounts of time. The utility <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/programs/logresolve.html">logresolve</a>, compiled by default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <code>bin</code> subdirectory of your installation directory, can
f7fe99050600166042c04b8e595fb75499eed7f0geoff be used to look up host names from logged IP addresses offline.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</usage>
f7fe99050600166042c04b8e595fb75499eed7f0geoff</directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
f7fe99050600166042c04b8e595fb75499eed7f0geoff<directivesynopsis type="section">
f7fe99050600166042c04b8e595fb75499eed7f0geoff<name>IfDefine</name>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<description>Encloses directives that will be processed only
f7fe99050600166042c04b8e595fb75499eed7f0geoffif a test is true at startup</description>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
f7fe99050600166042c04b8e595fb75499eed7f0geoff &lt;/IfDefine&gt;</syntax>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<contextlist><context>server config</context><context>virtual host</context>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<context>directory</context><context>.htaccess</context>
f7fe99050600166042c04b8e595fb75499eed7f0geoff</contextlist>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<override>All</override>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </code> section is used to mark directives that are conditional. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives within an <directive type="section">IfDefine</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>test</var> in the <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >IfDefine</directive> section directive can be one of two forms:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><var>parameter-name</var></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>!</code><var>parameter-name</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>In the former case, the directives between the start and end
fb77c505254b6e9c925e23e734463e87574f8f40kess markers are only processed if the parameter named
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <var>parameter-name</var> is defined. The second format reverses
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive the test, and only processes the directives if
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <var>parameter-name</var> is <strong>not</strong> defined.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <var>parameter-name</var> argument is a define as given on
fb77c505254b6e9c925e23e734463e87574f8f40kess the <code>httpd</code> command line via <code>-D<var>parameter-</var>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive </code>, at the time the server was started.</p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p><directive type="section">IfDefine</directive> sections are
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive nest-able, which can be used to implement simple
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive multiple-parameter tests. Example:</p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <example>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive httpd -DReverseProxy ...<br />
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <br />
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen # httpd.conf<br />
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen &lt;IfDefine ReverseProxy&gt;<br />
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <indent>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen LoadModule rewrite_module modules/mod_rewrite.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/libproxy.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>IfModule</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Encloses directives that are processed conditional on the
4a13940dc2990df0a798718d3a3f9cf1566c2217bjhpresence or absence of a specific module</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfModule&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<compatibility>Module identifiers are available in version 2.1 and
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckesslater.</compatibility>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen<usage>
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
fb109b84906e3ee61680aa289953c2f9e859354erbowen section is used to mark directives that are conditional on the presence of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess a specific module. The directives within an <directive type="section"
fb109b84906e3ee61680aa289953c2f9e859354erbowen >IfModule</directive> section are only processed if the <var>test</var>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung is true. If <var>test</var> is false, everything between the start and
960188481b7025ac8ef7221b67af83dd27e46cd0rjung end markers is ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>The <var>test</var> in the <directive type="section"
fb109b84906e3ee61680aa289953c2f9e859354erbowen >IfModule</directive> section directive can be one of two forms:</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen <ul>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung <li><var>module</var></li>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
960188481b7025ac8ef7221b67af83dd27e46cd0rjung <li>!<var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the former case, the directives between the start and end
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd markers are only processed if the module named <var>module</var>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is included in Apache -- either compiled in or
5155e92c6100b47513159eee1b2b9914ab204a5acovener dynamically loaded using <directive module="mod_so"
5155e92c6100b47513159eee1b2b9914ab204a5acovener >LoadModule</directive>. The second format reverses the test,
5155e92c6100b47513159eee1b2b9914ab204a5acovener and only processes the directives if <var>module</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>not</strong> included.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>The <var>module</var> argument can be either the module identifier or
fb109b84906e3ee61680aa289953c2f9e859354erbowen the file name of the module, at the time it was compiled. For example,
fb109b84906e3ee61680aa289953c2f9e859354erbowen <code>rewrite_module</code> is the identifier and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mod_rewrite.c</code> is the file name. If a module consists of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive several source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>STANDARD20_MODULE_STUFF</code>.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfModule</directive> sections are
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes nest-able, which can be used to implement simple multiple-module
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes tests.</p>
d950cf9262224a223e2ff5c51393708071e14b94covener
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <note>This section should only be used if you need to have one
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes configuration file that works whether or not a specific module
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes is available. In normal operation, directives need not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive placed in <directive type="section">IfModule</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</note>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>Include</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Includes other configuration files from within
2851546ce44280e54301016a7e92b00a87745509sfthe server configuration files</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>Include <var>file-path</var>|<var>directory-path</var></syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<context>directory</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<compatibility>Wildcard matching available in 2.0.41 and later</compatibility>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>This directive allows inclusion of other configuration files
e302f38fd646764ce1a1e1c578d794aef514a9e5sf from within the server configuration files.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf include several files at once, in alphabetical order. In
e302f38fd646764ce1a1e1c578d794aef514a9e5sf addition, if <directive>Include</directive> points to a directory,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf rather than a file, Apache will read all files in that directory
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis and any subdirectory. But including entire directories is not
e302f38fd646764ce1a1e1c578d794aef514a9e5sf recommended, because it is easy to accidentally leave temporary
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen files in a directory that can cause <code>httpd</code> to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf fail.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The file path specified may be an absolute path, or may be relative
e302f38fd646764ce1a1e1c578d794aef514a9e5sf to the <directive module="core">ServerRoot</directive> directory.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Examples:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen Include /usr/local/apache2/conf/ssl.conf<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Include /usr/local/apache2/conf/vhosts/*.conf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Or, providing paths relative to your <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core">ServerRoot</directive> directory:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Include conf/ssl.conf<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Include conf/vhosts/*.conf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <p>Running <code>apachectl configtest</code> will give you a list
e302f38fd646764ce1a1e1c578d794aef514a9e5sf of the files that are being processed during the configuration
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf check:</p>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf root@host# apachectl configtest<br />
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf Processing config file: /usr/local/apache2/conf/ssl.conf<br />
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf Syntax OK
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf </example>
221a06bb836af6024708190895834af79c90d1c8rbowen</usage>
221a06bb836af6024708190895834af79c90d1c8rbowen
221a06bb836af6024708190895834af79c90d1c8rbowen<seealso><a href="/programs/apachectl.html">apachectl</a></seealso>
221a06bb836af6024708190895834af79c90d1c8rbowen</directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<name>KeepAlive</name>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<description>Enables HTTP persistent connections</description>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<syntax>KeepAlive On|Off</syntax>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<default>KeepAlive On</default>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<contextlist><context>server config</context><context>virtual host</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</contextlist>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<usage>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>The Keep-Alive extension to HTTP/1.0 and the persistent
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen connection feature of HTTP/1.1 provide long-lived HTTP sessions
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen which allow multiple requests to be sent over the same TCP
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen connection. In some cases this has been shown to result in an
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen almost 50% speedup in latency times for HTML documents with
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen many images. To enable Keep-Alive connections, set
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <code>KeepAlive On</code>.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>For HTTP/1.0 clients, Keep-Alive connections will only be
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen used if they are specifically requested by a client. In
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen addition, a Keep-Alive connection with an HTTP/1.0 client can
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen only be used when the length of the content is known in
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen advance. This implies that dynamic content such as CGI output,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf SSI pages, and server-generated directory listings will
e302f38fd646764ce1a1e1c578d794aef514a9e5sf generally not use Keep-Alive connections to HTTP/1.0 clients.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf For HTTP/1.1 clients, persistent connections are the default
e302f38fd646764ce1a1e1c578d794aef514a9e5sf unless otherwise specified. If the client requests it, chunked
e302f38fd646764ce1a1e1c578d794aef514a9e5sf encoding will be used in order to send content of unknown
e302f38fd646764ce1a1e1c578d794aef514a9e5sf length over persistent connections.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
2d391792b33e3c27e070739f74d74989c77fea8eminfrin<directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>KeepAliveTimeout</name>
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin<description>Amount of time the server will wait for subsequent
2d391792b33e3c27e070739f74d74989c77fea8eminfrinrequests on a persistent connection</description>
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin<syntax>KeepAliveTimeout <var>seconds</var></syntax>
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin<default>KeepAliveTimeout 15</default>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<usage>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen <p>The number of seconds Apache will wait for a subsequent
4497075b5e08b0c8ee89425a1758258ae80550fcsf request before closing the connection. Once a request has been
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen received, the timeout value specified by the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive module="core">Timeout</directive> directive applies.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>Setting <directive>KeepAliveTimeout</directive> to a high value
e302f38fd646764ce1a1e1c578d794aef514a9e5sf may cause performance problems in heavily loaded servers. The
e302f38fd646764ce1a1e1c578d794aef514a9e5sf higher the timeout, the more server processes will be kept
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen occupied waiting on connections with idle clients.</p>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis type="section">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>Limit</name>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<description>Restrict enclosed access controls to only certain HTTP
e302f38fd646764ce1a1e1c578d794aef514a9e5sfmethods</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen &lt;/Limit&gt;</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<context>directory</context><context>.htaccess</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<override>All</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Access controls are normally effective for
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <strong>all</strong> access methods, and this is the usual
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen desired behavior. <strong>In the general case, access control
e302f38fd646764ce1a1e1c578d794aef514a9e5sf directives should not be placed within a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive type="section">Limit</directive> section.</strong></p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The purpose of the <directive type="section">Limit</directive>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf directive is to restrict the effect of the access controls to the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen nominated HTTP methods. For all other methods, the access
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen restrictions that are enclosed in the <directive
4497075b5e08b0c8ee89425a1758258ae80550fcsf type="section">Limit</directive> bracket <strong>will have no
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen effect</strong>. The following example applies the access control
e302f38fd646764ce1a1e1c578d794aef514a9e5sf only to the methods <code>POST</code>, <code>PUT</code>, and
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>DELETE</code>, leaving all other methods unprotected:</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;Limit POST PUT DELETE&gt;<br />
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <indent>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf Require valid-user<br />
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf </indent>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf &lt;/Limit&gt;
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The method names listed can be one or more of: <code>GET</code>,
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>CONNECT</code>, <code>OPTIONS</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf case-sensitive.</strong> If <code>GET</code> is used it will also
e302f38fd646764ce1a1e1c578d794aef514a9e5sf restrict <code>HEAD</code> requests. The <code>TRACE</code> method
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen cannot be limited.</p>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <note type="warning">A <directive type="section"
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf module="core">LimitExcept</directive> section should always be
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen used in preference to a <directive type="section"
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf module="core">Limit</directive> section when restricting access,
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf since a <directive type="section"
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf module="core">LimitExcept</directive> section provides protection
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf against arbitrary methods.</note>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis type="section">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>LimitExcept</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Restrict access controls to all HTTP methods
e302f38fd646764ce1a1e1c578d794aef514a9e5sfexcept the named ones</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;/LimitExcept&gt;</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<context>directory</context><context>.htaccess</context>
ce4dc40a4e87991087488f70d96d3447d7557294sf</contextlist>
ce4dc40a4e87991087488f70d96d3447d7557294sf<override>All</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen<usage>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <p><directive type="section">LimitExcept</directive> and
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>&lt;/LimitExcept&gt;</code> are used to enclose
e302f38fd646764ce1a1e1c578d794aef514a9e5sf a group of access control directives which will then apply to any
e302f38fd646764ce1a1e1c578d794aef514a9e5sf HTTP access method <strong>not</strong> listed in the arguments;
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen i.e., it is the opposite of a <directive type="section"
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen module="core">Limit</directive> section and can be used to control
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen both standard and nonstandard/unrecognized methods. See the
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen documentation for <directive module="core"
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen type="section">Limit</directive> for more details.</p>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <p>For example:</p>
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;LimitExcept POST GET&gt;<br />
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <indent>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Require valid-user<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </indent>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;/LimitExcept&gt;
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>LimitInternalRecursion</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Determine maximum number of internal redirects and nested
e302f38fd646764ce1a1e1c578d794aef514a9e5sfsubrequests</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<default>LimitInternalRecursion 10</default>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<compatibility>Available in Apache 2.0.47 and later</compatibility>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>An internal redirect happens, for example, when using the <directive
a8ee031b2224ce5473826c9d4f603681589245fawrowe module="mod_actions">Action</directive> directive, which internally
a8ee031b2224ce5473826c9d4f603681589245fawrowe redirects the original request to a CGI script. A subrequest is Apache's
a8ee031b2224ce5473826c9d4f603681589245fawrowe mechanism to find out what would happen for some URI if it were requested.
a8ee031b2224ce5473826c9d4f603681589245fawrowe For example, <module>mod_dir</module> uses subrequests to look for the
a8ee031b2224ce5473826c9d4f603681589245fawrowe files listed in the <directive module="mod_dir">DirectoryIndex</directive>
a8ee031b2224ce5473826c9d4f603681589245fawrowe directive.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p><directive>LimitInternalRecursion</directive> prevents the server
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor from crashing when entering an infinite loop of internal redirects or
a8ee031b2224ce5473826c9d4f603681589245fawrowe subrequests. Such loops are usually caused by misconfigurations.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The directive stores two different limits, which are evaluated on
a8ee031b2224ce5473826c9d4f603681589245fawrowe per-request basis. The first <var>number</var> is the maximum number of
a8ee031b2224ce5473826c9d4f603681589245fawrowe internal redirects, that may follow each other. The second <var>number</var>
a8ee031b2224ce5473826c9d4f603681589245fawrowe determines, how deep subrequests may be nested. If you specify only one
a8ee031b2224ce5473826c9d4f603681589245fawrowe <var>number</var>, it will be assigned to both limits.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <example><title>Example</title>
34b157732214cedcd129cd9fe7c4290757505d60minfrin LimitInternalRecursion 5
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
02c86afa991026c4146423dc84bc126e57d28df6wrowe<name>LimitRequestBody</name>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<description>Restricts the total size of the HTTP request body sent
34b157732214cedcd129cd9fe7c4290757505d60minfrinfrom the client</description>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<syntax>LimitRequestBody <var>bytes</var></syntax>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<default>LimitRequestBody 0</default>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<contextlist><context>server config</context><context>virtual host</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive specifies the number of <var>bytes</var> from 0
fec106c7688e279dfde4403bc3c935fec97c1d62sf (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestBody</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
fec106c7688e279dfde4403bc3c935fec97c1d62sf message body within the context in which the directive is given
fec106c7688e279dfde4403bc3c935fec97c1d62sf (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource and the methods allowed on that resource. CGI scripts
fb77c505254b6e9c925e23e734463e87574f8f40kess typically use the message body for retrieving form information.
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener Implementations of the <code>PUT</code> method will require
fb77c505254b6e9c925e23e734463e87574f8f40kess a value at least as large as any representation that the server
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen wishes to accept for that resource.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd useful for avoiding some forms of denial-of-service
530eba85dbd41b8a0fa5255d3648d1440199a661slive attacks.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If, for example, you are permitting file upload to a particular
530eba85dbd41b8a0fa5255d3648d1440199a661slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
530eba85dbd41b8a0fa5255d3648d1440199a661slive LimitRequestBody 102400
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
530eba85dbd41b8a0fa5255d3648d1440199a661slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>LimitRequestFields</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limits the number of HTTP request header fields that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndwill be accepted from the client</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>LimitRequestFields <var>number</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>LimitRequestFields 100</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><var>Number</var> is an integer from 0 (meaning unlimited) to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <p>The <directive>LimitRequestFields</directive> directive allows
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem the server administrator to modify the limit on the number of
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem request header fields allowed in an HTTP request. A server needs
fec106c7688e279dfde4403bc3c935fec97c1d62sf this value to be larger than the number of fields that a normal
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem client request might include. The number of request header fields
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem used by a client rarely exceeds 20, but this may vary among
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem different client implementations, often depending upon the extent
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem to which a user has configured their browser to support detailed
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener content negotiation. Optional HTTP extensions are often expressed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor using request header fields.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener <p>This directive gives the server administrator greater
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener control over abnormal client request behavior, which may be
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener useful for avoiding some forms of denial-of-service attacks.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LimitRequestFields 50
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestFieldSize</name>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<description>Limits the size of the HTTP request header allowed from the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckessclient</description>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<syntax>LimitRequestFieldsize <var>bytes</var></syntax>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<default>LimitRequestFieldsize 8190</default>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<contextlist><context>server config</context></contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the value of the compile-time constant
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>DEFAULT_LIMIT_REQUEST_FIELDSIZE</code> (8190 as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed) that will be allowed in an HTTP request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce the limit on the allowed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive size of an HTTP request header field below the normal input buffer
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive size compiled with the server. A server needs this value to be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd large enough to hold any one header field from a normal client
fb77c505254b6e9c925e23e734463e87574f8f40kess request. The size of a normal request header field will vary
030108b1816bcda3d925df65357feabdce83bc94slive greatly among different client implementations, often depending
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor upon the extent to which a user has configured their browser to
030108b1816bcda3d925df65357feabdce83bc94slive support detailed content negotiation.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd control over abnormal client request behavior, which may be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd useful for avoiding some forms of denial-of-service attacks.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitRequestFieldSize 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>LimitRequestLine</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Limit the size of the HTTP request line that will be accepted
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessfrom the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestLine <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestLine 8190</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the number of <var>bytes</var> from 0 to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the value of the compile-time constant
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>DEFAULT_LIMIT_REQUEST_LINE</code> (8190 as distributed)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed on the HTTP request-line.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <directive>LimitRequestLine</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to reduce the limit on the allowed size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of a client's HTTP request-line below the normal input buffer size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive compiled with the server. Since the request-line consists of the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess HTTP method, URI, and protocol version, the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive>LimitRequestLine</directive> directive places a
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor restriction on the length of a request-URI allowed for a request
030108b1816bcda3d925df65357feabdce83bc94slive on the server. A server needs this value to be large enough to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd hold any of its resource names, including any information that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd might be passed in the query part of a <code>GET</code> request.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>For example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitRequestLine 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitXMLRequestBody</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Limits the size of an XML-based request body</description>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitXMLRequestBody 1000000</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Limit (in bytes) on maximum size of an XML-based request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. A value of <code>0</code> will disable any checking.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LimitXMLRequestBody 0
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<directivesynopsis type="section">
7654193c1faf603feec999850322ad79e6c551bcnd<name>Location</name>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Applies the enclosed directives only to matching
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingURLs</description>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<syntax>&lt;Location
7654193c1faf603feec999850322ad79e6c551bcnd <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
7654193c1faf603feec999850322ad79e6c551bcnd<contextlist><context>server config</context><context>virtual host</context>
7654193c1faf603feec999850322ad79e6c551bcnd</contextlist>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd<usage>
7654193c1faf603feec999850322ad79e6c551bcnd <p>The <directive type="section">Location</directive> directive
7654193c1faf603feec999850322ad79e6c551bcnd limits the scope of the enclosed directives by URL. It is similar to the
7654193c1faf603feec999850322ad79e6c551bcnd <directive type="section" module="core">Directory</directive>
7654193c1faf603feec999850322ad79e6c551bcnd directive, and starts a subsection which is terminated with a
7654193c1faf603feec999850322ad79e6c551bcnd <code>&lt;/Location&gt;</code> directive. <directive
7654193c1faf603feec999850322ad79e6c551bcnd type="section">Location</directive> sections are processed in the
7654193c1faf603feec999850322ad79e6c551bcnd order they appear in the configuration file, after the <directive
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd type="section" module="core">Directory</directive> sections and
7654193c1faf603feec999850322ad79e6c551bcnd <code>.htaccess</code> files are read, and after the <directive
7654193c1faf603feec999850322ad79e6c551bcnd type="section" module="core">Files</directive> sections.</p>
7654193c1faf603feec999850322ad79e6c551bcnd
439acee10571861c670c438038a62f90a08bf137covener <p><directive type="section">Location</directive> sections operate
439acee10571861c670c438038a62f90a08bf137covener completely outside the filesystem. This has several consequences.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor Most importantly, <directive type="section">Location</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives should not be used to control access to filesystem
439acee10571861c670c438038a62f90a08bf137covener locations. Since several different URLs may map to the same
439acee10571861c670c438038a62f90a08bf137covener filesystem location, such access controls may by circumvented.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>When to use <directive
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener type="section">Location</directive></title>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>Use <directive type="section">Location</directive> to apply
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener directives to content that lives outside the filesystem. For
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener content that lives in the filesystem, use <directive
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener type="section" module="core">Directory</directive> and <directive
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener type="section" module="core">Files</directive>. An exception is
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <code>&lt;Location /&gt;</code>, which is an easy way to
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener apply a configuration to the entire server.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener </note>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>For all origin (non-proxy) requests, the URL to be matched is a
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener URL-path of the form <code>/path/</code>. No scheme, hostname,
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener port, or query string may be included. For proxy requests, the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor URL to be matched is of the form
df5042f69eea159c73cd7b16542d4ca7d879b0b5trawick <code>scheme://servername/path</code>, and you must include the
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener prefix.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive characters.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Extended regular
fb77c505254b6e9c925e23e734463e87574f8f40kess expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location ~ "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match URLs that contained the substring <code>/extra/data</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess or <code>/special/data</code>. The directive <directive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick type="section" module="core">LocationMatch</directive> behaves
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive identical to the regex version of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. For example, to enable status requests, but allow them
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only from browsers at <code>foo.com</code>, you might use:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from .foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <note><title>Note about / (slash)</title>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>The slash character has special meaning depending on where in a
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd URL it appears. People may be used to its behavior in the filesystem
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd where multiple adjacent slashes are frequently collapsed to a single
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen <code>/home/foo</code>). In URL-space this is not necessarily true.
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen The <directive type="section" module="core">LocationMatch</directive>
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen directive and the regex version of <directive type="section"
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen >Location</directive> require you to explicitly specify multiple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slashes if that is your intention.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
750d12c59545dbbac70390988de94f7e901b08f2niq the request URL <code>/abc</code> but not the request URL <code>
750d12c59545dbbac70390988de94f7e901b08f2niq //abc</code>. The (non-regex) <directive type="section"
750d12c59545dbbac70390988de94f7e901b08f2niq >Location</directive> directive behaves similarly when used for
750d12c59545dbbac70390988de94f7e901b08f2niq proxy requests. But when (non-regex) <directive type="section"
750d12c59545dbbac70390988de94f7e901b08f2niq >Location</directive> is used for non-proxy requests it will
750d12c59545dbbac70390988de94f7e901b08f2niq implicitly match multiple slashes with a single slash. For example,
750d12c59545dbbac70390988de94f7e901b08f2niq if you specify <code>&lt;Location /abc/def&gt;</code> and the
750d12c59545dbbac70390988de94f7e901b08f2niq request is to <code>/abc//def</code> then it will match.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq </note>
750d12c59545dbbac70390988de94f7e901b08f2niq</usage>
750d12c59545dbbac70390988de94f7e901b08f2niq<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
750d12c59545dbbac70390988de94f7e901b08f2niq and &lt;Files&gt; sections work</a> for an explanation of how these
750d12c59545dbbac70390988de94f7e901b08f2niq different sections are combined when a request is received</seealso>
750d12c59545dbbac70390988de94f7e901b08f2niq</directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<directivesynopsis type="section">
750d12c59545dbbac70390988de94f7e901b08f2niq<name>LocationMatch</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Applies the enclosed directives only to regular-expression
750d12c59545dbbac70390988de94f7e901b08f2niqmatching URLs</description>
750d12c59545dbbac70390988de94f7e901b08f2niq<syntax>&lt;LocationMatch
6b15044d54a096e6323ff1540f1a491e8de7622dsf <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <directive type="section">LocationMatch</directive> directive
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic limits the scope of the enclosed directives by URL, in an identical manner
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic to <directive module="core" type="section">Location</directive>. However,
011e567af90fe9d72bbabf8cc5e373b4436b9d08rbowen it takes a regular expression as an argument instead of a simple
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic string. For example:</p>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf &lt;LocationMatch "/(extra|special)/data"&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>would match URLs that contained the substring <code>/extra/data</code>
6b15044d54a096e6323ff1540f1a491e8de7622dsf or <code>/special/data</code>.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq</usage>
750d12c59545dbbac70390988de94f7e901b08f2niq
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic and &lt;Files&gt; sections work</a> for an explanation of how these
6b15044d54a096e6323ff1540f1a491e8de7622dsf different sections are combined when a request is received</seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<name>LogLevel</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Controls the verbosity of the ErrorLog</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>LogLevel <var>level</var></syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<default>LogLevel warn</default>
750d12c59545dbbac70390988de94f7e901b08f2niq<contextlist><context>server config</context><context>virtual host</context>
750d12c59545dbbac70390988de94f7e901b08f2niq</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LogLevel</directive> adjusts the verbosity of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive messages recorded in the error logs (see <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">ErrorLog</directive> directive). The following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1">
003f0c9fda6664daf5092a0e42f65ede20098153slive <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </columnspec>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <th><strong>Level</strong> </th>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <th><strong>Description</strong> </th>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <th><strong>Example</strong> </th>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td><code>emerg</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Emergencies - system is unusable.</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>Action must be taken immediately.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>"getpwuid: couldn't determine user name from uid"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <tr>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <td><code>crit</code> </td>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Critical Conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"socket: Failed to get a socket, exiting child"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <tr>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi <td><code>error</code> </td>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <td>Error conditions.</td>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <td>"Premature end of script headers"</td>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi </tr>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <tr>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <td><code>warn</code> </td>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <td>Warning conditions.</td>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <td>"child process 1234 did not exit, sending another
955d7fc3e7adb6463b7243e15c04e858718e799etakashi SIGHUP"</td>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi </tr>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <tr>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <td><code>notice</code> </td>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <td>Normal but significant condition.</td>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <td>"httpd: caught SIGBUS, attempting to dump core in
130d299c4b2b15be45532a176604c71fdc7bea5bnd ..."</td>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>info</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Informational.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Server seems busy, (you may need to increase
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki StartServers, or Min/MaxSpareServers)..."</td>
55d36f9b61520c2374ab463e77e8a62daa416398nd </tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>debug</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <td>Debug-level messages</td>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <td>"Opening config file ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When a particular level is specified, messages from all
fb77c505254b6e9c925e23e734463e87574f8f40kess other levels of higher significance will be reported as well.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <em>E.g.</em>, when <code>LogLevel info</code> is specified,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd then messages with log levels of <code>notice</code> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>warn</code> will also be posted.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Using a level of at least <code>crit</code> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd recommended.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
55d36f9b61520c2374ab463e77e8a62daa416398nd LogLevel notice
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>When logging to a regular file messages of the level
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>notice</code> cannot be suppressed and thus are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged. However, this doesn't apply when logging is done
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd using <code>syslog</code>.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd<directivesynopsis>
55d36f9b61520c2374ab463e77e8a62daa416398nd<name>MaxKeepAliveRequests</name>
55d36f9b61520c2374ab463e77e8a62daa416398nd<description>Number of requests allowed on a persistent
55d36f9b61520c2374ab463e77e8a62daa416398ndconnection</description>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<syntax>MaxKeepAliveRequests <var>number</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>MaxKeepAliveRequests 100</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<usage>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>The <directive>MaxKeepAliveRequests</directive> directive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive limits the number of requests allowed per connection when
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="core" >KeepAlive</directive> is on. If it is
bea526116133aa3d7dabd1924bfc580b37fbf22aslive set to <code>0</code>, unlimited requests will be allowed. We
bea526116133aa3d7dabd1924bfc580b37fbf22aslive recommend that this setting be kept to a high value for maximum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server performance.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive MaxKeepAliveRequests 500
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf</usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<name>NameVirtualHost</name>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<description>Designates an IP address for name-virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehosting</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
5b258a8d58679c6587757189339bb3c2d0488f93poirier <p>The <directive>NameVirtualHost</directive> directive is a
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin required directive if you want to configure <a
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin href="/vhosts/">name-based virtual hosts</a>.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>Although <var>addr</var> can be hostname it is recommended
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin that you always use an IP address, e.g.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <example>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin NameVirtualHost 111.22.33.44
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin </example>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>With the <directive>NameVirtualHost</directive> directive you
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf specify the IP address on which the server will receive requests
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf for the name-based virtual hosts. This will usually be the address
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf to which your name-based virtual host names resolve. In cases
03aa31ad82759363ba1a55589e517b16308ef635minfrin where a firewall or other proxy receives the requests and forwards
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor them on a different IP address to the server, you must specify the
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess IP address of the physical interface on the machine which will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing the requests. If you have multiple name-based hosts on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple addresses, repeat the directive for each address.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Note</title>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Note, that the "main server" and any <code>_default_</code> servers
7b5535ed88e0f561b3bfb3330137bd804846afd4slive will <strong>never</strong> be served for a request to a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>NameVirtualHost</directive> IP address (unless for some
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd reason you specify <directive>NameVirtualHost</directive> but then
7b5535ed88e0f561b3bfb3330137bd804846afd4slive don't define any <directive>VirtualHost</directive>s for that
7b5535ed88e0f561b3bfb3330137bd804846afd4slive address).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Optionally you can specify a port number on which the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive name-based virtual hosts should be used, e.g.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <example>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin NameVirtualHost 111.22.33.44:8080
69d4a64874fd7161f80bb0484341c60857b6fd6esf </example>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>IPv6 addresses must be enclosed in square brackets, as shown
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin in the following example:</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <example>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin NameVirtualHost [fe80::a00:20ff:fea7:ccea]:8080
69d4a64874fd7161f80bb0484341c60857b6fd6esf </example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
03aa31ad82759363ba1a55589e517b16308ef635minfrin <p>To receive requests on all interfaces, you can use an argument of
3621f3acee323a877639a96d84891095eb07933aminfrin <code>*</code></p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
3621f3acee323a877639a96d84891095eb07933aminfrin <example>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor NameVirtualHost *
69d4a64874fd7161f80bb0484341c60857b6fd6esf </example>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
69d4a64874fd7161f80bb0484341c60857b6fd6esf <note><title>Argument to <directive type="section">VirtualHost</directive>
69d4a64874fd7161f80bb0484341c60857b6fd6esf directive</title>
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>Note that the argument to the <directive
03aa31ad82759363ba1a55589e517b16308ef635minfrin type="section">VirtualHost</directive> directive must
69d4a64874fd7161f80bb0484341c60857b6fd6esf exactly match the argument to the <directive
69d4a64874fd7161f80bb0484341c60857b6fd6esf >NameVirtualHost</directive> directive.</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf NameVirtualHost 1.2.3.4<br />
69d4a64874fd7161f80bb0484341c60857b6fd6esf &lt;VirtualHost 1.2.3.4&gt;<br />
69d4a64874fd7161f80bb0484341c60857b6fd6esf # ...<br />
69d4a64874fd7161f80bb0484341c60857b6fd6esf &lt;/VirtualHost&gt;<br />
69d4a64874fd7161f80bb0484341c60857b6fd6esf </example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf </note>
69d4a64874fd7161f80bb0484341c60857b6fd6esf</usage>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf<seealso><a href="/vhosts/">Virtual Hosts
69d4a64874fd7161f80bb0484341c60857b6fd6esfdocumentation</a></seealso>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf</directivesynopsis>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
03aa31ad82759363ba1a55589e517b16308ef635minfrin<directivesynopsis>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<name>Options</name>
69d4a64874fd7161f80bb0484341c60857b6fd6esf<description>Configures what features are available in a particular
03aa31ad82759363ba1a55589e517b16308ef635minfrindirectory</description>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<syntax>Options
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Options All</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>Options</override>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Options</directive> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dl>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>All</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All options except for <code>MultiViews</code>. This is the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ExecCGI</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts using <module>mod_cgi</module>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>FollowSymLinks</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <dd>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi The server will follow symbolic links in this directory.
be192cefa381d5bae6868034687471754cb43175sf <note>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <p>Even though the server follows the symlink it does <em>not</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive change the pathname used to match against <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note also, that this option <strong>gets ignored</strong> if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside a <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick </note></dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <dt><code>Includes</code></dt>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
9f38f3ec3e8087985d108a24ae796962fef83644takashi <dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick Server-side includes provided by <module>mod_include</module>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick are permitted.</dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><code>IncludesNOEXEC</code></dt>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Server-side includes are permitted, but the <code>#exec
9f38f3ec3e8087985d108a24ae796962fef83644takashi cmd</code> and <code>#exec cgi</code> are disabled. It is still
9f38f3ec3e8087985d108a24ae796962fef83644takashi possible to <code>#include virtual</code> CGI scripts from
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <directive module="mod_alias">ScriptAlias</directive>ed
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick directories.</dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <dt><code>Indexes</code></dt>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick If a URL which maps to a directory is requested, and there
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor is no <directive module="mod_dir">DirectoryIndex</directive>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi (<em>e.g.</em>, <code>index.html</code>) in that directory, then
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <module>mod_autoindex</module> will return a formatted listing
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick of the directory.</dd>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <dt><code>MultiViews</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
003f0c9fda6664daf5092a0e42f65ede20098153slive <a href="/content-negotiation.html">Content negotiated</a>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess "MultiViews" are allowed using
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <module>mod_negotiation</module>.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <dt><code>SymLinksIfOwnerMatch</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <dd>The server will only follow symbolic links for which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive target file or directory is owned by the same user id as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive link.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title> This option gets ignored if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set inside a <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive> section.</note>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Normally, if multiple <directive>Options</directive> could
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive apply to a directory, then the most specific one is used and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess others are ignored; the options are not merged. (See <a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess href="/sections.html#mergin">how sections are merged</a>.)
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess However if <em>all</em> the options on the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive>Options</directive> directive are preceded by a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>+</code> or <code>-</code> symbol, the options are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive merged. Any options preceded by a <code>+</code> are added to the
130d299c4b2b15be45532a176604c71fdc7bea5bnd options currently in force, and any options preceded by a
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>-</code> are removed from the options currently in
130d299c4b2b15be45532a176604c71fdc7bea5bnd force. </p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Directory /web/docs&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Options Indexes FollowSymLinks<br />
6c5c651b0b97607b8c8b4965c1385c67699f217fnd </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Directory /web/docs/spec&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd Options Includes<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </indent>
750d12c59545dbbac70390988de94f7e901b08f2niq &lt;/Directory&gt;
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive </example>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>then only <code>Includes</code> will be set for the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>/web/docs/spec</code> directory. However if the second
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <directive>Options</directive> directive uses the <code>+</code> and
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <code>-</code> symbols:</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <example>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd &lt;Directory /web/docs&gt;<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <indent>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd Options Indexes FollowSymLinks<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </indent>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd &lt;/Directory&gt;<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd &lt;Directory /web/docs/spec&gt;<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <indent>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd Options +Includes -Indexes<br />
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </indent>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd &lt;/Directory&gt;
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </example>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>then the options <code>FollowSymLinks</code> and
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>Includes</code> are set for the <code>/web/docs/spec</code>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directory.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <note><title>Note</title>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>Using <code>-IncludesNOEXEC</code> or
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>-Includes</code> disables server-side includes completely
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd regardless of the previous setting.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </note>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The default in the absence of any other settings is
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>All</code>.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</usage>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</directivesynopsis>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<name>Require</name>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<description>Selects which authenticated users can access
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisda resource</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Require <var>entity-name</var> [<var>entity-name</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive selects which authenticated users can access
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a directory. The allowed syntaxes are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require user <var>userid</var> [<var>userid</var>]
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd ...</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Only the named users can access the resource.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require group <var>group-name</var> [<var>group-name</var>]
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen ...</code></dt>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <dd>Only users in the named groups can access the resource.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <dt><code>Require valid-user</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All valid users can access the resource.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>Require</directive> must be accompanied by
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <directive module="core">AuthName</directive> and <directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module="core">AuthType</directive> directives, and directives such
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen as <directive module="mod_authn_file">AuthUserFile</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd and <directive module="mod_authz_groupfile">AuthGroupFile</directive> (to
130d299c4b2b15be45532a176604c71fdc7bea5bnd define users and groups) in order to work correctly. Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd AuthType Basic<br />
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele AuthName "Restricted Directory"<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen AuthUserFile /web/users<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen AuthGroupFile /web/groups<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require group admin
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Access controls which are applied in this way are effective for
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <strong>all</strong> methods. <strong>This is what is normally
03e0a375c2435102fb2b51e34cccff52acbfddcdnd desired.</strong> If you wish to apply access controls only to
03e0a375c2435102fb2b51e34cccff52acbfddcdnd specific methods, while leaving other methods unprotected, then
03e0a375c2435102fb2b51e34cccff52acbfddcdnd place the <directive>Require</directive> statement into a
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <directive module="core" type="section">Limit</directive>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd section.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><directive module="core">Satisfy</directive></seealso>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<seealso><module>mod_authz_host</module></seealso>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<name>RLimitCPU</name>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<description>Limits the CPU consumption of processes launched
03e0a375c2435102fb2b51e34cccff52acbfddcdndby Apache children</description>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<default>Unset; uses operating system defaults</default>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<contextlist><context>server config</context><context>virtual host</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<context>directory</context><context>.htaccess</context></contextlist>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<override>All</override>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Takes 1 or 2 parameters. The first parameter sets the soft
03e0a375c2435102fb2b51e34cccff52acbfddcdnd resource limit for all processes and the second parameter sets
03e0a375c2435102fb2b51e34cccff52acbfddcdnd the maximum resource limit. Either parameter can be a number,
03e0a375c2435102fb2b51e34cccff52acbfddcdnd or <code>max</code> to indicate to the server that the limit should
03e0a375c2435102fb2b51e34cccff52acbfddcdnd be set to the maximum allowed by the operating system
03e0a375c2435102fb2b51e34cccff52acbfddcdnd configuration. Raising the maximum resource limit requires that
03e0a375c2435102fb2b51e34cccff52acbfddcdnd the server is running as <code>root</code>, or in the initial startup
03e0a375c2435102fb2b51e34cccff52acbfddcdnd phase.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>This applies to processes forked off from Apache children
03e0a375c2435102fb2b51e34cccff52acbfddcdnd servicing requests, not the Apache children themselves. This
03e0a375c2435102fb2b51e34cccff52acbfddcdnd includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>CPU resource limits are expressed in seconds per
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>RLimitMEM</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limits the memory consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveby Apache children</description>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<default>Unset; uses operating system defaults</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit should
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess be set to the maximum allowed by the operating system
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess configuration. Raising the maximum resource limit requires that
fb77c505254b6e9c925e23e734463e87574f8f40kess the server is running as <code>root</code>, or in the initial startup
fb77c505254b6e9c925e23e734463e87574f8f40kess phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen logs.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Memory resource limits are expressed in bytes per
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen process.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<seealso><directive module="core">RLimitCPU</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">RLimitNPROC</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<name>RLimitNPROC</name>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<description>Limits the number of processes that can be launched by
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenprocesses launched by Apache children</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Unset; uses operating system defaults</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
e0ef044feba0082771091af42798cada5bb1f4fcrbowen the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive should be set to the maximum allowed by the operating system
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Process limits control the number of processes per user.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGI processes are <strong>not</strong> running
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive under user ids other than the web server user id, this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will limit the number of processes that the server itself can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong><code>cannot fork</code></strong> messages in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>error_log</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<seealso><directive module="core">RLimitCPU</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>Satisfy</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Interaction between host-level access control and
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenuser authentication</description>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener<syntax>Satisfy Any|All</syntax>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<default>Satisfy All</default>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<contextlist><context>directory</context><context>.htaccess</context>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener</contextlist>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<override>AuthConfig</override>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Access policy if both <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Allow</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> used. The parameter can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either <code>All</code> or <code>Any</code>. This directive is only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful if access to a particular area is being restricted by both
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive username/password <em>and</em> client host address. In this case
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen the default behavior (<code>All</code>) is to require that the client
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen passes the address access restriction <em>and</em> enters a valid
e0ef044feba0082771091af42798cada5bb1f4fcrbowen username and password. With the <code>Any</code> option the client will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive granted access if they either pass the host restriction or enter a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive valid username and password. This can be used to password restrict
72580dbc2a55511f13f377063725b9f143b20826stoddard an area, but to let clients from particular addresses in without
72580dbc2a55511f13f377063725b9f143b20826stoddard prompting for a password.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example, if you wanted to let people on your network have
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen unrestricted access to a portion of your website, but require that
72580dbc2a55511f13f377063725b9f143b20826stoddard people outside of your network provide a password, you could use a
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor configuration similar to the following:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <example>
72580dbc2a55511f13f377063725b9f143b20826stoddard Require valid-user<br />
56d7eed7205462540aec7202cd82d9f5516fc537kess Allow from 192.168.1<br />
72580dbc2a55511f13f377063725b9f143b20826stoddard Satisfy Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <seealso><directive module="mod_authz_host">Allow</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <seealso><directive module="core">Require</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<name>ScriptInterpreterSource</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Technique for locating the interpreter for CGI
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenscripts</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen<default>ScriptInterpreterSource Script</default>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen<contextlist><context>server config</context><context>virtual host</context>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<context>directory</context><context>.htaccess</context></contextlist>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener<override>FileInfo</override>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<compatibility>Win32 only;
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjimoption <code>Registry-Strict</code> is available in Apache 2.0 and
ffec3e56ff5331a2d732ec07e9d107303fed43f4covenerlater</compatibility>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. The default setting is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code>. This causes Apache to use the interpreter pointed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the shebang line (first line, starting with <code>#!</code>) in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive script. On Win32 systems this line usually looks like:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive #!C:/Perl/bin/perl.exe
e0ef044feba0082771091af42798cada5bb1f4fcrbowen </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if perl is in the <code>PATH</code>, simply:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
72580dbc2a55511f13f377063725b9f143b20826stoddard <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive #!perl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen
72580dbc2a55511f13f377063725b9f143b20826stoddard <p>Setting <code>ScriptInterpreterSource Registry</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive searched using the script file extension (e.g., <code>.pl</code>) as a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive search key. The command defined by the registry subkey
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Shell\Open\Command</code> is used to open the script file. If the
fb77c505254b6e9c925e23e734463e87574f8f40kess registry keys cannot be found, Apache falls back to the behavior of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code> option.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Security</title>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>Be careful when using <code>ScriptInterpreterSource
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Registry</code> with <directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module="mod_alias">ScriptAlias</directive>'ed directories, because
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Apache will try to execute <strong>every</strong> file within this
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directory. The <code>Registry</code> setting may cause undesired
ef8e89e090461194ecadd31e8796a2c51e0531a2kess program calls on files which are typically not executed. For
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen example, the default open command on <code>.htm</code> files on
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen most Windows systems will execute Microsoft Internet Explorer, so
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen any HTTP request for an <code>.htm</code> file existing within the
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen script directory would start the browser in the background on the
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen server. This is a good way to crash your system within a minute or
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener so.</p>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener </note>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The option <code>Registry-Strict</code> which is new in Apache
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener 2.0 does the same thing as <code>Registry</code> but uses only the
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener subkey <code>Shell\ExecCGI\Command</code>. The
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <code>ExecCGI</code> key is not a common one. It must be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured manually in the windows registry and hence prevents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accidental program calls on your system.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>ServerAdmin</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Email address that the server includes in error
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabelemessages sent to the client</description>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAdmin</directive> sets the contact address
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen that the server includes in any error messages it returns to the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen client. If the httpd doesn't recognize the supplied argument as an URL, it
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen assumes, that it's an <var>email-address</var> and prepends it with
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>mailto:</code> in hyperlink targets. However, it's recommended to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd actually use an email address, since there are a lot of CGI scripts that
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen make that assumption. If you want to use an URL, it should point to another
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen server under your control. Otherwise users may not be able to contact you in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case of errors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin www-admin@foo.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>as users do not always mention that they are talking about the
fb77c505254b6e9c925e23e734463e87574f8f40kess server!</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerAlias</name>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<description>Alternate names for a host used when matching requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto name-virtual hosts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</syntax>
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd<contextlist><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAlias</directive> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive alternate names for a host, for use with <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <example>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive &lt;VirtualHost *&gt;<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive ServerName server.domain.com<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive ServerAlias server server2.domain.com server2<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive # ...<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive &lt;/VirtualHost&gt;
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </example>
d950cf9262224a223e2ff5c51393708071e14b94covener</usage>
d950cf9262224a223e2ff5c51393708071e14b94covener<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic</directivesynopsis>
d950cf9262224a223e2ff5c51393708071e14b94covener
d950cf9262224a223e2ff5c51393708071e14b94covener<directivesynopsis>
d950cf9262224a223e2ff5c51393708071e14b94covener<name>ServerName</name>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Hostname and port that the server uses to identify
d950cf9262224a223e2ff5c51393708071e14b94coveneritself</description>
d950cf9262224a223e2ff5c51393708071e14b94covener<syntax>ServerName <var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<contextlist><context>server config</context><context>virtual host</context>
d950cf9262224a223e2ff5c51393708071e14b94covener</contextlist>
d950cf9262224a223e2ff5c51393708071e14b94covener<compatibility>In version 2.0, this
d950cf9262224a223e2ff5c51393708071e14b94covener directive supersedes the functionality of the <directive>Port</directive>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic directive from version 1.3.</compatibility>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
d950cf9262224a223e2ff5c51393708071e14b94covener<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The <directive>ServerName</directive> directive sets the hostname and
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic port that the server uses to identify itself. This is used when
d950cf9262224a223e2ff5c51393708071e14b94covener creating redirection URLs. For example, if the name of the
d950cf9262224a223e2ff5c51393708071e14b94covener machine hosting the web server is <code>simple.example.com</code>,
d950cf9262224a223e2ff5c51393708071e14b94covener but the machine also has the DNS alias <code>www.example.com</code>
d950cf9262224a223e2ff5c51393708071e14b94covener and you wish the web server to be so identified, the following
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic directive should be used:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
d950cf9262224a223e2ff5c51393708071e14b94covener <example>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor ServerName www.example.com:80
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic </example>
d950cf9262224a223e2ff5c51393708071e14b94covener
d950cf9262224a223e2ff5c51393708071e14b94covener <p>If no <directive>ServerName</directive> is specified, then the
d950cf9262224a223e2ff5c51393708071e14b94covener server attempts to deduce the hostname by performing a reverse
d950cf9262224a223e2ff5c51393708071e14b94covener lookup on the IP address. If no port is specified in the
d950cf9262224a223e2ff5c51393708071e14b94covener <directive>ServerName</directive>, then the server will use the port
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor from the incoming
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive request. For optimal reliability and predictability, you should
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive specify an explicit hostname and port using the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <directive>ServerName</directive> directive.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>If you are using <a
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive the <directive>ServerName</directive> inside a
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive type="section" module="core">VirtualHost</directive>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive section specifies what hostname must appear in the request's
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
dc223428958ad9ff05011545bcdda000887b93e5slive <p>See the description of the
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj <directive module="core">UseCanonicalName</directive> directive for
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj settings which determine whether self-referential URL's (e.g., by the
dc223428958ad9ff05011545bcdda000887b93e5slive <module>mod_dir</module> module) will refer to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified port, or to the port number given in the client's request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
d8c44cd75cf575fe51319280c12445109e878523noodl Apache</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache virtual host
030108b1816bcda3d925df65357feabdce83bc94slive documentation</a></seealso>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<seealso><directive module="core">UseCanonicalName</directive></seealso>
37742b630743e470b94618ecb3560fbd82e50b59rbowen<seealso><directive module="core">NameVirtualHost</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">ServerAlias</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerPath</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Legacy URL pathname for a name-based virtual host that
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessis accessed by an incompatible browser</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>ServerPath <var>URL-path</var></syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>virtual host</context></contextlist>
37742b630743e470b94618ecb3560fbd82e50b59rbowen
37742b630743e470b94618ecb3560fbd82e50b59rbowen<usage>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>The <directive>ServerPath</directive> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
e8811b6d38f756b325446ded5d96857d13856511takashi
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>ServerRoot</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Base directory for the server installation</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>ServerRoot <var>directory-path</var></syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<default>ServerRoot /usr/local/apache</default>
ca908c21f63a71c5efa7d32bd2cfafe9a42ba1fbrbowen<contextlist><context>server config</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>ServerRoot</directive> directive sets the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory in which the server lives. Typically it will contain the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd subdirectories <code>conf/</code> and <code>logs/</code>. Relative
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd paths for other configuration files are taken as relative to this
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <example><title>Example</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerRoot /home/httpd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/invoking.html">the <code>-d</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess option to <code>httpd</code></a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/misc/security_tips.html#serverroot">the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd security tips</a> for information on how to properly set
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd permissions on the <directive>ServerRoot</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ServerSignature</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Configures the footer on server-generated documents</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ServerSignature On|Off|EMail</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ServerSignature Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<context>directory</context><context>.htaccess</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
37742b630743e470b94618ecb3560fbd82e50b59rbowen<override>All</override>
37742b630743e470b94618ecb3560fbd82e50b59rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerSignature</directive> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, <module>mod_proxy</module> ftp directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess listings, <module>mod_info</module> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user often has no possibility to tell which of the chained servers
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick actually produced a returned error message.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>Off</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting, which is the default, suppresses the footer line (and is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive therefore compatible with the behavior of Apache-1.2 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive below). The <code>On</code> setting simply adds a line with the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess server version number and <directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess module="core">ServerName</directive> of the serving virtual host,
030108b1816bcda3d925df65357feabdce83bc94slive and the <code>EMail</code> setting additionally creates a
030108b1816bcda3d925df65357feabdce83bc94slive "mailto:" reference to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerAdmin</directive> of the referenced
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd document.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>After version 2.0.44, the details of the server version number
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd presented are controlled by the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">ServerTokens</directive> directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerTokens</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>ServerTokens</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheader</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>ServerTokens Full</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive description of the generic OS-type of the server as well as
7fbd7281d06cec1918aa370214df77c572f871a9sf information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <dl>
7fbd7281d06cec1918aa370214df77c572f871a9sf <dt><code>ServerTokens Prod[uctOnly]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Major</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2</code></dd>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
1597043cec6ad37fa4154bf09b0fccdabed1a239slive <dt><code>ServerTokens Minor</code></dt>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
530eba85dbd41b8a0fa5255d3648d1440199a661slive Apache/2.0</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Min[imal]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.0.41</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens OS</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, this directive also controls the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information presented by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerSignature</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerSignature</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetHandler</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetHandler <var>handler-name</var>|None</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved into the core in Apache 2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be parsed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive through the <a href="/handler.html">handler</a> given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>handler-name</var>. For example, if you had a directory you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wanted to be parsed entirely as imagemap rule files, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> file in that directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler imap-file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following into <code>httpd.conf</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <directive>SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive by using the value <code>None</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>SetInputFilter</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Sets the filters that will process client requests and POST
7fbd7281d06cec1918aa370214df77c572f871a9sfinput</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context><context>.htaccess</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf</contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf<override>FileInfo</override>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>The <directive>SetInputFilter</directive> directive sets the
7fbd7281d06cec1918aa370214df77c572f871a9sf filter or filters which will process client requests and POST
7fbd7281d06cec1918aa370214df77c572f871a9sf input when they are received by the server. This is in addition to
7fbd7281d06cec1918aa370214df77c572f871a9sf any filters defined elsewhere, including the
7fbd7281d06cec1918aa370214df77c572f871a9sf <directive module="mod_mime">AddInputFilter</directive>
7fbd7281d06cec1918aa370214df77c572f871a9sf directive.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>If more than one filter is specified, they must be separated
7fbd7281d06cec1918aa370214df77c572f871a9sf by semicolons in the order in which they should process the
7fbd7281d06cec1918aa370214df77c572f871a9sf content.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><a href="/filter.html">Filters</a> documentation</seealso>
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>SetOutputFilter</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Sets the filters that will process responses from the
7fbd7281d06cec1918aa370214df77c572f871a9sfserver</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context><context>.htaccess</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf</contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf<override>FileInfo</override>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>The <directive>SetOutputFilter</directive> directive sets the filters
7fbd7281d06cec1918aa370214df77c572f871a9sf which will process responses from the server before they are
7fbd7281d06cec1918aa370214df77c572f871a9sf sent to the client. This is in addition to any filters defined
7fbd7281d06cec1918aa370214df77c572f871a9sf elsewhere, including the
7fbd7281d06cec1918aa370214df77c572f871a9sf <directive module="mod_mime">AddOutputFilter</directive>
7fbd7281d06cec1918aa370214df77c572f871a9sf directive.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>For example, the following configuration will process all files
7fbd7281d06cec1918aa370214df77c572f871a9sf in the <code>/www/data/</code> directory for server-side
7fbd7281d06cec1918aa370214df77c572f871a9sf includes.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;Directory /www/data/&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf <indent>
7fbd7281d06cec1918aa370214df77c572f871a9sf SetOutputFilter INCLUDES<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf </indent>
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/Directory&gt;
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>TimeOut</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Amount of time the server will wait for
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowencertain events before failing a request</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>TimeOut <var>seconds</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>TimeOut 300</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
8b052d682204371decc64f942aede5ef1da98955erikabele<usage>
8b052d682204371decc64f942aede5ef1da98955erikabele <p>The <directive>TimeOut</directive> directive currently defines
8b052d682204371decc64f942aede5ef1da98955erikabele the amount of time Apache will wait for three things:</p>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <ol>
8b052d682204371decc64f942aede5ef1da98955erikabele <li>The total amount of time it takes to receive a GET
8b052d682204371decc64f942aede5ef1da98955erikabele request.</li>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <li>The amount of time between receipt of TCP packets on a
7fbd7281d06cec1918aa370214df77c572f871a9sf POST or PUT request.</li>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <li>The amount of time between ACKs on transmissions of TCP
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier packets in responses.</li>
7fbd7281d06cec1918aa370214df77c572f871a9sf </ol>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>We plan on making these separately configurable at some point
7fbd7281d06cec1918aa370214df77c572f871a9sf down the road. The timer used to default to 1200 before 1.2,
7fbd7281d06cec1918aa370214df77c572f871a9sf but has been lowered to 300 which is still far more than
7fbd7281d06cec1918aa370214df77c572f871a9sf necessary in most situations. It is not set any lower by
7fbd7281d06cec1918aa370214df77c572f871a9sf default because there may still be odd places in the code where
7fbd7281d06cec1918aa370214df77c572f871a9sf the timer is not reset when a packet is sent. </p>
7fbd7281d06cec1918aa370214df77c572f871a9sf</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>UseCanonicalName</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Configures how the server determines its own name and
7fbd7281d06cec1918aa370214df77c572f871a9sfport</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>UseCanonicalName On|Off|DNS</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<default>UseCanonicalName On</default>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>In many situations Apache must construct a <em>self-referential</em>
7fbd7281d06cec1918aa370214df77c572f871a9sf URL -- that is, a URL that refers back to the same server. With
7fbd7281d06cec1918aa370214df77c572f871a9sf <code>UseCanonicalName On</code> Apache will use the hostname and port
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified in the <directive module="core">ServerName</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive to construct the canonical name for the server. This name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is used in all self-referential URLs, and for the values of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>With <code>UseCanonicalName Off</code> Apache will form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs using the hostname and port supplied by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele that are used to implement <a
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele href="/vhosts/name-based.html">name based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructed from the client supplied values as well.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
fb77c505254b6e9c925e23e734463e87574f8f40kess where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type a shortname, and a URL which is a directory, such as
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>http://www/splat</code>, <em>without the trailing
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen slash</em> then Apache will redirect them to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>http://www.domain.com/splat/</code>. If you have
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd authentication enabled, this will cause the user to have to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd authenticate twice (once for <code>www</code> and once again
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd for <code>www.domain.com</code> -- see <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <directive>UseCanonicalName</directive> is set <code>Off</code>, then
6beba165aeced2ca77a6f1593ee08c47a32099efcovener Apache will redirect to <code>http://www/splat/</code>.</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>There is a third option, <code>UseCanonicalName DNS</code>,
6beba165aeced2ca77a6f1593ee08c47a32099efcovener which is intended for use with mass IP-based virtual hosting to
7a975d0413ba303546b7619e4785cb641f7f09fdcovener support ancient clients that do not provide a
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <code>Host:</code> header. With this option Apache does a
6beba165aeced2ca77a6f1593ee08c47a32099efcovener reverse DNS lookup on the server IP address that the client
6beba165aeced2ca77a6f1593ee08c47a32099efcovener connected to in order to work out self-referential URLs.</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <note type="warning"><title>Warning</title>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener they may be broken by this option. The client is essentially free
6beba165aeced2ca77a6f1593ee08c47a32099efcovener to give whatever value they want as a hostname. But if the CGI is
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim only using <code>SERVER_NAME</code> to construct self-referential URLs
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim then it should be just fine.</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener </note>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener</usage>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<seealso><directive module="core">ServerName</directive></seealso>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<seealso><directive module="mpm_common">Listen</directive></seealso>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener</directivesynopsis>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<directivesynopsis type="section">
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<name>VirtualHost</name>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<description>Contains directives that apply only to a specific
7a975d0413ba303546b7619e4785cb641f7f09fdcovenerhostname or IP address</description>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<syntax>&lt;VirtualHost
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
7a975d0413ba303546b7619e4785cb641f7f09fdcovener ...&gt; ... &lt;/VirtualHost&gt;</syntax>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<contextlist><context>server config</context></contextlist>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener
7a975d0413ba303546b7619e4785cb641f7f09fdcovener<usage>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <p><directive type="section">VirtualHost</directive> and
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
6beba165aeced2ca77a6f1593ee08c47a32099efcovener directives that will apply only to a particular virtual host. Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive that is allowed in a virtual host context may be
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim used. When the server receives a request for a document on a
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim particular virtual host, it uses the configuration directives
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim enclosed in the <directive type="section">VirtualHost</directive>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim section. <var>Addr</var> can be:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <ul>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li>The IP address of the virtual host;</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li>A fully qualified domain name for the IP address of the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim virtual host;</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li>The character <code>*</code>, which is used only in combination with
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>NameVirtualHost *</code> to match all IP addresses; or</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <li>The string <code>_default_</code>, which is used only
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim with IP virtual hosting to catch unmatched IP addresses.</li>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </ul>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <example><title>Example</title>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim &lt;VirtualHost 10.1.2.3&gt;<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <indent>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerAdmin webmaster@host.foo.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim DocumentRoot /www/docs/host.foo.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerName host.foo.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ErrorLog logs/host.foo.com-error_log<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim TransferLog logs/host.foo.com-access_log<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </indent>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim &lt;/VirtualHost&gt;
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </example>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>IPv6 addresses must be specified in square brackets because
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim the optional port number could not be determined otherwise. An
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim IPv6 example is shown below:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <example>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim &lt;VirtualHost [fe80::a00:20ff:fea7:ccea]&gt;<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <indent>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerAdmin webmaster@host.example.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim DocumentRoot /www/docs/host.example.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerName host.example.com<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ErrorLog logs/host.example.com-error_log<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim TransferLog logs/host.example.com-access_log<br />
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </indent>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim &lt;/VirtualHost&gt;
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </example>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>Each Virtual Host must correspond to a different IP address,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim different port number or a different host name for the server,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim in the former case the server machine must be configured to
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim accept IP packets for multiple addresses. (If the machine does
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim not have multiple network interfaces, then this can be
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim accomplished with the <code>ifconfig alias</code> command -- if
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim your OS supports it).</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <note><title>Note</title>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The use of <directive type="section">VirtualHost</directive> does
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <strong>not</strong> affect what addresses Apache listens on. You
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim may need to ensure that Apache is listening on the correct addresses
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim using <directive module="mpm_common">Listen</directive>.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </note>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>When using IP-based virtual hosting, the special name
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>_default_</code> can be specified in
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim which case this virtual host will match any IP address that is
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim not explicitly listed in another virtual host. In the absence
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim of any <code>_default_</code> virtual host the "main" server config,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim consisting of all those definitions outside any VirtualHost
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim section, is used when no IP-match occurs. (But note that any IP
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim address that matches a <directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick module="core">NameVirtualHost</directive> directive will use neither
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the "main" server config nor the <code>_default_</code> virtual host.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick See the <a href="/vhosts/name-based.html">name-based virtual hosting</a>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick documentation for further details.)</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>You can specify a <code>:port</code> to change the port that is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick matched. If unspecified then it defaults to the same port as the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen most recent <directive module="mpm_common">Listen</directive>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick statement of the main server. You may also specify <code>:*</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick to match all ports on that address. (This is recommended when used
a0fed3e26656887c8458aa1081d516d08ced3c84trawick with <code>_default_</code>.)</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note type="warning"><title>Security</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>See the <a href="/misc/security_tips.html">security tips</a>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick document for details on why your security could be compromised if the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directory where log files are stored is writable by anyone other
a0fed3e26656887c8458aa1081d516d08ced3c84trawick than the user that starts the server.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Apache</a></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/bind.html">Setting
a0fed3e26656887c8458aa1081d516d08ced3c84trawick which addresses and ports Apache uses</a></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick and &lt;Files&gt; sections work</a> for an explanation of how these
a0fed3e26656887c8458aa1081d516d08ced3c84trawick different sections are combined when a request is received</seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</modulesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick