core.xml revision a2920e90d95fa04c15bdbbc03e7f8636eac92423
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<!--
6fbd2e53c97ea6976d93e0ac521adabc55e0fb73nd Copyright 2002-2005 The Apache Software Foundation or its licensors, as
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd applicable.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Licensed under the Apache License, Version 2.0 (the "License");
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd you may not use this file except in compliance with the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd 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-->
7db9f691a00ead175b03335457ca296a33ddf31bnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<modulesynopsis metafile="core.xml.meta">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>core</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
530eba85dbd41b8a0fa5255d3648d1440199a661sliveavailable</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<status>Core</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>AcceptFilter</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures optimizations for a Protocol's Listener Sockets</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AcceptFilter <var>protocol</var> <var>accept_filter</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache 2.1.5 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables operating system specific optimizations for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listening socket by the Protocol type. The basic premise is for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive kernel to not send a socket to the server process until either data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is received or an entire HTTP Request is buffered. Only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FreeBSD's Accept Filters</a> and Linux's more primitive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> are currently supported.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The default values on FreeBSD are:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http httpready <br/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter https dataready
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the kernel level. Once an entire request is recieved, the kernel then
fb77c505254b6e9c925e23e734463e87574f8f40kess sends it to the server. See the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accf_http(9)</a> man page for more details. Since HTTPS requests are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&amp;sektion=9">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accf_data(9)</a> filter is used.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default values on Linux are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter http data <br/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptFilter https data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive requests. Any value besides <code>none</code> will enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
fb77c505254b6e9c925e23e734463e87574f8f40kess see the Linux
fb77c505254b6e9c925e23e734463e87574f8f40kess <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tcp(7)</a> man page.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Using <code>none</code> for an argument will disable any accept filters
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess for that protocol. This is useful for protocols that require a server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive send data first, such as <code>nntp</code>:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>AcceptFilter nttp none</example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>AcceptPathInfo</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Resources accept trailing pathname information</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AcceptPathInfo On|Off|Default</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<default>AcceptPathInfo Default</default>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>.htaccess</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<override>FileInfo</override>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<compatibility>Available in Apache 2.0.30 and later</compatibility>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>This directive controls whether requests that contain trailing
130d299c4b2b15be45532a176604c71fdc7bea5bnd pathname information that follows an actual filename (or
130d299c4b2b15be45532a176604c71fdc7bea5bnd non-existent file in an existing directory) will be accepted or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd rejected. The trailing pathname information can be made
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>here.html</code>. Then requests for
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>/test/here.html/more</code> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/test/nothere.html/more</code> both collect
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/more</code> as <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AcceptPathInfo</directive> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>Off</code></dt><dd>A request will only be accepted if it
003f0c9fda6664daf5092a0e42f65ede20098153slive maps to a literal path that exists. Therefore a request with
003f0c9fda6664daf5092a0e42f65ede20098153slive trailing pathname information after the true filename such as
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/test/here.html/more</code> in the above example will return
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>On</code></dt><dd>A request will be accepted if a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd leading path component maps to a file that exists. The above
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Default</code></dt><dd>The treatment of requests with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive trailing pathname information is determined by the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
130d299c4b2b15be45532a176604c71fdc7bea5bnd href="mod_cgi.html">cgi-script</a> and <a
130d299c4b2b15be45532a176604c71fdc7bea5bnd href="mod_isapi.html">isapi-isa</a>, generally accept
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>PATH_INFO</code> by default.</dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </dl>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The primary purpose of the <code>AcceptPathInfo</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <a href="mod_include.html">INCLUDES</a>, to generate content
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen based on <code>PATH_INFO</code>. The core handler would usually reject
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request, so you can use the following configuration to enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such a script:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding &lt;Files "mypaths.shtml"&gt;<br />
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Options +Includes<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive SetOutputFilter INCLUDES<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptPathInfo On<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Files&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<directivesynopsis>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<name>AccessFileName</name>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<description>Name of the distributed configuration file</description>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<default>AccessFileName .htaccess</default>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<contextlist><context>server config</context><context>virtual host</context>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</contextlist>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>While processing a request the server looks for
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configuration files are <a href="#allowoverride">enabled for that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory</a>. For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <example>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd AccessFileName .acl
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </example>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>before returning the document
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/usr/local/web/index.html</code>, the server will read
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/.acl</code>, <code>/usr/.acl</code>,
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding for directives, unless they have been disabled with</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
58699879a562774640b95e9eedfd891f336e38c2nd &lt;/Directory&gt;
58699879a562774640b95e9eedfd891f336e38c2nd </example>
58699879a562774640b95e9eedfd891f336e38c2nd</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">AllowOverride</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/configuring.html">Configuration Files</a></seealso>
58699879a562774640b95e9eedfd891f336e38c2nd<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
58699879a562774640b95e9eedfd891f336e38c2nd</directivesynopsis>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd<directivesynopsis>
58699879a562774640b95e9eedfd891f336e38c2nd<name>AddDefaultCharset</name>
58699879a562774640b95e9eedfd891f336e38c2nd<description>Default charset parameter to be added when a response
58699879a562774640b95e9eedfd891f336e38c2ndcontent-type is <code>text/plain</code> or <code>text/html</code></description>
58699879a562774640b95e9eedfd891f336e38c2nd<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
58699879a562774640b95e9eedfd891f336e38c2nd<default>AddDefaultCharset Off</default>
58699879a562774640b95e9eedfd891f336e38c2nd<contextlist><context>server config</context>
58699879a562774640b95e9eedfd891f336e38c2nd<context>virtual host</context><context>directory</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive specifies a default value for the media type
58699879a562774640b95e9eedfd891f336e38c2nd charset parameter (the name of a character encoding) to be added
58699879a562774640b95e9eedfd891f336e38c2nd to a response if and only if the response's content-type is either
58699879a562774640b95e9eedfd891f336e38c2nd <code>text/plain</code> or <code>text/html</code>. This should override
58699879a562774640b95e9eedfd891f336e38c2nd any charset specified in the body of the response via a <code>META</code>
58699879a562774640b95e9eedfd891f336e38c2nd element, though the exact behavior is often dependent on the user's client
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess configuration. A setting of <code>AddDefaultCharset Off</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess disables this functionality. <code>AddDefaultCharset On</code> enables
58699879a562774640b95e9eedfd891f336e38c2nd a default charset of <code>iso-8859-1</code>. Any other value is assumed
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess to be the <var>charset</var> to be used, which should be one of the
58699879a562774640b95e9eedfd891f336e38c2nd <a href="http://www.iana.org/assignments/character-sets">IANA registered
58699879a562774640b95e9eedfd891f336e38c2nd charset values</a> for use in MIME media types.
fb77c505254b6e9c925e23e734463e87574f8f40kess For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
58699879a562774640b95e9eedfd891f336e38c2nd AddDefaultCharset utf-8
58699879a562774640b95e9eedfd891f336e38c2nd </example>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd <p><directive>AddDefaultCharset</directive> should only be used when all
58699879a562774640b95e9eedfd891f336e38c2nd of the text resources to which it applies are known to be in that
58699879a562774640b95e9eedfd891f336e38c2nd character encoding and it is too inconvenient to label their charset
58699879a562774640b95e9eedfd891f336e38c2nd individually. One such example is to add the charset parameter
58699879a562774640b95e9eedfd891f336e38c2nd to resources containing generated content, such as legacy CGI
58699879a562774640b95e9eedfd891f336e38c2nd scripts, that might be vulnerable to cross-site scripting attacks
58699879a562774640b95e9eedfd891f336e38c2nd due to user-provided data being included in the output. Note, however,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess that a better solution is to just fix (or delete) those scripts, since
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd setting a default charset does not protect users that have enabled
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick the "auto-detect character encoding" feature on their browser.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<seealso><directive module="mod_mime">AddCharset</directive></seealso>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<directivesynopsis>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<name>AddOutputFilterByType</name>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<description>assigns an output filter to a particular MIME-type</description>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<var>MIME-type</var> [<var>MIME-type</var>] ...</syntax>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<contextlist><context>server config</context>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd<context>virtual host</context><context>directory</context>
ec9b02c6869b75575ada34c800672162833a2c06nd<context>.htaccess</context></contextlist>
58699879a562774640b95e9eedfd891f336e38c2nd<override>FileInfo</override>
58699879a562774640b95e9eedfd891f336e38c2nd<compatibility>Available in Apache 2.0.33 and later; deprecated in Apache 2.1 and later</compatibility>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd<usage>
58699879a562774640b95e9eedfd891f336e38c2nd <p>This directive activates a particular output <a
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd href="/filter.html">filter</a> for a request depending on the
58699879a562774640b95e9eedfd891f336e38c2nd response <glossary>MIME-type</glossary>. Because of certain
58699879a562774640b95e9eedfd891f336e38c2nd problems discussed below, this directive is deprecated. The same
77ead9e0262e4f08ec336d1a65b2edef7705c839nd functionality is available using <module>mod_filter</module>.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
9583adab6bc4b3758e41963c905d9dad9f067131nd <p>The following example uses the <code>DEFLATE</code> filter, which
77ead9e0262e4f08ec336d1a65b2edef7705c839nd is provided by <module>mod_deflate</module>. It will compress all
77ead9e0262e4f08ec336d1a65b2edef7705c839nd output (either static or dynamic) which is labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> or <code>text/plain</code> before it is sent
77ead9e0262e4f08ec336d1a65b2edef7705c839nd to the client.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AddOutputFilterByType DEFLATE text/html text/plain
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>If you want the content to be processed by more than one filter, their
77ead9e0262e4f08ec336d1a65b2edef7705c839nd names have to be separated by semicolons. It's also possible to use one
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <directive>AddOutputFilterByType</directive> directive for each of
77ead9e0262e4f08ec336d1a65b2edef7705c839nd these filters.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The configuration below causes all script output labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> to be processed at first by the
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd filter.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd &lt;Location /cgi-bin/&gt;<br />
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <indent>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd Options Includes<br />
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </indent>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <note type="warning"><title>Note</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Enabling filters with <directive>AddOutputFilterByType</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess may fail partially or completely in some cases. For example, no
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filters are applied if the <glossary>MIME-type</glossary> could not be determined and falls
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive back to the <directive module="core">DefaultType</directive> setting,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive even if the <directive module="core">DefaultType</directive> is the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive same.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>However, if you want to make sure, that the filters will be
fb77c505254b6e9c925e23e734463e87574f8f40kess applied, assign the content type to a resource explicitly, for
fb77c505254b6e9c925e23e734463e87574f8f40kess example with <directive module="mod_mime">AddType</directive> or
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="core">ForceType</directive>. Setting the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content type within a (non-nph) CGI script is also safe.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <p>The by-type output filters are never applied on proxy requests.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess </note>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd</usage>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<seealso><directive module="core">SetOutputFilter</directive></seealso>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<seealso><a href="/filter.html">filters</a></seealso>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>AllowEncodedSlashes</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Determines whether encoded path separators in URLs are allowed to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivebe passed through</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowEncodedSlashes On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AllowEncodedSlashes Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache 2.0.46 and later</compatibility>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which contain encoded path separators (<code>%2F</code> for <code>/</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and additionally <code>%5C</code> for <code>\</code> on according systems)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz <note><title>Note</title>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive according systems) will be left as such in the otherwise decoded URL
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz string.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">AcceptPathInfo</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AllowOverride</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<code>.htaccess</code> files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowOverride All|None|<var>directive-type</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive[<var>directive-type</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AllowOverride All</default>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive earlier configuration directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Only available in &lt;Directory&gt; sections</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AllowOverride</directive> is valid only in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections specified without regular expressions, not in <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Location</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">DirectoryMatch</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Files</directive> sections.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>None</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="#accessfilename">.htaccess</a> files are completely ignored.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive In this case, the server will not even attempt to read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files in the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When this directive is set to <code>All</code>, then any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive which has the .htaccess <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="directive-dict.html#Context">Context</a> is allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files.</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p>The <var>directive-type</var> can be one of the following
9ed9eaf871c58d281af02e76125ceadb5060afa5nd groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>AuthConfig</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna Allow use of the authorization directives (<directive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna module="mod_authn_dbm">AuthDBMGroupFile</directive>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess <directive module="mod_authz_groupfile">AuthGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthType</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authn_file">AuthUserFile</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive>, <em>etc.</em>).</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt>FileInfo</dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <dd>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd Allow use of the directives controlling document types (<directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">DefaultType</directive>, <directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd module="core">ErrorDocument</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ForceType</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_negotiation">LanguagePriority</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetHandler</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">SetInputFilter</directive>, <directive
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen module="core">SetOutputFilter</directive>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_mime</module> Add* and Remove*
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives, <em>etc.</em>), document meta data (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_headers">Header</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_headers">RequestHeader</directive>, <directive
003f0c9fda6664daf5092a0e42f65ede20098153slive module="mod_setenvif">SetEnvIf</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_setenvif">SetEnvIfNoCase</directive>, <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_setenvif">BrowserMatch</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_usertrack">CookieExpires</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_usertrack">CookieDomain</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_usertrack">CookieStyle</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_usertrack">CookieTracking</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_usertrack">CookieName</directive>),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_rewrite</module> directives <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteEngine</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteOptions</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteBase</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteCond</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_rewrite">RewriteRule</directive>) and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_actions">Action</directive> from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_actions</module>.
9ed9eaf871c58d281af02e76125ceadb5060afa5nd </dd>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt>Indexes</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling directory indexing
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (<directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_autoindex">AddDescription</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="mod_autoindex">AddIcon</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_autoindex">AddIconByEncoding</directive>,
1c9f7cdf2e1bc8313e559a96638c3c36e3143791yoshiki <directive module="mod_autoindex">AddIconByType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_autoindex">DefaultIcon</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_dir">DirectoryIndex</directive>, <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="mod_autoindex">FancyIndexing</directive>, <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
003f0c9fda6664daf5092a0e42f65ede20098153slive <dt>Limit</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
530eba85dbd41b8a0fa5255d3648d1440199a661slive Allow use of the directives controlling host access (<directive
530eba85dbd41b8a0fa5255d3648d1440199a661slive 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
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>).
9ed9eaf871c58d281af02e76125ceadb5060afa5nd An equal sign may be given followed by a comma (but no spaces)
9ed9eaf871c58d281af02e76125ceadb5060afa5nd separated lists of options that may be set using the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Options</directive> command.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes AllowOverride AuthConfig Indexes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p>In the example above all directives that are neither in the group
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes server error.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</usage>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<seealso><directive module="core">AccessFileName</directive></seealso>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<seealso><a href="/configuring.html">Configuration Files</a></seealso>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>AuthName</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Authorization realm for use in HTTP
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesauthentication</description>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<syntax>AuthName <var>auth-domain</var></syntax>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive sets the name of the authorization realm for a
fb77c505254b6e9c925e23e734463e87574f8f40kess directory. This realm is given to the client so that the user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive knows which username and password to send.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AuthName</directive> takes a single argument; if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive realm name contains spaces, it must be enclosed in quotation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive marks. It must be accompanied by <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">AuthType</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> directives, and directives such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <directive module="mod_authn_file">AuthUserFile</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authz_groupfile">AuthGroupFile</directive> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive work.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthName "Top Secret"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The string provided for the <code>AuthName</code> is what will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appear in the password dialog provided by most browsers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/howto/auth.html">Authentication, Authorization, and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Access Control</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AuthType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Type of user authentication</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AuthType Basic|Digest</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>AuthConfig</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive selects the type of user authentication for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. The authentication types available are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Basic</code> (implemented by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_auth_basic</module>) and <code>Digest</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (implemented by <module>mod_auth_digest</module>).</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>To implement authentication, you must also use the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">AuthName</directive> and <directive
76f2a3125fb6aca59d43b02220dabac91175a281slive module="core">Require</directive> directives. In addition, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server must have an authentication-provider module such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_authn_file</module> and an authorization module such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <module>mod_authz_user</module>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/auth.html">Authentication, Authorization,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and Access Control</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>CGIMapExtension</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>NetWare only</compatibility>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>CGIMapExtension sys:\foo.nlm .foo</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause all CGI script files with a <code>.foo</code> extension to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be passed to the FOO interpreter.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ContentDigest</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables the generation of <code>Content-MD5</code> HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheaders</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ContentDigest On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<status>Experimental</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This directive enables the generation of
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>Content-MD5</code> headers as defined in RFC1864
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd respectively RFC2068.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>MD5 is an algorithm for computing a "message digest"
fb77c505254b6e9c925e23e734463e87574f8f40kess (sometimes called "fingerprint") of arbitrary-length data, with
fb77c505254b6e9c925e23e734463e87574f8f40kess a high degree of confidence that any alterations in the data
fb77c505254b6e9c925e23e734463e87574f8f40kess will be reflected in alterations in the message digest.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <code>Content-MD5</code> header provides an end-to-end
003f0c9fda6664daf5092a0e42f65ede20098153slive message integrity check (MIC) of the entity-body. A proxy or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd client may check this header for detecting accidental
130d299c4b2b15be45532a176604c71fdc7bea5bnd modification of the entity-body in transit. Example header:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note that this can cause performance problems on your server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd since the message digest is computed on every request (the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd values are not cached).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><code>Content-MD5</code> is only sent for documents served
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd by the <module>core</module>, and not by any module. For example,
fb77c505254b6e9c925e23e734463e87574f8f40kess SSI documents, output from CGI scripts, and byte range responses
fb77c505254b6e9c925e23e734463e87574f8f40kess do not have this header.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>DefaultType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>MIME content-type that will be sent if the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndserver cannot determine a type in any other way</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>DefaultType <var>MIME-type</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>DefaultType text/plain</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>There will be times when the server is asked to provide a
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess document whose type cannot be determined by its <glossary
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ref="mime-type">MIME types</glossary> mappings.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The server must inform the client of the content-type of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document, so in the event of an unknown type it uses the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>DefaultType</code>. For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd DefaultType image/gif
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>would be appropriate for a directory which contained many GIF
130d299c4b2b15be45532a176604c71fdc7bea5bnd images with filenames missing the <code>.gif</code> extension.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Note that unlike <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">ForceType</directive>, this directive only
130d299c4b2b15be45532a176604c71fdc7bea5bnd provides the default mime-type. All other mime-type definitions,
130d299c4b2b15be45532a176604c71fdc7bea5bnd including filename extensions, that might identify the media type
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd will override this default.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Directory</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enclose a group of directives that apply only to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivenamed file-system directory and sub-directories</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;Directory <var>directory-path</var>&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive... &lt;/Directory&gt;</syntax>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><directive type="section">Directory</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/Directory&gt;</code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory. Any directive that is allowed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in a directory context may be used. <var>Directory-path</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either the full path to a directory, or a wild-card string using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unix shell-style matching. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
130d299c4b2b15be45532a176604c71fdc7bea5bnd characters. You may also use <code>[]</code> character ranges. None
130d299c4b2b15be45532a176604c71fdc7bea5bnd of the wildcards match a `/' character, so <code>&lt;Directory
130d299c4b2b15be45532a176604c71fdc7bea5bnd /*/public_html&gt;</code> will not match
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/home/user/public_html</code>, but <code>&lt;Directory
130d299c4b2b15be45532a176604c71fdc7bea5bnd /home/*/public_html&gt;</code> will match. Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /usr/local/httpd/htdocs&gt;<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Options Indexes FollowSymLinks<br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </indent>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess &lt;/Directory&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </example>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful with the <var>directory-path</var> arguments:
fb77c505254b6e9c925e23e734463e87574f8f40kess They have to literally match the filesystem path which Apache uses
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </note>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p><glossary ref="regex">Regular
130d299c4b2b15be45532a176604c71fdc7bea5bnd expressions</glossary> can also be used, with the addition of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>~</code> character. For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &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>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;Directory /home/&gt;<br />
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride FileInfo<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>for access to the document <code>/home/web/dir/doc.html</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride None</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (disabling <code>.htaccess</code> files).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory <code>/home</code>).</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen <li>Apply any <code>FileInfo</code> directives in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/web/dir/.htaccess</code> in that order.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Regular expressions are not considered until after all of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive normal sections have been applied. Then all of the regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions are tested in the order they appeared in the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess configuration file. For example, with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;Directory ~ abc$&gt;<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ... directives here ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>the regular expression section won't be considered until after
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the corresponding <directive type="section">Directory</directive> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be applied.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p><strong>Note that the default Apache access for
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
fb77c505254b6e9c925e23e734463e87574f8f40kess This means that Apache will serve any file mapped from an URL. It is
fb77c505254b6e9c925e23e734463e87574f8f40kess recommended that you change this with a block such
fb77c505254b6e9c925e23e734463e87574f8f40kess as</strong></p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Directory /&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess &lt;/Directory&gt;
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess </example>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>and then override this for directories you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>want</em> accessible. See the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/misc/security_tips.html">Security Tips</a> page for more
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive details.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The directory sections occur in the <code>httpd.conf</code> file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Directory</directive> directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot nest, and cannot appear in a <directive module="core"
af18698b10b429b270551ca3a5d51a75e1c9db22brianp type="section">Limit</directive> or <directive module="core"
af18698b10b429b270551ca3a5d51a75e1c9db22brianp type="section">LimitExcept</directive> section.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/sections.html">How &lt;Directory&gt;,
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
af18698b10b429b270551ca3a5d51a75e1c9db22brianp explanation of how these different sections are combined when a
af18698b10b429b270551ca3a5d51a75e1c9db22brianp request is received</seealso>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<directivesynopsis type="section">
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<name>DirectoryMatch</name>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<description>Enclose directives that apply to
003f0c9fda6664daf5092a0e42f65ede20098153slivefile-system directories matching a regular expression and their
003f0c9fda6664daf5092a0e42f65ede20098153slivesubdirectories</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess... &lt;/DirectoryMatch&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><directive type="section">DirectoryMatch</directive> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
af18698b10b429b270551ca3a5d51a75e1c9db22brianp of directives which will apply only to the named directory and
af18698b10b429b270551ca3a5d51a75e1c9db22brianp sub-directories of that directory, the same as <directive
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd module="core" type="section">Directory</directive>. However, it
af18698b10b429b270551ca3a5d51a75e1c9db22brianp takes as an argument a <glossary ref="regex">regular
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd expression</glossary>. For example:</p>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp &lt;DirectoryMatch "^/www/(.+/)?[0-9]{3}"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>would match directories in <code>/www/</code> that consisted of three
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd numbers.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive type="section" module="core">Directory</directive> for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnda description of how regular expressions are mixed in with normal
41ef8b3051855b802104193ee0a587515af60a37wrowe<directive type="section">Directory</directive>s</seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><a
41ef8b3051855b802104193ee0a587515af60a37wrowehref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
41ef8b3051855b802104193ee0a587515af60a37wrowe&lt;Files&gt; sections work</a> for an explanation of how these different
41ef8b3051855b802104193ee0a587515af60a37wrowesections are combined when a request is received</seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>DocumentRoot</name>
41ef8b3051855b802104193ee0a587515af60a37wrowe<description>Directory that forms the main document tree visible
41ef8b3051855b802104193ee0a587515af60a37wrowefrom the web</description>
41ef8b3051855b802104193ee0a587515af60a37wrowe<syntax>DocumentRoot <var>directory-path</var></syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>DocumentRoot /usr/local/apache/htdocs</default>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive sets the directory from which <program>httpd</program>
fb77c505254b6e9c925e23e734463e87574f8f40kess will serve files. Unless matched by a directive like <directive
41ef8b3051855b802104193ee0a587515af60a37wrowe module="mod_alias">Alias</directive>, the server appends the
41ef8b3051855b802104193ee0a587515af60a37wrowe path from the requested URL to the document root to make the
41ef8b3051855b802104193ee0a587515af60a37wrowe path to the document. Example:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <example>
41ef8b3051855b802104193ee0a587515af60a37wrowe DocumentRoot /usr/web
41ef8b3051855b802104193ee0a587515af60a37wrowe </example>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>then an access to
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>http://www.my.host.com/index.html</code> refers to
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
41ef8b3051855b802104193ee0a587515af60a37wrowe not absolute then it is assumed to be relative to the <directive
41ef8b3051855b802104193ee0a587515af60a37wrowe module="core">ServerRoot</directive>.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>The <directive>DocumentRoot</directive> should be specified without
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess a trailing slash.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><a href="/urlmapping.html">Mapping URLs to Filesystem
41ef8b3051855b802104193ee0a587515af60a37wroweLocation</a></seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<directivesynopsis>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<name>EnableMMAP</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Use memory-mapping to read files during delivery</description>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley<syntax>EnableMMAP On|Off</syntax>
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley<default>EnableMMAP On</default>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<context>directory</context><context>.htaccess</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<override>FileInfo</override>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>This directive controls whether the <program>httpd</program> may use
05201775eaa6b363b8a119c8aea5db246b967591yoshiki memory-mapping if it needs to read the contents of a file during
41ef8b3051855b802104193ee0a587515af60a37wrowe delivery. By default, when the handling of a request requires
41ef8b3051855b802104193ee0a587515af60a37wrowe access to the data within a file -- for example, when delivering a
fb77c505254b6e9c925e23e734463e87574f8f40kess server-parsed file using <module>mod_include</module> -- Apache
41ef8b3051855b802104193ee0a587515af60a37wrowe memory-maps the file if the OS supports it.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This memory-mapping sometimes yields a performance improvement.
9fb925624300c864fe3969a264e52aa83f3c2dd0slive But in some environments, it is better to disable the memory-mapping
41ef8b3051855b802104193ee0a587515af60a37wrowe to prevent operational problems:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <ul>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>On some multiprocessor systems, memory-mapping can reduce the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess performance of the <program>httpd</program>.</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>With an NFS-mounted <directive module="core">DocumentRoot</directive>,
41ef8b3051855b802104193ee0a587515af60a37wrowe the <program>httpd</program> may crash due to a segmentation fault if a file
41ef8b3051855b802104193ee0a587515af60a37wrowe is deleted or truncated while the <program>httpd</program> has it
af18698b10b429b270551ca3a5d51a75e1c9db22brianp memory-mapped.</li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp </ul>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable memory-mapping of delivered files by specifying:</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd EnableMMAP Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS mounted files, this feature may be disabled explicitly for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory "/path-to-nfs-files"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableMMAP Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>EnableSendfile</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Use the kernel sendfile support to deliver files to the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>EnableSendfile On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>EnableSendfile On</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in version 2.0.44 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive static file -- Apache uses sendfile to deliver the file contents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive without ever reading the file if the OS supports it.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This sendfile mechanism avoids separate read and send operations,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and buffer allocations. But on some platforms or within some
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filesystems, it is better to disable this feature to avoid
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd operational problems:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>Some platforms may have broken sendfile support that the build
f7fe99050600166042c04b8e595fb75499eed7f0geoff system did not detect, especially if the binaries were built on
f7fe99050600166042c04b8e595fb75499eed7f0geoff another box and moved to such a machine with broken sendfile
f7fe99050600166042c04b8e595fb75499eed7f0geoff support.</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>On Linux the use of sendfile triggers TCP-checksum
f7fe99050600166042c04b8e595fb75499eed7f0geoff offloading bugs on certain networking cards when using IPv6.</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>On Linux on Itanium, sendfile may be unable to handle files
f7fe99050600166042c04b8e595fb75499eed7f0geoff over 2GB in size.</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <li>With a network-mounted <directive
f7fe99050600166042c04b8e595fb75499eed7f0geoff module="core">DocumentRoot</directive> (e.g., NFS or SMB),
f7fe99050600166042c04b8e595fb75499eed7f0geoff the kernel may be unable to serve the network file through
f7fe99050600166042c04b8e595fb75499eed7f0geoff its own cache.</li>
f7fe99050600166042c04b8e595fb75499eed7f0geoff </ul>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For NFS or SMB mounted files, this feature may be disabled explicitly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory "/path-to-nfs-files"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<directivesynopsis>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<name>ErrorDocument</name>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<description>What the server will return to the client
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawickin case of an error</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Quoting syntax for text messages is different in Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the event of a problem or error, Apache can be configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to do one of four things,</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ol>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>output a simple hardcoded error message</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
3209c0009829fcf63b6213fb9c43d534f7906006slive <li>output a customized message</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to a local <var>URL-path</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem/error</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to an external <var>URL</var> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem/error</li>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess </ol>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>The first option is the default, while options 2-4 are
fb109b84906e3ee61680aa289953c2f9e859354erbowen configured using the <directive>ErrorDocument</directive>
fb109b84906e3ee61680aa289953c2f9e859354erbowen directive, which is followed by the HTTP response code and a URL
fb109b84906e3ee61680aa289953c2f9e859354erbowen or a message. Apache will sometimes offer additional information
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess regarding the problem/error.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>URLs can begin with a slash (/) for local web-paths (relative
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the <directive module="core">DocumentRoot</directive>), or be a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive full URL which the client can resolve. Alternatively, a message
fb109b84906e3ee61680aa289953c2f9e859354erbowen can be provided to be displayed by the browser. Examples:</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen <example>
fb109b84906e3ee61680aa289953c2f9e859354erbowen ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 401 /subscription_info.html<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 403 "Sorry can't allow you access today"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Additionally, the special value <code>default</code> can be used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to specify Apache's simple hardcoded message. While not required
fb109b84906e3ee61680aa289953c2f9e859354erbowen under normal circumstances, <code>default</code> will restore
fb109b84906e3ee61680aa289953c2f9e859354erbowen Apache's simple hardcoded message for configurations that would
fb109b84906e3ee61680aa289953c2f9e859354erbowen otherwise inherit an existing <directive>ErrorDocument</directive>.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs&gt;<br />
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 404 default<br />
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes </indent>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes &lt;/Directory&gt;
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes </example>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <p>Note that when you specify an <directive>ErrorDocument</directive>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes that points to a remote URL (ie. anything with a method such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http</code> in front of it), Apache will send a redirect to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client to tell it where to find the document, even if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document ends up being on the same server. This has several
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive implications, the most important being that the client will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive the original error status code, but instead will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive receive a redirect status code. This in turn can confuse web
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive robots and other clients which try to determine if a URL is
003f0c9fda6664daf5092a0e42f65ede20098153slive valid using the status code. In addition, if you use a remote
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL in an <code>ErrorDocument 401</code>, the client will not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd know to prompt the user for a password since it will not
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele receive the 401 status code. Therefore, <strong>if you use an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ErrorDocument 401</code> directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Microsoft Internet Explorer (MSIE) will by default ignore
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server-generated error messages when they are "too small" and substitute
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive its own "friendly" error messages. The size threshold varies depending on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the type of error, but in general, if you make your error document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive greater than 512 bytes, then MSIE will show the server-generated
fb77c505254b6e9c925e23e734463e87574f8f40kess error rather than masking it. More information is available in
fb77c505254b6e9c925e23e734463e87574f8f40kess Microsoft Knowledge Base article <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
fb77c505254b6e9c925e23e734463e87574f8f40kess >Q294807</a>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Although most error messages can be overriden, there are certain
fb77c505254b6e9c925e23e734463e87574f8f40kess circumstances where the internal messages are used regardless of the
fb77c505254b6e9c925e23e734463e87574f8f40kess setting of <directive module="core">ErrorDocument</directive>. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive particular, if a malformed request is detected, normal request processing
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd will be immediately halted and the internal error message returned.
530eba85dbd41b8a0fa5255d3648d1440199a661slive This is necessary to guard against security problems caused by
530eba85dbd41b8a0fa5255d3648d1440199a661slive bad requests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Prior to version 2.0, messages were indicated by prefixing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them with a single unmatched double quote character.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><a href="/custom-error.html">documentation of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd customizable responses</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>ErrorLog</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Location where the server will log errors</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>ErrorLog</directive> directive sets the name of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the file to which the server will log any errors it encounters. If
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the <var>file-path</var> is not absolute then it is assumed to be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd relative to the <directive module="core">ServerRoot</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ErrorLog /var/log/httpd/error_log
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If the <var>file-path</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive begins with a pipe (|) then it is assumed to be a command to spawn
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to handle the error log.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ErrorLog "|/usr/local/bin/httpd_errors"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive syslog facility <code>local7</code>, but you can override this by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using the <code>syslog:<var>facility</var></code> syntax where
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>facility</var> can be one of the names usually documented in
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess syslog(1).</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <example><title>Example</title>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess ErrorLog syslog:user
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </example>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>SECURITY: See the <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/misc/security_tips.html#serverroot">security tips</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document for details on why your security could be compromised
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if the directory where log files are stored is writable by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive anyone other than the user that starts the server.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When entering a file path on non-Unix platforms, care should be taken
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to make sure that only forward slashed are used even though the platform
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may allow the use of back slashes. In general it is a good idea to always
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive use forward slashes throughout the configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">LogLevel</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/logs.html">Apache Log Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>FileETag</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>File attributes used to create the ETag
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndHTTP response header</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>FileETag <var>component</var> ...</syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<default>FileETag INode MTime Size</default>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>
fb77c505254b6e9c925e23e734463e87574f8f40kess The <directive>FileETag</directive> directive configures the file
fb77c505254b6e9c925e23e734463e87574f8f40kess attributes that are used to create the <code>ETag</code> (entity
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tag) response header field when the document is based on a file.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (The <code>ETag</code> value is used in cache management to save
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess network bandwidth.) In Apache 1.3.22 and earlier, the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>ETag</code> value was <em>always</em> formed
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess from the file's inode, size, and last-modified time (mtime). The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>FileETag</directive> directive allows you to choose
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which of these -- if any -- should be used. The recognized keywords are:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>INode</strong></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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>
003f0c9fda6664daf5092a0e42f65ede20098153slive <dd>The number of bytes in the file will be included</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><strong>All</strong></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All available fields will be used. This is equivalent to:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>FileETag INode MTime Size</example></dd>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <dt><strong>None</strong></dt>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <dd>If a document is file-based, no <code>ETag</code> field will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive included in the response</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd keywords may be prefixed with either <code>+</code> or <code>-</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow changes to be made to the default setting inherited
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a broader scope. Any keyword appearing without such a prefix
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive immediately and completely cancels the inherited setting.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If a directory's configuration includes
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess subdirectory's includes <code>FileETag&nbsp;-INode</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the setting for that subdirectory (which will be inherited by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any sub-subdirectories that don't override it) will be equivalent to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;MTime&nbsp;Size</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Files</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply to matched
003f0c9fda6664daf5092a0e42f65ede20098153slivefilenames</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Files</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by filename. It is comparable
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the <directive module="core" type="section">Directory</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess and <directive module="core" type="section">Location</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess directives. It should be matched with a <code>&lt;/Files&gt;</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive. The directives given within this section will be applied to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any object with a basename (last component of filename) matching the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specified filename. <directive type="section">Files</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd sections are processed in the order they appear in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file, after the <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Directory</directive> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, but before <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Location</directive> sections. Note
7654193c1faf603feec999850322ad79e6c551bcnd that <directive type="section">Files</directive> can be nested
7654193c1faf603feec999850322ad79e6c551bcnd inside <directive type="section"
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd module="core">Directory</directive> sections to restrict the
7654193c1faf603feec999850322ad79e6c551bcnd portion of the filesystem they apply to.</p>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd <p>The <var>filename</var> argument should include a filename, or
7654193c1faf603feec999850322ad79e6c551bcnd a wild-card string, where <code>?</code> matches any single character,
7654193c1faf603feec999850322ad79e6c551bcnd and <code>*</code> matches any sequences of characters.
7654193c1faf603feec999850322ad79e6c551bcnd <glossary ref="regex">Regular expressions</glossary>
7654193c1faf603feec999850322ad79e6c551bcnd can also be used, with the addition of the
7654193c1faf603feec999850322ad79e6c551bcnd <code>~</code> character. For example:</p>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd <example>
7654193c1faf603feec999850322ad79e6c551bcnd &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
7654193c1faf603feec999850322ad79e6c551bcnd </example>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
7654193c1faf603feec999850322ad79e6c551bcnd <p>would match most common Internet graphics formats. <directive
7654193c1faf603feec999850322ad79e6c551bcnd module="core" type="section">FilesMatch</directive> is preferred,
7654193c1faf603feec999850322ad79e6c551bcnd however.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that unlike <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> and <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Location</directive> sections, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Files</directive> sections can be used inside
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files. This allows users to control access to
fb77c505254b6e9c925e23e734463e87574f8f40kess their own files, at a file-by-file level.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis type="section">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>FilesMatch</name>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<description>Contains directives that apply to regular-expression matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefilenames</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive type="section">FilesMatch</directive> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess limits the scope of the enclosed directives by filename, just as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" type="section">Files</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive does. However, it accepts a <glossary ref="regex">regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expression</glossary>. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd and &lt;Files&gt; sections work</a> for an explanation of how these
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ForceType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be served with the specified
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveMIME content-type</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ForceType <var>MIME-type</var>|None</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved to the core in Apache 2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>, or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section" module="core">Location</directive> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section" module="core">Files</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd section, this directive forces all matching files to be served
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd with the content type identification given by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>MIME-type</var>. For example, if you had a directory full of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd GIF files, but did not want to label them all with <code>.gif</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might want to use:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType image/gif
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that unlike <directive module="core">DefaultType</directive>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd this directive overrides all mime-type associations, including
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filename extensions, that might identify the media type.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override any <directive>ForceType</directive> setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by using the value of <code>None</code>:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # force all files to be image/gif:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /images&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd ForceType image/gif<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # but normal mime-type associations here:<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /images/mixed&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd ForceType None<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </indent>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;/Location&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>HostnameLookups</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Enables DNS lookups on client IP addresses</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>HostnameLookups On|Off|Double</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>HostnameLookups Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables DNS lookups so that host names can be
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
55d36f9b61520c2374ab463e77e8a62daa416398nd The value <code>Double</code> refers to doing double-reverse
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess DNS lookup. That is, after a reverse lookup is performed, a forward
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup is then performed on that result. At least one of the IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addresses in the forward lookup must match the original
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address. (In "tcpwrappers" terminology this is called
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>PARANOID</code>.)</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>Regardless of the setting, when <module>mod_authz_host</module> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used for controlling access by hostname, a double reverse lookup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be performed. This is necessary for security. Note that the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd result of this double-reverse isn't generally available unless you
fb77c505254b6e9c925e23e734463e87574f8f40kess set <code>HostnameLookups Double</code>. For example, if only
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>HostnameLookups On</code> and a request is made to an object
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that is protected by hostname restrictions, regardless of whether
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the double-reverse fails or not, CGIs will still be passed the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd single-reverse result in <code>REMOTE_HOST</code>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The default is <code>Off</code> in order to save the network
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd traffic for those sites that don't truly need the reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookups done. It is also better for the end users because they
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive don't have to suffer the extra latency that a lookup entails.
55d36f9b61520c2374ab463e77e8a62daa416398nd Heavily loaded sites should leave this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Off</code>, since DNS lookups can take considerable
55d36f9b61520c2374ab463e77e8a62daa416398nd amounts of time. The utility <program>logresolve</program>, compiled by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default to the <code>bin</code> subdirectory of your installation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory, can be used to look up host names from logged IP addresses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive offline.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd</usage>
55d36f9b61520c2374ab463e77e8a62daa416398nd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
55d36f9b61520c2374ab463e77e8a62daa416398nd<name>IfDefine</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Encloses directives that will be processed only
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif a test is true at startup</description>
55d36f9b61520c2374ab463e77e8a62daa416398nd<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
55d36f9b61520c2374ab463e77e8a62daa416398nd &lt;/IfDefine&gt;</syntax>
55d36f9b61520c2374ab463e77e8a62daa416398nd<contextlist><context>server config</context><context>virtual host</context>
55d36f9b61520c2374ab463e77e8a62daa416398nd<context>directory</context><context>.htaccess</context>
55d36f9b61520c2374ab463e77e8a62daa416398nd</contextlist>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> section is used to mark directives that are conditional. The
bea526116133aa3d7dabd1924bfc580b37fbf22aslive directives within an <directive type="section">IfDefine</directive>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive section are only processed if the <var>test</var> is true. If <var>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive test</var> is false, everything between the start and end markers is
fb77c505254b6e9c925e23e734463e87574f8f40kess ignored.</p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>!</code><var>parameter-name</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>In the former case, the directives between the start and end
003f0c9fda6664daf5092a0e42f65ede20098153slive markers are only processed if the parameter named
003f0c9fda6664daf5092a0e42f65ede20098153slive <var>parameter-name</var> is defined. The second format reverses
7b5535ed88e0f561b3bfb3330137bd804846afd4slive the test, and only processes the directives if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>parameter-name</var> is <strong>not</strong> defined.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>parameter-name</var> argument is a define as given on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <program>httpd</program> command line via <code>-D<var>parameter-</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code>, at the time the server was started.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive type="section">IfDefine</directive> sections are
7b5535ed88e0f561b3bfb3330137bd804846afd4slive nest-able, which can be used to implement simple
7b5535ed88e0f561b3bfb3330137bd804846afd4slive multiple-parameter tests. Example:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <example>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd httpd -DReverseProxy ...<br />
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # httpd.conf<br />
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess &lt;IfDefine ReverseProxy&gt;<br />
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule rewrite_module modules/mod_rewrite.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/libproxy.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfDefine&gt;
7b5535ed88e0f561b3bfb3330137bd804846afd4slive </example>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<directivesynopsis type="section">
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<name>IfModule</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Encloses directives that are processed conditional on the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndpresence or absence of a specific module</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;IfModule [!]<var>module-file</var>|<var>module-identifier</var>&gt; ...
7b5535ed88e0f561b3bfb3330137bd804846afd4slive &lt;/IfModule&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</contextlist>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Module identifiers are available in version 2.1 and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndlater.</compatibility>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive section is used to mark directives that are conditional on the presence of
7b5535ed88e0f561b3bfb3330137bd804846afd4slive a specific module. The directives within an <directive type="section"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd >IfModule</directive> section are only processed if the <var>test</var>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd is true. If <var>test</var> is false, everything between the start and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive end markers is ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <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>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>!<var>module</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <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 -- either compiled in or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive dynamically loaded using <directive module="mod_so"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >LoadModule</directive>. The second format reverses the test,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and only processes the directives if <var>module</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>not</strong> included.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <var>module</var> argument can be either the module identifier or
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the file name of the module, at the time it was compiled. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>rewrite_module</code> is the identifier and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mod_rewrite.c</code> is the file name. If a module consists of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive several source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>STANDARD20_MODULE_STUFF</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfModule</directive> sections are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nest-able, which can be used to implement simple multiple-module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tests.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive placed in <directive type="section">IfModule</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Include</name>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe server configuration files</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>Include <var>file-path</var>|<var>directory-path</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<context>directory</context>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Wildcard matching available in 2.0.41 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive allows inclusion of other configuration files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from within the server configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive include several files at once, in alphabetical order. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, if <directive>Include</directive> points to a directory,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rather than a file, Apache will read all files in that directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and any subdirectory. But including entire directories is not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended, because it is easy to accidentally leave temporary
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive files in a directory that can cause <program>httpd</program> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive fail.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path, or may be relative
003f0c9fda6664daf5092a0e42f65ede20098153slive to the <directive module="core">ServerRoot</directive> directory.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include /usr/local/apache2/conf/ssl.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include /usr/local/apache2/conf/vhosts/*.conf
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Or, providing paths relative to your <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerRoot</directive> directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include conf/ssl.conf<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Include conf/vhosts/*.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Running <code>apachectl configtest</code> will give you a list
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the files that are being processed during the configuration
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess check:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess root@host# apachectl configtest<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Processing config file: /usr/local/apache2/conf/ssl.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Syntax OK
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><program>apachectl</program></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>KeepAlive</name>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd<description>Enables HTTP persistent connections</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>KeepAlive On|Off</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>KeepAlive On</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
6c5c651b0b97607b8c8b4965c1385c67699f217fnd<usage>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive connection feature of HTTP/1.1 provide long-lived HTTP sessions
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive which allow multiple requests to be sent over the same TCP
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive connection. In some cases this has been shown to result in an
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive almost 50% speedup in latency times for HTML documents with
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive many images. To enable Keep-Alive connections, set
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <code>KeepAlive On</code>.</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive generally not use Keep-Alive connections to HTTP/1.0 clients.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess For HTTP/1.1 clients, persistent connections are the default
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>KeepAliveTimeout</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Amount of time the server will wait for subsequent
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessrequests on a persistent connection</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>KeepAliveTimeout <var>seconds</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>KeepAliveTimeout 5</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The number of seconds Apache will wait for a subsequent
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen request before closing the connection. Once a request has been
130d299c4b2b15be45532a176604c71fdc7bea5bnd received, the timeout value specified by the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <directive module="core">Timeout</directive> directive applies.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Setting <directive>KeepAliveTimeout</directive> to a high value
130d299c4b2b15be45532a176604c71fdc7bea5bnd may cause performance problems in heavily loaded servers. The
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele higher the timeout, the more server processes will be kept
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen occupied waiting on connections with idle clients.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<name>Limit</name>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<description>Restrict enclosed access controls to only certain HTTP
03e0a375c2435102fb2b51e34cccff52acbfddcdndmethods</description>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;/Limit&gt;</syntax>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<contextlist><context>server config</context><context>virtual host</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<context>directory</context><context>.htaccess</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</contextlist>
a51fafd9c1463954daf49f94e76d078c1eb5c9bdnd<override>All</override>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Access controls are normally effective for
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <strong>all</strong> access methods, and this is the usual
03e0a375c2435102fb2b51e34cccff52acbfddcdnd desired behavior. <strong>In the general case, access control
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directives should not be placed within a
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <directive type="section">Limit</directive> section.</strong></p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The purpose of the <directive type="section">Limit</directive>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd directive is to restrict the effect of the access controls to the
03e0a375c2435102fb2b51e34cccff52acbfddcdnd nominated HTTP methods. For all other methods, the access
03e0a375c2435102fb2b51e34cccff52acbfddcdnd restrictions that are enclosed in the <directive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd type="section">Limit</directive> bracket <strong>will have no
03e0a375c2435102fb2b51e34cccff52acbfddcdnd effect</strong>. The following example applies the access control
03e0a375c2435102fb2b51e34cccff52acbfddcdnd only to the methods <code>POST</code>, <code>PUT</code>, and
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>DELETE</code>, leaving all other methods unprotected:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;Limit POST PUT DELETE&gt;<br />
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <indent>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd Require valid-user<br />
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </indent>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd &lt;/Limit&gt;
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The method names listed can be one or more of: <code>GET</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>CONNECT</code>, <code>OPTIONS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case-sensitive.</strong> If <code>GET</code> is used it will also
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrict <code>HEAD</code> requests. The <code>TRACE</code> method
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot be limited.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <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"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">Limit</directive> section when restricting access,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since a <directive type="section"
89ea3e2b9591820407538ac250ec49a0f4f056d2nd module="core">LimitExcept</directive> section provides protection
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive against arbitrary methods.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitExcept</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict access controls to all HTTP methods
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveexcept the named ones</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/LimitExcept&gt;</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">LimitExcept</directive> and
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>&lt;/LimitExcept&gt;</code> are used to enclose
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen a group of access control directives which will then apply to any
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess HTTP access method <strong>not</strong> listed in the arguments;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen i.e., it is the opposite of a <directive type="section"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module="core">Limit</directive> section and can be used to control
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen both standard and nonstandard/unrecognized methods. See the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd documentation for <directive module="core"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen type="section">Limit</directive> for more details.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LimitExcept POST GET&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Require valid-user<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/LimitExcept&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitInternalRecursion</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Determine maximum number of internal redirects and nested
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesubrequests</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitInternalRecursion 10</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache 2.0.47 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An internal redirect happens, for example, when using the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_actions">Action</directive> directive, which internally
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive redirects the original request to a CGI script. A subrequest is Apache'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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LimitInternalRecursion</directive> prevents the server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from crashing when entering an infinite loop of internal redirects or
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen subrequests. Such loops are usually caused by misconfigurations.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The directive stores two different limits, which are evaluated on
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen per-request basis. The first <var>number</var> is the maximum number of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd internal redirects, that may follow each other. The second <var>number</var>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen determines, how deep subrequests may be nested. If you specify only one
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <var>number</var>, it will be assigned to both limits.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitInternalRecursion 5
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestBody</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restricts the total size of the HTTP request body sent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestBody <var>bytes</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestBody</directive> directive allows
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user to set a limit on the allowed size of an HTTP request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message body within the context in which the directive is given
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (server, per-directory, per-file or per-location). If the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request exceeds that limit, the server will return an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the resource and the methods allowed on that resource. CGI scripts
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen typically use the message body for retrieving form information.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Implementations of the <code>PUT</code> method will require
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen a value at least as large as any representation that the server
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen wishes to accept for that resource.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive gives the server administrator greater
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen control over abnormal client request behavior, which may be
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen useful for avoiding some forms of denial-of-service
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen attacks.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If, for example, you are permitting file upload to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>LimitRequestFields</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the number of HTTP request header fields that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewill be accepted from the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestFields <var>number</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestFields 100</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>Number</var> is an integer from 0 (meaning unlimited) to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFields</directive> directive allows
fb77c505254b6e9c925e23e734463e87574f8f40kess the server administrator to modify the limit on the number of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request header fields allowed in an HTTP request. A server needs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive this value to be larger than the number of fields that a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client request might include. The number of request header fields
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen used by a client rarely exceeds 20, but this may vary among
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen different client implementations, often depending upon the extent
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen to which a user has configured their browser to support detailed
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen content negotiation. Optional HTTP extensions are often expressed
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen using request header fields.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive gives the server administrator greater
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen control over abnormal client request behavior, which may be
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen useful for avoiding some forms of denial-of-service attacks.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitRequestFields 50
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</usage>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestFieldSize</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of the HTTP request header allowed from the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenclient</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>LimitRequestFieldsize <var>bytes</var></syntax>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<default>LimitRequestFieldsize 8190</default>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive specifies the number of <var>bytes</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed in an HTTP request header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the allowed size of an HTTP request header field. A server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive needs this value to be large enough to hold any one header field
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from a normal client request. The size of a normal request header
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive field will vary greatly among different client implementations,
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFieldSize 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive</usage>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive</directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<name>LimitRequestLine</name>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<description>Limit the size of the HTTP request line that will be accepted
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slivefrom the client</description>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<syntax>LimitRequestLine <var>bytes</var></syntax>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<default>LimitRequestLine 8190</default>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<contextlist><context>server config</context></contextlist>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<usage>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>This directive sets the number of <var>bytes</var> that will be
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive allowed on the HTTP request-line.</p>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>The <directive>LimitRequestLine</directive> directive allows
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive the server administrator to reduce or increase the limit on the allowed size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of a client's HTTP request-line. Since the request-line consists of the
dc223428958ad9ff05011545bcdda000887b93e5slive HTTP method, URI, and protocol version, the
dc223428958ad9ff05011545bcdda000887b93e5slive <directive>LimitRequestLine</directive> directive places a
dc223428958ad9ff05011545bcdda000887b93e5slive restriction on the length of a request-URI allowed for a request
dc223428958ad9ff05011545bcdda000887b93e5slive on the server. A server needs this value to be large enough to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive hold any of its resource names, including any information that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive might be passed in the query part of a <code>GET</code> request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive gives the server administrator greater
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LimitRequestLine 4094
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>LimitXMLRequestBody</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of an XML-based request body</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitXMLRequestBody 1000000</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Limit (in bytes) on maximum size of an XML-based request
130d299c4b2b15be45532a176604c71fdc7bea5bnd body. A value of <code>0</code> will disable any checking.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd LimitXMLRequestBody 0
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>Location</name>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<description>Applies the enclosed directives only to matching
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndURLs</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;Location
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive type="section">Location</directive> directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd limits the scope of the enclosed directives by URL. It is similar to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section" module="core">Directory</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive, and starts a subsection which is terminated with a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>&lt;/Location&gt;</code> directive. <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">Location</directive> sections are processed in the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd order they appear in the configuration file, after the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section" module="core">Directory</directive> sections and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>.htaccess</code> files are read, and after the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Files</directive> sections.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p><directive type="section">Location</directive> sections operate
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess completely outside the filesystem. This has several consequences.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Most importantly, <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives should not be used to control access to filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive locations. Since several different URLs may map to the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem location, such access controls may by circumvented.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>When to use <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive></title>
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Use <directive type="section">Location</directive> to apply
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives to content that lives outside the filesystem. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content that lives in the filesystem, use <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Directory</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Files</directive>. An exception is
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>&lt;Location /&gt;</code>, which is an easy way to
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess apply a configuration to the entire server.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For all origin (non-proxy) requests, the URL to be matched is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL-path of the form <code>/path/</code>. No scheme, hostname,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd port, or query string may be included. For proxy requests, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL to be matched is of the form
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>scheme://servername/path</code>, and you must include the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd prefix.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess characters.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p><glossary ref="regex">Regular expressions</glossary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location ~ "/(extra|special)/data"&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>. The directive <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">LocationMatch</directive> behaves
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive identical to the regex version of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. For example, to enable status requests, but allow them
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen only from browsers at <code>foo.com</code>, you might use:</p>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive
1597043cec6ad37fa4154bf09b0fccdabed1a239slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from all<br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive Allow from .foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note about / (slash)</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The slash character has special meaning depending on where in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL it appears. People may be used to its behavior in the filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where multiple adjacent slashes are frequently collapsed to a single
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/foo</code>). In URL-space this is not necessarily true.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The <directive type="section" module="core">LocationMatch</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive and the regex version of <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> require you to explicitly specify multiple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slashes if that is your intention.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, <code>&lt;LocationMatch ^/abc&gt;</code> would match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request URL <code>/abc</code> but not the request URL <code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive //abc</code>. The (non-regex) <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> directive behaves similarly when used for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive proxy requests. But when (non-regex) <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> is used for non-proxy requests it will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive implicitly match multiple slashes with a single slash. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive if you specify <code>&lt;Location /abc/def&gt;</code> and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is to <code>/abc//def</code> then it will match.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LocationMatch</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to regular-expression
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematching URLs</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;LocationMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL, in an identical manner
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to <directive module="core" type="section">Location</directive>. However,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive it takes a <glossary ref="regex">regular expression</glossary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as an argument instead of a simple string. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;LocationMatch "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LogLevel</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Controls the verbosity of the ErrorLog</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LogLevel <var>level</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LogLevel warn</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>LogLevel</directive> adjusts the verbosity of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive messages recorded in the error logs (see <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ErrorLog</directive> directive). The following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>level</var>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </columnspec>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <th><strong>Level</strong> </th>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <th><strong>Description</strong> </th>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <th><strong>Example</strong> </th>
8b052d682204371decc64f942aede5ef1da98955erikabele </tr>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <tr>
8b052d682204371decc64f942aede5ef1da98955erikabele <td><code>emerg</code> </td>
8b052d682204371decc64f942aede5ef1da98955erikabele
8b052d682204371decc64f942aede5ef1da98955erikabele <td>Emergencies - system is unusable.</td>
8b052d682204371decc64f942aede5ef1da98955erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Action must be taken immediately.</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"getpwuid: couldn't determine user name from uid"</td>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele </tr>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>crit</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Critical Conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <td>"socket: Failed to get a socket, exiting child"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>error</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>Error conditions.</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>"Premature end of script headers"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>warn</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <td>Warning conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>"child process 1234 did not exit, sending another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SIGHUP"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>notice</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Normal but significant condition.</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ..."</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </tr>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>info</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Informational.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Server seems busy, (you may need to increase
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive StartServers, or Min/MaxSpareServers)..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>debug</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <td>Debug-level messages</td>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <td>"Opening config file ..."</td>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick </tr>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </table>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>When a particular level is specified, messages from all
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>warn</code> will also be posted.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Using a level of at least <code>crit</code> is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd recommended.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess LogLevel notice
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When logging to a regular file messages of the level
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen <code>notice</code> cannot be suppressed and thus are always
fb77c505254b6e9c925e23e734463e87574f8f40kess logged. However, this doesn't apply when logging is done
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen using <code>syslog</code>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>MaxKeepAliveRequests</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Number of requests allowed on a persistent
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshikiconnection</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>MaxKeepAliveRequests <var>number</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>MaxKeepAliveRequests 100</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>MaxKeepAliveRequests</directive> directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd limits the number of requests allowed per connection when
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core" >KeepAlive</directive> is on. If it is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd set to <code>0</code>, unlimited requests will be allowed. We
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive recommend that this setting be kept to a high value for maximum
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive server performance.</p>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>For example:</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive MaxKeepAliveRequests 500
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>NameVirtualHost</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Designates an IP address for name-virtual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehosting</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>NameVirtualHost</directive> directive is a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive required directive if you want to configure <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Although <var>addr</var> can be hostname it is recommended
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that you always use an IP address, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 111.22.33.44
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>With the <directive>NameVirtualHost</directive> directive you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specify the IP address on which the server will receive requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for the name-based virtual hosts. This will usually be the address
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess to which your name-based virtual host names resolve. In cases
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where a firewall or other proxy receives the requests and forwards
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive them on a different IP address to the server, you must specify the
13e5182a0c199ecc7a73db97b6448a544e940868slive IP address of the physical interface on the machine which will be
13e5182a0c199ecc7a73db97b6448a544e940868slive servicing the requests. If you have multiple name-based hosts on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple addresses, repeat the directive for each address.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note, that the "main server" and any <code>_default_</code> servers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will <strong>never</strong> be served for a request to a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>NameVirtualHost</directive> IP address (unless for some
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd reason you specify <directive>NameVirtualHost</directive> but then
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd don't define any <directive>VirtualHost</directive>s for that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd address).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Optionally you can specify a port number on which the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd name-based virtual hosts should be used, e.g.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess NameVirtualHost 111.22.33.44:8080
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>IPv6 addresses must be enclosed in square brackets, as shown
13e5182a0c199ecc7a73db97b6448a544e940868slive in the following example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>To receive requests on all interfaces, you can use an argument of
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>*</code></p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
b00583f8e126bbb00b06dcf06af06c9d07978701kess <example>
13e5182a0c199ecc7a73db97b6448a544e940868slive NameVirtualHost *
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Argument to <directive type="section">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive</title>
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess <p>Note that the argument to the <directive
13e5182a0c199ecc7a73db97b6448a544e940868slive type="section">VirtualHost</directive> directive must
13e5182a0c199ecc7a73db97b6448a544e940868slive exactly match the argument to the <directive
13e5182a0c199ecc7a73db97b6448a544e940868slive >NameVirtualHost</directive> directive.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess NameVirtualHost 1.2.3.4<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost 1.2.3.4&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive </example>
13e5182a0c199ecc7a73db97b6448a544e940868slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Virtual Hosts
13e5182a0c199ecc7a73db97b6448a544e940868slivedocumentation</a></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive<name>Options</name>
13e5182a0c199ecc7a73db97b6448a544e940868slive<description>Configures what features are available in a particular
13e5182a0c199ecc7a73db97b6448a544e940868slivedirectory</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Options
13e5182a0c199ecc7a73db97b6448a544e940868slive [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
13e5182a0c199ecc7a73db97b6448a544e940868slive<default>Options All</default>
13e5182a0c199ecc7a73db97b6448a544e940868slive<contextlist><context>server config</context><context>virtual host</context>
13e5182a0c199ecc7a73db97b6448a544e940868slive<context>directory</context><context>.htaccess</context>
13e5182a0c199ecc7a73db97b6448a544e940868slive</contextlist>
13e5182a0c199ecc7a73db97b6448a544e940868slive<override>Options</override>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<usage>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>The <directive>Options</directive> directive controls which
13e5182a0c199ecc7a73db97b6448a544e940868slive server features are available in a particular directory.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
fb77c505254b6e9c925e23e734463e87574f8f40kess the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dl>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>All</code></dt>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dd>All options except for <code>MultiViews</code>. This is the default
130d299c4b2b15be45532a176604c71fdc7bea5bnd setting.</dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>ExecCGI</code></dt>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Execution of CGI scripts using <module>mod_cgi</module>
130d299c4b2b15be45532a176604c71fdc7bea5bnd is permitted.</dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>FollowSymLinks</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess The server will follow symbolic links in this directory.
fb77c505254b6e9c925e23e734463e87574f8f40kess <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Even though the server follows the symlink it does <em>not</em>
130d299c4b2b15be45532a176604c71fdc7bea5bnd change the pathname used to match against <directive type="section"
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">Directory</directive> sections.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Note also, that this option <strong>gets ignored</strong> if set
130d299c4b2b15be45532a176604c71fdc7bea5bnd inside a <directive type="section" module="core">Location</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd section.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </note></dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dt><code>Includes</code></dt>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <dd>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Server-side includes provided by <module>mod_include</module>
130d299c4b2b15be45532a176604c71fdc7bea5bnd are permitted.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>IncludesNOEXEC</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess Server-side includes are permitted, but the <code>#exec
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess cmd</code> and <code>#exec cgi</code> are disabled. It is still
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess possible to <code>#include virtual</code> CGI scripts from
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive module="mod_alias">ScriptAlias</directive>ed
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directories.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Indexes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and there
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is no <directive module="mod_dir">DirectoryIndex</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (<em>e.g.</em>, <code>index.html</code>) in that directory, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_autoindex</module> will return a formatted listing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the directory.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>MultiViews</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "MultiViews" are allowed using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_negotiation</module>.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>SymLinksIfOwnerMatch</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The server will only follow symbolic links for which the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess target file or directory is owned by the same user id as the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess link.
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <note><title>Note</title> This option gets ignored if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set inside a <directive module="core"
ef8e89e090461194ecadd31e8796a2c51e0531a2kess type="section">Location</directive> section.</note>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess </dd>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>Normally, if multiple <directive>Options</directive> could
ef8e89e090461194ecadd31e8796a2c51e0531a2kess apply to a directory, then the most specific one is used and
ef8e89e090461194ecadd31e8796a2c51e0531a2kess others are ignored; the options are not merged. (See <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/sections.html#mergin">how sections are merged</a>.)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive However if <em>all</em> the options on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Options</directive> directive are preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>+</code> or <code>-</code> symbol, the options are
9ed9eaf871c58d281af02e76125ceadb5060afa5nd merged. Any options preceded by a <code>+</code> are added to the
9ed9eaf871c58d281af02e76125ceadb5060afa5nd options currently in force, and any options preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> are removed from the options currently in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive force. </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Mixing <directive>Options</directive> with a <code>+</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> with those without is not valid syntax, and is likely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to cause unexpected results.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs/spec&gt;<br />
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>then only <code>Includes</code> will be set for the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <code>/web/docs/spec</code> directory. However if the second
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Options</directive> directive uses the <code>+</code> and
530eba85dbd41b8a0fa5255d3648d1440199a661slive <code>-</code> symbols:</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs/spec&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess Options +Includes -Indexes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>then the options <code>FollowSymLinks</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Includes</code> are set for the <code>/web/docs/spec</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using <code>-IncludesNOEXEC</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The default in the absence of any other settings is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>All</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Require</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Selects which authenticated users can access
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabelea resource</description>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<syntax>Require <var>entity-name</var> [<var>entity-name</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive selects which authenticated users can access a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource. The restrictions are processed by authorization
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modules. Some of the allowed syntaxes provided by
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <module>mod_authz_owner</module> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_authz_groupfile</module> are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require user <var>userid</var> [<var>userid</var>]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Only the named users can access the resource. (<module>mod_authz_user</module>)</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require group <var>group-name</var> [<var>group-name</var>]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Only users in the named groups can access the resource.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require valid-user</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All valid users can access the resource.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Other authorization modules that implement require options
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive include <module>mod_authnz_ldap</module>,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <module>mod_authz_dbm</module>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_authz_owner</module>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>Require</directive> must be accompanied by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthName</directive> and <directive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele module="core">AuthType</directive> directives, and directives such
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele as <directive module="mod_authn_file">AuthUserFile</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <directive module="mod_authz_groupfile">AuthGroupFile</directive> (to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive define users and groups) in order to work correctly. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthType Basic<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthName "Restricted Resource"<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthUserFile /web/users<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AuthGroupFile /web/groups<br />
ef8e89e090461194ecadd31e8796a2c51e0531a2kess Require group admin
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Access controls which are applied in this way are effective for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>all</strong> methods. <strong>This is what is normally
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive desired.</strong> If you wish to apply access controls only to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specific methods, while leaving other methods unprotected, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive place the <directive>Require</directive> statement into a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" type="section">Limit</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><a href="/howto/auth.html">Authentication, Authorization,
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick and Access Control</a></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">Satisfy</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><module>mod_authz_host</module></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>RLimitCPU</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the CPU consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveby Apache children</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Unset; uses operating system defaults</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>All</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
003f0c9fda6664daf5092a0e42f65ede20098153slive or <code>max</code> to indicate to the server that the limit should
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd be set to the maximum allowed by the operating system
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd configuration. Raising the maximum resource limit requires that
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd the server is running as <code>root</code>, or in the initial startup
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
9ed9eaf871c58d281af02e76125ceadb5060afa5nd includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
fb77c505254b6e9c925e23e734463e87574f8f40kess logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>CPU resource limits are expressed in seconds per
fb77c505254b6e9c925e23e734463e87574f8f40kess process.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>RLimitMEM</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Limits the memory consumption of processes launched
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenby Apache children</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<default>Unset; uses operating system defaults</default>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>server config</context><context>virtual host</context>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<context>directory</context><context>.htaccess</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>Takes 1 or 2 parameters. The first parameter sets the soft
fb77c505254b6e9c925e23e734463e87574f8f40kess resource limit for all processes and the second parameter sets
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd the maximum resource limit. Either parameter can be a number,
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd or <code>max</code> to indicate to the server that the limit should
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd be set to the maximum allowed by the operating system
521d38e84f603f3c8cdd15807fc3f8eb9e188b34nd configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
9ed9eaf871c58d281af02e76125ceadb5060afa5nd phase.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
fb77c505254b6e9c925e23e734463e87574f8f40kess logs.</p>
003f0c9fda6664daf5092a0e42f65ede20098153slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Memory resource limits are expressed in bytes per
fb77c505254b6e9c925e23e734463e87574f8f40kess process.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</usage>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<seealso><directive module="core">RLimitCPU</directive></seealso>
003f0c9fda6664daf5092a0e42f65ede20098153slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive</directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>RLimitNPROC</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the number of processes that can be launched by
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveprocesses launched by Apache children</description>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<default>Unset; uses operating system defaults</default>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<contextlist><context>server config</context><context>virtual host</context>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<context>directory</context><context>.htaccess</context></contextlist>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<override>All</override>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<usage>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>Takes 1 or 2 parameters. The first parameter sets the soft
4cafc94e99922f00654e1779d30c2cccf5278c4fkess resource limit for all processes and the second parameter sets
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki the maximum resource limit. Either parameter can be a number,
4cafc94e99922f00654e1779d30c2cccf5278c4fkess or <code>max</code> to indicate to the server that the limit
4cafc94e99922f00654e1779d30c2cccf5278c4fkess should be set to the maximum allowed by the operating system
4cafc94e99922f00654e1779d30c2cccf5278c4fkess configuration. Raising the maximum resource limit requires that
4cafc94e99922f00654e1779d30c2cccf5278c4fkess the server is running as <code>root</code>, or in the initial startup
fb77c505254b6e9c925e23e734463e87574f8f40kess phase.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>This applies to processes forked off from Apache children
4cafc94e99922f00654e1779d30c2cccf5278c4fkess servicing requests, not the Apache children themselves. This
4cafc94e99922f00654e1779d30c2cccf5278c4fkess includes CGI scripts and SSI exec commands, but not any
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive processes forked off from the Apache parent such as piped
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive logs.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess <p>Process limits control the number of processes per user.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki <note><title>Note</title>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>If CGI processes are <strong>not</strong> running
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive under user ids other than the web server user id, this directive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive will limit the number of processes that the server itself can
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive create. Evidence of this situation will be indicated by
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <strong><code>cannot fork</code></strong> messages in the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <code>error_log</code>.</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </note>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</usage>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<seealso><directive module="core">RLimitCPU</directive></seealso>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</directivesynopsis>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>Satisfy</name>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<description>Interaction between host-level access control and
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3sliveuser authentication</description>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<syntax>Satisfy Any|All</syntax>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<default>Satisfy All</default>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<contextlist><context>directory</context><context>.htaccess</context>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Influenced by <directive module="core" type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive>Limit</directive> and <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivetype="section">LimitExcept</directive> in version 2.0.51 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater</compatibility>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>Access policy if both <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_host">Allow</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> used. The parameter can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either <code>All</code> or <code>Any</code>. This directive is only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful if access to a particular area is being restricted by both
2e5e2673cb64d3e4d445d911c6f61ac171020725nd username/password <em>and</em> client host address. In this case
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default behavior (<code>All</code>) is to require that the client
733738e83a9b0113476e3f67992c2278d61ee4dakess passes the address access restriction <em>and</em> enters a valid
733738e83a9b0113476e3f67992c2278d61ee4dakess username and password. With the <code>Any</code> option the client will be
2e5e2673cb64d3e4d445d911c6f61ac171020725nd granted access if they either pass the host restriction or enter a
2e5e2673cb64d3e4d445d911c6f61ac171020725nd valid username and password. This can be used to password restrict
2e5e2673cb64d3e4d445d911c6f61ac171020725nd an area, but to let clients from particular addresses in without
2e5e2673cb64d3e4d445d911c6f61ac171020725nd prompting for a password.</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd <p>For example, if you wanted to let people on your network have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unrestricted access to a portion of your website, but require that
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd people outside of your network provide a password, you could use a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configuration similar to the following:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require valid-user<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from 192.168.1<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Satisfy Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Since version 2.0.51 <directive>Satisfy</directive> directives can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be restricted to particular methods by <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> and <directive module="core" type="section"
003f0c9fda6664daf5092a0e42f65ede20098153slive >LimitExcept</directive> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <seealso><directive module="mod_authz_host">Allow</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <seealso><directive module="core">Require</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ScriptInterpreterSource</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ScriptInterpreterSource Script</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Win32 only;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndoption <code>Registry-Strict</code> is available in Apache 2.0 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. The default setting is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Script</code>. This causes Apache to use the interpreter pointed to
003f0c9fda6664daf5092a0e42f65ede20098153slive by the shebang line (first line, starting with <code>#!</code>) in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive script. On Win32 systems this line usually looks like:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive #!C:/Perl/bin/perl.exe
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive #!perl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>Setting <code>ScriptInterpreterSource Registry</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick searched using the script file extension (e.g., <code>.pl</code>) as a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive search key. The command defined by the registry subkey
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>Shell\Open\Command</code> is used to open the script file. If the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd registry keys cannot be found, Apache falls back to the behavior of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>Script</code> option.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Security</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Be careful when using <code>ScriptInterpreterSource
fb77c505254b6e9c925e23e734463e87574f8f40kess Registry</code> with <directive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick module="mod_alias">ScriptAlias</directive>'ed directories, because
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick Apache will try to execute <strong>every</strong> file within this
fb77c505254b6e9c925e23e734463e87574f8f40kess directory. The <code>Registry</code> setting may cause undesired
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server. This is a good way to crash your system within a minute or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive so.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The option <code>Registry-Strict</code> which is new in Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 2.0 does the same thing as <code>Registry</code> but uses only the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subkey <code>Shell\ExecCGI\Command</code>. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>ExecCGI</code> key is not a common one. It must be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured manually in the windows registry and hence prevents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accidental program calls on your system.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<name>ServerAdmin</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Email address that the server includes in error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemessages sent to the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAdmin</directive> sets the contact address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the server includes in any error messages it returns to the
fb77c505254b6e9c925e23e734463e87574f8f40kess client. If the <code>httpd</code> doesn't recognize the supplied argument
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive actually use an email address, since there are a lot of CGI scripts that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive make that assumption. If you want to use an URL, it should point to another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server under your control. Otherwise users may not be able to contact you in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case of errors.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this, e.g.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin www-admin@foo.example.com
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>as users do not always mention that they are talking about the
003f0c9fda6664daf5092a0e42f65ede20098153slive server!</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerAlias</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Alternate names for a host used when matching requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto name-virtual hosts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</syntax>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen<contextlist><context>virtual host</context></contextlist>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen
fcc04773f0f2cc73650485facef9cd77f2d5bd65nd<usage>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen <p>The <directive>ServerAlias</directive> directive sets the
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen alternate names for a host, for use with <a
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <example>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen &lt;VirtualHost *&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName server.domain.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAlias server server2.domain.com server2<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Hostname and port that the server uses to identify
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveitself</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerName <var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive<compatibility>In version 2.0, this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive supersedes the functionality of the <directive>Port</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive from version 1.3.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>ServerName</directive> directive sets the hostname and
fb77c505254b6e9c925e23e734463e87574f8f40kess port that the server uses to identify itself. This is used when
fb77c505254b6e9c925e23e734463e87574f8f40kess creating redirection URLs. For example, if the name of the
fb77c505254b6e9c925e23e734463e87574f8f40kess machine hosting the web server is <code>simple.example.com</code>,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess but the machine also has the DNS alias <code>www.example.com</code>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess and you wish the web server to be so identified, the following
ef8e89e090461194ecadd31e8796a2c51e0531a2kess directive should be used:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
530eba85dbd41b8a0fa5255d3648d1440199a661slive ServerName www.example.com:80
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>If no <directive>ServerName</directive> is specified, then the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ServerName</directive>, then the server will use the port
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz from the incoming
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz request. For optimal reliability and predictability, you should
7b5535ed88e0f561b3bfb3330137bd804846afd4slive specify an explicit hostname and port using the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <directive>ServerName</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
f35c904c3b359610a46e94fbb4ba8495b2338521slive <p>If you are using <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive>ServerName</directive> inside a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section specifies what hostname must appear in the request's
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <code>Host:</code> header to match this virtual host.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>See the description of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">UseCanonicalName</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">UseCanonicalPhysicalPort</directive>directives for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive settings which determine whether self-referential URL's (e.g., by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_dir</module> module) will refer to the
530eba85dbd41b8a0fa5255d3648d1440199a661slive specified port, or to the port number given in the client's request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache virtual host
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation</a></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">NameVirtualHost</directive></seealso>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<seealso><directive module="core">ServerAlias</directive></seealso>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh</directivesynopsis>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<directivesynopsis>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<name>ServerPath</name>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<description>Legacy URL pathname for a name-based virtual host that
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianhis accessed by an incompatible browser</description>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<syntax>ServerPath <var>URL-path</var></syntax>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<contextlist><context>virtual host</context></contextlist>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerPath</directive> directive sets the legacy
530eba85dbd41b8a0fa5255d3648d1440199a661slive URL pathname for a host, for use with <a
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
530eba85dbd41b8a0fa5255d3648d1440199a661slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerRoot</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Base directory for the server installation</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerRoot <var>directory-path</var></syntax>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<default>ServerRoot /usr/local/apache</default>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh<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
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz subdirectories <code>conf/</code> and <code>logs/</code>. Relative
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz paths in other configuration directives (such as <directive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive module="core">Include</directive> or <directive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive module="mod_so">LoadModule</directive>, for example) are taken as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relative to this directory.</p>
f35c904c3b359610a46e94fbb4ba8495b2338521slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerRoot /home/httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/invoking.html">the <code>-d</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerSignature</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures the footer on server-generated documents</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>ServerSignature On|Off|EMail</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>ServerSignature Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>ServerSignature</directive> directive allows the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configuration of a trailing footer line under server-generated
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd documents (error messages, <module>mod_proxy</module> ftp directory
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd listings, <module>mod_info</module> output, ...). The reason why you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive would want to enable such a footer line is that in a chain of proxies,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user often has no possibility to tell which of the chained servers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive actually produced a returned error message.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code>Off</code>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen setting, which is the default, suppresses the footer line (and is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd therefore compatible with the behavior of Apache-1.2 and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd below). The <code>On</code> setting simply adds a line with the
130d299c4b2b15be45532a176604c71fdc7bea5bnd server version number and <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">ServerName</directive> of the serving virtual host,
130d299c4b2b15be45532a176604c71fdc7bea5bnd and the <code>EMail</code> setting additionally creates a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd "mailto:" reference to the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">ServerAdmin</directive> of the referenced
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd document.</p>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>After version 2.0.44, the details of the server version number
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive presented are controlled by the <directive
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen module="core">ServerTokens</directive> directive.</p>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen</usage>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen<seealso><directive module="core">ServerTokens</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerTokens</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures the <code>Server</code> HTTP response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheader</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>ServerTokens Full</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Major</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Minor</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache/2.0</code></dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Min[imal]</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
003f0c9fda6664daf5092a0e42f65ede20098153slive Apache/2.0.41</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens OS</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix)</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (Unix) PHP/4.2.2 MyMod/1.2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This setting applies to the entire server, and cannot be
130d299c4b2b15be45532a176604c71fdc7bea5bnd enabled or disabled on a virtualhost-by-virtualhost basis.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>After version 2.0.44, this directive also controls the
130d299c4b2b15be45532a176604c71fdc7bea5bnd information presented by the <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">ServerSignature</directive> directive.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">ServerSignature</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetHandler</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetHandler <var>handler-name</var>|None</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved into the core in Apache 2.0</compatibility>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be parsed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive through the <a href="/handler.html">handler</a> given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>handler-name</var>. For example, if you had a directory you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wanted to be parsed entirely as imagemap rule files, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> file in that directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler imap-file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>http://servername/status</code> was called, you might put
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following into <code>httpd.conf</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <directive>SetHandler</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive by using the value <code>None</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note:</strong> because SetHandler overrides default handlers,
fb77c505254b6e9c925e23e734463e87574f8f40kess normal behaviour such as handling of URLs ending in a slash (/) as
fb77c505254b6e9c925e23e734463e87574f8f40kess directories or index files is suppressed.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>SetInputFilter</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Sets the filters that will process client requests and POST
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndinput</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen <p>The <directive>SetInputFilter</directive> directive sets the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess filter or filters which will process client requests and POST
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen input when they are received by the server. This is in addition to
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen any filters defined elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_mime">AddInputFilter</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<directivesynopsis>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<name>SetOutputFilter</name>
3c6c63407f1855ddfc45ac69b69a2a9bf15135e6rbowen<description>Sets the filters that will process responses from the
fb77c505254b6e9c925e23e734463e87574f8f40kessserver</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>SetOutputFilter</directive> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess sent to the client. This is in addition to any filters defined
130d299c4b2b15be45532a176604c71fdc7bea5bnd elsewhere, including the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <directive module="mod_mime">AddOutputFilter</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd directive.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, the following configuration will process all files
130d299c4b2b15be45532a176604c71fdc7bea5bnd 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<directivesynopsis>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<name>TimeOut</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Amount of time the server will wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecertain events before failing a request</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>TimeOut <var>seconds</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>TimeOut 300</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>TimeOut</directive> directive currently defines
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the amount of time Apache will wait for three things:</p>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <ol>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>The total amount of time it takes to receive a GET
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive request.</li>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <li>The amount of time between receipt of TCP packets on a
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive POST or PUT request.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <li>The amount of time between ACKs on transmissions of TCP
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd packets in responses.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ol>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>We plan on making these separately configurable at some point
130d299c4b2b15be45532a176604c71fdc7bea5bnd down the road. The timer used to default to 1200 before 1.2,
130d299c4b2b15be45532a176604c71fdc7bea5bnd but has been lowered to 300 which is still far more than
130d299c4b2b15be45532a176604c71fdc7bea5bnd necessary in most situations. It is not set any lower by
130d299c4b2b15be45532a176604c71fdc7bea5bnd default because there may still be odd places in the code where
130d299c4b2b15be45532a176604c71fdc7bea5bnd the timer is not reset when a packet is sent. </p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>TraceEnable</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Determines the behaviour on <code>TRACE</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndrequests</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>TraceEnable <var>[on|off|extended]</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>TraceEnable on</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<compatibility>Available in Apache 1.3.34, 2.0.55 and later</compatibility>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This directive overrides the behavior of <code>TRACE</code> for both
130d299c4b2b15be45532a176604c71fdc7bea5bnd the core server and <module>mod_proxy</module>. The default
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>TraceEnable on</code> permits <code>TRACE</code> requests per
130d299c4b2b15be45532a176604c71fdc7bea5bnd RFC 2616, which disallows any request body to accompany the request.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>TraceEnable off</code> causes the core server and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <module>mod_proxy</module> to return a <code>405</code> (Method not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allowed) error to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Finally, for testing and diagnostic purposes only, request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive bodies may be allowed using the non-compliant <code>TraceEnable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extended</code> directive. The core (as an origin server) will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrict the request body to 64k (plus 8k for chunk headers if
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>Transfer-Encoding: chunked</code> is used). The core will
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive 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>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>UseCanonicalName</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Configures how the server determines its own name and
130d299c4b2b15be45532a176604c71fdc7bea5bndport</description>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<syntax>UseCanonicalName On|Off|DNS</syntax>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive<default>UseCanonicalName Off</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive <p>In many situations Apache must construct a <em>self-referential</em>
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive URL -- that is, a URL that refers back to the same server. With
506ccad87840d0f348a9b9560b711f0a8398ce6aslive <code>UseCanonicalName On</code> Apache will use the hostname and port
fb77c505254b6e9c925e23e734463e87574f8f40kess specified in the <directive module="core">ServerName</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess directive to construct the canonical name for the server. This name
a23acbbd61b9565caecea9931b6bcdf0b6228cbbslive is used in all self-referential URLs, and for the values of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>With <code>UseCanonicalName Off</code> Apache will form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs using the hostname and port supplied by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name based virtual hosts</a>,
130d299c4b2b15be45532a176604c71fdc7bea5bnd and are available with the same clients. The CGI variables
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
130d299c4b2b15be45532a176604c71fdc7bea5bnd constructed from the client supplied values as well.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
130d299c4b2b15be45532a176604c71fdc7bea5bnd where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type a shortname, and a URL which is a directory, such as
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <code>http://www/splat</code>, <em>without the trailing
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki slash</em> then Apache 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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess authenticate twice (once for <code>www</code> and once again
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess for <code>www.domain.com</code> -- see <a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>UseCanonicalName</directive> is set <code>Off</code>, then
7db9f691a00ead175b03335457ca296a33ddf31bnd Apache will redirect to <code>http://www/splat/</code>.</p>
<p>There is a third option, <code>UseCanonicalName DNS</code>,
which is intended for use with mass IP-based virtual hosting to
support ancient clients that do not provide a
<code>Host:</code> header. With this option Apache does a
reverse DNS lookup on the server IP address that the client
connected to in order to work out self-referential URLs.</p>
<note type="warning"><title>Warning</title>
<p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
they may be broken by this option. The client is essentially free
to give whatever value they want as a hostname. But if the CGI is
only using <code>SERVER_NAME</code> to construct self-referential URLs
then it should be just fine.</p>
</note>
</usage>
<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
<seealso><directive module="core">ServerName</directive></seealso>
<seealso><directive module="mpm_common">Listen</directive></seealso>
</directivesynopsis>
<directivesynopsis>
<name>UseCanonicalPhysicalPort</name>
<description>Configures how the server determines its own name and
port</description>
<syntax>UseCanonicalPhysicalPort On|Off</syntax>
<default>UseCanonicalPhysicalPort Off</default>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context></contextlist>
<usage>
<p>In many situations Apache must construct a <em>self-referential</em>
URL -- that is, a URL that refers back to the same server. With
<code>UseCanonicalPhysicalPort On</code> Apache will, when
constructing the canonical port for the server to honor
the <directive module="core">UseCanonicalName</directive> directive,
provide the actual physical port number being used by this request
as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
Apache will not ever use the actual physical port number, instead
relying on all configured information to construct a valid port number.</p>
<note><title>Note</title>
<p>The ordering of when the physical port is used is as follows:<br /><br />
<code>UseCanonicalName On</code></p>
<ul>
<li>Port provided in <code>Servername</code></li>
<li>Physical port</li>
<li>Default port</li>
</ul>
<code>UseCanonicalName Off | DNS</code>
<ul>
<li>Parsed port from <code>Host:</code> header</li>
<li>Physical port</li>
<li>Port provided in <code>Servername</code></li>
<li>Default port</li>
</ul>
<p>With <code>UseCanonicalPhysicalPort Off</code>, the
physical ports are removed from the ordering.</p>
</note>
</usage>
<seealso><directive module="core">UseCanonicalName</directive></seealso>
<seealso><directive module="core">ServerName</directive></seealso>
<seealso><directive module="mpm_common">Listen</directive></seealso>
</directivesynopsis>
<directivesynopsis type="section">
<name>VirtualHost</name>
<description>Contains directives that apply only to a specific
hostname or IP address</description>
<syntax>&lt;VirtualHost
<var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
...&gt; ... &lt;/VirtualHost&gt;</syntax>
<contextlist><context>server config</context></contextlist>
<usage>
<p><directive type="section">VirtualHost</directive> and
<code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
directives that will apply only to a particular virtual host. Any
directive that is allowed in a virtual host context may be
used. When the server receives a request for a document on a
particular virtual host, it uses the configuration directives
enclosed in the <directive type="section">VirtualHost</directive>
section. <var>Addr</var> can be:</p>
<ul>
<li>The IP address of the virtual host;</li>
<li>A fully qualified domain name for the IP address of the
virtual host;</li>
<li>The character <code>*</code>, which is used only in combination with
<code>NameVirtualHost *</code> to match all IP addresses; or</li>
<li>The string <code>_default_</code>, which is used only
with IP virtual hosting to catch unmatched IP addresses.</li>
</ul>
<example><title>Example</title>
&lt;VirtualHost 10.1.2.3&gt;<br />
<indent>
ServerAdmin webmaster@host.foo.com<br />
DocumentRoot /www/docs/host.foo.com<br />
ServerName host.foo.com<br />
ErrorLog logs/host.foo.com-error_log<br />
TransferLog logs/host.foo.com-access_log<br />
</indent>
&lt;/VirtualHost&gt;
</example>
<p>IPv6 addresses must be specified in square brackets because
the optional port number could not be determined otherwise. An
IPv6 example is shown below:</p>
<example>
&lt;VirtualHost [2001:db8::a00:20ff:fea7:ccea]&gt;<br />
<indent>
ServerAdmin webmaster@host.example.com<br />
DocumentRoot /www/docs/host.example.com<br />
ServerName host.example.com<br />
ErrorLog logs/host.example.com-error_log<br />
TransferLog logs/host.example.com-access_log<br />
</indent>
&lt;/VirtualHost&gt;
</example>
<p>Each Virtual Host must correspond to a different IP address,
different port number or a different host name for the server,
in the former case the server machine must be configured to
accept IP packets for multiple addresses. (If the machine does
not have multiple network interfaces, then this can be
accomplished with the <code>ifconfig alias</code> command -- if
your OS supports it).</p>
<note><title>Note</title>
<p>The use of <directive type="section">VirtualHost</directive> does
<strong>not</strong> affect what addresses Apache listens on. You
may need to ensure that Apache is listening on the correct addresses
using <directive module="mpm_common">Listen</directive>.</p>
</note>
<p>When using IP-based virtual hosting, the special name
<code>_default_</code> can be specified in
which case this virtual host will match any IP address that is
not explicitly listed in another virtual host. In the absence
of any <code>_default_</code> virtual host the "main" server config,
consisting of all those definitions outside any VirtualHost
section, is used when no IP-match occurs. (But note that any IP
address that matches a <directive
module="core">NameVirtualHost</directive> directive will use neither
the "main" server config nor the <code>_default_</code> virtual host.
See the <a href="/vhosts/name-based.html">name-based virtual hosting</a>
documentation for further details.)</p>
<p>You can specify a <code>:port</code> to change the port that is
matched. If unspecified then it defaults to the same port as the
most recent <directive module="mpm_common">Listen</directive>
statement of the main server. You may also specify <code>:*</code>
to match all ports on that address. (This is recommended when used
with <code>_default_</code>.)</p>
<note type="warning"><title>Security</title>
<p>See the <a href="/misc/security_tips.html">security tips</a>
document for details on why your security could be compromised if the
directory where log files are stored is writable by anyone other
than the user that starts the server.</p>
</note>
</usage>
<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
Apache</a></seealso>
<seealso><a href="/bind.html">Setting
which addresses and ports Apache uses</a></seealso>
<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
and &lt;Files&gt; sections work</a> for an explanation of how these
different sections are combined when a request is received</seealso>
</directivesynopsis>
</modulesynopsis>