core.xml revision 2b6c7b8eb5fbc43564898aedac730df7e91da475
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
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
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="core.xml.meta">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>core</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</description>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<status>Core</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>AcceptFilter</name>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Configures optimizations for a Protocol's Listener Sockets</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<syntax>AcceptFilter <var>protocol</var> <var>accept_filter</var></syntax>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<contextlist><context>server config</context></contextlist>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<compatibility>Available in Apache 2.1.5 and later.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenOn Windows from Apache 2.3.3 and later.</compatibility>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>This directive enables operating system specific optimizations for a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna listening socket by the Protocol type. The basic premise is for the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna kernel to not send a socket to the server process until either data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna is received or an entire HTTP Request is buffered. Only
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe FreeBSD's Accept Filters</a>, Linux's more primitive
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe are currently supported.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>Using <code>none</code> for an argument will disable any accept filters
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe for that protocol. This is useful for protocols that require a server
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <example>AcceptFilter nntp none</example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The default values on FreeBSD are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter http httpready <br/>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter https dataready
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
90efa9f1730742d874edb5a7803adce11c9f08eanoodl the kernel level. Once an entire request is received, the kernel then
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna sends it to the server. See the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna accf_http(9)</a> man page for more details. Since HTTPS requests are
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna accf_data(9)</a> filter is used.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The default values on Linux are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter http data <br/>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter https data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna requests. Any value besides <code>none</code> will enable
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna see the Linux
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna tcp(7)</a> man page.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>The default values on Windows are:</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe AcceptFilter http data <br/>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe AcceptFilter https data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe </example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe API, and does not support http protocol buffering. There are two values
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe which utilize the Windows AcceptEx() API and will recycle network
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe sockets between connections. <code>data</code> waits until data has
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe been transmitted as documented above, and the initial data buffer and
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network endpoint addresses are all retrieved from the single AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe invocation. <code>connect</code> will use the AcceptEx() API, also
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe retrieve the network endpoint addresses, but like <code>none</code>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe the <code>connect</code> option does not wait for the initial data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe transmission.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>On Windows, <code>none</code> uses accept() rather than than AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe and will not recycle sockets between connections. This is useful for
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network adapters with broken driver support, as well as some virtual
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network providers such as vpn drivers, or spam, virus or spyware
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe filters.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</usage>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AcceptPathInfo</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Resources accept trailing pathname information</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>AcceptPathInfo On|Off|Default</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AcceptPathInfo Default</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<compatibility>Available in Apache 2.0.30 and later</compatibility>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
fb77c505254b6e9c925e23e734463e87574f8f40kess variable.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>here.html</code>. Then requests for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/nothere.html/more</code> both collect
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/more</code> as <code>PATH_INFO</code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AcceptPathInfo</directive> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Off</code></dt><dd>A request will only be accepted if it
fb77c505254b6e9c925e23e734463e87574f8f40kess maps to a literal path that exists. Therefore a request with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive trailing pathname information after the true filename such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> in the above example will return
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
fb77c505254b6e9c925e23e734463e87574f8f40kess leading path component maps to a file that exists. The above
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><code>Default</code></dt><dd>The treatment of requests with
fb77c505254b6e9c925e23e734463e87574f8f40kess trailing pathname information is determined by the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/handler.html">handler</a> responsible for the request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The core handler for normal files defaults to rejecting
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess href="mod_cgi.html">cgi-script</a> and <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="mod_isapi.html">isapi-handler</a>, generally accept
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen <code>PATH_INFO</code> by default.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The primary purpose of the <code>AcceptPathInfo</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to allow you to override the handler's choice of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accepting or rejecting <code>PATH_INFO</code>. This override is required,
fb77c505254b6e9c925e23e734463e87574f8f40kess for example, when you use a <a href="/filter.html">filter</a>, such
fb77c505254b6e9c925e23e734463e87574f8f40kess as <a href="mod_include.html">INCLUDES</a>, to generate content
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive based on <code>PATH_INFO</code>. The core handler would usually reject
fb77c505254b6e9c925e23e734463e87574f8f40kess the request, so you can use the following configuration to enable
fb77c505254b6e9c925e23e734463e87574f8f40kess such a script:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Files "mypaths.shtml"&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options +Includes<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetOutputFilter INCLUDES<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd AcceptPathInfo On<br />
ef8e89e090461194ecadd31e8796a2c51e0531a2kess </indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Files&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AccessFileName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Name of the distributed configuration file</description>
003f0c9fda6664daf5092a0e42f65ede20098153slive<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>AccessFileName .htaccess</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>While processing a request the server looks for
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the first existing configuration file from this list of names in
003f0c9fda6664daf5092a0e42f65ede20098153slive every directory of the path to the document, if distributed
003f0c9fda6664daf5092a0e42f65ede20098153slive configuration files are <a href="#allowoverride">enabled for that
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directory</a>. For example:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AccessFileName .acl
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>before returning the document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;Directory /&gt;<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd <indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd AllowOverride None<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Directory&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</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>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AddDefaultCharset</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default charset parameter to be added when a response
843a03fe0b138a4c1f64cb90a014e9417ac30691fieldingcontent-type is <code>text/plain</code> or <code>text/html</code></description>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>AddDefaultCharset Off</default>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies a default value for the media type
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding charset parameter (the name of a character encoding) to be added
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to a response if and only if the response's content-type is either
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>text/plain</code> or <code>text/html</code>. This should override
684f2a9a422185adda0692a1203c5ad6687fc5c5nd any charset specified in the body of the response via a <code>META</code>
a8ce9095d102e43fecb81093a132b90b9a227f78kess element, though the exact behavior is often dependent on the user's client
684f2a9a422185adda0692a1203c5ad6687fc5c5nd configuration. A setting of <code>AddDefaultCharset Off</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding disables this functionality. <code>AddDefaultCharset On</code> enables
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding a default charset of <code>iso-8859-1</code>. Any other value is assumed
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to be the <var>charset</var> to be used, which should be one of the
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <a href="http://www.iana.org/assignments/character-sets">IANA registered
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding charset values</a> for use in Internet media types (MIME types).
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding For example:</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AddDefaultCharset utf-8
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p><directive>AddDefaultCharset</directive> should only be used when all
684f2a9a422185adda0692a1203c5ad6687fc5c5nd of the text resources to which it applies are known to be in that
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding character encoding and it is too inconvenient to label their charset
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding individually. One such example is to add the charset parameter
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to resources containing generated content, such as legacy CGI
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding scripts, that might be vulnerable to cross-site scripting attacks
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding due to user-provided data being included in the output. Note, however,
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding that a better solution is to just fix (or delete) those scripts, since
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding setting a default charset does not protect users that have enabled
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the "auto-detect character encoding" feature on their browser.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddCharset</directive></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AddOutputFilterByType</name>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<description>assigns an output filter to a particular media-type</description>
9583adab6bc4b3758e41963c905d9dad9f067131nd<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<var>media-type</var> [<var>media-type</var>] ...</syntax>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<contextlist><context>server config</context>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<context>virtual host</context><context>directory</context>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<context>.htaccess</context></contextlist>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<override>FileInfo</override>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<compatibility>Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</compatibility>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<usage>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>This directive activates a particular output <a
77ead9e0262e4f08ec336d1a65b2edef7705c839nd href="/filter.html">filter</a> for a request depending on the
77ead9e0262e4f08ec336d1a65b2edef7705c839nd response <glossary>media-type</glossary>. Because of certain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd problems discussed below, this directive is deprecated. The same
77ead9e0262e4f08ec336d1a65b2edef7705c839nd functionality is available using <module>mod_filter</module>.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The following example uses the <code>DEFLATE</code> filter, which
77ead9e0262e4f08ec336d1a65b2edef7705c839nd is provided by <module>mod_deflate</module>. It will compress all
77ead9e0262e4f08ec336d1a65b2edef7705c839nd output (either static or dynamic) which is labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> or <code>text/plain</code> before it is sent
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick to the client.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AddOutputFilterByType DEFLATE text/html text/plain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>If you want the content to be processed by more than one filter, their
77ead9e0262e4f08ec336d1a65b2edef7705c839nd names have to be separated by semicolons. It's also possible to use one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AddOutputFilterByType</directive> directive for each of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive these filters.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The configuration below causes all script output labeled as
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>text/html</code> to be processed at first by the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /cgi-bin/&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess Options Includes<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess <note type="warning"><title>Note</title>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>Enabling filters with <directive>AddOutputFilterByType</directive>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd may fail partially or completely in some cases. For example, no
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd filters are applied if the <glossary>media-type</glossary> could not
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd be determined. If you want to make sure that the filters will be
10673857794a4b3d9568ca2d983722a87ed352f1rbowen applied, assign the content type to a resource explicitly; for
10673857794a4b3d9568ca2d983722a87ed352f1rbowen example, with <directive module="mod_mime">AddType</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>. Setting the
fb77c505254b6e9c925e23e734463e87574f8f40kess content type within a (non-nph) CGI script is also safe.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">SetOutputFilter</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/filter.html">filters</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AllowEncodedSlashes</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Determines whether encoded path separators in URLs are allowed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivebe passed through</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowEncodedSlashes On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AllowEncodedSlashes Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<compatibility>Available in Apache 2.0.46 and later</compatibility>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<usage>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl which contain encoded path separators (<code>%2F</code> for <code>/</code>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz and additionally <code>%5C</code> for <code>\</code> on according systems)
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <note><title>Note</title>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding according systems) will be left as such in the otherwise decoded URL
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding string.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </note>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</usage>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<seealso><directive module="core">AcceptPathInfo</directive></seealso>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<name>AllowOverride</name>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<description>Types of directives that are allowed in
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<code>.htaccess</code> files</description>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<syntax>AllowOverride All|None|<var>directive-type</var>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem[<var>directive-type</var>] ...</syntax>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<default>AllowOverride All</default>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<contextlist><context>directory</context></contextlist>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<usage>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>When the server finds an <code>.htaccess</code> file (as
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem specified by <directive module="core">AccessFileName</directive>)
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem it needs to know which directives declared in that file can override
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem earlier configuration directives.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <note><title>Only available in &lt;Directory&gt; sections</title>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive>AllowOverride</directive> is valid only in
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive type="section" module="core">Directory</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections specified without regular expressions, not in <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Location</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">DirectoryMatch</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Files</directive> sections.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>None</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="#accessfilename">.htaccess</a> files are completely ignored.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In this case, the server will not even attempt to read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files in the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>All</code>, then any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive which has the .htaccess <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="directive-dict.html#Context">Context</a> is allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>directive-type</var> can be one of the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
9ed9eaf871c58d281af02e76125ceadb5060afa5nd Allow use of the authorization directives (<directive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd module="mod_authn_dbm">AuthDBMGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <directive module="mod_authz_groupfile">AuthGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_core">AuthName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_core">AuthType</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authn_file">AuthUserFile</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_core">Require</directive>, <em>etc.</em>).</dd>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <dt>FileInfo</dt>
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling document types
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (<directive module="core">ErrorDocument</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_negotiation">LanguagePriority</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">SetHandler</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">SetInputFilter</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">SetOutputFilter</directive>, and
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <module>mod_mime</module> Add* and Remove* directives),
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd document meta data (<directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="mod_headers">Header</directive>, <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="mod_headers">RequestHeader</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_setenvif">SetEnvIf</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_setenvif">SetEnvIfNoCase</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_setenvif">BrowserMatch</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_usertrack">CookieExpires</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_usertrack">CookieDomain</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_usertrack">CookieStyle</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_usertrack">CookieTracking</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_usertrack">CookieName</directive>),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_rewrite</module> directives <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteEngine</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteOptions</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteBase</directive>, <directive
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen module="mod_rewrite">RewriteCond</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteRule</directive>) and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_actions">Action</directive> from
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <module>mod_actions</module>.
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes </dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <dt>Indexes</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <dd>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes Allow use of the directives controlling directory indexing
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes (<directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="mod_autoindex">AddDescription</directive>,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <directive module="mod_autoindex">AddIcon</directive>, <directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="mod_autoindex">AddIconByEncoding</directive>,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <directive module="mod_autoindex">AddIconByType</directive>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="mod_autoindex">DefaultIcon</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="mod_dir">DirectoryIndex</directive>, <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="mod_autoindex">FancyIndexing</directive>, <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="mod_autoindex">HeaderName</directive>, <directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="mod_autoindex">IndexIgnore</directive>, <directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="mod_autoindex">IndexOptions</directive>, <directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="mod_autoindex">ReadmeName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>etc.</em>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt>Limit</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess Allow use of the directives controlling host access (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Allow</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Deny</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Order</directive>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Options[=<var>Option</var>,...]</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling specific directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive features (<directive module="core">Options</directive> and
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl <directive module="mod_include">XBitHack</directive>).
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive An equal sign may be given followed by a comma (but no spaces)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive separated lists of options that may be set using the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Options</directive> command.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride AuthConfig Indexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the example above all directives that are neither in the group
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><p>For security and performance reasons, do not set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>AllowOverride</code> to anything other than <code>None</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create) the <code>&lt;Directory&gt;</code> block that refers to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory where you're actually planning to place a
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>.htaccess</code> file.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess </note>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">AccessFileName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/configuring.html">Configuration Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<name>CGIMapExtension</name>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Technique for locating the interpreter for CGI
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingscripts</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>NetWare only</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>CGIMapExtension sys:\foo.nlm .foo</code> will
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding cause all CGI script files with a <code>.foo</code> extension to
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding be passed to the FOO interpreter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
e4881891552e185a7408318dfc7f62ebabe73cf6niq</directivesynopsis>
e4881891552e185a7408318dfc7f62ebabe73cf6niq
e4881891552e185a7408318dfc7f62ebabe73cf6niq<directivesynopsis>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<name>ContentDigest</name>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Enables the generation of <code>Content-MD5</code> HTTP Response
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingheaders</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<syntax>ContentDigest On|Off</syntax>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<default>ContentDigest Off</default>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<contextlist><context>server config</context><context>virtual host</context>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<context>directory</context><context>.htaccess</context>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</contextlist>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<override>Options</override>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<status>Experimental</status>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl respectively RFC2616.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
20b0f809c3823eda58808be053ffc305dfa9c785sf <p>MD5 is an algorithm for computing a "message digest"
20b0f809c3823eda58808be053ffc305dfa9c785sf (sometimes called "fingerprint") of arbitrary-length data, with
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl a high degree of confidence that any alterations in the data
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl will be reflected in alterations in the message digest.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
ccf2a600dd72cc3c3c44f5d4126d9bb60fa83894takashi <p>The <code>Content-MD5</code> header provides an end-to-end
ccf2a600dd72cc3c3c44f5d4126d9bb60fa83894takashi message integrity check (MIC) of the entity-body. A proxy or
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl client may check this header for detecting accidental
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl modification of the entity-body in transit. Example header:</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <example>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive values are not cached).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code>Content-MD5</code> is only sent for documents served
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the <module>core</module>, and not by any module. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI documents, output from CGI scripts, and byte range responses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive do not have this header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>DefaultType</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>This directive has no effect other than to emit warnings
003f0c9fda6664daf5092a0e42f65ede20098153sliveif the value is not <code>none</code>. In prior versions, DefaultType
fb77c505254b6e9c925e23e734463e87574f8f40kesswould specify a default media type to assign to response content for
fb77c505254b6e9c925e23e734463e87574f8f40kesswhich no other media type configuration could be found.
fb77c505254b6e9c925e23e734463e87574f8f40kess</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>DefaultType <var>media-type|none</var></syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<default>DefaultType none</default>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<override>FileInfo</override>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<compatibility>The argument <code>none</code> is available in Apache 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</compatibility>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This directive has been disabled. For backwards compatibility
130d299c4b2b15be45532a176604c71fdc7bea5bnd of configuration files, it may be specified with the value
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>none</code>, meaning no default media type. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd DefaultType None
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><code>DefaultType None</code> is only available in
fb77c505254b6e9c925e23e734463e87574f8f40kess httpd-2.2.7 and later.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Use the mime.types configuration file and the
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen <directive module="mod_mime">AddType</directive> to configure media
030108b1816bcda3d925df65357feabdce83bc94slive type assignments via file extensions, or the
030108b1816bcda3d925df65357feabdce83bc94slive <directive module="core">ForceType</directive> directive to configure
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the media type for specific resources. Otherwise, the server will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd send the response without a Content-Type header field and the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd recipient may attempt to guess the media type.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>Define</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Define the existence of a variable</description>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<syntax>Define <var>parameter-name</var></syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context></contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Equivalent to passing the <code>-D</code> argument to <program
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >httpd</program>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive can be used to toggle the use of <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">IfDefine</directive> sections without needing to alter
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>-D</code> arguments in any startup scripts.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis type="section">
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>Directory</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Enclose a group of directives that apply only to the
130d299c4b2b15be45532a176604c71fdc7bea5bndnamed file-system directory and sub-directories</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>&lt;Directory <var>directory-path</var>&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd... &lt;/Directory&gt;</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">Directory</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/Directory&gt;</code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory. Any directive that is allowed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in a directory context may be used. <var>Directory-path</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either the full path to a directory, or a wild-card string using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unix shell-style matching. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess characters. You may also use <code>[]</code> character ranges. None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the wildcards match a `/' character, so <code>&lt;Directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess /*/public_html&gt;</code> will not match
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/home/user/public_html</code>, but <code>&lt;Directory
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess /home/*/public_html&gt;</code> will match. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /usr/local/httpd/htdocs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <note>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Be careful with the <var>directory-path</var> arguments:
130d299c4b2b15be45532a176604c71fdc7bea5bnd They have to literally match the filesystem path which Apache uses
130d299c4b2b15be45532a176604c71fdc7bea5bnd to access the files. Directives applied to a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess links.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </note>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><glossary ref="regex">Regular
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess expressions</glossary> can also be used, with the addition of the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>If multiple (non-regular expression) <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section">Directory</directive> sections
130d299c4b2b15be45532a176604c71fdc7bea5bnd match the directory (or one of its parents) containing a document,
130d299c4b2b15be45532a176604c71fdc7bea5bnd then the directives are applied in the order of shortest match
130d299c4b2b15be45532a176604c71fdc7bea5bnd first, interspersed with the directives from the <a
130d299c4b2b15be45532a176604c71fdc7bea5bnd href="#accessfilename">.htaccess</a> files. For example,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;/Directory&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /home/&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride FileInfo<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>for access to the document <code>/home/web/dir/doc.html</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride None</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess (disabling <code>.htaccess</code> files).</li>
8f4963b2c04155aa4b08343827947a6dd7b14c04covener
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>Apply directive <code>AllowOverride FileInfo</code> (for
7b5535ed88e0f561b3bfb3330137bd804846afd4slive directory <code>/home</code>).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply any <code>FileInfo</code> directives in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/web/dir/.htaccess</code> in that order.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>Regular expressions are not considered until after all of the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener normal sections have been applied. Then all of the regular
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener expressions are tested in the order they appeared in the
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener configuration file. For example, with</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen &lt;Directory ~ abc$&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ... directives here ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </example>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>the regular expression section won't be considered until after
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener all normal <directive type="section">Directory</directive>s and
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <code>.htaccess</code> files have been applied. Then the regular
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener expression will match on <code>/home/abc/public_html/abc</code> and
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener the corresponding <directive type="section">Directory</directive> will
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener be applied.</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p><strong>Note that the default Apache access for
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener This means that Apache will serve any file mapped from an URL. It is
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener recommended that you change this with a block such
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener as</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Deny from All<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </indent>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>want</em> accessible. See the <a
003f0c9fda6664daf5092a0e42f65ede20098153slive href="/misc/security_tips.html">Security Tips</a> page for more
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive details.</strong></p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The directory sections occur in the <code>httpd.conf</code> file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Directory</directive> directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot nest, and cannot appear in a <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> or <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">LimitExcept</directive> section.</p>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/sections.html">How &lt;Directory&gt;,
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
fb77c505254b6e9c925e23e734463e87574f8f40kess explanation of how these different sections are combined when a
fb77c505254b6e9c925e23e734463e87574f8f40kess request is received</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>DirectoryMatch</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enclose directives that apply to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefile-system directories matching a regular expression and their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesubdirectories</description>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess... &lt;/DirectoryMatch&gt;</syntax>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">DirectoryMatch</directive> and
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen of directives which will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory, the same as <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">Directory</directive>. However, it
af18698b10b429b270551ca3a5d51a75e1c9db22brianp takes as an argument a <glossary ref="regex">regular
af18698b10b429b270551ca3a5d51a75e1c9db22brianp expression</glossary>. For example:</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
af18698b10b429b270551ca3a5d51a75e1c9db22brianp </example>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>would match directories in <code>/www/</code> that consisted of three
003f0c9fda6664daf5092a0e42f65ede20098153slive numbers.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp</usage>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<seealso><directive type="section" module="core">Directory</directive> for
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nda description of how regular expressions are mixed in with normal
003f0c9fda6664daf5092a0e42f65ede20098153slive<directive type="section">Directory</directive>s</seealso>
003f0c9fda6664daf5092a0e42f65ede20098153slive<seealso><a
fb77c505254b6e9c925e23e734463e87574f8f40kesshref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;Files&gt; sections work</a> for an explanation of how these different
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndsections are combined when a request is received</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>DocumentRoot</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Directory that forms the main document tree visible
af18698b10b429b270551ca3a5d51a75e1c9db22brianpfrom the web</description>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<syntax>DocumentRoot <var>directory-path</var></syntax>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<default>DocumentRoot /usr/local/apache/htdocs</default>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<contextlist><context>server config</context><context>virtual host</context>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</contextlist>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<usage>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This directive sets the directory from which <program>httpd</program>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd will serve files. Unless matched by a directive like <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_alias">Alias</directive>, the server appends the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd path from the requested URL to the document root to make the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd path to the document. Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd DocumentRoot /usr/web
41ef8b3051855b802104193ee0a587515af60a37wrowe </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>then an access to
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>http://www.my.host.com/index.html</code> refers to
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
41ef8b3051855b802104193ee0a587515af60a37wrowe not absolute then it is assumed to be relative to the <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="core">ServerRoot</directive>.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <directive>DocumentRoot</directive> should be specified without
41ef8b3051855b802104193ee0a587515af60a37wrowe a trailing slash.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe</usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
41ef8b3051855b802104193ee0a587515af60a37wroweLocations</a></seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<directivesynopsis>
41ef8b3051855b802104193ee0a587515af60a37wrowe<name>EnableMMAP</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Use memory-mapping to read files during delivery</description>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<syntax>EnableMMAP On|Off</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>EnableMMAP On</default>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe<context>directory</context><context>.htaccess</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe</contextlist>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<override>FileInfo</override>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This directive controls whether the <program>httpd</program> may use
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd memory-mapping if it needs to read the contents of a file during
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd delivery. By default, when the handling of a request requires
41ef8b3051855b802104193ee0a587515af60a37wrowe access to the data within a file -- for example, when delivering a
41ef8b3051855b802104193ee0a587515af60a37wrowe server-parsed file using <module>mod_include</module> -- Apache
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen memory-maps the file if the OS supports it.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This memory-mapping sometimes yields a performance improvement.
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick But in some environments, it is better to disable the memory-mapping
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to prevent operational problems:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
41ef8b3051855b802104193ee0a587515af60a37wrowe <ul>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>On some multiprocessor systems, memory-mapping can reduce the
41ef8b3051855b802104193ee0a587515af60a37wrowe performance of the <program>httpd</program>.</li>
41ef8b3051855b802104193ee0a587515af60a37wrowe <li>Deleting or truncating a file while <program>httpd</program>
41ef8b3051855b802104193ee0a587515af60a37wrowe has it memory-mapped can cause <program>httpd</program> to
9fb925624300c864fe3969a264e52aa83f3c2dd0slive crash with a segmentation fault.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </li>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley </ul>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm <p>For server configurations that are vulnerable to these problems,
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm you should disable memory-mapping of delivered files by specifying:</p>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess EnableMMAP Off
9fb925624300c864fe3969a264e52aa83f3c2dd0slive </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>For NFS mounted files, this feature may be disabled explicitly for
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf the offending files by specifying:</p>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
41ef8b3051855b802104193ee0a587515af60a37wrowe <example>
41ef8b3051855b802104193ee0a587515af60a37wrowe &lt;Directory "/path-to-nfs-files"&gt;
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <indent>
41ef8b3051855b802104193ee0a587515af60a37wrowe EnableMMAP Off
41ef8b3051855b802104193ee0a587515af60a37wrowe </indent>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf &lt;/Directory&gt;
9fb925624300c864fe3969a264e52aa83f3c2dd0slive </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe</usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>EnableSendfile</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Use the kernel sendfile support to deliver files to the client</description>
41ef8b3051855b802104193ee0a587515af60a37wrowe<syntax>EnableSendfile On|Off</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>EnableSendfile On</default>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<contextlist><context>server config</context><context>virtual host</context>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<context>directory</context><context>.htaccess</context>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars</contextlist>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<override>FileInfo</override>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars<compatibility>Available in version 2.0.44 and later</compatibility>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<usage>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>This directive controls whether <program>httpd</program> may use the
af18698b10b429b270551ca3a5d51a75e1c9db22brianp sendfile support from the kernel to transmit file contents to the client.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive By default, when the handling of a request requires no access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the data within a file -- for example, when delivering a
003f0c9fda6664daf5092a0e42f65ede20098153slive static file -- Apache uses sendfile to deliver the file contents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive without ever reading the file if the OS supports it.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This sendfile mechanism avoids separate read and send operations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and buffer allocations. But on some platforms or within some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystems, it is better to disable this feature to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive operational problems:</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Some platforms may have broken sendfile support that the build
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive system did not detect, especially if the binaries were built on
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen another box and moved to such a machine with broken sendfile
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux the use of sendfile triggers TCP-checksum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offloading bugs on certain networking cards when using IPv6.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux on Itanium, sendfile may be unable to handle files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive over 2GB in size.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With a network-mounted <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">DocumentRoot</directive> (e.g., NFS or SMB),
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the kernel may be unable to serve the network file through
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own cache.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS or SMB mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <example>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive &lt;Directory "/path-to-nfs-files"&gt;
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Please note that the per-directory and .htaccess configuration
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of <directive>EnableSendfile</directive> is not supported by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <module>mod_disk_cache</module>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Only global definition of <directive>EnableSendfile</directive>
f7fe99050600166042c04b8e595fb75499eed7f0geoff is taken into account by the module.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </p>
f7fe99050600166042c04b8e595fb75499eed7f0geoff</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</directivesynopsis>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff<directivesynopsis>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<name>ErrorDocument</name>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<description>What the server will return to the client
f7fe99050600166042c04b8e595fb75499eed7f0geoffin case of an error</description>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<contextlist><context>server config</context><context>virtual host</context>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<context>directory</context><context>.htaccess</context>
f7fe99050600166042c04b8e595fb75499eed7f0geoff</contextlist>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<override>FileInfo</override>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<compatibility>Quoting syntax for text messages is different in Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the event of a problem or error, Apache can be configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to do one of four things,</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ol>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>output a simple hardcoded error message</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>output a customized message</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to a local <var>URL-path</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem/error</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to an external <var>URL</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem/error</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess </ol>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The first option is the default, while options 2-4 are
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive configured using the <directive>ErrorDocument</directive>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive directive, which is followed by the HTTP response code and a URL
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive or a message. Apache will sometimes offer additional information
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick regarding the problem/error.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>URLs can begin with a slash (/) for local web-paths (relative
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive to the <directive module="core">DocumentRoot</directive>), or be a
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive full URL which the client can resolve. Alternatively, a message
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive can be provided to be displayed by the browser. Examples:</p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <example>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive ErrorDocument 401 /subscription_info.html<br />
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen ErrorDocument 403 "Sorry can't allow you access today"
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen </example>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <p>Additionally, the special value <code>default</code> can be used
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen to specify Apache's simple hardcoded message. While not required
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive under normal circumstances, <code>default</code> will restore
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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 />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 404 default<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that when you specify an <directive>ErrorDocument</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that points to a remote URL (ie. anything with a method such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http</code> in front of it), Apache will send a redirect to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client to tell it where to find the document, even if the
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess document ends up being on the same server. This has several
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess implications, the most important being that the client will not
fb109b84906e3ee61680aa289953c2f9e859354erbowen receive the original error status code, but instead will
fb109b84906e3ee61680aa289953c2f9e859354erbowen receive a redirect status code. This in turn can confuse web
fb109b84906e3ee61680aa289953c2f9e859354erbowen robots and other clients which try to determine if a URL is
fb109b84906e3ee61680aa289953c2f9e859354erbowen valid using the status code. In addition, if you use a remote
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess URL in an <code>ErrorDocument 401</code>, the client will not
fb109b84906e3ee61680aa289953c2f9e859354erbowen know to prompt the user for a password since it will not
960188481b7025ac8ef7221b67af83dd27e46cd0rjung receive the 401 status code. Therefore, <strong>if you use an
960188481b7025ac8ef7221b67af83dd27e46cd0rjung <code>ErrorDocument 401</code> directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</strong></p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>Microsoft Internet Explorer (MSIE) will by default ignore
fb109b84906e3ee61680aa289953c2f9e859354erbowen server-generated error messages when they are "too small" and substitute
fb109b84906e3ee61680aa289953c2f9e859354erbowen its own "friendly" error messages. The size threshold varies depending on
960188481b7025ac8ef7221b67af83dd27e46cd0rjung the type of error, but in general, if you make your error document
960188481b7025ac8ef7221b67af83dd27e46cd0rjung greater than 512 bytes, then MSIE will show the server-generated
960188481b7025ac8ef7221b67af83dd27e46cd0rjung error rather than masking it. More information is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Microsoft Knowledge Base article <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Q294807</a>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Although most error messages can be overriden, there are certain
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive circumstances where the internal messages are used regardless of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting of <directive module="core">ErrorDocument</directive>. In
fb109b84906e3ee61680aa289953c2f9e859354erbowen particular, if a malformed request is detected, normal request processing
fb109b84906e3ee61680aa289953c2f9e859354erbowen will be immediately halted and the internal error message returned.
fb109b84906e3ee61680aa289953c2f9e859354erbowen This is necessary to guard against security problems caused by
fb109b84906e3ee61680aa289953c2f9e859354erbowen bad requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/custom-error.html">documentation of
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick customizable responses</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<directivesynopsis>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<name>ErrorLog</name>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<description>Location where the server will log errors</description>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ErrorLog</directive> directive sets the name of
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the file to which the server will log any errors it encounters. If
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the <var>file-path</var> is not absolute then it is assumed to be
e302f38fd646764ce1a1e1c578d794aef514a9e5sf relative to the <directive module="core">ServerRoot</directive>.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example><title>Example</title>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ErrorLog /var/log/httpd/error_log
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>If the <var>file-path</var>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf begins with a pipe (|) then it is assumed to be a command to spawn
e302f38fd646764ce1a1e1c578d794aef514a9e5sf to handle the error log.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example><title>Example</title>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ErrorLog "|/usr/local/bin/httpd_errors"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Using <code>syslog</code> instead of a filename enables logging
e302f38fd646764ce1a1e1c578d794aef514a9e5sf via syslogd(8) if the system supports it. The default is to use
e302f38fd646764ce1a1e1c578d794aef514a9e5sf syslog facility <code>local7</code>, but you can override this by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf using the <code>syslog:<var>facility</var></code> syntax where
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <var>facility</var> can be one of the names usually documented in
e302f38fd646764ce1a1e1c578d794aef514a9e5sf syslog(1).</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example><title>Example</title>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ErrorLog syslog:user
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>SECURITY: See the <a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf href="/misc/security_tips.html#serverroot">security tips</a>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf document for details on why your security could be compromised
e302f38fd646764ce1a1e1c578d794aef514a9e5sf if the directory where log files are stored is writable by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf anyone other than the user that starts the server.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <note type="warning"><title>Note</title>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>When entering a file path on non-Unix platforms, care should be taken
e302f38fd646764ce1a1e1c578d794aef514a9e5sf to make sure that only forward slashed are used even though the platform
e302f38fd646764ce1a1e1c578d794aef514a9e5sf may allow the use of back slashes. In general it is a good idea to always
e302f38fd646764ce1a1e1c578d794aef514a9e5sf use forward slashes throughout the configuration files.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </note>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<seealso><directive module="core">LogLevel</directive></seealso>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<seealso><a href="/logs.html">Apache Log Files</a></seealso>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<directivesynopsis>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<name>FileETag</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>File attributes used to create the ETag
e302f38fd646764ce1a1e1c578d794aef514a9e5sfHTTP response header</description>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<syntax>FileETag <var>component</var> ...</syntax>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<default>FileETag INode MTime Size</default>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<contextlist><context>server config</context><context>virtual host</context>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<context>directory</context><context>.htaccess</context>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<override>FileInfo</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf The <directive>FileETag</directive> directive configures the file
e302f38fd646764ce1a1e1c578d794aef514a9e5sf attributes that are used to create the <code>ETag</code> (entity
e302f38fd646764ce1a1e1c578d794aef514a9e5sf tag) response header field when the document is based on a file.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf (The <code>ETag</code> value is used in cache management to save
e302f38fd646764ce1a1e1c578d794aef514a9e5sf network bandwidth.) In Apache 1.3.22 and earlier, the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>ETag</code> value was <em>always</em> formed
e302f38fd646764ce1a1e1c578d794aef514a9e5sf from the file's inode, size, and last-modified time (mtime). The
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive>FileETag</directive> directive allows you to choose
e302f38fd646764ce1a1e1c578d794aef514a9e5sf which of these -- if any -- should be used. The recognized keywords are:
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dl>
4497075b5e08b0c8ee89425a1758258ae80550fcsf <dt><strong>INode</strong></dt>
4497075b5e08b0c8ee89425a1758258ae80550fcsf <dd>The file's i-node number will be included in the calculation</dd>
4497075b5e08b0c8ee89425a1758258ae80550fcsf <dt><strong>MTime</strong></dt>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dd>The date and time the file was last modified will be included</dd>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dt><strong>Size</strong></dt>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dd>The number of bytes in the file will be included</dd>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dt><strong>All</strong></dt>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dd>All available fields will be used. This is equivalent to:
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>FileETag INode MTime Size</example></dd>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dt><strong>None</strong></dt>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <dd>If a document is file-based, no <code>ETag</code> field will be
e302f38fd646764ce1a1e1c578d794aef514a9e5sf included in the response</dd>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </dl>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf keywords may be prefixed with either <code>+</code> or <code>-</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf which allow changes to be made to the default setting inherited
e302f38fd646764ce1a1e1c578d794aef514a9e5sf from a broader scope. Any keyword appearing without such a prefix
e302f38fd646764ce1a1e1c578d794aef514a9e5sf immediately and completely cancels the inherited setting.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>If a directory's configuration includes
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf subdirectory's includes <code>FileETag&nbsp;-INode</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the setting for that subdirectory (which will be inherited by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf any sub-subdirectories that don't override it) will be equivalent to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <note type="warning"><title>Warning</title>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Do not change the default for directories or locations that have WebDAV
e302f38fd646764ce1a1e1c578d794aef514a9e5sf enabled and use <module>mod_dav_fs</module> as a storage provider.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <module>mod_dav_fs</module> uses <code>INode&nbsp;MTime&nbsp;Size</code>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf as a fixed format for <code>ETag</code> comparisons on conditional requests.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf These conditional requests will break if the <code>ETag</code> format is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf changed via <directive>FileETag</directive>.
4497075b5e08b0c8ee89425a1758258ae80550fcsf </note>
4497075b5e08b0c8ee89425a1758258ae80550fcsf</usage>
4497075b5e08b0c8ee89425a1758258ae80550fcsf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis type="section">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>Files</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Contains directives that apply to matched
e302f38fd646764ce1a1e1c578d794aef514a9e5sffilenames</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<context>directory</context><context>.htaccess</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<override>All</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <directive type="section">Files</directive> directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf limits the scope of the enclosed directives by filename. It is comparable
e302f38fd646764ce1a1e1c578d794aef514a9e5sf to the <directive module="core" type="section">Directory</directive>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and <directive module="core" type="section">Location</directive>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf directives. It should be matched with a <code>&lt;/Files&gt;</code>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf directive. The directives given within this section will be applied to
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf any object with a basename (last component of filename) matching the
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf specified filename. <directive type="section">Files</directive>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf sections are processed in the order they appear in the
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf configuration file, after the <directive module="core"
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf type="section">Directory</directive> sections and
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <code>.htaccess</code> files are read, but before <directive
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf type="section" module="core">Location</directive> sections. Note
e302f38fd646764ce1a1e1c578d794aef514a9e5sf that <directive type="section">Files</directive> can be nested
e302f38fd646764ce1a1e1c578d794aef514a9e5sf inside <directive type="section"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core">Directory</directive> sections to restrict the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf portion of the filesystem they apply to.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <var>filename</var> argument should include a filename, or
e302f38fd646764ce1a1e1c578d794aef514a9e5sf a wild-card string, where <code>?</code> matches any single character,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and <code>*</code> matches any sequences of characters.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <glossary ref="regex">Regular expressions</glossary>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf can also be used, with the addition of the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>~</code> character. For example:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
ce4dc40a4e87991087488f70d96d3447d7557294sf <example>
ce4dc40a4e87991087488f70d96d3447d7557294sf &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <p>would match most common Internet graphics formats. <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core" type="section">FilesMatch</directive> is preferred,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf however.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Note that unlike <directive type="section"
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf module="core">Directory</directive> and <directive type="section"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core">Location</directive> sections, <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf type="section">Files</directive> sections can be used inside
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>.htaccess</code> files. This allows users to control access to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf their own files, at a file-by-file level.</p>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and &lt;Files&gt; sections work</a> for an explanation of how these
e302f38fd646764ce1a1e1c578d794aef514a9e5sf different sections are combined when a request is received</seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis type="section">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>FilesMatch</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Contains directives that apply to regular-expression matched
e302f38fd646764ce1a1e1c578d794aef514a9e5sffilenames</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<context>directory</context><context>.htaccess</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<override>All</override>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The <directive type="section">FilesMatch</directive> directive
a8ee031b2224ce5473826c9d4f603681589245fawrowe limits the scope of the enclosed directives by filename, just as the
a8ee031b2224ce5473826c9d4f603681589245fawrowe <directive module="core" type="section">Files</directive> directive
a8ee031b2224ce5473826c9d4f603681589245fawrowe does. However, it accepts a <glossary ref="regex">regular
a8ee031b2224ce5473826c9d4f603681589245fawrowe expression</glossary>. For example:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
a8ee031b2224ce5473826c9d4f603681589245fawrowe </example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>would match most common Internet graphics formats.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
a8ee031b2224ce5473826c9d4f603681589245fawrowe and &lt;Files&gt; sections work</a> for an explanation of how these
a8ee031b2224ce5473826c9d4f603681589245fawrowe different sections are combined when a request is received</seealso>
34b157732214cedcd129cd9fe7c4290757505d60minfrin</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<name>ForceType</name>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<description>Forces all matching files to be served with the specified
a8ee031b2224ce5473826c9d4f603681589245fawrowemedia type in the HTTP Content-Type header field</description>
02c86afa991026c4146423dc84bc126e57d28df6wrowe<syntax>ForceType <var>media-type</var>|None</syntax>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<contextlist><context>directory</context><context>.htaccess</context>
34b157732214cedcd129cd9fe7c4290757505d60minfrin</contextlist>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<override>FileInfo</override>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<compatibility>Moved to the core in Apache 2.0</compatibility>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>, or
003f0c9fda6664daf5092a0e42f65ede20098153slive <directive type="section" module="core">Location</directive> or
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener <directive type="section" module="core">Files</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd section, this directive forces all matching files to be served
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele with the content type identification given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>media-type</var>. For example, if you had a directory full of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive GIF files, but did not want to label them all with <code>.gif</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might want to use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType image/gif
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that this directive overrides other indirect media type
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener associations defined in mime.types or via the
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="mod_mime">AddType</directive>.</p>
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>You can also override more general
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive>ForceType</directive> settings
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by using the value of <code>None</code>:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
530eba85dbd41b8a0fa5255d3648d1440199a661slive <example>
530eba85dbd41b8a0fa5255d3648d1440199a661slive # force all files to be image/gif:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /images&gt;<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType image/gif<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive <br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # but normal mime-type associations here:<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Location /images/mixed&gt;<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess ForceType None<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>HostnameLookups</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enables DNS lookups on client IP addresses</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>HostnameLookups On|Off|Double</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>HostnameLookups Off</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <p>This directive enables DNS lookups so that host names can be
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem The value <code>Double</code> refers to doing double-reverse
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem DNS lookup. That is, after a reverse lookup is performed, a forward
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem lookup is then performed on that result. At least one of the IP
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem addresses in the forward lookup must match the original
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem address. (In "tcpwrappers" terminology this is called
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <code>PARANOID</code>.)</p>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener <p>Regardless of the setting, when <module>mod_authz_host</module> is
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener used for controlling access by hostname, a double reverse lookup
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener will be performed. This is necessary for security. Note that the
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener result of this double-reverse isn't generally available unless you
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener set <code>HostnameLookups Double</code>. For example, if only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>HostnameLookups On</code> and a request is made to an object
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that is protected by hostname restrictions, regardless of whether
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the double-reverse fails or not, CGIs will still be passed the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive single-reverse result in <code>REMOTE_HOST</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The default is <code>Off</code> in order to save the network
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive traffic for those sites that don't truly need the reverse
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd lookups done. It is also better for the end users because they
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive don't have to suffer the extra latency that a lookup entails.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Heavily loaded sites should leave this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Off</code>, since DNS lookups can take considerable
003f0c9fda6664daf5092a0e42f65ede20098153slive amounts of time. The utility <program>logresolve</program>, compiled by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default to the <code>bin</code> subdirectory of your installation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory, can be used to look up host names from logged IP addresses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offline.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<directivesynopsis type="section">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<name>If</name>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<description>Contains directives that apply only if a condition is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesatisfied by a request at runtime</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;If <var>expression</var>&gt; ... &lt;/If&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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">If</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive evaluates an expression at runtime, and applies the enclosed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives if and only if the expression evaluates to true.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
030108b1816bcda3d925df65357feabdce83bc94slive <example>
030108b1816bcda3d925df65357feabdce83bc94slive &lt;If "$req{Host} = ''"&gt;
030108b1816bcda3d925df65357feabdce83bc94slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>You may compare the value of any variable in the request headers
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ($req), response headers ($resp) or environment ($env) in your
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expression.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">If</directive> has the same precedence
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and usage as <directive type="section">Files</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>IfDefine</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that will be processed only
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessif a test is true at startup</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/IfDefine&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>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </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>
003f0c9fda6664daf5092a0e42f65ede20098153slive 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"
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess >IfDefine</directive> section directive can be one of two forms:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
030108b1816bcda3d925df65357feabdce83bc94slive <ul>
030108b1816bcda3d925df65357feabdce83bc94slive <li><var>parameter-name</var></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>!</code><var>parameter-name</var></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the former case, the directives between the start and end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive markers are only processed if the parameter named
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is defined. The second format reverses
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the test, and only processes the directives if
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <var>parameter-name</var> is <strong>not</strong> defined.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <var>parameter-name</var> argument is a define as given on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <program>httpd</program> command line via <code>-D<var>parameter</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> at the time the server was started or by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Define</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfDefine</directive> sections are
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding nest-able, which can be used to implement simple
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding multiple-parameter tests. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
003f0c9fda6664daf5092a0e42f65ede20098153slive httpd -DReverseProxy -DUseCache -DMemCache ...<br />
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # httpd.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine ReverseProxy&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/mod_proxy.so<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess LoadModule proxy_http_module modules/mod_proxy_http.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine UseCache&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule cache_module modules/mod_cache.so<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;IfDefine MemCache&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <indent>
fb77c505254b6e9c925e23e734463e87574f8f40kess LoadModule mem_cache_module modules/mod_mem_cache.so<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfDefine&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;IfDefine !MemCache&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule disk_cache_module modules/mod_disk_cache.so<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;/IfDefine&gt;
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </indent>
7654193c1faf603feec999850322ad79e6c551bcnd &lt;/IfDefine&gt;
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;/IfDefine&gt;
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd </example>
7654193c1faf603feec999850322ad79e6c551bcnd</usage>
7654193c1faf603feec999850322ad79e6c551bcnd</directivesynopsis>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd<directivesynopsis type="section">
7654193c1faf603feec999850322ad79e6c551bcnd<name>IfModule</name>
7654193c1faf603feec999850322ad79e6c551bcnd<description>Encloses directives that are processed conditional on the
7654193c1faf603feec999850322ad79e6c551bcndpresence or absence of a specific module</description>
7654193c1faf603feec999850322ad79e6c551bcnd<syntax>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
7654193c1faf603feec999850322ad79e6c551bcnd &lt;/IfModule&gt;</syntax>
7654193c1faf603feec999850322ad79e6c551bcnd<contextlist><context>server config</context><context>virtual host</context>
7654193c1faf603feec999850322ad79e6c551bcnd<context>directory</context><context>.htaccess</context>
7654193c1faf603feec999850322ad79e6c551bcnd</contextlist>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<override>All</override>
7654193c1faf603feec999850322ad79e6c551bcnd<compatibility>Module identifiers are available in version 2.1 and
7654193c1faf603feec999850322ad79e6c551bcndlater.</compatibility>
7654193c1faf603feec999850322ad79e6c551bcnd
439acee10571861c670c438038a62f90a08bf137covener<usage>
439acee10571861c670c438038a62f90a08bf137covener <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
439acee10571861c670c438038a62f90a08bf137covener section is used to mark directives that are conditional on the presence of
439acee10571861c670c438038a62f90a08bf137covener a specific module. The directives within an <directive type="section"
439acee10571861c670c438038a62f90a08bf137covener >IfModule</directive> section are only processed if the <var>test</var>
439acee10571861c670c438038a62f90a08bf137covener is true. If <var>test</var> is false, everything between the start and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive end markers is ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>The <var>test</var> in the <directive type="section"
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener >IfModule</directive> section directive can be one of two forms:</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <ul>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <li><var>module</var></li>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <li>!<var>module</var></li>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener </ul>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>In the former case, the directives between the start and end
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener markers are only processed if the module named <var>module</var>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener is included in Apache -- either compiled in or
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener dynamically loaded using <directive module="mod_so"
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener >LoadModule</directive>. The second format reverses the test,
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener and only processes the directives if <var>module</var> is
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <strong>not</strong> included.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>The <var>module</var> argument can be either the module identifier or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the file name of the module, at the time it was compiled. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>STANDARD20_MODULE_STUFF</code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfModule</directive> sections are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nest-able, which can be used to implement simple multiple-module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
fb77c505254b6e9c925e23e734463e87574f8f40kess is available. In normal operation, directives need not be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess placed in <directive type="section">IfModule</directive>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick sections.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<name>Include</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe server configuration files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Include <var>file-path</var>|<var>directory-path</var></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Wildcard matching available in 2.0.41 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive allows inclusion of other configuration files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from within the server configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive include several files at once, in alphabetical order. In
fb77c505254b6e9c925e23e734463e87574f8f40kess addition, if <directive>Include</directive> points to a directory,
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd rather than a file, Apache will read all files in that directory
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd and any subdirectory. However, including entire directories is not
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd recommended, because it is easy to accidentally leave temporary
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd files in a directory that can cause <program>httpd</program> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive fail. Instead, we encourage you to use the wildcard syntax shown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive below, to include files that match a particular pattern, such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive *.conf, for example.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>The file path specified may be an absolute path, or may be relative
750d12c59545dbbac70390988de94f7e901b08f2niq to the <directive module="core">ServerRoot</directive> directory.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Examples:</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <example>
750d12c59545dbbac70390988de94f7e901b08f2niq Include /usr/local/apache2/conf/ssl.conf<br />
750d12c59545dbbac70390988de94f7e901b08f2niq Include /usr/local/apache2/conf/vhosts/*.conf
750d12c59545dbbac70390988de94f7e901b08f2niq </example>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Or, providing paths relative to your <directive
750d12c59545dbbac70390988de94f7e901b08f2niq module="core">ServerRoot</directive> directory:</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <example>
750d12c59545dbbac70390988de94f7e901b08f2niq Include conf/ssl.conf<br />
750d12c59545dbbac70390988de94f7e901b08f2niq Include conf/vhosts/*.conf
750d12c59545dbbac70390988de94f7e901b08f2niq </example>
750d12c59545dbbac70390988de94f7e901b08f2niq</usage>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<seealso><program>apachectl</program></seealso>
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen</directivesynopsis>
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen<directivesynopsis>
13fa73dcc1b52bc8b86ac7008ce81e8c94c1c7f2rbowen<name>KeepAlive</name>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<description>Enables HTTP persistent connections</description>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<syntax>KeepAlive On|Off</syntax>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<default>KeepAlive On</default>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<contextlist><context>server config</context><context>virtual host</context>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic</contextlist>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<usage>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic <p>The Keep-Alive extension to HTTP/1.0 and the persistent
750d12c59545dbbac70390988de94f7e901b08f2niq connection feature of HTTP/1.1 provide long-lived HTTP sessions
750d12c59545dbbac70390988de94f7e901b08f2niq which allow multiple requests to be sent over the same TCP
750d12c59545dbbac70390988de94f7e901b08f2niq connection. In some cases this has been shown to result in an
750d12c59545dbbac70390988de94f7e901b08f2niq almost 50% speedup in latency times for HTML documents with
750d12c59545dbbac70390988de94f7e901b08f2niq many images. To enable Keep-Alive connections, set
750d12c59545dbbac70390988de94f7e901b08f2niq <code>KeepAlive On</code>.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>For HTTP/1.0 clients, Keep-Alive connections will only be
750d12c59545dbbac70390988de94f7e901b08f2niq used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI pages, and server-generated directory listings will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd generally not use Keep-Alive connections to HTTP/1.0 clients.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For HTTP/1.1 clients, persistent connections are the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unless otherwise specified. If the client requests it, chunked
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encoding will be used in order to send content of unknown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive length over persistent connections.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the <directive module="mpm_common"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd >MaxRequestsPerChild</directive> directive, regardless
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of how many requests are sent using the connection.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>KeepAliveTimeout</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Amount of time the server will wait for subsequent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequests on a persistent connection</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>KeepAliveTimeout <var>num</var>[ms]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>KeepAliveTimeout 5</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Specifying a value in milliseconds is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveApache 2.3.2 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The number of seconds Apache will wait for a subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request before closing the connection. By adding a postfix of ms the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive timeout can be also set in milliseconds. Once a request has been
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl received, the timeout value specified by the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <directive module="core">Timeout</directive> directive applies.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>Setting <directive>KeepAliveTimeout</directive> to a high value
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may cause performance problems in heavily loaded servers. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive higher the timeout, the more server processes will be kept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive occupied waiting on connections with idle clients.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In a name-based virtual host context, the value of the first
130d299c4b2b15be45532a176604c71fdc7bea5bnd defined virtual host (the default host) in a set of <directive
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi module="core">NameVirtualHost</directive> will be used.
130d299c4b2b15be45532a176604c71fdc7bea5bnd The other values will be ignored.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi<directivesynopsis type="section">
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi<name>Limit</name>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<description>Restrict enclosed access controls to only certain HTTP
955d7fc3e7adb6463b7243e15c04e858718e799etakashimethods</description>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
955d7fc3e7adb6463b7243e15c04e858718e799etakashi &lt;/Limit&gt;</syntax>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<contextlist><context>directory</context><context>.htaccess</context>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi</contextlist>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<override>AuthConfig, Limit</override>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<usage>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>Access controls are normally effective for
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <strong>all</strong> access methods, and this is the usual
955d7fc3e7adb6463b7243e15c04e858718e799etakashi desired behavior. <strong>In the general case, access control
955d7fc3e7adb6463b7243e15c04e858718e799etakashi directives should not be placed within a
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <directive type="section">Limit</directive> section.</strong></p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The purpose of the <directive type="section">Limit</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive is to restrict the effect of the access controls to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd nominated HTTP methods. For all other methods, the access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrictions that are enclosed in the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> bracket <strong>will have no
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive effect</strong>. The following example applies the access control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only to the methods <code>POST</code>, <code>PUT</code>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>DELETE</code>, leaving all other methods unprotected:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki <example>
55d36f9b61520c2374ab463e77e8a62daa416398nd &lt;Limit POST PUT DELETE&gt;<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Limit&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>The method names listed can be one or more of: <code>GET</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>CONNECT</code>, <code>OPTIONS</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd case-sensitive.</strong> If <code>GET</code> is used it will also
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd cannot be limited (see <directive module="core"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd >TraceEnable</directive>).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning">A <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">LimitExcept</directive> section should always be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used in preference to a <directive type="section">Limit</directive>
55d36f9b61520c2374ab463e77e8a62daa416398nd section when restricting access, since a <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">LimitExcept</directive> section provides protection
55d36f9b61520c2374ab463e77e8a62daa416398nd against arbitrary methods.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Limit</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">LimitExcept</directive>
55d36f9b61520c2374ab463e77e8a62daa416398nd directives may be nested. In this case, each successive level of
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <directive type="section">Limit</directive> or <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">LimitExcept</directive> directives must
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd further restrict the set of methods to which access controls apply.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning">When using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Limit</directive> or
55d36f9b61520c2374ab463e77e8a62daa416398nd <directive type="section">LimitExcept</directive> directives with
55d36f9b61520c2374ab463e77e8a62daa416398nd the <directive module="mod_authz_core">Require</directive> directive,
55d36f9b61520c2374ab463e77e8a62daa416398nd note that the first <directive module="mod_authz_core">Require</directive>
55d36f9b61520c2374ab463e77e8a62daa416398nd to succeed authorizes the request, regardless of the presence of other
55d36f9b61520c2374ab463e77e8a62daa416398nd <directive module="mod_authz_core">Require</directive> directives.</note>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, given the following configuration, all users will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be authorized for <code>POST</code> requests, and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Require group editors</code> directive will be ignored
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in all cases:</p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <example>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive &lt;LimitExcept GET&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess <indent>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive Require valid-user
bea526116133aa3d7dabd1924bfc580b37fbf22aslive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/LimitExcept&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Limit POST&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require group editors
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Limit&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
3621f3acee323a877639a96d84891095eb07933aminfrin</usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis type="section">
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<name>LimitExcept</name>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<description>Restrict access controls to all HTTP methods
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveexcept the named ones</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/LimitExcept&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
5b258a8d58679c6587757189339bb3c2d0488f93poirier<override>AuthConfig, Limit</override>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<usage>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p><directive type="section">LimitExcept</directive> and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>&lt;/LimitExcept&gt;</code> are used to enclose
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin a group of access control directives which will then apply to any
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin HTTP access method <strong>not</strong> listed in the arguments;
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin i.e., it is the opposite of a <directive type="section"
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin module="core">Limit</directive> section and can be used to control
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin both standard and nonstandard/unrecognized methods. See the
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin documentation for <directive module="core"
3621f3acee323a877639a96d84891095eb07933aminfrin type="section">Limit</directive> for more details.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <p>For example:</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <example>
3621f3acee323a877639a96d84891095eb07933aminfrin &lt;LimitExcept POST GET&gt;<br />
3621f3acee323a877639a96d84891095eb07933aminfrin <indent>
3621f3acee323a877639a96d84891095eb07933aminfrin Require valid-user<br />
3621f3acee323a877639a96d84891095eb07933aminfrin </indent>
3621f3acee323a877639a96d84891095eb07933aminfrin &lt;/LimitExcept&gt;
3621f3acee323a877639a96d84891095eb07933aminfrin </example>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin</usage>
3621f3acee323a877639a96d84891095eb07933aminfrin</directivesynopsis>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin<directivesynopsis>
3621f3acee323a877639a96d84891095eb07933aminfrin<name>LimitInternalRecursion</name>
3621f3acee323a877639a96d84891095eb07933aminfrin<description>Determine maximum number of internal redirects and nested
cf8a8738330694e60bad421fcc8361d80b0e9124minfrinsubrequests</description>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
3621f3acee323a877639a96d84891095eb07933aminfrin<default>LimitInternalRecursion 10</default>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<contextlist><context>server config</context><context>virtual host</context>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess</contextlist>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<compatibility>Available in Apache 2.0.47 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An internal redirect happens, for example, when using the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_actions">Action</directive> directive, which internally
7b5535ed88e0f561b3bfb3330137bd804846afd4slive redirects the original request to a CGI script. A subrequest is Apache's
7b5535ed88e0f561b3bfb3330137bd804846afd4slive mechanism to find out what would happen for some URI if it were requested.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd For example, <module>mod_dir</module> uses subrequests to look for the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd files listed in the <directive module="mod_dir">DirectoryIndex</directive>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive directive.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><directive>LimitInternalRecursion</directive> prevents the server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from crashing when entering an infinite loop of internal redirects or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd subrequests. Such loops are usually caused by misconfigurations.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The directive stores two different limits, which are evaluated on
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin per-request basis. The first <var>number</var> is the maximum number of
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin internal redirects, that may follow each other. The second <var>number</var>
3621f3acee323a877639a96d84891095eb07933aminfrin determines, how deep subrequests may be nested. If you specify only one
3621f3acee323a877639a96d84891095eb07933aminfrin <var>number</var>, it will be assigned to both limits.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <example><title>Example</title>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin LimitInternalRecursion 5
3621f3acee323a877639a96d84891095eb07933aminfrin </example>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin</usage>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin</directivesynopsis>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
3621f3acee323a877639a96d84891095eb07933aminfrin<directivesynopsis>
3621f3acee323a877639a96d84891095eb07933aminfrin<name>LimitRequestBody</name>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<description>Restricts the total size of the HTTP request body sent
3621f3acee323a877639a96d84891095eb07933aminfrinfrom the client</description>
3621f3acee323a877639a96d84891095eb07933aminfrin<syntax>LimitRequestBody <var>bytes</var></syntax>
3621f3acee323a877639a96d84891095eb07933aminfrin<default>LimitRequestBody 0</default>
3621f3acee323a877639a96d84891095eb07933aminfrin<contextlist><context>server config</context><context>virtual host</context>
3621f3acee323a877639a96d84891095eb07933aminfrin<context>directory</context><context>.htaccess</context>
3621f3acee323a877639a96d84891095eb07933aminfrin</contextlist>
03aa31ad82759363ba1a55589e517b16308ef635minfrin<override>All</override>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin<usage>
3621f3acee323a877639a96d84891095eb07933aminfrin <p>This directive specifies the number of <var>bytes</var> from 0
03aa31ad82759363ba1a55589e517b16308ef635minfrin (meaning unlimited) to 2147483647 (2GB) that are allowed in a
03aa31ad82759363ba1a55589e517b16308ef635minfrin request body.</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
03aa31ad82759363ba1a55589e517b16308ef635minfrin <p>The <directive>LimitRequestBody</directive> directive allows
03aa31ad82759363ba1a55589e517b16308ef635minfrin the user to set a limit on the allowed size of an HTTP request
03aa31ad82759363ba1a55589e517b16308ef635minfrin message body within the context in which the directive is given
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
003f0c9fda6664daf5092a0e42f65ede20098153slive response instead of servicing the request. The size of a normal
fb77c505254b6e9c925e23e734463e87574f8f40kess request message body will vary greatly depending on the nature of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource and the methods allowed on that resource. CGI scripts
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele typically use the message body for retrieving form information.
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele Implementations of the <code>PUT</code> method will require
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a value at least as large as any representation that the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wishes to accept for that resource.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attacks.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If, for example, you are permitting file upload to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestFields</name>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid<description>Limits the number of HTTP request header fields that
891df99fdfa41fc8a486568f4d31ddf4a571258adreidwill be accepted from the client</description>
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi<syntax>LimitRequestFields <var>number</var></syntax>
be192cefa381d5bae6868034687471754cb43175sf<default>LimitRequestFields 100</default>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>Number</var> is an integer from 0 (meaning unlimited) to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick distributed).</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>The <directive>LimitRequestFields</directive> directive allows
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick the server administrator to modify the limit on the number of
9f38f3ec3e8087985d108a24ae796962fef83644takashi request header fields allowed in an HTTP request. A server needs
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick this value to be larger than the number of fields that a normal
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick client request might include. The number of request header fields
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick used by a client rarely exceeds 20, but this may vary among
9f38f3ec3e8087985d108a24ae796962fef83644takashi different client implementations, often depending upon the extent
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen to which a user has configured their browser to support detailed
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick content negotiation. Optional HTTP extensions are often expressed
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick using request header fields.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
9f38f3ec3e8087985d108a24ae796962fef83644takashi <p>This directive gives the server administrator greater
9f38f3ec3e8087985d108a24ae796962fef83644takashi control over abnormal client request behavior, which may be
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick useful for avoiding some forms of denial-of-service attacks.
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick The value should be increased if normal clients see an error
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick response from the server that indicates too many fields were
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick sent in the request.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>For example:</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
c6f90ef0e93c077924fd0c3c0200dba0cb1777c6takashi <example>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi LimitRequestFields 50
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi </example>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi</usage>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</directivesynopsis>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestFieldSize</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of the HTTP request header allowed from the
003f0c9fda6664daf5092a0e42f65ede20098153sliveclient</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>LimitRequestFieldSize <var>bytes</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>LimitRequestFieldSize 8190</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the allowed size of an HTTP request header field. A server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive needs this value to be large enough to hold any one header field
130d299c4b2b15be45532a176604c71fdc7bea5bnd from a normal client request. The size of a normal request header
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive field will vary greatly among different client implementations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive often depending upon the extent to which a user has configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive their browser to support detailed content negotiation. SPNEGO
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication headers can be up to 12392 bytes.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive gives the server administrator greater
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess control over abnormal client request behavior, which may be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess useful for avoiding some forms of denial-of-service attacks.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd LimitRequestFieldSize 4094
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <note>Under normal conditions, the value should not be changed from
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the default.</note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>LimitRequestLine</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limit the size of the HTTP request line that will be accepted
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndfrom the client</description>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd<syntax>LimitRequestLine <var>bytes</var></syntax>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<default>LimitRequestLine 8190</default>
750d12c59545dbbac70390988de94f7e901b08f2niq<contextlist><context>server config</context></contextlist>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<usage>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>This directive sets the number of <var>bytes</var> that will be
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd allowed on the HTTP request-line.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>The <directive>LimitRequestLine</directive> directive allows
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive the server administrator to reduce or increase the limit on the allowed size
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive of a client's HTTP request-line. Since the request-line consists of the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd HTTP method, URI, and protocol version, the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <directive>LimitRequestLine</directive> directive places a
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd restriction on the length of a request-URI allowed for a request
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd on the server. A server needs this value to be large enough to
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd hold any of its resource names, including any information that
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd might be passed in the query part of a <code>GET</code> request.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>This directive gives the server administrator greater
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd control over abnormal client request behavior, which may be
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd useful for avoiding some forms of denial-of-service attacks.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>For example:</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <example>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd LimitRequestLine 4094
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </example>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <note>Under normal conditions, the value should not be changed from
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd the default.</note>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</usage>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</directivesynopsis>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<directivesynopsis>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<name>LimitXMLRequestBody</name>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<description>Limits the size of an XML-based request body</description>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<default>LimitXMLRequestBody 1000000</default>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<contextlist><context>server config</context><context>virtual host</context>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<context>directory</context><context>.htaccess</context></contextlist>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<override>All</override>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitXMLRequestBody 0
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Location</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to matching
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenURLs</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>&lt;Location
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive> directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen limits the scope of the enclosed directives by URL. It is similar to the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <directive type="section" module="core">Directory</directive>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directive, and starts a subsection which is terminated with a
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>&lt;/Location&gt;</code> directive. <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section">Location</directive> sections are processed in the
130d299c4b2b15be45532a176604c71fdc7bea5bnd order they appear in the configuration file, after the <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section" module="core">Directory</directive> sections and
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>.htaccess</code> files are read, and after the <directive
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele type="section" module="core">Files</directive> sections.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p><directive type="section">Location</directive> sections operate
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive completely outside the filesystem. This has several consequences.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Most importantly, <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives should not be used to control access to filesystem
03e0a375c2435102fb2b51e34cccff52acbfddcdnd locations. Since several different URLs may map to the same
03e0a375c2435102fb2b51e34cccff52acbfddcdnd filesystem location, such access controls may by circumvented.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <note><title>When to use <directive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd type="section">Location</directive></title>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Use <directive type="section">Location</directive> to apply
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directives to content that lives outside the filesystem. For
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen content that lives in the filesystem, use <directive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd type="section" module="core">Directory</directive> and <directive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd type="section" module="core">Files</directive>. An exception is
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>&lt;Location /&gt;</code>, which is an easy way to
03e0a375c2435102fb2b51e34cccff52acbfddcdnd apply a configuration to the entire server.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </note>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For all origin (non-proxy) requests, the URL to be matched is a
03e0a375c2435102fb2b51e34cccff52acbfddcdnd URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
03e0a375c2435102fb2b51e34cccff52acbfddcdnd port, or query string may be included.</em> For proxy requests, the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd URL to be matched is of the form
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>scheme://servername/path</code>, and you must include the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd prefix.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
03e0a375c2435102fb2b51e34cccff52acbfddcdnd any single character, and <code>*</code> matches any sequences of
03e0a375c2435102fb2b51e34cccff52acbfddcdnd characters. Neither wildcard character matches a / in the URL-path.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p><glossary ref="regex">Regular expressions</glossary>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd can also be used, with the addition of the <code>~</code>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd character. For example:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;Location ~ "/(extra|special)/data"&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>. The directive <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">LocationMatch</directive> behaves
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive identical to the regex version of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive>, and is preferred, for the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd simple reason that <code>~</code> is hard to distinguish from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> in many fonts.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive functionality is especially useful when combined with the
003f0c9fda6664daf5092a0e42f65ede20098153slive <directive module="core">SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. For example, to enable status requests, but allow them
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only from browsers at <code>example.com</code>, you might use:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
89ea3e2b9591820407538ac250ec49a0f4f056d2nd &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from .example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note><title>Note about / (slash)</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The slash character has special meaning depending on where in a
fb77c505254b6e9c925e23e734463e87574f8f40kess URL it appears. People may be used to its behavior in the filesystem
fb77c505254b6e9c925e23e734463e87574f8f40kess where multiple adjacent slashes are frequently collapsed to a single
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/foo</code>). In URL-space this is not necessarily true.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The <directive type="section" module="core">LocationMatch</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive and the regex version of <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> require you to explicitly specify multiple
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen slashes if that is your intention.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the request URL <code>/abc</code> but not the request URL <code>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen //abc</code>. The (non-regex) <directive type="section"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen >Location</directive> directive behaves similarly when used for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd proxy requests. But when (non-regex) <directive type="section"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen >Location</directive> is used for non-proxy requests it will
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen implicitly match multiple slashes with a single slash. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if you specify <code>&lt;Location /abc/def&gt;</code> and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is to <code>/abc//def</code> then it will match.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received.</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">LocationMatch</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LocationMatch</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Applies the enclosed directives only to regular-expression
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematching URLs</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;LocationMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL, in an identical manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to <directive module="core" type="section">Location</directive>. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it takes a <glossary ref="regex">regular expression</glossary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an argument instead of a simple string. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LocationMatch "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen and &lt;Files&gt; sections work</a> for an explanation of how these
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen different sections are combined when a request is received</seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>LogLevel</name>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener<description>Controls the verbosity of the ErrorLog</description>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener<syntax>LogLevel <var>level</var></syntax>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<default>LogLevel warn</default>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<contextlist><context>server config</context><context>virtual host</context>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener</contextlist>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LogLevel</directive> adjusts the verbosity of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive messages recorded in the error logs (see <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ErrorLog</directive> directive). The following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen <table border="1">
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen </columnspec>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Level</strong> </th>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <th><strong>Description</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <th><strong>Example</strong> </th>
72580dbc2a55511f13f377063725b9f143b20826stoddard </tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard <td><code>emerg</code> </td>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <td>Emergencies - system is unusable.</td>
56d7eed7205462540aec7202cd82d9f5516fc537kess
72580dbc2a55511f13f377063725b9f143b20826stoddard <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>alert</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Action must be taken immediately.</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"getpwuid: couldn't determine user name from uid"</td>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>crit</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Critical Conditions.</td>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener <td>"socket: Failed to get a socket, exiting child"</td>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener </tr>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <tr>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <td><code>error</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Error conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Premature end of script headers"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td><code>warn</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
e0ef044feba0082771091af42798cada5bb1f4fcrbowen <td>Warning conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"child process 1234 did not exit, sending another
72580dbc2a55511f13f377063725b9f143b20826stoddard SIGHUP"</td>
72580dbc2a55511f13f377063725b9f143b20826stoddard </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard <td><code>notice</code> </td>
72580dbc2a55511f13f377063725b9f143b20826stoddard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Normal but significant condition.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>info</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Informational.</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"Server seems busy, (you may need to increase
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen StartServers, or Min/MaxSpareServers)..."</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>debug</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Debug-level messages</td>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener <td>"Opening config file ..."</td>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener </tr>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener </table>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <p>When a particular level is specified, messages from all
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener other levels of higher significance will be reported as well.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then messages with log levels of <code>notice</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>warn</code> will also be posted.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using a level of at least <code>crit</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <example>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele LogLevel notice
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When logging to a regular file messages of the level
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>notice</code> cannot be suppressed and thus are always
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen logged. However, this doesn't apply when logging is done
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen using <code>syslog</code>.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>MaxKeepAliveRequests</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Number of requests allowed on a persistent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveconnection</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>MaxKeepAliveRequests <var>number</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>MaxKeepAliveRequests 100</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>MaxKeepAliveRequests</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the number of requests allowed per connection when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" >KeepAlive</directive> is on. If it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set to <code>0</code>, unlimited requests will be allowed. We
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess recommend that this setting be kept to a high value for maximum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server performance.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive MaxKeepAliveRequests 500
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<name>Mutex</name>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<description>Configures mutex mechanism and lock file directory for all
234c8b28171d7e12b3c1f85b60fabd7c908a9c37sliveor specified mutexes</description>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<syntax>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</syntax>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<default>Mutex default</default>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<contextlist><context>server config</context></contextlist>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<compatibility>Available in Apache 2.3.4 and later</compatibility>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<usage>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>The <directive>Mutex</directive> directive sets the mechanism,
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive and optionally the lock file location, that httpd and modules use
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive to serialize access to resources. Specify <code>default</code> as
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive the first argument to change the settings for all mutexes; specify
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive a mutex name (see table below) as the first argument to override
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive defaults only for that mutex.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Mutex</directive> directive is typically used in
dc223428958ad9ff05011545bcdda000887b93e5slive the following exceptional situations:</p>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj <ul>
dc223428958ad9ff05011545bcdda000887b93e5slive <li>change the mutex mechanism when the default mechanism selected
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by <glossary>APR</glossary> has a functional or performance
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>change the directory used by file-based mutexes when the
fb77c505254b6e9c925e23e734463e87574f8f40kess default directory does not support locking</li>
d8c44cd75cf575fe51319280c12445109e878523noodl </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
030108b1816bcda3d925df65357feabdce83bc94slive <note><title>Supported modules</title>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>This directive only configures mutexes which have been registered
37742b630743e470b94618ecb3560fbd82e50b59rbowen with the core server using the <code>ap_mutex_register()</code> API.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd All modules bundled with httpd support the <directive>Mutex</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive, but third-party modules may not. Consult the documentation
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the third-party module, which must indicate the mutex name(s) which
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can be configured if this directive is supported.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
fb77c505254b6e9c925e23e734463e87574f8f40kess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The following mutex <em>mechanisms</em> are available:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <ul>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li><code>default | yes</code>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>This selects the default locking implementation, as determined by
37742b630743e470b94618ecb3560fbd82e50b59rbowen <glossary>APR</glossary>. The default locking implementation can
37742b630743e470b94618ecb3560fbd82e50b59rbowen be displayed by running <program>httpd</program> with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-V</code> option.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>none | no</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This effectively disables the mutex, and is only allowed for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mutex if the module indicates that it is a valid choice. Consult the
e8811b6d38f756b325446ded5d96857d13856511takashi module documentation for more information.</p></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li><code>posixsem</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This is a mutex variant based on a Posix semaphore.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <note type="warning"><title>Warning</title>
ca908c21f63a71c5efa7d32bd2cfafe9a42ba1fbrbowen <p>The semaphore ownership is not recovered if a thread in the process
130d299c4b2b15be45532a176604c71fdc7bea5bnd holding the mutex segfaults, resulting in a hang of the web server.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>sysvsem</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning"><title>Warning</title>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <p>It is possible to "leak" SysV semaphores if processes crash
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd before the semaphore is removed.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning"><title>Security</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The semaphore API allows for a denial of service attack by any
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess CGIs running under the same uid as the webserver (<em>i.e.</em>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd all CGIs, unless you use something like <program>suexec</program>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>cgiwrapper</code>).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>sem</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This selects the "best" available semaphore implementation, choosing
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd between Posix and SystemV IPC semaphores, in that order.</p></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>pthread</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant based on cross-process Posix thread
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess mutexes.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
37742b630743e470b94618ecb3560fbd82e50b59rbowen <note type="warning"><title>Warning</title>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>On most systems, if a child process terminates abnormally while
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive holding a mutex that uses this implementation, the server will deadlock
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and stop responding to requests. When this occurs, the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive require a manual restart to recover.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Solaris is a notable exception as it provides a mechanism which
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess usually allows the mutex to be recovered after a child process
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive terminates abnormally while holding a mutex.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If your system implements the
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to use the <code>pthread</code> option safely.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>fcntl:/path/to/mutex</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>This is a mutex variant where a physical (lock-)file and the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>fcntl()</code> function are used as the mutex.</p>
030108b1816bcda3d925df65357feabdce83bc94slive
030108b1816bcda3d925df65357feabdce83bc94slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When multiple mutexes based on this mechanism are used within
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd multi-threaded, multi-process environments, deadlock errors (EDEADLK)
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can be reported for valid mutex operations if <code>fcntl()</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is not thread-aware, such as on Solaris.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>flock:/path/to/mutex</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess with the exception that the <code>flock()</code> function is used to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess provide file locking.</p></li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>file:/path/to/mutex</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This selects the "best" available file locking implementation,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive choosing between <code>fcntl</code> and <code>flock</code>, in that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>Most mechanisms are only available on selected platforms, where the
7fbd7281d06cec1918aa370214df77c572f871a9sf underlying platform and <glossary>APR</glossary> support it. Mechanisms
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which aren't available on all platforms are <em>posixsem</em>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
7fbd7281d06cec1918aa370214df77c572f871a9sf <em>flock</em>, and <em>file</em>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
7fbd7281d06cec1918aa370214df77c572f871a9sf the path, if provided, is a directory where the lock file will be created.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The default directory is httpd's run-time file directory relative to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ServerRoot</directive>. Always use a local disk
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem for <code>/path/to/mutex</code> and never a directory residing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on a NFS- or AFS-filesystem. The basename of the file will be the mutex
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type, an optional instance string provided by the module, and unless the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>OmitPID</code> keyword is specified, the process id of the httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parent process will be appended to to make the file name unique, avoiding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive conflicts when multiple httpd instances share a lock file directory. For
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen example, if the mutex name is <code>mpm-accept</code> and the lock file
1597043cec6ad37fa4154bf09b0fccdabed1a239slive directory is <code>/var/httpd/locks</code>, the lock file name for the
1597043cec6ad37fa4154bf09b0fccdabed1a239slive httpd instance with parent process id 12345 would be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Security</title>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>It is best to <em>avoid</em> putting mutex files in a world-writable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory such as <code>/var/tmp</code> because someone could create
530eba85dbd41b8a0fa5255d3648d1440199a661slive a denial of service attack and prevent the server from starting by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating a lockfile with the same name as the one the server will try
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to create.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following table documents the names of mutexes used by httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and bundled modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1" style="zebra">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Mutex name</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Module(s)</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Protected resource</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>mpm-accept</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>prefork</module> and <module>worker</module> MPMs</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>incoming connections, to avoid the thundering herd problem;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for more information, refer to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/misc/perf-tuning.html">performance tuning</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>authdigest-client</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_auth_digest</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>client list in shared memory</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>authdigest-opaque</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_auth_digest</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>counter in shared memory</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ldap-cache</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ldap</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>LDAP result cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>rewrite-map</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_rewrite</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>communication with external mapping programs, to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive intermixed I/O from multiple requests</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ssl-cache</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ssl</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>SSL session cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ssl-stapling</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ssl</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>OCSP stapling response cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>watchdog-callback</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_watchdog</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>callback function of a particular client module</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parent process id from the lock file name.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the following example, the mutex mechanism for the MPM accept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mutex will be changed from the compiled-in default to <code>fcntl</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with the associated lock file created in directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be changed from the compiled-in default to <code>sysvsem</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf Mutex default sysvsem<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf Mutex mpm-accept fcntl:/var/httpd/locks
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
7fbd7281d06cec1918aa370214df77c572f871a9sf</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>NameVirtualHost</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Designates an IP address for name-virtual
7fbd7281d06cec1918aa370214df77c572f871a9sfhosting</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>A single <directive>NameVirtualHost</directive> directive
7fbd7281d06cec1918aa370214df77c572f871a9sfidentifies a set of identical virtual hosts on which the server will
7fbd7281d06cec1918aa370214df77c572f871a9sffurther select from on the basis of the <em>hostname</em>
7fbd7281d06cec1918aa370214df77c572f871a9sfrequested by the client. The <directive>NameVirtualHost</directive>
7fbd7281d06cec1918aa370214df77c572f871a9sfdirective is a required directive if you want to configure
7fbd7281d06cec1918aa370214df77c572f871a9sf<a href="/vhosts/">name-based virtual hosts</a>.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>This directive, and the corresponding <directive >VirtualHost</directive>,
7fbd7281d06cec1918aa370214df77c572f871a9sf<em>must</em> be qualified with a port number if the server supports both HTTP
7fbd7281d06cec1918aa370214df77c572f871a9sfand HTTPS connections.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>Although <var>addr</var> can be a hostname, it is recommended
7fbd7281d06cec1918aa370214df77c572f871a9sfthat you always use an IP address or a wildcard. A wildcard
7fbd7281d06cec1918aa370214df77c572f871a9sfNameVirtualHost matches only virtualhosts that also have a literal wildcard
7fbd7281d06cec1918aa370214df77c572f871a9sfas their argument.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>In cases where a firewall or other proxy receives the requests and
7fbd7281d06cec1918aa370214df77c572f871a9sfforwards them on a different IP address to the server, you must specify the
7fbd7281d06cec1918aa370214df77c572f871a9sfIP address of the physical interface on the machine which will be
7fbd7281d06cec1918aa370214df77c572f871a9sfservicing the requests. </p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p> In the example below, requests received on interface 192.0.2.1 and port 80
7fbd7281d06cec1918aa370214df77c572f871a9sfwill only select among the first two virtual hosts. Requests received on
7fbd7281d06cec1918aa370214df77c572f871a9sfport 80 on any other interface will only select among the third and fourth
7fbd7281d06cec1918aa370214df77c572f871a9sfvirtual hosts. In the common case where the interface isn't important
7fbd7281d06cec1918aa370214df77c572f871a9sfto the mapping, only the "*:80" NameVirtualHost and VirtualHost directives
7fbd7281d06cec1918aa370214df77c572f871a9sfare necessary.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf NameVirtualHost 192.0.2.1:80<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf NameVirtualHost *:80<br /><br />
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;VirtualHost 192.0.2.1:80&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &nbsp; ServerName namebased-a.example.com<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/VirtualHost&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf <br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;VirtualHost 192.0.2.1:80&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &nbsp; Servername namebased-b.example.com<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/VirtualHost&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost *:80&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &nbsp; ServerName namebased-c.example.com <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost *:80&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &nbsp; ServerName namebased-d.example.com <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>IPv6 addresses must be enclosed in square brackets, as shown
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen in the following example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
8b052d682204371decc64f942aede5ef1da98955erikabele </example>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <note><title>Argument to <directive type="section">VirtualHost</directive>
8b052d682204371decc64f942aede5ef1da98955erikabele directive</title>
8b052d682204371decc64f942aede5ef1da98955erikabele <p>Note that the argument to the <directive
8b052d682204371decc64f942aede5ef1da98955erikabele type="section">VirtualHost</directive> directive must
8b052d682204371decc64f942aede5ef1da98955erikabele exactly match the argument to the <directive
7fbd7281d06cec1918aa370214df77c572f871a9sf >NameVirtualHost</directive> directive.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf NameVirtualHost 192.0.2.2:80<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;VirtualHost 192.0.2.2:80&gt;<br />
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier # ...<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/VirtualHost&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
7fbd7281d06cec1918aa370214df77c572f871a9sf </note>
7fbd7281d06cec1918aa370214df77c572f871a9sf</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><a href="/vhosts/">Virtual Hosts
7fbd7281d06cec1918aa370214df77c572f871a9sfdocumentation</a></seealso>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>Options</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Configures what features are available in a particular
7fbd7281d06cec1918aa370214df77c572f871a9sfdirectory</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>Options
7fbd7281d06cec1918aa370214df77c572f871a9sf [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<default>Options All</default>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context><context>.htaccess</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf</contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf<override>Options</override>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf <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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>All</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <dd>All options except for <code>MultiViews</code>. This is the default
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ExecCGI</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts using <module>mod_cgi</module>
fb77c505254b6e9c925e23e734463e87574f8f40kess is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>FollowSymLinks</code></dt>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <dd>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd The server will follow symbolic links in this directory.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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
a0fed3e26656887c8458aa1081d516d08ced3c84trawick inside a <directive type="section" module="core">Location</directive>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick section.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Omitting this option should not be considered a security restriction,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick since symlink testing is subject to race conditions that make it
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick circumventable.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </note></dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dt><code>Includes</code></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Server-side includes provided by <module>mod_include</module>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick are permitted.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><code>IncludesNOEXEC</code></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Server-side includes are permitted, but the <code>#exec
a0fed3e26656887c8458aa1081d516d08ced3c84trawick cmd</code> and <code>#exec cgi</code> are disabled. It is still
a0fed3e26656887c8458aa1081d516d08ced3c84trawick possible to <code>#include virtual</code> CGI scripts from
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive module="mod_alias">ScriptAlias</directive>ed
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directories.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><code>Indexes</code></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick If a URL which maps to a directory is requested, and there
a0fed3e26656887c8458aa1081d516d08ced3c84trawick is no <directive module="mod_dir">DirectoryIndex</directive>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick (<em>e.g.</em>, <code>index.html</code>) in that directory, then
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <module>mod_autoindex</module> will return a formatted listing
a0fed3e26656887c8458aa1081d516d08ced3c84trawick of the directory.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><code>MultiViews</code></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <a href="/content-negotiation.html">Content negotiated</a>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick "MultiViews" are allowed using
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <module>mod_negotiation</module>.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><code>SymLinksIfOwnerMatch</code></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>The server will only follow symbolic links for which the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick target file or directory is owned by the same user id as the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick link.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note><title>Note</title> <p>This option gets ignored if
a0fed3e26656887c8458aa1081d516d08ced3c84trawick set inside a <directive module="core"
a0fed3e26656887c8458aa1081d516d08ced3c84trawick type="section">Location</directive> section.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This option should not be considered a security restriction,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick since symlink testing is subject to race conditions that make it
a0fed3e26656887c8458aa1081d516d08ced3c84trawick circumventable.</p></note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </dd>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick </dl>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>Normally, if multiple <directive>Options</directive> could
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick apply to a directory, then the most specific one is used and
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick others are ignored; the options are not merged. (See <a
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick href="/sections.html#mergin">how sections are merged</a>.)
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick However if <em>all</em> the options on the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive>Options</directive> directive are preceded by a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>+</code> or <code>-</code> symbol, the options are
a0fed3e26656887c8458aa1081d516d08ced3c84trawick merged. Any options preceded by a <code>+</code> are added to the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick options currently in force, and any options preceded by a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-</code> are removed from the options currently in
a0fed3e26656887c8458aa1081d516d08ced3c84trawick force. </p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note type="warning"><title>Warning</title>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>Mixing <directive>Options</directive> with a <code>+</code> or
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <code>-</code> with those without is not valid syntax, and is likely
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick to cause unexpected results.</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick </note>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options Indexes FollowSymLinks<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs/spec&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options Includes<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>then only <code>Includes</code> will be set for the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>/web/docs/spec</code> directory. However if the second
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive>Options</directive> directive uses the <code>+</code> and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-</code> symbols:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options Indexes FollowSymLinks<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs/spec&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options +Includes -Indexes<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>then the options <code>FollowSymLinks</code> and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>Includes</code> are set for the <code>/web/docs/spec</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directory.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note><title>Note</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Using <code>-IncludesNOEXEC</code> or
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-Includes</code> disables server-side includes completely
a0fed3e26656887c8458aa1081d516d08ced3c84trawick regardless of the previous setting.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The default in the absence of any other settings is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>All</code>.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
215694531f7d868b906df96e22a80e6a1d2326a6lgentis<name>RLimitCPU</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Limits the CPU consumption of processes launched
a0fed3e26656887c8458aa1081d516d08ced3c84trawickby Apache children</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>Unset; uses operating system defaults</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context><context>.htaccess</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<override>All</override>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick resource limit for all processes and the second parameter sets
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the maximum resource limit. Either parameter can be a number,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick or <code>max</code> to indicate to the server that the limit should
a0fed3e26656887c8458aa1081d516d08ced3c84trawick be set to the maximum allowed by the operating system
a0fed3e26656887c8458aa1081d516d08ced3c84trawick configuration. Raising the maximum resource limit requires that
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the server is running as <code>root</code>, or in the initial startup
a0fed3e26656887c8458aa1081d516d08ced3c84trawick phase.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This applies to processes forked off from Apache children
a0fed3e26656887c8458aa1081d516d08ced3c84trawick servicing requests, not the Apache children themselves. This
a0fed3e26656887c8458aa1081d516d08ced3c84trawick includes CGI scripts and SSI exec commands, but not any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick processes forked off from the Apache parent such as piped
a0fed3e26656887c8458aa1081d516d08ced3c84trawick logs.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>CPU resource limits are expressed in seconds per
a0fed3e26656887c8458aa1081d516d08ced3c84trawick process.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitMEM</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitNPROC</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<name>RLimitMEM</name>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Limits the memory consumption of processes launched
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickby Apache children</description>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<default>Unset; uses operating system defaults</default>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<contextlist><context>server config</context><context>virtual host</context>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<context>directory</context><context>.htaccess</context></contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<override>All</override>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick resource limit for all processes and the second parameter sets
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the maximum resource limit. Either parameter can be a number,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick or <code>max</code> to indicate to the server that the limit should
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick be set to the maximum allowed by the operating system
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick configuration. Raising the maximum resource limit requires that
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the server is running as <code>root</code>, or in the initial startup
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick phase.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This applies to processes forked off from Apache children
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick servicing requests, not the Apache children themselves. This
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick includes CGI scripts and SSI exec commands, but not any
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick processes forked off from the Apache parent such as piped
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick logs.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Memory resource limits are expressed in bytes per
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick process.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitCPU</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitNPROC</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<name>RLimitNPROC</name>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Limits the number of processes that can be launched by
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickprocesses launched by Apache children</description>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<default>Unset; uses operating system defaults</default>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<contextlist><context>server config</context><context>virtual host</context>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<context>directory</context><context>.htaccess</context></contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<override>All</override>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick resource limit for all processes and the second parameter sets
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the maximum resource limit. Either parameter can be a number,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick or <code>max</code> to indicate to the server that the limit
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick should be set to the maximum allowed by the operating system
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick configuration. Raising the maximum resource limit requires that
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the server is running as <code>root</code>, or in the initial startup
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick phase.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This applies to processes forked off from Apache children
a0fed3e26656887c8458aa1081d516d08ced3c84trawick servicing requests, not the Apache children themselves. This
a0fed3e26656887c8458aa1081d516d08ced3c84trawick includes CGI scripts and SSI exec commands, but not any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick processes forked off from the Apache parent such as piped
a0fed3e26656887c8458aa1081d516d08ced3c84trawick logs.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Process limits control the number of processes per user.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note><title>Note</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>If CGI processes are <strong>not</strong> running
a0fed3e26656887c8458aa1081d516d08ced3c84trawick under user ids other than the web server user id, this directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick will limit the number of processes that the server itself can
a0fed3e26656887c8458aa1081d516d08ced3c84trawick 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>
003f0c9fda6664daf5092a0e42f65ede20098153slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitCPU</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<name>ScriptInterpreterSource</name>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<description>Technique for locating the interpreter for CGI
4025ef5b9785f4cc9e6456a1c0177383a8503361covenerscripts</description>
5f4e50966b2b9b58436a1651cbe588d1b595657ewrowe<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<default>ScriptInterpreterSource Script</default>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<contextlist><context>server config</context><context>virtual host</context>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<context>directory</context><context>.htaccess</context></contextlist>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<override>FileInfo</override>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<compatibility>Win32 only;
4025ef5b9785f4cc9e6456a1c0177383a8503361coveneroption <code>Registry-Strict</code> is available in Apache 2.0 and
4025ef5b9785f4cc9e6456a1c0177383a8503361covenerlater</compatibility>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<usage>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>This directive is used to control how Apache finds the
4025ef5b9785f4cc9e6456a1c0177383a8503361covener interpreter used to run CGI scripts. The default setting is
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <code>Script</code>. This causes Apache to use the interpreter pointed to
4025ef5b9785f4cc9e6456a1c0177383a8503361covener by the shebang line (first line, starting with <code>#!</code>) in the
4025ef5b9785f4cc9e6456a1c0177383a8503361covener script. On Win32 systems this line usually looks like:</p>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <example>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener #!C:/Perl/bin/perl.exe
4025ef5b9785f4cc9e6456a1c0177383a8503361covener </example>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <example>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener #!perl
4025ef5b9785f4cc9e6456a1c0177383a8503361covener </example>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>Setting <code>ScriptInterpreterSource Registry</code> will
4025ef5b9785f4cc9e6456a1c0177383a8503361covener cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
4025ef5b9785f4cc9e6456a1c0177383a8503361covener searched using the script file extension (e.g., <code>.pl</code>) as a
4025ef5b9785f4cc9e6456a1c0177383a8503361covener search key. The command defined by the registry subkey
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <code>Shell\Open\Command</code> is used to open the script file. If the
4025ef5b9785f4cc9e6456a1c0177383a8503361covener registry keys cannot be found, Apache falls back to the behavior of the
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <code>Script</code> option.</p>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <note type="warning"><title>Security</title>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>Be careful when using <code>ScriptInterpreterSource
4025ef5b9785f4cc9e6456a1c0177383a8503361covener Registry</code> with <directive
4025ef5b9785f4cc9e6456a1c0177383a8503361covener module="mod_alias">ScriptAlias</directive>'ed directories, because
4025ef5b9785f4cc9e6456a1c0177383a8503361covener Apache will try to execute <strong>every</strong> file within this
4025ef5b9785f4cc9e6456a1c0177383a8503361covener directory. The <code>Registry</code> setting may cause undesired
4025ef5b9785f4cc9e6456a1c0177383a8503361covener program calls on files which are typically not executed. For
4025ef5b9785f4cc9e6456a1c0177383a8503361covener example, the default open command on <code>.htm</code> files on
4025ef5b9785f4cc9e6456a1c0177383a8503361covener most Windows systems will execute Microsoft Internet Explorer, so
4025ef5b9785f4cc9e6456a1c0177383a8503361covener any HTTP request for an <code>.htm</code> file existing within the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive script directory would start the browser in the background on the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server. This is a good way to crash your system within a minute or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive so.</p>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier </note>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <p>The option <code>Registry-Strict</code> which is new in Apache
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier 2.0 does the same thing as <code>Registry</code> but uses only the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd subkey <code>Shell\ExecCGI\Command</code>. The
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>ExecCGI</code> key is not a common one. It must be
fb77c505254b6e9c925e23e734463e87574f8f40kess configured manually in the windows registry and hence prevents
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd accidental program calls on your system.</p>
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>ServerAdmin</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Email address that the server includes in error
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshikimessages sent to the client</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
4025ef5b9785f4cc9e6456a1c0177383a8503361covener<usage>
4025ef5b9785f4cc9e6456a1c0177383a8503361covener <p>The <directive>ServerAdmin</directive> sets the contact address
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that the server includes in any error messages it returns to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd client. If the <code>httpd</code> doesn't recognize the supplied argument
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd as an URL, it
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd assumes, that it's an <var>email-address</var> and prepends it with
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive <code>mailto:</code> in hyperlink targets. However, it's recommended to
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive actually use an email address, since there are a lot of CGI scripts that
05201775eaa6b363b8a119c8aea5db246b967591yoshiki 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
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server!</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerAlias</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ServerAlias</directive> may include wildcards, if appropriate.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;VirtualHost *:80&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName server.domain.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAlias server server2.domain.com server2<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ServerAlias *.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
13e5182a0c199ecc7a73db97b6448a544e940868slive </example>
13e5182a0c199ecc7a73db97b6448a544e940868slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerName</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Hostname and port that the server uses to identify
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnditself</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>In version 2.0, this
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive supersedes the functionality of the <directive>Port</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive from version 1.3.</compatibility>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<usage>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>The <directive>ServerName</directive> directive sets the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request scheme, hostname and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port that the server uses to identify itself. This is used when
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess creating redirection URLs. For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the web server is <code>simple.example.com</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive but the machine also has the DNS alias <code>www.example.com</code>
13e5182a0c199ecc7a73db97b6448a544e940868slive and you wish the web server to be so identified, the following
13e5182a0c199ecc7a73db97b6448a544e940868slive directive should be used:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName www.example.com:80
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>If no <directive>ServerName</directive> is specified, then the
13e5182a0c199ecc7a73db97b6448a544e940868slive server attempts to deduce the hostname by performing a reverse
13e5182a0c199ecc7a73db97b6448a544e940868slive lookup on the IP address. If no port is specified in the
b00583f8e126bbb00b06dcf06af06c9d07978701kess <directive>ServerName</directive>, then the server will use the
13e5182a0c199ecc7a73db97b6448a544e940868slive port from the incoming request. For optimal reliability and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive predictability, you should specify an explicit hostname and port
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess using the <directive>ServerName</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using <a
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess href="/vhosts/name-based.html">name-based virtual hosts</a>,
13e5182a0c199ecc7a73db97b6448a544e940868slive the <directive>ServerName</directive> inside a
13e5182a0c199ecc7a73db97b6448a544e940868slive <directive type="section" module="core">VirtualHost</directive>
13e5182a0c199ecc7a73db97b6448a544e940868slive section specifies what hostname must appear in the request's
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Sometimes, the server runs behind a device that processes SSL,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such as a reverse proxy, load balancer or SSL offload
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appliance. When this is the case, specify the
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>https://</code> scheme and the port number to which the
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic clients connect in the <directive>ServerName</directive> directive
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic to make sure that the server generates the correct
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic self-referential URLs.
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic </p>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <p>See the description of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">UseCanonicalName</directive> and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive module="core">UseCanonicalPhysicalPort</directive> directives for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive settings which determine whether self-referential URLs (e.g., by the
13e5182a0c199ecc7a73db97b6448a544e940868slive <module>mod_dir</module> module) will refer to the
13e5182a0c199ecc7a73db97b6448a544e940868slive specified port, or to the port number given in the client's request.
13e5182a0c199ecc7a73db97b6448a544e940868slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive</usage>
13e5182a0c199ecc7a73db97b6448a544e940868slive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive Apache</a></seealso>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<seealso><a href="/vhosts/">Apache virtual host
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive documentation</a></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><directive module="core">NameVirtualHost</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><directive module="core">ServerAlias</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive<name>ServerPath</name>
13e5182a0c199ecc7a73db97b6448a544e940868slive<description>Legacy URL pathname for a name-based virtual host that
13e5182a0c199ecc7a73db97b6448a544e940868sliveis accessed by an incompatible browser</description>
13e5182a0c199ecc7a73db97b6448a544e940868slive<syntax>ServerPath <var>URL-path</var></syntax>
13e5182a0c199ecc7a73db97b6448a544e940868slive<contextlist><context>virtual host</context></contextlist>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerPath</directive> directive sets the legacy
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen URL pathname for a host, for use with <a
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen href="/vhosts/">name-based virtual hosts</a>.</p>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen</usage>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen</directivesynopsis>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <directive>ServerRoot</directive> directive sets the
130d299c4b2b15be45532a176604c71fdc7bea5bnd directory in which the server lives. Typically it will contain the
130d299c4b2b15be45532a176604c71fdc7bea5bnd subdirectories <code>conf/</code> and <code>logs/</code>. Relative
130d299c4b2b15be45532a176604c71fdc7bea5bnd paths in other configuration directives (such as <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">Include</directive> or <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="mod_so">LoadModule</directive>, for example) are taken as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd relative to this directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
fb77c505254b6e9c925e23e734463e87574f8f40kess ServerRoot /home/httpd
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/invoking.html">the <code>-d</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd option to <code>httpd</code></a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/misc/security_tips.html#serverroot">the
130d299c4b2b15be45532a176604c71fdc7bea5bnd security tips</a> for information on how to properly set
130d299c4b2b15be45532a176604c71fdc7bea5bnd permissions on the <directive>ServerRoot</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>ServerSignature</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Configures the footer on server-generated documents</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>ServerSignature On|Off|EMail</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<default>ServerSignature Off</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>All</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <directive>ServerSignature</directive> directive allows the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess configuration of a trailing footer line under server-generated
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess documents (error messages, <module>mod_proxy</module> ftp directory
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess listings, <module>mod_info</module> output, ...). The reason why you
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen below). The <code>On</code> setting simply adds a line with the
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen server version number and <directive
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen module="core">ServerName</directive> of the serving virtual host,
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen and the <code>EMail</code> setting additionally creates a
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen "mailto:" reference to the <directive
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen module="core">ServerAdmin</directive> of the referenced
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen document.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>After version 2.0.44, the details of the server version number
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen presented are controlled by the <directive
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen module="core">ServerTokens</directive> directive.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</usage>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><directive module="core">ServerTokens</directive></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<name>ServerTokens</name>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<description>Configures the <code>Server</code> HTTP response
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowenheader</description>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<default>ServerTokens Full</default>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<contextlist><context>server config</context></contextlist>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<usage>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>This directive controls whether <code>Server</code> response
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen header field which is sent back to clients includes a
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen description of the generic OS-type of the server as well as
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen information about compiled-in modules.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
ef8e89e090461194ecadd31e8796a2c51e0531a2kess (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Major</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache/2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Minor</code></dt>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4</code></dd>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dt><code>ServerTokens Min[imal]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4.1</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens OS</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>After version 2.0.44, this directive also controls the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess information presented by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerSignature</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <note>Setting <directive>ServerTokens</directive> to less than
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <code>minimal</code> is not recommended because it makes it more
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive difficult to debug interoperational problems. Also note that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive disabling the Server: header does nothing at all to make your
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server more secure; the idea of "security through obscurity"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is a myth and leads to a false sense of safety.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerSignature</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetHandler</name>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<description>Forces all matching files to be processed by a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenhandler</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetHandler <var>handler-name</var>|None</syntax>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <var>handler-name</var>. For example, if you had a directory you
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen wanted to be parsed entirely as imagemap rule files, regardless
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> file in that directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <example>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele 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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </indent>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <directive>SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive by using the value <code>None</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note:</strong> because SetHandler overrides default handlers,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal behaviour such as handling of URLs ending in a slash (/) as
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directories or index files is suppressed.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="mod_mime">AddHandler</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetInputFilter</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveinput</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>SetInputFilter</directive> directive sets the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele filter or filters which will process client requests and POST
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele input when they are received by the server. This is in addition to
003f0c9fda6664daf5092a0e42f65ede20098153slive any filters defined elsewhere, including the
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive <directive module="mod_mime">AddInputFilter</directive>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen directive.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen content.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><a href="/filter.html">Filters</a> documentation</seealso>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<name>SetOutputFilter</name>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<description>Sets the filters that will process responses from the
4cafc94e99922f00654e1779d30c2cccf5278c4fkessserver</description>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki<contextlist><context>server config</context><context>virtual host</context>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<context>directory</context><context>.htaccess</context>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</contextlist>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<override>FileInfo</override>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>SetOutputFilter</directive> directive sets the filters
4cafc94e99922f00654e1779d30c2cccf5278c4fkess which will process responses from the server before they are
4cafc94e99922f00654e1779d30c2cccf5278c4fkess sent to the client. This is in addition to any filters defined
4cafc94e99922f00654e1779d30c2cccf5278c4fkess elsewhere, including the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <directive module="mod_mime">AddOutputFilter</directive>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive directive.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess <p>For example, the following configuration will process all files
4cafc94e99922f00654e1779d30c2cccf5278c4fkess in the <code>/www/data/</code> directory for server-side
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki includes.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <example>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive &lt;Directory /www/data/&gt;<br />
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <indent>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive SetOutputFilter INCLUDES<br />
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </indent>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive &lt;/Directory&gt;
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </example>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>If more than one filter is specified, they must be separated
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive by semicolons in the order in which they should process the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive content.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/filter.html">Filters</a> documentation</seealso>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</directivesynopsis>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<directivesynopsis>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<name>TimeOut</name>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<description>Amount of time the server will wait for
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slivecertain events before failing a request</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>TimeOut <var>seconds</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>TimeOut 300</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context></contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The <directive>TimeOut</directive> directive defines the length
a8ee031b2224ce5473826c9d4f603681589245fawrowe of time Apache will wait for I/O in various circumstances:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <ol>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <li>When reading data from the client, the length of time to
a8ee031b2224ce5473826c9d4f603681589245fawrowe wait for a TCP packet to arrive if the read buffer is
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen empty.</li>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <li>When writing data to the client, the length of time to wait
a8ee031b2224ce5473826c9d4f603681589245fawrowe for an acknowledgement of a packet if the send buffer is
a8ee031b2224ce5473826c9d4f603681589245fawrowe full.</li>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <li>In <module>mod_cgi</module>, the length of time to wait for
a8ee031b2224ce5473826c9d4f603681589245fawrowe output from a CGI script.</li>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <li>In <module>mod_ext_filter</module>, the length of time to
a8ee031b2224ce5473826c9d4f603681589245fawrowe wait for output from a filtering process.</li>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>In <module>mod_proxy</module>, the default timeout value if
a8ee031b2224ce5473826c9d4f603681589245fawrowe <directive module="mod_proxy">ProxyTimeout</directive> is not
a8ee031b2224ce5473826c9d4f603681589245fawrowe configured.</li>
a8ee031b2224ce5473826c9d4f603681589245fawrowe </ol>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<name>TraceEnable</name>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<description>Determines the behaviour on <code>TRACE</code>
a8ee031b2224ce5473826c9d4f603681589245fawrowerequests</description>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<syntax>TraceEnable <var>[on|off|extended]</var></syntax>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<default>TraceEnable on</default>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<contextlist><context>server config</context></contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<compatibility>Available in Apache 1.3.34, 2.0.55 and later</compatibility>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>This directive overrides the behavior of <code>TRACE</code> for both
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the core server and <module>mod_proxy</module>. The default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TraceEnable on</code> permits <code>TRACE</code> requests per
003f0c9fda6664daf5092a0e42f65ede20098153slive RFC 2616, which disallows any request body to accompany the request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TraceEnable off</code> causes the core server and
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <module>mod_proxy</module> to return a <code>405</code> (Method not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allowed) error to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Finally, for testing and diagnostic purposes only, request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive bodies may be allowed using the non-compliant <code>TraceEnable
2e5e2673cb64d3e4d445d911c6f61ac171020725nd extended</code> directive. The core (as an origin server) will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrict the request body to 64k (plus 8k for chunk headers if
733738e83a9b0113476e3f67992c2278d61ee4dakess <code>Transfer-Encoding: chunked</code> is used). The core will
733738e83a9b0113476e3f67992c2278d61ee4dakess reflect the full headers and all chunk headers with the response
2e5e2673cb64d3e4d445d911c6f61ac171020725nd body. As a proxy server, the request body is not restricted to 64k.</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</usage>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</directivesynopsis>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<directivesynopsis>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<name>UseCanonicalName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures how the server determines its own name and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndport</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>UseCanonicalName On|Off|DNS</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>UseCanonicalName Off</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In many situations Apache must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
003f0c9fda6664daf5092a0e42f65ede20098153slive 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With <code>UseCanonicalName Off</code> Apache will form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs using the hostname and port supplied by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a
206b5dce9e48924aa9f12ce87f14856a4cd3fb68takashi href="/vhosts/name-based.html">name based virtual hosts</a>,
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd constructed from the client supplied values as well.</p>
b6ab9bfd820e424c2e9544d629ae67af24e90dcerbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>An example where this may be useful is on an intranet server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd where you have users connecting to the machine using short
b6ab9bfd820e424c2e9544d629ae67af24e90dcerbowen names such as <code>www</code>. You'll notice that if the users
fff1d314f760fc17a49215e8818b3e57691efa43niq type a shortname, and a URL which is a directory, such as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>http://www/splat</code>, <em>without the trailing
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd slash</em> then Apache will redirect them to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>http://www.domain.com/splat/</code>. If you have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication enabled, this will cause the user to have to
fff1d314f760fc17a49215e8818b3e57691efa43niq authenticate twice (once for <code>www</code> and once again
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>UseCanonicalName</directive> is set <code>Off</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache will redirect to <code>http://www/splat/</code>.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is a third option, <code>UseCanonicalName DNS</code>,
e08ad1a326852610a7930269638a43657fc50d06sctemme which is intended for use with mass IP-based virtual hosting to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support ancient clients that do not provide a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header. With this option Apache does a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen they may be broken by this option. The client is essentially free
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen to give whatever value they want as a hostname. But if the CGI is
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen only using <code>SERVER_NAME</code> to construct self-referential URLs
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen then it should be just fine.</p>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen </note>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen</usage>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<seealso><directive module="core">ServerName</directive></seealso>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<seealso><directive module="mpm_common">Listen</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>UseCanonicalPhysicalPort</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Configures how the server determines its own name and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndport</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>UseCanonicalPhysicalPort On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>UseCanonicalPhysicalPort Off</default>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier<contextlist><context>server config</context><context>virtual host</context>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier<context>directory</context></contextlist>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier<usage>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <p>In many situations Apache must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalPhysicalPort On</code> Apache will, when
fb77c505254b6e9c925e23e734463e87574f8f40kess constructing the canonical port for the server to honor
e08ad1a326852610a7930269638a43657fc50d06sctemme the <directive module="core">UseCanonicalName</directive> directive,
e08ad1a326852610a7930269638a43657fc50d06sctemme provide the actual physical port number being used by this request
e08ad1a326852610a7930269638a43657fc50d06sctemme as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
e08ad1a326852610a7930269638a43657fc50d06sctemme Apache will not ever use the actual physical port number, instead
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relying on all configured information to construct a valid port number.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The ordering of when the physical port is used is as follows:<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalName On</code></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Port provided in <code>Servername</code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Physical port</li>
e08ad1a326852610a7930269638a43657fc50d06sctemme <li>Default port</li>
e08ad1a326852610a7930269638a43657fc50d06sctemme </ul>
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>UseCanonicalName Off | DNS</code>
e08ad1a326852610a7930269638a43657fc50d06sctemme <ul>
e08ad1a326852610a7930269638a43657fc50d06sctemme <li>Parsed port from <code>Host:</code> header</li>
e08ad1a326852610a7930269638a43657fc50d06sctemme <li>Physical port</li>
e08ad1a326852610a7930269638a43657fc50d06sctemme <li>Port provided in <code>Servername</code></li>
e08ad1a326852610a7930269638a43657fc50d06sctemme <li>Default port</li>
e08ad1a326852610a7930269638a43657fc50d06sctemme </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>With <code>UseCanonicalPhysicalPort Off</code>, the
29edaaeea24c41820e486944635348cd7fae1d11rbowen physical ports are removed from the ordering.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
e08ad1a326852610a7930269638a43657fc50d06sctemme<seealso><directive module="core">ServerName</directive></seealso>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<seealso><directive module="mpm_common">Listen</directive></seealso>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen</directivesynopsis>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<directivesynopsis type="section">
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<name>VirtualHost</name>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<description>Contains directives that apply only to a specific
226aaa3e29f938600cd1b9dfb6774588d831d036rbowenhostname or IP address</description>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<syntax>&lt;VirtualHost
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen ...&gt; ... &lt;/VirtualHost&gt;</syntax>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p><directive type="section">VirtualHost</directive> and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen directives that will apply only to a particular virtual host. Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive that is allowed in a virtual host context may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used. When the server receives a request for a document on a
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim particular virtual host, it uses the configuration directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enclosed in the <directive type="section">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section. <var>Addr</var> can be:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The IP address of the virtual host;</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>A fully qualified domain name for the IP address of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive virtual host (not recommended);</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The character <code>*</code>, which is used only in combination with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>NameVirtualHost *</code> to match all IP addresses; or</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The string <code>_default_</code>, which is used only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with IP virtual hosting to catch unmatched IP addresses.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost 10.1.2.3&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DocumentRoot /www/docs/host.example.com<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive ServerName host.example.com<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ErrorLog logs/host.example.com-error_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive TransferLog logs/host.example.com-access_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen the optional port number could not be determined otherwise. An
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen IPv6 example is shown below:</p>
fcc04773f0f2cc73650485facef9cd77f2d5bd65nd
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen <example>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerAdmin webmaster@host.example.com<br />
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen DocumentRoot /www/docs/host.example.com<br />
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen ServerName host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog logs/host.example.com-error_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive TransferLog logs/host.example.com-access_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Each Virtual Host must correspond to a different IP address,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different port number or a different host name for the server,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the former case the server machine must be configured to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accept IP packets for multiple addresses. (If the machine does
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not have multiple network interfaces, then this can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accomplished with the <code>ifconfig alias</code> command -- if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The use of <directive type="section">VirtualHost</directive> does
003f0c9fda6664daf5092a0e42f65ede20098153slive <strong>not</strong> affect what addresses Apache listens on. You
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may need to ensure that Apache is listening on the correct addresses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using <directive module="mpm_common">Listen</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When using IP-based virtual hosting, the special name
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>_default_</code> can be specified in
fb77c505254b6e9c925e23e734463e87574f8f40kess which case this virtual host will match any IP address that is
fb77c505254b6e9c925e23e734463e87574f8f40kess not explicitly listed in another virtual host. In the absence
ef8e89e090461194ecadd31e8796a2c51e0531a2kess of any <code>_default_</code> virtual host the "main" server config,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess consisting of all those definitions outside any VirtualHost
ef8e89e090461194ecadd31e8796a2c51e0531a2kess section, is used when no IP-match occurs.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can specify a <code>:port</code> to change the port that is
530eba85dbd41b8a0fa5255d3648d1440199a661slive matched. If unspecified then it defaults to the same port as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most recent <directive module="mpm_common">Listen</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive statement of the main server. You may also specify <code>:*</code>
530eba85dbd41b8a0fa5255d3648d1440199a661slive to match all ports on that address. (This is recommended when used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with <code>_default_</code>.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>A <directive module="core">ServerName</directive> should be
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz specified inside each <directive
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz type="section">VirtualHost</directive> block. If it is absent, the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <directive module="core">ServerName</directive> from the "main"
7b5535ed88e0f561b3bfb3330137bd804846afd4slive server configuration will be inherited.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
f35c904c3b359610a46e94fbb4ba8495b2338521slive <note type="warning"><title>Security</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the <a href="/misc/security_tips.html">security tips</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document for details on why your security could be compromised if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory where log files are stored is writable by anyone other
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive than the user that starts the server.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess </note>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</usage>
dc111bcea580da3da174c25be0fd7a8f22c86fe1jim<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/bind.html">Setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which addresses and ports Apache uses</a></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</modulesynopsis>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim