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