core.xml revision 5155e92c6100b47513159eee1b2b9914ab204a5a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="core.xml.meta">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>core</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</description>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<status>Core</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>AcceptFilter</name>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Configures optimizations for a Protocol's Listener Sockets</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<syntax>AcceptFilter <var>protocol</var> <var>accept_filter</var></syntax>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<contextlist><context>server config</context></contextlist>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<compatibility>Available in Apache httpd 2.1.5 and later.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenOn Windows from Apache httpd 2.3.3 and later.</compatibility>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<usage>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <p>This directive enables operating system specific optimizations for a
31127de9133204b2f09f6226250592ed93b61023rbowen listening socket by the Protocol type. The basic premise is for the
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic kernel to not send a socket to the server process until either data
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic is received or an entire HTTP Request is buffered. Only
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor FreeBSD's Accept Filters</a>, Linux's more primitive
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe are currently supported.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Using <code>none</code> for an argument will disable any accept filters
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe for that protocol. This is useful for protocols that require a server
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example>AcceptFilter nntp none</example>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The default protocol names are <code>https</code> for port 443
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna and <code>http</code> for all other ports. To specify another protocol
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier is being used with a listening port, add the <var>protocol</var>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier argument to the <directive module="mpm_common">Listen</directive>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier directive.</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <p>The default values on FreeBSD are:</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter http httpready <br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic AcceptFilter https dataready
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the kernel level. Once an entire request is received, the kernel then
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna sends it to the server. See the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 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">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor accf_data(9)</a> filter is used.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The default values on Linux are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter http data <br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic AcceptFilter https data
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <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
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor see the Linux
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor tcp(7)</a> man page.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The default values on Windows are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe AcceptFilter http data <br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic AcceptFilter https data
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <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
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic 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
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<seealso><directive>Protocol</directive></seealso>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</directivesynopsis>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<name>AcceptPathInfo</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Resources accept trailing pathname information</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AcceptPathInfo On|Off|Default</syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<default>AcceptPathInfo Default</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache httpd 2.0.30 and later</compatibility>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>here.html</code>. Then requests for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/nothere.html/more</code> both collect
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/more</code> as <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive leading path component maps to a file that exists. The above
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess href="mod_cgi.html">cgi-script</a> and <a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess href="mod_isapi.html">isapi-handler</a>, generally accept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATH_INFO</code> by default.</dd>
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen </dl>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The primary purpose of the <code>AcceptPathInfo</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to allow you to override the handler's choice of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accepting or rejecting <code>PATH_INFO</code>. This override is required,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
fb77c505254b6e9c925e23e734463e87574f8f40kess based on <code>PATH_INFO</code>. The core handler would usually reject
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request, so you can use the following configuration to enable
fb77c505254b6e9c925e23e734463e87574f8f40kess such a script:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Files "mypaths.shtml"&gt;<br />
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <indent>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic Options +Includes<br />
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh SetOutputFilter INCLUDES<br />
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh AcceptPathInfo On<br />
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh </indent>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;/Files&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AccessFileName</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Name of the distributed configuration file</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AccessFileName .htaccess</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>While processing a request the server looks for
003f0c9fda6664daf5092a0e42f65ede20098153slive the first existing configuration file from this list of names in
003f0c9fda6664daf5092a0e42f65ede20098153slive every directory of the path to the document, if distributed
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess configuration files are <a href="#allowoverride">enabled for that
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directory</a>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AccessFileName .acl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>before returning the document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/usr/local/web/index.html</code>, the server will read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/.acl</code>, <code>/usr/.acl</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic for directives, unless they have been disabled with</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;Directory /&gt;<br />
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">AllowOverride</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/configuring.html">Configuration Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<name>AddDefaultCharset</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default charset parameter to be added when a response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecontent-type is <code>text/plain</code> or <code>text/html</code></description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<default>AddDefaultCharset Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<context>.htaccess</context></contextlist>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<override>FileInfo</override>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<usage>
a8ce9095d102e43fecb81093a132b90b9a227f78kess <p>This directive specifies a default value for the media type
684f2a9a422185adda0692a1203c5ad6687fc5c5nd charset parameter (the name of a character encoding) to be added
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to a response if and only if the response's content-type is either
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>text/plain</code> or <code>text/html</code>. This should override
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding any charset specified in the body of the response via a <code>META</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding element, though the exact behavior is often dependent on the user's client
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding configuration. A setting of <code>AddDefaultCharset Off</code>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding disables this functionality. <code>AddDefaultCharset On</code> enables
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding a default charset of <code>iso-8859-1</code>. Any other value is assumed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be the <var>charset</var> to be used, which should be one of the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <a href="http://www.iana.org/assignments/character-sets">IANA registered
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding 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
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <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
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding character encoding and it is too inconvenient to label their charset
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding individually. One such example is to add the charset parameter
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to resources containing generated content, such as legacy CGI
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding scripts, that might be vulnerable to cross-site scripting attacks
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive due to user-provided data being included in the output. Note, however,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that a better solution is to just fix (or delete) those scripts, since
77ead9e0262e4f08ec336d1a65b2edef7705c839nd setting a default charset does not protect users that have enabled
77ead9e0262e4f08ec336d1a65b2edef7705c839nd the "auto-detect character encoding" feature on their browser.</p>
9583adab6bc4b3758e41963c905d9dad9f067131nd</usage>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<seealso><directive module="mod_mime">AddCharset</directive></seealso>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AllowEncodedSlashes</name>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<description>Determines whether encoded path separators in URLs are allowed to
3770ed746d69c7a4111cba9966169bd5d7a509a6poirierbe passed through</description>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<syntax>AllowEncodedSlashes On|Off</syntax>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<default>AllowEncodedSlashes Off</default>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<contextlist><context>server config</context><context>virtual host</context>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</contextlist>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<compatibility>Available in Apache httpd 2.0.46 and later</compatibility>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<usage>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier which contain encoded path separators (<code>%2F</code> for <code>/</code>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier and additionally <code>%5C</code> for <code>\</code> on according systems)
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier
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>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier </note>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier</usage>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier<seealso><directive module="core">AcceptPathInfo</directive></seealso>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AllowOverride</name>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<description>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<code>.htaccess</code> files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowOverride All|None|<var>directive-type</var>
003f0c9fda6664daf5092a0e42f65ede20098153slive[<var>directive-type</var>] ...</syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<default>AllowOverride All</default>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>directory</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
4ea161d94782fa56f4b36d496f35ff8577c43065covener<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When the server finds an <code>.htaccess</code> file (as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified by <directive module="core">AccessFileName</directive>)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it needs to know which directives declared in that file can override
fb77c505254b6e9c925e23e734463e87574f8f40kess earlier configuration directives.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <note><title>Only available in &lt;Directory&gt; sections</title>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive>AllowOverride</directive> is valid only in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess sections specified without regular expressions, not in <directive
10673857794a4b3d9568ca2d983722a87ed352f1rbowen type="section" module="core">Location</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core" type="section">DirectoryMatch</directive> or
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <directive type="section" module="core">Files</directive> sections.
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd </note>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>When this directive is set to <code>None</code>, then
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <a href="#accessfilename">.htaccess</a> files are completely ignored.
10673857794a4b3d9568ca2d983722a87ed352f1rbowen In this case, the server will not even attempt to read
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>.htaccess</code> files in the filesystem.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>When this directive is set to <code>All</code>, then any
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directive which has the .htaccess <a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri href="directive-dict.html#Context">Context</a> is allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>directive-type</var> can be one of the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive groupings of directives.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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>,
0834a50e694f91f4bf20ddf030fd0812e65cafc7rbowen <directive module="mod_authn_core">AuthType</directive>, <directive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="mod_authn_file">AuthUserFile</directive>, <directive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd module="mod_authz_core">Require</directive>, <em>etc.</em>).</dd>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <dt>FileInfo</dt>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling document types
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (<directive module="core">ErrorDocument</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_negotiation">LanguagePriority</directive>,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="core">SetHandler</directive>,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="core">SetInputFilter</directive>,
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="core">SetOutputFilter</directive>, and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <module>mod_mime</module> Add* and Remove* directives),
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding document meta data (<directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_headers">Header</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_headers">RequestHeader</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_setenvif">SetEnvIf</directive>, <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding module="mod_setenvif">SetEnvIfNoCase</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_setenvif">BrowserMatch</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieExpires</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieDomain</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieStyle</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieTracking</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_usertrack">CookieName</directive>),
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <module>mod_rewrite</module> directives <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteEngine</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteOptions</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_rewrite">RewriteBase</directive>, <directive
c94e2389b3470486af5b341013b8def7e201db30humbedooh 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>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh
86554dc60e298c76fd567161f47abd687008d6cchumbedooh <dt>Indexes</dt>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh
86554dc60e298c76fd567161f47abd687008d6cchumbedooh <dd>
86554dc60e298c76fd567161f47abd687008d6cchumbedooh Allow use of the directives controlling directory indexing
86554dc60e298c76fd567161f47abd687008d6cchumbedooh (<directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="mod_autoindex">AddDescription</directive>,
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive module="mod_autoindex">AddIcon</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem 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>
06cec0eb90affb7f85de964d1822fddc77553c32humbedooh
06cec0eb90affb7f85de964d1822fddc77553c32humbedooh <dd>
0834a50e694f91f4bf20ddf030fd0812e65cafc7rbowen Allow use of the directives controlling host access (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Allow</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Deny</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Order</directive>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Options[=<var>Option</var>,...]</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling specific directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive features (<directive module="core">Options</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_include">XBitHack</directive>).
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen An equal sign may be given followed by a comma (but no spaces)
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen separated lists of options that may be set using the <directive
8cb1b3a3753304d51919865f588cbe19cbd0182arbowen module="core">Options</directive> command.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen <p>Example:</p>
83f7a8612f5d7899d2d84d6f3f83f1ca4f86cc56rbowen
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <example>
e67969aeb443b18bbb3837690c4010c3f1961842jim AllowOverride AuthConfig Indexes
e67969aeb443b18bbb3837690c4010c3f1961842jim </example>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <p>In the example above all directives that are neither in the group
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
eb73941bd697cd7e8226ceaf04183ade6c66934dniq server error.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <note><p>For security and performance reasons, do not set
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code>AllowOverride</code> to anything other than <code>None</code>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq in your <code>&lt;Directory /&gt;</code> block. Instead, find (or
eb73941bd697cd7e8226ceaf04183ade6c66934dniq create) the <code>&lt;Directory&gt;</code> block that refers to the
eb73941bd697cd7e8226ceaf04183ade6c66934dniq directory where you're actually planning to place a
eb73941bd697cd7e8226ceaf04183ade6c66934dniq <code>.htaccess</code> file.</p>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq </note>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq</usage>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
184255c60354393e95feca30bbc8dec660f612abnd<seealso><directive module="core">AccessFileName</directive></seealso>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<seealso><a href="/configuring.html">Configuration Files</a></seealso>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq</directivesynopsis>
eb73941bd697cd7e8226ceaf04183ade6c66934dniq
eb73941bd697cd7e8226ceaf04183ade6c66934dniq<directivesynopsis>
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jim<name>CGIMapExtension</name>
beefdf2539f2cd75fd45f5d560cbb26783ff9db1jim<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna<override>FileInfo</override>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna<compatibility>NetWare only</compatibility>
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess
9970ad80054f477c708284a0d030a5bd26e412a9covener<usage>
9970ad80054f477c708284a0d030a5bd26e412a9covener <p>This directive is used to control how Apache httpd finds the
9970ad80054f477c708284a0d030a5bd26e412a9covener interpreter used to run CGI scripts. For example, setting
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>CGIMapExtension sys:\foo.nlm .foo</code> will
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim cause all CGI script files with a <code>.foo</code> extension to
9970ad80054f477c708284a0d030a5bd26e412a9covener be passed to the FOO interpreter.</p>
9970ad80054f477c708284a0d030a5bd26e412a9covener</usage>
9970ad80054f477c708284a0d030a5bd26e412a9covener</directivesynopsis>
9970ad80054f477c708284a0d030a5bd26e412a9covener
9970ad80054f477c708284a0d030a5bd26e412a9covener<directivesynopsis>
d8655d95f4c9f281adc457de9ef702b46b003153rbowen<name>ContentDigest</name>
d8655d95f4c9f281adc457de9ef702b46b003153rbowen<description>Enables the generation of <code>Content-MD5</code> HTTP Response
08a6627a8cb9a9c85392cd0d8680c112a7f857cetrawickheaders</description>
d8655d95f4c9f281adc457de9ef702b46b003153rbowen<syntax>ContentDigest On|Off</syntax>
9970ad80054f477c708284a0d030a5bd26e412a9covener<default>ContentDigest Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>Options</override>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<status>Experimental</status>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<usage>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>This directive enables the generation of
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <code>Content-MD5</code> headers as defined in RFC1864
da637bcae7b6e150470e701af29da5604a34a17erbowen respectively RFC2616.</p>
da637bcae7b6e150470e701af29da5604a34a17erbowen
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>MD5 is an algorithm for computing a "message digest"
da637bcae7b6e150470e701af29da5604a34a17erbowen (sometimes called "fingerprint") of arbitrary-length data, with
da637bcae7b6e150470e701af29da5604a34a17erbowen a high degree of confidence that any alterations in the data
da637bcae7b6e150470e701af29da5604a34a17erbowen will be reflected in alterations in the message digest.</p>
da637bcae7b6e150470e701af29da5604a34a17erbowen
da637bcae7b6e150470e701af29da5604a34a17erbowen <p>The <code>Content-MD5</code> header provides an end-to-end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message integrity check (MIC) of the entity-body. A proxy or
7802d43d20007fa575e43b6ae77d5177ceffdb71sf client may check this header for detecting accidental
7802d43d20007fa575e43b6ae77d5177ceffdb71sf modification of the entity-body in transit. Example header:</p>
7802d43d20007fa575e43b6ae77d5177ceffdb71sf
7802d43d20007fa575e43b6ae77d5177ceffdb71sf <example>
86120957a14f91da0a1a103eaf4d7710b1dd9e2asf Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Note that this can cause performance problems on your server
113961f0559eb026ea0d379cb7350f82bc09d710druggeri since the message digest is computed on every request (the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri values are not cached).</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p><code>Content-MD5</code> is only sent for documents served
113961f0559eb026ea0d379cb7350f82bc09d710druggeri by the <module>core</module>, and not by any module. For example,
113961f0559eb026ea0d379cb7350f82bc09d710druggeri SSI documents, output from CGI scripts, and byte range responses
113961f0559eb026ea0d379cb7350f82bc09d710druggeri do not have this header.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<name>DefaultType</name>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<description>This directive has no effect other than to emit warnings
113961f0559eb026ea0d379cb7350f82bc09d710druggeriif the value is not <code>none</code>. In prior versions, DefaultType
113961f0559eb026ea0d379cb7350f82bc09d710druggeriwould specify a default media type to assign to response content for
113961f0559eb026ea0d379cb7350f82bc09d710druggeriwhich no other media type configuration could be found.
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<syntax>DefaultType <var>media-type|none</var></syntax>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<default>DefaultType none</default>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>server config</context><context>virtual host</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<context>directory</context><context>.htaccess</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<override>FileInfo</override>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<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>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>This directive has been disabled. For backwards compatibility
113961f0559eb026ea0d379cb7350f82bc09d710druggeri of configuration files, it may be specified with the value
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>none</code>, meaning no default media type. For example:</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic DefaultType None
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p><code>DefaultType None</code> is only available in
113961f0559eb026ea0d379cb7350f82bc09d710druggeri httpd-2.2.7 and later.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Use the mime.types configuration file and the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive module="mod_mime">AddType</directive> to configure media
113961f0559eb026ea0d379cb7350f82bc09d710druggeri type assignments via file extensions, or the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive module="core">ForceType</directive> directive to configure
2aa51ed61adb484602e94de3d2214ec267aecedbigalic the media type for specific resources. Otherwise, the server will
2aa51ed61adb484602e94de3d2214ec267aecedbigalic send the response without a Content-Type header field and the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic recipient may attempt to guess the media type.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<name>Define</name>
44d199e4e31c535de0afd97844a2146529a03ed1rbowen<description>Define the existence of a variable</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<syntax>Define <var>parameter-name</var></syntax>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>server config</context></contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>Equivalent to passing the <code>-D</code> argument to <program
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >httpd</program>.</p>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen <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>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</usage>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<directivesynopsis type="section">
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>Directory</name>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<description>Enclose a group of directives that apply only to the
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesnamed file-system directory and sub-directories</description>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<syntax>&lt;Directory <var>directory-path</var>&gt;
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes... &lt;/Directory&gt;</syntax>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<contextlist><context>server config</context><context>virtual host</context>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</contextlist>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive type="section">Directory</directive> and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>&lt;/Directory&gt;</code> are used to enclose a group of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directives that will apply only to the named directory and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes sub-directories of that directory. Any directive that is allowed
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes in a directory context may be used. <var>Directory-path</var> is
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes either the full path to a directory, or a wild-card string using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unix shell-style matching. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess characters. You may also use <code>[]</code> character ranges. None
fb77c505254b6e9c925e23e734463e87574f8f40kess of the wildcards match a `/' character, so <code>&lt;Directory
fb77c505254b6e9c925e23e734463e87574f8f40kess /*/public_html&gt;</code> will not match
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/home/user/public_html</code>, but <code>&lt;Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /home/*/public_html&gt;</code> will match. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /usr/local/httpd/htdocs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful with the <var>directory-path</var> arguments:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive They have to literally match the filesystem path which Apache httpd uses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to access the files. Directives applied to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory&gt;</code> will not apply to files accessed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that same directory via a different path, such as via different symbolic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><glossary ref="regex">Regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions</glossary> can also be used, with the addition of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>~</code> character. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>If multiple (non-regular expression) <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess type="section">Directory</directive> sections
fb77c505254b6e9c925e23e734463e87574f8f40kess match the directory (or one of its parents) containing a document,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then the directives are applied in the order of shortest match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive first, interspersed with the directives from the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="#accessfilename">.htaccess</a> files. For example,
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim with</p>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <example>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;Directory /&gt;<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim AllowOverride None<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </indent>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;/Directory&gt;<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim &lt;Directory /home/&gt;<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <indent>
3339ba66526d917876a7c4453c6face113f7d5a1trawick AllowOverride FileInfo<br />
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </indent>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh &lt;/Directory&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>for access to the document <code>/home/web/dir/doc.html</code>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim the steps are:</p>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <ul>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply directive <code>AllowOverride None</code>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim (disabling <code>.htaccess</code> files).</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply directive <code>AllowOverride FileInfo</code> (for
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim directory <code>/home</code>).</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <li>Apply any <code>FileInfo</code> directives in
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <code>/home/web/dir/.htaccess</code> in that order.</li>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim </ul>
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim
2dada762fb99649c2a57bb9e19fe1666f2c20c38jim <p>Regular expressions are not considered until after all of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal sections have been applied. Then all of the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions are tested in the order they appeared in the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding configuration file. For example, with</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;Directory ~ abc$&gt;<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding # ... directives here ...<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>the regular expression section won't be considered until after
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen all normal <directive type="section">Directory</directive>s and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files have been applied. Then the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expression will match on <code>/home/abc/public_html/abc</code> and
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the corresponding <directive type="section">Directory</directive> will
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding be applied.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note that the default access for
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
e4881891552e185a7408318dfc7f62ebabe73cf6niq This means that Apache httpd will serve any file mapped from an URL. It is
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding recommended that you change this with a block such
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding as</strong></p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;Directory /&gt;<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Order Deny,Allow<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Deny from All<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </indent>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <em>want</em> accessible. See the <a
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl href="/misc/security_tips.html">Security Tips</a> page for more
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf details.</strong></p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>The directory sections occur in the <code>httpd.conf</code> file.
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <directive type="section">Directory</directive> directives
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl cannot nest, and cannot appear in a <directive module="core"
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl type="section">Limit</directive> or <directive module="core"
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf type="section">LimitExcept</directive> section.</p>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</usage>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<seealso><a href="/sections.html">How &lt;Directory&gt;,
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf explanation of how these different sections are combined when a
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf request is received</seealso>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf</directivesynopsis>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<directivesynopsis type="section">
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<name>DirectoryMatch</name>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf<description>Enclose directives that apply to
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsffile-system directories matching a regular expression.</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic... &lt;/DirectoryMatch&gt;</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><directive type="section">DirectoryMatch</directive> and
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
b69e5120af5b107504c74dbe0228946378ab80b2rbowen of directives which will apply only to the named directory,
b69e5120af5b107504c74dbe0228946378ab80b2rbowen the same as <directive module="core" type="section">Directory</directive>.
2aa51ed61adb484602e94de3d2214ec267aecedbigalic However, it takes as an argument a
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf <glossary ref="regex">regular expression</glossary>. For example:</p>
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf <example>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl </example>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of three
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
898475b582dd849de5915df0f2089b72ed8b2e2bcovener <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Trailing Slash</title>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener This directive applies to requests for directories that may or may
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor not end in a trailing slash, so expressions that are anchored to the
898475b582dd849de5915df0f2089b72ed8b2e2bcovener end of line ($) must be written with care.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
003f0c9fda6664daf5092a0e42f65ede20098153slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive type="section" module="core">Directory</directive> for
fb77c505254b6e9c925e23e734463e87574f8f40kessa description of how regular expressions are mixed in with normal
fb77c505254b6e9c925e23e734463e87574f8f40kess<directive type="section">Directory</directive>s</seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a
003f0c9fda6664daf5092a0e42f65ede20098153slivehref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
003f0c9fda6664daf5092a0e42f65ede20098153slive&lt;Files&gt; sections work</a> for an explanation of how these different
003f0c9fda6664daf5092a0e42f65ede20098153slivesections are combined when a request is received</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>DocumentRoot</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Directory that forms the main document tree visible
2aa51ed61adb484602e94de3d2214ec267aecedbigalicfrom the web</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>DocumentRoot <var>directory-path</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>DocumentRoot /usr/local/apache/htdocs</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive sets the directory from which <program>httpd</program>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd will serve files. Unless matched by a directive like <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_alias">Alias</directive>, the server appends the
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen path from the requested URL to the document root to make the
030108b1816bcda3d925df65357feabdce83bc94slive path to the document. Example:</p>
030108b1816bcda3d925df65357feabdce83bc94slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd DocumentRoot /usr/web
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh </example>
2531f46e415fc4e43fd1724a8687782fcc58be77humbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>then an access to
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <code>http://www.my.host.com/index.html</code> refers to
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <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
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">ServerRoot</directive>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>DocumentRoot</directive> should be specified without
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess a trailing slash.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<seealso><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveLocations</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>EnableMMAP</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Use memory-mapping to read files during delivery</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>EnableMMAP On|Off</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>EnableMMAP On</default>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<context>directory</context><context>.htaccess</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<override>FileInfo</override>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive controls whether the <program>httpd</program> may use
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-mapping if it needs to read the contents of a file during
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive delivery. By default, when the handling of a request requires
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive access to the data within a file -- for example, when delivering a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server-parsed file using <module>mod_include</module> -- Apache httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-maps the file if the OS supports it.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This memory-mapping sometimes yields a performance improvement.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive But in some environments, it is better to disable the memory-mapping
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to prevent operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <ul>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <li>On some multiprocessor systems, memory-mapping can reduce the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess performance of the <program>httpd</program>.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Deleting or truncating a file while <program>httpd</program>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive has it memory-mapped can cause <program>httpd</program> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive crash with a segmentation fault.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic you should disable memory-mapping of delivered files by specifying:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh <example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic EnableMMAP Off
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For NFS mounted files, this feature may be disabled explicitly for
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the offending files by specifying:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <example>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess &lt;Directory "/path-to-nfs-files"&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableMMAP Off
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </indent>
4e10c61d7f924071cad435df940a8f325015b2d3rbowen &lt;/Directory&gt;
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>EnableSendfile</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Use the kernel sendfile support to deliver files to the client</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>EnableSendfile On|Off</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>EnableSendfile Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess<compatibility>Available in version 2.0.44 and later. Default changed to Off in
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveversion 2.3.9.</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether <program>httpd</program> may use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sendfile support from the kernel to transmit file contents to the client.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive By default, when the handling of a request requires no access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the data within a file -- for example, when delivering a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess static file -- Apache httpd uses sendfile to deliver the file contents
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess without ever reading the file if the OS supports it.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This sendfile mechanism avoids separate read and send operations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and buffer allocations. But on some platforms or within some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystems, it is better to disable this feature to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <ul>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener <li>Some platforms may have broken sendfile support that the build
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd system did not detect, especially if the binaries were built on
7b5535ed88e0f561b3bfb3330137bd804846afd4slive another box and moved to such a machine with broken sendfile
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux the use of sendfile triggers TCP-checksum
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offloading bugs on certain networking cards when using IPv6.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On Linux on Itanium, sendfile may be unable to handle files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive over 2GB in size.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With a network-mounted <directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor module="core">DocumentRoot</directive> (e.g., NFS, SMB, CIFS, FUSE),
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the kernel may be unable to serve the network file through
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor its own cache.</li>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>For server configurations that are not vulnerable to these problems,
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh you may enable this feature by specifying:</p>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <example>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh EnableSendfile On
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For network mounted files, this feature may be disabled explicitly
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener for the offending files by specifying:</p>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <example>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener &lt;Directory "/path-to-nfs-files"&gt;
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <indent>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener EnableSendfile Off
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </indent>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener &lt;/Directory&gt;
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener </example>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>Please note that the per-directory and .htaccess configuration
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor of <directive>EnableSendfile</directive> is not supported by
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <module>mod_disk_cache</module>.
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener Only global definition of <directive>EnableSendfile</directive>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener is taken into account by the module.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>ErrorDocument</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>What the server will return to the client
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessin case of an error</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Quoting syntax for text messages is different in Apache HTTP Server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <ol>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>output a simple hardcoded error message</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>output a customized message</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>redirect to a local <var>URL-path</var> to handle the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh problem/error</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to an external <var>URL</var> to handle the
ffe8ed2cd88be2c415ddef11f50394c52df9190ctrawick problem/error</li>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </ol>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or a message. Apache httpd will sometimes offer additional information
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regarding the problem/error.</p>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen <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
6b15044d54a096e6323ff1540f1a491e8de7622dsf can be provided to be displayed by the browser. Examples:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 401 /subscription_info.html<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 403 "Sorry can't allow you access today"
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Additionally, the special value <code>default</code> can be used
6b15044d54a096e6323ff1540f1a491e8de7622dsf to specify Apache httpd's simple hardcoded message. While not required
6b15044d54a096e6323ff1540f1a491e8de7622dsf under normal circumstances, <code>default</code> will restore
6b15044d54a096e6323ff1540f1a491e8de7622dsf Apache httpd's simple hardcoded message for configurations that would
6b15044d54a096e6323ff1540f1a491e8de7622dsf otherwise inherit an existing <directive>ErrorDocument</directive>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf &lt;Directory /web/docs&gt;<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf <indent>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorDocument 404 default<br />
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </indent>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;/Directory&gt;
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Note that when you specify an <directive>ErrorDocument</directive>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh that points to a remote URL (ie. anything with a method such as
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic client to tell it where to find the document, even if the
6b15044d54a096e6323ff1540f1a491e8de7622dsf document ends up being on the same server. This has several
6b15044d54a096e6323ff1540f1a491e8de7622dsf implications, the most important being that the client will not
6b15044d54a096e6323ff1540f1a491e8de7622dsf receive the original error status code, but instead will
6b15044d54a096e6323ff1540f1a491e8de7622dsf receive a redirect status code. This in turn can confuse web
6b15044d54a096e6323ff1540f1a491e8de7622dsf robots and other clients which try to determine if a URL is
6b15044d54a096e6323ff1540f1a491e8de7622dsf valid using the status code. In addition, if you use a remote
6b15044d54a096e6323ff1540f1a491e8de7622dsf URL in an <code>ErrorDocument 401</code>, the client will not
6b15044d54a096e6323ff1540f1a491e8de7622dsf know to prompt the user for a password since it will not
6b15044d54a096e6323ff1540f1a491e8de7622dsf receive the 401 status code. Therefore, <strong>if you use an
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>ErrorDocument 401</code> directive then it must refer to a local
6b15044d54a096e6323ff1540f1a491e8de7622dsf document.</strong></p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Microsoft Internet Explorer (MSIE) will by default ignore
6b15044d54a096e6323ff1540f1a491e8de7622dsf server-generated error messages when they are "too small" and substitute
6b15044d54a096e6323ff1540f1a491e8de7622dsf its own "friendly" error messages. The size threshold varies depending on
6b15044d54a096e6323ff1540f1a491e8de7622dsf the type of error, but in general, if you make your error document
6b15044d54a096e6323ff1540f1a491e8de7622dsf greater than 512 bytes, then MSIE will show the server-generated
6b15044d54a096e6323ff1540f1a491e8de7622dsf error rather than masking it. More information is available in
6b15044d54a096e6323ff1540f1a491e8de7622dsf Microsoft Knowledge Base article <a
6b15044d54a096e6323ff1540f1a491e8de7622dsf href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
6b15044d54a096e6323ff1540f1a491e8de7622dsf >Q294807</a>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Although most error messages can be overriden, there are certain
6b15044d54a096e6323ff1540f1a491e8de7622dsf circumstances where the internal messages are used regardless of the
6b15044d54a096e6323ff1540f1a491e8de7622dsf setting of <directive module="core">ErrorDocument</directive>. In
6b15044d54a096e6323ff1540f1a491e8de7622dsf particular, if a malformed request is detected, normal request processing
6b15044d54a096e6323ff1540f1a491e8de7622dsf will be immediately halted and the internal error message returned.
6b15044d54a096e6323ff1540f1a491e8de7622dsf This is necessary to guard against security problems caused by
6b15044d54a096e6323ff1540f1a491e8de7622dsf bad requests.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>If you are using mod_proxy, you may wish to enable
6b15044d54a096e6323ff1540f1a491e8de7622dsf <directive module="mod_proxy">ProxyErrorOverride</directive> so that you can provide
6b15044d54a096e6323ff1540f1a491e8de7622dsf custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
6b15044d54a096e6323ff1540f1a491e8de7622dsf Apache httpd will not generate custom error documents for proxied content.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf<seealso><a href="/custom-error.html">documentation of
2aa51ed61adb484602e94de3d2214ec267aecedbigalic customizable responses</a></seealso>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</directivesynopsis>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>ErrorLog</name>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<description>Location where the server will log errors</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
6b15044d54a096e6323ff1540f1a491e8de7622dsf<usage>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The <directive>ErrorLog</directive> directive sets the name of
6b15044d54a096e6323ff1540f1a491e8de7622dsf the file to which the server will log any errors it encounters. If
6b15044d54a096e6323ff1540f1a491e8de7622dsf the <var>file-path</var> is not absolute then it is assumed to be
6b15044d54a096e6323ff1540f1a491e8de7622dsf relative to the <directive module="core">ServerRoot</directive>.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example><title>Example</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorLog /var/log/httpd/error_log
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>If the <var>file-path</var>
6b15044d54a096e6323ff1540f1a491e8de7622dsf begins with a pipe character "<code>|</code>" then it is assumed to be a
6b15044d54a096e6323ff1540f1a491e8de7622dsf command to spawn to handle the error log.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example><title>Example</title>
6b15044d54a096e6323ff1540f1a491e8de7622dsf ErrorLog "|/usr/local/bin/httpd_errors"
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>See the notes on <a href="/logs.html#piped">piped logs</a> for
6b15044d54a096e6323ff1540f1a491e8de7622dsf more information.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>Using <code>syslog</code> instead of a filename enables logging
003f0c9fda6664daf5092a0e42f65ede20098153slive via syslogd(8) if the system supports it. The default is to use
fb77c505254b6e9c925e23e734463e87574f8f40kess syslog facility <code>local7</code>, but you can override this by
fb77c505254b6e9c925e23e734463e87574f8f40kess using the <code>syslog:<var>facility</var></code> syntax where
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <var>facility</var> can be one of the names usually documented in
af18698b10b429b270551ca3a5d51a75e1c9db22brianp syslog(1). The facility is effectively global, and if it is changed
af18698b10b429b270551ca3a5d51a75e1c9db22brianp in individual virtual hosts, the final facility specified affects the
003f0c9fda6664daf5092a0e42f65ede20098153slive entire server.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <example><title>Example</title>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd ErrorLog syslog:user
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>SECURITY: See the <a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen href="/misc/security_tips.html#serverroot">security tips</a>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd document for details on why your security could be compromised
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd if the directory where log files are stored is writable by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd anyone other than the user that starts the server.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <note type="warning"><title>Note</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>When entering a file path on non-Unix platforms, care should be taken
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to make sure that only forward slashed are used even though the platform
af18698b10b429b270551ca3a5d51a75e1c9db22brianp may allow the use of back slashes. In general it is a good idea to always
af18698b10b429b270551ca3a5d51a75e1c9db22brianp use forward slashes throughout the configuration files.</p>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </note>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</usage>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<seealso><directive module="core">LogLevel</directive></seealso>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier<seealso><a href="/logs.html">Apache HTTP Server Log Files</a></seealso>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier</directivesynopsis>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ErrorLogFormat</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Format specification for error log entries</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax> ErrorLog [connection|request] <var>format</var></syntax>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe<compatibility>Available in Apache httpd 2.3.9 and later</compatibility>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><directive>ErrorLogFormat</directive> allows to specify what
2aa51ed61adb484602e94de3d2214ec267aecedbigalic supplementary information is logged in the error log in addition to the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic actual log message.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example><title>Simple example</title>
41ef8b3051855b802104193ee0a587515af60a37wrowe ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
41ef8b3051855b802104193ee0a587515af60a37wrowe </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Specifying <code>connection</code> or <code>request</code> as first
41ef8b3051855b802104193ee0a587515af60a37wrowe paramter allows to specify additional formats, causing additional
41ef8b3051855b802104193ee0a587515af60a37wrowe information to be logged when the first message is logged for a specific
fb77c505254b6e9c925e23e734463e87574f8f40kess connection or request, respectivly. This additional information is only
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf logged once per connection/request. If a connection or request is processed
41ef8b3051855b802104193ee0a587515af60a37wrowe without causing any log message, the additional information is not logged
41ef8b3051855b802104193ee0a587515af60a37wrowe either.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>It can happen that some format string items do not produce output. For
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf example, the Referer header is only present if the log message is
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf associated to a request and the log message happens at a time when the
41ef8b3051855b802104193ee0a587515af60a37wrowe Referer header has already been read from the client. If no output is
41ef8b3051855b802104193ee0a587515af60a37wrowe produced, the default behaviour is to delete everything from the preceeding
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd space character to the next space character. This means the log line is
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd implicitly divided into fields on non-whitespace to whitespace transitions.
41ef8b3051855b802104193ee0a587515af60a37wrowe If a format string item does not produce output, the whole field is
41ef8b3051855b802104193ee0a587515af60a37wrowe ommitted. For example, if the remote address <code>%a</code> in the log
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen format <code>[%t] [%l] [%a] %M&nbsp;</code> is not available, the surrounding
41ef8b3051855b802104193ee0a587515af60a37wrowe brackets are not logged either. Space characters can be escaped with a
41ef8b3051855b802104193ee0a587515af60a37wrowe backslash to prevent them from delimiting a field. The combination '%&nbsp;'
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick (percent space) is a zero-witdh field delimiter that does not produce any
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess output.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>The above behaviour can be changed by adding modifiers to the format
41ef8b3051855b802104193ee0a587515af60a37wrowe string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
41ef8b3051855b802104193ee0a587515af60a37wrowe respective item does not produce any output. In once-per-connection/request
41ef8b3051855b802104193ee0a587515af60a37wrowe formats, it is also possible to use the <code>+</code> (plus) modifier. If an
41ef8b3051855b802104193ee0a587515af60a37wrowe item with the plus modifier does not produce any output, the whole line is
9fb925624300c864fe3969a264e52aa83f3c2dd0slive ommitted.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley <p>A number as modifier can be used to assign a log severity level to a
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley format item. The item will only be logged if the severity of the log
2025fe01de41805f6148851335693aa5ebe2faffnd message is not higher than the specified log severity level. The number can
2025fe01de41805f6148851335693aa5ebe2faffnd range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <p>Some format string items accept additional parameters in braces.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <table border="1" style="zebra">
41ef8b3051855b802104193ee0a587515af60a37wrowe <columnspec><column width=".2"/><column width=".8"/></columnspec>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <tr><th>Format&nbsp;String</th> <th>Description</th></tr>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf
41ef8b3051855b802104193ee0a587515af60a37wrowe <tr><td><code>%%</code></td>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <td>The percent sign</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <tr><td><code>%...a</code></td>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <td>Remote IP-address and port</td></tr>
41ef8b3051855b802104193ee0a587515af60a37wrowe
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <tr><td><code>%...A</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Local IP-address and port</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <tr><td><code>%...{name}e</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Request environment variable <code>name</code></td></tr>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <tr><td><code>%...E</code></td>
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin <td>APR/OS error status code and string</td></tr>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <tr><td><code>%...F</code></td>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <td>Source file name and line number of the log call</td></tr>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <tr><td><code>%...{name}i</code></td>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <td>Request header <code>name</code></td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...k</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>Number of keep-alive requests on this connection</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...l</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>Loglevel of the message</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...L</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>Log ID of the request</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...{c}L</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>Log ID of the connection</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...{C}L</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <tr><td><code>%...m</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Name of the module logging the message</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh <tr><td><code>%M</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>The actual log message</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <tr><td><code>%...{name}n</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Request note <code>name</code></td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh <tr><td><code>%...P</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Process ID of current process</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <tr><td><code>%...T</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>Thread ID of current thread</td></tr>
e2c56835b9788101b569d70661151ba7bb0ea2d6humbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <tr><td><code>%...t</code></td>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <td>The current time</td></tr>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...{u}t</code></td>
79c754eb51681c3389cd966753e902c429f78939trawick <td>The current time including micro-seconds</td></tr>
79c754eb51681c3389cd966753e902c429f78939trawick
79c754eb51681c3389cd966753e902c429f78939trawick <tr><td><code>%...{cu}t</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>The current time in compact ISO 8601 format, including
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive micro-seconds</td></tr>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr><td><code>%...v</code></td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>The canonical <directive module="core">ServerName</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the current server.</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr><td><code>%...V</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>The server name of the server serving the request according to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" >UseCanonicalName</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</td></tr>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr><td><code>\&nbsp;</code> (backslash space)</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Non-field delimiting space</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr><td><code>%&nbsp;</code> (percent space)</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Field delimiter (no output)</td></tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The log ID format <code>%L</code> produces a unique id for a connection
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or request. This can be used to correlate which log lines belong to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive same connection or request, which request happens on which connection.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd A <code>%L</code> format string is also available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_log_config</module>, to allow to correlate access log entries
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with error log lines. If <module>mod_unique_id</module> is loaded, its
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unique id will be used as log ID for requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example (somewhat similar to default format)</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P] %7F: %E: [client\ %a]
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <example><title>Example (similar to the 2.2.x format)</title>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a]
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive %M%&nbsp;,\&nbsp;referer\&nbsp;%{Referer}i"
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example><title>Advanced example with request/connection log IDs</title>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"<br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"<br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"<br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"<br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"<br/>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
f7fe99050600166042c04b8e595fb75499eed7f0geoff</usage>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><directive module="core">ErrorLog</directive></seealso>
f7fe99050600166042c04b8e595fb75499eed7f0geoff<seealso><directive module="core">LogLevel</directive></seealso>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><a href="/logs.html">Apache HTTP Server Log Files</a></seealso>
f7fe99050600166042c04b8e595fb75499eed7f0geoff</directivesynopsis>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>ExtendedStatus</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Keep track of extended status information for each
2aa51ed61adb484602e94de3d2214ec267aecedbigalicrequest</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>ExtendedStatus On|Off</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>ExtendedStatus Off[*]</default>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>server config</context></contextlist>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This option tracks additional data per worker about the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen currently executing request, and a utilization summary; you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can see these variables during runtime by configuring
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_status</module>. Note that other modules may
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rely on this scoreboard.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The collection of extended status information can slow down
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server. Also note that this setting cannot be changed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive during a graceful restart.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that loading <module>mod_status</module> will change
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default behavior to ExtendedStatus On, while other
fb77c505254b6e9c925e23e734463e87574f8f40kess third party modules may do the same. Such modules rely on
fb77c505254b6e9c925e23e734463e87574f8f40kess collecting detailed information about the state of all workers.
fb77c505254b6e9c925e23e734463e87574f8f40kess The default is changed by <module>mod_status</module> beginning
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive with version 2.3.6; the previous default was always Off.</p>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive </note>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh<directivesynopsis>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<name>FileETag</name>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<description>File attributes used to create the ETag
69fba5b8aa0b0dc408f649cfdaab064ce120b05bsliveHTTP response header for static files</description>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<syntax>FileETag <var>component</var> ...</syntax>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<default>FileETag INode MTime Size</default>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<contextlist><context>server config</context><context>virtual host</context>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<context>directory</context><context>.htaccess</context>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen</contextlist>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen<override>FileInfo</override>
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The <directive>FileETag</directive> directive configures the file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attributes that are used to create the <code>ETag</code> (entity
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tag) response header field when the document is based on a static file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (The <code>ETag</code> value is used in cache management to save
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network bandwidth.) The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>FileETag</directive> directive allows you to choose
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which of these -- if any -- should be used. The recognized keywords are:
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
4a13940dc2990df0a798718d3a3f9cf1566c2217bjh <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>INode</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The file's i-node number will be included in the calculation</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>MTime</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The date and time the file was last modified will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>Size</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The number of bytes in the file will be included</dd>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <dt><strong>All</strong></dt>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <dd>All available fields will be used. This is equivalent to:
fb109b84906e3ee61680aa289953c2f9e859354erbowen <example>FileETag INode MTime Size</example></dd>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <dt><strong>None</strong></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dd>If a document is file-based, no <code>ETag</code> field will be
fb109b84906e3ee61680aa289953c2f9e859354erbowen included in the response</dd>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung </dl>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh keywords may be prefixed with either <code>+</code> or <code>-</code>,
fb109b84906e3ee61680aa289953c2f9e859354erbowen which allow changes to be made to the default setting inherited
960188481b7025ac8ef7221b67af83dd27e46cd0rjung from a broader scope. Any keyword appearing without such a prefix
960188481b7025ac8ef7221b67af83dd27e46cd0rjung immediately and completely cancels the inherited setting.</p>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If a directory's configuration includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectory's includes <code>FileETag&nbsp;-INode</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the setting for that subdirectory (which will be inherited by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any sub-subdirectories that don't override it) will be equivalent to
5155e92c6100b47513159eee1b2b9914ab204a5acovener <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
5155e92c6100b47513159eee1b2b9914ab204a5acovener <note type="warning"><title>Warning</title>
5155e92c6100b47513159eee1b2b9914ab204a5acovener Do not change the default for directories or locations that have WebDAV
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled and use <module>mod_dav_fs</module> as a storage provider.
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <module>mod_dav_fs</module> uses <code>INode&nbsp;MTime&nbsp;Size</code>
fb109b84906e3ee61680aa289953c2f9e859354erbowen as a fixed format for <code>ETag</code> comparisons on conditional requests.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive These conditional requests will break if the <code>ETag</code> format is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive changed via <directive>FileETag</directive>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <note><title>Server Side Includes</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive An ETag is not generated for responses parsed by <module>mod_include</module>,
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes since the response entity can change without a change of the INode, MTime, or Size
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes of the static file with embedded SSI directives.
d950cf9262224a223e2ff5c51393708071e14b94covener </note>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes</usage>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<name>Files</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply to matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefilenames</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>
2851546ce44280e54301016a7e92b00a87745509sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<override>All</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <directive type="section">Files</directive> directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf limits the scope of the enclosed directives by filename. It is comparable
e302f38fd646764ce1a1e1c578d794aef514a9e5sf to the <directive module="core" type="section">Directory</directive>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and <directive module="core" type="section">Location</directive>
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
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh any object with a basename (last component of filename) matching the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh specified filename. <directive type="section">Files</directive>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic sections are processed in the order they appear in the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic configuration file, after the <directive module="core"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf type="section">Directory</directive> sections and
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>.htaccess</code> files are read, but before <directive
18ee8bb3db5cc3b04291f89301bd5d14dc271066lgentis type="section" module="core">Location</directive> sections. Note
e302f38fd646764ce1a1e1c578d794aef514a9e5sf that <directive type="section">Files</directive> can be nested
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen inside <directive type="section"
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core">Directory</directive> sections to restrict the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf portion of the filesystem they apply to.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <var>filename</var> argument should include a filename, or
e302f38fd646764ce1a1e1c578d794aef514a9e5sf a wild-card string, where <code>?</code> matches any single character,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and <code>*</code> matches any sequences of characters.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <glossary ref="regex">Regular expressions</glossary>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf can also be used, with the addition of the
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh <code>~</code> character. For example:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>would match most common Internet graphics formats. <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf module="core" type="section">FilesMatch</directive> is preferred,
4c14866954f240e6e2c17c164900c4aa7900bbeehumbedooh however.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Note that unlike <directive type="section"
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen module="core">Directory</directive> and <directive type="section"
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf module="core">Location</directive> sections, <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf type="section">Files</directive> sections can be used inside
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf <code>.htaccess</code> files. This allows users to control access to
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf their own files, at a file-by-file level.</p>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf and &lt;Files&gt; sections work</a> for an explanation of how these
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf different sections are combined when a request is received</seealso>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf</directivesynopsis>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf
221a06bb836af6024708190895834af79c90d1c8rbowen<directivesynopsis type="section">
221a06bb836af6024708190895834af79c90d1c8rbowen<name>FilesMatch</name>
221a06bb836af6024708190895834af79c90d1c8rbowen<description>Contains directives that apply to regular-expression matched
221a06bb836af6024708190895834af79c90d1c8rbowenfilenames</description>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<contextlist><context>server config</context><context>virtual host</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<context>directory</context><context>.htaccess</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</contextlist>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<override>All</override>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<usage>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>The <directive type="section">FilesMatch</directive> directive
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen limits the scope of the enclosed directives by filename, just as the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <directive module="core" type="section">Files</directive> directive
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen does. However, it accepts a <glossary ref="regex">regular
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen expression</glossary>. For example:</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <example>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </example>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>would match most common Internet graphics formats.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</usage>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen and &lt;Files&gt; sections work</a> for an explanation of how these
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen different sections are combined when a request is received</seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<name>ForceType</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Forces all matching files to be served with the specified
e302f38fd646764ce1a1e1c578d794aef514a9e5sfmedia type in the HTTP Content-Type header field</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>ForceType <var>media-type</var>|None</syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>directory</context><context>.htaccess</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<override>FileInfo</override>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<compatibility>Moved to the core in Apache httpd 2.0</compatibility>
2d391792b33e3c27e070739f74d74989c77fea8eminfrin
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin <p>When placed into an <code>.htaccess</code> file or a
2d391792b33e3c27e070739f74d74989c77fea8eminfrin <directive type="section" module="core">Directory</directive>, or
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin <directive type="section" module="core">Location</directive> or
2a781ea98a32c069ae57a89566ee9628e19a2ec2minfrin <directive type="section" module="core">Files</directive>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen section, this directive forces all matching files to be served
e302f38fd646764ce1a1e1c578d794aef514a9e5sf with the content type identification given by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <var>media-type</var>. For example, if you had a directory full of
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen GIF files, but did not want to label them all with <code>.gif</code>,
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen you might want to use:</p>
4497075b5e08b0c8ee89425a1758258ae80550fcsf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ForceType image/gif
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Note that this directive overrides other indirect media type
e302f38fd646764ce1a1e1c578d794aef514a9e5sf associations defined in mime.types or via the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <directive module="mod_mime">AddType</directive>.</p>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>You can also override more general
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <directive>ForceType</directive> settings
e302f38fd646764ce1a1e1c578d794aef514a9e5sf by using the value of <code>None</code>:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf # force all files to be image/gif:<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;Location /images&gt;<br />
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <indent>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ForceType image/gif<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </indent>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen &lt;/Location&gt;<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf # but normal mime-type associations here:<br />
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen &lt;Location /images/mixed&gt;<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <indent>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ForceType None<br />
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </indent>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf &lt;/Location&gt;
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>This directive primarily overrides the content types generated for
e302f38fd646764ce1a1e1c578d794aef514a9e5sf static files served out of the filesystem. For resources other than
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen static files, where the generator of the response typically specifies
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen a Content-Type, this directive has no effect.</p>
4497075b5e08b0c8ee89425a1758258ae80550fcsf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<name>GprofDir</name>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Directory to write gmon.out profiling data to. </description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</syntax>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<contextlist><context>server config</context><context>virtual host</context>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf</contextlist>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf<usage>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>When the server has been compiled with gprof profiling suppport,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive>GprofDir</directive> causes <code>gmon.out</code> files to
e302f38fd646764ce1a1e1c578d794aef514a9e5sf be written to the specified directory when the process exits. If the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen argument ends with a percent symbol ('%'), subdirectories are created
e302f38fd646764ce1a1e1c578d794aef514a9e5sf for each process id.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>This directive currently only works with the <module>prefork</module>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf PM.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<directivesynopsis>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<name>HostnameLookups</name>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<description>Enables DNS lookups on client IP addresses</description>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<syntax>HostnameLookups On|Off|Double</syntax>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<default>HostnameLookups Off</default>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<contextlist><context>server config</context><context>virtual host</context>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf<context>directory</context></contextlist>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>This directive enables DNS lookups so that host names can be
e302f38fd646764ce1a1e1c578d794aef514a9e5sf logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
e302f38fd646764ce1a1e1c578d794aef514a9e5sf The value <code>Double</code> refers to doing double-reverse
e302f38fd646764ce1a1e1c578d794aef514a9e5sf DNS lookup. That is, after a reverse lookup is performed, a forward
e302f38fd646764ce1a1e1c578d794aef514a9e5sf lookup is then performed on that result. At least one of the IP
e302f38fd646764ce1a1e1c578d794aef514a9e5sf addresses in the forward lookup must match the original
e302f38fd646764ce1a1e1c578d794aef514a9e5sf address. (In "tcpwrappers" terminology this is called
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>PARANOID</code>.)</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Regardless of the setting, when <module>mod_authz_host</module> is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf used for controlling access by hostname, a double reverse lookup
ce4dc40a4e87991087488f70d96d3447d7557294sf will be performed. This is necessary for security. Note that the
ce4dc40a4e87991087488f70d96d3447d7557294sf result of this double-reverse isn't generally available unless you
e302f38fd646764ce1a1e1c578d794aef514a9e5sf set <code>HostnameLookups Double</code>. For example, if only
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <code>HostnameLookups On</code> and a request is made to an object
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh that is protected by hostname restrictions, regardless of whether
2aa51ed61adb484602e94de3d2214ec267aecedbigalic the double-reverse fails or not, CGIs will still be passed the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic single-reverse result in <code>REMOTE_HOST</code>.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <p>The default is <code>Off</code> in order to save the network
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen traffic for those sites that don't truly need the reverse
2aa51ed61adb484602e94de3d2214ec267aecedbigalic lookups done. It is also better for the end users because they
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen don't have to suffer the extra latency that a lookup entails.
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen Heavily loaded sites should leave this directive
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <code>Off</code>, since DNS lookups can take considerable
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh amounts of time. The utility <program>logresolve</program>, compiled by
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen default to the <code>bin</code> subdirectory of your installation
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen directory, can be used to look up host names from logged IP addresses
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh offline.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh</usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<directivesynopsis type="section">
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<name>If</name>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<description>Contains directives that apply only if a condition is
2aa51ed61adb484602e94de3d2214ec267aecedbigalicsatisfied by a request at runtime</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>&lt;If <var>expression</var>&gt; ... &lt;/If&gt;</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<context>directory</context><context>.htaccess</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<override>All</override>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<usage>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <directive type="section">If</directive> directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf evaluates an expression at runtime, and applies the enclosed
e302f38fd646764ce1a1e1c578d794aef514a9e5sf directives if and only if the expression evaluates to true.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf For example:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf
a8ee031b2224ce5473826c9d4f603681589245fawrowe <example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe &lt;If "$req{Host} = ''"&gt;
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>You may compare the value of any variable in the request headers
a8ee031b2224ce5473826c9d4f603681589245fawrowe ($req), response headers ($resp) or environment ($env) in your
a8ee031b2224ce5473826c9d4f603681589245fawrowe expression.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Apart from <code>=</code>, <code>If</code> can use the <code>IN</code>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor operator to compare if the expression is in a given range:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe &lt;If %{REQUEST_METHOD} IN GET,HEAD,OPTIONS&gt;
a8ee031b2224ce5473826c9d4f603681589245fawrowe </example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;,
a8ee031b2224ce5473826c9d4f603681589245fawrowe &lt;Files&gt; sections work</a> for an explanation of how these
34b157732214cedcd129cd9fe7c4290757505d60minfrin different sections are combined when a request is received.
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive type="section">If</directive> has the same precedence
a8ee031b2224ce5473826c9d4f603681589245fawrowe and usage as <directive type="section">Files</directive></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis type="section">
02c86afa991026c4146423dc84bc126e57d28df6wrowe<name>IfDefine</name>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<description>Encloses directives that will be processed only
34b157732214cedcd129cd9fe7c4290757505d60minfrinif a test is true at startup</description>
34b157732214cedcd129cd9fe7c4290757505d60minfrin<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
34b157732214cedcd129cd9fe7c4290757505d60minfrin &lt;/IfDefine&gt;</syntax>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<contextlist><context>server config</context><context>virtual host</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
fec106c7688e279dfde4403bc3c935fec97c1d62sf </code> section is used to mark directives that are conditional. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives within an <directive type="section">IfDefine</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ignored.</p>
fec106c7688e279dfde4403bc3c935fec97c1d62sf
fec106c7688e279dfde4403bc3c935fec97c1d62sf <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>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener <li><code>!</code><var>parameter-name</var></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess </ul>
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>In the former case, the directives between the start and end
fb77c505254b6e9c925e23e734463e87574f8f40kess markers are only processed if the parameter named
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is defined. The second format reverses
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the test, and only processes the directives if
530eba85dbd41b8a0fa5255d3648d1440199a661slive <var>parameter-name</var> is <strong>not</strong> defined.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>parameter-name</var> argument is a define as given on the
530eba85dbd41b8a0fa5255d3648d1440199a661slive <program>httpd</program> command line via <code>-D<var>parameter</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> at the time the server was started or by the <directive
530eba85dbd41b8a0fa5255d3648d1440199a661slive module="core">Define</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p><directive type="section">IfDefine</directive> sections are
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd nest-able, which can be used to implement simple
2aa51ed61adb484602e94de3d2214ec267aecedbigalic multiple-parameter tests. Example:</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess httpd -DReverseProxy -DUseCache -DMemCache ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # httpd.conf<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;IfDefine ReverseProxy&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LoadModule proxy_module modules/mod_proxy.so<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LoadModule proxy_http_module modules/mod_proxy_http.so<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;IfDefine UseCache&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LoadModule cache_module modules/mod_cache.so<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;IfDefine MemCache&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule mem_cache_module modules/mod_mem_cache.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfDefine&gt;<br />
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem &lt;IfDefine !MemCache&gt;<br />
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <indent>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem LoadModule disk_cache_module modules/mod_disk_cache.so<br />
fec106c7688e279dfde4403bc3c935fec97c1d62sf </indent>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem &lt;/IfDefine&gt;
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem </indent>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem &lt;/IfDefine&gt;
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem </indent>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener &lt;/IfDefine&gt;
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </example>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener</directivesynopsis>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>IfModule</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that are processed conditional on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepresence or absence of a specific module</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfModule&gt;</syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Module identifiers are available in version 2.1 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater.</compatibility>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section is used to mark directives that are conditional on the presence of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess a specific module. The directives within an <directive type="section"
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess >IfModule</directive> section are only processed if the <var>test</var>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess is true. If <var>test</var> is false, everything between the start and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess end markers is ignored.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The <var>test</var> in the <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >IfModule</directive> section directive can be one of two forms:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>!<var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the former case, the directives between the start and end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive markers are only processed if the module named <var>module</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is included in Apache httpd -- either compiled in or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd dynamically loaded using <directive module="mod_so"
fb77c505254b6e9c925e23e734463e87574f8f40kess >LoadModule</directive>. The second format reverses the test,
062fa302e571fe5fcb2af6470f173fe71d3d041bhumbedooh and only processes the directives if <var>module</var> is
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <strong>not</strong> included.</p>
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <p>The <var>module</var> argument can be either the module identifier or
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh the file name of the module, at the time it was compiled. For example,
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <code>rewrite_module</code> is the identifier and
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <code>mod_rewrite.c</code> is the file name. If a module consists of
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh several source files, use the name of the file containing the string
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh <code>STANDARD20_MODULE_STUFF</code>.</p>
1532c34f7521c6d2457ea0c40d159b4998ea2334humbedooh
062fa302e571fe5fcb2af6470f173fe71d3d041bhumbedooh <p><directive type="section">IfModule</directive> sections are
030108b1816bcda3d925df65357feabdce83bc94slive nest-able, which can be used to implement simple multiple-module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tests.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <note>This section should only be used if you need to have one
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh configuration file that works whether or not a specific module
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh is available. In normal operation, directives need not be
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh placed in <directive type="section">IfModule</directive>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh sections.</note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Wildcard matching available in 2.0.41 and later, directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewildcard matching available in 2.3.6 and later</compatibility>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive allows inclusion of other configuration files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from within the server configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the filename or directory parts of the path to include several files
003f0c9fda6664daf5092a0e42f65ede20098153slive at once, in alphabetical order. In addition, if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Include</directive> points to a directory, rather than a file,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache httpd will read all files in that directory and any subdirectory.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
003f0c9fda6664daf5092a0e42f65ede20098153slive wildcard syntax shown below, to include files that match a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pattern, such as *.conf, for example.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a wildcard is specified for a <strong>file</strong> component of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the path, and no file matches the wildcard, the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="core">Include</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directive will be <strong>silently ignored</strong>. When a wildcard is
030108b1816bcda3d925df65357feabdce83bc94slive specified for a <strong>directory</strong> component of the path, and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd no directory matches the wildcard, the
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh <directive module="core">Include</directive> directive will
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh <strong>fail with an error</strong> saying the directory cannot be found.
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh </p>
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh
8f5222d1bb4ace11af7add6932362e4c3822e548humbedooh <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <var>strict</var>. If <var>optional</var> is specified, any wildcard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive file or directory that does not match will be silently ignored. If
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <var>strict</var> is specified, any wildcard file or directory that does
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess not match at least one file will cause server startup to fail.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>When a directory or file component of the path is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified exactly, and that directory or file does not exist,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">Include</directive> directive will fail with an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error saying the file or directory cannot be found.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path, or may be relative
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding to the <directive module="core">ServerRoot</directive> directory.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <example>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Include /usr/local/apache2/conf/ssl.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include /usr/local/apache2/conf/vhosts/*.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Or, providing paths relative to your <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">ServerRoot</directive> directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include conf/ssl.conf<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Include conf/vhosts/*.conf
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Wildcards may be included in the directory or file portion of the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh path. In the following example, the server will fail to load if no
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories match conf/vhosts/*, but will load successfully if no
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding files match *.conf.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <example>
7654193c1faf603feec999850322ad79e6c551bcnd Include conf/vhosts/*/vhost.conf<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Include conf/vhosts/*/*.conf
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </example>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
7654193c1faf603feec999850322ad79e6c551bcnd <p>In this example, the server will fail to load if either
2aa51ed61adb484602e94de3d2214ec267aecedbigalic conf/vhosts/* matches no directories, or if *.conf matches no files:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic Include strict conf/vhosts/*/*.conf
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>In this example, the server load successfully if either conf/vhosts/*
2aa51ed61adb484602e94de3d2214ec267aecedbigalic matches no directories, or if *.conf matches no files:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic Include optional conf/vhosts/*/*.conf
439acee10571861c670c438038a62f90a08bf137covener </example>
439acee10571861c670c438038a62f90a08bf137covener
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
439acee10571861c670c438038a62f90a08bf137covener<seealso><program>apachectl</program></seealso>
439acee10571861c670c438038a62f90a08bf137covener</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<name>KeepAlive</name>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<description>Enables HTTP persistent connections</description>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<syntax>KeepAlive On|Off</syntax>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<default>KeepAlive On</default>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<contextlist><context>server config</context><context>virtual host</context>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener</contextlist>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener<usage>
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh <p>The Keep-Alive extension to HTTP/1.0 and the persistent
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener connection feature of HTTP/1.1 provide long-lived HTTP sessions
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener which allow multiple requests to be sent over the same TCP
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener connection. In some cases this has been shown to result in an
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener almost 50% speedup in latency times for HTML documents with
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener many images. To enable Keep-Alive connections, set
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>KeepAlive On</code>.</p>
df5042f69eea159c73cd7b16542d4ca7d879b0b5trawick
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>For HTTP/1.0 clients, Keep-Alive connections will only be
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI pages, and server-generated directory listings will
fb77c505254b6e9c925e23e734463e87574f8f40kess generally not use Keep-Alive connections to HTTP/1.0 clients.
fb77c505254b6e9c925e23e734463e87574f8f40kess For HTTP/1.1 clients, persistent connections are the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unless otherwise specified. If the client requests it, chunked
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encoding will be used in order to send content of unknown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive length over persistent connections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the <directive module="mpm_common"
fb77c505254b6e9c925e23e734463e87574f8f40kess >MaxConnectionsPerChild</directive> directive, regardless
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess of how many requests are sent using the connection.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>KeepAliveTimeout</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Amount of time the server will wait for subsequent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequests on a persistent connection</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>KeepAliveTimeout <var>num</var>[ms]</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<default>KeepAliveTimeout 5</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Specifying a value in milliseconds is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveApache httpd 2.3.2 and later</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The number of seconds Apache httpd will wait for a subsequent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request before closing the connection. By adding a postfix of ms the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive timeout can be also set in milliseconds. Once a request has been
fb77c505254b6e9c925e23e734463e87574f8f40kess received, the timeout value specified by the
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <directive module="core">Timeout</directive> directive applies.</p>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>Setting <directive>KeepAliveTimeout</directive> to a high value
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd may cause performance problems in heavily loaded servers. The
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen higher the timeout, the more server processes will be kept
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen occupied waiting on connections with idle clients.</p>
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen <p>In a name-based virtual host context, the value of the first
e40b2d66f8592e45981ea1cbdac42db076ea1da6rbowen 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>
750d12c59545dbbac70390988de94f7e901b08f2niq</directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<directivesynopsis type="section">
750d12c59545dbbac70390988de94f7e901b08f2niq<name>Limit</name>
750d12c59545dbbac70390988de94f7e901b08f2niq<description>Restrict enclosed access controls to only certain HTTP
750d12c59545dbbac70390988de94f7e901b08f2niqmethods</description>
750d12c59545dbbac70390988de94f7e901b08f2niq<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
750d12c59545dbbac70390988de94f7e901b08f2niq &lt;/Limit&gt;</syntax>
750d12c59545dbbac70390988de94f7e901b08f2niq<contextlist><context>directory</context><context>.htaccess</context>
750d12c59545dbbac70390988de94f7e901b08f2niq</contextlist>
750d12c59545dbbac70390988de94f7e901b08f2niq<override>AuthConfig, Limit</override>
750d12c59545dbbac70390988de94f7e901b08f2niq
750d12c59545dbbac70390988de94f7e901b08f2niq<usage>
750d12c59545dbbac70390988de94f7e901b08f2niq <p>Access controls are normally effective for
750d12c59545dbbac70390988de94f7e901b08f2niq <strong>all</strong> access methods, and this is the usual
750d12c59545dbbac70390988de94f7e901b08f2niq desired behavior. <strong>In the general case, access control
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh directives should not be placed within a
750d12c59545dbbac70390988de94f7e901b08f2niq <directive type="section">Limit</directive> section.</strong></p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The purpose of the <directive type="section">Limit</directive>
6b15044d54a096e6323ff1540f1a491e8de7622dsf directive is to restrict the effect of the access controls to the
6b15044d54a096e6323ff1540f1a491e8de7622dsf nominated HTTP methods. For all other methods, the access
6b15044d54a096e6323ff1540f1a491e8de7622dsf restrictions that are enclosed in the <directive
6b15044d54a096e6323ff1540f1a491e8de7622dsf type="section">Limit</directive> bracket <strong>will have no
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic effect</strong>. The following example applies the access control
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh only to the methods <code>POST</code>, <code>PUT</code>, and
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic <code>DELETE</code>, leaving all other methods unprotected:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf
6b15044d54a096e6323ff1540f1a491e8de7622dsf <example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf &lt;Limit POST PUT DELETE&gt;<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf <indent>
6b15044d54a096e6323ff1540f1a491e8de7622dsf Require valid-user<br />
6b15044d54a096e6323ff1540f1a491e8de7622dsf </indent>
750d12c59545dbbac70390988de94f7e901b08f2niq &lt;/Limit&gt;
750d12c59545dbbac70390988de94f7e901b08f2niq </example>
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalic <p>The method names listed can be one or more of: <code>GET</code>,
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
6b15044d54a096e6323ff1540f1a491e8de7622dsf <code>CONNECT</code>, <code>OPTIONS</code>,
750d12c59545dbbac70390988de94f7e901b08f2niq <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
750d12c59545dbbac70390988de94f7e901b08f2niq <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
750d12c59545dbbac70390988de94f7e901b08f2niq <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
6b15044d54a096e6323ff1540f1a491e8de7622dsf case-sensitive.</strong> If <code>GET</code> is used it will also
6b15044d54a096e6323ff1540f1a491e8de7622dsf restrict <code>HEAD</code> requests. The <code>TRACE</code> method
6b15044d54a096e6323ff1540f1a491e8de7622dsf cannot be limited (see <directive module="core"
750d12c59545dbbac70390988de94f7e901b08f2niq >TraceEnable</directive>).</p>
750d12c59545dbbac70390988de94f7e901b08f2niq
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"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">LimitExcept</directive> section provides protection
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive against arbitrary methods.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Limit</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">LimitExcept</directive>
003f0c9fda6664daf5092a0e42f65ede20098153slive directives may be nested. In this case, each successive level of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Limit</directive> or <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">LimitExcept</directive> directives must
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd further restrict the set of methods to which access controls apply.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning">When using
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">Limit</directive> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">LimitExcept</directive> directives with
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the <directive module="mod_authz_core">Require</directive> directive,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive note that the first <directive module="mod_authz_core">Require</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to succeed authorizes the request, regardless of the presence of other
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_authz_core">Require</directive> directives.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, given the following configuration, all users will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd be authorized for <code>POST</code> requests, and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Require group editors</code> directive will be ignored
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd in all cases:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LimitExcept GET&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require valid-user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/LimitExcept&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Limit POST&gt;
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <indent>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl Require group editors
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl </indent>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl &lt;/Limit&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>LimitExcept</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Restrict access controls to all HTTP methods
2aa51ed61adb484602e94de3d2214ec267aecedbigalicexcept the named ones</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
2aa51ed61adb484602e94de3d2214ec267aecedbigalic &lt;/LimitExcept&gt;</syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>directory</context><context>.htaccess</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<override>AuthConfig, Limit</override>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p><directive type="section">LimitExcept</directive> and
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>&lt;/LimitExcept&gt;</code> are used to enclose
2aa51ed61adb484602e94de3d2214ec267aecedbigalic a group of access control directives which will then apply to any
2aa51ed61adb484602e94de3d2214ec267aecedbigalic HTTP access method <strong>not</strong> listed in the arguments;
2aa51ed61adb484602e94de3d2214ec267aecedbigalic i.e., it is the opposite of a <directive type="section"
2aa51ed61adb484602e94de3d2214ec267aecedbigalic module="core">Limit</directive> section and can be used to control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive both standard and nonstandard/unrecognized methods. See the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation for <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> for more details.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki <example>
55d36f9b61520c2374ab463e77e8a62daa416398nd &lt;LimitExcept POST GET&gt;<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/LimitExcept&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>LimitInternalRecursion</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Determine maximum number of internal redirects and nested
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndsubrequests</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>LimitInternalRecursion 10</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Available in Apache httpd 2.0.47 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>An internal redirect happens, for example, when using the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_actions">Action</directive> directive, which internally
55d36f9b61520c2374ab463e77e8a62daa416398nd redirects the original request to a CGI script. A subrequest is Apache httpd's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mechanism to find out what would happen for some URI if it were requested.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For example, <module>mod_dir</module> uses subrequests to look for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive files listed in the <directive module="mod_dir">DirectoryIndex</directive>
55d36f9b61520c2374ab463e77e8a62daa416398nd directive.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LimitInternalRecursion</directive> prevents the server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from crashing when entering an infinite loop of internal redirects or
55d36f9b61520c2374ab463e77e8a62daa416398nd subrequests. Such loops are usually caused by misconfigurations.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The directive stores two different limits, which are evaluated on
55d36f9b61520c2374ab463e77e8a62daa416398nd per-request basis. The first <var>number</var> is the maximum number of
55d36f9b61520c2374ab463e77e8a62daa416398nd internal redirects, that may follow each other. The second <var>number</var>
55d36f9b61520c2374ab463e77e8a62daa416398nd determines, how deep subrequests may be nested. If you specify only one
55d36f9b61520c2374ab463e77e8a62daa416398nd <var>number</var>, it will be assigned to both limits.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitInternalRecursion 5
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<directivesynopsis>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<name>LimitRequestBody</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Restricts the total size of the HTTP request body sent
bea526116133aa3d7dabd1924bfc580b37fbf22aslivefrom the client</description>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<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>
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>This directive specifies the number of <var>bytes</var> from 0
003f0c9fda6664daf5092a0e42f65ede20098153slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
003f0c9fda6664daf5092a0e42f65ede20098153slive request body. See the note below for the limited applicability
003f0c9fda6664daf5092a0e42f65ede20098153slive to proxy requests.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p>The <directive>LimitRequestBody</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message body within the context in which the directive is given
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response instead of servicing the request. The size of a normal
5b258a8d58679c6587757189339bb3c2d0488f93poirier request message body will vary greatly depending on the nature of
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin the resource and the methods allowed on that resource. CGI scripts
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin typically use the message body for retrieving form information.
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin Implementations of the <code>PUT</code> method will require
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen a value at least as large as any representation that the server
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin wishes to accept for that resource.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <p>This directive gives the server administrator greater
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin control over abnormal client request behavior, which may be
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin useful for avoiding some forms of denial-of-service
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin attacks.</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf <p>If, for example, you are permitting file upload to a particular
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf location, and wish to limit the size of the uploaded file to 100K,
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf you might use the following directive:</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <example>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess LimitRequestBody 102400
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><p>For a full description of how this directive is interpreted by
2aa51ed61adb484602e94de3d2214ec267aecedbigalic proxy requests, see the <module>mod_proxy</module> documentation.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh </note>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>LimitRequestFields</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Limits the number of HTTP request header fields that
2aa51ed61adb484602e94de3d2214ec267aecedbigalicwill be accepted from the client</description>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<syntax>LimitRequestFields <var>number</var></syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>LimitRequestFields 100</default>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<contextlist><context>server config</context><context>virtual host</context></contextlist>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin
69d4a64874fd7161f80bb0484341c60857b6fd6esf<usage>
cb43dee5b65f707dfd575fc681ef863d6f6b0385sf <p><var>Number</var> is an integer from 0 (meaning unlimited) to
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor 32767. The default value is defined by the compile-time
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin distributed).</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>The <directive>LimitRequestFields</directive> directive allows
03aa31ad82759363ba1a55589e517b16308ef635minfrin the server administrator to modify the limit on the number of
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh request header fields allowed in an HTTP request. A server needs
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor this value to be larger than the number of fields that a normal
69d4a64874fd7161f80bb0484341c60857b6fd6esf client request might include. The number of request header fields
03aa31ad82759363ba1a55589e517b16308ef635minfrin used by a client rarely exceeds 20, but this may vary among
69d4a64874fd7161f80bb0484341c60857b6fd6esf different client implementations, often depending upon the extent
69d4a64874fd7161f80bb0484341c60857b6fd6esf to which a user has configured their browser to support detailed
69d4a64874fd7161f80bb0484341c60857b6fd6esf content negotiation. Optional HTTP extensions are often expressed
03aa31ad82759363ba1a55589e517b16308ef635minfrin using request header fields.</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>This directive gives the server administrator greater
69d4a64874fd7161f80bb0484341c60857b6fd6esf control over abnormal client request behavior, which may be
69d4a64874fd7161f80bb0484341c60857b6fd6esf useful for avoiding some forms of denial-of-service attacks.
69d4a64874fd7161f80bb0484341c60857b6fd6esf The value should be increased if normal clients see an error
69d4a64874fd7161f80bb0484341c60857b6fd6esf response from the server that indicates too many fields were
69d4a64874fd7161f80bb0484341c60857b6fd6esf sent in the request.</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p>For example:</p>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf LimitRequestFields 50
69d4a64874fd7161f80bb0484341c60857b6fd6esf </example>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
69d4a64874fd7161f80bb0484341c60857b6fd6esf <note type="warning"><title>Warning</title>
69d4a64874fd7161f80bb0484341c60857b6fd6esf <p> When name-based virtual hosting is used, the value for this
69d4a64874fd7161f80bb0484341c60857b6fd6esf directive is taken from the default (first-listed) virtual host for the
03aa31ad82759363ba1a55589e517b16308ef635minfrin <directive>NameVirtualHost</directive> the connection was mapped to.</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin </note>
69d4a64874fd7161f80bb0484341c60857b6fd6esf
03aa31ad82759363ba1a55589e517b16308ef635minfrin</usage>
03aa31ad82759363ba1a55589e517b16308ef635minfrin</directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestFieldSize</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Limits the size of the HTTP request header allowed from the
fb77c505254b6e9c925e23e734463e87574f8f40kessclient</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestFieldSize <var>bytes</var></syntax>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<default>LimitRequestFieldSize 8190</default>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess on the allowed size of an HTTP request header field. A server
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess needs this value to be large enough to hold any one header field
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a normal client request. The size of a normal request header
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive field will vary greatly among different client implementations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive often depending upon the extent to which a user has configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive their browser to support detailed content negotiation. SPNEGO
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication headers can be up to 12392 bytes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <example>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid LimitRequestFieldSize 4094
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi </example>
be192cefa381d5bae6868034687471754cb43175sf
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p> When name-based virtual hosting is used, the value for this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is taken from the default (first-listed) virtual host for the
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <directive>NameVirtualHost</directive> the connection was mapped to.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick </note>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</usage>
9f38f3ec3e8087985d108a24ae796962fef83644takashi</directivesynopsis>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<directivesynopsis>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<name>LimitRequestLine</name>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Limit the size of the HTTP request line that will be accepted
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenfrom the client</description>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<syntax>LimitRequestLine <var>bytes</var></syntax>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<default>LimitRequestLine 8190</default>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<contextlist><context>server config</context><context>virtual host</context></contextlist>
9f38f3ec3e8087985d108a24ae796962fef83644takashi
9f38f3ec3e8087985d108a24ae796962fef83644takashi<usage>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>This directive sets the number of <var>bytes</var> that will be
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick allowed on the HTTP request-line.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>The <directive>LimitRequestLine</directive> directive allows
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick the server administrator to reduce or increase the limit on the allowed size
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick of a client's HTTP request-line. Since the request-line consists of the
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick HTTP method, URI, and protocol version, the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive>LimitRequestLine</directive> directive places a
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi restriction on the length of a request-URI allowed for a request
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener on the server. A server needs this value to be large enough to
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick hold any of its resource names, including any information that
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick might be passed in the query part of a <code>GET</code> request.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
003f0c9fda6664daf5092a0e42f65ede20098153slive useful for avoiding some forms of denial-of-service attacks.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestLine 4094
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p> When name-based virtual hosting is used, the value for this
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive is taken from the default (first-listed) virtual host for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>NameVirtualHost</directive> the connection was mapped to.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>LimitXMLRequestBody</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Limits the size of an XML-based request body</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<default>LimitXMLRequestBody 1000000</default>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<context>directory</context><context>.htaccess</context></contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<override>All</override>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Limit (in bytes) on maximum size of an XML-based request
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd body. A value of <code>0</code> will disable any checking.</p>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LimitXMLRequestBody 0
6c5c651b0b97607b8c8b4965c1385c67699f217fnd </example>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
750d12c59545dbbac70390988de94f7e901b08f2niq</usage>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive</directivesynopsis>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<directivesynopsis type="section">
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<name>Location</name>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<description>Applies the enclosed directives only to matching
4bb78e7cdd53f50240cff4ad7a97c7ed36483797sliveURLs</description>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive<syntax>&lt;Location
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<contextlist><context>server config</context><context>virtual host</context>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd</contextlist>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd<usage>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p>The <directive type="section">Location</directive> directive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd limits the scope of the enclosed directives by URL. It is similar to the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <directive type="section" module="core">Directory</directive>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directive, and starts a subsection which is terminated with a
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>&lt;/Location&gt;</code> directive. <directive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd type="section">Location</directive> sections are processed in the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd order they appear in the configuration file, after the <directive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd type="section" module="core">Directory</directive> sections and
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <code>.htaccess</code> files are read, and after the <directive
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd type="section" module="core">Files</directive> sections.</p>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <p><directive type="section">Location</directive> sections operate
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd completely outside the filesystem. This has several consequences.
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd Most importantly, <directive type="section">Location</directive>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd directives should not be used to control access to filesystem
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd locations. Since several different URLs may map to the same
2aa51ed61adb484602e94de3d2214ec267aecedbigalic filesystem location, such access controls may by circumvented.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <note><title>When to use <directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic type="section">Location</directive></title>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Use <directive type="section">Location</directive> to apply
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directives to content that lives outside the filesystem. For
2aa51ed61adb484602e94de3d2214ec267aecedbigalic content that lives in the filesystem, use <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Directory</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For all origin (non-proxy) requests, the URL to be matched is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd URL to be matched is of the form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>scheme://servername/path</code>, and you must include the
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd 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
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen characters. Neither wildcard character matches a / in the URL-path.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p><glossary ref="regex">Regular expressions</glossary>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen can also be used, with the addition of the <code>~</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location ~ "/(extra|special)/data"&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </example>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>would match URLs that contained the substring <code>/extra/data</code>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic or <code>/special/data</code>. The directive <directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic type="section" module="core">LocationMatch</directive> behaves
2aa51ed61adb484602e94de3d2214ec267aecedbigalic identical to the regex version of <directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic type="section">Location</directive>, and is preferred, for the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic simple reason that <code>~</code> is hard to distinguish from
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>-</code> in many fonts.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive functionality is especially useful when combined with the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <directive module="core">SetHandler</directive>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directive. For example, to enable status requests, but allow them
03e0a375c2435102fb2b51e34cccff52acbfddcdnd only from browsers at <code>example.com</code>, you might use:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;Location /status&gt;<br />
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <indent>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd SetHandler server-status<br />
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Require host example.com<br />
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </indent>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;/Location&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <note><title>Note about / (slash)</title>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The slash character has special meaning depending on where in a
03e0a375c2435102fb2b51e34cccff52acbfddcdnd URL it appears. People may be used to its behavior in the filesystem
03e0a375c2435102fb2b51e34cccff52acbfddcdnd where multiple adjacent slashes are frequently collapsed to a single
03e0a375c2435102fb2b51e34cccff52acbfddcdnd slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>/home/foo</code>). In URL-space this is not necessarily true.
03e0a375c2435102fb2b51e34cccff52acbfddcdnd The <directive type="section" module="core">LocationMatch</directive>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directive and the regex version of <directive type="section"
03e0a375c2435102fb2b51e34cccff52acbfddcdnd >Location</directive> require you to explicitly specify multiple
03e0a375c2435102fb2b51e34cccff52acbfddcdnd slashes if that is your intention.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
03e0a375c2435102fb2b51e34cccff52acbfddcdnd the request URL <code>/abc</code> but not the request URL <code>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd //abc</code>. The (non-regex) <directive type="section"
03e0a375c2435102fb2b51e34cccff52acbfddcdnd >Location</directive> directive behaves similarly when used for
03e0a375c2435102fb2b51e34cccff52acbfddcdnd proxy requests. But when (non-regex) <directive type="section"
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh >Location</directive> is used for non-proxy requests it will
03e0a375c2435102fb2b51e34cccff52acbfddcdnd implicitly match multiple slashes with a single slash. For example,
03e0a375c2435102fb2b51e34cccff52acbfddcdnd if you specify <code>&lt;Location /abc/def&gt;</code> and the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd 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;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different sections are combined when a request is received.</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">LocationMatch</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>LocationMatch</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to regular-expression
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematching URLs</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;LocationMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<contextlist><context>server config</context><context>virtual host</context>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL, in an identical manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to <directive module="core" type="section">Location</directive>. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it takes a <glossary ref="regex">regular expression</glossary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an argument instead of a simple string. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;LocationMatch "/(extra|special)/data"&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen different sections are combined when a request is received</seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>LogLevel</name>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh<description>Controls the verbosity of the ErrorLog</description>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<syntax>LogLevel [<var>module</var>:]<var>level</var>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor [<var>module</var>:<var>level</var>] ...
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener</syntax>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener<default>LogLevel warn</default>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Per-module and per-directory configuration is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache HTTP Server 2.3.6 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LogLevel</directive> adjusts the verbosity of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd messages recorded in the error logs (see <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ErrorLog</directive> directive). The following
e0ef044feba0082771091af42798cada5bb1f4fcrbowen <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </columnspec>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Level</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Description</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Example</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>emerg</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Emergencies - system is unusable.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Action must be taken immediately.</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"getpwuid: couldn't determine user name from uid"</td>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener <tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td><code>crit</code> </td>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
f23a27021f46cd18a69e0715d7280a735582163bhumbedooh <td>Critical Conditions.</td>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <td>"socket: Failed to get a socket, exiting child"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>error</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Error conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen <td>"Premature end of script headers"</td>
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen </tr>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>warn</code> </td>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard <td>Warning conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <td>"child process 1234 did not exit, sending another
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen SIGHUP"</td>
72580dbc2a55511f13f377063725b9f143b20826stoddard </tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <td><code>notice</code> </td>
72580dbc2a55511f13f377063725b9f143b20826stoddard
56d7eed7205462540aec7202cd82d9f5516fc537kess <td>Normal but significant condition.</td>
72580dbc2a55511f13f377063725b9f143b20826stoddard
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>info</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <td>Informational.</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"Server seems busy, (you may need to increase
0d5d5dc11ad29fca835d0967d2fb98ad3977d511sf StartServers, or Min/MaxSpareServers)..."</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <td><code>debug</code> </td>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <td>Debug-level messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Opening config file ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace1</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"proxy: FTP: control connection complete"</td>
e0ef044feba0082771091af42798cada5bb1f4fcrbowen </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace2</code> </td>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
72580dbc2a55511f13f377063725b9f143b20826stoddard <td>Trace messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"proxy: CONNECT: sending the CONNECT request to the remote proxy"</td>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen </tr>
72580dbc2a55511f13f377063725b9f143b20826stoddard <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace3</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"openssl: Handshake: start"</td>
fb77c505254b6e9c925e23e734463e87574f8f40kess </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace4</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Trace messages</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"read from buffered SSL brigade, mode 0, 17 bytes"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>trace5</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen <td>Trace messages</td>
4cc747f0aeda5b90c72e7e3ad22d5e58d6c48bc9rbowen
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <td>"map lookup FAILED: map=rewritemap key=keyname"</td>
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener </tr>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <tr>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <td><code>trace6</code> </td>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <td>Trace messages</td>
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"cache lookup FAILED, forcing new map lookup"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>trace7</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages, dumping large amounts of data</td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele </tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <td><code>trace8</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Trace messages, dumping large amounts of data</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </table>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <p>When a particular level is specified, messages from all
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen other levels of higher significance will be reported as well.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then messages with log levels of <code>notice</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>warn</code> will also be posted.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using a level of at least <code>crit</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LogLevel notice
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>When logging to a regular file messages of the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>notice</code> cannot be suppressed and thus are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged. However, this doesn't apply when logging is done
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd using <code>syslog</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Specifying a level without a module name will reset the level
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for all modules to that level. Specifying a level with a module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive name will set the level for that module only. It is possible to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive use the module source file name, the module identifier, or the
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive module identifier with the trailing <code>_module</code> omitted
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive as module specification. This means the following three specifications
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive are equivalent:</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <example>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive LogLevel info ssl:warn<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive LogLevel info mod_ssl.c:warn<br />
d950cf9262224a223e2ff5c51393708071e14b94covener LogLevel info ssl_module:warn<br />
d950cf9262224a223e2ff5c51393708071e14b94covener </example>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic
d950cf9262224a223e2ff5c51393708071e14b94covener <p>It is also possible to change the level per directory:</p>
d950cf9262224a223e2ff5c51393708071e14b94covener
d950cf9262224a223e2ff5c51393708071e14b94covener <example>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor LogLevel info<br />
d950cf9262224a223e2ff5c51393708071e14b94covener &lt;Directory /usr/local/apache/htdocs/app&gt;<br />
d950cf9262224a223e2ff5c51393708071e14b94covener &nbsp; LogLevel debug<br />
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor &lt;/Files&gt;
d950cf9262224a223e2ff5c51393708071e14b94covener </example>
d950cf9262224a223e2ff5c51393708071e14b94covener
d950cf9262224a223e2ff5c51393708071e14b94covener <note>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic Per directory loglevel configuration only affects messages that are
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor logged after the request has been parsed and that are associated with
d950cf9262224a223e2ff5c51393708071e14b94covener the request. Log messages which are associated with the connection or
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the server are not affected.
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic </note>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</directivesynopsis>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>MaxKeepAliveRequests</name>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<description>Number of requests allowed on a persistent
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorconnection</description>
d950cf9262224a223e2ff5c51393708071e14b94covener<syntax>MaxKeepAliveRequests <var>number</var></syntax>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<default>MaxKeepAliveRequests 100</default>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<contextlist><context>server config</context><context>virtual host</context>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</contextlist>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh<usage>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>The <directive>MaxKeepAliveRequests</directive> directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic limits the number of requests allowed per connection when
d950cf9262224a223e2ff5c51393708071e14b94covener <directive module="core" >KeepAlive</directive> is on. If it is
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor set to <code>0</code>, unlimited requests will be allowed. We
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive recommend that this setting be kept to a high value for maximum
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive server performance.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>For example:</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <example>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive MaxKeepAliveRequests 500
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </example>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive</usage>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
dc223428958ad9ff05011545bcdda000887b93e5slive<directivesynopsis>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj<name>Mutex</name>
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj<description>Configures mutex mechanism and lock file directory for all
dc223428958ad9ff05011545bcdda000887b93e5sliveor specified mutexes</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Mutex default</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<compatibility>Available in Apache HTTP Server 2.3.4 and later</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess
d8c44cd75cf575fe51319280c12445109e878523noodl<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Mutex</directive> directive sets the mechanism,
030108b1816bcda3d925df65357feabdce83bc94slive and optionally the lock file location, that httpd and modules use
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor to serialize access to resources. Specify <code>default</code> as
37742b630743e470b94618ecb3560fbd82e50b59rbowen the first argument to change the settings for all mutexes; specify
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a mutex name (see table below) as the first argument to override
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh defaults only for that mutex.</p>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>The <directive>Mutex</directive> directive is typically used in
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh the following exceptional situations:</p>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>change the mutex mechanism when the default mechanism selected
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess by <glossary>APR</glossary> has a functional or performance
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess problem</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
37742b630743e470b94618ecb3560fbd82e50b59rbowen <li>change the directory used by file-based mutexes when the
37742b630743e470b94618ecb3560fbd82e50b59rbowen default directory does not support locking</li>
37742b630743e470b94618ecb3560fbd82e50b59rbowen </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>
e8811b6d38f756b325446ded5d96857d13856511takashi directive, but third-party modules may not. Consult the documentation
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the third-party module, which must indicate the mutex name(s) which
2aa51ed61adb484602e94de3d2214ec267aecedbigalic can be configured if this directive is supported.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </note>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The following mutex <em>mechanisms</em> are available:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <ul>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <li><code>default | yes</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This selects the default locking implementation, as determined by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <glossary>APR</glossary>. The default locking implementation can
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd be displayed by running <program>httpd</program> with the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>-V</code> option.</p></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <li><code>none | no</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This effectively disables the mutex, and is only allowed for a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd mutex if the module indicates that it is a valid choice. Consult the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module documentation for more information.</p></li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>posixsem</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This is a mutex variant based on a Posix semaphore.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning"><title>Warning</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The semaphore ownership is not recovered if a thread in the process
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd holding the mutex segfaults, resulting in a hang of the web server.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li><code>sysvsem</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>It is possible to "leak" SysV semaphores if processes crash
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess before the semaphore is removed.</p>
37742b630743e470b94618ecb3560fbd82e50b59rbowen </note>
37742b630743e470b94618ecb3560fbd82e50b59rbowen
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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess or <code>cgiwrapper</code>).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick
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>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>This is a mutex variant based on cross-process Posix thread
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess mutexes.</p>
030108b1816bcda3d925df65357feabdce83bc94slive
030108b1816bcda3d925df65357feabdce83bc94slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>On most systems, if a child process terminates abnormally while
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh holding a mutex that uses this implementation, the server will deadlock
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh and stop responding to requests. When this occurs, the server will
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh require a manual restart to recover.</p>
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh <p>Solaris is a notable exception as it provides a mechanism which
f03f2609a2fc7a0d920842390738080bc0e1304bhumbedooh usually allows the mutex to be recovered after a child process
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd terminates abnormally while holding a mutex.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If your system implements the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to use the <code>pthread</code> option safely.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li><code>fcntl:/path/to/mutex</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant where a physical (lock-)file and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>fcntl()</code> function are used as the mutex.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </li>
7fbd7281d06cec1918aa370214df77c572f871a9sf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provide file locking.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>file:/path/to/mutex</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This selects the "best" available file locking implementation,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive choosing between <code>fcntl</code> and <code>flock</code>, in that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd order.</p></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>Most mechanisms are only available on selected platforms, where the
1597043cec6ad37fa4154bf09b0fccdabed1a239slive underlying platform and <glossary>APR</glossary> support it. Mechanisms
1597043cec6ad37fa4154bf09b0fccdabed1a239slive which aren't available on all platforms are <em>posixsem</em>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
530eba85dbd41b8a0fa5255d3648d1440199a661slive <em>flock</em>, and <em>file</em>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the path, if provided, is a directory where the lock file will be created.
530eba85dbd41b8a0fa5255d3648d1440199a661slive The default directory is httpd's run-time file directory relative to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ServerRoot</directive>. Always use a local disk
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem for <code>/path/to/mutex</code> and never a directory residing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on a NFS- or AFS-filesystem. The basename of the file will be the mutex
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type, an optional instance string provided by the module, and unless the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>OmitPID</code> keyword is specified, the process id of the httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parent process will be appended to to make the file name unique, avoiding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive conflicts when multiple httpd instances share a lock file directory. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, if the mutex name is <code>mpm-accept</code> and the lock file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory is <code>/var/httpd/locks</code>, the lock file name for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive httpd instance with parent process id 12345 would be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/var/httpd/locks/mpm-accept.12345</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Security</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It is best to <em>avoid</em> putting mutex files in a world-writable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory such as <code>/var/tmp</code> because someone could create
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a denial of service attack and prevent the server from starting by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating a lockfile with the same name as the one the server will try
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to create.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following table documents the names of mutexes used by httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and bundled modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1" style="zebra">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Mutex name</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Module(s)</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th>Protected resource</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>mpm-accept</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>prefork</module> and <module>worker</module> MPMs</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>incoming connections, to avoid the thundering herd problem;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for more information, refer to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/misc/perf-tuning.html">performance tuning</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>authdigest-client</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_auth_digest</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>client list in shared memory</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>authdigest-opaque</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_auth_digest</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>counter in shared memory</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ldap-cache</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ldap</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>LDAP result cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>rewrite-map</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_rewrite</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>communication with external mapping programs, to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive intermixed I/O from multiple requests</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ssl-cache</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ssl</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>SSL session cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>ssl-stapling</code></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><module>mod_ssl</module></td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>OCSP stapling response cache</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
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>
7fbd7281d06cec1918aa370214df77c572f871a9sf </table>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
7fbd7281d06cec1918aa370214df77c572f871a9sf parent process id from the lock file name.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>In the following example, the mutex mechanism for the MPM accept
7fbd7281d06cec1918aa370214df77c572f871a9sf mutex will be changed from the compiled-in default to <code>fcntl</code>,
7fbd7281d06cec1918aa370214df77c572f871a9sf with the associated lock file created in directory
7fbd7281d06cec1918aa370214df77c572f871a9sf <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
7fbd7281d06cec1918aa370214df77c572f871a9sf will be changed from the compiled-in default to <code>sysvsem</code>.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf Mutex default sysvsem<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf Mutex mpm-accept fcntl:/var/httpd/locks
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
7fbd7281d06cec1918aa370214df77c572f871a9sf</usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<name>NameVirtualHost</name>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Designates an IP address for name-virtual
7fbd7281d06cec1918aa370214df77c572f871a9sfhosting</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<usage>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>A single <directive>NameVirtualHost</directive> directive
7fbd7281d06cec1918aa370214df77c572f871a9sfidentifies a set of identical virtual hosts on which the server will
7fbd7281d06cec1918aa370214df77c572f871a9sffurther select from on the basis of the <em>hostname</em>
7fbd7281d06cec1918aa370214df77c572f871a9sfrequested by the client. The <directive>NameVirtualHost</directive>
7fbd7281d06cec1918aa370214df77c572f871a9sfdirective is a required directive if you want to configure
7fbd7281d06cec1918aa370214df77c572f871a9sf<a href="/vhosts/">name-based virtual hosts</a>.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>This directive, and the corresponding <directive >VirtualHost</directive>,
7fbd7281d06cec1918aa370214df77c572f871a9sf<em>must</em> be qualified with a port number if the server supports both HTTP
7fbd7281d06cec1918aa370214df77c572f871a9sfand HTTPS connections.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>Although <var>addr</var> can be a hostname, it is recommended
7fbd7281d06cec1918aa370214df77c572f871a9sfthat you always use an IP address or a wildcard. A wildcard
7fbd7281d06cec1918aa370214df77c572f871a9sfNameVirtualHost matches only virtualhosts that also have a literal wildcard
7fbd7281d06cec1918aa370214df77c572f871a9sfas their argument.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p>In cases where a firewall or other proxy receives the requests and
7fbd7281d06cec1918aa370214df77c572f871a9sfforwards them on a different IP address to the server, you must specify the
7fbd7281d06cec1918aa370214df77c572f871a9sfIP address of the physical interface on the machine which will be
7fbd7281d06cec1918aa370214df77c572f871a9sfservicing the requests. </p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf<p> In the example below, requests received on interface 192.0.2.1 and port 80
7fbd7281d06cec1918aa370214df77c572f871a9sfwill only select among the first two virtual hosts. Requests received on
7fbd7281d06cec1918aa370214df77c572f871a9sfport 80 on any other interface will only select among the third and fourth
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivevirtual hosts. In the common case where the interface isn't important
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto the mapping, only the "*:80" NameVirtualHost and VirtualHost directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveare necessary.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 192.0.2.1:80<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost *:80<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost 192.0.2.1:80&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &nbsp; ServerName namebased-a.example.com<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen &lt;/VirtualHost&gt;<br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <br />
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen &lt;VirtualHost 192.0.2.1:80&gt;<br />
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh &nbsp; Servername namebased-b.example.com<br />
8b052d682204371decc64f942aede5ef1da98955erikabele &lt;/VirtualHost&gt;<br />
8b052d682204371decc64f942aede5ef1da98955erikabele <br />
8b052d682204371decc64f942aede5ef1da98955erikabele &lt;VirtualHost *:80&gt;<br />
8b052d682204371decc64f942aede5ef1da98955erikabele &nbsp; ServerName namebased-c.example.com <br />
8b052d682204371decc64f942aede5ef1da98955erikabele &lt;/VirtualHost&gt;<br />
8b052d682204371decc64f942aede5ef1da98955erikabele <br />
8b052d682204371decc64f942aede5ef1da98955erikabele &lt;VirtualHost *:80&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &nbsp; ServerName namebased-d.example.com <br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/VirtualHost&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf <br />
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>If no matching virtual host is found, then the first listed
7fbd7281d06cec1918aa370214df77c572f871a9sf virtual host that matches the IP address and port will be used.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>IPv6 addresses must be enclosed in square brackets, as shown
2aa51ed61adb484602e94de3d2214ec267aecedbigalic in the following example:</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
7fbd7281d06cec1918aa370214df77c572f871a9sf
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <note><title>Argument to <directive type="section">VirtualHost</directive>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directive</title>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Note that the argument to the <directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic type="section">VirtualHost</directive> directive must
2aa51ed61adb484602e94de3d2214ec267aecedbigalic exactly match the argument to the <directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic >NameVirtualHost</directive> directive.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf
7fbd7281d06cec1918aa370214df77c572f871a9sf <example>
7fbd7281d06cec1918aa370214df77c572f871a9sf NameVirtualHost 192.0.2.2:80<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;VirtualHost 192.0.2.2:80&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf # ...<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf &lt;/VirtualHost&gt;<br />
7fbd7281d06cec1918aa370214df77c572f871a9sf </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Virtual Hosts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedocumentation</a></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<name>Options</name>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<description>Configures what features are available in a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedirectory</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Options
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Options All</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>Options</override>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <directive>Options</directive> directive controls which
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim case none of the extra features are enabled, or one or more of
6beba165aeced2ca77a6f1593ee08c47a32099efcovener the following:</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dl>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dt><code>All</code></dt>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dd>All options except for <code>MultiViews</code>. This is the default
6beba165aeced2ca77a6f1593ee08c47a32099efcovener setting.</dd>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dt><code>ExecCGI</code></dt>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dd>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener Execution of CGI scripts using <module>mod_cgi</module>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener is permitted.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><code>FollowSymLinks</code></dt>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
7a975d0413ba303546b7619e4785cb641f7f09fdcovener The server will follow symbolic links in this directory.
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <note>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>Even though the server follows the symlink it does <em>not</em>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener change the pathname used to match against <directive type="section"
7a975d0413ba303546b7619e4785cb641f7f09fdcovener module="core">Directory</directive> sections.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>Note also, that this option <strong>gets ignored</strong> if set
7a975d0413ba303546b7619e4785cb641f7f09fdcovener inside a <directive type="section" module="core">Location</directive>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener section.</p>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <p>Omitting this option should not be considered a security restriction,
7a975d0413ba303546b7619e4785cb641f7f09fdcovener since symlink testing is subject to race conditions that make it
7a975d0413ba303546b7619e4785cb641f7f09fdcovener circumventable.</p>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener </note></dd>
7a975d0413ba303546b7619e4785cb641f7f09fdcovener
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <dt><code>Includes</code></dt>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes provided by <module>mod_include</module>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim are permitted.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><code>IncludesNOEXEC</code></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim Server-side includes are permitted, but the <code>#exec
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim cmd</code> and <code>#exec cgi</code> are disabled. It is still
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim possible to <code>#include virtual</code> CGI scripts from
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <directive module="mod_alias">ScriptAlias</directive>ed
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim directories.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><code>Indexes</code></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim If a URL which maps to a directory is requested, and there
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim is no <directive module="mod_dir">DirectoryIndex</directive>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim (<em>e.g.</em>, <code>index.html</code>) in that directory, then
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <module>mod_autoindex</module> will return a formatted listing
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim of the directory.</dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><code>MultiViews</code></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <a href="/content-negotiation.html">Content negotiated</a>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim "MultiViews" are allowed using
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <module>mod_negotiation</module>.
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <note><title>Note</title> <p>This option gets ignored if set
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim anywhere other than <directive module="core" type="section"
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim >Directory</directive>, as <module>mod_negotiation</module>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim needs real resources to compare against and evaluate from.</p></note>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dt><code>SymLinksIfOwnerMatch</code></dt>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <dd>The server will only follow symbolic links for which the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim target file or directory is owned by the same user id as the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim link.
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <note><title>Note</title> <p>This option gets ignored if
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim set inside a <directive module="core"
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim type="section">Location</directive> section.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>This option should not be considered a security restriction,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim since symlink testing is subject to race conditions that make it
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim circumventable.</p></note>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </dd>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </dl>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>Normally, if multiple <directive>Options</directive> could
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim apply to a directory, then the most specific one is used and
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim others are ignored; the options are not merged. (See <a
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim href="/sections.html#mergin">how sections are merged</a>.)
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim However if <em>all</em> the options on the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <directive>Options</directive> directive are preceded by a
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>+</code> or <code>-</code> symbol, the options are
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim merged. Any options preceded by a <code>+</code> are added to the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim options currently in force, and any options preceded by a
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>-</code> are removed from the options currently in
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim force. </p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <note type="warning"><title>Warning</title>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>Mixing <directive>Options</directive> with a <code>+</code> or
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>-</code> with those without is not valid syntax, and is likely
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim to cause unexpected results.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </note>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <example>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim &lt;Directory /web/docs&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options Indexes FollowSymLinks<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;<br />
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <br />
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick &lt;Directory /web/docs/spec&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen Options Includes<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>then only <code>Includes</code> will be set for the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>/web/docs/spec</code> directory. However if the second
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive>Options</directive> directive uses the <code>+</code> and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-</code> symbols:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options Indexes FollowSymLinks<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;Directory /web/docs/spec&gt;<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Options +Includes -Indexes<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </indent>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick &lt;/Directory&gt;
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>then the options <code>FollowSymLinks</code> and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>Includes</code> are set for the <code>/web/docs/spec</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directory.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note><title>Note</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Using <code>-IncludesNOEXEC</code> or
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>-Includes</code> disables server-side includes completely
a0fed3e26656887c8458aa1081d516d08ced3c84trawick regardless of the previous setting.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </note>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The default in the absence of any other settings is
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>All</code>.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>Protocol</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Protocol for a listening socket</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>Protocol <var>protocol</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<compatibility>Available in Apache 2.1.5 and later.
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawickOn Windows from Apache 2.3.3 and later.</compatibility>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<usage>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>This directive specifies the protocol used for a specific listening socket.
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick The protocol is used to determine which module should handle a request, and
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick to apply protocol specific optimizations with the <directive>AcceptFilter</directive>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick directive.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>You only need to set the protocol if you are running on non-standard ports, otherwise <code>http</code> is assumed for port 80 and <code>https</code> for port 443.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>For example, if you are running <code>https</code> on a non-standard port, specify the protocol explicitly:</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick Protocol https
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>You can also specify the protocol using the <directive module="mpm_common">Listen</directive> directive.</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick</usage>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<seealso><directive>AcceptFilter</directive></seealso>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick<seealso><directive module="mpm_common">Listen</directive></seealso>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick</directivesynopsis>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>RLimitCPU</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Limits the CPU consumption of processes launched
a0fed3e26656887c8458aa1081d516d08ced3c84trawickby Apache httpd children</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>Unset; uses operating system defaults</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context><context>.htaccess</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<override>All</override>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
a0fed3e26656887c8458aa1081d516d08ced3c84trawick resource limit for all processes and the second parameter sets
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the maximum resource limit. Either parameter can be a number,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick or <code>max</code> to indicate to the server that the limit should
a0fed3e26656887c8458aa1081d516d08ced3c84trawick be set to the maximum allowed by the operating system
a0fed3e26656887c8458aa1081d516d08ced3c84trawick configuration. Raising the maximum resource limit requires that
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the server is running as <code>root</code>, or in the initial startup
a0fed3e26656887c8458aa1081d516d08ced3c84trawick phase.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This applies to processes forked off from Apache httpd children
a0fed3e26656887c8458aa1081d516d08ced3c84trawick servicing requests, not the Apache httpd children themselves. This
a0fed3e26656887c8458aa1081d516d08ced3c84trawick includes CGI scripts and SSI exec commands, but not any
a0fed3e26656887c8458aa1081d516d08ced3c84trawick processes forked off from the Apache httpd parent such as piped
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor logs.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>CPU resource limits are expressed in seconds per
a0fed3e26656887c8458aa1081d516d08ced3c84trawick process.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">RLimitMEM</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">RLimitNPROC</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>RLimitMEM</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Limits the memory consumption of processes launched
a0fed3e26656887c8458aa1081d516d08ced3c84trawickby Apache httpd children</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>Unset; uses operating system defaults</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context><context>.htaccess</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<override>All</override>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<usage>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
a0fed3e26656887c8458aa1081d516d08ced3c84trawick resource limit for all processes and the second parameter sets
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor the maximum resource limit. Either parameter can be a number,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick or <code>max</code> to indicate to the server that the limit should
215694531f7d868b906df96e22a80e6a1d2326a6lgentis be set to the maximum allowed by the operating system
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor configuration. Raising the maximum resource limit requires that
a0fed3e26656887c8458aa1081d516d08ced3c84trawick the server is running as <code>root</code>, or in the initial startup
a0fed3e26656887c8458aa1081d516d08ced3c84trawick phase.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>This applies to processes forked off from Apache httpd children
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick servicing requests, not the Apache httpd children themselves. This
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick includes CGI scripts and SSI exec commands, but not any
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick processes forked off from the Apache httpd parent such as piped
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick logs.</p>
0fdcfd7a51bf3028b0be879c43c009c16c6d3f58trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Memory resource limits are expressed in bytes per
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick process.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor</usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitCPU</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">RLimitNPROC</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<name>RLimitNPROC</name>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Limits the number of processes that can be launched by
a0fed3e26656887c8458aa1081d516d08ced3c84trawickprocesses launched by Apache httpd children</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<default>Unset; uses operating system defaults</default>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context><context>.htaccess</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<override>All</override>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Takes 1 or 2 parameters. The first parameter sets the soft
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick resource limit for all processes and the second parameter sets
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the maximum resource limit. Either parameter can be a number,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick or <code>max</code> to indicate to the server that the limit
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick should be set to the maximum allowed by the operating system
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick configuration. Raising the maximum resource limit requires that
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the server is running as <code>root</code>, or in the initial startup
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick phase.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This applies to processes forked off from Apache httpd children
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick servicing requests, not the Apache httpd children themselves. This
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick includes CGI scripts and SSI exec commands, but not any
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick processes forked off from the Apache httpd parent such as piped
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick logs.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>Process limits control the number of processes per user.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <note><title>Note</title>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>If CGI processes are <strong>not</strong> running
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick under user ids other than the web server user id, this directive
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick will limit the number of processes that the server itself can
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick create. Evidence of this situation will be indicated by
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <strong><code>cannot fork</code></strong> messages in the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code>error_log</code>.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </note>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitMEM</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">RLimitCPU</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<name>ScriptInterpreterSource</name>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Technique for locating the interpreter for CGI
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickscripts</description>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<default>ScriptInterpreterSource Script</default>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<contextlist><context>server config</context><context>virtual host</context>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<context>directory</context><context>.htaccess</context></contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<override>FileInfo</override>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<compatibility>Win32 only;
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickoption <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
2b6c7b8eb5fbc43564898aedac730df7e91da475trawicklater</compatibility>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<usage>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This directive is used to control how Apache httpd finds the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick interpreter used to run CGI scripts. The default setting is
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick by the shebang line (first line, starting with <code>#!</code>) in the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick script. On Win32 systems this line usually looks like:</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <example>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick #!C:/Perl/bin/perl.exe
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick </example>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <example>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick #!perl
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </example>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Setting <code>ScriptInterpreterSource Registry</code> will
a0fed3e26656887c8458aa1081d516d08ced3c84trawick cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
a0fed3e26656887c8458aa1081d516d08ced3c84trawick searched using the script file extension (e.g., <code>.pl</code>) as a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick search key. The command defined by the registry subkey
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>Shell\Open\Command</code> is used to open the script file. If the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic registry keys cannot be found, Apache httpd falls back to the behavior of the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>Script</code> option.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <note type="warning"><title>Security</title>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>Be careful when using <code>ScriptInterpreterSource
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Registry</code> with <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_alias">ScriptAlias</directive>'ed directories, because
4f127f38c6400931b17c1ce235aa84a046ab7310jim Apache httpd will try to execute <strong>every</strong> file within this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. The <code>Registry</code> setting may cause undesired
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd program calls on files which are typically not executed. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, the default open command on <code>.htm</code> files on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most Windows systems will execute Microsoft Internet Explorer, so
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any HTTP request for an <code>.htm</code> file existing within the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive script directory would start the browser in the background on the
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener server. This is a good way to crash your system within a minute or
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener so.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener </note>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
fb77c505254b6e9c925e23e734463e87574f8f40kess 2.0 does the same thing as <code>Registry</code> but uses only the
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener subkey <code>Shell\ExecCGI\Command</code>. The
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive <code>ExecCGI</code> key is not a common one. It must be
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive configured manually in the windows registry and hence prevents
05201775eaa6b363b8a119c8aea5db246b967591yoshiki accidental program calls on your system.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SeeRequestTail</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Determine if mod_status displays the first 63 characters
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveof a request or the last 63, assuming the request itself is greater than
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive63 chars.</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SeeRequestTail On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>SeeRequestTail Off</default>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache httpd 2.2.7 and later.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>mod_status with <code>ExtendedStatus On</code>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic displays the actual request being handled.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For historical purposes, only 63 characters of the request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive are actually stored for display purposes. This directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive controls whether the 1st 63 characters are stored (the previous
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 64 characters or greater.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If Apache httpd is handling <code
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</code
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive > mod_status displays as follows:
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <th>Off (default)</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>GET&nbsp;/disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <tr>
13e5182a0c199ecc7a73db97b6448a544e940868slive <th>On</th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg&nbsp;HTTP/1.1</td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </table>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic</usage>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>ServerAdmin</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Email address that the server includes in error
b75f4826fd52736bd987ba3f2c48163c73ac1edccovenermessages sent to the client</description>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<contextlist><context>server config</context><context>virtual host</context>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener</contextlist>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<usage>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener <p>The <directive>ServerAdmin</directive> sets the contact address
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive that the server includes in any error messages it returns to the
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive client. If the <code>httpd</code> doesn't recognize the supplied argument
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive as an URL, it
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd assumes, that it's an <var>email-address</var> and prepends it with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mailto:</code> in hyperlink targets. However, it's recommended to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess actually use an email address, since there are a lot of CGI scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive make that assumption. If you want to use an URL, it should point to another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server under your control. Otherwise users may not be able to contact you in
13e5182a0c199ecc7a73db97b6448a544e940868slive case of errors.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this, e.g.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin www-admin@foo.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>as users do not always mention that they are talking about the
13e5182a0c199ecc7a73db97b6448a544e940868slive server!</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive</usage>
b00583f8e126bbb00b06dcf06af06c9d07978701kess</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>ServerAlias</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Alternate names for a host used when matching requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto name-virtual hosts</description>
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess<syntax>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</syntax>
13e5182a0c199ecc7a73db97b6448a544e940868slive<contextlist><context>virtual host</context></contextlist>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<usage>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>The <directive>ServerAlias</directive> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive alternate names for a host, for use with <a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess href="/vhosts/name-based.html">name-based virtual hosts</a>. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ServerAlias</directive> may include wildcards, if appropriate.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
13e5182a0c199ecc7a73db97b6448a544e940868slive &lt;VirtualHost *:80&gt;<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic ServerName server.domain.com<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic ServerAlias server server2.domain.com server2<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic ServerAlias *.example.com<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic UseCanonicalName Off<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic # ...<br />
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<name>ServerName</name>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<description>Hostname and port that the server uses to identify
b75f4826fd52736bd987ba3f2c48163c73ac1edccoveneritself</description>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<syntax>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener<contextlist><context>server config</context><context>virtual host</context>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener</contextlist>
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<usage>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>The <directive>ServerName</directive> directive sets the
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener request scheme, hostname and
b75f4826fd52736bd987ba3f2c48163c73ac1edccovener port that the server uses to identify itself. This is used when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating redirection URLs.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Additionally, <directive>ServerName</directive> is used (possibly
13e5182a0c199ecc7a73db97b6448a544e940868slive in conjunction with <directive>ServerAlias</directive>) to uniquely
13e5182a0c199ecc7a73db97b6448a544e940868slive identify a virtual host, when using <a
13e5182a0c199ecc7a73db97b6448a544e940868slive href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>For example, if the name of the
13e5182a0c199ecc7a73db97b6448a544e940868slive machine hosting the web server is <code>simple.example.com</code>,
13e5182a0c199ecc7a73db97b6448a544e940868slive but the machine also has the DNS alias <code>www.example.com</code>
13e5182a0c199ecc7a73db97b6448a544e940868slive and you wish the web server to be so identified, the following
13e5182a0c199ecc7a73db97b6448a544e940868slive directive should be used:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic ServerName www.example.com:80
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen </example>
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic <p>The <directive>ServerName</directive> directive
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen may appear anywhere within the definition of a server. However,
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen each appearance overrides the previous appearance (within that
fb77c505254b6e9c925e23e734463e87574f8f40kess server).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>If no <directive>ServerName</directive> is specified, then the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh server attempts to deduce the hostname by performing a reverse
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh lookup on the IP address. If no port is specified in the
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <directive>ServerName</directive>, then the server will use the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic port from the incoming request. For optimal reliability and
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh predictability, you should specify an explicit hostname and port
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh using the <directive>ServerName</directive> directive.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>If you are using <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive>ServerName</directive> inside a
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">VirtualHost</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess section specifies what hostname must appear in the request's
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>Sometimes, the server runs behind a device that processes SSL,
2aa51ed61adb484602e94de3d2214ec267aecedbigalic such as a reverse proxy, load balancer or SSL offload
2aa51ed61adb484602e94de3d2214ec267aecedbigalic appliance. When this is the case, specify the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <code>https://</code> scheme and the port number to which the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic clients connect in the <directive>ServerName</directive> directive
2aa51ed61adb484602e94de3d2214ec267aecedbigalic to make sure that the server generates the correct
2aa51ed61adb484602e94de3d2214ec267aecedbigalic self-referential URLs.
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>See the description of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">UseCanonicalName</directive> and
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="core">UseCanonicalPhysicalPort</directive> directives for
fb77c505254b6e9c925e23e734463e87574f8f40kess settings which determine whether self-referential URLs (e.g., by the
fb77c505254b6e9c925e23e734463e87574f8f40kess <module>mod_dir</module> module) will refer to the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess specified port, or to the port number given in the client's request.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note type="warning">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Failure to set <directive>ServerName</directive> to a name that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your server can resolve to an IP address will result in a startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive warning. <code>httpd</code> will then use whatever hostname it can
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic determine, using the system's <code>hostname</code> command. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will almost never be the hostname you actually want.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen </example>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen </note>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</usage>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen Apache HTTP Server</a></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><a href="/vhosts/">Apache HTTP Server virtual host
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen documentation</a></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><directive module="core">UseCanonicalName</directive></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><directive module="core">NameVirtualHost</directive></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<seealso><directive module="core">ServerAlias</directive></seealso>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<name>ServerPath</name>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<description>Legacy URL pathname for a name-based virtual host that
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohis accessed by an incompatible browser</description>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<syntax>ServerPath <var>URL-path</var></syntax>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<contextlist><context>virtual host</context></contextlist>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh<usage>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>The <directive>ServerPath</directive> directive sets the legacy
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen URL pathname for a host, for use with <a
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen href="/vhosts/">name-based virtual hosts</a>.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<name>ServerRoot</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Base directory for the server installation</description>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<syntax>ServerRoot <var>directory-path</var></syntax>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<default>ServerRoot /usr/local/apache</default>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerRoot</directive> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory in which the server lives. Typically it will contain the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectories <code>conf/</code> and <code>logs/</code>. Relative
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd paths in other configuration directives (such as <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Include</directive> or <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_so">LoadModule</directive>, for example) are taken as
ef8e89e090461194ecadd31e8796a2c51e0531a2kess relative to this directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen ServerRoot /home/httpd
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/invoking.html">the <code>-d</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive option to <code>httpd</code></a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/misc/security_tips.html#serverroot">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive security tips</a> for information on how to properly set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permissions on the <directive>ServerRoot</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerSignature</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerSignature</directive> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, <module>mod_proxy</module> ftp directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listings, <module>mod_info</module> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the user often has no possibility to tell which of the chained servers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive actually produced a returned error message.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The <code>Off</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting, which is the default, suppresses the footer line (and is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive therefore compatible with the behavior of Apache-1.2 and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen below). The <code>On</code> setting simply adds a line with the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen server version number and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerName</directive> of the serving virtual host,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen and the <code>EMail</code> setting additionally creates a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "mailto:" reference to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerAdmin</directive> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, the details of the server version number
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive presented are controlled by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerTokens</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerTokens</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<name>ServerTokens</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheader</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<default>ServerTokens Full</default>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Major</code></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dd>Server sends (<em>e.g.</em>): <code>Server:
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick Apache/2</code></dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>ServerTokens Minor</code></dt>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dd>Server sends (<em>e.g.</em>): <code>Server:
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Apache/2.4</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Min[imal]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.4.1</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens OS</code></dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
003f0c9fda6664daf5092a0e42f65ede20098153slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
fb77c505254b6e9c925e23e734463e87574f8f40kess (Unix)</code></dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele </dl>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This setting applies to the entire server, and cannot be
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>After version 2.0.44, this directive also controls the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information presented by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerSignature</directive> directive.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <note>Setting <directive>ServerTokens</directive> to less than
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>minimal</code> is not recommended because it makes it more
4cafc94e99922f00654e1779d30c2cccf5278c4fkess difficult to debug interoperational problems. Also note that
4cafc94e99922f00654e1779d30c2cccf5278c4fkess disabling the Server: header does nothing at all to make your
4cafc94e99922f00654e1779d30c2cccf5278c4fkess server more secure; the idea of "security through obscurity"
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh is a myth and leads to a false sense of safety.</note>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki</usage>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<seealso><directive module="core">ServerSignature</directive></seealso>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<name>SetHandler</name>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<description>Forces all matching files to be processed by a
4cafc94e99922f00654e1779d30c2cccf5278c4fkesshandler</description>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<syntax>SetHandler <var>handler-name</var>|None</syntax>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<contextlist><context>server config</context><context>virtual host</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<context>directory</context><context>.htaccess</context>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess</contextlist>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<override>FileInfo</override>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki<compatibility>Moved into the core in Apache httpd 2.0</compatibility>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<usage>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>When placed into an <code>.htaccess</code> file or a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <directive type="section" module="core">Directory</directive> or
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <directive type="section" module="core">Location</directive>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive section, this directive forces all matching files to be parsed
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive through the <a href="/handler.html">handler</a> given by
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <var>handler-name</var>. For example, if you had a directory you
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive wanted to be parsed entirely as imagemap rule files, regardless
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive of extension, you might put the following into an
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <code>.htaccess</code> file in that directory:</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess SetHandler imap-file
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen </example>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>Another example: if you wanted to have the server display a
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive status report whenever a URL of
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <code>http://servername/status</code> was called, you might put
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive the following into <code>httpd.conf</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
a8ee031b2224ce5473826c9d4f603681589245fawrowe <indent>
a8ee031b2224ce5473826c9d4f603681589245fawrowe SetHandler server-status<br />
a8ee031b2224ce5473826c9d4f603681589245fawrowe </indent>
a8ee031b2224ce5473826c9d4f603681589245fawrowe &lt;/Location&gt;
a8ee031b2224ce5473826c9d4f603681589245fawrowe </example>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>You can override an earlier defined <directive>SetHandler</directive>
a8ee031b2224ce5473826c9d4f603681589245fawrowe directive by using the value <code>None</code>.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p><strong>Note:</strong> because SetHandler overrides default handlers,
a8ee031b2224ce5473826c9d4f603681589245fawrowe normal behaviour such as handling of URLs ending in a slash (/) as
a8ee031b2224ce5473826c9d4f603681589245fawrowe directories or index files is suppressed.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><directive module="mod_mime">AddHandler</directive></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe</directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<directivesynopsis>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<name>SetInputFilter</name>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<description>Sets the filters that will process client requests and POST
88d86cfadffe2275a3dfb67a4d7bdc018630b661rboweninput</description>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<contextlist><context>server config</context><context>virtual host</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<context>directory</context><context>.htaccess</context>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<override>FileInfo</override>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe<usage>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The <directive>SetInputFilter</directive> directive sets the
a8ee031b2224ce5473826c9d4f603681589245fawrowe filter or filters which will process client requests and POST
a8ee031b2224ce5473826c9d4f603681589245fawrowe input when they are received by the server. This is in addition to
a8ee031b2224ce5473826c9d4f603681589245fawrowe any filters defined elsewhere, including the
a8ee031b2224ce5473826c9d4f603681589245fawrowe <directive module="mod_mime">AddInputFilter</directive>
a8ee031b2224ce5473826c9d4f603681589245fawrowe directive.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>If more than one filter is specified, they must be separated
a8ee031b2224ce5473826c9d4f603681589245fawrowe by semicolons in the order in which they should process the
a8ee031b2224ce5473826c9d4f603681589245fawrowe content.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<name>SetOutputFilter</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
733738e83a9b0113476e3f67992c2278d61ee4dakess<override>FileInfo</override>
733738e83a9b0113476e3f67992c2278d61ee4dakess
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<usage>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>The <directive>SetOutputFilter</directive> directive sets the filters
2e5e2673cb64d3e4d445d911c6f61ac171020725nd which will process responses from the server before they are
2e5e2673cb64d3e4d445d911c6f61ac171020725nd sent to the client. This is in addition to any filters defined
2e5e2673cb64d3e4d445d911c6f61ac171020725nd elsewhere, including the
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <directive module="mod_mime">AddOutputFilter</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example, the following configuration will process all files
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh in the <code>/www/data/</code> directory for server-side
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /www/data/&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetOutputFilter INCLUDES<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
206b5dce9e48924aa9f12ce87f14856a4cd3fb68takashi</directivesynopsis>
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<name>TimeOut</name>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<description>Amount of time the server will wait for
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedoohcertain events before failing a request</description>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh<syntax>TimeOut <var>seconds</var></syntax>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh<default>TimeOut 300</default>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh<contextlist><context>server config</context><context>virtual host</context></contextlist>
c8b79d4b8796531f19dd54bd59d88c3b68338ceahumbedooh
2aa51ed61adb484602e94de3d2214ec267aecedbigalic<usage>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic <p>The <directive>TimeOut</directive> directive defines the length
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener of time Apache httpd will wait for I/O in various circumstances:</p>
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener
e32a6a51d27e311db1e1d5920ac7bd0de33823cfhumbedooh <ol>
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener <li>When reading data from the client, the length of time to
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener wait for a TCP packet to arrive if the read buffer is
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener empty.</li>
4fdfee72da9a4a290d2fb41a548e343801a2635dcovener
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener <li>When writing data to the client, the length of time to wait
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener for an acknowledgement of a packet if the send buffer is
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener full.</li>
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener
4bce6d8a597a3e1da9a2c6d24d62c1937d438bbccovener <li>In <module>mod_cgi</module>, the length of time to wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive output from a CGI script.</li>
fff1d314f760fc17a49215e8818b3e57691efa43niq
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>In <module>mod_ext_filter</module>, the length of time to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wait for output from a filtering process.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>In <module>mod_proxy</module>, the default timeout value if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_proxy">ProxyTimeout</directive> is not
003f0c9fda6664daf5092a0e42f65ede20098153slive configured.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ol>
e08ad1a326852610a7930269638a43657fc50d06sctemme
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme<name>TraceEnable</name>
e08ad1a326852610a7930269638a43657fc50d06sctemme<description>Determines the behaviour on <code>TRACE</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequests</description>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<syntax>TraceEnable <var>[on|off|extended]</var></syntax>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<default>TraceEnable on</default>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<contextlist><context>server config</context></contextlist>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<compatibility>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</compatibility>
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen<usage>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>This directive overrides the behavior of <code>TRACE</code> for both
06fcf16883e133e49db046945cbcf728d4cc6e37rbowen the core server and <module>mod_proxy</module>. The default
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <code>TraceEnable on</code> permits <code>TRACE</code> requests per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive RFC 2616, which disallows any request body to accompany the request.
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <code>TraceEnable off</code> causes the core server and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_proxy</module> to return a <code>405</code> (Method not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allowed) error to the client.</p>
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Finally, for testing and diagnostic purposes only, request
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier bodies may be allowed using the non-compliant <code>TraceEnable
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier extended</code> directive. The core (as an origin server) will
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier restrict the request body to 64k (plus 8k for chunk headers if
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier <code>Transfer-Encoding: chunked</code> is used). The core will
e6ab342447cf6b4c22bbe66169718d0e9b78819apoirier reflect the full headers and all chunk headers with the response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. As a proxy server, the request body is not restricted to 64k.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme<directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme<name>UnDefine</name>
e08ad1a326852610a7930269638a43657fc50d06sctemme<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
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>-D</code> arguments in any startup scripts.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme</usage>
e08ad1a326852610a7930269638a43657fc50d06sctemme</directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme<directivesynopsis>
e08ad1a326852610a7930269638a43657fc50d06sctemme<name>UseCanonicalName</name>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Configures how the server determines its own name and
e08ad1a326852610a7930269638a43657fc50d06sctemmeport</description>
e08ad1a326852610a7930269638a43657fc50d06sctemme<syntax>UseCanonicalName On|Off|DNS</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>UseCanonicalName Off</default>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim<contextlist><context>server config</context><context>virtual host</context>
29edaaeea24c41820e486944635348cd7fae1d11rbowen<context>directory</context></contextlist>
e08ad1a326852610a7930269638a43657fc50d06sctemme
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
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen specified in the <directive module="core">ServerName</directive>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen directive to construct the canonical name for the server. This name
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen is used in all self-referential URLs, and for the values of
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen <p>With <code>UseCanonicalName Off</code> Apache httpd will form
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen self-referential URLs using the hostname and port supplied by
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen the client if any are supplied (otherwise it will use the
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen canonical name, as defined above). These values are the same
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen that are used to implement <a
226aaa3e29f938600cd1b9dfb6774588d831d036rbowen href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
ef8e89e090461194ecadd31e8796a2c51e0531a2kess constructed from the client supplied values as well.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authenticate twice (once for <code>www</code> and once again
fb77c505254b6e9c925e23e734463e87574f8f40kess for <code>www.domain.com</code> -- see <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is a third option, <code>UseCanonicalName DNS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which is intended for use with mass IP-based virtual hosting to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support ancient clients that do not provide a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header. With this option Apache httpd does a
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
003f0c9fda6664daf5092a0e42f65ede20098153slive they may be broken by this option. The client is essentially free
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to give whatever value they want as a hostname. But if the CGI is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only using <code>SERVER_NAME</code> to construct self-referential URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then it should be just fine.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mpm_common">Listen</directive></seealso>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen</directivesynopsis>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<directivesynopsis>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen<name>UseCanonicalPhysicalPort</name>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen<description>Configures how the server determines its own name and
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedoohport</description>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen<syntax>UseCanonicalPhysicalPort On|Off</syntax>
fe9f851e55506793276ffaac89106433572868a8rbowen<default>UseCanonicalPhysicalPort Off</default>
fe9f851e55506793276ffaac89106433572868a8rbowen<contextlist><context>server config</context><context>virtual host</context>
fe9f851e55506793276ffaac89106433572868a8rbowen<context>directory</context></contextlist>
fe9f851e55506793276ffaac89106433572868a8rbowen
fe9f851e55506793276ffaac89106433572868a8rbowen<usage>
fe9f851e55506793276ffaac89106433572868a8rbowen <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructing the canonical port for the server to honor
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive module="core">UseCanonicalName</directive> directive,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provide the actual physical port number being used by this request
ef8e89e090461194ecadd31e8796a2c51e0531a2kess as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache httpd will not ever use the actual physical port number, instead
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relying on all configured information to construct a valid port number.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The ordering of when the physical port is used is as follows:<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalName On</code></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Port provided in <code>Servername</code></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Physical port</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Default port</li>
003f0c9fda6664daf5092a0e42f65ede20098153slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalName Off | DNS</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Parsed port from <code>Host:</code> header</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Physical port</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>Port provided in <code>Servername</code></li>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>Default port</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess </ul>
fb77c505254b6e9c925e23e734463e87574f8f40kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>With <code>UseCanonicalPhysicalPort Off</code>, the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess physical ports are removed from the ordering.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess </note>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mpm_common">Listen</directive></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>VirtualHost</name>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<description>Contains directives that apply only to a specific
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantzhostname or IP address</description>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<syntax>&lt;VirtualHost
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...&gt; ... &lt;/VirtualHost&gt;</syntax>
f35c904c3b359610a46e94fbb4ba8495b2338521slive<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
ef8e89e090461194ecadd31e8796a2c51e0531a2kess directives that will apply only to a particular virtual host. Any
ef8e89e090461194ecadd31e8796a2c51e0531a2kess directive that is allowed in a virtual host context may be
dc111bcea580da3da174c25be0fd7a8f22c86fe1jim used. When the server receives a request for a document on a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive particular virtual host, it uses the configuration directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enclosed in the <directive type="section">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section. <var>Addr</var> can be:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The IP address of the virtual host;</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>A fully qualified domain name for the IP address of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive virtual host (not recommended);</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <li>The character <code>*</code>, which is used only in combination with
2eb5346b17b3b69767cfe87d0f632efd6d15500djim <code>NameVirtualHost *</code> to match all IP addresses; or</li>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <li>The string <code>_default_</code>, which is used only
2eb5346b17b3b69767cfe87d0f632efd6d15500djim with IP virtual hosting to catch unmatched IP addresses.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <example><title>Example</title>
530eba85dbd41b8a0fa5255d3648d1440199a661slive &lt;VirtualHost 10.1.2.3&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh ServerAdmin webmaster@host.example.com<br />
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh DocumentRoot /www/docs/host.example.com<br />
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh ServerName host.example.com<br />
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh ErrorLog logs/host.example.com-error_log<br />
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh TransferLog logs/host.example.com-access_log<br />
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh </indent>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh &lt;/VirtualHost&gt;
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh </example>
9e59849752ebadf803f76453fe3b64e2cee8d190rbowen
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the optional port number could not be determined otherwise. An
530eba85dbd41b8a0fa5255d3648d1440199a661slive IPv6 example is shown below:</p>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
abad96c7b1becfc55c29a2933d909aa0b37b0fe0humbedooh ServerAdmin webmaster@host.example.com<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive 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;
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz </example>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>Each Virtual Host must correspond to a different IP address,
7b5535ed88e0f561b3bfb3330137bd804846afd4slive different port number or a different host name for the server,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor in the former case the server machine must be configured to
a21fb2799923b1c25a351f09e690bd46806f2fa2jim accept IP packets for multiple addresses. (If the machine does
a21fb2799923b1c25a351f09e690bd46806f2fa2jim not have multiple network interfaces, then this can be
a21fb2799923b1c25a351f09e690bd46806f2fa2jim accomplished with the <code>ifconfig alias</code> command -- if
a21fb2799923b1c25a351f09e690bd46806f2fa2jim your OS supports it).</p>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <note><title>Note</title>
a21fb2799923b1c25a351f09e690bd46806f2fa2jim <p>The use of <directive type="section">VirtualHost</directive> does
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>not</strong> affect what addresses Apache httpd listens on. You
f35c904c3b359610a46e94fbb4ba8495b2338521slive 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
fb77c505254b6e9c925e23e734463e87574f8f40kess not explicitly listed in another virtual host. In the absence
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of any <code>_default_</code> virtual host the "main" server config,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive consisting of all those definitions outside any VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, is used when no IP-match occurs.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>You can specify a <code>:port</code> to change the port that is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matched. If unspecified then it defaults to the same port as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most recent <directive module="mpm_common">Listen</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive statement of the main server. You may also specify <code>:*</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
2e4a251ce928e74ed84fd089cdceaf5f6b5c53f2humbedooh <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive consequence, the first listed virtual host is the default virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <note type="warning"><title>Security</title>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen <p>See the <a href="/misc/security_tips.html">security tips</a>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic document for details on why your security could be compromised if the
2aa51ed61adb484602e94de3d2214ec267aecedbigalic directory where log files are stored is writable by anyone other
2aa51ed61adb484602e94de3d2214ec267aecedbigalic than the user that starts the server.</p>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic </note>
2aa51ed61adb484602e94de3d2214ec267aecedbigalic</usage>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen Apache HTTP Server</a></seealso>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen<seealso><a href="/bind.html">Setting
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen which addresses and ports Apache HTTP Server uses</a></seealso>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen and &lt;Files&gt; sections work</a> for an explanation of how these
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen different sections are combined when a request is received</seealso>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen</directivesynopsis>
7f367b5dad8fbef7fe246de109de8f20fbb1270erbowen
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd</modulesynopsis>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd