core.xml revision c97e8972ab1f4dd167e3dc4db87daf91114009fb
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<modulesynopsis>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<name>core</name>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<description>Core Apache HTTP Server features that are always
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldingavailable</description>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<status>Core</status>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<directivesynopsis>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<name>AcceptPathInfo</name>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<description>Resources accept trailing pathname information</description>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<syntax>AcceptPathInfo On|Off|Default</syntax>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<default>AcceptPathInfo Default</default>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<contextlist><context>server config</context>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<context>virtual host</context><context>directory</context>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<context>.htaccess</context></contextlist>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<override>FileInfo</override>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<compatibility>Available in Apache 2.0.30 and later</compatibility>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<usage>
7db9f691a00ead175b03335457ca296a33ddf31bnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
530eba85dbd41b8a0fa5255d3648d1440199a661slive available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>For example, assume the location <code>/test/</code> points to
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna a directory that contains only the single file
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>here.html</code>. Then requests for
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html/more</code> and
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/nothere.html/more</code> both collect
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/more</code> as <code>PATH_INFO</code>.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The three possible arguments for the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <directive>AcceptPathInfo</directive> directive are:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dl>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>Off</code></dt><dd>A request will only be accepted if it
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna maps to a literal path that exists. Therefore a request with
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna trailing pathname information after the true filename such as
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html/more</code> in the above example will return
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna a 404 NOT FOUND error.</dd>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>On</code></dt><dd>A request will be accepted if a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna leading path component maps to a file that exists. The above
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna example <code>/test/here.html/more</code> will be accepted if
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>/test/here.html</code> maps to a valid file.</dd>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <dt><code>Default</code></dt><dd>The treatment of requests with
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna trailing pathname information is determined by the <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="/handler.html">handler</a> responsible for the request.
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna The core handler for normal files defaults to rejecting
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="mod_cgi.html">cgi-script</a> and <a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna href="mod_isapi.html">isapi-isa</a>, generally accept
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>PATH_INFO</code> by default.</dd>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </dl>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The primary purpose of the <code>AcceptPathInfo</code>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna directive is to allow you to override the handler's choice of
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna accepting or rejecting <code>PATH_INFO</code>. This override is required,
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna for example, when you use a <a href="/filter.html">filter</a>, such
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna as <a href="mod_include.html">INCLUDES</a>, to generate content
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna based on <code>PATH_INFO</code>. The core handler would usually reject
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna the request, so you can use the following configuration to enable
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna such a script:</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;Files "mypaths.shtml"&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <indent>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna Options +Includes<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna SetOutputFilter INCLUDES<br />
3139522a1418fa699dfd78dcf8dde54253f2c55cnoirin AcceptPathInfo On<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </indent>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/Files&gt;
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AccessFileName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Name of the distributed configuration file</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AccessFileName .htaccess</default>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>While processing a request the server looks for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration files are <a href="#allowoverride">enabled for that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory</a>. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AccessFileName .acl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>before returning the document
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/usr/local/web/index.html</code>, the server will read
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/.acl</code>, <code>/usr/.acl</code>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for directives, unless they have been disabled with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">AllowOverride</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/configuring.html">Configuration Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AddDefaultCharset</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default character set to be added for a
fb77c505254b6e9c925e23e734463e87574f8f40kessresponse without an explicit character set</description>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>AddDefaultCharset Off</default>
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen<contextlist><context>server config</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive specifies the name of the character set that
fb77c505254b6e9c925e23e734463e87574f8f40kess will be added to any response that does not have any parameter on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the content type in the HTTP headers. This will override any
fb77c505254b6e9c925e23e734463e87574f8f40kess character set specified in the body of the document via a
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>META</code> tag. A setting of <code>AddDefaultCharset
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Off</code> disables this
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd functionality. <code>AddDefaultCharset On</code> enables
130d299c4b2b15be45532a176604c71fdc7bea5bnd Apache's internal default charset of <code>iso-8859-1</code> as
130d299c4b2b15be45532a176604c71fdc7bea5bnd required by the directive. You can also specify an alternate
130d299c4b2b15be45532a176604c71fdc7bea5bnd <var>charset</var> to be used. For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess AddDefaultCharset utf-8
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AddOutputFilterByType</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>assigns an output filter to a particular MIME-type</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<var>MIME-type</var> [<var>MIME-type</var>] ...</syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>server config</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache 2.0.33 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive activates a particular output <a
003f0c9fda6664daf5092a0e42f65ede20098153slive href="/filter.html">filter</a> for a request depending on the
003f0c9fda6664daf5092a0e42f65ede20098153slive response MIME-type.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The following example uses the <code>DEFLATE</code> filter, which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is provided by <module>mod_deflate</module>. It will compress all
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd output (either static or dynamic) which is labeled as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>text/html</code> or <code>text/plain</code> before it is sent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType DEFLATE text/html text/plain
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you want the content to be processed by more than one filter, their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names have to be separated by semicolons. It's also possible to use one
130d299c4b2b15be45532a176604c71fdc7bea5bnd <directive>AddOutputFilterByType</directive> directive for each of
130d299c4b2b15be45532a176604c71fdc7bea5bnd these filters.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The configuration below causes all script output labeled as
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>text/html</code> to be processed at first by the
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /cgi-bin/&gt;<br />
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddOutputFilterByType INCLUDES;DEFLATE text/html<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </example>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note type="warning"><title>Note</title>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Enabling filters with <directive>AddOutputFilterByType</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may fail partially or completely in some cases. For expample, no
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filters are applied if the MIME-type could not be determined and falls
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive back to the <directive module="core">DefaultType</directive> setting,
003f0c9fda6664daf5092a0e42f65ede20098153slive even if the <directive module="core">DefaultType</directive> is the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive same.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>However, if you want to make sure, that the filters will be
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding applied, assign the content type to a resource explicitely, for
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding example with <directive module="mod_mime">AddType</directive> or
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <directive module="core">ForceType</directive>. Setting the
a8ce9095d102e43fecb81093a132b90b9a227f78kess content type within a (non-nph) CGI script is also safe.</p>
684f2a9a422185adda0692a1203c5ad6687fc5c5nd
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>The by-type output filters are never applied on proxy requests.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding </note>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><directive module="core">SetOutputFilter</directive></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><a href="/filter.html">filters</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>AllowOverride</name>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<description>Types of directives that are allowed in
684f2a9a422185adda0692a1203c5ad6687fc5c5nd<code>.htaccess</code> files</description>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<syntax>AllowOverride All|None|<var>directive-type</var>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding[<var>directive-type</var>] ...</syntax>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<default>AllowOverride All</default>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<contextlist><context>directory</context></contextlist>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<usage>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding <p>When the server finds an <code>.htaccess</code> file (as
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding specified by <directive module="core">AccessFileName</directive>)
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding it needs to know which directives declared in that file can override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive earlier configuration directives.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Only available in &lt;Directory&gt; sections</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AllowOverride</directive> is valid only in
58699879a562774640b95e9eedfd891f336e38c2nd <directive type="section" module="core">Directory</directive>
58699879a562774640b95e9eedfd891f336e38c2nd sections, not in <directive type="section"
58699879a562774640b95e9eedfd891f336e38c2nd module="core">Location</directive> or <directive type="section"
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Files</directive> sections.
fb77c505254b6e9c925e23e734463e87574f8f40kess </note>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd <p>When this directive is set to <code>None</code>, then
58699879a562774640b95e9eedfd891f336e38c2nd <a href="#accessfilename">.htaccess</a> files are completely ignored.
58699879a562774640b95e9eedfd891f336e38c2nd In this case, the server will not even attempt to read
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive <code>.htaccess</code> files in the filesystem.</p>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd <p>When this directive is set to <code>All</code>, then any
58699879a562774640b95e9eedfd891f336e38c2nd directive which has the .htaccess <a
58699879a562774640b95e9eedfd891f336e38c2nd href="directive-dict.html#Context">Context</a> is allowed in
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive <code>.htaccess</code> files.</p>
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive
a2920e90d95fa04c15bdbbc03e7f8636eac92423slive <p>The <var>directive-type</var> can be one of the following
58699879a562774640b95e9eedfd891f336e38c2nd groupings of directives.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dl>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt>AuthConfig</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd Allow use of the authorization directives (<directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_authn_dbm">AuthDBMGroupFile</directive>,
58699879a562774640b95e9eedfd891f336e38c2nd <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
58699879a562774640b95e9eedfd891f336e38c2nd <directive module="mod_authz_groupfile">AuthGroupFile</directive>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="core">AuthName</directive>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="core">AuthType</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_authn_file">AuthUserFile</directive>, <directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess module="core">Require</directive>, <em>etc.</em>).</dd>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd <dt>FileInfo</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess Allow use of the directives controlling document types (<directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">DefaultType</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">ErrorDocument</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">ForceType</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_negotiation">LanguagePriority</directive>,
58699879a562774640b95e9eedfd891f336e38c2nd <directive module="core">SetHandler</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">SetInputFilter</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">SetOutputFilter</directive>, and
58699879a562774640b95e9eedfd891f336e38c2nd <module>mod_mime</module> Add* and Remove*
58699879a562774640b95e9eedfd891f336e38c2nd directives, <em>etc.</em>).</dd>
58699879a562774640b95e9eedfd891f336e38c2nd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt>Indexes</dt>
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <dd>
c14037646789087319802aaada2e8534ccab0158slive Allow use of the directives controlling directory indexing
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess (<directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess module="mod_autoindex">AddDescription</directive>,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="mod_autoindex">AddIcon</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd module="mod_autoindex">AddIconByEncoding</directive>,
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <directive module="mod_autoindex">AddIconByType</directive>,
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <directive module="mod_autoindex">DefaultIcon</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd module="mod_dir">DirectoryIndex</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd module="mod_autoindex">FancyIndexing</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd module="mod_autoindex">HeaderName</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd module="mod_autoindex">IndexIgnore</directive>, <directive
ec9b02c6869b75575ada34c800672162833a2c06nd module="mod_autoindex">IndexOptions</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_autoindex">ReadmeName</directive>,
58699879a562774640b95e9eedfd891f336e38c2nd <em>etc.</em>).</dd>
58699879a562774640b95e9eedfd891f336e38c2nd
58699879a562774640b95e9eedfd891f336e38c2nd <dt>Limit</dt>
58699879a562774640b95e9eedfd891f336e38c2nd
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <dd>
58699879a562774640b95e9eedfd891f336e38c2nd Allow use of the directives controlling host access (<directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_authz_host">Allow</directive>, <directive
77ead9e0262e4f08ec336d1a65b2edef7705c839nd module="mod_authz_host">Deny</directive> and <directive
77ead9e0262e4f08ec336d1a65b2edef7705c839nd module="mod_authz_host">Order</directive>).</dd>
9583adab6bc4b3758e41963c905d9dad9f067131nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <dt>Options</dt>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <dd>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd Allow use of the directives controlling specific directory
77ead9e0262e4f08ec336d1a65b2edef7705c839nd features (<directive module="core">Options</directive> and
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <directive module="mod_include">XBitHack</directive>).</dd>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </dl>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>Example:</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd AllowOverride AuthConfig Indexes
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </example>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd</usage>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<seealso><directive module="core">AccessFileName</directive></seealso>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<seealso><a href="/configuring.html">Configuration Files</a></seealso>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<directivesynopsis>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<name>AuthName</name>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<description>Authorization realm for use in HTTP
77ead9e0262e4f08ec336d1a65b2edef7705c839ndauthentication</description>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<syntax>AuthName <var>auth-domain</var></syntax>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
003f0c9fda6664daf5092a0e42f65ede20098153slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive sets the name of the authorization realm for a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">AuthType</directive> and <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Require</directive> directives, and directives such
fb77c505254b6e9c925e23e734463e87574f8f40kess as <directive module="mod_authn_file">AuthUserFile</directive> and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="mod_authz_groupfile">AuthGroupFile</directive> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive work.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <p>For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <example>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd AuthName "Top Secret"
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd </example>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd
10673857794a4b3d9568ca2d983722a87ed352f1rbowen <p>The string provided for the <code>AuthName</code> is what will
10673857794a4b3d9568ca2d983722a87ed352f1rbowen appear in the password dialog provided by most browsers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="/howto/auth.html">Authentication, Authorization, and
fb77c505254b6e9c925e23e734463e87574f8f40kess Access Control</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>AuthType</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Type of user authentication</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AuthType Basic|Digest</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>AuthConfig</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive selects the type of user authentication for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. Only <code>Basic</code> and <code>Digest</code> are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive currently implemented.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz It must be accompanied by <directive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="core">AuthName</directive> and <directive
9ed9eaf871c58d281af02e76125ceadb5060afa5nd module="core">Require</directive> directives, and directives such
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl as <directive module="mod_authn_file">AuthUserFile</directive> and
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl <directive module="mod_authz_groupfile">AuthGroupFile</directive> to
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz work.</p>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/auth.html">Authentication, Authorization,
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveand 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>NetWare only</compatibility>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<usage>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>This directive is used to control how Apache finds the
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem interpreter used to run CGI scripts. For example, setting
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <code>CGIMapExtension sys:\foo.nlm .foo</code> will
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem cause all CGI script files with a <code>.foo</code> extension to
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem be passed to the FOO interpreter.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</usage>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<directivesynopsis>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<name>ContentDigest</name>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<description>Enables the generation of <code>Content-MD5</code> HTTP Response
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluemheaders</description>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<syntax>ContentDigest On|Off</syntax>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<default>ContentDigest Off</default>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<contextlist><context>server config</context><context>virtual host</context>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<context>directory</context><context>.htaccess</context>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem</contextlist>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem<override>Options</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<status>Experimental</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive respectively RFC2068.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>MD5 is an algorithm for computing a "message digest"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (sometimes called "fingerprint") of arbitrary-length data, with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a high degree of confidence that any alterations in the data
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be reflected in alterations in the message digest.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>Content-MD5</code> header provides an end-to-end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message integrity check (MIC) of the entity-body. A proxy or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client may check this header for detecting accidental
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modification of the entity-body in transit. Example header:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
9ed9eaf871c58d281af02e76125ceadb5060afa5nd values are not cached).</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <p><code>Content-MD5</code> is only sent for documents served
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the <module>core</module>, and not by any module. For example,
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna SSI documents, output from CGI scripts, and byte range responses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive do not have this header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna<directivesynopsis>
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna<name>DefaultType</name>
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess<description>MIME content-type that will be sent if the
f23fb63b05f89f47d7a3099491f2c68dcce432e9kessserver cannot determine a type in any other way</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>DefaultType <var>MIME-type</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>DefaultType text/plain</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>FileInfo</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<usage>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <p>There will be times when the server is asked to provide a
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd document whose type cannot be determined by its MIME types
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd 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>
54bcd0e21a5c79158afd3b78bf707a493a5fb33crbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DefaultType image/gif
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes </example>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would be appropriate for a directory which contained many GIF
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes images with filenames missing the <code>.gif</code> extension.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p>Note that unlike <directive
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="core">ForceType</directive>, this directive only
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes provides the default mime-type. All other mime-type definitions,
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes including filename extensions, that might identify the media type
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes will override this default.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</usage>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis type="section">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>Directory</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Enclose a group of directives that apply only to the
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesnamed file-system directory and sub-directories</description>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<syntax>&lt;Directory <var>directory-path</var>&gt;
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes... &lt;/Directory&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive type="section">Directory</directive> and
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>&lt;/Directory&gt;</code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory. Any directive that is allowed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in a directory context may be used. <var>Directory-path</var> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive either the full path to a directory, or a wild-card string using
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Unix shell-style matching. In a wild-card string, <code>?</code> matches
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive any single character, and <code>*</code> matches any sequences of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive characters. You may also use <code>[]</code> character ranges. None
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the wildcards match a `/' character, so <code>&lt;Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /*/public_html&gt;</code> will not match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/user/public_html</code>, but <code>&lt;Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /home/*/public_html&gt;</code> will match. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /usr/local/httpd/htdocs&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Be careful with the <var>directory-path</var> arguments:
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd They have to literally match the filesystem path which Apache uses
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to access the files. Directives applied to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;Directory&gt;</code> will not apply to files accessed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that same directory via a different path, such as via different symbolic
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Extended regular
fb77c505254b6e9c925e23e734463e87574f8f40kess expressions can also be used, with the addition of the
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>~</code> character. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory ~ "^/www/.*/[0-9]{3}"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
003f0c9fda6664daf5092a0e42f65ede20098153slive three numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If multiple (non-regular expression) <directive
76f2a3125fb6aca59d43b02220dabac91175a281slive type="section">Directory</directive> sections
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
c14037646789087319802aaada2e8534ccab0158slive &lt;Directory /&gt;<br />
c14037646789087319802aaada2e8534ccab0158slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /home/&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AllowOverride FileInfo<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess </example>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>for access to the document <code>/home/web/dir/doc.html</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the steps are:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride None</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess (disabling <code>.htaccess</code> files).</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory <code>/home</code>).</li>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <li>Apply any <code>FileInfo</code> directives in
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <code>/home/web/dir/.htaccess</code> in that order.</li>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl </ul>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <p>Regular expressions are not considered until after all of the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl normal sections have been applied. Then all of the regular
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl expressions are tested in the order they appeared in the
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl configuration file. For example, with</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <example>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl &lt;Directory ~ abc$&gt;<br />
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl <indent>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl # ... directives here ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>the regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note that the default Apache access for
003f0c9fda6664daf5092a0e42f65ede20098153slive <code>&lt;Directory /&gt;</code> is <code>Allow from All</code>.
003f0c9fda6664daf5092a0e42f65ede20098153slive This means that Apache will serve any file mapped from an URL. It is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd recommended that you change this with a block such
003f0c9fda6664daf5092a0e42f65ede20098153slive as</strong></p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess &lt;Directory /&gt;<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess <indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive Order Deny,Allow<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive Deny from All<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p><strong>and then override this for directories you
130d299c4b2b15be45532a176604c71fdc7bea5bnd <em>want</em> accessible. See the <a
130d299c4b2b15be45532a176604c71fdc7bea5bnd href="/misc/security_tips.html">Security Tips</a> page for more
130d299c4b2b15be45532a176604c71fdc7bea5bnd details.</strong></p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The directory sections occur in the <code>httpd.conf</code> file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">Directory</directive> directives
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd cannot nest, and cannot appear in a <directive module="core"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">Limit</directive> or <directive module="core"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">LimitExcept</directive> section.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/sections.html">How &lt;Directory&gt;,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Location&gt; and &lt;Files&gt; sections work</a> for an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd explanation of how these different sections are combined when a
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen request is received</seealso>
030108b1816bcda3d925df65357feabdce83bc94slive</directivesynopsis>
030108b1816bcda3d925df65357feabdce83bc94slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>DirectoryMatch</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enclose directives that apply to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndfile-system directories matching a regular expression and their
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndsubdirectories</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;DirectoryMatch <var>regex</var>&gt;
fb77c505254b6e9c925e23e734463e87574f8f40kess... &lt;/DirectoryMatch&gt;</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><directive type="section">DirectoryMatch</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/DirectoryMatch&gt;</code> are used to enclose a group
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of directives which will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory, the same as <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">Directory</directive>. However, it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive takes as an argument a regular expression. For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd &lt;DirectoryMatch "^/www/.*/[0-9]{3}"&gt;
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>would match directories in <code>/www/</code> that consisted of three
130d299c4b2b15be45532a176604c71fdc7bea5bnd numbers.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><directive type="section" module="core">Directory</directive> for
130d299c4b2b15be45532a176604c71fdc7bea5bnda description of how regular expressions are mixed in with normal
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directive type="section">Directory</directive>s</seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndhref="/sections.html">How &lt;Directory&gt;, &lt;Location&gt; and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd&lt;Files&gt; sections work</a> for an explanation of how these different
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>DocumentRoot</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Directory that forms the main document tree visible
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the web</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>DocumentRoot <var>directory-path</var></syntax>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<default>DocumentRoot /usr/local/apache/htdocs</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the directory from which <code>httpd</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will serve files. Unless matched by a directive like <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_alias">Alias</directive>, the server appends the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path from the requested URL to the document root to make the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path to the document. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd DocumentRoot /usr/web
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>then an access to
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>http://www.my.host.com/index.html</code> refers to
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>/usr/web/index.html</code>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>DocumentRoot</directive> should be specified without
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess a trailing slash.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</usage>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<seealso><a href="/urlmapping.html">Mapping URLs to Filesystem
6b64034fa2a644ba291c484c0c01c7df5b8d982ckessLocation</a></seealso>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>EnableMMAP</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Use memory-mapping to read files during delivery</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>EnableMMAP On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>EnableMMAP On</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<override>FileInfo</override>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>This directive controls whether the <code>httpd</code> may use
130d299c4b2b15be45532a176604c71fdc7bea5bnd memory-mapping if it needs to read the contents of a file during
130d299c4b2b15be45532a176604c71fdc7bea5bnd delivery. By default, when the handling of a request requires
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd access to the data within a file -- for example, when delivering a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server-parsed file using <module>mod_include</module> -- Apache
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-maps the file if the OS supports it.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This memory-mapping sometimes yields a performance improvement.
fb77c505254b6e9c925e23e734463e87574f8f40kess But in some environments, it is better to disable the memory-mapping
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to prevent operational problems:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On some multiprocessor systems, memory-mapping can reduce the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive performance of the <code>httpd</code>.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>With an NFS-mounted <directive module="core">DocumentRoot</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code>httpd</code> may crash due to a segmentation fault if a file
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess is deleted or truncated while the <code>httpd</code> has it
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess memory-mapped.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable memory-mapping of delivered files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess EnableMMAP Off
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For NFS mounted files, this feature may be disabled explicitly for
7b5535ed88e0f561b3bfb3330137bd804846afd4slive 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>
030108b1816bcda3d925df65357feabdce83bc94slive</directivesynopsis>
030108b1816bcda3d925df65357feabdce83bc94slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>EnableSendfile</name>
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen<description>Use the kernel sendfile support to deliver files to the client</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>EnableSendfile On|Off</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive controls whether <code>httpd</code> may use the sendfile
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess support from the kernel to transmit file contents to the client.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>This sendfile mechanism avoids seperate read and send operations,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and buffer allocations. But on some platforms or within some
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filesystems, it is better to disable this feature to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Some platforms may have broken sendfile support that the build
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive system did not detect, especially if the binaries were built on
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd another box and moved to such a machine with broken sendfile
fb77c505254b6e9c925e23e734463e87574f8f40kess support.</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>With a network-mounted <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">DocumentRoot</directive> (e.g., NFS or SMB),
fb77c505254b6e9c925e23e734463e87574f8f40kess the kernel may be unable to serve the network file through
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd its own cache.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For server configurations that are vulnerable to these problems,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd you should disable this feature by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess EnableSendfile Off
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess </example>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
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>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen &lt;Directory "/path-to-nfs-files"&gt;
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive EnableSendfile Off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp &lt;/Directory&gt;
af18698b10b429b270551ca3a5d51a75e1c9db22brianp </example>
003f0c9fda6664daf5092a0e42f65ede20098153slive</usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<directivesynopsis>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<name>ErrorDocument</name>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<description>What the server will return to the client
003f0c9fda6664daf5092a0e42f65ede20098153slivein case of an error</description>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<contextlist><context>server config</context><context>virtual host</context>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd<context>directory</context><context>.htaccess</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive<override>FileInfo</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess<compatibility>Quoting syntax for text messages is different in Apache
fb77c505254b6e9c925e23e734463e87574f8f40kess2.0</compatibility>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In the event of a problem or error, Apache can be configured
af18698b10b429b270551ca3a5d51a75e1c9db22brianp to do one of four things,</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <ol>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <li>output a simple hardcoded error message</li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <li>output a customized message</li>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <li>redirect to a local <var>URL-path</var> to handle the
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd problem/error</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <li>redirect to an external <var>URL</var> to handle the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd problem/error</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </ol>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The first option is the default, while options 2-4 are
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configured using the <directive>ErrorDocument</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess directive, which is followed by the HTTP response code and a URL
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or a message. Apache will sometimes offer additional information
41ef8b3051855b802104193ee0a587515af60a37wrowe regarding the problem/error.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>URLs can begin with a slash (/) for local URLs, or be a full
41ef8b3051855b802104193ee0a587515af60a37wrowe URL which the client can resolve. Alternatively, a message can
41ef8b3051855b802104193ee0a587515af60a37wrowe be provided to be displayed by the browser. Examples:</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
41ef8b3051855b802104193ee0a587515af60a37wrowe ErrorDocument 401 /subscription_info.html<br />
41ef8b3051855b802104193ee0a587515af60a37wrowe ErrorDocument 403 "Sorry can't allow you access today"
41ef8b3051855b802104193ee0a587515af60a37wrowe </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Note that when you specify an <directive>ErrorDocument</directive>
41ef8b3051855b802104193ee0a587515af60a37wrowe that points to a remote URL (ie. anything with a method such as
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>http</code> in front of it), Apache will send a redirect to the
41ef8b3051855b802104193ee0a587515af60a37wrowe client to tell it where to find the document, even if the
fb77c505254b6e9c925e23e734463e87574f8f40kess document ends up being on the same server. This has several
fb77c505254b6e9c925e23e734463e87574f8f40kess implications, the most important being that the client will not
41ef8b3051855b802104193ee0a587515af60a37wrowe receive the original error status code, but instead will
41ef8b3051855b802104193ee0a587515af60a37wrowe receive a redirect status code. This in turn can confuse web
41ef8b3051855b802104193ee0a587515af60a37wrowe robots and other clients which try to determine if a URL is
41ef8b3051855b802104193ee0a587515af60a37wrowe valid using the status code. In addition, if you use a remote
9fb925624300c864fe3969a264e52aa83f3c2dd0slive URL in an <code>ErrorDocument 401</code>, the client will not
41ef8b3051855b802104193ee0a587515af60a37wrowe know to prompt the user for a password since it will not
41ef8b3051855b802104193ee0a587515af60a37wrowe receive the 401 status code. Therefore, <strong>if you use an
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <code>ErrorDocument 401</code> directive then it must refer to a local
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd document.</strong></p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Microsoft Internet Explorer (MSIE) will by default ignore
41ef8b3051855b802104193ee0a587515af60a37wrowe server-generated error messages when they are "too small" and substitute
41ef8b3051855b802104193ee0a587515af60a37wrowe its own "friendly" error messages. The size threshold varies depending on
41ef8b3051855b802104193ee0a587515af60a37wrowe the type of error, but in general, if you make your error document
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick greater than 512 bytes, then MSIE will show the server-generated
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess error rather than masking it. More information is available in
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Microsoft Knowledgebase article <a
41ef8b3051855b802104193ee0a587515af60a37wrowe href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
41ef8b3051855b802104193ee0a587515af60a37wrowe >Q294807</a>.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Prior to version 2.0, messages were indicated by prefixing
41ef8b3051855b802104193ee0a587515af60a37wrowe them with a single unmatched double quote character.</p>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley<seealso><a href="/custom-error.html">documentation of
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley customizable responses</a></seealso>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm</directivesynopsis>
9d00e5d0f270651f1f1cc1abea03bf53e5656fcecolm
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<name>ErrorLog</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Location where the server will log errors</description>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>ErrorLog logs/error_log (Unix)<br />
41ef8b3051855b802104193ee0a587515af60a37wroweErrorLog logs/error.log (Windows and OS/2)</default>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>ErrorLog</directive> directive sets the name of
41ef8b3051855b802104193ee0a587515af60a37wrowe the file to which the server will log any errors it encounters. If
41ef8b3051855b802104193ee0a587515af60a37wrowe the <var>file-path</var> is not absolute (in general: does not begin
fb77c505254b6e9c925e23e734463e87574f8f40kess with a slash (/)) then it is assumed to be relative to the <directive
9fb925624300c864fe3969a264e52aa83f3c2dd0slive module="core">ServerRoot</directive>.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe
41ef8b3051855b802104193ee0a587515af60a37wrowe <example><title>Example</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorLog /var/log/httpd/error_log
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>If the <var>file-path</var>
41ef8b3051855b802104193ee0a587515af60a37wrowe begins with a pipe (|) then it is assumed to be a command to spawn
41ef8b3051855b802104193ee0a587515af60a37wrowe to handle the error log.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <example><title>Example</title>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp ErrorLog "|/usr/local/bin/httpd_errors"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Using <code>syslog</code> instead of a filename enables logging
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive via syslogd(8) if the system supports it. The default is to use
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive syslog(1).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog syslog:user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
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 logfiles are stored is writable by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive anyone other than the user that starts the server.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">LogLevel</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/logs.html">Apache Log Files</a></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>FileETag</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>File attributes used to create the ETag
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveHTTP response header</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>FileETag <var>component</var> ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>FileETag INode MTime Size</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
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<usage>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive The <directive>FileETag</directive> directive configures the file
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive attributes that are used to create the <code>ETag</code> (entity
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tag) response header field when the document is based on a file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (The <code>ETag</code> value is used in cache management to save
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd network bandwidth.) In Apache 1.3.22 and earlier, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>ETag</code> value was <em>always</em> formed
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from the file's inode, size, and last-modified time (mtime). The
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>FileETag</directive> directive allows you to choose
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd which of these -- if any -- should be used. The recognized keywords are:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </p>
f7fe99050600166042c04b8e595fb75499eed7f0geoff
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dl>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dt><strong>INode</strong></dt>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dd>The file's i-node number will be included in the calculation</dd>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dt><strong>MTime</strong></dt>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dd>The date and time the file was last modified will be included</dd>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dt><strong>Size</strong></dt>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dd>The number of bytes in the file will be included</dd>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dt><strong>All</strong></dt>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dd>All available fields will be used. This is equivalent to:
f7fe99050600166042c04b8e595fb75499eed7f0geoff <example>FileETag INode MTime Size</example></dd>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dt><strong>None</strong></dt>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <dd>If a document is file-based, no <code>ETag</code> field will be
f7fe99050600166042c04b8e595fb75499eed7f0geoff included in the response</dd>
f7fe99050600166042c04b8e595fb75499eed7f0geoff </dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If a directory's configuration includes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>FileETag&nbsp;INode&nbsp;MTime&nbsp;Size</code>, and a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectory's includes <code>FileETag&nbsp;-INode</code>,
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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis type="section">
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>Files</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Contains directives that apply to matched
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slivefilenames</description>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<syntax>&lt;Files <var>filename</var>&gt; ... &lt;/Files&gt;</syntax>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive<contextlist><context>server config</context><context>virtual host</context>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>All</override>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive<usage>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <p>The <directive type="section">Files</directive> directive
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive limits the scope of the enclosed directives by filename. It is comparable
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive to the <directive module="core" type="section">Directory</directive>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive and <directive module="core" type="section">Location</directive>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive directives. It should be matched with a <code>&lt;/Files&gt;</code>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive directive. The directives given within this section will be applied to
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive any object with a basename (last component of filename) matching the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified filename. <directive type="section">Files</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections are processed in the order they appear in the
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that <directive type="section">Files</directive> can be nested
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections to restrict the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive portion of the filesystem they apply to.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>filename</var> argument should include a filename, or
3209c0009829fcf63b6213fb9c43d534f7906006slive a wild-card string, where <code>?</code> matches any single character,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>*</code> matches any sequences of characters. Extended regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Files ~ "\.(gif|jpe?g|png)$"&gt;
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess </example>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>would match most common Internet graphics formats. <directive
fb109b84906e3ee61680aa289953c2f9e859354erbowen module="core" type="section">FilesMatch</directive> is preferred,
fb109b84906e3ee61680aa289953c2f9e859354erbowen however.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Note that unlike <directive type="section"
fb109b84906e3ee61680aa289953c2f9e859354erbowen 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
fb109b84906e3ee61680aa289953c2f9e859354erbowen their own files, at a file-by-file level.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen
fb109b84906e3ee61680aa289953c2f9e859354erbowen</usage>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>FilesMatch</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply to regular-expression matched
fb109b84906e3ee61680aa289953c2f9e859354erbowenfilenames</description>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<syntax>&lt;FilesMatch <var>regex</var>&gt; ... &lt;/FilesMatch&gt;</syntax>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<contextlist><context>server config</context><context>virtual host</context>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">FilesMatch</directive> directive
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes limits the scope of the enclosed directives by filename, just as the
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <directive module="core" type="section">Files</directive> directive
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes does. However, it accepts a regular expression. For example:</p>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <example>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes &lt;FilesMatch "\.(gif|jpe?g|png)$"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</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
003f0c9fda6664daf5092a0e42f65ede20098153slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved to the core in Apache 2.0</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<usage>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When placed into an <code>.htaccess</code> file or a
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Directory</directive>, or
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Location</directive> or
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Files</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess section, this directive forces all matching files to be served
fb77c505254b6e9c925e23e734463e87574f8f40kess with the content type identification given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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>,
530eba85dbd41b8a0fa5255d3648d1440199a661slive you might want to use:</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
530eba85dbd41b8a0fa5255d3648d1440199a661slive ForceType image/gif
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that unlike <directive module="core">DefaultType</directive>,
530eba85dbd41b8a0fa5255d3648d1440199a661slive this directive overrides all mime-type associations, including
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filename extensions, that might identify the media type.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>You can override any <directive>ForceType</directive> setting
fb77c505254b6e9c925e23e734463e87574f8f40kess by using the value of <code>None</code>:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # force all files to be image/gif:<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Location /images&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ForceType image/gif<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Location&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # but normal mime-type associations here:<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Location /images/mixed&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ForceType None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Location&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<name>HostnameLookups</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables DNS lookups so that host names can be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess The value <code>Double</code> refers to doing double-reverse
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess DNS lookup. That is, after a reverse lookup is performed, a forward
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess lookup is then performed on that result. At least one of the ip
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess addresses in the forward lookup must match the original
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess address. (In "tcpwrappers" terminology this is called
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>PARANOID</code>.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive result of this double-reverse isn't generally available unless you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set <code>HostnameLookups Double</code>. For example, if only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>HostnameLookups On</code> and a request is made to an object
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that is protected by hostname restrictions, regardless of whether
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the double-reverse fails or not, CGIs will still be passed the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive single-reverse result in <code>REMOTE_HOST</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The default is <code>Off</code> in order to save the network
fb77c505254b6e9c925e23e734463e87574f8f40kess traffic for those sites that don't truly need the reverse
030108b1816bcda3d925df65357feabdce83bc94slive lookups done. It is also better for the end users because they
030108b1816bcda3d925df65357feabdce83bc94slive don't have to suffer the extra latency that a lookup entails.
030108b1816bcda3d925df65357feabdce83bc94slive Heavily loaded sites should leave this directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Off</code>, since DNS lookups can take considerable
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd amounts of time. The utility <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/programs/logresolve.html">logresolve</a>, compiled by default
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the <code>bin</code> subdirectory of your installation directory, can
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd be used to look up host names from logged IP addresses offline.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>IfDefine</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that will be processed only
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif a test is true at startup</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;IfDefine [!]<var>parameter-name</var>&gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/IfDefine&gt;</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <code>&lt;IfDefine <var>test</var>&gt;...&lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code> section is used to mark directives that are conditional. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives within an <directive type="section">IfDefine</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section are only processed if the <var>test</var> is true. If <var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive test</var> is false, everything between the start and end markers is
003f0c9fda6664daf5092a0e42f65ede20098153slive ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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>
003f0c9fda6664daf5092a0e42f65ede20098153slive <li><var>parameter-name</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li><code>!</code><var>parameter-name</var></li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ul>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>In the former case, the directives between the start and end
030108b1816bcda3d925df65357feabdce83bc94slive markers are only processed if the parameter named
030108b1816bcda3d925df65357feabdce83bc94slive <var>parameter-name</var> is defined. The second format reverses
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the test, and only processes the directives if
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>parameter-name</var> is <strong>not</strong> defined.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <var>parameter-name</var> argument is a define as given on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <code>httpd</code> command line via <code>-D<var>parameter-</var>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </code>, at the time the server was started.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p><directive type="section">IfDefine</directive> sections are
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess nest-able, which can be used to implement simple
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess multiple-parameter tests. Example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive httpd -DReverseProxy ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # httpd.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;IfDefine ReverseProxy&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd LoadModule rewrite_module modules/mod_rewrite.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LoadModule proxy_module modules/libproxy.so<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;/IfDefine&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>IfModule</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that are processed conditional on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepresence or absence of a specific module</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;IfModule [!]<var>module-name</var>&gt; ...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/IfModule&gt;</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>&lt;IfModule <var>test</var>&gt;...&lt;/IfModule&gt;</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section is used to mark directives that are conditional on the presence of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a specific module. The directives within an <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >IfModule</directive> section are only processed if the <var>test</var>
7654193c1faf603feec999850322ad79e6c551bcnd is true. If <var>test</var> is false, everything between the start and
7654193c1faf603feec999850322ad79e6c551bcnd end markers is ignored.</p>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
7654193c1faf603feec999850322ad79e6c551bcnd <p>The <var>test</var> in the <directive type="section"
7654193c1faf603feec999850322ad79e6c551bcnd >IfModule</directive> section directive can be one of two forms:</p>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd <ul>
7654193c1faf603feec999850322ad79e6c551bcnd <li><var>module name</var></li>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd <li>!<var>module name</var></li>
7654193c1faf603feec999850322ad79e6c551bcnd </ul>
7654193c1faf603feec999850322ad79e6c551bcnd
7654193c1faf603feec999850322ad79e6c551bcnd <p>In the former case, the directives between the start and end
7654193c1faf603feec999850322ad79e6c551bcnd markers are only processed if the module named <var>module
7654193c1faf603feec999850322ad79e6c551bcnd name</var> is included in Apache -- either compiled in or
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd dynamically loaded using <directive module="mod_so"
7654193c1faf603feec999850322ad79e6c551bcnd >LoadModule</directive>. The second format reverses the test,
7654193c1faf603feec999850322ad79e6c551bcnd and only processes the directives if <var>module name</var> is
7654193c1faf603feec999850322ad79e6c551bcnd <strong>not</strong> included.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>module name</var> argument is the file name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module, at the time it was compiled. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>mod_rewrite.c</code>. If a module consists of several
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>STANDARD20_MODULE_STUFF</code>.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <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
fb77c505254b6e9c925e23e734463e87574f8f40kess placed in <directive type="section">IfModule</directive>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess sections.</note>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Include</name>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<description>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe server configuration files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Include <var>file-path</var>|<var>directory-path</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Wildcard matching available in 2.0.41 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive allows inclusion of other configuration files
fb77c505254b6e9c925e23e734463e87574f8f40kess 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,
fb77c505254b6e9c925e23e734463e87574f8f40kess rather than a file, Apache will read all files in that directory
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd and any subdirectory. But including entire directories is not
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd recommended, because it is easy to accidentally leave temporary
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd files in a directory that can cause <code>httpd</code> to
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd fail.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The file path specified may be an absolute path (i.e.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive starting with a slash), or may be relative to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ServerRoot</directive> directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include /usr/local/apache2/conf/ssl.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Include /usr/local/apache2/conf/vhosts/*.conf
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Or, providing paths relative to your <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerRoot</directive> directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Include conf/ssl.conf<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Include conf/vhosts/*.conf
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Running <code>apachectl configtest</code> will give you a list
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the files that are being processed during the configuration
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd check:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive root@host# apachectl configtest<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/ssl.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config file: /usr/local/apache2/conf/vhosts/vhost1.conf<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Processing config file: /usr/local/apache2/conf/vhosts/vhost2.conf<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Syntax OK
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><a href="/programs/apachectl.html">apachectl</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<name>KeepAlive</name>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<description>Enables HTTP persistent connections</description>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<syntax>KeepAlive On|Off</syntax>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<default>KeepAlive On</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
130d299c4b2b15be45532a176604c71fdc7bea5bnd connection feature of HTTP/1.1 provide long-lived HTTP sessions
130d299c4b2b15be45532a176604c71fdc7bea5bnd which allow multiple requests to be sent over the same TCP
130d299c4b2b15be45532a176604c71fdc7bea5bnd connection. In some cases this has been shown to result in an
130d299c4b2b15be45532a176604c71fdc7bea5bnd almost 50% speedup in latency times for HTML documents with
130d299c4b2b15be45532a176604c71fdc7bea5bnd many images. To enable Keep-Alive connections, set
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>KeepAlive On</code>.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For HTTP/1.0 clients, Keep-Alive connections will only be
130d299c4b2b15be45532a176604c71fdc7bea5bnd used if they are specifically requested by a client. In
130d299c4b2b15be45532a176604c71fdc7bea5bnd addition, a Keep-Alive connection with an HTTP/1.0 client can
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For HTTP/1.1 clients, persistent connections are the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive unless otherwise specified. If the client requests it, chunked
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive encoding will be used in order to send content of unknown
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki length over persistent connections.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
55d36f9b61520c2374ab463e77e8a62daa416398nd<name>KeepAliveTimeout</name>
55d36f9b61520c2374ab463e77e8a62daa416398nd<description>Amount of time the server will wait for subsequent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequests on a persistent connection</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>KeepAliveTimeout <var>seconds</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>KeepAliveTimeout 15</default>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The number of seconds Apache will wait for a subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request before closing the connection. Once a request has been
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd received, the timeout value specified by the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">Timeout</directive> directive applies.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Setting <directive>KeepAliveTimeout</directive> to a high value
55d36f9b61520c2374ab463e77e8a62daa416398nd may cause performance problems in heavily loaded servers. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive higher the timeout, the more server processes will be kept
55d36f9b61520c2374ab463e77e8a62daa416398nd occupied waiting on connections with idle clients.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
55d36f9b61520c2374ab463e77e8a62daa416398nd<directivesynopsis type="section">
55d36f9b61520c2374ab463e77e8a62daa416398nd<name>Limit</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict enclosed access controls to only certain HTTP
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndmethods</description>
55d36f9b61520c2374ab463e77e8a62daa416398nd<syntax>&lt;Limit <var>method</var> [<var>method</var>] ... &gt; ...
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Limit&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
55d36f9b61520c2374ab463e77e8a62daa416398nd<context>directory</context><context>.htaccess</context>
55d36f9b61520c2374ab463e77e8a62daa416398nd</contextlist>
55d36f9b61520c2374ab463e77e8a62daa416398nd<override>All</override>
55d36f9b61520c2374ab463e77e8a62daa416398nd
55d36f9b61520c2374ab463e77e8a62daa416398nd<usage>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>Access controls are normally effective for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>all</strong> access methods, and this is the usual
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive desired behavior. <strong>In the general case, access control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives should not be placed within a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">Limit</directive> section.</strong></p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>The purpose of the <directive type="section">Limit</directive>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive directive is to restrict the effect of the access controls to the
fb77c505254b6e9c925e23e734463e87574f8f40kess nominated HTTP methods. For all other methods, the access
bea526116133aa3d7dabd1924bfc580b37fbf22aslive restrictions that are enclosed in the <directive
bea526116133aa3d7dabd1924bfc580b37fbf22aslive type="section">Limit</directive> bracket <strong>will have no
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive effect</strong>. The following example applies the access control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only to the methods <code>POST</code>, <code>PUT</code>, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>DELETE</code>, leaving all other methods unprotected:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Limit POST PUT DELETE&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require valid-user<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;/Limit&gt;
003f0c9fda6664daf5092a0e42f65ede20098153slive </example>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The method names listed can be one or more of: <code>GET</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>CONNECT</code>, <code>OPTIONS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
fb77c505254b6e9c925e23e734463e87574f8f40kess case-sensitive.</strong> If <code>GET</code> is used it will also
7b5535ed88e0f561b3bfb3330137bd804846afd4slive restrict <code>HEAD</code> requests. The <code>TRACE</code> method
7b5535ed88e0f561b3bfb3330137bd804846afd4slive cannot be limited.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</usage>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</directivesynopsis>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitExcept</name>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess<description>Restrict access controls to all HTTP methods
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckessexcept the named ones</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>&lt;LimitExcept <var>method</var> [<var>method</var>] ... &gt; ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/LimitExcept&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</contextlist>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p><directive type="section">LimitExcept</directive> and
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <code>&lt;/LimitExcept&gt;</code> are used to enclose
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a group of access control directives which will then apply to any
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd HTTP access method <strong>not</strong> listed in the arguments;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd i.e., it is the opposite of a <directive type="section"
7b5535ed88e0f561b3bfb3330137bd804846afd4slive module="core">Limit</directive> section and can be used to control
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd both standard and nonstandard/unrecognized methods. See the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd documentation for <directive module="core"
7b5535ed88e0f561b3bfb3330137bd804846afd4slive type="section">Limit</directive> for more details.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;LimitExcept POST GET&gt;<br />
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <indent>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive Require valid-user<br />
7b5535ed88e0f561b3bfb3330137bd804846afd4slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;LimitExcept&gt;
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LimitRequestBody</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restricts the total size of the HTTP request body sent
003f0c9fda6664daf5092a0e42f65ede20098153slivefrom the client</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>LimitRequestBody <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestBody 0</default>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context><context>virtual host</context>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body. The default value is defined by the compile-time
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess constant <code>DEFAULT_LIMIT_REQUEST_BODY</code> (0 as
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess distributed).</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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the resource and the methods allowed on that resource. CGI scripts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive typically use the message body for retrieving form information.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Implementations of the <code>PUT</code> method will require
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a value at least as large as any representation that the server
891df99fdfa41fc8a486568f4d31ddf4a571258adreid wishes to accept for that resource.</p>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <p>This directive gives the server administrator greater
891df99fdfa41fc8a486568f4d31ddf4a571258adreid control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If, for example, you are permitting file upload to a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
ee1af2aeb57527f33baa4737aa431e4aef997855rbowen
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</usage>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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
003f0c9fda6664daf5092a0e42f65ede20098153slive the server administrator to modify the limit on the number of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess request header fields allowed in an HTTP request. A server needs
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd this value to be larger than the number of fields that a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client request might include. The number of request header fields
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used by a client rarely exceeds 20, but this may vary among
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different client implementations, often depending upon the extent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which a user has configured their browser to support detailed
003f0c9fda6664daf5092a0e42f65ede20098153slive content negotiation. Optional HTTP extensions are often expressed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using request header fields.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The value should be increased if normal clients see an error
130d299c4b2b15be45532a176604c71fdc7bea5bnd response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess LimitRequestFields 50
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>LimitRequestFieldSize</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Limits the size of the HTTP request header allowed from the
130d299c4b2b15be45532a176604c71fdc7bea5bndclient</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>LimitRequestFieldsize <var>bytes</var></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>LimitRequestFieldsize 8190</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd <p>This directive specifies the number of <var>bytes</var> from 0
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to the value of the compile-time constant
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>DEFAULT_LIMIT_REQUEST_FIELDSIZE</code> (8190 as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd distributed) that will be allowed in an HTTP request
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd header.</p>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd
6c5c651b0b97607b8c8b4965c1385c67699f217fnd <p>The <directive>LimitRequestFieldSize</directive> directive
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive allows the server administrator to reduce the limit on the allowed
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive size of an HTTP request header field below the normal input buffer
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive size compiled with the server. A server needs this value to be
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive large enough to hold any one header field from a normal client
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive request. The size of a normal request header field will vary
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive greatly among different client implementations, often depending
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive upon the extent to which a user has configured their browser to
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive support detailed content negotiation.</p>
4bb78e7cdd53f50240cff4ad7a97c7ed36483797slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd LimitRequestFieldSize 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
003f0c9fda6664daf5092a0e42f65ede20098153slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>LimitRequestLine</name>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Limit the size of the HTTP request line that will be accepted
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowenfrom the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LimitRequestLine <var>bytes</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>LimitRequestLine 8190</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This directive sets the number of <var>bytes</var> from 0 to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen the value of the compile-time constant
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>DEFAULT_LIMIT_REQUEST_LINE</code> (8190 as distributed)
130d299c4b2b15be45532a176604c71fdc7bea5bnd that will be allowed on the HTTP request-line.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <directive>LimitRequestLine</directive> directive allows
130d299c4b2b15be45532a176604c71fdc7bea5bnd the server administrator to reduce the limit on the allowed size
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele of a client's HTTP request-line below the normal input buffer size
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen compiled with the server. Since the request-line consists of the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen HTTP method, URI, and protocol version, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>LimitRequestLine</directive> directive places a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restriction on the length of a request-URI allowed for a request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the server. A server needs this value to be large enough to
03e0a375c2435102fb2b51e34cccff52acbfddcdnd hold any of its resource names, including any information that
03e0a375c2435102fb2b51e34cccff52acbfddcdnd might be passed in the query part of a <code>GET</code> request.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>This directive gives the server administrator greater
03e0a375c2435102fb2b51e34cccff52acbfddcdnd control over abnormal client request behavior, which may be
03e0a375c2435102fb2b51e34cccff52acbfddcdnd useful for avoiding some forms of denial-of-service attacks.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>For example:</p>
a51fafd9c1463954daf49f94e76d078c1eb5c9bdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd LimitRequestLine 4094
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <note>Under normal conditions, the value should not be changed from
03e0a375c2435102fb2b51e34cccff52acbfddcdnd the default.</note>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<name>LimitXMLRequestBody</name>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<description>Limits the size of an XML-based request body</description>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<default>LimitXMLRequestBody 1000000</default>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<contextlist><context>server config</context><context>virtual host</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<context>directory</context><context>.htaccess</context></contextlist>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<override>All</override>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<usage>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Limit (in bytes) on maximum size of an XML-based request
03e0a375c2435102fb2b51e34cccff52acbfddcdnd body. A value of <code>0</code> will disable any checking.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>Example:</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <example>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd LimitXMLRequestBody 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Location</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to matching
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveURLs</description>
003f0c9fda6664daf5092a0e42f65ede20098153slive<syntax>&lt;Location
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>URL-path</var>|<var>URL</var>&gt; ... &lt;/Location&gt;</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
89ea3e2b9591820407538ac250ec49a0f4f056d2nd<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL. It is similar to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, and starts a subsection which is terminated with a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/Location&gt;</code> directive. <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive> sections are processed in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order they appear in the configuration file, after the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Directory</directive> sections and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, and after the <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess type="section" module="core">Files</directive> sections.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note that URLs do not have to line up with the filesystem at
fb77c505254b6e9c925e23e734463e87574f8f40kess all, it should be emphasized that <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive> operates completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive outside the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For all origin (non-proxy) requests, the URL to be matched is a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL-path of the form <code>/path/</code>. No scheme, hostname,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen port, or query string may be included. For proxy requests, the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen URL to be matched is of the form
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>scheme://servername/path</code>, and you must include the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen prefix.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any single character, and <code>*</code> matches any sequences of
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen characters.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Extended regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>~</code> character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;Location ~ "/(extra|special)/data"&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">Location</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only from browsers at <code>foo.com</code>, you might use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Location /status&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from .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
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen where multiple adjacent slashes are frequently collapsed to a single
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>/home/foo</code>). In URL-space this is not necessarily true.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen The <directive type="section" module="core">LocationMatch</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive and the regex version of <directive type="section"
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen >Location</directive> require you to explicitly specify multiple
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen 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
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen implicitly match multiple slashes with a single slash. For example,
ae134ecc8faf4e6a8eb68e1c3724506771442a46rbowen 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>
72580dbc2a55511f13f377063725b9f143b20826stoddard<seealso><a href="/sections.html">How &lt;Directory&gt;, &lt;Location&gt;
72580dbc2a55511f13f377063725b9f143b20826stoddard and &lt;Files&gt; sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
72580dbc2a55511f13f377063725b9f143b20826stoddard
72580dbc2a55511f13f377063725b9f143b20826stoddard<directivesynopsis type="section">
72580dbc2a55511f13f377063725b9f143b20826stoddard<name>LocationMatch</name>
72580dbc2a55511f13f377063725b9f143b20826stoddard<description>Applies the enclosed directives only to regular-expression
72580dbc2a55511f13f377063725b9f143b20826stoddardmatching URLs</description>
72580dbc2a55511f13f377063725b9f143b20826stoddard<syntax>&lt;LocationMatch
56d7eed7205462540aec7202cd82d9f5516fc537kess <var>regex</var>&gt; ... &lt;/LocationMatch&gt;</syntax>
72580dbc2a55511f13f377063725b9f143b20826stoddard<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <directive type="section">LocationMatch</directive> directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen limits the scope of the enclosed directives by URL, in an identical manner
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen to <directive module="core" type="section">Location</directive>. However,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen it takes a regular expression as an argument instead of a simple
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen string. For example:</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <example>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen &lt;LocationMatch "/(extra|special)/data"&gt;
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </example>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>LogLevel</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Controls the verbosity of the ErrorLog</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>LogLevel <var>level</var></syntax>
72580dbc2a55511f13f377063725b9f143b20826stoddard<default>LogLevel warn</default>
72580dbc2a55511f13f377063725b9f143b20826stoddard<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
72580dbc2a55511f13f377063725b9f143b20826stoddard<usage>
72580dbc2a55511f13f377063725b9f143b20826stoddard <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
fb77c505254b6e9c925e23e734463e87574f8f40kess <table border="1">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <th><strong>Level</strong> </th>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <th><strong>Description</strong> </th>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <th><strong>Example</strong> </th>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>emerg</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>Emergencies - system is unusable.</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Child cannot open lock file. Exiting"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>alert</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <td>Action must be taken immediately.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <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>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"socket: Failed to get a socket, exiting child"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <tr>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><code>error</code> </td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>Error conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Premature end of script headers"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>warn</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <td>Warning conditions.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"child process 1234 did not exit, sending another
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SIGHUP"</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td><code>notice</code> </td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7852e17fb37b2a02ccdcab107f2c7f5fd41fd201nd <td>Normal but significant condition.</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ..."</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </tr>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td><code>info</code> </td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td>Informational.</td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td>"Server seems busy, (you may need to increase
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive StartServers, or Min/MaxSpareServers)..."</td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td><code>debug</code> </td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td>Debug-level messages</td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <td>"Opening config file ..."</td>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </tr>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </table>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <p>When a particular level is specified, messages from all
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive other levels of higher significance will be reported as well.
dc223428958ad9ff05011545bcdda000887b93e5slive <em>E.g.</em>, when <code>LogLevel info</code> is specified,
dc223428958ad9ff05011545bcdda000887b93e5slive then messages with log levels of <code>notice</code> and
dc223428958ad9ff05011545bcdda000887b93e5slive <code>warn</code> will also be posted.</p>
dc223428958ad9ff05011545bcdda000887b93e5slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Using a level of at least <code>crit</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
d8c44cd75cf575fe51319280c12445109e878523noodl <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LogLevel notice
030108b1816bcda3d925df65357feabdce83bc94slive </example>
030108b1816bcda3d925df65357feabdce83bc94slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>MaxKeepAliveRequests</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Number of requests allowed on a persistent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveconnection</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>MaxKeepAliveRequests <var>number</var></syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<default>MaxKeepAliveRequests 100</default>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>MaxKeepAliveRequests</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the number of requests allowed per connection when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core" >KeepAlive</directive> is on. If it is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive set to <code>0</code>, unlimited requests will be allowed. We
fb77c505254b6e9c925e23e734463e87574f8f40kess recommend that this setting be kept to a high value for maximum
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server performance.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd MaxKeepAliveRequests 500
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>NameVirtualHost</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Designates an IP address for name-virtual
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndhosting</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>NameVirtualHost</directive> directive is a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd required directive if you want to configure <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/vhosts/">name-based virtual hosts</a>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Although <var>addr</var> can be hostname it is recommended
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that you always use an IP address, e.g.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd NameVirtualHost 111.22.33.44
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>With the <directive>NameVirtualHost</directive> directive you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specify the IP address on which the server will receive requests
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd for the name-based virtual hosts. This will usually be the address
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to which your name-based virtual host names resolve. In cases
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where a firewall or other proxy receives the requests and forwards
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess them on a different IP address to the server, you must specify the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess IP address of the physical interface on the machine which will be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess servicing the requests. If you have multiple name-based hosts on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple addresses, repeat the directive for each address.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note, that the "main server" and any <code>_default_</code> servers
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess will <strong>never</strong> be served for a request to a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>NameVirtualHost</directive> IP Address (unless for some
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reason you specify <directive>NameVirtualHost</directive> but then
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick don't define any <directive>VirtualHost</directive>s for that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Optionally you can specify a port number on which the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive name-based virtual hosts should be used, e.g.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <example>
030108b1816bcda3d925df65357feabdce83bc94slive NameVirtualHost 111.22.33.44:8080
030108b1816bcda3d925df65357feabdce83bc94slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>IPv6 addresses must be enclosed in square brackets, as shown
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd in the following example:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd NameVirtualHost [fe80::a00:20ff:fea7:ccea]:8080
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>To receive requests on all interfaces, you can use an argument of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>*</code></p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost *
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Argument to <directive type="section">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive</title>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note that the argument to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">VirtualHost</directive> directive must
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive exactly match the argument to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >NameVirtualHost</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive NameVirtualHost 1.2.3.4<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost 1.2.3.4&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/VirtualHost&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</usage>
1597043cec6ad37fa4154bf09b0fccdabed1a239slive
1597043cec6ad37fa4154bf09b0fccdabed1a239slive<seealso><a href="/vhosts/">Virtual Hosts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedocumentation</a></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<name>Options</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures what features are available in a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedirectory</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Options
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Options All</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>Options</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Options</directive> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><var>option</var> can be set to <code>None</code>, in which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive case none of the extra features are enabled, or one or more of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>All</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>All options except for <code>MultiViews</code>. This is the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ExecCGI</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>FollowSymLinks</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will follow symbolic links in this directory.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Even though the server follows the symlink it does <em>not</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive change the pathname used to match against <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note also, that this option <strong>gets ignored</strong> if set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive inside a <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Includes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes are permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>IncludesNOEXEC</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes are permitted, but the <code>#exec cmd</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>#exec cgi</code> are disabled. It is still possible to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>#include virtual</code> CGI scripts from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ScriptAlias</directive>e'd directories.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Indexes</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive there is no <directive>DirectoryIndex</directive> (<em>e.g.</em>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>index.html</code>) in that directory, then the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive return a formatted listing of the directory.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>MultiViews</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "MultiViews" are allowed.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>SymLinksIfOwnerMatch</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will only follow symbolic links for which the target
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive file or directory is owned by the same user id as the link.<br
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /> <strong>Note</strong>: this option gets ignored if set inside
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen a <directive module="core" type="section">Location</directive>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen section.</dd>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen </dl>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Normally, if multiple <directive>Options</directive> could apply to a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory, then the most specific one is taken complete; the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd options are not merged. However if <em>all</em> the options on
8b052d682204371decc64f942aede5ef1da98955erikabele the <directive>Options</directive> directive are preceded by a
8b052d682204371decc64f942aede5ef1da98955erikabele <code>+</code> or <code>-</code>
8b052d682204371decc64f942aede5ef1da98955erikabele symbol, the options are merged. Any options preceded by a <code>+</code>
8b052d682204371decc64f942aede5ef1da98955erikabele are added to the options currently in force, and any options
8b052d682204371decc64f942aede5ef1da98955erikabele preceded by a <code>-</code> are removed from the options currently in
8b052d682204371decc64f942aede5ef1da98955erikabele force. </p>
8b052d682204371decc64f942aede5ef1da98955erikabele
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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele &lt;Directory /web/docs/spec&gt;<br />
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>then only <code>Includes</code> will be set for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/web/docs/spec</code> directory. However if the second
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Options</directive> directive uses the <code>+</code> and
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>-</code> symbols:</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &lt;Directory /web/docs&gt;<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /web/docs/spec&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive Options +Includes -Indexes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd &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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Using <code>-IncludesNOEXEC</code> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </note>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The default in the absence of any other settings is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>All</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>Require</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Selects which authenticated users can access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea resource</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Require <var>entity-name</var> [<var>entity-name</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<override>AuthConfig</override>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <p>This directive selects which authenticated users can access
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess a directory. The allowed syntaxes are:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dl>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <dt><code>Require user <var>userid</var> [<var>userid</var>]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Only the named users can access the resource.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require group <var>group-name</var> [<var>group-name</var>]
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ...</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>Only users in the named groups can access the resource.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Require valid-user</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>All valid users can access the resource.</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </dl>
fb77c505254b6e9c925e23e734463e87574f8f40kess
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><directive>Require</directive> must be accompanied by
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm <directive module="core">AuthName</directive> and <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">AuthType</directive> directives, and directives such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <directive module="mod_authn_file">AuthUserFile</directive>
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen and <directive module="mod_authz_groupfile">AuthGroupFile</directive> (to
fb77c505254b6e9c925e23e734463e87574f8f40kess define users and groups) in order to work correctly. Example:</p>
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AuthType Basic<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd AuthName "Restricted Directory"<br />
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen AuthUserFile /web/users<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess AuthGroupFile /web/groups<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess Require group admin
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Access controls which are applied in this way are effective for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <strong>all</strong> methods. <strong>This is what is normally
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd desired.</strong> If you wish to apply access controls only to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specific methods, while leaving other methods unprotected, then
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd place the <directive>Require</directive> statement into a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core" type="section">Limit</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd section.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">Satisfy</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><module>mod_authz_host</module></seealso>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive</directivesynopsis>
3386d67e54f92fdf6a3ffc5f7f8081eed6c44badslive
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<name>RLimitCPU</name>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>All</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit should
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>CPU resource limits are expressed in seconds per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive<name>RLimitMEM</name>
13e5182a0c199ecc7a73db97b6448a544e940868slive<description>Limits the memory consumption of processes launched
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveby Apache children</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<override>All</override>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Takes 1 or 2 parameters. The first parameter sets the soft
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd resource limit for all processes and the second parameter sets
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the maximum resource limit. Either parameter can be a number,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <code>max</code> to indicate to the server that the limit should
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd be set to the maximum allowed by the operating system
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive configuration. Raising the maximum resource limit requires that
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive the server is running as <code>root</code>, or in the initial startup
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive phase.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
13e5182a0c199ecc7a73db97b6448a544e940868slive logs.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Memory resource limits are expressed in bytes per
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitCPU</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<directivesynopsis>
b00583f8e126bbb00b06dcf06af06c9d07978701kess<name>RLimitNPROC</name>
13e5182a0c199ecc7a73db97b6448a544e940868slive<description>Limits the number of processes that can be launched by
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveprocesses launched by Apache children</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Unset; uses operating system defaults</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess<context>directory</context><context>.htaccess</context></contextlist>
13e5182a0c199ecc7a73db97b6448a544e940868slive<override>All</override>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<usage>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>Takes 1 or 2 parameters. The first parameter sets the soft
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive resource limit for all processes and the second parameter sets
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the maximum resource limit. Either parameter can be a number,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>max</code> to indicate to the server that the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive should be set to the maximum allowed by the operating system
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
13e5182a0c199ecc7a73db97b6448a544e940868slive the server is running as <code>root</code>, or in the initial startup
13e5182a0c199ecc7a73db97b6448a544e940868slive phase.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This applies to processes forked off from Apache children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache children themselves. This
13e5182a0c199ecc7a73db97b6448a544e940868slive includes CGI scripts and SSI exec commands, but not any
13e5182a0c199ecc7a73db97b6448a544e940868slive processes forked off from the Apache parent such as piped
13e5182a0c199ecc7a73db97b6448a544e940868slive logs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>Process limits control the number of processes per user.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <note><title>Note</title>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive <p>If CGI processes are <strong>not</strong> running
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive under userids other than the web server userid, this directive
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive will limit the number of processes that the server itself can
13e5182a0c199ecc7a73db97b6448a544e940868slive create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong><code>cannot fork</code></strong> messages in the
13e5182a0c199ecc7a73db97b6448a544e940868slive <code>error_log</code>.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive </note>
13e5182a0c199ecc7a73db97b6448a544e940868slive</usage>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><directive module="core">RLimitMEM</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><directive module="core">RLimitCPU</directive></seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive
13e5182a0c199ecc7a73db97b6448a544e940868slive<directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive<name>Satisfy</name>
13e5182a0c199ecc7a73db97b6448a544e940868slive<description>Interaction between host-level access control and
13e5182a0c199ecc7a73db97b6448a544e940868sliveuser authentication</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Satisfy Any|All</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>Satisfy All</default>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen<contextlist><context>directory</context><context>.htaccess</context>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen</contextlist>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen<override>AuthConfig</override>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen<usage>
3b9c7ec844aa240622a33735d1b9cbac4232e268rbowen <p>Access policy if both <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="mod_authz_host">Allow</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> used. The parameter can be
130d299c4b2b15be45532a176604c71fdc7bea5bnd either <code>All</code> or <code>Any</code>. This directive is only
130d299c4b2b15be45532a176604c71fdc7bea5bnd useful if access to a particular area is being restricted by both
130d299c4b2b15be45532a176604c71fdc7bea5bnd username/password <em>and</em> client host address. In this case
130d299c4b2b15be45532a176604c71fdc7bea5bnd the default behavior (<code>All</code>) is to require that the client
130d299c4b2b15be45532a176604c71fdc7bea5bnd passes the address access restriction <em>and</em> enters a valid
130d299c4b2b15be45532a176604c71fdc7bea5bnd username and password. With the <code>Any</code> option the client will be
130d299c4b2b15be45532a176604c71fdc7bea5bnd granted access if they either pass the host restriction or enter a
130d299c4b2b15be45532a176604c71fdc7bea5bnd valid username and password. This can be used to password restrict
130d299c4b2b15be45532a176604c71fdc7bea5bnd an area, but to let clients from particular addresses in without
130d299c4b2b15be45532a176604c71fdc7bea5bnd prompting for a password.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example, if you wanted to let people on your network have
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd unrestricted access to a portion of your website, but require that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive people outside of your network provide a password, you could use a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration similar to the following:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess <example>
fb77c505254b6e9c925e23e734463e87574f8f40kess Require valid-user<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow from 192.168.1<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Satisfy Any
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd</usage>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <seealso><directive module="mod_authz_host">Allow</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <seealso><directive module="core">Require</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<name>ScriptInterpreterSource</name>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Technique for locating the interpreter for CGI
130d299c4b2b15be45532a176604c71fdc7bea5bndscripts</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ScriptInterpreterSource Script</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<override>FileInfo</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess<compatibility>Win32 only<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessoption <code>Registry-Strict</code> is available in Apache 2.0 and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkesslater</compatibility>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. The default technique is to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive use the interpreter pointed to by the <code>#!</code> line in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive script.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Setting <code>ScriptInterpreterSource Registry</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause the Windows Registry to be searched using the script file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive extension (e.g., <code>.pl</code>) as a search key.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The option <code>Registry-Strict</code> which is new in Apache 2.0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive does the same as <code>Registry</code> but uses a more strict registry
ef8e89e090461194ecadd31e8796a2c51e0531a2kess search.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</directivesynopsis>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The <directive>ServerAdmin</directive> sets the e-mail address
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that the server includes in any error messages it returns to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client.</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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server!</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerAlias</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Alternate names for a host used when matching requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto name-virtual hosts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>virtual host</context></contextlist>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAlias</directive> directive sets the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele alternate names for a host, for use with <a
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost *&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName server.domain.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAlias server server2.domain.com server2<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd # ...<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerName</directive> directive sets the hostname and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive port that the server uses to identify itself. This is used when
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess creating redirection URLs. For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the webserver is <code>simple.example.com</code>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd but the machine also has the DNS alias <code>www.example.com</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and you wish the webserver to be so identified, the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive should be used:</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName www.example.com:80
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If no <directive>ServerName</directive> is specified, then the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server attempts to deduce the hostname by performing a reverse
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servername, then the server will use the port from the incoming
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request. For optimal reliability and predictability, you should
ef8e89e090461194ecadd31e8796a2c51e0531a2kess specify an explicit hostname and port using the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>ServerName</directive> directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If you are using <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive>ServerName</directive> inside a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section specifies what hostname must appear in the request's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the description of the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive module="core">UseCanonicalName</directive> directive for
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess settings which determine whether self-referential URL's (e.g., by the
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick <module>mod_dir</module> module) will refer to the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess specified port, or to the port number given in the client's request.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">NameVirtualHost</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerAlias</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<name>ServerPath</name>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Legacy URL pathname for a name-based virtual host that
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabeleis accessed by an incompatible browser</description>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<syntax>ServerPath <var>URL-path</var></syntax>
003f0c9fda6664daf5092a0e42f65ede20098153slive<contextlist><context>virtual host</context></contextlist>
18831446030f4eda7e0563c92a896ccfdb6eb1d7slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<usage>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The <directive>ServerPath</directive> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess</directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<directivesynopsis>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<name>ServerRoot</name>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<description>Base directory for the server installation</description>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<syntax>ServerRoot <var>directory-path</var></syntax>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<default>ServerRoot /usr/local/apache</default>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<contextlist><context>server config</context></contextlist>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<usage>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <p>The <directive>ServerRoot</directive> directive sets the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess directory in which the server lives. Typically it will contain the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess subdirectories <code>conf/</code> and <code>logs/</code>. Relative
fb77c505254b6e9c925e23e734463e87574f8f40kess paths for other configuration files are taken as relative to this
fb77c505254b6e9c925e23e734463e87574f8f40kess directory.</p>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <example><title>Example</title>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess ServerRoot /home/httpd
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </example>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</usage>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess<seealso><a href="/invoking.html">the <code>-d</code>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess option to <code>httpd</code></a></seealso>
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki<seealso><a href="/misc/security_tips.html#serverroot">the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive security tips</a> for information on how to properly set
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive permissions on the <directive>ServerRoot</directive></seealso>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</directivesynopsis>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<directivesynopsis>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<name>ServerSignature</name>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<description>Configures the footer on server-generated documents</description>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<syntax>ServerSignature On|Off|EMail</syntax>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<default>ServerSignature Off</default>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<contextlist><context>server config</context><context>virtual host</context>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<context>directory</context><context>.htaccess</context>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive</contextlist>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess<override>All</override>
fb77c505254b6e9c925e23e734463e87574f8f40kess
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive<usage>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <p>The <directive>ServerSignature</directive> directive allows the
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive configuration of a trailing footer line under server-generated
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive documents (error messages, <module>mod_proxy</module> ftp directory
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive listings, <module>mod_info</module> output, ...). The reason why you
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive would want to enable such a footer line is that in a chain of proxies,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the user often has no possibility to tell which of the chained servers
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive actually produced a returned error message.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <code>Off</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting, which is the default, suppresses the footer line (and is
003f0c9fda6664daf5092a0e42f65ede20098153slive therefore compatible with the behavior of Apache-1.2 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive below). The <code>On</code> setting simply adds a line with the
2e5e2673cb64d3e4d445d911c6f61ac171020725nd server version number and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerName</directive> of the serving virtual host,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and the <code>EMail</code> setting additionally creates a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "mailto:" reference to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerAdmin</directive> of the referenced
2e5e2673cb64d3e4d445d911c6f61ac171020725nd document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
733738e83a9b0113476e3f67992c2278d61ee4dakess <p>After version 2.0.44, the details of the server version number
733738e83a9b0113476e3f67992c2278d61ee4dakess presented are controlled by the <directive
2e5e2673cb64d3e4d445d911c6f61ac171020725nd module="core">ServerTokens</directive> directive.</p>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</usage>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<seealso><directive module="core">ServerTokens</directive></seealso>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</directivesynopsis>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd
2e5e2673cb64d3e4d445d911c6f61ac171020725nd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>ServerTokens</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Configures the <code>Server</code> HTTP response
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndheader</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<default>ServerTokens Full</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
003f0c9fda6664daf5092a0e42f65ede20098153slive <dl>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Prod[uctOnly]</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Major</code></dt>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin <dd>Server sends (<em>e.g.</em>): <code>Server:
0e4c8b384f21029c01f06824ec522bb2cbec1d0enoirin Apache/2</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>ServerTokens Minor</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>Server sends (<em>e.g.</em>): <code>Server:
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache/2.0</code></dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dt><code>ServerTokens Min[imal]</code></dt>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>Server sends (<em>e.g.</em>): <code>Server:
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
003f0c9fda6664daf5092a0e42f65ede20098153slive (Unix)</code></dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
e08ad1a326852610a7930269638a43657fc50d06sctemme <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enabled or disabled on a virtualhost-by-virtualhost basis.</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>After version 2.0.44, this directive also controls the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information presented by the <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">ServerSignature</directive> directive.</p>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerSignature</directive></seealso>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<name>SetHandler</name>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Forces all matching files to be processed by a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndhandler</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>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
e08ad1a326852610a7930269638a43657fc50d06sctemme<override>FileInfo</override>
e08ad1a326852610a7930269638a43657fc50d06sctemme<compatibility>Moved into the core in Apache 2.0</compatibility>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme<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
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>.htaccess</code> file in that directory:</p>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <example>
e08ad1a326852610a7930269638a43657fc50d06sctemme SetHandler imap-file
e08ad1a326852610a7930269638a43657fc50d06sctemme </example>
e08ad1a326852610a7930269638a43657fc50d06sctemme
e08ad1a326852610a7930269638a43657fc50d06sctemme <p>Another example: if you wanted to have the server display a
e08ad1a326852610a7930269638a43657fc50d06sctemme status report whenever a URL of
e08ad1a326852610a7930269638a43657fc50d06sctemme <code>http://servername/status</code> was called, you might put
e08ad1a326852610a7930269638a43657fc50d06sctemme the following into <code>httpd.conf</code>:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim <example>
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim &lt;Location /status&gt;<br />
e08ad1a326852610a7930269638a43657fc50d06sctemme <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Location&gt;
e08ad1a326852610a7930269638a43657fc50d06sctemme </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can override an earlier defined <directive>SetHandler</directive>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess directive by using the value <code>None</code>.</p>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetInputFilter</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveinput</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<override>FileInfo</override>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>SetInputFilter</directive> directive sets the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filter or filters which will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive input when they are received by the server. This is in addition to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
003f0c9fda6664daf5092a0e42f65ede20098153slive content.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>SetOutputFilter</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</description>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen<contextlist><context>server config</context><context>virtual host</context>
fcc04773f0f2cc73650485facef9cd77f2d5bd65nd<context>directory</context><context>.htaccess</context>
7228d3b2eebddc214348190bcc62d80b5e7087e2rbowen</contextlist>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen<override>FileInfo</override>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<usage>
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <p>The <directive>SetOutputFilter</directive> directive sets the filters
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen which will process responses from the server before they are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent to the client. This is in addition to any filters defined
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_mime">AddOutputFilter</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the <code>/www/data/</code> directory for server-side
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;Directory /www/data/&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetOutputFilter INCLUDES<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/Directory&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
003f0c9fda6664daf5092a0e42f65ede20098153slive
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>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><a href="/filter.html">Filters</a> documentation</seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<name>TimeOut</name>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<description>Amount of time the server will wait for
ef8e89e090461194ecadd31e8796a2c51e0531a2kesscertain events before failing a request</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax>TimeOut <var>seconds</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>TimeOut 300</default>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>The <directive>TimeOut</directive> directive currently defines
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the amount of time Apache will wait for three things:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <ol>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz <li>The total amount of time it takes to receive a GET
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz request.</li>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <li>The amount of time between receipt of TCP packets on a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive POST or PUT request.</li>
f35c904c3b359610a46e94fbb4ba8495b2338521slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The amount of time between ACKs on transmissions of TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive packets in responses.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </ol>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>We plan on making these separately configurable at some point
ef8e89e090461194ecadd31e8796a2c51e0531a2kess down the road. The timer used to default to 1200 before 1.2,
fb77c505254b6e9c925e23e734463e87574f8f40kess but has been lowered to 300 which is still far more than
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive necessary in most situations. It is not set any lower by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default because there may still be odd places in the code where
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the timer is not reset when a packet is sent. </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>UseCanonicalName</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures how the server determines its own name and
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveport</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>UseCanonicalName On|Off|DNS</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>UseCanonicalName On</default>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<contextlist><context>server config</context><context>virtual host</context>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<context>directory</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh<usage>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <p>In many situations Apache must construct a <em>self-referential</em>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh URL -- that is, a URL that refers back to the same server. With
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <code>UseCanonicalName On</code> Apache will use the hostname and port
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh specified in the <directive module="core">ServerName</directive>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh directive to construct the canonical name for the server. This name
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh is used in all self-referential URLs, and for the values of
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <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
530eba85dbd41b8a0fa5255d3648d1440199a661slive canonical name, as defined above). These values are the same
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh that are used to implement <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name based virtual hosts</a>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh constructed from the client supplied values as well.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh type a shortname, and a URL which is a directory, such as
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh <code>http://www/splat</code>, <em>without the trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authenticate twice (once for <code>www</code> and once again
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz for <code>www.domain.com</code> -- see <a
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive FAQ on this subject for more information</a>). But if
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <directive>UseCanonicalName</directive> is set <code>Off</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache will redirect to <code>http://www/splat/</code>.</p>
f35c904c3b359610a46e94fbb4ba8495b2338521slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>There is a third option, <code>UseCanonicalName DNS</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which is intended for use with mass IP-based virtual hosting to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive support ancient clients that do not provide a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header. With this option Apache does a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Warning</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If CGIs make assumptions about the values of <code>SERVER_NAME</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive they may be broken by this option. The client is essentially free
003f0c9fda6664daf5092a0e42f65ede20098153slive to give whatever value they want as a hostname. But if the CGI is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only using <code>SERVER_NAME</code> to construct self-referential URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive then it should be just fine.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">ServerName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mpm_common">Listen</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis type="section">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>VirtualHost</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply only to a specific
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehostname or IP address</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>&lt;VirtualHost
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ...&gt; ... &lt;/VirtualHost&gt;</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">VirtualHost</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>&lt;/VirtualHost&gt;</code> are used to enclose a group of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directives that will apply only to a particular virtual host. Any
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen directive that is allowed in a virtual host context may be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd used. When the server receives a request for a document on a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd particular virtual host, it uses the configuration directives
130d299c4b2b15be45532a176604c71fdc7bea5bnd enclosed in the <directive type="section">VirtualHost</directive>
130d299c4b2b15be45532a176604c71fdc7bea5bnd section. <var>Addr</var> can be:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <ul>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <li>The IP address of the virtual host;</li>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <li>A fully qualified domain name for the IP address of the
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd virtual host;</li>
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq <li>The character <code>*</code>, which is used only in combination with
9f1dd1339447bf4b291682cd94bf9f28bc2685e0niq <code>NameVirtualHost *</code> to match all IP addresses; or</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen <li>The string <code>_default_</code>, which is used only
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen with IP virtual hosting to catch unmatched IP addresses.</li>
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen </ul>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example><title>Example</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost 10.1.2.3&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DocumentRoot /www/docs/host.foo.com<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ServerName host.foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog logs/host.foo.com-error_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive TransferLog logs/host.foo.com-access_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
003f0c9fda6664daf5092a0e42f65ede20098153slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the optional port number could not be determined otherwise. An
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive IPv6 example is shown below:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;VirtualHost [fe80::a00:20ff:fea7:ccea]&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DocumentRoot /www/docs/host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerName host.example.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorLog logs/host.example.com-error_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive TransferLog logs/host.example.com-access_log<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </indent>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/VirtualHost&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Each Virtual Host must correspond to a different IP address,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd different port number or a different host name for the server,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the former case the server machine must be configured to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accept IP packets for multiple addresses. (If the machine does
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not have multiple network interfaces, then this can be
003f0c9fda6664daf5092a0e42f65ede20098153slive accomplished with the <code>ifconfig alias</code> command -- if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The use of <directive type="section">VirtualHost</directive> does
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>not</strong> affect what addresses Apache listens on. You
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive may need to ensure that Apache is listening on the correct addresses
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using <directive module="mpm_common">Listen</directive>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When using IP-based virtual hosting, the special name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>_default_</code> can be specified in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which case this virtual host will match any IP address that is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd not explicitly listed in another virtual host. In the absence
130d299c4b2b15be45532a176604c71fdc7bea5bnd of any <code>_default_</code> virtual host the "main" server config,
130d299c4b2b15be45532a176604c71fdc7bea5bnd consisting of all those definitions outside any VirtualHost
130d299c4b2b15be45532a176604c71fdc7bea5bnd section, is used when no IP-match occurs. (But note that any IP
130d299c4b2b15be45532a176604c71fdc7bea5bnd address that matches a <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">NameVirtualHost</directive> directive will use neither
130d299c4b2b15be45532a176604c71fdc7bea5bnd the "main" server config nor the <code>_default_</code> virtual host.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd See the <a href="/vhosts/name-based.html">name-based virtual hosting</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation for further details.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can specify a <code>:port</code> to change the port that is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matched. If unspecified then it defaults to the same port as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive most recent <directive module="mpm_common">Listen</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive statement of the main server. You may also specify <code>:*</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to match all ports on that address. (This is recommended when used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with <code>_default_</code>.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note type="warning"><title>Security</title>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>See the <a href="/misc/security_tips.html">security tips</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document for details on why your security could be compromised if the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directory where logfiles are stored is writable by anyone other
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive than the user that starts the server.</p>
fa71303e53e7ef460728446b8290d05ed0895136trawick </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</usage>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/bind.html">Setting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which addresses and ports Apache uses</a></seealso>
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</modulesynopsis>