core.xml revision 8dca591cc6458886afb08bfe03a2daf19beb7d3a
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 httpd 2.1.5 and later.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenOn Windows from Apache httpd 2.3.3 and later.</compatibility>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<usage>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <p>This directive enables operating system specific optimizations for a
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic listening socket by the <directive>Protocol</directive>type.
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic The basic premise is for the kernel to not send a socket to the server
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic process until either data is received or an entire HTTP Request is buffered.
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic Only <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 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
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <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 <highlight language="config">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter nntp none
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier </highlight>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <p>The default protocol names are <code>https</code> for port 443
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier and <code>http</code> for all other ports. To specify another protocol
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier is being used with a listening port, add the <var>protocol</var>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier argument to the <directive module="mpm_common">Listen</directive>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna directive.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The default values on FreeBSD are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <highlight language="config">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaAcceptFilter http httpready
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorAcceptFilter https dataready
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </highlight>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna the kernel level. Once an entire request is received, the kernel then
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 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 <highlight language="config">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaAcceptFilter http data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaAcceptFilter https data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </highlight>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 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">
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe tcp(7)</a> man page.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>The default values on Windows are:</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <highlight language="config">
5ae609a8a09239d20f48a4a95c4f21b713995babwroweAcceptFilter http data
5ae609a8a09239d20f48a4a95c4f21b713995babwroweAcceptFilter https data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe </highlight>
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
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic transmission.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>On Windows, <code>none</code> uses accept() rather than AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe and will not recycle sockets between connections. This is useful for
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor network adapters with broken driver support, as well as some virtual
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna network providers such as vpn drivers, or spam, virus or spyware
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna filters.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<seealso><directive module="core">Protocol</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AcceptPathInfo</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Resources accept trailing pathname information</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AcceptPathInfo On|Off|Default</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AcceptPathInfo Default</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<context>virtual host</context><context>directory</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache httpd 2.0.30 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
fb77c505254b6e9c925e23e734463e87574f8f40kess non-existent file in an existing directory) will be accepted or
fb77c505254b6e9c925e23e734463e87574f8f40kess rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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
fb77c505254b6e9c925e23e734463e87574f8f40kess <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive>AcceptPathInfo</directive> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Off</code></dt><dd>A request will only be accepted if it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
fb77c505254b6e9c925e23e734463e87574f8f40kess a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive leading path component maps to a file that exists. The above
fb77c505254b6e9c925e23e734463e87574f8f40kess example <code>/test/here.html/more</code> will be accepted if
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Default</code></dt><dd>The treatment of requests with
fb77c505254b6e9c925e23e734463e87574f8f40kess trailing pathname information is determined by the <a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess href="/handler.html">handler</a> responsible for the request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The core handler for normal files defaults to rejecting
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="mod_cgi.html">cgi-script</a> and <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="mod_isapi.html">isapi-handler</a>, generally accept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATH_INFO</code> by default.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The primary purpose of the <code>AcceptPathInfo</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the request, so you can use the following configuration to enable
130d299c4b2b15be45532a176604c71fdc7bea5bnd such a script:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <highlight language="config">
130d299c4b2b15be45532a176604c71fdc7bea5bnd&lt;Files "mypaths.shtml"&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options +Includes
ef8e89e090461194ecadd31e8796a2c51e0531a2kess SetOutputFilter INCLUDES
130d299c4b2b15be45532a176604c71fdc7bea5bnd AcceptPathInfo On
130d299c4b2b15be45532a176604c71fdc7bea5bnd&lt;/Files&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AccessFileName</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Name of the distributed configuration file</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AccessFileName .htaccess</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>While processing a request the server looks for
003f0c9fda6664daf5092a0e42f65ede20098153slive the first existing configuration file from this list of names in
003f0c9fda6664daf5092a0e42f65ede20098153slive every directory of the path to the document, if distributed
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess configuration files are <a href="#allowoverride">enabled for that
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directory</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">AccessFileName .acl</highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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 <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory /&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd AllowOverride None
130d299c4b2b15be45532a176604c71fdc7bea5bnd&lt;/Directory&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </highlight>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><directive module="core">AllowOverride</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/configuring.html">Configuration Files</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen<name>AddDefaultCharset</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default charset parameter to be added when a response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecontent-type is <code>text/plain</code> or <code>text/html</code></description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AddDefaultCharset Off</default>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<contextlist><context>server config</context>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<context>virtual host</context><context>directory</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>.htaccess</context></contextlist>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies a default value for the media type
003f0c9fda6664daf5092a0e42f65ede20098153slive charset parameter (the name of a character encoding) to be added
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to a response if and only if the response's content-type is either
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>text/plain</code> or <code>text/html</code>. This should override
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding any charset specified in the body of the response via a <code>META</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding element, though the exact behavior is often dependent on the user's client
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding configuration. A setting of <code>AddDefaultCharset Off</code>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd disables this functionality. <code>AddDefaultCharset On</code> enables
a8ce9095d102e43fecb81093a132b90b9a227f78kess a default charset of <code>iso-8859-1</code>. Any other value is assumed
684f2a9a422185adda0692a1203c5ad6687fc5c5nd 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).
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding For example:</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <highlight language="config">AddDefaultCharset utf-8</highlight>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p><directive>AddDefaultCharset</directive> should only be used when all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the text resources to which it applies are known to be in that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd character encoding and it is too inconvenient to label their charset
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd individually. One such example is to add the charset parameter
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to resources containing generated content, such as legacy CGI
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding scripts, that might be vulnerable to cross-site scripting attacks
684f2a9a422185adda0692a1203c5ad6687fc5c5nd 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>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><directive module="mod_mime">AddCharset</directive></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<name>AllowEncodedSlashes</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Determines whether encoded path separators in URLs are allowed to
843a03fe0b138a4c1f64cb90a014e9417ac30691fieldingbe passed through</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowEncodedSlashes On|Off|NoDecode</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AllowEncodedSlashes Off</default>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<contextlist><context>server config</context><context>virtual host</context>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</contextlist>
9583adab6bc4b3758e41963c905d9dad9f067131nd<compatibility>Available in Apache httpd 2.0.46 and later.
77ead9e0262e4f08ec336d1a65b2edef7705c839ndNoDecode option available in 2.3.12 and later.</compatibility>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<usage>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
77ead9e0262e4f08ec336d1a65b2edef7705c839nd which contain encoded path separators (<code>%2F</code> for <code>/</code>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier and additionally <code>%5C</code> for <code>\</code> on according systems)
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier to be used in the path info.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>With the default value, <code>Off</code>, such URLs are refused
77ead9e0262e4f08ec336d1a65b2edef7705c839nd with a 404 (Not found) error.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>With the value <code>On</code>, such URLs are accepted, and encoded
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier slashes are decoded like all other encoded characters.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>With the value <code>NoDecode</code>, such URLs are accepted, but
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier encoded slashes are not decoded but left in their encoded state.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <note><title>Note</title>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>If encoded slashes are needed in path info, use of <code>NoDecode</code> is
77ead9e0262e4f08ec336d1a65b2edef7705c839nd strongly recommended as a security measure. Allowing slashes
77ead9e0262e4f08ec336d1a65b2edef7705c839nd to be decoded could potentially allow unsafe paths.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </note>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</usage>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<seealso><directive module="core">AcceptPathInfo</directive></seealso>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</directivesynopsis>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AllowOverride</name>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<description>Types of directives that are allowed in
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<code>.htaccess</code> files</description>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<syntax>AllowOverride All|None|<var>directive-type</var>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd[<var>directive-type</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier)</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context></contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When the server finds an <code>.htaccess</code> file (as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specified by <directive module="core">AccessFileName</directive>)
4ea161d94782fa56f4b36d496f35ff8577c43065covener it needs to know which directives declared in that file can override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive earlier configuration directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Only available in &lt;Directory&gt; sections</title>
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive>AllowOverride</directive> is valid only in
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Directory</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess sections specified without regular expressions, not in <directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess type="section" module="core">Location</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">DirectoryMatch</directive> or
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive type="section" module="core">Files</directive> sections.
10673857794a4b3d9568ca2d983722a87ed352f1rbowen </note>
fb77c505254b6e9c925e23e734463e87574f8f40kess
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>When this directive is set to <code>None</code> and <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">AllowOverrideList</directive> is set to
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code>None</code> <a href="#accessfilename">.htaccess</a> files are
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd completely ignored. In this case, the server will not even attempt
10673857794a4b3d9568ca2d983722a87ed352f1rbowen to read <code>.htaccess</code> files in the filesystem.</p>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>When this directive is set to <code>All</code>, then any
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directive which has the .htaccess <a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri href="directive-dict.html#Context">Context</a> is allowed in
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>.htaccess</code> files.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>directive-type</var> can be one of the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the authorization directives (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_dbm">AuthDBMGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="mod_authz_core">Require</directive>, <em>etc.</em>).</dd>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <dt>FileInfo</dt>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <dd>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz Allow use of the directives controlling document types
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl (<directive module="core">ErrorDocument</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_negotiation">LanguagePriority</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetHandler</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetInputFilter</directive>,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="core">SetOutputFilter</directive>, and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <module>mod_mime</module> Add* and Remove* directives),
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding document meta data (<directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_headers">Header</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_headers">RequestHeader</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_setenvif">SetEnvIf</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_setenvif">SetEnvIfNoCase</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_setenvif">BrowserMatch</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_usertrack">CookieExpires</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieDomain</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieStyle</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieTracking</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieName</directive>),
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <module>mod_rewrite</module> directives <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteEngine</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteOptions</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteBase</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteCond</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteRule</directive>) and
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive module="mod_actions">Action</directive> from
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <module>mod_actions</module>.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem </dd>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <dt>Indexes</dt>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <dd>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem Allow use of the directives controlling directory indexing
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">AddDescription</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">AddIcon</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">AddIconByEncoding</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">AddIconByType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">DefaultIcon</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_dir">DirectoryIndex</directive>, <a href="mod_autoindex.html#indexoptions.fancyindexing"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ><code>FancyIndexing</code></a>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">HeaderName</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">IndexIgnore</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">IndexOptions</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">ReadmeName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>etc.</em>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Limit</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling host access (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_access_compat">Allow</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_access_compat">Deny</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_access_compat">Order</directive>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Nonfatal=[Override|Unknown|All]</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <dd>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd Allow use of AllowOverride option to treat syntax errors in
9ed9eaf871c58d281af02e76125ceadb5060afa5nd .htaccess as non-fatal: instead of causing an Internal Server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Error, disallowed or unrecognised directives will be ignored
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna and a warning logged:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><strong>Nonfatal=Override</strong> treats directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive forbidden by AllowOverride as non-fatal.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><strong>Nonfatal=Unknown</strong> treats unknown directives
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna as non-fatal. This covers typos and directives implemented
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna by a module that's not present.</li>
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <li><strong>Nonfatal=All</strong> treats both the above as non-fatal.</li>
9970ad80054f477c708284a0d030a5bd26e412a9covener </ul>
9970ad80054f477c708284a0d030a5bd26e412a9covener <p>Note that a syntax error in a valid directive will still cause
9970ad80054f477c708284a0d030a5bd26e412a9covener an internal server error.</p>
9970ad80054f477c708284a0d030a5bd26e412a9covener <note type="warning"><title>Security</title>
9970ad80054f477c708284a0d030a5bd26e412a9covener Nonfatal errors may have security implications for .htaccess users.
9970ad80054f477c708284a0d030a5bd26e412a9covener For example, if AllowOverride disallows AuthConfig, users'
9970ad80054f477c708284a0d030a5bd26e412a9covener configuration designed to restrict access to a site will be disabled.
9970ad80054f477c708284a0d030a5bd26e412a9covener </note>
9970ad80054f477c708284a0d030a5bd26e412a9covener </dd>
9970ad80054f477c708284a0d030a5bd26e412a9covener
9970ad80054f477c708284a0d030a5bd26e412a9covener <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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_include">XBitHack</directive>).
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd An equal sign may be given followed by a comma (but no spaces)
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd separated lists of options that may be set using the <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">Options</directive> command.
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <note><title>Implicit disabling of Options</title>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>Even though the list of options that may be used in .htaccess files
da637bcae7b6e150470e701af29da5604a34a17erbowen can be limited with this directive, as long as any <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="core">Options</directive> directive is allowed any
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor other inherited option can be disabled by using the non-relative
da637bcae7b6e150470e701af29da5604a34a17erbowen syntax. In other words, this mechanism cannot force a specific option
da637bcae7b6e150470e701af29da5604a34a17erbowen to remain <em>set</em> while allowing any others to be set.
da637bcae7b6e150470e701af29da5604a34a17erbowen </p></note>
da637bcae7b6e150470e701af29da5604a34a17erbowen </dd>
da637bcae7b6e150470e701af29da5604a34a17erbowen </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7802d43d20007fa575e43b6ae77d5177ceffdb71sf <p>Example:</p>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
7802d43d20007fa575e43b6ae77d5177ceffdb71sf <highlight language="config">AllowOverride AuthConfig Indexes</highlight>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
86120957a14f91da0a1a103eaf4d7710b1dd9e2asf <p>In the example above all directives that are neither in the group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
113961f0559eb026ea0d379cb7350f82bc09d710druggeri server error.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <note><p>For security and performance reasons, do not set
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>AllowOverride</code> to anything other than <code>None</code>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
113961f0559eb026ea0d379cb7350f82bc09d710druggeri create) the <code>&lt;Directory&gt;</code> block that refers to the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directory where you're actually planning to place a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>.htaccess</code> file.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </note>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><directive module="core">AccessFileName</directive></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><directive module="core">AllowOverrideList</directive></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><a href="/configuring.html">Configuration Files</a></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<name>AllowOverrideList</name>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<description>Individual directives that are allowed in
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<code>.htaccess</code> files</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<syntax>AllowOverrideList None|<var>directive</var>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri[<var>directive-type</var>] ...</syntax>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<default>AllowOverrideList None</default>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>directory</context></contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>When the server finds an <code>.htaccess</code> file (as
113961f0559eb026ea0d379cb7350f82bc09d710druggeri specified by <directive module="core">AccessFileName</directive>)
113961f0559eb026ea0d379cb7350f82bc09d710druggeri it needs to know which directives declared in that file can override
113961f0559eb026ea0d379cb7350f82bc09d710druggeri earlier configuration directives.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <note><title>Only available in &lt;Directory&gt; sections</title>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive>AllowOverrideList</directive> is valid only in
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive type="section" module="core">Directory</directive>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri sections specified without regular expressions, not in <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri type="section" module="core">Location</directive>, <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri module="core" type="section">DirectoryMatch</directive> or
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive type="section" module="core">Files</directive> sections.
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </note>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>When this directive is set to <code>None</code> and <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri module="core">AllowOverride</directive> is set to <code>None</code>,
113961f0559eb026ea0d379cb7350f82bc09d710druggeri then <a href="#accessfilename">.htaccess</a> files are completely
113961f0559eb026ea0d379cb7350f82bc09d710druggeri ignored. In this case, the server will not even attempt to read
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>.htaccess</code> files in the filesystem.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Example:</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <highlight language="config">
113961f0559eb026ea0d379cb7350f82bc09d710druggeriAllowOverride None
113961f0559eb026ea0d379cb7350f82bc09d710druggeriAllowOverrideList Redirect RedirectMatch
113961f0559eb026ea0d379cb7350f82bc09d710druggeri </highlight>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>In the example above only the <code>Redirect</code> and
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>RedirectMatch</code> directives are allowed. All others will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause an internal server error.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveAllowOverride AuthConfig
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesAllowOverrideList CookieTracking CookieName
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes </highlight>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p>In the example above <directive module="core">AllowOverride
fb77c505254b6e9c925e23e734463e87574f8f40kess </directive> grants permission to the <code>AuthConfig</code>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes directive grouping and <directive>AllowOverrideList</directive> grants
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes permission to only two directves from the <code>FileInfo</code> directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes grouping. All others will cause an internal server error.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</usage>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<seealso><directive module="core">AccessFileName</directive></seealso>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><directive module="core">AllowOverride</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/configuring.html">Configuration Files</a></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<directivesynopsis>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<name>CGIMapExtension</name>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess<compatibility>NetWare only</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache httpd finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>CGIMapExtension sys:\foo.nlm .foo</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause all CGI script files with a <code>.foo</code> extension to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be passed to the FOO interpreter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ContentDigest</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables the generation of <code>Content-MD5</code> HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheaders</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ContentDigest On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>ContentDigest Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>Options</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<status>Experimental</status>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive enables the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive respectively RFC2616.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>MD5 is an algorithm for computing a "message digest"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (sometimes called "fingerprint") of arbitrary-length data, with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a high degree of confidence that any alterations in the data
fb77c505254b6e9c925e23e734463e87574f8f40kess will be reflected in alterations in the message digest.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code>Content-MD5</code> header provides an end-to-end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message integrity check (MIC) of the entity-body. A proxy or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client may check this header for detecting accidental
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modification of the entity-body in transit. Example header:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Note that this can cause performance problems on your server
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding since the message digest is computed on every request (the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding values are not cached).</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
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>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<name>DefaultRuntimeDir</name>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Base directory for the server run-time files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>DefaultRuntimeDir <var>directory-path</var></syntax>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<default>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</default>
e4881891552e185a7408318dfc7f62ebabe73cf6niq<contextlist><context>server config</context></contextlist>
e4881891552e185a7408318dfc7f62ebabe73cf6niq
e4881891552e185a7408318dfc7f62ebabe73cf6niq<usage>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>The <directive>DefaultRuntimeDir</directive> directive sets the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding directory in which the server will create various run-time files
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding (shared memory, locks, etc.). If set as a relative path, the full path
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding will be relative to <directive>ServerRoot</directive></p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p><strong>Example</strong></p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <highlight language="config">
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingDefaultRuntimeDir scratch/
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </highlight>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default location of <directive>DefaultRuntimeDir</directive> may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modified by changing the <code>DEFAULT_REL_RUNTIMEDIR</code> #define
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive at build time.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>Note: <directive>ServerRoot</directive> should be specified before this
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf directive is used, otherwise the default value of <directive>ServerRoot</directive>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf would be used to set the base directory.</p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</usage>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<seealso><a href="/misc/security_tips.html#serverroot">the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl security tips</a> for information on how to properly set
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf permissions on the <directive>ServerRoot</directive></seealso>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</directivesynopsis>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<directivesynopsis>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<name>DefaultType</name>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<description>This directive has no effect other than to emit warnings
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsfif the value is not <code>none</code>. In prior versions, DefaultType
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsfwould specify a default media type to assign to response content for
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsfwhich no other media type configuration could be found.
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</description>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<syntax>DefaultType <var>media-type|none</var></syntax>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<default>DefaultType none</default>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<contextlist><context>server config</context><context>virtual host</context>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<context>directory</context><context>.htaccess</context>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</contextlist>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<override>FileInfo</override>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<compatibility>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</compatibility>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<usage>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>This directive has been disabled. For backwards compatibility
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf of configuration files, it may be specified with the value
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf <code>none</code>, meaning no default media type. For example:</p>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf <highlight language="config">DefaultType None</highlight>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p><code>DefaultType None</code> is only available in
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl httpd-2.2.7 and later.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Use the mime.types configuration file and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_mime">AddType</directive> to configure media
898475b582dd849de5915df0f2089b72ed8b2e2bcovener type assignments via file extensions, or the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">ForceType</directive> directive to configure
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the media type for specific resources. Otherwise, the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive send the response without a Content-Type header field and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recipient may attempt to guess the media type.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener<name>Define</name>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Define a variable</description>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener<syntax>Define <var>parameter-name</var> [<var>parameter-value</var>]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>In its one parameter form, <directive>Define</directive> is equivalent
fb77c505254b6e9c925e23e734463e87574f8f40kess to passing the <code>-D</code> argument to <program>httpd</program>. It
003f0c9fda6664daf5092a0e42f65ede20098153slive can be used to toggle the use of
003f0c9fda6664daf5092a0e42f65ede20098153slive <directive module="core" type="section">IfDefine</directive> sections
003f0c9fda6664daf5092a0e42f65ede20098153slive without needing to alter <code>-D</code> arguments in any startup
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd scripts.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>In addition to that, if the second parameter is given, a config variable
130d299c4b2b15be45532a176604c71fdc7bea5bnd is set to this value. The variable can be used in the configuration using
130d299c4b2b15be45532a176604c71fdc7bea5bnd the <code>${VAR}</code> syntax. The variable is always globally defined
130d299c4b2b15be45532a176604c71fdc7bea5bnd and not limited to the scope of the surrounding config section.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;IfDefine TEST&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Define servername test.example.com
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/IfDefine&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;IfDefine !TEST&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Define servername www.example.com
fb77c505254b6e9c925e23e734463e87574f8f40kess Define SSL
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;/IfDefine&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen <p>Variable names may not contain colon ":" characters, to avoid clashes
030108b1816bcda3d925df65357feabdce83bc94slive with <directive module="mod_rewrite">RewriteMap</directive>'s syntax.</p>
030108b1816bcda3d925df65357feabdce83bc94slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>Directory</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enclose a group of directives that apply only to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndnamed file-system directory, sub-directories, and their contents.</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>&lt;Directory <var>directory-path</var>&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess... &lt;/Directory&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<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,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory, and the files within the respective
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories. Any directive that is allowed
130d299c4b2b15be45532a176604c71fdc7bea5bnd in a directory context may be used. <var>Directory-path</var> is
130d299c4b2b15be45532a176604c71fdc7bea5bnd either the full path to a directory, or a wild-card string using
130d299c4b2b15be45532a176604c71fdc7bea5bnd Unix shell-style matching. In a wild-card string, <code>?</code> matches
130d299c4b2b15be45532a176604c71fdc7bea5bnd any single character, and <code>*</code> matches any sequences of
130d299c4b2b15be45532a176604c71fdc7bea5bnd characters. You may also use <code>[]</code> character ranges. None
130d299c4b2b15be45532a176604c71fdc7bea5bnd of the wildcards match a `/' character, so <code>&lt;Directory
130d299c4b2b15be45532a176604c71fdc7bea5bnd /*/public_html&gt;</code> will not match
cdffd1263801c18587cefdebc4510df486d5906brbowen <code>/home/user/public_html</code>, but <code>&lt;Directory
130d299c4b2b15be45532a176604c71fdc7bea5bnd /home/*/public_html&gt;</code> will match. Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <highlight language="config">
130d299c4b2b15be45532a176604c71fdc7bea5bnd&lt;Directory "/usr/local/httpd/htdocs"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Options Indexes FollowSymLinks
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful with the <var>directory-path</var> arguments:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive They have to literally match the filesystem path which Apache httpd uses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to access the files. Directives applied to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory&gt;</code> will not apply to files accessed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that same directory via a different path, such as via different symbolic
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><glossary ref="regex">Regular
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess expressions</glossary> can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</highlight>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>would match directories in <code>/www/</code> that consisted of
130d299c4b2b15be45532a176604c71fdc7bea5bnd three numbers.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>If multiple (non-regular expression) <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section">Directory</directive> sections
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd match the directory (or one of its parents) containing a document,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then the directives are applied in the order of shortest match
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess first, interspersed with the directives from the <a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess href="#accessfilename">.htaccess</a> files. For example,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess with</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <highlight language="config">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess&lt;Directory /&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;/Directory&gt;
4e10c61d7f924071cad435df940a8f325015b2d3rbowen
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;Directory "/home"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride FileInfo
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>for access to the document <code>/home/web/dir/doc.html</code>
130d299c4b2b15be45532a176604c71fdc7bea5bnd the steps are:</p>
4e10c61d7f924071cad435df940a8f325015b2d3rbowen
130d299c4b2b15be45532a176604c71fdc7bea5bnd <ul>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>Apply directive <code>AllowOverride None</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (disabling <code>.htaccess</code> files).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory <code>/home</code>).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>Apply any <code>FileInfo</code> directives in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/home/web/dir/.htaccess</code> in that order.</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Regular expressions are not considered until after all of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal sections have been applied. Then all of the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions are tested in the order they appeared in the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess configuration file. For example, with</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory ~ "abc$"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ... directives here ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>the regular expression section won't be considered until after
898475b582dd849de5915df0f2089b72ed8b2e2bcovener all normal <directive type="section">Directory</directive>s and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>.htaccess</code> files have been applied. Then the regular
7b5535ed88e0f561b3bfb3330137bd804846afd4slive expression will match on <code>/home/abc/public_html/abc</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the corresponding <directive type="section">Directory</directive> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be applied.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note that the default access for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory /&gt;</code> is to permit all access.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This means that Apache httpd will serve any file mapped from an URL. It is
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor recommended that you change this with a block such
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor as</strong></p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <highlight language="config">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;Directory /&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require all denied
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen&lt;/Directory&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>want</em> accessible. See the <a
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener href="/misc/security_tips.html">Security Tips</a> page for more
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener details.</strong></p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>The directory sections occur in the <code>httpd.conf</code> file.
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <directive type="section">Directory</directive> directives
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener cannot nest, and cannot appear in a <directive module="core"
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener type="section">Limit</directive> or <directive module="core"
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener type="section">LimitExcept</directive> section.</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener</usage>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<seealso><a href="/sections.html">How &lt;Directory&gt;,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor explanation of how these different sections are combined when a
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener request is received</seealso>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>DirectoryMatch</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Enclose directives that apply to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe contents of file-system directories matching a regular expression.</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess... &lt;/DirectoryMatch&gt;</syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">DirectoryMatch</directive> and
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of directives which will apply only to the named directory (and the files within),
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the same as <directive module="core" type="section">Directory</directive>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive However, it takes as an argument a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <glossary ref="regex">regular expression</glossary>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd # ...
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;/DirectoryMatch&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess</highlight>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match directories in <code>/www/</code> that consisted of three
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd numbers.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Compatability</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Prior to 2.3.9, this directive implicitly applied to sub-directories
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (like <directive module="core" type="section">Directory</directive>) and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive could not match the end of line symbol ($). In 2.3.9 and later,
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick only directories that match the expression are affected by the enclosed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </note>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Trailing Slash</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This directive applies to requests for directories that may or may
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not end in a trailing slash, so expressions that are anchored to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive end of line ($) must be written with care.
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen </note>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive type="section" module="core">Directory</directive> for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea description of how regular expressions are mixed in with normal
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directive type="section">Directory</directive>s</seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a
6b15044d54a096e6323ff1540f1a491e8de7622dsfhref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;Files&gt; sections work</a> for an explanation of how these different
6b15044d54a096e6323ff1540f1a491e8de7622dsfsections are combined when a request is received</seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<name>DocumentRoot</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Directory that forms the main document tree visible
6b15044d54a096e6323ff1540f1a491e8de7622dsffrom the web</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>DocumentRoot <var>directory-path</var></syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<default>DocumentRoot /usr/local/apache/htdocs</default>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive sets the directory from which <program>httpd</program>
6b15044d54a096e6323ff1540f1a491e8de7622dsf will serve files. Unless matched by a directive like <directive
6b15044d54a096e6323ff1540f1a491e8de7622dsf module="mod_alias">Alias</directive>, the server appends the
6b15044d54a096e6323ff1540f1a491e8de7622dsf path from the requested URL to the document root to make the
6b15044d54a096e6323ff1540f1a491e8de7622dsf path to the document. Example:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <highlight language="config">DocumentRoot "/usr/web"</highlight>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>then an access to
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>http://my.example.com/index.html</code> refers to
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
6b15044d54a096e6323ff1540f1a491e8de7622dsf not absolute then it is assumed to be relative to the <directive
6b15044d54a096e6323ff1540f1a491e8de7622dsf module="core">ServerRoot</directive>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <directive>DocumentRoot</directive> should be specified without
6b15044d54a096e6323ff1540f1a491e8de7622dsf a trailing slash.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
6b15044d54a096e6323ff1540f1a491e8de7622dsfLocations</a></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis type="section">
6b15044d54a096e6323ff1540f1a491e8de7622dsf<name>Else</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Contains directives that apply only if the condition of a
6b15044d54a096e6323ff1540f1a491e8de7622dsfprevious <directive type="section" module="core">If</directive> or
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directive type="section" module="core">ElseIf</directive> section is not
6b15044d54a096e6323ff1540f1a491e8de7622dsfsatisfied by a request at runtime</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>&lt;Else&gt; ... &lt;/Else&gt;</syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<context>directory</context><context>.htaccess</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<override>All</override>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <directive type="section">Else</directive> applies the enclosed
6b15044d54a096e6323ff1540f1a491e8de7622dsf directives if and only if the most recent
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">If</directive> or
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">ElseIf</directive> section
6b15044d54a096e6323ff1540f1a491e8de7622dsf in the same scope has not been applied.
6b15044d54a096e6323ff1540f1a491e8de7622dsf For example: In </p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <highlight language="config">
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;If "-z req('Host')"&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf # ...
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;/If&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;Else&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf # ...
6b15044d54a096e6323ff1540f1a491e8de7622dsf&lt;/Else&gt;
6b15044d54a096e6323ff1540f1a491e8de7622dsf </highlight>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p> The <directive type="section">If</directive> would match HTTP/1.0
6b15044d54a096e6323ff1540f1a491e8de7622dsf requests without a <var>Host:</var> header and the
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">Else</directive> would match requests
6b15044d54a096e6323ff1540f1a491e8de7622dsf with a <var>Host:</var> header.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><directive type="section" module="core">If</directive></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><directive type="section" module="core">ElseIf</directive></seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
6b15044d54a096e6323ff1540f1a491e8de7622dsf &lt;Files&gt; sections work</a> for an explanation of how these
6b15044d54a096e6323ff1540f1a491e8de7622dsf different sections are combined when a request is received.
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">If</directive>,
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">ElseIf</directive>, and
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive type="section">Else</directive> are applied last.</seealso>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis type="section">
6b15044d54a096e6323ff1540f1a491e8de7622dsf<name>ElseIf</name>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>Contains directives that apply only if a condition is satisfied
6b15044d54a096e6323ff1540f1a491e8de7622dsfby a request at runtime while the condition of a previous
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directive type="section" module="core">If</directive> or
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directive type="section">ElseIf</directive> section is not
6b15044d54a096e6323ff1540f1a491e8de7622dsfsatisfied</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>&lt;ElseIf <var>expression</var>&gt; ... &lt;/ElseIf&gt;</syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<context>directory</context><context>.htaccess</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<override>All</override>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<usage>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>The <directive type="section">ElseIf</directive> applies the enclosed
003f0c9fda6664daf5092a0e42f65ede20098153slive directives if and only if both the given condition evaluates to true and
fb77c505254b6e9c925e23e734463e87574f8f40kess the most recent <directive type="section">If</directive> or
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section">ElseIf</directive> section in the same scope has
af18698b10b429b270551ca3a5d51a75e1c9db22brianp not been applied. For example: In </p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <highlight language="config">
003f0c9fda6664daf5092a0e42f65ede20098153slive&lt;If "-R '10.1.0.0/16'"&gt;
af18698b10b429b270551ca3a5d51a75e1c9db22brianp #...
af18698b10b429b270551ca3a5d51a75e1c9db22brianp&lt;/If&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd&lt;ElseIf "-R '10.0.0.0/8'"&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive #...
003f0c9fda6664daf5092a0e42f65ede20098153slive&lt;/ElseIf&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;Else&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen #...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Else&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>The <directive type="section">ElseIf</directive> would match if
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the remote address of a request belongs to the subnet 10.0.0.0/8 but
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd not to the subnet 10.1.0.0/16.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp</usage>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<seealso><a href="/expr.html">Expressions in Apache HTTP Server</a>,
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirierfor a complete reference and more examples.</seealso>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<seealso><directive type="section" module="core">If</directive></seealso>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<seealso><directive type="section" module="core">Else</directive></seealso>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
af18698b10b429b270551ca3a5d51a75e1c9db22brianp &lt;Files&gt; sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">If</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">ElseIf</directive>, and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">Else</directive> are applied last.</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<directivesynopsis>
41ef8b3051855b802104193ee0a587515af60a37wrowe<name>EnableMMAP</name>
41ef8b3051855b802104193ee0a587515af60a37wrowe<description>Use memory-mapping to read files during delivery</description>
41ef8b3051855b802104193ee0a587515af60a37wrowe<syntax>EnableMMAP On|Off</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>EnableMMAP On</default>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<context>directory</context><context>.htaccess</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe<override>FileInfo</override>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This directive controls whether the <program>httpd</program> may use
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-mapping if it needs to read the contents of a file during
41ef8b3051855b802104193ee0a587515af60a37wrowe 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 httpd
fb77c505254b6e9c925e23e734463e87574f8f40kess memory-maps the file if the OS supports it.</p>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This memory-mapping sometimes yields a performance improvement.
41ef8b3051855b802104193ee0a587515af60a37wrowe But in some environments, it is better to disable the memory-mapping
41ef8b3051855b802104193ee0a587515af60a37wrowe to prevent operational problems:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <ul>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <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>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd has it memory-mapped can cause <program>httpd</program> to
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd crash with a segmentation fault.
41ef8b3051855b802104193ee0a587515af60a37wrowe </li>
41ef8b3051855b802104193ee0a587515af60a37wrowe </ul>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>For server configurations that are vulnerable to these problems,
41ef8b3051855b802104193ee0a587515af60a37wrowe you should disable memory-mapping of delivered files by specifying:</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <highlight language="config">EnableMMAP Off</highlight>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>For NFS mounted files, this feature may be disabled explicitly for
41ef8b3051855b802104193ee0a587515af60a37wrowe the offending files by specifying:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <highlight language="config">
41ef8b3051855b802104193ee0a587515af60a37wrowe&lt;Directory "/path-to-nfs-files"&gt;
9fb925624300c864fe3969a264e52aa83f3c2dd0slive EnableMMAP Off
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;/Directory&gt;
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley </highlight>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley</usage>
2025fe01de41805f6148851335693aa5ebe2faffnd</directivesynopsis>
2025fe01de41805f6148851335693aa5ebe2faffnd
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<directivesynopsis>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<name>EnableSendfile</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Use the kernel sendfile support to deliver files to the client</description>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<syntax>EnableSendfile On|Off</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>EnableSendfile Off</default>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf<context>directory</context><context>.htaccess</context>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe<override>FileInfo</override>
41ef8b3051855b802104193ee0a587515af60a37wrowe<compatibility>Available in version 2.0.44 and later. Default changed to Off in
9c233808c898095865fcc0a2dc1cf594d0d8faf3sfversion 2.3.9.</compatibility>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <p>This directive controls whether <program>httpd</program> may use the
9fb925624300c864fe3969a264e52aa83f3c2dd0slive sendfile support from the kernel to transmit file contents to the client.
41ef8b3051855b802104193ee0a587515af60a37wrowe By default, when the handling of a request requires no access
41ef8b3051855b802104193ee0a587515af60a37wrowe to the data within a file -- for example, when delivering a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess static file -- Apache httpd uses sendfile to deliver the file contents
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess without ever reading the file if the OS supports it.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This sendfile mechanism avoids separate read and send operations,
41ef8b3051855b802104193ee0a587515af60a37wrowe and buffer allocations. But on some platforms or within some
41ef8b3051855b802104193ee0a587515af60a37wrowe filesystems, it is better to disable this feature to avoid
832853bb93c1831daf24e4727c5ca0e1b1786e83lars operational problems:</p>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <ul>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <li>Some platforms may have broken sendfile support that the build
832853bb93c1831daf24e4727c5ca0e1b1786e83lars system did not detect, especially if the binaries were built on
832853bb93c1831daf24e4727c5ca0e1b1786e83lars another box and moved to such a machine with broken sendfile
af18698b10b429b270551ca3a5d51a75e1c9db22brianp support.</li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <li>On Linux the use of sendfile triggers TCP-checksum
af18698b10b429b270551ca3a5d51a75e1c9db22brianp offloading bugs on certain networking cards when using IPv6.</li>
79c754eb51681c3389cd966753e902c429f78939trawick <li>On Linux on Itanium, <code>sendfile</code> may be unable to handle
79c754eb51681c3389cd966753e902c429f78939trawick files over 2GB in size.</li>
79c754eb51681c3389cd966753e902c429f78939trawick <li>With a network-mounted <directive
79c754eb51681c3389cd966753e902c429f78939trawick module="core">DocumentRoot</directive> (e.g., NFS, SMB, CIFS, FUSE),
79c754eb51681c3389cd966753e902c429f78939trawick the kernel may be unable to serve the network file through
79c754eb51681c3389cd966753e902c429f78939trawick its own cache.</li>
79c754eb51681c3389cd966753e902c429f78939trawick </ul>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <p>For server configurations that are not vulnerable to these problems,
79c754eb51681c3389cd966753e902c429f78939trawick you may enable this feature by specifying:</p>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <highlight language="config">EnableSendfile On</highlight>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <p>For network mounted files, this feature may be disabled explicitly
79c754eb51681c3389cd966753e902c429f78939trawick for the offending files by specifying:</p>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <highlight language="config">
79c754eb51681c3389cd966753e902c429f78939trawick&lt;Directory "/path-to-nfs-files"&gt;
79c754eb51681c3389cd966753e902c429f78939trawick EnableSendfile Off
79c754eb51681c3389cd966753e902c429f78939trawick&lt;/Directory&gt;
79c754eb51681c3389cd966753e902c429f78939trawick </highlight>
79c754eb51681c3389cd966753e902c429f78939trawick <p>Please note that the per-directory and .htaccess configuration
79c754eb51681c3389cd966753e902c429f78939trawick of <directive>EnableSendfile</directive> is not supported by
79c754eb51681c3389cd966753e902c429f78939trawick <module>mod_cache_disk</module>.
79c754eb51681c3389cd966753e902c429f78939trawick Only global definition of <directive>EnableSendfile</directive>
79c754eb51681c3389cd966753e902c429f78939trawick is taken into account by the module.
79c754eb51681c3389cd966753e902c429f78939trawick </p>
79c754eb51681c3389cd966753e902c429f78939trawick</usage>
79c754eb51681c3389cd966753e902c429f78939trawick</directivesynopsis>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick<directivesynopsis>
79c754eb51681c3389cd966753e902c429f78939trawick<name>Error</name>
79c754eb51681c3389cd966753e902c429f78939trawick<description>Abort configuration parsing with a custom error message</description>
79c754eb51681c3389cd966753e902c429f78939trawick<syntax>Error <var>message</var></syntax>
79c754eb51681c3389cd966753e902c429f78939trawick<contextlist><context>server config</context><context>virtual host</context>
79c754eb51681c3389cd966753e902c429f78939trawick<context>directory</context><context>.htaccess</context>
79c754eb51681c3389cd966753e902c429f78939trawick</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>2.3.9 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If an error can be detected within the configuration, this
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive can be used to generate a custom error message, and halt
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration parsing. The typical use is for reporting required
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modules which are missing from the configuration.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive# Example
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive# ensure that mod_include is loaded
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;IfModule !include_module&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Error "mod_include is required by mod_foo. Load it with LoadModule."
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfModule&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive# ensure that exactly one of SSL,NOSSL is defined
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;IfDefine SSL&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;IfDefine NOSSL&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Error "Both SSL and NOSSL are defined. Define only one of them."
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;IfDefine !SSL&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;IfDefine !NOSSL&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Error "Either SSL or NOSSL must be defined."
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<name>ErrorDocument</name>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<description>What the server will return to the client
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslivein case of an error</description>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the event of a problem or error, Apache httpd can be configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to do one of four things,</p>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <ol>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>output a simple hardcoded error message</li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>output a customized message</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to a local <var>URL-path</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff problem/error</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>redirect to an external <var>URL</var> to handle the
f7fe99050600166042c04b8e595fb75499eed7f0geoff problem/error</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff </ol>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>The first option is the default, while options 2-4 are
f7fe99050600166042c04b8e595fb75499eed7f0geoff configured using the <directive>ErrorDocument</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, which is followed by the HTTP response code and a URL
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or a message. Apache httpd will sometimes offer additional information
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen regarding the problem/error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>URLs can begin with a slash (/) for local web-paths (relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <directive module="core">DocumentRoot</directive>), or be a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive full URL which the client can resolve. Alternatively, a message
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be provided to be displayed by the browser. Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 500 http://foo.example.com/cgi-bin/tester
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 404 /cgi-bin/bad_urls.pl
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 401 /subscription_info.html
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessErrorDocument 403 "Sorry can't allow you access today"
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorDocument 403 Forbidden!
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Additionally, the special value <code>default</code> can be used
fb77c505254b6e9c925e23e734463e87574f8f40kess to specify Apache httpd's simple hardcoded message. While not required
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive under normal circumstances, <code>default</code> will restore
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive Apache httpd's simple hardcoded message for configurations that would
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive otherwise inherit an existing <directive>ErrorDocument</directive>.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
fb77c505254b6e9c925e23e734463e87574f8f40kess <highlight language="config">
fb77c505254b6e9c925e23e734463e87574f8f40kessErrorDocument 404 /cgi-bin/bad_urls.pl
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive&lt;Directory /web/docs&gt;
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive ErrorDocument 404 default
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive&lt;/Directory&gt;
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive </highlight>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>Note that when you specify an <directive>ErrorDocument</directive>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive that points to a remote URL (ie. anything with a method such as
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen client to tell it where to find the document, even if the
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen document ends up being on the same server. This has several
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen implications, the most important being that the client will not
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen receive the original error status code, but instead will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive a redirect status code. This in turn can confuse web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive robots and other clients which try to determine if a URL is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive valid using the status code. In addition, if you use a remote
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL in an <code>ErrorDocument 401</code>, the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive know to prompt the user for a password since it will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the 401 status code. Therefore, <strong>if you use an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ErrorDocument 401</code> directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</strong></p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Microsoft Internet Explorer (MSIE) will by default ignore
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh server-generated error messages when they are "too small" and substitute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own "friendly" error messages. The size threshold varies depending on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the type of error, but in general, if you make your error document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive greater than 512 bytes, then MSIE will show the server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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"
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor >Q294807</a>.</p>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>Although most error messages can be overridden, there are certain
fb109b84906e3ee61680aa289953c2f9e859354erbowen circumstances where the internal messages are used regardless of the
fb109b84906e3ee61680aa289953c2f9e859354erbowen setting of <directive module="core">ErrorDocument</directive>. In
fb109b84906e3ee61680aa289953c2f9e859354erbowen particular, if a malformed request is detected, normal request processing
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess will be immediately halted and the internal error message returned.
fb109b84906e3ee61680aa289953c2f9e859354erbowen This is necessary to guard against security problems caused by
960188481b7025ac8ef7221b67af83dd27e46cd0rjung bad requests.</p>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using mod_proxy, you may wish to enable
fb109b84906e3ee61680aa289953c2f9e859354erbowen <directive module="mod_proxy">ProxyErrorOverride</directive> so that you can provide
fb109b84906e3ee61680aa289953c2f9e859354erbowen custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
fb109b84906e3ee61680aa289953c2f9e859354erbowen Apache httpd will not generate custom error documents for proxied content.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen</usage>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
960188481b7025ac8ef7221b67af83dd27e46cd0rjung<seealso><a href="/custom-error.html">documentation of
960188481b7025ac8ef7221b67af83dd27e46cd0rjung customizable responses</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ErrorLog</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Location where the server will log errors</description>
5155e92c6100b47513159eee1b2b9914ab204a5acovener<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
5155e92c6100b47513159eee1b2b9914ab204a5acovener<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
5155e92c6100b47513159eee1b2b9914ab204a5acovener<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen<usage>
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>The <directive>ErrorLog</directive> directive sets the name of
fb109b84906e3ee61680aa289953c2f9e859354erbowen the file to which the server will log any errors it encounters. If
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <var>file-path</var> is not absolute then it is assumed to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to the <directive module="core">ServerRoot</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <highlight language="config">ErrorLog "/var/log/httpd/error_log"</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <p>If the <var>file-path</var>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes begins with a pipe character "<code>|</code>" then it is assumed to be a
d950cf9262224a223e2ff5c51393708071e14b94covener command to spawn to handle the error log.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <highlight language="config">ErrorLog "|/usr/local/bin/httpd_errors"</highlight>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the notes on <a href="/logs.html#piped">piped logs</a> for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive more information.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using <code>syslog</code> instead of a filename enables logging
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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). The facility is effectively global, and if it is changed
e302f38fd646764ce1a1e1c578d794aef514a9e5sf in individual virtual hosts, the final facility specified affects the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf entire server.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <highlight language="config">ErrorLog syslog:user</highlight>
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 slashes are used even though the platform
e302f38fd646764ce1a1e1c578d794aef514a9e5sf may allow the use of back slashes. In general it is a good idea to always
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis use forward slashes throughout the configuration files.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </note>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<seealso><directive module="core">LogLevel</directive></seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<seealso><a href="/logs.html">Apache HTTP Server Log Files</a></seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>ErrorLogFormat</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Format specification for error log entries</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax> ErrorLogFormat [connection|request] <var>format</var></syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<compatibility>Available in Apache httpd 2.3.9 and later</compatibility>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p><directive>ErrorLogFormat</directive> allows to specify what
e302f38fd646764ce1a1e1c578d794aef514a9e5sf supplementary information is logged in the error log in addition to the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf actual log message.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <highlight language="config">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf#Simple example
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsfErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf </highlight>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <p>Specifying <code>connection</code> or <code>request</code> as first
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf parameter allows to specify additional formats, causing additional
e302f38fd646764ce1a1e1c578d794aef514a9e5sf information to be logged when the first message is logged for a specific
e302f38fd646764ce1a1e1c578d794aef514a9e5sf connection or request, respectively. This additional information is only
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf logged once per connection/request. If a connection or request is processed
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf without causing any log message, the additional information is not logged
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf either.</p>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <p>It can happen that some format string items do not produce output. For
e302f38fd646764ce1a1e1c578d794aef514a9e5sf example, the Referer header is only present if the log message is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf associated to a request and the log message happens at a time when the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Referer header has already been read from the client. If no output is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf produced, the default behavior is to delete everything from the preceding
e302f38fd646764ce1a1e1c578d794aef514a9e5sf space character to the next space character. This means the log line is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf implicitly divided into fields on non-whitespace to whitespace transitions.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf If a format string item does not produce output, the whole field is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf omitted. For example, if the remote address <code>%a</code> in the log
e302f38fd646764ce1a1e1c578d794aef514a9e5sf format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
e302f38fd646764ce1a1e1c578d794aef514a9e5sf brackets are not logged either. Space characters can be escaped with a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf backslash to prevent them from delimiting a field. The combination '%&nbsp;'
e302f38fd646764ce1a1e1c578d794aef514a9e5sf (percent space) is a zero-witdh field delimiter that does not produce any
e302f38fd646764ce1a1e1c578d794aef514a9e5sf output.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The above behavior can be changed by adding modifiers to the format
e302f38fd646764ce1a1e1c578d794aef514a9e5sf string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
4497075b5e08b0c8ee89425a1758258ae80550fcsf respective item does not produce any output. In once-per-connection/request
4497075b5e08b0c8ee89425a1758258ae80550fcsf formats, it is also possible to use the <code>+</code> (plus) modifier. If an
4497075b5e08b0c8ee89425a1758258ae80550fcsf item with the plus modifier does not produce any output, the whole line is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf omitted.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>A number as modifier can be used to assign a log severity level to a
e302f38fd646764ce1a1e1c578d794aef514a9e5sf format item. The item will only be logged if the severity of the log
e302f38fd646764ce1a1e1c578d794aef514a9e5sf message is not higher than the specified log severity level. The number can
e302f38fd646764ce1a1e1c578d794aef514a9e5sf range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>For example, here's what would happen if you added modifiers to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf the <code>%{Referer}i</code> token, which logs the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>Referer</code> request header.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <table border="1" style="zebra">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <columnspec><column width=".3"/><column width=".7"/></columnspec>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><th>Modified Token</th><th>Meaning</th></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td><code>%-{Referer}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td><code>%+{Referer}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Omits the entire line if <code>Referer</code> is not set.</td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td><code>%4{Referer}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Logs the <code>Referer</code> only if the log message severity
e302f38fd646764ce1a1e1c578d794aef514a9e5sf is higher than 4.</td>
4497075b5e08b0c8ee89425a1758258ae80550fcsf </tr>
4497075b5e08b0c8ee89425a1758258ae80550fcsf
4497075b5e08b0c8ee89425a1758258ae80550fcsf </table>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Some format string items accept additional parameters in braces.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <table border="1" style="zebra">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <columnspec><column width=".2"/><column width=".8"/></columnspec>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf <tr><th>Format&nbsp;String</th> <th>Description</th></tr>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf <tr><td><code>%%</code></td>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf <td>The percent sign</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%a</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Client IP address and port of the request</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%{c}a</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Underlying peer IP address and port of the connection (see the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <module>mod_remoteip</module> module)</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%A</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Local IP-address and port</td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <tr><td><code>%{<em>name</em>}e</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>Request environment variable <em>name</em></td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <tr><td><code>%E</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>APR/OS error status code and string</td></tr>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <tr><td><code>%F</code></td>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <td>Source file name and line number of the log call</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%{<em>name</em>}i</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Request header <em>name</em></td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%k</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Number of keep-alive requests on this connection</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%l</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Loglevel of the message</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the request</td></tr>
ce4dc40a4e87991087488f70d96d3447d7557294sf
ce4dc40a4e87991087488f70d96d3447d7557294sf <tr><td><code>%{c}L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the connection</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <tr><td><code>%{C}L</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%m</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Name of the module logging the message</td></tr>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%M</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>The actual log message</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%{<em>name</em>}n</code></td>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <td>Request note <em>name</em></td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%P</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Process ID of current process</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%T</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>Thread ID of current thread</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%{g}T</code></td>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <td>System unique thread ID of current thread (the same ID as
e302f38fd646764ce1a1e1c578d794aef514a9e5sf displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <tr><td><code>%t</code></td>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <td>The current time</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <tr><td><code>%{u}t</code></td>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <td>The current time including micro-seconds</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <tr><td><code>%{cu}t</code></td>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <td>The current time in compact ISO 8601 format, including
a8ee031b2224ce5473826c9d4f603681589245fawrowe micro-seconds</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <tr><td><code>%v</code></td>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td>The canonical <directive module="core">ServerName</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of the current server.</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <tr><td><code>%V</code></td>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <td>The server name of the server serving the request according to the
a8ee031b2224ce5473826c9d4f603681589245fawrowe <directive module="core" >UseCanonicalName</directive>
a8ee031b2224ce5473826c9d4f603681589245fawrowe setting.</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <tr><td><code>\&nbsp;</code> (backslash space)</td>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <td>Non-field delimiting space</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
34b157732214cedcd129cd9fe7c4290757505d60minfrin <tr><td><code>%&nbsp;</code> (percent space)</td>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td>Field delimiter (no output)</td></tr>
a8ee031b2224ce5473826c9d4f603681589245fawrowe </table>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The log ID format <code>%L</code> produces a unique id for a connection
a8ee031b2224ce5473826c9d4f603681589245fawrowe or request. This can be used to correlate which log lines belong to the
02c86afa991026c4146423dc84bc126e57d28df6wrowe same connection or request, which request happens on which connection.
34b157732214cedcd129cd9fe7c4290757505d60minfrin A <code>%L</code> format string is also available in
34b157732214cedcd129cd9fe7c4290757505d60minfrin <module>mod_log_config</module>, to allow to correlate access log entries
34b157732214cedcd129cd9fe7c4290757505d60minfrin with error log lines. If <module>mod_unique_id</module> is loaded, its
34b157732214cedcd129cd9fe7c4290757505d60minfrin unique id will be used as log ID for requests.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive#Example (default format)
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
003f0c9fda6664daf5092a0e42f65ede20098153slive </highlight>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This would result in error messages such as:</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Notice that, as discussed above, some fields are omitted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive entirely because they are not defined.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
fb77c505254b6e9c925e23e734463e87574f8f40kess#Example (similar to the 2.2.x format)
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covenerErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
fb77c505254b6e9c925e23e734463e87574f8f40kess </highlight>
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess <highlight language="config">
fb77c505254b6e9c925e23e734463e87574f8f40kess#Advanced example with request/connection log IDs
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
530eba85dbd41b8a0fa5255d3648d1440199a661sliveErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
530eba85dbd41b8a0fa5255d3648d1440199a661sliveErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
530eba85dbd41b8a0fa5255d3648d1440199a661slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ErrorLog</directive></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><directive module="core">LogLevel</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/logs.html">Apache HTTP Server Log Files</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>ExtendedStatus</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Keep track of extended status information for each
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndrequest</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ExtendedStatus On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ExtendedStatus Off[*]</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This option tracks additional data per worker about the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd currently executing request, and a utilization summary; you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can see these variables during runtime by configuring
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <module>mod_status</module>. Note that other modules may
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rely on this scoreboard.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This setting applies to the entire server, and cannot be
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem enabled or disabled on a virtualhost-by-virtualhost basis.
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem The collection of extended status information can slow down
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem the server. Also note that this setting cannot be changed
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem during a graceful restart.</p>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <note>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <p>Note that loading <module>mod_status</module> will change
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem the default behavior to ExtendedStatus On, while other
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener third party modules may do the same. Such modules rely on
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor collecting detailed information about the state of all workers.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor The default is changed by <module>mod_status</module> beginning
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener with version 2.3.6; the previous default was always Off.</p>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener </note>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>FileETag</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>File attributes used to create the ETag
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndHTTP response header for static files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>FileETag <var>component</var> ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>FileETag MTime Size</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>The default used to be "INode&nbsp;MTime&nbsp;Size" in 2.3.14 and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckessearlier.</compatibility>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess The <directive>FileETag</directive> directive configures the file
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess attributes that are used to create the <code>ETag</code> (entity
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tag) response header field when the document is based on a static file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (The <code>ETag</code> value is used in cache management to save
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network bandwidth.) The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>FileETag</directive> directive allows you to choose
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which of these -- if any -- should be used. The recognized keywords are:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>INode</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The file's i-node number will be included in the calculation</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>MTime</strong></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>The date and time the file was last modified will be included</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><strong>Size</strong></dt>
030108b1816bcda3d925df65357feabdce83bc94slive <dd>The number of bytes in the file will be included</dd>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><strong>All</strong></dt>
030108b1816bcda3d925df65357feabdce83bc94slive <dd>All available fields will be used. This is equivalent to:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">FileETag INode MTime Size</highlight></dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><strong>None</strong></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>If a document is file-based, no <code>ETag</code> field will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd included in the response</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess keywords may be prefixed with either <code>+</code> or <code>-</code>,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess which allow changes to be made to the default setting inherited
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a broader scope. Any keyword appearing without such a prefix
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive immediately and completely cancels the inherited setting.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If a directory's configuration includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
fb77c505254b6e9c925e23e734463e87574f8f40kess subdirectory's includes <code>FileETag&nbsp;-INode</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess the setting for that subdirectory (which will be inherited by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any sub-subdirectories that don't override it) will be equivalent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note type="warning"><title>Warning</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Do not change the default for directories or locations that have WebDAV
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess enabled and use <module>mod_dav_fs</module> as a storage provider.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_dav_fs</module> uses <code>MTime&nbsp;Size</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a fixed format for <code>ETag</code> comparisons on conditional requests.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive These conditional requests will break if the <code>ETag</code> format is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive changed via <directive>FileETag</directive>.
003f0c9fda6664daf5092a0e42f65ede20098153slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Server Side Includes</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd An ETag is not generated for responses parsed by <module>mod_include</module>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the response entity can change without a change of the INode, MTime, or Size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the static file with embedded SSI directives.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<directivesynopsis type="section">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<name>Files</name>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Contains directives that apply to matched
030108b1816bcda3d925df65357feabdce83bc94slivefilenames</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The <directive type="section">Files</directive> directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess limits the scope of the enclosed directives by filename. It is comparable
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess to the <directive module="core" type="section">Directory</directive>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and <directive module="core" type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives. It should be matched with a <code>&lt;/Files&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. The directives given within this section will be applied to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any object with a basename (last component of filename) matching the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified filename. <directive type="section">Files</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections are processed in the order they appear in the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding configuration file, after the <directive module="core"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type="section">Directory</directive> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, but before <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Location</directive> sections. Note
003f0c9fda6664daf5092a0e42f65ede20098153slive that <directive type="section">Files</directive> can be nested
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen inside <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections to restrict the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive portion of the filesystem they apply to.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>filename</var> argument should include a filename, or
fb77c505254b6e9c925e23e734463e87574f8f40kess a wild-card string, where <code>?</code> matches any single character,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>*</code> matches any sequences of characters.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <glossary ref="regex">Regular expressions</glossary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can also be used, with the addition of the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>~</code> character. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <highlight language="config">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd #...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Files&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>would match most common Internet graphics formats. <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="core" type="section">FilesMatch</directive> is preferred,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding however.</p>
7654193c1faf603feec999850322ad79e6c551bcnd
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>Note that unlike <directive type="section"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="core">Directory</directive> and <directive type="section"
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd module="core">Location</directive> sections, <directive
7654193c1faf603feec999850322ad79e6c551bcnd type="section">Files</directive> sections can be used inside
7654193c1faf603feec999850322ad79e6c551bcnd <code>.htaccess</code> files. This allows users to control access to
7654193c1faf603feec999850322ad79e6c551bcnd their own files, at a file-by-file level.</p>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd</usage>
7654193c1faf603feec999850322ad79e6c551bcnd<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
7654193c1faf603feec999850322ad79e6c551bcnd and &lt;Files&gt; sections work</a> for an explanation of how these
7654193c1faf603feec999850322ad79e6c551bcnd different sections are combined when a request is received</seealso>
7654193c1faf603feec999850322ad79e6c551bcnd</directivesynopsis>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd<directivesynopsis type="section">
7654193c1faf603feec999850322ad79e6c551bcnd<name>FilesMatch</name>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<description>Contains directives that apply to regular-expression matched
7654193c1faf603feec999850322ad79e6c551bcndfilenames</description>
7654193c1faf603feec999850322ad79e6c551bcnd<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
7654193c1faf603feec999850322ad79e6c551bcnd<contextlist><context>server config</context><context>virtual host</context>
439acee10571861c670c438038a62f90a08bf137covener<context>directory</context><context>.htaccess</context>
439acee10571861c670c438038a62f90a08bf137covener</contextlist>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<override>All</override>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
439acee10571861c670c438038a62f90a08bf137covener<usage>
439acee10571861c670c438038a62f90a08bf137covener <p>The <directive type="section">FilesMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by filename, just as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" type="section">Files</directive> directive
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener does. However, it accepts a <glossary ref="regex">regular
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener expression</glossary>. For example:</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<highlight language="config">
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener&lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener # ...
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener&lt;/FilesMatch&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener</highlight>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>would match most common Internet graphics formats.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener</usage>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener and &lt;Files&gt; sections work</a> for an explanation of how these
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor different sections are combined when a request is received</seealso>
df5042f69eea159c73cd7b16542d4ca7d879b0b5trawick</directivesynopsis>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ForceType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be served with the specified
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemedia type in the HTTP Content-Type header field</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ForceType <var>media-type</var>|None</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved to the core in Apache httpd 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
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Location</directive> or
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive type="section" module="core">Files</directive>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick section, this directive forces all matching files to be served
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">ForceType image/gif</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that this directive overrides other indirect media type
fb77c505254b6e9c925e23e734463e87574f8f40kess associations defined in mime.types or via the
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="mod_mime">AddType</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can also override more general
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ForceType</directive> settings
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by using the value of <code>None</code>:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive# force all files to be image/gif:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Location /images&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType image/gif
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;/Location&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd# but normal mime-type associations here:
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd&lt;Location /images/mixed&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd ForceType None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
750d12c59545dbbac70390988de94f7e901b08f2niq <p>This directive primarily overrides the content types generated for
750d12c59545dbbac70390988de94f7e901b08f2niq static files served out of the filesystem. For resources other than
750d12c59545dbbac70390988de94f7e901b08f2niq static files, where the generator of the response typically specifies
750d12c59545dbbac70390988de94f7e901b08f2niq a Content-Type, this directive has no effect.</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq</usage>
750d12c59545dbbac70390988de94f7e901b08f2niq</directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<name>GprofDir</name>
750d12c59545dbbac70390988de94f7e901b08f2niq<description>Directory to write gmon.out profiling data to. </description>
750d12c59545dbbac70390988de94f7e901b08f2niq<syntax>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</syntax>
750d12c59545dbbac70390988de94f7e901b08f2niq<contextlist><context>server config</context><context>virtual host</context>
750d12c59545dbbac70390988de94f7e901b08f2niq</contextlist>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<usage>
750d12c59545dbbac70390988de94f7e901b08f2niq <p>When the server has been compiled with gprof profiling support,
750d12c59545dbbac70390988de94f7e901b08f2niq <directive>GprofDir</directive> causes <code>gmon.out</code> files to
6b15044d54a096e6323ff1540f1a491e8de7622dsf be written to the specified directory when the process exits. If the
750d12c59545dbbac70390988de94f7e901b08f2niq argument ends with a percent symbol ('%'), subdirectories are created
750d12c59545dbbac70390988de94f7e901b08f2niq for each process id.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive currently only works with the <module>prefork</module>
6b15044d54a096e6323ff1540f1a491e8de7622dsf MPM.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<directivesynopsis>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<name>HostnameLookups</name>
011e567af90fe9d72bbabf8cc5e373b4436b9d08rbowen<description>Enables DNS lookups on client IP addresses</description>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<syntax>HostnameLookups On|Off|Double</syntax>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic<default>HostnameLookups Off</default>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<context>directory</context></contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive enables DNS lookups so that host names can be
6b15044d54a096e6323ff1540f1a491e8de7622dsf logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
750d12c59545dbbac70390988de94f7e901b08f2niq The value <code>Double</code> refers to doing double-reverse
750d12c59545dbbac70390988de94f7e901b08f2niq DNS lookup. That is, after a reverse lookup is performed, a forward
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic lookup is then performed on that result. At least one of the IP
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic addresses in the forward lookup must match the original
6b15044d54a096e6323ff1540f1a491e8de7622dsf address. (In "tcpwrappers" terminology this is called
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>PARANOID</code>.)</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Regardless of the setting, when <module>mod_authz_host</module> is
750d12c59545dbbac70390988de94f7e901b08f2niq used for controlling access by hostname, a double reverse lookup
6b15044d54a096e6323ff1540f1a491e8de7622dsf will be performed. This is necessary for security. Note that the
6b15044d54a096e6323ff1540f1a491e8de7622dsf result of this double-reverse isn't generally available unless you
6b15044d54a096e6323ff1540f1a491e8de7622dsf set <code>HostnameLookups Double</code>. For example, if only
750d12c59545dbbac70390988de94f7e901b08f2niq <code>HostnameLookups On</code> and a request is made to an object
750d12c59545dbbac70390988de94f7e901b08f2niq 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default is <code>Off</code> in order to save the network
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd traffic for those sites that don't truly need the reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd offline.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Finally, if you have <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="mod_authz_host.html#reqhost">hostname-based Require
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives</a>, a hostname lookup will be performed regardless of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the setting of <code>HostnameLookups</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>If</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Contains directives that apply only if a condition is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesatisfied by a request at runtime</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive type="section">If</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive evaluates an expression at runtime, and applies the enclosed
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl directives if and only if the expression evaluates to true.
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl For example:</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <highlight language="config">&lt;If "-z req('Host')"&gt;</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match HTTP/1.0 requests without a <var>Host:</var> header.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Expressions may contain various shell-like operators for string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive comparison (<code>=</code>, <code>!=</code>, <code>&lt;</code>, ...),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive integer comparison (<code>-eq</code>, <code>-ne</code>, ...),
130d299c4b2b15be45532a176604c71fdc7bea5bnd and others (<code>-n</code>, <code>-z</code>, <code>-f</code>, ...).
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi It is also possible to use regular expressions, </p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <highlight language="config">&lt;If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"&gt;</highlight>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>shell-like pattern matches and many other operations. These operations
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi can be done on request headers (<code>req</code>), environment variables
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi (<code>env</code>), and a large number of other properties. The full
955d7fc3e7adb6463b7243e15c04e858718e799etakashi documentation is available in <a href="/expr.html">Expressions in
955d7fc3e7adb6463b7243e15c04e858718e799etakashi Apache HTTP Server</a>.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi</usage>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<seealso><a href="/expr.html">Expressions in Apache HTTP Server</a>,
955d7fc3e7adb6463b7243e15c04e858718e799etakashifor a complete reference and more examples.</seealso>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<seealso><directive type="section" module="core">ElseIf</directive></seealso>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<seealso><directive type="section" module="core">Else</directive></seealso>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin &lt;Files&gt; sections work</a> for an explanation of how these
955d7fc3e7adb6463b7243e15c04e858718e799etakashi different sections are combined when a request is received.
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <directive type="section">If</directive>,
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <directive type="section">ElseIf</directive>, and
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <directive type="section">Else</directive> are applied last.</seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>IfDefine</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that will be processed only
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif a test is true at startup</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki<context>directory</context><context>.htaccess</context>
55d36f9b61520c2374ab463e77e8a62daa416398nd</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive </code> section is used to mark directives that are conditional. The
55d36f9b61520c2374ab463e77e8a62daa416398nd directives within an <directive type="section">IfDefine</directive>
55d36f9b61520c2374ab463e77e8a62daa416398nd section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ignored.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <var>test</var> in the <directive type="section"
fb77c505254b6e9c925e23e734463e87574f8f40kess >IfDefine</directive> section directive can be one of two forms:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><var>parameter-name</var></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>!</code><var>parameter-name</var></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the former case, the directives between the start and end
55d36f9b61520c2374ab463e77e8a62daa416398nd markers are only processed if the parameter named
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is defined. The second format reverses
55d36f9b61520c2374ab463e77e8a62daa416398nd the test, and only processes the directives if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is <strong>not</strong> defined.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>parameter-name</var> argument is a define as given on the
55d36f9b61520c2374ab463e77e8a62daa416398nd <program>httpd</program> command line via <code>-D<var>parameter</var>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </code> at the time the server was started or by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Define</directive> directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
55d36f9b61520c2374ab463e77e8a62daa416398nd <p><directive type="section">IfDefine</directive> sections are
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd nest-able, which can be used to implement simple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple-parameter tests. Example:</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <example>httpd -DReverseProxy -DUseCache -DMemCache ...</example>
55d36f9b61520c2374ab463e77e8a62daa416398nd <highlight language="config">
55d36f9b61520c2374ab463e77e8a62daa416398nd&lt;IfDefine ReverseProxy&gt;
55d36f9b61520c2374ab463e77e8a62daa416398nd LoadModule proxy_module modules/mod_proxy.so
bea526116133aa3d7dabd1924bfc580b37fbf22aslive LoadModule proxy_http_module modules/mod_proxy_http.so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine UseCache&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule cache_module modules/mod_cache.so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine MemCache&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule mem_cache_module modules/mod_mem_cache.so
bea526116133aa3d7dabd1924bfc580b37fbf22aslive &lt;/IfDefine&gt;
bea526116133aa3d7dabd1924bfc580b37fbf22aslive &lt;IfDefine !MemCache&gt;
bea526116133aa3d7dabd1924bfc580b37fbf22aslive LoadModule cache_disk_module modules/mod_cache_disk.so
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;/IfDefine&gt;
bea526116133aa3d7dabd1924bfc580b37fbf22aslive &lt;/IfDefine&gt;
bea526116133aa3d7dabd1924bfc580b37fbf22aslive&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>IfModule</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that are processed conditional on the
3621f3acee323a877639a96d84891095eb07933aminfrinpresence or absence of a specific module</description>
003f0c9fda6664daf5092a0e42f65ede20098153slive<syntax>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;/IfModule&gt;</syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context><context>virtual host</context>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<context>directory</context><context>.htaccess</context>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Module identifiers are available in version 2.1 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
5b258a8d58679c6587757189339bb3c2d0488f93poirier <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin section is used to mark directives that are conditional on the presence of
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin a specific module. The directives within an <directive type="section"
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin >IfModule</directive> section are only processed if the <var>test</var>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen is true. If <var>test</var> is false, everything between the start and
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin end markers is ignored.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p>The <var>test</var> in the <directive type="section"
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin >IfModule</directive> section directive can be one of two forms:</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <ul>
3621f3acee323a877639a96d84891095eb07933aminfrin <li><var>module</var></li>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <li>!<var>module</var></li>
3621f3acee323a877639a96d84891095eb07933aminfrin </ul>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <p>In the former case, the directives between the start and end
3621f3acee323a877639a96d84891095eb07933aminfrin markers are only processed if the module named <var>module</var>
3621f3acee323a877639a96d84891095eb07933aminfrin is included in Apache httpd -- either compiled in or
3621f3acee323a877639a96d84891095eb07933aminfrin dynamically loaded using <directive module="mod_so"
3621f3acee323a877639a96d84891095eb07933aminfrin >LoadModule</directive>. The second format reverses the test,
3621f3acee323a877639a96d84891095eb07933aminfrin and only processes the directives if <var>module</var> is
3621f3acee323a877639a96d84891095eb07933aminfrin <strong>not</strong> included.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <p>The <var>module</var> argument can be either the module identifier or
3621f3acee323a877639a96d84891095eb07933aminfrin the file name of the module, at the time it was compiled. For example,
3621f3acee323a877639a96d84891095eb07933aminfrin <code>rewrite_module</code> is the identifier and
3621f3acee323a877639a96d84891095eb07933aminfrin <code>mod_rewrite.c</code> is the file name. If a module consists of
3621f3acee323a877639a96d84891095eb07933aminfrin several source files, use the name of the file containing the string
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <code>STANDARD20_MODULE_STUFF</code>.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <p><directive type="section">IfModule</directive> sections are
03aa31ad82759363ba1a55589e517b16308ef635minfrin nest-able, which can be used to implement simple multiple-module
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor tests.</p>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd placed in <directive type="section">IfModule</directive>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive sections.</note>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<directivesynopsis>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<name>Include</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Includes other configuration files from within
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndthe server configuration files</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>Include <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></syntax>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin</contextlist>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<compatibility>Wildcard matching available in 2.0.41 and later, directory
3621f3acee323a877639a96d84891095eb07933aminfrinwildcard matching available in 2.3.6 and later</compatibility>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive allows inclusion of other configuration files
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin from within the server configuration files.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin in the filename or directory parts of the path to include several files
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin at once, in alphabetical order. In addition, if
3621f3acee323a877639a96d84891095eb07933aminfrin <directive>Include</directive> points to a directory, rather than a file,
3621f3acee323a877639a96d84891095eb07933aminfrin Apache httpd will read all files in that directory and any subdirectory.
03aa31ad82759363ba1a55589e517b16308ef635minfrin However, including entire directories is not recommended, because it is
3621f3acee323a877639a96d84891095eb07933aminfrin easy to accidentally leave temporary files in a directory that can cause
3621f3acee323a877639a96d84891095eb07933aminfrin <program>httpd</program> to fail. Instead, we encourage you to use the
3621f3acee323a877639a96d84891095eb07933aminfrin wildcard syntax shown below, to include files that match a particular
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor pattern, such as *.conf, for example.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
3621f3acee323a877639a96d84891095eb07933aminfrin <p>The <directive module="core">Include</directive> directive will
03aa31ad82759363ba1a55589e517b16308ef635minfrin <strong>fail with an error</strong> if a wildcard expression does not
3621f3acee323a877639a96d84891095eb07933aminfrin match any file. The <directive module="core">IncludeOptional</directive>
3621f3acee323a877639a96d84891095eb07933aminfrin directive can be used if non-matching wildcards should be ignored.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin
03aa31ad82759363ba1a55589e517b16308ef635minfrin <p>The file path specified may be an absolute path, or may be relative
03aa31ad82759363ba1a55589e517b16308ef635minfrin to the <directive module="core">ServerRoot</directive> directory.</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
03aa31ad82759363ba1a55589e517b16308ef635minfrin <p>Examples:</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveInclude /usr/local/apache2/conf/ssl.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveInclude /usr/local/apache2/conf/vhosts/*.conf
003f0c9fda6664daf5092a0e42f65ede20098153slive </highlight>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Or, providing paths relative to your <directive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele module="core">ServerRoot</directive> directory:</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveInclude conf/ssl.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveInclude conf/vhosts/*.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Wildcards may be included in the directory or file portion of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path. This example will fail if there is no subdirectory in conf/vhosts
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess that contains at least one *.conf file:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">Include conf/vhosts/*/*.conf</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Alternatively, the following command will just be ignored in case of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive missing files or directories:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">IncludeOptional conf/vhosts/*/*.conf</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">IncludeOptional</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><program>apachectl</program></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid
891df99fdfa41fc8a486568f4d31ddf4a571258adreid<directivesynopsis>
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi<name>IncludeOptional</name>
be192cefa381d5bae6868034687471754cb43175sf<description>Includes other configuration files from within
891df99fdfa41fc8a486568f4d31ddf4a571258adreidthe server configuration files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in 2.3.6 and later</compatibility>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<usage>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>This directive allows inclusion of other configuration files
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick from within the server configuration files. It works identically to the
9f38f3ec3e8087985d108a24ae796962fef83644takashi <directive module="core">Include</directive> directive, with the
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick exception that if wildcards do not match any file or directory, the
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <directive module="core">IncludeOptional</directive> directive will be
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick silently ignored instead of causing an error.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<seealso><directive module="core">Include</directive></seealso>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<seealso><program>apachectl</program></seealso>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</directivesynopsis>
9f38f3ec3e8087985d108a24ae796962fef83644takashi
9f38f3ec3e8087985d108a24ae796962fef83644takashi<directivesynopsis>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<name>KeepAlive</name>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<description>Enables HTTP persistent connections</description>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<syntax>KeepAlive On|Off</syntax>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<default>KeepAlive On</default>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<contextlist><context>server config</context><context>virtual host</context>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</contextlist>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<usage>
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <p>The Keep-Alive extension to HTTP/1.0 and the persistent
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener connection feature of HTTP/1.1 provide long-lived HTTP sessions
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick which allow multiple requests to be sent over the same TCP
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick connection. In some cases this has been shown to result in an
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick almost 50% speedup in latency times for HTML documents with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive many images. To enable Keep-Alive connections, set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>KeepAlive On</code>.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For HTTP/1.0 clients, Keep-Alive connections will only be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd SSI pages, and server-generated directory listings will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the <directive module="mpm_common"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >MaxConnectionsPerChild</directive> directive, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of how many requests are sent using the connection.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>KeepAliveTimeout</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Amount of time the server will wait for subsequent
130d299c4b2b15be45532a176604c71fdc7bea5bndrequests on a persistent connection</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>KeepAliveTimeout <var>num</var>[ms]</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<default>KeepAliveTimeout 5</default>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Specifying a value in milliseconds is available in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndApache httpd 2.3.2 and later</compatibility>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd <p>The number of seconds Apache httpd will wait for a subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request before closing the connection. By adding a postfix of ms the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd timeout can be also set in milliseconds. Once a request has been
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd received, the timeout value specified by the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">Timeout</directive> directive applies.</p>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>Setting <directive>KeepAliveTimeout</directive> to a high value
750d12c59545dbbac70390988de94f7e901b08f2niq may cause performance problems in heavily loaded servers. The
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive higher the timeout, the more server processes will be kept
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive occupied waiting on connections with idle clients.</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>In a name-based virtual host context, the value of the first
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd defined virtual host best matching the local IP and port will be used.</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive</usage>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive</directivesynopsis>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<directivesynopsis type="section">
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<name>Limit</name>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<description>Restrict enclosed access controls to only certain HTTP
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisdmethods</description>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd &lt;/Limit&gt;</syntax>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<contextlist><context>directory</context><context>.htaccess</context>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</contextlist>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<override>AuthConfig, Limit</override>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<usage>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>Access controls are normally effective for
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <strong>all</strong> access methods, and this is the usual
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd desired behavior. <strong>In the general case, access control
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directives should not be placed within a
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <directive type="section">Limit</directive> section.</strong></p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The purpose of the <directive type="section">Limit</directive>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directive is to restrict the effect of the access controls to the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd nominated HTTP methods. For all other methods, the access
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd restrictions that are enclosed in the <directive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd type="section">Limit</directive> bracket <strong>will have no
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd effect</strong>. The following example applies the access control
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd only to the methods <code>POST</code>, <code>PUT</code>, and
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>DELETE</code>, leaving all other methods unprotected:</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <highlight language="config">
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd&lt;Limit POST PUT DELETE&gt;
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd Require valid-user
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor&lt;/Limit&gt;
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </highlight>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess case-sensitive.</strong> If <code>GET</code> is used it will also
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot be limited (see <directive module="core"
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd >TraceEnable</directive>).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section when restricting access, since a <directive type="section"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module="core">LimitExcept</directive> section provides protection
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen against arbitrary methods.</note>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <directive type="section">Limit</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">LimitExcept</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives may be nested. In this case, each successive level of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Limit</directive> or <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">LimitExcept</directive> directives must
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen further restrict the set of methods to which access controls apply.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <note type="warning">When using
130d299c4b2b15be45532a176604c71fdc7bea5bnd <directive type="section">Limit</directive> or
130d299c4b2b15be45532a176604c71fdc7bea5bnd <directive type="section">LimitExcept</directive> directives with
130d299c4b2b15be45532a176604c71fdc7bea5bnd the <directive module="mod_authz_core">Require</directive> directive,
130d299c4b2b15be45532a176604c71fdc7bea5bnd note that the first <directive module="mod_authz_core">Require</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd to succeed authorizes the request, regardless of the presence of other
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele <directive module="mod_authz_core">Require</directive> directives.</note>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <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>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <highlight language="config">
03e0a375c2435102fb2b51e34cccff52acbfddcdnd&lt;LimitExcept GET&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require valid-user
03e0a375c2435102fb2b51e34cccff52acbfddcdnd&lt;/LimitExcept&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd&lt;Limit POST&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require group editors
03e0a375c2435102fb2b51e34cccff52acbfddcdnd&lt;/Limit&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </highlight>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<directivesynopsis type="section">
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<name>LimitExcept</name>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<description>Restrict access controls to all HTTP methods
03e0a375c2435102fb2b51e34cccff52acbfddcdndexcept the named ones</description>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;/LimitExcept&gt;</syntax>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<contextlist><context>directory</context><context>.htaccess</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</contextlist>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<override>AuthConfig, Limit</override>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p><directive type="section">LimitExcept</directive> and
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>&lt;/LimitExcept&gt;</code> are used to enclose
03e0a375c2435102fb2b51e34cccff52acbfddcdnd a group of access control directives which will then apply to any
03e0a375c2435102fb2b51e34cccff52acbfddcdnd HTTP access method <strong>not</strong> listed in the arguments;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd i.e., it is the opposite of a <directive type="section"
03e0a375c2435102fb2b51e34cccff52acbfddcdnd module="core">Limit</directive> section and can be used to control
03e0a375c2435102fb2b51e34cccff52acbfddcdnd both standard and nonstandard/unrecognized methods. See the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd documentation for <directive module="core"
03e0a375c2435102fb2b51e34cccff52acbfddcdnd type="section">Limit</directive> for more details.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For example:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;LimitExcept POST GET&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/LimitExcept&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitInternalRecursion</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Determine maximum number of internal redirects and nested
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndsubrequests</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<default>LimitInternalRecursion 10</default>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache httpd 2.0.47 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An internal redirect happens, for example, when using the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_actions">Action</directive> directive, which internally
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive redirects the original request to a CGI script. A subrequest is Apache httpd's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mechanism to find out what would happen for some URI if it were requested.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For example, <module>mod_dir</module> uses subrequests to look for the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess files listed in the <directive module="mod_dir">DirectoryIndex</directive>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directive.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive>LimitInternalRecursion</directive> prevents the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from crashing when entering an infinite loop of internal redirects or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subrequests. Such loops are usually caused by misconfigurations.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The directive stores two different limits, which are evaluated on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive per-request basis. The first <var>number</var> is the maximum number of
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen internal redirects, that may follow each other. The second <var>number</var>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen determines, how deep subrequests may be nested. If you specify only one
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <var>number</var>, it will be assigned to both limits.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <highlight language="config">LimitInternalRecursion 5</highlight>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<name>LimitRequestBody</name>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<description>Restricts the total size of the HTTP request body sent
6fad623c3cc52b4a84d4d36538f6eed886f49f98covenerfrom the client</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>LimitRequestBody <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestBody 0</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
e0ef044feba0082771091af42798cada5bb1f4fcrbowen request body. See the note below for the limited applicability
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to proxy requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>LimitRequestBody</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource and the methods allowed on that resource. CGI scripts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive typically use the message body for retrieving form information.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <highlight language="config">LimitRequestBody 102400</highlight>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <note><p>For a full description of how this directive is interpreted by
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen proxy requests, see the <module>mod_proxy</module> documentation.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener</directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<name>LimitRequestFields</name>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<description>Limits the number of HTTP request header fields that
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covenerwill be accepted from the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestFields <var>number</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestFields 100</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</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
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen distributed).</p>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFields</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server administrator to modify the limit on the number of
72580dbc2a55511f13f377063725b9f143b20826stoddard request header fields allowed in an HTTP request. A server needs
72580dbc2a55511f13f377063725b9f143b20826stoddard this value to be larger than the number of fields that a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client request might include. The number of request header fields
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess used by a client rarely exceeds 20, but this may vary among
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor different client implementations, often depending upon the extent
72580dbc2a55511f13f377063725b9f143b20826stoddard to which a user has configured their browser to support detailed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor content negotiation. Optional HTTP extensions are often expressed
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor using request header fields.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
72580dbc2a55511f13f377063725b9f143b20826stoddard <p>This directive gives the server administrator greater
56d7eed7205462540aec7202cd82d9f5516fc537kess control over abnormal client request behavior, which may be
72580dbc2a55511f13f377063725b9f143b20826stoddard useful for avoiding some forms of denial-of-service attacks.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>For example:</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <highlight language="config">LimitRequestFields 50</highlight>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <note type="warning"><title>Warning</title>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p> When name-based virtual hosting is used, the value for this
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directive is taken from the default (first-listed) virtual host for the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen local IP and port combination</p>.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </note>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener</usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<directivesynopsis>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<name>LimitRequestFieldSize</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of the HTTP request header allowed from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveclient</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestFieldSize <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestFieldSize 8190</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to set the limit
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor on the allowed size of an HTTP request header field. A server
72580dbc2a55511f13f377063725b9f143b20826stoddard needs this value to be large enough to hold any one header field
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a normal client request. The size of a normal request header
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive field will vary greatly among different client implementations,
72580dbc2a55511f13f377063725b9f143b20826stoddard often depending upon the extent to which a user has configured
72580dbc2a55511f13f377063725b9f143b20826stoddard their browser to support detailed content negotiation. SPNEGO
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication headers can be up to 12392 bytes.</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 attacks.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">LimitRequestFieldSize 4094</highlight>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <note>Under normal conditions, the value should not be changed from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the default. Also, you can't set this higher than 8190 without
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen modifying the source code and rebuilding.</note>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <note type="warning"><title>Warning</title>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p> When name-based virtual hosting is used, the value for this
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directive is taken from the default (first-listed) virtual host best
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen matching the current IP address and port combination.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </note>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener</usage>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener</directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<name>LimitRequestLine</name>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener<description>Limit the size of the HTTP request line that will be accepted
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covenerfrom the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestLine <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestLine 8190</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the number of <var>bytes</var> that will be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess allowed on the HTTP request-line.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>The <directive>LimitRequestLine</directive> directive allows
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele the server administrator to set the limit on the allowed size
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele of a client's HTTP request-line. Since the request-line consists of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive HTTP method, URI, and protocol version, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>LimitRequestLine</directive> directive places a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restriction on the length of a request-URI allowed for a request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the server. A server needs this value to be large enough to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen hold any of its resource names, including any information that
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen might be passed in the query part of a <code>GET</code> request.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive gives the server administrator greater
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd control over abnormal client request behavior, which may be
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen useful for avoiding some forms of denial-of-service attacks.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">LimitRequestLine 4094</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default. Also, you can't set this higher than 8190 without
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modifying the source and rebuilding.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p> When name-based virtual hosting is used, the value for this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is taken from the default (first-listed) virtual host best
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matching the current IP address and port combination.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitXMLRequestBody</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of an XML-based request body</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitXMLRequestBody 1000000</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<override>All</override>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<usage>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>Limit (in bytes) on maximum size of an XML-based request
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive body. A value of <code>0</code> will disable any checking.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>Example:</p>
d950cf9262224a223e2ff5c51393708071e14b94covener
d950cf9262224a223e2ff5c51393708071e14b94covener <highlight language="config">LimitXMLRequestBody 0</highlight>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
d950cf9262224a223e2ff5c51393708071e14b94covener</usage>
d950cf9262224a223e2ff5c51393708071e14b94covener</directivesynopsis>
d950cf9262224a223e2ff5c51393708071e14b94covener
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis type="section">
d950cf9262224a223e2ff5c51393708071e14b94covener<name>Location</name>
d950cf9262224a223e2ff5c51393708071e14b94covener<description>Applies the enclosed directives only to matching
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorURLs</description>
d950cf9262224a223e2ff5c51393708071e14b94covener<syntax>&lt;Location
d950cf9262224a223e2ff5c51393708071e14b94covener <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
d950cf9262224a223e2ff5c51393708071e14b94covener<contextlist><context>server config</context><context>virtual host</context>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic</contextlist>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
d950cf9262224a223e2ff5c51393708071e14b94covener<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The <directive type="section">Location</directive> directive
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic limits the scope of the enclosed directives by URL. It is similar to the
d950cf9262224a223e2ff5c51393708071e14b94covener <directive type="section" module="core">Directory</directive>
d950cf9262224a223e2ff5c51393708071e14b94covener directive, and starts a subsection which is terminated with a
d950cf9262224a223e2ff5c51393708071e14b94covener <code>&lt;/Location&gt;</code> directive. <directive
d950cf9262224a223e2ff5c51393708071e14b94covener type="section">Location</directive> sections are processed in the
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic order they appear in the configuration file, after the <directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor type="section" module="core">Directory</directive> sections and
d950cf9262224a223e2ff5c51393708071e14b94covener <code>.htaccess</code> files are read, and after the <directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor type="section" module="core">Files</directive> sections.</p>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
d950cf9262224a223e2ff5c51393708071e14b94covener <p><directive type="section">Location</directive> sections operate
d950cf9262224a223e2ff5c51393708071e14b94covener completely outside the filesystem. This has several consequences.
d950cf9262224a223e2ff5c51393708071e14b94covener Most importantly, <directive type="section">Location</directive>
d950cf9262224a223e2ff5c51393708071e14b94covener directives should not be used to control access to filesystem
d950cf9262224a223e2ff5c51393708071e14b94covener locations. Since several different URLs may map to the same
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor filesystem location, such access controls may by circumvented.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>The enclosed directives will be applied to the request if the path component
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive of the URL meets <em>any</em> of the following criteria:
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <ul>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <li>The specified location matches exactly the path component of the URL.
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <li>The specified location, which ends in a forward slash, is a prefix
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive of the path component of the URL (treated as a context root).
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The specified location, with the addition of a trailing slash, is a
dc223428958ad9ff05011545bcdda000887b93e5slive prefix of the path component of the URL (also treated as a context root).
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj </li>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj </ul>
dc223428958ad9ff05011545bcdda000887b93e5slive <p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In the example below, where no trailing slash is used, requests to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /private1, /private1/ and /private1/file.txt will have the enclosed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives applied, but /private1other would not.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <highlight language="config">
d8c44cd75cf575fe51319280c12445109e878523noodl&lt;Location /private1&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
030108b1816bcda3d925df65357feabdce83bc94slive&lt;/Location&gt;
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </highlight>
37742b630743e470b94618ecb3560fbd82e50b59rbowen <p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd In the example below, where a trailing slash is used, requests to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd /private2/ and /private2/file.txt will have the enclosed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directives applied, but /private2 and /private2other would not.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
fb77c505254b6e9c925e23e734463e87574f8f40kess&lt;Location /private2<em>/</em>&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess # ...
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;/Location&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </highlight>
37742b630743e470b94618ecb3560fbd82e50b59rbowen
37742b630743e470b94618ecb3560fbd82e50b59rbowen <note><title>When to use <directive
37742b630743e470b94618ecb3560fbd82e50b59rbowen type="section">Location</directive></title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Use <directive type="section">Location</directive> to apply
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives to content that lives outside the filesystem. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content that lives in the filesystem, use <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Directory</directive> and <directive
e8811b6d38f756b325446ded5d96857d13856511takashi type="section" module="core">Files</directive>. An exception is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>&lt;Location /&gt;</code>, which is an easy way to
130d299c4b2b15be45532a176604c71fdc7bea5bnd apply a configuration to the entire server.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </note>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For all origin (non-proxy) requests, the URL to be matched is a
ca908c21f63a71c5efa7d32bd2cfafe9a42ba1fbrbowen URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
130d299c4b2b15be45532a176604c71fdc7bea5bnd port, or query string may be included.</em> For proxy requests, the
130d299c4b2b15be45532a176604c71fdc7bea5bnd URL to be matched is of the form
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>scheme://servername/path</code>, and you must include the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd prefix.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any single character, and <code>*</code> matches any sequences of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd characters. Neither wildcard character matches a / in the URL-path.</p>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><glossary ref="regex">Regular expressions</glossary>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd can also be used, with the addition of the <code>~</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd character. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;Location ~ "/(extra|special)/data"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd #...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;/Location&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match URLs that contained the substring <code>/extra/data</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>/special/data</code>. The directive <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section" module="core">LocationMatch</directive> behaves
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd identical to the regex version of <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <directive type="section">Location</directive>
37742b630743e470b94618ecb3560fbd82e50b59rbowen functionality is especially useful when combined with the
37742b630743e470b94618ecb3560fbd82e50b59rbowen <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess&lt;Location /status&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require host example.com
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick&lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You could also use this directive to configure a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive handler for files with a particular file extension. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <highlight language="config">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess&lt;FilesMatch \.php$&gt;
030108b1816bcda3d925df65357feabdce83bc94slive SetHandler application/x-httpd-php
030108b1816bcda3d925df65357feabdce83bc94slive&lt;/FilesMatch&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Note about / (slash)</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The slash character has special meaning depending on where in a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL it appears. People may be used to its behavior in the filesystem
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd where multiple adjacent slashes are frequently collapsed to a single
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directive and the regex version of <directive type="section"
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess >Location</directive> require you to explicitly specify multiple
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess slashes if that is your intention.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request URL <code>/abc</code> but not the request URL <code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive //abc</code>. The (non-regex) <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> directive behaves similarly when used for
7fbd7281d06cec1918aa370214df77c572f871a9sf proxy requests. But when (non-regex) <directive type="section"
7fbd7281d06cec1918aa370214df77c572f871a9sf >Location</directive> is used for non-proxy requests it will
7fbd7281d06cec1918aa370214df77c572f871a9sf 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>
7fbd7281d06cec1918aa370214df77c572f871a9sf </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
7fbd7281d06cec1918aa370214df77c572f871a9sf 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<seealso><directive module="core">LocationMatch</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>LocationMatch</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to regular-expression
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematching URLs</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>&lt;LocationMatch
1597043cec6ad37fa4154bf09b0fccdabed1a239slive <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL, in an identical manner
530eba85dbd41b8a0fa5255d3648d1440199a661slive 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 <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;LocationMatch "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/LocationMatch&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LogLevel</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Controls the verbosity of the ErrorLog</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LogLevel [<var>module</var>:]<var>level</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [<var>module</var>:<var>level</var>] ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LogLevel warn</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Per-module and per-directory configuration is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache HTTP Server 2.3.6 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </columnspec>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Level</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Description</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Example</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>emerg</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Emergencies - system is unusable.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Action must be taken immediately.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"getpwuid: couldn't determine user name from uid"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>crit</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Critical Conditions.</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"socket: Failed to get a socket, exiting child"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>error</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Error conditions.</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"Premature end of script headers"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>warn</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Warning conditions.</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"child process 1234 did not exit, sending another
7fbd7281d06cec1918aa370214df77c572f871a9sf SIGHUP"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>notice</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Normal but significant condition.</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"httpd: caught SIGBUS, attempting to dump core in
7fbd7281d06cec1918aa370214df77c572f871a9sf ..."</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>info</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Informational.</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"Server seems busy, (you may need to increase
7fbd7281d06cec1918aa370214df77c572f871a9sf StartServers, or Min/MaxSpareServers)..."</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>debug</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Debug-level messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"Opening config file ..."</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace1</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"proxy: FTP: control connection complete"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace2</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace3</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"openssl: Handshake: start"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td><code>trace4</code> </td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>Trace messages</td>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
8b052d682204371decc64f942aede5ef1da98955erikabele </tr>
8b052d682204371decc64f942aede5ef1da98955erikabele <tr>
8b052d682204371decc64f942aede5ef1da98955erikabele <td><code>trace5</code> </td>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace6</code> </td>
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"cache lookup FAILED, forcing new map lookup"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace7</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages, dumping large amounts of data</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf <td><code>trace8</code> </td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>Trace messages, dumping large amounts of data</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
7fbd7281d06cec1918aa370214df77c572f871a9sf </tr>
7fbd7281d06cec1918aa370214df77c572f871a9sf </table>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>When a particular level is specified, messages from all
7fbd7281d06cec1918aa370214df77c572f871a9sf other levels of higher significance will be reported as well.
7fbd7281d06cec1918aa370214df77c572f871a9sf <em>E.g.</em>, when <code>LogLevel info</code> is specified,
7fbd7281d06cec1918aa370214df77c572f871a9sf 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">LogLevel notice</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <note><title>Note</title>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>When logging to a regular file messages of the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>notice</code> cannot be suppressed and thus are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged. However, this doesn't apply when logging is done
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using <code>syslog</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Specifying a level without a module name will reset the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for all modules to that level. Specifying a level with a module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive name will set the level for that module only. It is possible to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen use the module source file name, the module identifier, or the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module identifier with the trailing <code>_module</code> omitted
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen as module specification. This means the following three specifications
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd are equivalent:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveLogLevel info ssl:warn
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveLogLevel info mod_ssl.c:warn
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveLogLevel info ssl_module:warn
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </highlight>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>It is also possible to change the level per directory:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <highlight language="config">
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickLogLevel info
a0fed3e26656887c8458aa1081d516d08ced3c84trawick&lt;Directory "/usr/local/apache/htdocs/app"&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen LogLevel debug
a0fed3e26656887c8458aa1081d516d08ced3c84trawick&lt;/Directory&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </highlight>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Per directory loglevel configuration only affects messages that are
a0fed3e26656887c8458aa1081d516d08ced3c84trawick logged after the request has been parsed and that are associated with
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the request. Log messages which are associated with the connection or
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the server are not affected.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>MaxKeepAliveRequests</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Number of requests allowed on a persistent
a0fed3e26656887c8458aa1081d516d08ced3c84trawickconnection</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>MaxKeepAliveRequests <var>number</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>MaxKeepAliveRequests 100</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>MaxKeepAliveRequests</directive> directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick limits the number of requests allowed per connection when
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive module="core" >KeepAlive</directive> is on. If it is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick set to <code>0</code>, unlimited requests will be allowed. We
a0fed3e26656887c8458aa1081d516d08ced3c84trawick recommend that this setting be kept to a high value for maximum
a0fed3e26656887c8458aa1081d516d08ced3c84trawick server performance.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>For example:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <highlight language="config">MaxKeepAliveRequests 500</highlight>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>MaxRanges</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Number of ranges allowed before returning the complete
a0fed3e26656887c8458aa1081d516d08ced3c84trawickresource </description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>MaxRanges default | unlimited | none | <var>number-of-ranges</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>MaxRanges 200</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</contextlist>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<compatibility>Available in Apache HTTP Server 2.3.15 and later</compatibility>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<usage>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>The <directive>MaxRanges</directive> directive
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick limits the number of HTTP ranges the server is willing to
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick return to the client. If more ranges then permitted are requested,
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick the complete resource is returned instead.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><strong>default</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>Limits the number of ranges to a compile-time default of 200.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><strong>none</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>Range headers are ignored.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <dt><strong>unlimited</strong></dt>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <dd>The server does not limit the number of ranges it is
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick willing to satisfy.</dd>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <dt><var>number-of-ranges</var></dt>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <dd>A positive number representing the maximum number of ranges the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick server is willing to satisfy.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <name>MaxRangeOverlaps</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <description>Number of overlapping ranges (eg: <code>100-200,150-300</code>) allowed before returning the complete
a0fed3e26656887c8458aa1081d516d08ced3c84trawick resource </description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <syntax>MaxRangeOverlaps default | unlimited | none | <var>number-of-ranges</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <default>MaxRangeOverlaps 20</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <context>directory</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <compatibility>Available in Apache HTTP Server 2.3.15 and later</compatibility>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>MaxRangeOverlaps</directive> directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick limits the number of overlapping HTTP ranges the server is willing to
a0fed3e26656887c8458aa1081d516d08ced3c84trawick return to the client. If more overlapping ranges then permitted are requested,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the complete resource is returned instead.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><strong>default</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>Limits the number of overlapping ranges to a compile-time default of 20.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><strong>none</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>No overlapping Range headers are allowed.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><strong>unlimited</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>The server does not limit the number of overlapping ranges it is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick willing to satisfy.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><var>number-of-ranges</var></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>A positive number representing the maximum number of overlapping ranges the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick server is willing to satisfy.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <name>MaxRangeReversals</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <description>Number of range reversals (eg: <code>100-200,50-70</code>) allowed before returning the complete
a0fed3e26656887c8458aa1081d516d08ced3c84trawick resource </description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <syntax>MaxRangeReversals default | unlimited | none | <var>number-of-ranges</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <default>MaxRangeReversals 20</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <context>directory</context>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <compatibility>Available in Apache HTTP Server 2.3.15 and later</compatibility>
215694531f7d868b906df96e22a80e6a1d2326a6lgentis
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>MaxRangeReversals</directive> directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick limits the number of HTTP Range reversals the server is willing to
a0fed3e26656887c8458aa1081d516d08ced3c84trawick return to the client. If more ranges reversals then permitted are requested,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the complete resource is returned instead.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><strong>default</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>Limits the number of range reversals to a compile-time default of 20.</dd>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><strong>none</strong></dt>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <dd>No Range reversals headers are allowed.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><strong>unlimited</strong></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>The server does not limit the number of range reversals it is
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor willing to satisfy.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dt><var>number-of-ranges</var></dt>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>A positive number representing the maximum number of range reversals the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick server is willing to satisfy.</dd>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </dl>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>Mutex</name>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Configures mutex mechanism and lock file directory for all
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickor specified mutexes</description>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<syntax>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</syntax>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<default>Mutex default</default>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<contextlist><context>server config</context></contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<compatibility>Available in Apache HTTP Server 2.3.4 and later</compatibility>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The <directive>Mutex</directive> directive sets the mechanism,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick and optionally the lock file location, that httpd and modules use
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick to serialize access to resources. Specify <code>default</code> as
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the first argument to change the settings for all mutexes; specify
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick a mutex name (see table below) as the first argument to override
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick defaults only for that mutex.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The <directive>Mutex</directive> directive is typically used in
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the following exceptional situations:</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <ul>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li>change the mutex mechanism when the default mechanism selected
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick by <glossary>APR</glossary> has a functional or performance
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick problem</li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li>change the directory used by file-based mutexes when the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick default directory does not support locking</li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </ul>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <note><title>Supported modules</title>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This directive only configures mutexes which have been registered
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick with the core server using the <code>ap_mutex_register()</code> API.
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick All modules bundled with httpd support the <directive>Mutex</directive>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick directive, but third-party modules may not. Consult the documentation
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick of the third-party module, which must indicate the mutex name(s) which
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick can be configured if this directive is supported.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </note>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The following mutex <em>mechanisms</em> are available:</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <ul>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li><code>default | yes</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This selects the default locking implementation, as determined by
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <glossary>APR</glossary>. The default locking implementation can
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick be displayed by running <program>httpd</program> with the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code>-V</code> option.</p></li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li><code>none | no</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This effectively disables the mutex, and is only allowed for a
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick mutex if the module indicates that it is a valid choice. Consult the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick module documentation for more information.</p></li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <li><code>posixsem</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This is a mutex variant based on a Posix semaphore.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <note type="warning"><title>Warning</title>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The semaphore ownership is not recovered if a thread in the process
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick holding the mutex segfaults, resulting in a hang of the web server.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </note>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </li>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <li><code>sysvsem</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note type="warning"><title>Warning</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>It is possible to "leak" SysV semaphores if processes crash
a0fed3e26656887c8458aa1081d516d08ced3c84trawick before the semaphore is removed.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note type="warning"><title>Security</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The semaphore API allows for a denial of service attack by any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick CGIs running under the same uid as the webserver (<em>i.e.</em>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick all CGIs, unless you use something like <program>suexec</program>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick or <code>cgiwrapper</code>).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>sem</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This selects the "best" available semaphore implementation, choosing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive between Posix and SystemV IPC semaphores, in that order.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>pthread</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant based on cross-process Posix thread
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener mutexes.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <note type="warning"><title>Warning</title>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <p>On most systems, if a child process terminates abnormally while
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener holding a mutex that uses this implementation, the server will deadlock
fb77c505254b6e9c925e23e734463e87574f8f40kess and stop responding to requests. When this occurs, the server will
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener require a manual restart to recover.</p>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive <p>Solaris is a notable exception as it provides a mechanism which
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive usually allows the mutex to be recovered after a child process
05201775eaa6b363b8a119c8aea5db246b967591yoshiki terminates abnormally while holding a mutex.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>If your system implements the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant where a physical (lock-)file and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>fcntl()</code> function are used as the mutex.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When multiple mutexes based on this mechanism are used within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multi-threaded, multi-process environments, deadlock errors (EDEADLK)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can be reported for valid mutex operations if <code>fcntl()</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is not thread-aware, such as on Solaris.</p>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>flock:/path/to/mutex</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with the exception that the <code>flock()</code> function is used to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd provide file locking.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess order.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Most mechanisms are only available on selected platforms, where the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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>,
13e5182a0c199ecc7a73db97b6448a544e940868slive <em>flock</em>, and <em>file</em>.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic filesystem for <code>/path/to/mutex</code> and never a directory residing
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic on a NFS- or AFS-filesystem. The basename of the file will be the mutex
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd parent process will be appended to to make the file name unique, avoiding
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd conflicts when multiple httpd instances share a lock file directory. For
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd example, if the mutex name is <code>mpm-accept</code> and the lock file
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory is <code>/var/httpd/locks</code>, the lock file name for the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd httpd instance with parent process id 12345 would be
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <note type="warning"><title>Security</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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>
13e5182a0c199ecc7a73db97b6448a544e940868slive </note>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following table documents the names of mutexes used by httpd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and bundled modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1" style="zebra">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <th>Mutex name</th>
13e5182a0c199ecc7a73db97b6448a544e940868slive <th>Module(s)</th>
13e5182a0c199ecc7a73db97b6448a544e940868slive <th>Protected resource</th>
b00583f8e126bbb00b06dcf06af06c9d07978701kess </tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>mpm-accept</code></td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <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
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess <a href="/misc/perf-tuning.html">performance tuning</a>
13e5182a0c199ecc7a73db97b6448a544e940868slive documentation</td>
13e5182a0c199ecc7a73db97b6448a544e940868slive </tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><code>authdigest-client</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_auth_digest</module></td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <td>client list in shared memory</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>authdigest-opaque</code></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><module>mod_auth_digest</module></td>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <td>counter in shared memory</td>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic </tr>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <tr>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <td><code>ldap-cache</code></td>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <td><module>mod_ldap</module></td>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <td>LDAP result cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>rewrite-map</code></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><module>mod_rewrite</module></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td>communication with external mapping programs, to avoid
13e5182a0c199ecc7a73db97b6448a544e940868slive intermixed I/O from multiple requests</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><code>ssl-cache</code></td>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <td><module>mod_ssl</module></td>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <td>SSL session cache</td>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive </tr>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><code>ssl-stapling</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ssl</module></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td>OCSP stapling response cache</td>
13e5182a0c199ecc7a73db97b6448a544e940868slive </tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><code>watchdog-callback</code></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td><module>mod_watchdog</module></td>
13e5182a0c199ecc7a73db97b6448a544e940868slive <td>callback function of a particular client module</td>
13e5182a0c199ecc7a73db97b6448a544e940868slive </tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive </table>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
13e5182a0c199ecc7a73db97b6448a544e940868slive parent process id from the lock file name.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the following example, the mutex mechanism for the MPM accept
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic mutex will be changed from the compiled-in default to <code>fcntl</code>,
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen with the associated lock file created in directory
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic will be changed from the compiled-in default to <code>sysvsem</code>.</p>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <highlight language="config">
fb77c505254b6e9c925e23e734463e87574f8f40kessMutex sysvsem default
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveMutex fcntl:/var/httpd/locks mpm-accept
130d299c4b2b15be45532a176604c71fdc7bea5bnd </highlight>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>NameVirtualHost</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>DEPRECATED: Designates an IP address for name-virtual
130d299c4b2b15be45532a176604c71fdc7bea5bndhosting</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p>Prior to 2.3.11, <directive>NameVirtualHost</directive> was required
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto instruct the server that a particular IP address and port combination
fb77c505254b6e9c925e23e734463e87574f8f40kesswas usable as a name-based virtual host. In 2.3.11 and later,
fb77c505254b6e9c925e23e734463e87574f8f40kessany time an IP address and port combination is used in multiple virtual
fb77c505254b6e9c925e23e734463e87574f8f40kesshosts, name-based virtual hosting is automatically enabled for that address.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd<p>This directive currently has no effect.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/vhosts/">Virtual Hosts
130d299c4b2b15be45532a176604c71fdc7bea5bnddocumentation</a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>Options</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Configures what features are available in a particular
130d299c4b2b15be45532a176604c71fdc7bea5bnddirectory</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>Options
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Options FollowSymlinks</default>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<override>Options</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<compatibility>The default was changed from All to FollowSymlinks in 2.3.11</compatibility>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <directive>Options</directive> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dl>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dt><code>All</code></dt>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dd>All options except for <code>MultiViews</code>.</dd>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dt><code>ExecCGI</code></dt>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dd>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen Execution of CGI scripts using <module>mod_cgi</module>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen is permitted.</dd>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dt><code>FollowSymLinks</code></dt>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dd>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen The server will follow symbolic links in this directory. This is
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen the default setting.
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <note>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>Even though the server follows the symlink it does <em>not</em>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen change the pathname used to match against <directive type="section"
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen module="core">Directory</directive> sections.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>Note also, that this option <strong>gets ignored</strong> if set
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen inside a <directive type="section" module="core">Location</directive>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen section.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>Omitting this option should not be considered a security restriction,
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen since symlink testing is subject to race conditions that make it
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen circumventable.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen </note></dd>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <dt><code>Includes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes provided by <module>mod_include</module>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen are permitted.</dd>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>IncludesNOEXEC</code></dt>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <dd>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes are permitted, but the <code>#exec
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cmd</code> and <code>#exec cgi</code> are disabled. It is still
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive possible to <code>#include virtual</code> CGI scripts from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_alias">ScriptAlias</directive>ed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Indexes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and there
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is no <directive module="mod_dir">DirectoryIndex</directive>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen (<em>e.g.</em>, <code>index.html</code>) in that directory, then
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <module>mod_autoindex</module> will return a formatted listing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the directory.</dd>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>MultiViews</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "MultiViews" are allowed using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_negotiation</module>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title> <p>This option gets ignored if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive anywhere other than <directive module="core" type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Directory</directive>, as <module>mod_negotiation</module>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive needs real resources to compare against and evaluate from.</p></note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dt><code>SymLinksIfOwnerMatch</code></dt>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The server will only follow symbolic links for which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive target file or directory is owned by the same user id as the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele link.
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title> <p>This option gets ignored if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set inside a <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive> section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd circumventable.</p></note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Normally, if multiple <directive>Options</directive> could
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive apply to a directory, then the most specific one is used and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen others are ignored; the options are not merged. (See <a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen href="/sections.html#mergin">how sections are merged</a>.)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive However if <em>all</em> the options on the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <directive>Options</directive> directive are preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>+</code> or <code>-</code> symbol, the options are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive merged. Any options preceded by a <code>+</code> are added to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive options currently in force, and any options preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> are removed from the options currently in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive force. </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Mixing <directive>Options</directive> with a <code>+</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> with those without is not valid syntax, and will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected during server startup by the syntax check with an abort.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs"&gt;
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele Options Indexes FollowSymLinks
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs/spec"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>then only <code>Includes</code> will be set for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/web/docs/spec</code> directory. However if the second
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <directive>Options</directive> directive uses the <code>+</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <highlight language="config">
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;Directory "/web/docs"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;Directory "/web/docs/spec"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options +Includes -Indexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </highlight>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>then the options <code>FollowSymLinks</code> and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Includes</code> are set for the <code>/web/docs/spec</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directory.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note><title>Note</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Using <code>-IncludesNOEXEC</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default in the absence of any other settings is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FollowSymlinks</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>Protocol</name>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<description>Protocol for a listening socket</description>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<syntax>Protocol <var>protocol</var></syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context><context>virtual host</context></contextlist>
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive<compatibility>Available in Apache 2.1.5 and later.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenOn Windows from Apache 2.3.3 and later.</compatibility>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the protocol used for a specific listening socket.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen The protocol is used to determine which module should handle a request, and
4cafc94e99922f00654e1779d30c2cccf5278c4fkess to apply protocol specific optimizations with the <directive>AcceptFilter</directive>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen directive.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>You only need to set the protocol if you are running on non-standard ports, otherwise <code>http</code> is assumed for port 80 and <code>https</code> for port 443.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <highlight language="config">Protocol https</highlight>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <p>You can also specify the protocol using the <directive module="mpm_common">Listen</directive> directive.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</usage>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<seealso><directive module="core">AcceptFilter</directive></seealso>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<seealso><directive module="mpm_common">Listen</directive></seealso>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<name>RLimitCPU</name>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<description>Limits the CPU consumption of processes launched
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3sliveby Apache httpd children</description>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<default>Unset; uses operating system defaults</default>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess<contextlist><context>server config</context><context>virtual host</context>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<context>directory</context><context>.htaccess</context></contextlist>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki<override>All</override>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<usage>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen resource limit for all processes and the second parameter sets
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive the maximum resource limit. Either parameter can be a number,
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive or <code>max</code> to indicate to the server that the limit should
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive be set to the maximum allowed by the operating system
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive configuration. Raising the maximum resource limit requires that
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive the server is running as <code>root</code>, or in the initial startup
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive phase.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>This applies to processes forked off from Apache httpd children
4cafc94e99922f00654e1779d30c2cccf5278c4fkess servicing requests, not the Apache httpd children themselves. This
fb77c505254b6e9c925e23e734463e87574f8f40kess includes CGI scripts and SSI exec commands, but not any
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen processes forked off from the Apache httpd parent such as piped
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive logs.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>CPU resource limits are expressed in seconds per
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive process.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<name>RLimitMEM</name>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<description>Limits the memory consumption of processes launched
a8ee031b2224ce5473826c9d4f603681589245fawroweby Apache httpd children</description>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<default>Unset; uses operating system defaults</default>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<contextlist><context>server config</context><context>virtual host</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<context>directory</context><context>.htaccess</context></contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<override>All</override>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Takes 1 or 2 parameters. The first parameter sets the soft
a8ee031b2224ce5473826c9d4f603681589245fawrowe resource limit for all processes and the second parameter sets
a8ee031b2224ce5473826c9d4f603681589245fawrowe the maximum resource limit. Either parameter can be a number,
a8ee031b2224ce5473826c9d4f603681589245fawrowe or <code>max</code> to indicate to the server that the limit should
a8ee031b2224ce5473826c9d4f603681589245fawrowe be set to the maximum allowed by the operating system
a8ee031b2224ce5473826c9d4f603681589245fawrowe configuration. Raising the maximum resource limit requires that
a8ee031b2224ce5473826c9d4f603681589245fawrowe the server is running as <code>root</code>, or in the initial startup
a8ee031b2224ce5473826c9d4f603681589245fawrowe phase.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>This applies to processes forked off from Apache httpd children
a8ee031b2224ce5473826c9d4f603681589245fawrowe servicing requests, not the Apache httpd children themselves. This
a8ee031b2224ce5473826c9d4f603681589245fawrowe includes CGI scripts and SSI exec commands, but not any
a8ee031b2224ce5473826c9d4f603681589245fawrowe processes forked off from the Apache httpd parent such as piped
a8ee031b2224ce5473826c9d4f603681589245fawrowe logs.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>Memory resource limits are expressed in bytes per
a8ee031b2224ce5473826c9d4f603681589245fawrowe process.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><directive module="core">RLimitCPU</directive></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><directive module="core">RLimitNPROC</directive></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<name>RLimitNPROC</name>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<description>Limits the number of processes that can be launched by
a8ee031b2224ce5473826c9d4f603681589245fawroweprocesses launched by Apache httpd children</description>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Unset; uses operating system defaults</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
2e5e2673cb64d3e4d445d911c6f61ac171020725nd or <code>max</code> to indicate to the server that the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive should be set to the maximum allowed by the operating system
733738e83a9b0113476e3f67992c2278d61ee4dakess configuration. Raising the maximum resource limit requires that
733738e83a9b0113476e3f67992c2278d61ee4dakess the server is running as <code>root</code>, or in the initial startup
2e5e2673cb64d3e4d445d911c6f61ac171020725nd phase.</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>This applies to processes forked off from Apache httpd children
2e5e2673cb64d3e4d445d911c6f61ac171020725nd servicing requests, not the Apache httpd children themselves. This
2e5e2673cb64d3e4d445d911c6f61ac171020725nd includes CGI scripts and SSI exec commands, but not any
2e5e2673cb64d3e4d445d911c6f61ac171020725nd processes forked off from the Apache httpd parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Process limits control the number of processes per user.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Note</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If CGI processes are <strong>not</strong> running
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive under user ids other than the web server user id, this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will limit the number of processes that the server itself can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong><code>cannot fork</code></strong> messages in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>error_log</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitCPU</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ScriptInterpreterSource</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
206b5dce9e48924aa9f12ce87f14856a4cd3fb68takashi<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin<default>ScriptInterpreterSource Script</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
b6ab9bfd820e424c2e9544d629ae67af24e90dcerbowen<override>FileInfo</override>
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick<compatibility>Win32 only;
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawickoption <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
b6ab9bfd820e424c2e9544d629ae67af24e90dcerbowenlater</compatibility>
fff1d314f760fc17a49215e8818b3e57691efa43niq
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive is used to control how Apache httpd finds the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd interpreter used to run CGI scripts. The default setting is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
fff1d314f760fc17a49215e8818b3e57691efa43niq by the shebang line (first line, starting with <code>#!</code>) in the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen script. On Win32 systems this line usually looks like:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="perl">#!C:/Perl/bin/perl.exe</highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="perl">#!perl</highlight>
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Setting <code>ScriptInterpreterSource Registry</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive searched using the script file extension (e.g., <code>.pl</code>) as a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive search key. The command defined by the registry subkey
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>Shell\Open\Command</code> is used to open the script file. If the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive registry keys cannot be found, Apache httpd falls back to the behavior of the
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <code>Script</code> option.</p>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <note type="warning"><title>Security</title>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen <p>Be careful when using <code>ScriptInterpreterSource
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen Registry</code> with <directive
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen module="mod_alias">ScriptAlias</directive>'ed directories, because
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor Apache httpd will try to execute <strong>every</strong> file within this
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen directory. The <code>Registry</code> setting may cause undesired
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick program calls on files which are typically not executed. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, the default open command on <code>.htm</code> files on
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick most Windows systems will execute Microsoft Internet Explorer, so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor so.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier 2.0 does the same thing as <code>Registry</code> but uses only the
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier subkey <code>Shell\ExecCGI\Command</code>. The
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <code>ExecCGI</code> key is not a common one. It must be
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier configured manually in the windows registry and hence prevents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accidental program calls on your system.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme<directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme<name>SeeRequestTail</name>
e08ad1a326852610a7930269638a43657fc50d06sctemme<description>Determine if mod_status displays the first 63 characters
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveof a request or the last 63, assuming the request itself is greater than
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive63 chars.</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SeeRequestTail On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>SeeRequestTail Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache httpd 2.2.7 and later.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>mod_status with <code>ExtendedStatus On</code>
e08ad1a326852610a7930269638a43657fc50d06sctemme displays the actual request being handled.
e08ad1a326852610a7930269638a43657fc50d06sctemme For historical purposes, only 63 characters of the request
e08ad1a326852610a7930269638a43657fc50d06sctemme are actually stored for display purposes. This directive
e08ad1a326852610a7930269638a43657fc50d06sctemme controls whether the 1st 63 characters are stored (the previous
e08ad1a326852610a7930269638a43657fc50d06sctemme behavior and the default) or if the last 63 characters are. This
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor is only applicable, of course, if the length of the request is
e08ad1a326852610a7930269638a43657fc50d06sctemme 64 characters or greater.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If Apache httpd is handling <code
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim >GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</code
29edaaeea24c41820e486944635348cd7fae1d11rbowen > mod_status displays as follows:
e08ad1a326852610a7930269638a43657fc50d06sctemme </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
e08ad1a326852610a7930269638a43657fc50d06sctemme <th>Off (default)</th>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <td>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen </tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <th>On</th>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</td>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen </tr>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen </table>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen</usage>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen</directivesynopsis>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerAdmin</name>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<description>Email address that the server includes in error
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenmessages sent to the client</description>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAdmin</directive> sets the contact address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the server includes in any error messages it returns to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client. If the <code>httpd</code> doesn't recognize the supplied argument
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an URL, it
fb77c505254b6e9c925e23e734463e87574f8f40kess assumes, that it's an <var>email-address</var> and prepends it with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mailto:</code> in hyperlink targets. However, it's recommended to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd actually use an email address, since there are a lot of CGI scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive make that assumption. If you want to use an URL, it should point to another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server under your control. Otherwise users may not be able to contact you in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case of errors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">ServerAdmin www-admin@foo.example.com</highlight>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>as users do not always mention that they are talking about the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server!</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAlias</directive> directive sets the
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen alternate names for a host, for use with <a
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen href="/vhosts/name-based.html">name-based virtual hosts</a>. The
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive>ServerAlias</directive> may include wildcards, if appropriate.</p>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <highlight language="config">
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen&lt;VirtualHost *:80&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerName server.example.com
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen ServerAlias server server2.example.com server2
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen ServerAlias *.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive UseCanonicalName Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>Name-based virtual hosts for the best-matching set of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">virtualhost</directive>s are processed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the order they appear in the configuration. The first matching <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerName</directive> or <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >ServerAlias</directive> is used, with no different precedence for wildcards
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (nor for ServerName vs. ServerAlias). </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Hostname and port that the server uses to identify
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveitself</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The <directive>ServerName</directive> directive sets the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess request scheme, hostname and
ef8e89e090461194ecadd31e8796a2c51e0531a2kess port that the server uses to identify itself. This is used when
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess creating redirection URLs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Additionally, <directive>ServerName</directive> is used (possibly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in conjunction with <directive>ServerAlias</directive>) to uniquely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive identify a virtual host, when using <a
530eba85dbd41b8a0fa5255d3648d1440199a661slive href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the web server is <code>simple.example.com</code>,
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz but the machine also has the DNS alias <code>www.example.com</code>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz and you wish the web server to be so identified, the following
7b5535ed88e0f561b3bfb3330137bd804846afd4slive directive should be used:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">ServerName www.example.com</highlight>
f35c904c3b359610a46e94fbb4ba8495b2338521slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerName</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may appear anywhere within the definition of a server. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive each appearance overrides the previous appearance (within that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server).</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>If no <directive>ServerName</directive> is specified, then the
dc111bcea580da3da174c25be0fd7a8f22c86fe1jim server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ServerName</directive>, then the server will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port from the incoming request. For optimal reliability and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive predictability, you should specify an explicit hostname and port
530eba85dbd41b8a0fa5255d3648d1440199a661slive using the <directive>ServerName</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive>ServerName</directive> inside a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">VirtualHost</directive>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim section specifies what hostname must appear in the request's
2eb5346b17b3b69767cfe87d0f632efd6d15500djim <code>Host:</code> header to match this virtual host.</p>
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <p>Sometimes, the server runs behind a device that processes SSL,
2eb5346b17b3b69767cfe87d0f632efd6d15500djim such as a reverse proxy, load balancer or SSL offload
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appliance. When this is the case, specify the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>https://</code> scheme and the port number to which the
530eba85dbd41b8a0fa5255d3648d1440199a661slive clients connect in the <directive>ServerName</directive> directive
530eba85dbd41b8a0fa5255d3648d1440199a661slive to make sure that the server generates the correct
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs.
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh </p>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <p>See the description of the
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <directive module="core">UseCanonicalName</directive> and
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <directive module="core">UseCanonicalPhysicalPort</directive> directives for
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh settings which determine whether self-referential URLs (e.g., by the
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <module>mod_dir</module> module) will refer to the
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh specified port, or to the port number given in the client's request.
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen </p>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Failure to set <directive>ServerName</directive> to a name that
530eba85dbd41b8a0fa5255d3648d1440199a661slive your server can resolve to an IP address will result in a startup
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen warning. <code>httpd</code> will then use whatever hostname it can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive determine, using the system's <code>hostname</code> command. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will almost never be the hostname you actually want.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
530eba85dbd41b8a0fa5255d3648d1440199a661slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz Apache HTTP Server</a></seealso>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<seealso><a href="/vhosts/">Apache HTTP Server virtual host
7b5535ed88e0f561b3bfb3330137bd804846afd4slive documentation</a></seealso>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<seealso><directive module="core">ServerAlias</directive></seealso>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim</directivesynopsis>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<directivesynopsis>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<name>ServerPath</name>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim<description>Legacy URL pathname for a name-based virtual host that
a21fb2799923b1c25a351f09e690bd46806f2fa2jimis accessed by an incompatible browser</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerPath <var>URL-path</var></syntax>
f35c904c3b359610a46e94fbb4ba8495b2338521slive<contextlist><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerPath</directive> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>ServerRoot</name>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<description>Base directory for the server installation</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerRoot <var>directory-path</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>ServerRoot /usr/local/apache</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerRoot</directive> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory in which the server lives. Typically it will contain the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd subdirectories <code>conf/</code> and <code>logs/</code>. Relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive paths in other configuration directives (such as <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Include</directive> or <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_so">LoadModule</directive>, for example) are taken as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd relative to this directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <highlight language="config">ServerRoot "/home/httpd"</highlight>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default location of <directive>ServerRoot</directive> may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modified by using the <code>--prefix</code> argument to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/programs/configure.html"><code>configure</code></a>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most third-party distributions of the server have a different
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess default location from the one listed above.</p>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd permissions on the <directive>ServerRoot</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<directivesynopsis>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<name>ServerSignature</name>
2025fe01de41805f6148851335693aa5ebe2faffnd<description>Configures the footer on server-generated documents</description>
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<syntax>ServerSignature On|Off|EMail</syntax>
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<default>ServerSignature Off</default>
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq<contextlist><context>server config</context><context>virtual host</context>
91d09a9328c13761516ce2fedeeb23f525d4ec75nd<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<override>All</override>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerSignature</directive> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, <module>mod_proxy</module> ftp directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listings, <module>mod_info</module> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user often has no possibility to tell which of the chained servers
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
003f0c9fda6664daf5092a0e42f65ede20098153slive therefore compatible with the behavior of Apache-1.2 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive below). The <code>On</code> setting simply adds a line with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server version number and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerName</directive> of the serving virtual host,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and the <code>EMail</code> setting additionally creates a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "mailto:" reference to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerAdmin</directive> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, the details of the server version number
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive presented are controlled by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerTokens</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerTokens</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerTokens</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheader</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ServerTokens Full</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>Server sends (<em>e.g.</em>): <code>Server:
130d299c4b2b15be45532a176604c71fdc7bea5bnd Apache</code></dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>ServerTokens Major</code></dt>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dd>Server sends (<em>e.g.</em>): <code>Server:
130d299c4b2b15be45532a176604c71fdc7bea5bnd Apache/2</code></dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Minor</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Min[imal]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt><code>ServerTokens OS</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
fa71303e53e7ef460728446b8290d05ed0895136trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <p>This setting applies to the entire server, and cannot be
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen enabled or disabled on a virtualhost-by-virtualhost basis.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, this directive also controls the
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton information presented by the <directive
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton module="core">ServerSignature</directive> directive.</p>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Setting <directive>ServerTokens</directive> to less than
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton <code>minimal</code> is not recommended because it makes it more
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton difficult to debug interoperational problems. Also note that
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton disabling the Server: header does nothing at all to make your
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server more secure; the idea of "security through obscurity"
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton is a myth and leads to a false sense of safety.</note>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton</usage>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<seealso><directive module="core">ServerSignature</directive></seealso>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton</directivesynopsis>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<directivesynopsis>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<name>SetHandler</name>
b91096bcdd71fcbb37c9905f6cf79e930ae349b1jorton<description>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>SetHandler <var>handler-name</var>|None</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<override>FileInfo</override>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<compatibility>Moved into the core in Apache httpd 2.0</compatibility>
f59a2b72270d63d121d6a1a01d85fb87d8a8bb45rbowen
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<usage>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>When placed into an <code>.htaccess</code> file or a
d2ec55d959780924c999ce1a75d54e1030896608covener <directive type="section" module="core">Directory</directive> or
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <directive type="section" module="core">Location</directive>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe section, this directive forces all matching files to be parsed
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe through the <a href="/handler.html">handler</a> given by
12099dff89f3135d53929f4f1bdb42c7d044d928nd <var>handler-name</var>. For example, if you had a directory you
12099dff89f3135d53929f4f1bdb42c7d044d928nd wanted to be parsed entirely as imagemap rule files, regardless
12099dff89f3135d53929f4f1bdb42c7d044d928nd of extension, you might put the following into an
12099dff89f3135d53929f4f1bdb42c7d044d928nd <code>.htaccess</code> file in that directory:</p>
12099dff89f3135d53929f4f1bdb42c7d044d928nd
12099dff89f3135d53929f4f1bdb42c7d044d928nd <highlight language="config">SetHandler imap-file</highlight>
12099dff89f3135d53929f4f1bdb42c7d044d928nd
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe <p>Another example: if you wanted to have the server display a
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe status report whenever a URL of
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>http://servername/status</code> was called, you might put
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe the following into <code>httpd.conf</code>:</p>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe
12099dff89f3135d53929f4f1bdb42c7d044d928nd <highlight language="config">
12099dff89f3135d53929f4f1bdb42c7d044d928nd&lt;Location "/status"&gt;
12099dff89f3135d53929f4f1bdb42c7d044d928nd SetHandler server-status
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe&lt;/Location&gt;
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe </highlight>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf <p>You can override an earlier defined <directive>SetHandler</directive>
20b0f809c3823eda58808be053ffc305dfa9c785sf directive by using the value <code>None</code>.</p>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf <note><title>Note</title>
20b0f809c3823eda58808be053ffc305dfa9c785sf <p>Because <directive>SetHandler</directive> overrides default handlers,
20b0f809c3823eda58808be053ffc305dfa9c785sf normal behavior such as handling of URLs ending in a slash (/) as
20b0f809c3823eda58808be053ffc305dfa9c785sf directories or index files is suppressed.</p></note>
20b0f809c3823eda58808be053ffc305dfa9c785sf</usage>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf<seealso><directive module="mod_mime">AddHandler</directive></seealso>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf</directivesynopsis>
20b0f809c3823eda58808be053ffc305dfa9c785sf
20b0f809c3823eda58808be053ffc305dfa9c785sf<directivesynopsis>
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
fb294b146e7ceb48e3983ee3684ba6c6506241c0jim</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>SetInputFilter</directive> directive sets the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen filter or filters which will process client requests and POST
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd input when they are received by the server. This is in addition to
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen any filters defined elsewhere, including the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_mime">AddInputFilter</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
1fd5131d5732e639b0b4225ca0afea717c41bc11trawick<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>SetOutputFilter</name>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<description>Sets the filters that will process responses from the
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowenserver</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetOutputFilter <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<usage>
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick <p>The <directive>SetOutputFilter</directive> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen sent to the client. This is in addition to any filters defined
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick elsewhere, including the
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <directive module="mod_mime">AddOutputFilter</directive>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen directive.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the <code>/www/data/</code> directory for server-side
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <highlight language="config">
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen&lt;Directory "/www/data/"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetOutputFilter INCLUDES
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive&lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </highlight>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>If more than one filter is specified, they must be separated
130d299c4b2b15be45532a176604c71fdc7bea5bnd by semicolons in the order in which they should process the
130d299c4b2b15be45532a176604c71fdc7bea5bnd content.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<directivesynopsis>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<name>TimeOut</name>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<description>Amount of time the server will wait for
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jimcertain events before failing a request</description>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<syntax>TimeOut <var>seconds</var></syntax>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<default>TimeOut 60</default>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<contextlist><context>server config</context><context>virtual host</context></contextlist>
d56970df0a3d627ea0bc8867a9d336cfe67da7b2nd
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<usage>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>The <directive>TimeOut</directive> directive defines the length
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim of time Apache httpd will wait for I/O in various circumstances:</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <ol>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>When reading data from the client, the length of time to
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen wait for a TCP packet to arrive if the read buffer is
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim empty.</li>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>When writing data to the client, the length of time to wait
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim for an acknowledgement of a packet if the send buffer is
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim full.</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>In <module>mod_cgi</module>, the length of time to wait for
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim output from a CGI script.</li>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <li>In <module>mod_ext_filter</module>, the length of time to
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd wait for output from a filtering process.</li>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <li>In <module>mod_proxy</module>, the default timeout value if
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <directive module="mod_proxy">ProxyTimeout</directive> is not
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd configured.</li>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd </ol>
4e8794dab6bbd15eb0bb016c7a4efb8b0572d558nd
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</usage>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</directivesynopsis>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<directivesynopsis>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<name>TraceEnable</name>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<description>Determines the behavior on <code>TRACE</code> requests</description>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<syntax>TraceEnable <var>[on|off|extended]</var></syntax>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<default>TraceEnable on</default>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<contextlist><context>server config</context><context>virtual host</context></contextlist>
4e8794dab6bbd15eb0bb016c7a4efb8b0572d558nd<compatibility>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</compatibility>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd<usage>
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd <p>This directive overrides the behavior of <code>TRACE</code> for both
9cfaf3cf0b6a838ae98bb174660c6220734855f0nd the core server and <module>mod_proxy</module>. The default
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>TraceEnable on</code> permits <code>TRACE</code> requests per
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim RFC 2616, which disallows any request body to accompany the request.
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <code>TraceEnable off</code> causes the core server and
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <module>mod_proxy</module> to return a <code>405</code> (Method not
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim allowed) error to the client.</p>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <p>Finally, for testing and diagnostic purposes only, request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive bodies may be allowed using the non-compliant <code>TraceEnable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extended</code> directive. The core (as an origin server) will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrict the request body to 64k (plus 8k for chunk headers if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Transfer-Encoding: chunked</code> is used). The core will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reflect the full headers and all chunk headers with the response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. As a proxy server, the request body is not restricted to 64k.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Despite claims to the contrary, <code>TRACE</code> is not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a security vulnerability and there is no viable reason for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it to be disabled. Doing so necessarily makes your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-compliant.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<directivesynopsis>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<name>UnDefine</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Undefine the existence of a variable</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>UnDefine <var>parameter-name</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Undoes the effect of a <directive module="core">Define</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of passing a <code>-D</code> argument to <program>httpd</program>.</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <p>This directive can be used to toggle the use of <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">IfDefine</directive> sections without needing to alter
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-D</code> arguments in any startup scripts.</p>
01710fa5f312f3a9cd1969d1809cf6c19a7f3d31niq</usage>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive</directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<name>UseCanonicalName</name>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<description>Configures how the server determines its own name and
a23acbbd61b9565caecea9931b6bcdf0b6228cbbsliveport</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>UseCanonicalName On|Off|DNS</syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<default>UseCanonicalName Off</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<context>directory</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
e8811b6d38f756b325446ded5d96857d13856511takashi<usage>
e8811b6d38f756b325446ded5d96857d13856511takashi <p>In many situations Apache httpd must construct a <em>self-referential</em>
e8811b6d38f756b325446ded5d96857d13856511takashi URL -- that is, a URL that refers back to the same server. With
e8811b6d38f756b325446ded5d96857d13856511takashi <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
e8811b6d38f756b325446ded5d96857d13856511takashi specified in the <directive module="core">ServerName</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive to construct the canonical name for the server. This name
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is used in all self-referential URLs, and for the values of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>With <code>UseCanonicalName Off</code> Apache httpd will form
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd self-referential URLs using the hostname and port supplied by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the client if any are supplied (otherwise it will use the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd canonical name, as defined above). These values are the same
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that are used to implement <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/vhosts/name-based.html">name-based virtual hosts</a>,
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener and are available with the same clients. The CGI variables
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
130d299c4b2b15be45532a176604c71fdc7bea5bnd constructed from the client supplied values as well.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>An example where this may be useful is on an intranet server
130d299c4b2b15be45532a176604c71fdc7bea5bnd where you have users connecting to the machine using short
130d299c4b2b15be45532a176604c71fdc7bea5bnd names such as <code>www</code>. You'll notice that if the users
130d299c4b2b15be45532a176604c71fdc7bea5bnd type a shortname, and a URL which is a directory, such as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>http://www/splat</code>, <em>without the trailing
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess slash</em> then Apache httpd will redirect them to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www.example.com/splat/</code>. If you have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication enabled, this will cause the user to have to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for <code>www.example.com</code> -- see <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the FAQ on this subject for more information</a>). But if
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive>UseCanonicalName</directive> is set <code>Off</code>, then
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive Apache httpd will redirect to <code>http://www/splat/</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>There is a third option, <code>UseCanonicalName DNS</code>,
130d299c4b2b15be45532a176604c71fdc7bea5bnd which is intended for use with mass IP-based virtual hosting to
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen support ancient clients that do not provide a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>Host:</code> header. With this option Apache httpd does a
130d299c4b2b15be45532a176604c71fdc7bea5bnd reverse DNS lookup on the server IP address that the client
130d299c4b2b15be45532a176604c71fdc7bea5bnd connected to in order to work out self-referential URLs.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <note type="warning"><title>Warning</title>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive they may be broken by this option. The client is essentially free
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive to give whatever value they want as a hostname. But if the CGI is
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive only using <code>SERVER_NAME</code> to construct self-referential URLs
4cf1c07a88ef51e11570c775507cd7d2c3e35a97slive then it should be just fine.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener </note>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener</usage>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis<seealso><directive module="core">ServerName</directive></seealso>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<seealso><directive module="mpm_common">Listen</directive></seealso>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener</directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<directivesynopsis>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<name>UseCanonicalPhysicalPort</name>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<description>Configures how the server determines its own port</description>
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis<syntax>UseCanonicalPhysicalPort On|Off</syntax>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<default>UseCanonicalPhysicalPort Off</default>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<contextlist><context>server config</context><context>virtual host</context>
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier<context>directory</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>In many situations Apache httpd must construct a <em>self-referential</em>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
130d299c4b2b15be45532a176604c71fdc7bea5bnd constructing the canonical port for the server to honor
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive module="core">UseCanonicalName</directive> directive,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen provide the actual physical port number being used by this request
ef8e89e090461194ecadd31e8796a2c51e0531a2kess as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Apache httpd will not ever use the actual physical port number, instead
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relying on all configured information to construct a valid port number.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note><title>Note</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The ordering of the lookup when the physical port is used is as
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess follows:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>UseCanonicalName On</code></dt>
7db9f691a00ead175b03335457ca296a33ddf31bnd <dd>
<ol>
<li>Port provided in <directive module="core">Servername</directive></li>
<li>Physical port</li>
<li>Default port</li>
</ol>
</dd>
<dt><code>UseCanonicalName Off | DNS</code></dt>
<dd>
<ol>
<li>Parsed port from <code>Host:</code> header</li>
<li>Physical port</li>
<li>Port provided in <directive module="core">Servername</directive></li>
<li>Default port</li>
</ol>
</dd>
</dl>
<p>With <code>UseCanonicalPhysicalPort Off</code>, the
physical ports are removed from the ordering.</p>
</note>
</usage>
<seealso><directive module="core">UseCanonicalName</directive></seealso>
<seealso><directive module="core">ServerName</directive></seealso>
<seealso><directive module="mpm_common">Listen</directive></seealso>
</directivesynopsis>
<directivesynopsis type="section">
<name>VirtualHost</name>
<description>Contains directives that apply only to a specific
hostname or IP address</description>
<syntax>&lt;VirtualHost
<var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
...&gt; ... &lt;/VirtualHost&gt;</syntax>
<contextlist><context>server config</context></contextlist>
<usage>
<p><directive type="section">VirtualHost</directive> and
<code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
directives that will apply only to a particular virtual host. Any
directive that is allowed in a virtual host context may be
used. When the server receives a request for a document on a
particular virtual host, it uses the configuration directives
enclosed in the <directive type="section">VirtualHost</directive>
section. <var>Addr</var> can be any of the following, optionally followed by
a colon and a port number (or *):</p>
<ul>
<li>The IP address of the virtual host;</li>
<li>A fully qualified domain name for the IP address of the
virtual host (not recommended);</li>
<li>The character <code>*</code>, which acts as a wildcard and matches
any IP address.</li>
<li>The string <code>_default_</code>, which is an alias for <code>*</code></li>
</ul>
<highlight language="config">
&lt;VirtualHost 10.1.2.3:80&gt;
ServerAdmin webmaster@host.example.com
DocumentRoot /www/docs/host.example.com
ServerName host.example.com
ErrorLog logs/host.example.com-error_log
TransferLog logs/host.example.com-access_log
&lt;/VirtualHost&gt;
</highlight>
<p>IPv6 addresses must be specified in square brackets because
the optional port number could not be determined otherwise. An
IPv6 example is shown below:</p>
<highlight language="config">
&lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80&gt;
ServerAdmin webmaster@host.example.com
DocumentRoot /www/docs/host.example.com
ServerName host.example.com
ErrorLog logs/host.example.com-error_log
TransferLog logs/host.example.com-access_log
&lt;/VirtualHost&gt;
</highlight>
<p>Each Virtual Host must correspond to a different IP address,
different port number or a different host name for the server,
in the former case the server machine must be configured to
accept IP packets for multiple addresses. (If the machine does
not have multiple network interfaces, then this can be
accomplished with the <code>ifconfig alias</code> command -- if
your OS supports it).</p>
<note><title>Note</title>
<p>The use of <directive type="section">VirtualHost</directive> does
<strong>not</strong> affect what addresses Apache httpd listens on. You
may need to ensure that Apache httpd is listening on the correct addresses
using <directive module="mpm_common">Listen</directive>.</p>
</note>
<p>A <directive module="core">ServerName</directive> should be
specified inside each <directive
type="section">VirtualHost</directive> block. If it is absent, the
<directive module="core">ServerName</directive> from the "main"
server configuration will be inherited.</p>
<p>When a request is received, the server first maps it to the best matching
<directive type="section">VirtualHost</directive> based on the local
IP address and port combination only. Non-wildcards have a higher
precedence. If no match based on IP and port occurs at all, the
"main" server configuration is used.</p>
<p>If multiple virtual hosts contain the best matching IP address and port,
the server selects from these virtual hosts the best match based on the
requested hostname. If no matching name-based virtual host is found,
then the first listed virtual host that matched the IP address will be
used. As a consequence, the first listed virtual host for a given IP address
and port combination is default virtual host for that IP and port
combination.</p>
<note type="warning"><title>Security</title>
<p>See the <a href="/misc/security_tips.html">security tips</a>
document for details on why your security could be compromised if the
directory where log files are stored is writable by anyone other
than the user that starts the server.</p>
</note>
</usage>
<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
Apache HTTP Server</a></seealso>
<seealso><a href="/bind.html">Setting
which addresses and ports Apache HTTP Server uses</a></seealso>
<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
and &lt;Files&gt; sections work</a> for an explanation of how these
different sections are combined when a request is received</seealso>
</directivesynopsis>
</modulesynopsis>