core.xml revision 88d86cfadffe2275a3dfb67a4d7bdc018630b661
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Configures optimizations for a Protocol's Listener Sockets</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<syntax>AcceptFilter <var>protocol</var> <var>accept_filter</var></syntax>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<contextlist><context>server config</context></contextlist>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<compatibility>Available in Apache httpd 2.1.5 and later.
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenOn Windows from Apache httpd 2.3.3 and later.</compatibility>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <p>This directive enables operating system specific optimizations for a
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic listening socket by the Protocol type. The basic premise is for the
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic kernel to not send a socket to the server process until either data
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic is received or an entire HTTP Request is buffered. Only
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic <a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor FreeBSD's Accept Filters</a>, Linux's more primitive
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <code>TCP_DEFER_ACCEPT</code>, and Windows' optimized AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe are currently supported.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Using <code>none</code> for an argument will disable any accept filters
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe for that protocol. This is useful for protocols that require a server
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe send data first, such as <code>ftp:</code> or <code>nntp</code>:</p>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier AcceptFilter http httpready <br/>
4e9f8c5414e5fe39b5393641533edca65f6e8b91poirier AcceptFilter https dataready
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The <code>httpready</code> accept filter buffers entire HTTP requests at
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna the kernel level. Once an entire request is received, the kernel then
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna sends it to the server. See the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna accf_http(9)</a> man page for more details. Since HTTPS requests are
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor encrypted only the <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor AcceptFilter http data <br/>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter https data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Linux's <code>TCP_DEFER_ACCEPT</code> does not support buffering http
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna requests. Any value besides <code>none</code> will enable
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>TCP_DEFER_ACCEPT</code> on that listener. For more details
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna see the Linux
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor AcceptFilter http data <br/>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna AcceptFilter https data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe API, and does not support http protocol buffering. There are two values
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe which utilize the Windows AcceptEx() API and will recycle network
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe sockets between connections. <code>data</code> waits until data has
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe been transmitted as documented above, and the initial data buffer and
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network endpoint addresses are all retrieved from the single AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe invocation. <code>connect</code> will use the AcceptEx() API, also
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe retrieve the network endpoint addresses, but like <code>none</code>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe the <code>connect</code> option does not wait for the initial data
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe transmission.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>On Windows, <code>none</code> uses accept() rather than than AcceptEx()
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe and will not recycle sockets between connections. This is useful for
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network adapters with broken driver support, as well as some virtual
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe network providers such as vpn drivers, or spam, virus or spyware
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe filters.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe</directivesynopsis>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe<directivesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<description>Resources accept trailing pathname information</description>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<context>virtual host</context><context>directory</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<compatibility>Available in Apache httpd 2.0.30 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele non-existent file in an existing directory) will be accepted or
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen rejected. The trailing pathname information can be made
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive available to scripts in the <code>PATH_INFO</code> environment
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive variable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AcceptPathInfo</directive> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Off</code></dt><dd>A request will only be accepted if it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive maps to a literal path that exists. Therefore a request with
fb77c505254b6e9c925e23e734463e87574f8f40kess trailing pathname information after the true filename such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html/more</code> in the above example will return
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a 404 NOT FOUND error.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>On</code></dt><dd>A request will be accepted if a
fb77c505254b6e9c925e23e734463e87574f8f40kess leading path component maps to a file that exists. The above
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>Default</code></dt><dd>The treatment of requests with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive trailing pathname information is determined by the <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="/handler.html">handler</a> responsible for the request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The core handler for normal files defaults to rejecting
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>PATH_INFO</code> requests. Handlers that serve scripts, such as <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="mod_isapi.html">isapi-handler</a>, generally accept
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The primary purpose of the <code>AcceptPathInfo</code>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess directive is to allow you to override the handler's choice of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accepting or rejecting <code>PATH_INFO</code>. This override is required,
bc4b55ec8f31569d606d5680d50189a355bcd7a6rbowen for example, when you use a <a href="/filter.html">filter</a>, such
fb77c505254b6e9c925e23e734463e87574f8f40kess as <a href="mod_include.html">INCLUDES</a>, to generate content
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive based on <code>PATH_INFO</code>. The core handler would usually reject
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the request, so you can use the following configuration to enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such a script:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess Options +Includes<br />
fb77c505254b6e9c925e23e734463e87574f8f40kess SetOutputFilter INCLUDES<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AcceptPathInfo On<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Files>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Name of the distributed configuration file</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>AccessFileName <var>filename</var> [<var>filename</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>While processing a request the server looks for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration files are <a href="#allowoverride">enabled for that
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess AccessFileName .acl
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>before returning the document
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/usr/local/web/index.html</code>, the server will read
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd for directives, unless they have been disabled with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><directive module="core">AllowOverride</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/configuring.html">Configuration Files</a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default charset parameter to be added when a response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecontent-type is <code>text/plain</code> or <code>text/html</code></description>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen<syntax>AddDefaultCharset On|Off|<var>charset</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>This directive specifies a default value for the media type
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive charset parameter (the name of a character encoding) to be added
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to a response if and only if the response's content-type is either
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>text/plain</code> or <code>text/html</code>. This should override
003f0c9fda6664daf5092a0e42f65ede20098153slive any charset specified in the body of the response via a <code>META</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive element, though the exact behavior is often dependent on the user's client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. A setting of <code>AddDefaultCharset Off</code>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding disables this functionality. <code>AddDefaultCharset On</code> enables
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding a default charset of <code>iso-8859-1</code>. Any other value is assumed
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding to be the <var>charset</var> to be used, which should be one of the
684f2a9a422185adda0692a1203c5ad6687fc5c5nd <a href="http://www.iana.org/assignments/character-sets">IANA registered
a8ce9095d102e43fecb81093a132b90b9a227f78kess charset values</a> for use in Internet media types (MIME types).
684f2a9a422185adda0692a1203c5ad6687fc5c5nd For example:</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding AddDefaultCharset utf-8
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p><directive>AddDefaultCharset</directive> should only be used when all
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding of the text resources to which it applies are known to be in that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive character encoding and it is too inconvenient to label their charset
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd individually. One such example is to add the charset parameter
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to resources containing generated content, such as legacy CGI
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd scripts, that might be vulnerable to cross-site scripting attacks
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding due to user-provided data being included in the output. Note, however,
684f2a9a422185adda0692a1203c5ad6687fc5c5nd that a better solution is to just fix (or delete) those scripts, since
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding setting a default charset does not protect users that have enabled
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding the "auto-detect character encoding" feature on their browser.</p>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<seealso><directive module="mod_mime">AddCharset</directive></seealso>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding</directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<directivesynopsis>
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<description>assigns an output filter to a particular media-type</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AddOutputFilterByType <var>filter</var>[;<var>filter</var>...]
843a03fe0b138a4c1f64cb90a014e9417ac30691fielding<var>media-type</var> [<var>media-type</var>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
9583adab6bc4b3758e41963c905d9dad9f067131nd<compatibility>Available in Apache httpd 2.0.33 and later; deprecated in Apache httpd 2.1 and later</compatibility>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd href="/filter.html">filter</a> for a request depending on the
77ead9e0262e4f08ec336d1a65b2edef7705c839nd response <glossary>media-type</glossary>. Because of certain
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier problems discussed below, this directive is deprecated. The same
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier functionality is available using <module>mod_filter</module>.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The following example uses the <code>DEFLATE</code> filter, which
77ead9e0262e4f08ec336d1a65b2edef7705c839nd is provided by <module>mod_deflate</module>. It will compress all
77ead9e0262e4f08ec336d1a65b2edef7705c839nd output (either static or dynamic) which is labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>text/html</code> or <code>text/plain</code> before it is sent
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier to the client.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <p>If you want the content to be processed by more than one filter, their
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier names have to be separated by semicolons. It's also possible to use one
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <directive>AddOutputFilterByType</directive> directive for each of
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier these filters.</p>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <p>The configuration below causes all script output labeled as
77ead9e0262e4f08ec336d1a65b2edef7705c839nd <code>INCLUDES</code> filter and then by the <code>DEFLATE</code>
77ead9e0262e4f08ec336d1a65b2edef7705c839nd filter.</p>
3770ed746d69c7a4111cba9966169bd5d7a509a6poirier <Location /cgi-bin/><br />
77ead9e0262e4f08ec336d1a65b2edef7705c839nd Options Includes<br />
77ead9e0262e4f08ec336d1a65b2edef7705c839nd </Location>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>Enabling filters with <directive>AddOutputFilterByType</directive>
fb77c505254b6e9c925e23e734463e87574f8f40kess may fail partially or completely in some cases. For example, no
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filters are applied if the <glossary>media-type</glossary> could not
4ea161d94782fa56f4b36d496f35ff8577c43065covener be determined. If you want to make sure that the filters will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive applied, assign the content type to a resource explicitly; for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, with <directive module="mod_mime">AddType</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">ForceType</directive>. Setting the
fb77c505254b6e9c925e23e734463e87574f8f40kess content type within a (non-nph) CGI script is also safe.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="mod_mime">AddOutputFilter</directive></seealso>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<seealso><directive module="core">SetOutputFilter</directive></seealso>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd</directivesynopsis>
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd<directivesynopsis>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<description>Determines whether encoded path separators in URLs are allowed to
10673857794a4b3d9568ca2d983722a87ed352f1rbowenbe passed through</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>server config</context><context>virtual host</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<compatibility>Available in Apache httpd 2.0.46 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>AllowEncodedSlashes</directive> directive allows URLs
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which contain encoded path separators (<code>%2F</code> for <code>/</code>
fb77c505254b6e9c925e23e734463e87574f8f40kess and additionally <code>%5C</code> for <code>\</code> on according systems)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to be used. Normally such URLs are refused with a 404 (Not found) error.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Turning <directive>AllowEncodedSlashes</directive> <code>On</code> is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mostly useful when used in conjunction with <code>PATH_INFO</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Allowing encoded slashes does <em>not</em> imply <em>decoding</em>.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Occurrences of <code>%2F</code> or <code>%5C</code> (<em>only</em> on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive according systems) will be left as such in the otherwise decoded URL
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive string.</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<seealso><directive module="core">AcceptPathInfo</directive></seealso>
9cd3b05d7b70f07a742bbaf548fa4fa2bdbe5ce6noodl</directivesynopsis>
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AllowOverride All|None|<var>directive-type</var>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<contextlist><context>directory</context></contextlist>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>When the server finds an <code>.htaccess</code> file (as
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding specified by <directive module="core">AccessFileName</directive>)
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding it needs to know which directives declared in that file can override
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding earlier configuration directives.</p>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <note><title>Only available in <Directory> sections</title>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive>AllowOverride</directive> is valid only in
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive type="section" module="core">Directory</directive>
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem sections specified without regular expressions, not in <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem type="section" module="core">Location</directive>, <directive
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem module="core" type="section">DirectoryMatch</directive> or
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <directive type="section" module="core">Files</directive> sections.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>When this directive is set to <code>None</code>, then
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <a href="#accessfilename">.htaccess</a> files are completely ignored.
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem In this case, the server will not even attempt to read
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem <p>When this directive is set to <code>All</code>, then any
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem directive which has the .htaccess <a
5528d1a30ae8560e2d7a96d734ffe31500dc6113rpluem href="directive-dict.html#Context">Context</a> is allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>directive-type</var> can be one of the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive groupings of directives.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the authorization directives (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_dbm">AuthDBMUserFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authz_groupfile">AuthGroupFile</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_core">AuthName</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_authn_core">AuthType</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authn_file">AuthUserFile</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_authz_core">Require</directive>, <em>etc.</em>).</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Allow use of the directives controlling document types
9ed9eaf871c58d281af02e76125ceadb5060afa5nd <directive module="mod_negotiation">LanguagePriority</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">SetOutputFilter</directive>, and
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna <module>mod_mime</module> Add* and Remove* directives),
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document meta data (<directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_headers">RequestHeader</directive>, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="mod_setenvif">SetEnvIf</directive>, <directive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna module="mod_setenvif">SetEnvIfNoCase</directive>, <directive
103a93c625bcde1a6a7a5155b64dcda36f612180pquerna module="mod_setenvif">BrowserMatch</directive>, <directive
f23fb63b05f89f47d7a3099491f2c68dcce432e9kess module="mod_usertrack">CookieExpires</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_usertrack">CookieDomain</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_usertrack">CookieStyle</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_usertrack">CookieTracking</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_rewrite">RewriteEngine</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_rewrite">RewriteOptions</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_rewrite">RewriteBase</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener module="mod_rewrite">RewriteCond</directive>, <directive
9970ad80054f477c708284a0d030a5bd26e412a9covener <directive module="mod_actions">Action</directive> from
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Allow use of the directives controlling directory indexing
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd (<directive
b12b918ae6baf9c5762ed61b7393d0e2198378c0nd <directive module="mod_autoindex">AddIcon</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen <directive module="mod_autoindex">AddIconByType</directive>,
da637bcae7b6e150470e701af29da5604a34a17erbowen <directive module="mod_autoindex">DefaultIcon</directive>, <directive
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor module="mod_dir">DirectoryIndex</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_autoindex">FancyIndexing</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_autoindex">HeaderName</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_autoindex">IndexIgnore</directive>, <directive
da637bcae7b6e150470e701af29da5604a34a17erbowen module="mod_autoindex">IndexOptions</directive>, <directive
86120957a14f91da0a1a103eaf4d7710b1dd9e2asf Allow use of the directives controlling host access (<directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri module="mod_authz_host">Deny</directive> and <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri Allow use of the directives controlling specific directory
113961f0559eb026ea0d379cb7350f82bc09d710druggeri features (<directive module="core">Options</directive> and
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <directive module="mod_include">XBitHack</directive>).
113961f0559eb026ea0d379cb7350f82bc09d710druggeri An equal sign may be given followed by a comma (but no spaces)
113961f0559eb026ea0d379cb7350f82bc09d710druggeri separated lists of options that may be set using the <directive
113961f0559eb026ea0d379cb7350f82bc09d710druggeri AllowOverride AuthConfig Indexes
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>In the example above all directives that are neither in the group
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>AuthConfig</code> nor <code>Indexes</code> cause an internal
113961f0559eb026ea0d379cb7350f82bc09d710druggeri server error.</p>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <note><p>For security and performance reasons, do not set
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>AllowOverride</code> to anything other than <code>None</code>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri in your <code><Directory /></code> block. Instead, find (or
113961f0559eb026ea0d379cb7350f82bc09d710druggeri create) the <code><Directory></code> block that refers to the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri directory where you're actually planning to place a
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><directive module="core">AccessFileName</directive></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><a href="/configuring.html">Configuration Files</a></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<directivesynopsis>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<description>Technique for locating the interpreter for CGI
113961f0559eb026ea0d379cb7350f82bc09d710druggeriscripts</description>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<syntax>CGIMapExtension <var>cgi-path</var> <var>.extension</var></syntax>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri<contextlist><context>directory</context><context>.htaccess</context>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri</contextlist>
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <p>This directive is used to control how Apache httpd finds the
113961f0559eb026ea0d379cb7350f82bc09d710druggeri interpreter used to run CGI scripts. For example, setting
113961f0559eb026ea0d379cb7350f82bc09d710druggeri <code>CGIMapExtension sys:\foo.nlm .foo</code> will
113961f0559eb026ea0d379cb7350f82bc09d710druggeri cause all CGI script files with a <code>.foo</code> extension to
113961f0559eb026ea0d379cb7350f82bc09d710druggeri be passed to the FOO interpreter.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables the generation of <code>Content-MD5</code> HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheaders</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p>This directive enables the generation of
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code>Content-MD5</code> headers as defined in RFC1864
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen respectively RFC2616.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>MD5 is an algorithm for computing a "message digest"
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess (sometimes called "fingerprint") of arbitrary-length data, with
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess a high degree of confidence that any alterations in the data
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes will be reflected in alterations in the message digest.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess modification of the entity-body in transit. Example header:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive values are not cached).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><code>Content-MD5</code> is only sent for documents served
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the <module>core</module>, and not by any module. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI documents, output from CGI scripts, and byte range responses
5bb5fba250bf526bc51d13b25378d54acb93c1cbnoodl do not have this header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>This directive has no effect other than to emit warnings
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveif the value is not <code>none</code>. In prior versions, DefaultType
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewould specify a default media type to assign to response content for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewhich no other media type configuration could be found.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>The argument <code>none</code> is available in Apache httpd 2.2.7 and later. All other choices are DISABLED for 2.3.x and later.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive has been disabled. For backwards compatibility
fb77c505254b6e9c925e23e734463e87574f8f40kess of configuration files, it may be specified with the value
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>none</code>, meaning no default media type. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive DefaultType None
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding httpd-2.2.7 and later.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="mod_mime">AddType</directive> to configure media
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type assignments via file extensions, or the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <directive module="core">ForceType</directive> directive to configure
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding the media type for specific resources. Otherwise, the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive send the response without a Content-Type header field and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recipient may attempt to guess the media type.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Define the existence of a variable</description>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<contextlist><context>server config</context></contextlist>
e4881891552e185a7408318dfc7f62ebabe73cf6niq <p>Equivalent to passing the <code>-D</code> argument to <program
e4881891552e185a7408318dfc7f62ebabe73cf6niq <p>This directive can be used to toggle the use of <directive module="core"
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type="section">IfDefine</directive> sections without needing to alter
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <code>-D</code> arguments in any startup scripts.</p>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</directivesynopsis>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding<description>Enclose a group of directives that apply only to the
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fieldingnamed file-system directory and sub-directories</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive... </Directory></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <code></Directory></code> are used to enclose a group of
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf directives that will apply only to the named directory and
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf sub-directories of that directory. Any directive that is allowed
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl in a directory context may be used. <var>Directory-path</var> is
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl either the full path to a directory, or a wild-card string using
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf Unix shell-style matching. In a wild-card string, <code>?</code> matches
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf any single character, and <code>*</code> matches any sequences of
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf characters. You may also use <code>[]</code> character ranges. None
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf of the wildcards match a `/' character, so <code><Directory
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf /*/public_html></code> will not match
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <code>/home/user/public_html</code>, but <code><Directory
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf Options Indexes FollowSymLinks<br />
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf </Directory>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf </example>
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <p>Be careful with the <var>directory-path</var> arguments:
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf They have to literally match the filesystem path which Apache httpd uses
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf to access the files. Directives applied to a particular
141fd59714368d3bbe3a3d8f5b8dc8a516c48f9fsf <code><Directory></code> will not apply to files accessed from
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf that same directory via a different path, such as via different symbolic
cba8c0896ba04d42cf9a9e50df5040fd6bae14a4sf links.</p>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl expressions</glossary> can also be used, with the addition of the
898475b582dd849de5915df0f2089b72ed8b2e2bcovener <Directory ~ "^/www/.*/[0-9]{3}">
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in <code>/www/</code> that consisted of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive three numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive match the directory (or one of its parents) containing a document,
898475b582dd849de5915df0f2089b72ed8b2e2bcovener then the directives are applied in the order of shortest match
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor first, interspersed with the directives from the <a
898475b582dd849de5915df0f2089b72ed8b2e2bcovener href="#accessfilename">.htaccess</a> files. For example,
fb77c505254b6e9c925e23e734463e87574f8f40kess <Directory /><br />
fb77c505254b6e9c925e23e734463e87574f8f40kess AllowOverride None<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </Directory><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Directory /home/><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd AllowOverride FileInfo<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd </Directory>
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>for access to the document <code>/home/web/dir/doc.html</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the steps are:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>Apply directive <code>AllowOverride FileInfo</code> (for
030108b1816bcda3d925df65357feabdce83bc94slive <code>/home/.htaccess</code>, <code>/home/web/.htaccess</code> and
030108b1816bcda3d925df65357feabdce83bc94slive <code>/home/web/dir/.htaccess</code> in that order.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Regular expressions are not considered until after all of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd normal sections have been applied. Then all of the regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions are tested in the order they appeared in the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd configuration file. For example, with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory ~ abc$><br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess # ... directives here ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>the regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all normal <directive type="section">Directory</directive>s and
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code>.htaccess</code> files have been applied. Then the regular
130d299c4b2b15be45532a176604c71fdc7bea5bnd expression will match on <code>/home/abc/public_html/abc</code> and
130d299c4b2b15be45532a176604c71fdc7bea5bnd the corresponding <directive type="section">Directory</directive> will
130d299c4b2b15be45532a176604c71fdc7bea5bnd be applied.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <code><Directory /></code> is <code>Allow from All</code>.
cdffd1263801c18587cefdebc4510df486d5906brbowen This means that Apache httpd will serve any file mapped from an URL. It is
130d299c4b2b15be45532a176604c71fdc7bea5bnd recommended that you change this with a block such
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess href="/misc/security_tips.html">Security Tips</a> page for more
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The directory sections occur in the <code>httpd.conf</code> file.
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive type="section">Directory</directive> directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cannot nest, and cannot appear in a <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> or <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How <Directory>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location> and <Files> sections work</a> for an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive explanation of how these different sections are combined when a
130d299c4b2b15be45532a176604c71fdc7bea5bnd request is received</seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Enclose directives that apply to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndfile-system directories matching a regular expression and their
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesubdirectories</description>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess... </DirectoryMatch></syntax>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<contextlist><context>server config</context><context>virtual host</context>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">DirectoryMatch</directive> and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code></DirectoryMatch></code> are used to enclose a group
4e10c61d7f924071cad435df940a8f325015b2d3rbowen of directives which will apply only to the named directory and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen sub-directories of that directory, the same as <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">Directory</directive>. However, it
130d299c4b2b15be45532a176604c71fdc7bea5bnd <DirectoryMatch "^/www/(.+/)?[0-9]{3}">
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>would match directories in <code>/www/</code> that consisted of three
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive type="section" module="core">Directory</directive> for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea description of how regular expressions are mixed in with normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directive type="section">Directory</directive>s</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehref="/sections.html">How <Directory>, <Location> and
fb77c505254b6e9c925e23e734463e87574f8f40kess<Files> sections work</a> for an explanation of how these different
fb77c505254b6e9c925e23e734463e87574f8f40kesssections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Directory that forms the main document tree visible
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessfrom the web</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>DocumentRoot <var>directory-path</var></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<default>DocumentRoot /usr/local/apache/htdocs</default>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive sets the directory from which <program>httpd</program>
898475b582dd849de5915df0f2089b72ed8b2e2bcovener will serve files. Unless matched by a directive like <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="mod_alias">Alias</directive>, the server appends the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive path from the requested URL to the document root to make the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive path to the document. Example:</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>then an access to
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>http://www.my.host.com/index.html</code> refers to
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <code>/usr/web/index.html</code>. If the <var>directory-path</var> is
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener not absolute then it is assumed to be relative to the <directive
6954edc623ca2c179eb5b33e97e4304d06fd649frbowen <p>The <directive>DocumentRoot</directive> should be specified without
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a trailing slash.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/urlmapping.html#documentroot">Mapping URLs to Filesystem
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener</directivesynopsis>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<directivesynopsis>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<description>Use memory-mapping to read files during delivery</description>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<contextlist><context>server config</context><context>virtual host</context>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener<context>directory</context><context>.htaccess</context>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener</contextlist>
fa1c7ce09927decc1eecd1e9a35cc5331078a052covener <p>This directive controls whether the <program>httpd</program> may use
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-mapping if it needs to read the contents of a file during
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive delivery. By default, when the handling of a request requires
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive access to the data within a file -- for example, when delivering a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server-parsed file using <module>mod_include</module> -- Apache httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive memory-maps the file if the OS supports it.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This memory-mapping sometimes yields a performance improvement.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess But in some environments, it is better to disable the memory-mapping
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to prevent operational problems:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>On some multiprocessor systems, memory-mapping can reduce the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Deleting or truncating a file while <program>httpd</program>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd has it memory-mapped can cause <program>httpd</program> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive crash with a segmentation fault.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For server configurations that are vulnerable to these problems,
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd you should disable memory-mapping of delivered files by specifying:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess EnableMMAP Off
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For NFS mounted files, this feature may be disabled explicitly for
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the offending files by specifying:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory "/path-to-nfs-files">
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor EnableMMAP Off
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
1b01d1ee11c612226cb3141eed4581dc179266c1rbowen<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Use the kernel sendfile support to deliver files to the client</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<compatibility>Available in version 2.0.44 and later</compatibility>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive controls whether <program>httpd</program> may use the
6b15044d54a096e6323ff1540f1a491e8de7622dsf sendfile support from the kernel to transmit file contents to the client.
6b15044d54a096e6323ff1540f1a491e8de7622dsf By default, when the handling of a request requires no access
6b15044d54a096e6323ff1540f1a491e8de7622dsf to the data within a file -- for example, when delivering a
6b15044d54a096e6323ff1540f1a491e8de7622dsf static file -- Apache httpd uses sendfile to deliver the file contents
6b15044d54a096e6323ff1540f1a491e8de7622dsf without ever reading the file if the OS supports it.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This sendfile mechanism avoids separate read and send operations,
6b15044d54a096e6323ff1540f1a491e8de7622dsf and buffer allocations. But on some platforms or within some
6b15044d54a096e6323ff1540f1a491e8de7622dsf filesystems, it is better to disable this feature to avoid
6b15044d54a096e6323ff1540f1a491e8de7622dsf operational problems:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <li>Some platforms may have broken sendfile support that the build
6b15044d54a096e6323ff1540f1a491e8de7622dsf system did not detect, especially if the binaries were built on
6b15044d54a096e6323ff1540f1a491e8de7622dsf another box and moved to such a machine with broken sendfile
6b15044d54a096e6323ff1540f1a491e8de7622dsf support.</li>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <li>On Linux the use of sendfile triggers TCP-checksum
6b15044d54a096e6323ff1540f1a491e8de7622dsf offloading bugs on certain networking cards when using IPv6.</li>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <li>On Linux on Itanium, sendfile may be unable to handle files
6b15044d54a096e6323ff1540f1a491e8de7622dsf over 2GB in size.</li>
6b15044d54a096e6323ff1540f1a491e8de7622dsf module="core">DocumentRoot</directive> (e.g., NFS or SMB),
6b15044d54a096e6323ff1540f1a491e8de7622dsf the kernel may be unable to serve the network file through
6b15044d54a096e6323ff1540f1a491e8de7622dsf its own cache.</li>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>For server configurations that are vulnerable to these problems,
6b15044d54a096e6323ff1540f1a491e8de7622dsf you should disable this feature by specifying:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf EnableSendfile Off
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>For NFS or SMB mounted files, this feature may be disabled explicitly
6b15044d54a096e6323ff1540f1a491e8de7622dsf for the offending files by specifying:</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <Directory "/path-to-nfs-files">
6b15044d54a096e6323ff1540f1a491e8de7622dsf EnableSendfile Off
6b15044d54a096e6323ff1540f1a491e8de7622dsf </Directory>
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>Please note that the per-directory and .htaccess configuration
6b15044d54a096e6323ff1540f1a491e8de7622dsf of <directive>EnableSendfile</directive> is not supported by
6b15044d54a096e6323ff1540f1a491e8de7622dsf Only global definition of <directive>EnableSendfile</directive>
6b15044d54a096e6323ff1540f1a491e8de7622dsf is taken into account by the module.
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<description>What the server will return to the client
6b15044d54a096e6323ff1540f1a491e8de7622dsfin case of an error</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<syntax>ErrorDocument <var>error-code</var> <var>document</var></syntax>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<compatibility>Quoting syntax for text messages is different in Apache HTTP Server
6b15044d54a096e6323ff1540f1a491e8de7622dsf2.0</compatibility>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>In the event of a problem or error, Apache httpd can be configured
6b15044d54a096e6323ff1540f1a491e8de7622dsf to do one of four things,</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <li>redirect to a local <var>URL-path</var> to handle the
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The first option is the default, while options 2-4 are
6b15044d54a096e6323ff1540f1a491e8de7622dsf configured using the <directive>ErrorDocument</directive>
6b15044d54a096e6323ff1540f1a491e8de7622dsf directive, which is followed by the HTTP response code and a URL
6b15044d54a096e6323ff1540f1a491e8de7622dsf or a message. Apache httpd will sometimes offer additional information
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>URLs can begin with a slash (/) for local web-paths (relative
af18698b10b429b270551ca3a5d51a75e1c9db22brianp to the <directive module="core">DocumentRoot</directive>), or be a
af18698b10b429b270551ca3a5d51a75e1c9db22brianp full URL which the client can resolve. Alternatively, a message
003f0c9fda6664daf5092a0e42f65ede20098153slive can be provided to be displayed by the browser. Examples:</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive ErrorDocument 403 "Sorry can't allow you access today"
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd <p>Additionally, the special value <code>default</code> can be used
003f0c9fda6664daf5092a0e42f65ede20098153slive to specify Apache httpd's simple hardcoded message. While not required
003f0c9fda6664daf5092a0e42f65ede20098153slive under normal circumstances, <code>default</code> will restore
fb77c505254b6e9c925e23e734463e87574f8f40kess Apache httpd's simple hardcoded message for configurations that would
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen otherwise inherit an existing <directive>ErrorDocument</directive>.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd ErrorDocument 404 default<br />
af18698b10b429b270551ca3a5d51a75e1c9db22brianp </Directory>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </example>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier <p>Note that when you specify an <directive>ErrorDocument</directive>
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier that points to a remote URL (ie. anything with a method such as
13cbe1d8f52c8097cb581e7eb259693b64d41d10poirier <code>http</code> in front of it), Apache HTTP Server will send a redirect to the
af18698b10b429b270551ca3a5d51a75e1c9db22brianp client to tell it where to find the document, even if the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd document ends up being on the same server. This has several
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd implications, the most important being that the client will not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd receive the original error status code, but instead will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd receive a redirect status code. This in turn can confuse web
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd robots and other clients which try to determine if a URL is
fb77c505254b6e9c925e23e734463e87574f8f40kess valid using the status code. In addition, if you use a remote
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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
41ef8b3051855b802104193ee0a587515af60a37wrowe <code>ErrorDocument 401</code> directive then it must refer to a local
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Microsoft Internet Explorer (MSIE) will by default ignore
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server-generated error messages when they are "too small" and substitute
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess its own "friendly" error messages. The size threshold varies depending on
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the type of error, but in general, if you make your error document
41ef8b3051855b802104193ee0a587515af60a37wrowe greater than 512 bytes, then MSIE will show the server-generated
41ef8b3051855b802104193ee0a587515af60a37wrowe error rather than masking it. More information is available in
41ef8b3051855b802104193ee0a587515af60a37wrowe Microsoft Knowledge Base article <a
41ef8b3051855b802104193ee0a587515af60a37wrowe href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807"
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Although most error messages can be overriden, there are certain
41ef8b3051855b802104193ee0a587515af60a37wrowe circumstances where the internal messages are used regardless of the
fb77c505254b6e9c925e23e734463e87574f8f40kess setting of <directive module="core">ErrorDocument</directive>. In
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf particular, if a malformed request is detected, normal request processing
41ef8b3051855b802104193ee0a587515af60a37wrowe will be immediately halted and the internal error message returned.
41ef8b3051855b802104193ee0a587515af60a37wrowe This is necessary to guard against security problems caused by
41ef8b3051855b802104193ee0a587515af60a37wrowe bad requests.</p>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <p>If you are using mod_proxy, you may wish to enable
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf <directive module="mod_proxy">ProxyErrorOverride</directive> so that you can provide
41ef8b3051855b802104193ee0a587515af60a37wrowe custom error messages on behalf of your Origin servers. If you don't enable ProxyErrorOverride,
41ef8b3051855b802104193ee0a587515af60a37wrowe Apache httpd will not generate custom error documents for proxied content.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</directivesynopsis>
41ef8b3051855b802104193ee0a587515af60a37wrowe<directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<description>Location where the server will log errors</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe</contextlist>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive <p>The <directive>ErrorLog</directive> directive sets the name of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the file to which the server will log any errors it encounters. If
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley the <var>file-path</var> is not absolute then it is assumed to be
78f4d313fd5edf76dc5cfb8725e082a08cd29740jwoolley relative to the <directive module="core">ServerRoot</directive>.</p>
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf </example>
41ef8b3051855b802104193ee0a587515af60a37wrowe begins with a pipe (|) then it is assumed to be a command to spawn
41ef8b3051855b802104193ee0a587515af60a37wrowe to handle the error log.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe <p>Using <code>syslog</code> instead of a filename enables logging
41ef8b3051855b802104193ee0a587515af60a37wrowe via syslogd(8) if the system supports it. The default is to use
9c233808c898095865fcc0a2dc1cf594d0d8faf3sf syslog facility <code>local7</code>, but you can override this by
9fb925624300c864fe3969a264e52aa83f3c2dd0slive using the <code>syslog:<var>facility</var></code> syntax where
41ef8b3051855b802104193ee0a587515af60a37wrowe <var>facility</var> can be one of the names usually documented in
41ef8b3051855b802104193ee0a587515af60a37wrowe syslog(1).</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess ErrorLog syslog:user
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars href="/misc/security_tips.html#serverroot">security tips</a>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars document for details on why your security could be compromised
78f97ce162b66a0dbfd7af4dcd9984f162569b04minfrin if the directory where log files are stored is writable by
832853bb93c1831daf24e4727c5ca0e1b1786e83lars anyone other than the user that starts the server.</p>
832853bb93c1831daf24e4727c5ca0e1b1786e83lars <p>When entering a file path on non-Unix platforms, care should be taken
af18698b10b429b270551ca3a5d51a75e1c9db22brianp to make sure that only forward slashed are used even though the platform
af18698b10b429b270551ca3a5d51a75e1c9db22brianp may allow the use of back slashes. In general it is a good idea to always
af18698b10b429b270551ca3a5d51a75e1c9db22brianp use forward slashes throughout the configuration files.</p>
79c754eb51681c3389cd966753e902c429f78939trawick<seealso><directive module="core">LogLevel</directive></seealso>
79c754eb51681c3389cd966753e902c429f78939trawick<seealso><a href="/logs.html">Apache HTTP Server Log Files</a></seealso>
79c754eb51681c3389cd966753e902c429f78939trawick</directivesynopsis>
79c754eb51681c3389cd966753e902c429f78939trawick<directivesynopsis>
79c754eb51681c3389cd966753e902c429f78939trawick<description>Keep track of extended status information for each
79c754eb51681c3389cd966753e902c429f78939trawickrequest</description>
79c754eb51681c3389cd966753e902c429f78939trawick<contextlist><context>server config</context></contextlist>
79c754eb51681c3389cd966753e902c429f78939trawick <p>This option tracks additional data per worker about the
79c754eb51681c3389cd966753e902c429f78939trawick currently executing request, and a utilization summary; you
79c754eb51681c3389cd966753e902c429f78939trawick can see these variables during runtime by configuring
79c754eb51681c3389cd966753e902c429f78939trawick <module>mod_status</module>. Note that other modules may
79c754eb51681c3389cd966753e902c429f78939trawick rely on this scoreboard.</p>
79c754eb51681c3389cd966753e902c429f78939trawick <p>This setting applies to the entire server, and cannot be
79c754eb51681c3389cd966753e902c429f78939trawick enabled or disabled on a virtualhost-by-virtualhost basis.
79c754eb51681c3389cd966753e902c429f78939trawick The collection of extended status information can slow down
79c754eb51681c3389cd966753e902c429f78939trawick the server. Also note that this setting cannot be changed
79c754eb51681c3389cd966753e902c429f78939trawick during a graceful restart.</p>
79c754eb51681c3389cd966753e902c429f78939trawick <p>Note that loading <module>mod_status</module> will change
79c754eb51681c3389cd966753e902c429f78939trawick the default behavior to ExtendedStatus On, while other
79c754eb51681c3389cd966753e902c429f78939trawick third party modules may do the same. Such modules rely on
79c754eb51681c3389cd966753e902c429f78939trawick collecting detailed information about the state of all workers.
79c754eb51681c3389cd966753e902c429f78939trawick The default is changed by <module>mod_status</module> beginning
79c754eb51681c3389cd966753e902c429f78939trawick with version 2.3.6; the previous default was always Off.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>File attributes used to create the ETag
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveHTTP response header for static files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The <directive>FileETag</directive> directive configures the file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attributes that are used to create the <code>ETag</code> (entity
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive tag) response header field when the document is based on a static file.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (The <code>ETag</code> value is used in cache management to save
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive network bandwidth.) In Apache httpd 1.3.22 and earlier, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from the file's inode, size, and last-modified time (mtime). The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>FileETag</directive> directive allows you to choose
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which of these -- if any -- should be used. The recognized keywords are:
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <dd>The file's i-node number will be included in the calculation</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dd>The date and time the file was last modified will be included</dd>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <dd>The number of bytes in the file will be included</dd>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive <dd>All available fields will be used. This is equivalent to:
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>If a document is file-based, no <code>ETag</code> field will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd included in the response</dd>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <code>INode</code>, <code>MTime</code>, and <code>Size</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive keywords may be prefixed with either <code>+</code> or <code>-</code>,
f7fe99050600166042c04b8e595fb75499eed7f0geoff which allow changes to be made to the default setting inherited
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen from a broader scope. Any keyword appearing without such a prefix
f7fe99050600166042c04b8e595fb75499eed7f0geoff immediately and completely cancels the inherited setting.</p>
f7fe99050600166042c04b8e595fb75499eed7f0geoff <p>If a directory's configuration includes
f7fe99050600166042c04b8e595fb75499eed7f0geoff <code>FileETag INode MTime Size</code>, and a
f7fe99050600166042c04b8e595fb75499eed7f0geoff subdirectory's includes <code>FileETag -INode</code>,
f7fe99050600166042c04b8e595fb75499eed7f0geoff the setting for that subdirectory (which will be inherited by
f7fe99050600166042c04b8e595fb75499eed7f0geoff any sub-subdirectories that don't override it) will be equivalent to
f7fe99050600166042c04b8e595fb75499eed7f0geoff Do not change the default for directories or locations that have WebDAV
f7fe99050600166042c04b8e595fb75499eed7f0geoff enabled and use <module>mod_dav_fs</module> as a storage provider.
f7fe99050600166042c04b8e595fb75499eed7f0geoff <module>mod_dav_fs</module> uses <code>INode MTime Size</code>
f7fe99050600166042c04b8e595fb75499eed7f0geoff as a fixed format for <code>ETag</code> comparisons on conditional requests.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive These conditional requests will break if the <code>ETag</code> format is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive An ETag is not generated for responses parsed by <module>mod_include</module>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the response entity can change without a change of the INode, MTime, or Size
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of the static file with embedded SSI directives.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply to matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefilenames</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax><Files <var>filename</var>> ... </Files></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive type="section">Files</directive> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess limits the scope of the enclosed directives by filename. It is comparable
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive 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></Files></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
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive specified filename. <directive type="section">Files</directive>
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive sections are processed in the order they appear in the
69fba5b8aa0b0dc408f649cfdaab064ce120b05bslive configuration file, after the <directive module="core"
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen <code>.htaccess</code> files are read, but before <directive
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen type="section" module="core">Location</directive> sections. Note
b5d3d68a9f683722eac7a3ca507c3e571908dfc0rbowen that <directive type="section">Files</directive> can be nested
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections to restrict the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive portion of the filesystem they apply to.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <var>filename</var> argument should include a filename, or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a wild-card string, where <code>?</code> matches any single character,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <code>*</code> matches any sequences of characters.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Files ~ "\.(gif|jpe?g|png)$">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats. <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">FilesMatch</directive> is preferred,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive however.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen module="core">Directory</directive> and <directive type="section"
fb109b84906e3ee61680aa289953c2f9e859354erbowen module="core">Location</directive> sections, <directive
fb109b84906e3ee61680aa289953c2f9e859354erbowen type="section">Files</directive> sections can be used inside
fb109b84906e3ee61680aa289953c2f9e859354erbowen <code>.htaccess</code> files. This allows users to control access to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess their own files, at a file-by-file level.</p>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung<seealso><a href="/sections.html">How <Directory>, <Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <Files> sections work</a> for an explanation of how these
fb109b84906e3ee61680aa289953c2f9e859354erbowen different sections are combined when a request is received</seealso>
fb109b84906e3ee61680aa289953c2f9e859354erbowen</directivesynopsis>
960188481b7025ac8ef7221b67af83dd27e46cd0rjung<description>Contains directives that apply to regular-expression matched
960188481b7025ac8ef7221b67af83dd27e46cd0rjungfilenames</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><FilesMatch <var>regex</var>> ... </FilesMatch></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
5155e92c6100b47513159eee1b2b9914ab204a5acovener <p>The <directive type="section">FilesMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by filename, just as the
fb109b84906e3ee61680aa289953c2f9e859354erbowen <directive module="core" type="section">Files</directive> directive
fb109b84906e3ee61680aa289953c2f9e859354erbowen does. However, it accepts a <glossary ref="regex">regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <FilesMatch "\.(gif|jpe?g|png)$">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats.</p>
d950cf9262224a223e2ff5c51393708071e14b94covener<seealso><a href="/sections.html">How <Directory>, <Location>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor and <Files> sections work</a> for an explanation of how these
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes different sections are combined when a request is received</seealso>
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be served with the specified
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemedia type in the HTTP Content-Type header field</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>directory</context><context>.htaccess</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<compatibility>Moved to the core in Apache httpd 2.0</compatibility>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive type="section" module="core">Directory</directive>, or
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive type="section" module="core">Location</directive> or
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <directive type="section" module="core">Files</directive>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf section, this directive forces all matching files to be served
e302f38fd646764ce1a1e1c578d794aef514a9e5sf with the content type identification given by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <var>media-type</var>. For example, if you had a directory full of
e302f38fd646764ce1a1e1c578d794aef514a9e5sf GIF files, but did not want to label them all with <code>.gif</code>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf you might want to use:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>Note that this directive overrides other indirect media type
e302f38fd646764ce1a1e1c578d794aef514a9e5sf associations defined in mime.types or via the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>You can also override more general
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <Location /images><br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </Location><br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf # but normal mime-type associations here:<br />
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen ForceType None<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </Location>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<directivesynopsis>
b5c4b00201fdc3ed11c6cc05cf3f9a7912ac0cfbsf<description>Enables DNS lookups on client IP addresses</description>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<contextlist><context>server config</context><context>virtual host</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>This directive enables DNS lookups so that host names can be
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen The value <code>Double</code> refers to doing double-reverse
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen DNS lookup. That is, after a reverse lookup is performed, a forward
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen lookup is then performed on that result. At least one of the IP
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen addresses in the forward lookup must match the original
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen address. (In "tcpwrappers" terminology this is called
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <p>Regardless of the setting, when <module>mod_authz_host</module> is
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen used for controlling access by hostname, a double reverse lookup
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen will be performed. This is necessary for security. Note that the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen result of this double-reverse isn't generally available unless you
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen set <code>HostnameLookups Double</code>. For example, if only
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <code>HostnameLookups On</code> and a request is made to an object
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen that is protected by hostname restrictions, regardless of whether
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen the double-reverse fails or not, CGIs will still be passed the
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen single-reverse result in <code>REMOTE_HOST</code>.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The default is <code>Off</code> in order to save the network
e302f38fd646764ce1a1e1c578d794aef514a9e5sf traffic for those sites that don't truly need the reverse
e302f38fd646764ce1a1e1c578d794aef514a9e5sf lookups done. It is also better for the end users because they
e302f38fd646764ce1a1e1c578d794aef514a9e5sf don't have to suffer the extra latency that a lookup entails.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf Heavily loaded sites should leave this directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <code>Off</code>, since DNS lookups can take considerable
e302f38fd646764ce1a1e1c578d794aef514a9e5sf amounts of time. The utility <program>logresolve</program>, compiled by
e302f38fd646764ce1a1e1c578d794aef514a9e5sf default to the <code>bin</code> subdirectory of your installation
e302f38fd646764ce1a1e1c578d794aef514a9e5sf directory, can be used to look up host names from logged IP addresses
e302f38fd646764ce1a1e1c578d794aef514a9e5sf offline.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Contains directives that apply only if a condition is
b89fea36d9c12cec3344576824f4e6798da90ad4rbowensatisfied by a request at runtime</description>
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen<syntax><If <var>expression</var>> ... </If></syntax>
4497075b5e08b0c8ee89425a1758258ae80550fcsf<contextlist><context>server config</context><context>virtual host</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<context>directory</context><context>.htaccess</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <directive type="section">If</directive> directive
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen evaluates an expression at runtime, and applies the enclosed
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowen directives if and only if the expression evaluates to true.
e302f38fd646764ce1a1e1c578d794aef514a9e5sf For example:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <If "$req{Host} = ''">
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>would match HTTP/1.0 requests without a <var>Host:</var> header.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>You may compare the value of any variable in the request headers
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ($req), response headers ($resp) or environment ($env) in your
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen expression.</p>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<seealso><a href="/sections.html">How <Directory>, <Location>,
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <Files> sections work</a> for an explanation of how these
e302f38fd646764ce1a1e1c578d794aef514a9e5sf different sections are combined when a request is received.
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen <directive type="section">If</directive> has the same precedence
e302f38fd646764ce1a1e1c578d794aef514a9e5sf and usage as <directive type="section">Files</directive></seealso>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen<description>Encloses directives that will be processed only
0b5f11662dee7135ff8dd04311a4ee6df7fe2b1crbowenif a test is true at startup</description>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen </IfDefine></syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen</contextlist>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf <p>The <code><IfDefine <var>test</var>>...</IfDefine>
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf </code> section is used to mark directives that are conditional. The
b08558bf6a64f9501ad3eca34eaf4d978bd928cfsf directives within an <directive type="section">IfDefine</directive>
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen section are only processed if the <var>test</var> is true. If <var>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf test</var> is false, everything between the start and end markers is
e302f38fd646764ce1a1e1c578d794aef514a9e5sf ignored.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf >IfDefine</directive> section directive can be one of two forms:</p>
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <p>In the former case, the directives between the start and end
b89fea36d9c12cec3344576824f4e6798da90ad4rbowen markers are only processed if the parameter named
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <var>parameter-name</var> is defined. The second format reverses
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf the test, and only processes the directives if
9228509ac5da8374df4a5d50b7da139e7b31f8a3sf <var>parameter-name</var> is <strong>not</strong> defined.</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p>The <var>parameter-name</var> argument is a define as given on the
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <program>httpd</program> command line via <code>-D<var>parameter</var>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </code> at the time the server was started or by the <directive
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <p><directive type="section">IfDefine</directive> sections are
e302f38fd646764ce1a1e1c578d794aef514a9e5sf nest-able, which can be used to implement simple
e302f38fd646764ce1a1e1c578d794aef514a9e5sf multiple-parameter tests. Example:</p>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf httpd -DReverseProxy -DUseCache -DMemCache ...<br />
ce4dc40a4e87991087488f70d96d3447d7557294sf <IfDefine ReverseProxy><br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen LoadModule proxy_http_module modules/mod_proxy_http.so<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf <IfDefine UseCache><br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <IfDefine MemCache><br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen LoadModule mem_cache_module modules/mod_mem_cache.so<br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen </IfDefine><br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen <IfDefine !MemCache><br />
abdaaa23d72ef7e7ff91eab9c5581d40130680c1rbowen LoadModule disk_cache_module modules/mod_disk_cache.so<br />
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </IfDefine>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </IfDefine>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </IfDefine>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </example>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</directivesynopsis>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<description>Encloses directives that are processed conditional on the
e302f38fd646764ce1a1e1c578d794aef514a9e5sfpresence or absence of a specific module</description>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<syntax><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
e302f38fd646764ce1a1e1c578d794aef514a9e5sf </IfModule></syntax>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf<contextlist><context>server config</context><context>virtual host</context>
e302f38fd646764ce1a1e1c578d794aef514a9e5sf</contextlist>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<compatibility>Module identifiers are available in version 2.1 and
a8ee031b2224ce5473826c9d4f603681589245fawrowelater.</compatibility>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>The <code><IfModule <var>test</var>>...</IfModule></code>
a8ee031b2224ce5473826c9d4f603681589245fawrowe section is used to mark directives that are conditional on the presence of
a8ee031b2224ce5473826c9d4f603681589245fawrowe a specific module. The directives within an <directive type="section"
a8ee031b2224ce5473826c9d4f603681589245fawrowe >IfModule</directive> section are only processed if the <var>test</var>
a8ee031b2224ce5473826c9d4f603681589245fawrowe is true. If <var>test</var> is false, everything between the start and
a8ee031b2224ce5473826c9d4f603681589245fawrowe end markers is ignored.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>The <var>test</var> in the <directive type="section"
a8ee031b2224ce5473826c9d4f603681589245fawrowe >IfModule</directive> section directive can be one of two forms:</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>In the former case, the directives between the start and end
34b157732214cedcd129cd9fe7c4290757505d60minfrin markers are only processed if the module named <var>module</var>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor is included in Apache httpd -- either compiled in or
a8ee031b2224ce5473826c9d4f603681589245fawrowe >LoadModule</directive>. The second format reverses the test,
a8ee031b2224ce5473826c9d4f603681589245fawrowe and only processes the directives if <var>module</var> is
34b157732214cedcd129cd9fe7c4290757505d60minfrin <p>The <var>module</var> argument can be either the module identifier or
34b157732214cedcd129cd9fe7c4290757505d60minfrin the file name of the module, at the time it was compiled. For example,
34b157732214cedcd129cd9fe7c4290757505d60minfrin <code>mod_rewrite.c</code> is the file name. If a module consists of
a8ee031b2224ce5473826c9d4f603681589245fawrowe several source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfModule</directive> sections are
003f0c9fda6664daf5092a0e42f65ede20098153slive nest-able, which can be used to implement simple multiple-module
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <note>This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive placed in <directive type="section">IfModule</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a5f060e0c74a44cb8896ae794c08f94f7c9a46a7covener<description>Includes other configuration files from within
fb77c505254b6e9c925e23e734463e87574f8f40kessthe server configuration files</description>
c976a7c7d20f2be319b128dd7d0b1568da224c0arbowen<syntax>Include <var>file-path</var>|<var>directory-path</var></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Wildcard matching available in 2.0.41 and later, directory
530eba85dbd41b8a0fa5255d3648d1440199a661slivewildcard matching available in 2.3.6 and later</compatibility>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>This directive allows inclusion of other configuration files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive from within the server configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
530eba85dbd41b8a0fa5255d3648d1440199a661slive in the filename or directory parts of the path to include several files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd at once, in alphabetical order. In addition, if
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>Include</directive> points to a directory, rather than a file,
530eba85dbd41b8a0fa5255d3648d1440199a661slive Apache httpd will read all files in that directory and any subdirectory.
fb77c505254b6e9c925e23e734463e87574f8f40kess However, including entire directories is not recommended, because it is
fb77c505254b6e9c925e23e734463e87574f8f40kess easy to accidentally leave temporary files in a directory that can cause
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <program>httpd</program> to fail. Instead, we encourage you to use the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd wildcard syntax shown below, to include files that match a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd pattern, such as *.conf, for example.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>When a wildcard is specified for a file or directory component of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd path, and no file or directory matches the wildcard, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">Include</directive> directive will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd silently ignored. When a directory or file component of the path is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specified exactly, and that directory or file does not exist,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core">Include</directive> directive will fail with an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd error saying the file or directory cannot be found. This removes the need
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for placeholder files to exist so that at least one file or directory is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive found by the wildcard.</p>
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem <p>The file path specified may be an absolute path, or may be relative
0db981f8fdfb62c5149efa079f0369b73d472d04rpluem to the <directive module="core">ServerRoot</directive> directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Wildcards may be included in the directory or file portion of the
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<directivesynopsis>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<description>Enables HTTP persistent connections</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection feature of HTTP/1.1 provide long-lived HTTP sessions
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which allow multiple requests to be sent over the same TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection. In some cases this has been shown to result in an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive almost 50% speedup in latency times for HTML documents with
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive many images. To enable Keep-Alive connections, set
030108b1816bcda3d925df65357feabdce83bc94slive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor used if they are specifically requested by a client. In
030108b1816bcda3d925df65357feabdce83bc94slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd advance. This implies that dynamic content such as CGI output,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SSI pages, and server-generated directory listings will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd generally not use Keep-Alive connections to HTTP/1.0 clients.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd For HTTP/1.1 clients, persistent connections are the default
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd unless otherwise specified. If the client requests it, chunked
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess encoding will be used in order to send content of unknown
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess length over persistent connections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When a client uses a Keep-Alive connection it will be counted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as a single "request" for the <directive module="mpm_common"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >MaxRequestsPerChild</directive> directive, regardless
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of how many requests are sent using the connection.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Amount of time the server will wait for subsequent
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequests on a persistent connection</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Specifying a value in milliseconds is available in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndApache httpd 2.3.2 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The number of seconds Apache httpd will wait for a subsequent
003f0c9fda6664daf5092a0e42f65ede20098153slive request before closing the connection. By adding a postfix of ms the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive timeout can be also set in milliseconds. Once a request has been
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive received, the timeout value specified by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">Timeout</directive> directive applies.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Setting <directive>KeepAliveTimeout</directive> to a high value
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor may cause performance problems in heavily loaded servers. The
030108b1816bcda3d925df65357feabdce83bc94slive higher the timeout, the more server processes will be kept
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd occupied waiting on connections with idle clients.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>In a name-based virtual host context, the value of the first
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd defined virtual host (the default host) in a set of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">NameVirtualHost</directive> will be used.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The other values will be ignored.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict enclosed access controls to only certain HTTP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemethods</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><Limit <var>method</var> [<var>method</var>] ... > ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Limit></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>Access controls are normally effective for
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <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>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The purpose of the <directive type="section">Limit</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to restrict the effect of the access controls to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nominated HTTP methods. For all other methods, the access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrictions that are enclosed in the <directive
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding type="section">Limit</directive> bracket <strong>will have no
fb77c505254b6e9c925e23e734463e87574f8f40kess effect</strong>. The following example applies the access control
fb77c505254b6e9c925e23e734463e87574f8f40kess only to the methods <code>POST</code>, <code>PUT</code>, and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>DELETE</code>, leaving all other methods unprotected:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Limit POST PUT DELETE><br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding Require valid-user<br />
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding </Limit>
7654193c1faf603feec999850322ad79e6c551bcnd </example>
b24c77ceb4cea5ffa92536e19f0aa83608960dc4fielding <p>The method names listed can be one or more of: <code>GET</code>,
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
7654193c1faf603feec999850322ad79e6c551bcnd <code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
7654193c1faf603feec999850322ad79e6c551bcnd <code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
7654193c1faf603feec999850322ad79e6c551bcnd <code>LOCK</code>, and <code>UNLOCK</code>. <strong>The method name is
7654193c1faf603feec999850322ad79e6c551bcnd case-sensitive.</strong> If <code>GET</code> is used it will also
7654193c1faf603feec999850322ad79e6c551bcnd restrict <code>HEAD</code> requests. The <code>TRACE</code> method
7654193c1faf603feec999850322ad79e6c551bcnd module="core">LimitExcept</directive> section should always be
7654193c1faf603feec999850322ad79e6c551bcnd used in preference to a <directive type="section">Limit</directive>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd section when restricting access, since a <directive type="section"
7654193c1faf603feec999850322ad79e6c551bcnd module="core">LimitExcept</directive> section provides protection
7654193c1faf603feec999850322ad79e6c551bcnd against arbitrary methods.</note>
439acee10571861c670c438038a62f90a08bf137covener <p>The <directive type="section">Limit</directive> and
439acee10571861c670c438038a62f90a08bf137covener <directive type="section" module="core">LimitExcept</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directives may be nested. In this case, each successive level of
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <directive type="section">Limit</directive> or <directive
439acee10571861c670c438038a62f90a08bf137covener type="section" module="core">LimitExcept</directive> directives must
439acee10571861c670c438038a62f90a08bf137covener further restrict the set of methods to which access controls apply.</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <directive type="section">LimitExcept</directive> directives with
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener the <directive module="mod_authz_core">Require</directive> directive,
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener note that the first <directive module="mod_authz_core">Require</directive>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener to succeed authorizes the request, regardless of the presence of other
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <directive module="mod_authz_core">Require</directive> directives.</note>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <p>For example, given the following configuration, all users will
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener be authorized for <code>POST</code> requests, and the
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <code>Require group editors</code> directive will be ignored
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener in all cases:</p>
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener <LimitExcept GET>
df5042f69eea159c73cd7b16542d4ca7d879b0b5trawick Require valid-user
c3e2e664a67b1adb9b6a6b91ff161f4f562cecf6covener </LimitExcept><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Limit POST>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require group editors
fb77c505254b6e9c925e23e734463e87574f8f40kess </Limit>
fb77c505254b6e9c925e23e734463e87574f8f40kess </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict access controls to all HTTP methods
fb77c505254b6e9c925e23e734463e87574f8f40kessexcept the named ones</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<syntax><LimitExcept <var>method</var> [<var>method</var>] ... > ...
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick </LimitExcept></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">LimitExcept</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a group of access control directives which will then apply to any
fb77c505254b6e9c925e23e734463e87574f8f40kess HTTP access method <strong>not</strong> listed in the arguments;
fb77c505254b6e9c925e23e734463e87574f8f40kess i.e., it is the opposite of a <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Limit</directive> section and can be used to control
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive both standard and nonstandard/unrecognized methods. See the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Limit</directive> for more details.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LimitExcept POST GET><br />
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd Require valid-user<br />
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </LimitExcept>
a1ef40892ffa2b44fc249423c5b6c42a74a84c68nd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<description>Determine maximum number of internal redirects and nested
750d12c59545dbbac70390988de94f7e901b08f2niqsubrequests</description>
750d12c59545dbbac70390988de94f7e901b08f2niq<syntax>LimitInternalRecursion <var>number</var> [<var>number</var>]</syntax>
750d12c59545dbbac70390988de94f7e901b08f2niq<contextlist><context>server config</context><context>virtual host</context>
750d12c59545dbbac70390988de94f7e901b08f2niq</contextlist>
750d12c59545dbbac70390988de94f7e901b08f2niq<compatibility>Available in Apache httpd 2.0.47 and later</compatibility>
750d12c59545dbbac70390988de94f7e901b08f2niq <p>An internal redirect happens, for example, when using the <directive
750d12c59545dbbac70390988de94f7e901b08f2niq module="mod_actions">Action</directive> directive, which internally
750d12c59545dbbac70390988de94f7e901b08f2niq redirects the original request to a CGI script. A subrequest is Apache httpd's
750d12c59545dbbac70390988de94f7e901b08f2niq mechanism to find out what would happen for some URI if it were requested.
750d12c59545dbbac70390988de94f7e901b08f2niq For example, <module>mod_dir</module> uses subrequests to look for the
6b15044d54a096e6323ff1540f1a491e8de7622dsf files listed in the <directive module="mod_dir">DirectoryIndex</directive>
750d12c59545dbbac70390988de94f7e901b08f2niq directive.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p><directive>LimitInternalRecursion</directive> prevents the server
6b15044d54a096e6323ff1540f1a491e8de7622dsf from crashing when entering an infinite loop of internal redirects or
6b15044d54a096e6323ff1540f1a491e8de7622dsf subrequests. Such loops are usually caused by misconfigurations.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>The directive stores two different limits, which are evaluated on
6b15044d54a096e6323ff1540f1a491e8de7622dsf per-request basis. The first <var>number</var> is the maximum number of
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic internal redirects, that may follow each other. The second <var>number</var>
1a0ca5f6b566a5eb77d63f466fcf78fb388a4182igalic determines, how deep subrequests may be nested. If you specify only one
011e567af90fe9d72bbabf8cc5e373b4436b9d08rbowen <var>number</var>, it will be assigned to both limits.</p>
6b15044d54a096e6323ff1540f1a491e8de7622dsf LimitInternalRecursion 5
6b15044d54a096e6323ff1540f1a491e8de7622dsf </example>
6b15044d54a096e6323ff1540f1a491e8de7622dsf</directivesynopsis>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<directivesynopsis>
750d12c59545dbbac70390988de94f7e901b08f2niq<description>Restricts the total size of the HTTP request body sent
94aba9caa9b2f7a0e95a55f51264c908b69470e2igalicfrom the client</description>
6b15044d54a096e6323ff1540f1a491e8de7622dsf<contextlist><context>server config</context><context>virtual host</context>
750d12c59545dbbac70390988de94f7e901b08f2niq</contextlist>
6b15044d54a096e6323ff1540f1a491e8de7622dsf <p>This directive specifies the number of <var>bytes</var> from 0
750d12c59545dbbac70390988de94f7e901b08f2niq (meaning unlimited) to 2147483647 (2GB) that are allowed in a
750d12c59545dbbac70390988de94f7e901b08f2niq request body.</p>
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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd (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
003f0c9fda6664daf5092a0e42f65ede20098153slive 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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd wishes to accept for that resource.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd control over abnormal client request behavior, which may be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd useful for avoiding some forms of denial-of-service
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd attacks.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>If, for example, you are permitting file upload to a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd location, and wish to limit the size of the uploaded file to 100K,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you might use the following directive:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestBody 102400
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limits the number of HTTP request header fields that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivewill be accepted from the client</description>
6e483e0b8aa3fa574288a7452221392a03e2b9a3noodl<contextlist><context>server config</context></contextlist>
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>
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi <p>The <directive>LimitRequestFields</directive> directive allows
130d299c4b2b15be45532a176604c71fdc7bea5bnd the server administrator to modify the limit on the number of
130d299c4b2b15be45532a176604c71fdc7bea5bnd request header fields allowed in an HTTP request. A server needs
130d299c4b2b15be45532a176604c71fdc7bea5bnd this value to be larger than the number of fields that a normal
130d299c4b2b15be45532a176604c71fdc7bea5bnd client request might include. The number of request header fields
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi used by a client rarely exceeds 20, but this may vary among
a00429a6b3b4dbb113b6dc67cfc0507f610276e9takashi different client implementations, often depending upon the extent
955d7fc3e7adb6463b7243e15c04e858718e799etakashi to which a user has configured their browser to support detailed
955d7fc3e7adb6463b7243e15c04e858718e799etakashi content negotiation. Optional HTTP extensions are often expressed
955d7fc3e7adb6463b7243e15c04e858718e799etakashi using request header fields.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi <p>This directive gives the server administrator greater
955d7fc3e7adb6463b7243e15c04e858718e799etakashi control over abnormal client request behavior, which may be
955d7fc3e7adb6463b7243e15c04e858718e799etakashi useful for avoiding some forms of denial-of-service attacks.
955d7fc3e7adb6463b7243e15c04e858718e799etakashi The value should be increased if normal clients see an error
955d7fc3e7adb6463b7243e15c04e858718e799etakashi response from the server that indicates too many fields were
955d7fc3e7adb6463b7243e15c04e858718e799etakashi sent in the request.</p>
955d7fc3e7adb6463b7243e15c04e858718e799etakashi LimitRequestFields 50
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of the HTTP request header allowed from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveclient</description>
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki<syntax>LimitRequestFieldSize <var>bytes</var></syntax>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <var>bytes</var>
003f0c9fda6664daf5092a0e42f65ede20098153slive that will be allowed in an HTTP request header.</p>
55d36f9b61520c2374ab463e77e8a62daa416398nd <p>The <directive>LimitRequestFieldSize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce or increase the limit
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on the allowed size of an HTTP request header field. A server
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd needs this value to be large enough to hold any one header field
fb77c505254b6e9c925e23e734463e87574f8f40kess from a normal client request. The size of a normal request header
fb77c505254b6e9c925e23e734463e87574f8f40kess field will vary greatly among different client implementations,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd often depending upon the extent to which a user has configured
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd their browser to support detailed content negotiation. SPNEGO
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd authentication headers can be up to 12392 bytes.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd control over abnormal client request behavior, which may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFieldSize 4094
55d36f9b61520c2374ab463e77e8a62daa416398nd <note>Under normal conditions, the value should not be changed from
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen the default.</note>
55d36f9b61520c2374ab463e77e8a62daa416398nd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
55d36f9b61520c2374ab463e77e8a62daa416398nd<description>Limit the size of the HTTP request line that will be accepted
55d36f9b61520c2374ab463e77e8a62daa416398ndfrom the client</description>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the number of <var>bytes</var> that will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allowed on the HTTP request-line.</p>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <p>The <directive>LimitRequestLine</directive> directive allows
bea526116133aa3d7dabd1924bfc580b37fbf22aslive the server administrator to reduce or increase the limit on the allowed size
fb77c505254b6e9c925e23e734463e87574f8f40kess of a client's HTTP request-line. Since the request-line consists of the
bea526116133aa3d7dabd1924bfc580b37fbf22aslive HTTP method, URI, and protocol version, the
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive hold any of its resource names, including any information that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive might be passed in the query part of a <code>GET</code> request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
3621f3acee323a877639a96d84891095eb07933aminfrin useful for avoiding some forms of denial-of-service attacks.</p>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin LimitRequestLine 4094
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the default.</note>
5b258a8d58679c6587757189339bb3c2d0488f93poirier</directivesynopsis>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<description>Limits the size of an XML-based request body</description>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<syntax>LimitXMLRequestBody <var>bytes</var></syntax>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<contextlist><context>server config</context><context>virtual host</context>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<context>directory</context><context>.htaccess</context></contextlist>
3621f3acee323a877639a96d84891095eb07933aminfrin <p>Limit (in bytes) on maximum size of an XML-based request
3621f3acee323a877639a96d84891095eb07933aminfrin body. A value of <code>0</code> will disable any checking.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin LimitXMLRequestBody 0
3621f3acee323a877639a96d84891095eb07933aminfrin</directivesynopsis>
3621f3acee323a877639a96d84891095eb07933aminfrin<description>Applies the enclosed directives only to matching
3621f3acee323a877639a96d84891095eb07933aminfrinURLs</description>
3621f3acee323a877639a96d84891095eb07933aminfrin<syntax><Location
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <var>URL-path</var>|<var>URL</var>> ... </Location></syntax>
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin<contextlist><context>server config</context><context>virtual host</context>
3621f3acee323a877639a96d84891095eb07933aminfrin</contextlist>
c68acc9d712af079afa2bd1a5a4aeef9a3ea573ckess <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
7b5535ed88e0f561b3bfb3330137bd804846afd4slive type="section">Location</directive> sections are processed in the
7b5535ed88e0f561b3bfb3330137bd804846afd4slive order they appear in the configuration file, after the <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section" module="core">Directory</directive> sections and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>.htaccess</code> files are read, and after the <directive
7b5535ed88e0f561b3bfb3330137bd804846afd4slive type="section" module="core">Files</directive> sections.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><directive type="section">Location</directive> sections operate
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd completely outside the filesystem. This has several consequences.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Most importantly, <directive type="section">Location</directive>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive directives should not be used to control access to filesystem
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd locations. Since several different URLs may map to the same
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin filesystem location, such access controls may by circumvented.</p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>Use <directive type="section">Location</directive> to apply
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin directives to content that lives outside the filesystem. For
3621f3acee323a877639a96d84891095eb07933aminfrin content that lives in the filesystem, use <directive
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin type="section" module="core">Directory</directive> and <directive
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin type="section" module="core">Files</directive>. An exception is
cf8a8738330694e60bad421fcc8361d80b0e9124minfrin <code><Location /></code>, which is an easy way to
3621f3acee323a877639a96d84891095eb07933aminfrin apply a configuration to the entire server.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin <p>For all origin (non-proxy) requests, the URL to be matched is a
3621f3acee323a877639a96d84891095eb07933aminfrin URL-path of the form <code>/path/</code>. <em>No scheme, hostname,
3621f3acee323a877639a96d84891095eb07933aminfrin port, or query string may be included.</em> For proxy requests, the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor URL to be matched is of the form
3621f3acee323a877639a96d84891095eb07933aminfrin <code>scheme://servername/path</code>, and you must include the
3621f3acee323a877639a96d84891095eb07933aminfrin prefix.</p>
3621f3acee323a877639a96d84891095eb07933aminfrin <p>The URL may use wildcards. In a wild-card string, <code>?</code> matches
3621f3acee323a877639a96d84891095eb07933aminfrin any single character, and <code>*</code> matches any sequences of
3621f3acee323a877639a96d84891095eb07933aminfrin characters. Neither wildcard character matches a / in the URL-path.</p>
03aa31ad82759363ba1a55589e517b16308ef635minfrin <p><glossary ref="regex">Regular expressions</glossary>
03aa31ad82759363ba1a55589e517b16308ef635minfrin can also be used, with the addition of the <code>~</code>
03aa31ad82759363ba1a55589e517b16308ef635minfrin character. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location ~ "/(extra|special)/data">
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or <code>/special/data</code>. The directive <directive
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele type="section" module="core">LocationMatch</directive> behaves
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele identical to the regex version of <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive>, and is preferred, for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive simple reason that <code>~</code> is hard to distinguish from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive functionality is especially useful when combined with the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess directive. For example, to enable status requests, but allow them
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess only from browsers at <code>example.com</code>, you might use:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location /status><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
891df99fdfa41fc8a486568f4d31ddf4a571258adreid <p>The slash character has special meaning depending on where in a
59368b594c9b09b59ae58c7de26d2d5ce1c99a29takashi URL it appears. People may be used to its behavior in the filesystem
be192cefa381d5bae6868034687471754cb43175sf where multiple adjacent slashes are frequently collapsed to a single
891df99fdfa41fc8a486568f4d31ddf4a571258adreid slash (<em>i.e.</em>, <code>/home///foo</code> is the same as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/foo</code>). In URL-space this is not necessarily true.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The <directive type="section" module="core">LocationMatch</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive and the regex version of <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive >Location</directive> require you to explicitly specify multiple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slashes if that is your intention.</p>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick <p>For example, <code><LocationMatch ^/abc></code> would match
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick the request URL <code>/abc</code> but not the request URL <code>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick //abc</code>. The (non-regex) <directive type="section"
9f38f3ec3e8087985d108a24ae796962fef83644takashi >Location</directive> directive behaves similarly when used for
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick proxy requests. But when (non-regex) <directive type="section"
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick >Location</directive> is used for non-proxy requests it will
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick implicitly match multiple slashes with a single slash. For example,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor if you specify <code><Location /abc/def></code> and the
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen request is to <code>/abc//def</code> then it will match.</p>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<seealso><a href="/sections.html">How <Directory>, <Location>
9f38f3ec3e8087985d108a24ae796962fef83644takashi and <Files> sections work</a> for an explanation of how these
9f38f3ec3e8087985d108a24ae796962fef83644takashi different sections are combined when a request is received.</seealso>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<seealso><directive module="core">LocationMatch</directive></seealso>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</directivesynopsis>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick<description>Applies the enclosed directives only to regular-expression
98f5034c8cbf2ef025b317b3e01acae82e143b11trawickmatching URLs</description>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<syntax><LocationMatch
85349f40d98fb3fc7a18ef25dc40eaaae6eead1ctakashi <var>regex</var>> ... </LocationMatch></syntax>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener<contextlist><context>server config</context><context>virtual host</context>
98f5034c8cbf2ef025b317b3e01acae82e143b11trawick</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive limits the scope of the enclosed directives by URL, in an identical manner
003f0c9fda6664daf5092a0e42f65ede20098153slive to <directive module="core" type="section">Location</directive>. However,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess it takes a <glossary ref="regex">regular expression</glossary>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd as an argument instead of a simple string. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LocationMatch "/(extra|special)/data">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match URLs that contained the substring <code>/extra/data</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/sections.html">How <Directory>, <Location>
130d299c4b2b15be45532a176604c71fdc7bea5bnd and <Files> sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Controls the verbosity of the ErrorLog</description>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p><directive>LogLevel</directive> adjusts the verbosity of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd messages recorded in the error logs (see <directive
130d299c4b2b15be45532a176604c71fdc7bea5bnd module="core">ErrorLog</directive> directive). The following
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd significance:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <columnspec><column width=".2"/><column width=".3"/><column width=".5"/>
6c5c651b0b97607b8c8b4965c1385c67699f217fnd </columnspec>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <td>"getpwuid: couldn't determine user name from uid"</td>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <td>"socket: Failed to get a socket, exiting child"</td>
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd <td>"child process 1234 did not exit, sending another
7245e9b991db85d9d9a587fe5f4051f642ebdc3cchrisd SIGHUP"</td>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <td>"httpd: caught SIGBUS, attempting to dump core in
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"Server seems busy, (you may need to increase
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>When a particular level is specified, messages from all
130d299c4b2b15be45532a176604c71fdc7bea5bnd other levels of higher significance will be reported as well.
7ef9b6763ad87846cf83c3f71467f43e349d080aerikabele <em>E.g.</em>, when <code>LogLevel info</code> is specified,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen then messages with log levels of <code>notice</code> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended.</p>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd LogLevel notice
03e0a375c2435102fb2b51e34cccff52acbfddcdnd </example>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>When logging to a regular file messages of the level
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <code>notice</code> cannot be suppressed and thus are always
03e0a375c2435102fb2b51e34cccff52acbfddcdnd logged. However, this doesn't apply when logging is done
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<directivesynopsis>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<description>Number of requests allowed on a persistent
03e0a375c2435102fb2b51e34cccff52acbfddcdndconnection</description>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd<contextlist><context>server config</context><context>virtual host</context>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd</contextlist>
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <p>The <directive>MaxKeepAliveRequests</directive> directive
03e0a375c2435102fb2b51e34cccff52acbfddcdnd limits the number of requests allowed per connection when
03e0a375c2435102fb2b51e34cccff52acbfddcdnd <directive module="core" >KeepAlive</directive> is on. If it is
03e0a375c2435102fb2b51e34cccff52acbfddcdnd set to <code>0</code>, unlimited requests will be allowed. We
03e0a375c2435102fb2b51e34cccff52acbfddcdnd recommend that this setting be kept to a high value for maximum
03e0a375c2435102fb2b51e34cccff52acbfddcdnd server performance.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive MaxKeepAliveRequests 500
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures mutex mechanism and lock file directory for all
003f0c9fda6664daf5092a0e42f65ede20098153sliveor specified mutexes</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Mutex <var>mechanism</var> [default|<var>mutex-name</var>] ... [OmitPID]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache HTTP Server 2.3.4 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Mutex</directive> directive sets the mechanism,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and optionally the lock file location, that httpd and modules use
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to serialize access to resources. Specify <code>default</code> as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the first argument to change the settings for all mutexes; specify
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a mutex name (see table below) as the first argument to override
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive defaults only for that mutex.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Mutex</directive> directive is typically used in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the following exceptional situations:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>change the mutex mechanism when the default mechanism selected
fb77c505254b6e9c925e23e734463e87574f8f40kess by <glossary>APR</glossary> has a functional or performance
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive problem</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>change the directory used by file-based mutexes when the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive default directory does not support locking</li>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive only configures mutexes which have been registered
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen with the core server using the <code>ap_mutex_register()</code> API.
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen All modules bundled with httpd support the <directive>Mutex</directive>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen directive, but third-party modules may not. Consult the documentation
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of the third-party module, which must indicate the mutex name(s) which
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen can be configured if this directive is supported.</p>
6fad623c3cc52b4a84d4d36538f6eed886f49f98covener <p>The following mutex <em>mechanisms</em> are available:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This selects the default locking implementation, as determined by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <glossary>APR</glossary>. The default locking implementation can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive be displayed by running <program>httpd</program> with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This effectively disables the mutex, and is only allowed for a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd mutex if the module indicates that it is a valid choice. Consult the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant based on a Posix semaphore.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The semaphore ownership is not recovered if a thread in the process
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive holding the mutex segfaults, resulting in a hang of the web server.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant based on a SystemV IPC semaphore.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It is possible to "leak" SysV semaphores if processes crash
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive before the semaphore is removed.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The semaphore API allows for a denial of service attack by any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive CGIs running under the same uid as the webserver (<em>i.e.</em>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all CGIs, unless you use something like <program>suexec</program>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This selects the "best" available semaphore implementation, choosing
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen between Posix and SystemV IPC semaphores, in that order.</p></li>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This is a mutex variant based on cross-process Posix thread
2f505ba07f89ba6a175d6ceae67fb273c4eb0993covener mutexes.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <p>On most systems, if a child process terminates abnormally while
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener holding a mutex that uses this implementation, the server will deadlock
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener and stop responding to requests. When this occurs, the server will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive require a manual restart to recover.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Solaris is a notable exception as it provides a mechanism which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive usually allows the mutex to be recovered after a child process
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive terminates abnormally while holding a mutex.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If your system implements the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>pthread_mutexattr_setrobust_np()</code> function, you may be able
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This is a mutex variant where a physical (lock-)file and the
72580dbc2a55511f13f377063725b9f143b20826stoddard <code>fcntl()</code> function are used as the mutex.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>When multiple mutexes based on this mechanism are used within
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor multi-threaded, multi-process environments, deadlock errors (EDEADLK)
72580dbc2a55511f13f377063725b9f143b20826stoddard can be reported for valid mutex operations if <code>fcntl()</code>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor is not thread-aware, such as on Solaris.</p>
72580dbc2a55511f13f377063725b9f143b20826stoddard <p>This is similar to the <code>fcntl:/path/to/mutex</code> method
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with the exception that the <code>flock()</code> function is used to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>This selects the "best" available file locking implementation,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen choosing between <code>fcntl</code> and <code>flock</code>, in that
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>Most mechanisms are only available on selected platforms, where the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen underlying platform and <glossary>APR</glossary> support it. Mechanisms
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen which aren't available on all platforms are <em>posixsem</em>,
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <em>sysvsem</em>, <em>sem</em>, <em>pthread</em>, <em>fcntl</em>,
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>With the file-based mechanisms <em>fcntl</em> and <em>flock</em>,
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim the path, if provided, is a directory where the lock file will be created.
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener The default directory is httpd's run-time file directory relative to
611f7fd8a0a5ee4a29eeed79dfd8bf6faaa3c613covener <directive module="core">ServerRoot</directive>. Always use a local disk
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filesystem for <code>/path/to/mutex</code> and never a directory residing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive on a NFS- or AFS-filesystem. The basename of the file will be the mutex
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type, an optional instance string provided by the module, and unless the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>OmitPID</code> keyword is specified, the process id of the httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parent process will be appended to to make the file name unique, avoiding
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive conflicts when multiple httpd instances share a lock file directory. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example, if the mutex name is <code>mpm-accept</code> and the lock file
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory is <code>/var/httpd/locks</code>, the lock file name for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive httpd instance with parent process id 12345 would be
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor <p>It is best to <em>avoid</em> putting mutex files in a world-writable
72580dbc2a55511f13f377063725b9f143b20826stoddard directory such as <code>/var/tmp</code> because someone could create
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a denial of service attack and prevent the server from starting by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating a lockfile with the same name as the one the server will try
72580dbc2a55511f13f377063725b9f143b20826stoddard to create.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The following table documents the names of mutexes used by httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and bundled modules.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td><module>prefork</module> and <module>worker</module> MPMs</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>incoming connections, to avoid the thundering herd problem;
ef8e89e090461194ecadd31e8796a2c51e0531a2kess for more information, refer to the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <a href="/misc/perf-tuning.html">performance tuning</a>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen documentation</td>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <td>communication with external mapping programs, to avoid
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive intermixed I/O from multiple requests</td>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>callback function of a particular client module</td>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <code>OmitPID</code> keyword suppresses the addition of the httpd
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive parent process id from the lock file name.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the following example, the mutex mechanism for the MPM accept
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mutex will be changed from the compiled-in default to <code>fcntl</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with the associated lock file created in directory
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <code>/var/httpd/locks</code>. The mutex mechanism for all other mutexes
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be changed from the compiled-in default to <code>sysvsem</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Mutex default sysvsem<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<directivesynopsis>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<description>Designates an IP address for name-virtual
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slivehosting</description>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<syntax>NameVirtualHost <var>addr</var>[:<var>port</var>]</syntax>
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive<contextlist><context>server config</context></contextlist>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<p>A single <directive>NameVirtualHost</directive> directive
d950cf9262224a223e2ff5c51393708071e14b94coveneridentifies a set of identical virtual hosts on which the server will
d950cf9262224a223e2ff5c51393708071e14b94covenerfurther select from on the basis of the <em>hostname</em>
d950cf9262224a223e2ff5c51393708071e14b94covenerrequested by the client. The <directive>NameVirtualHost</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzordirective is a required directive if you want to configure
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<p>This directive, and the corresponding <directive >VirtualHost</directive>,
d950cf9262224a223e2ff5c51393708071e14b94covener<em>must</em> be qualified with a port number if the server supports both HTTP
d950cf9262224a223e2ff5c51393708071e14b94covenerand HTTPS connections.</p>
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalic<p>Although <var>addr</var> can be a hostname, it is recommended
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorthat you always use an IP address or a wildcard. A wildcard
d950cf9262224a223e2ff5c51393708071e14b94covenerNameVirtualHost matches only virtualhosts that also have a literal wildcard
031bbbc0d1189b07330e38d0c126820a9ab7795egryzoras their argument.</p>
d950cf9262224a223e2ff5c51393708071e14b94covener<p>In cases where a firewall or other proxy receives the requests and
d950cf9262224a223e2ff5c51393708071e14b94covenerforwards them on a different IP address to the server, you must specify the
d950cf9262224a223e2ff5c51393708071e14b94covenerIP address of the physical interface on the machine which will be
d950cf9262224a223e2ff5c51393708071e14b94covenerservicing the requests. </p>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<p> In the example below, requests received on interface 192.0.2.1 and port 80
d950cf9262224a223e2ff5c51393708071e14b94covenerwill only select among the first two virtual hosts. Requests received on
031bbbc0d1189b07330e38d0c126820a9ab7795egryzorport 80 on any other interface will only select among the third and fourth
e4e60c2f7ba8f12b687f588b89e413842e9f2d76igalicvirtual hosts. In the common case where the interface isn't important
d950cf9262224a223e2ff5c51393708071e14b94covenerto the mapping, only the "*:80" NameVirtualHost and VirtualHost directives
d950cf9262224a223e2ff5c51393708071e14b94covenerare necessary.</p>
d950cf9262224a223e2ff5c51393708071e14b94covener NameVirtualHost 192.0.2.1:80<br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <VirtualHost 192.0.2.1:80><br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive </VirtualHost><br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <VirtualHost 192.0.2.1:80><br />
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor </VirtualHost><br />
234c8b28171d7e12b3c1f85b60fabd7c908a9c37slive <VirtualHost *:80><br />
dc223428958ad9ff05011545bcdda000887b93e5slive </VirtualHost><br />
beb923bec9bff2b49ce5027df2fe944e2b74e28brederpj <VirtualHost *:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
d8c44cd75cf575fe51319280c12445109e878523noodl <p>IPv6 addresses must be enclosed in square brackets, as shown
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the following example:</p>
37742b630743e470b94618ecb3560fbd82e50b59rbowen NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <note><title>Argument to <directive type="section">VirtualHost</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive</title>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess exactly match the argument to the <directive
37742b630743e470b94618ecb3560fbd82e50b59rbowen NameVirtualHost 192.0.2.2:80<br />
37742b630743e470b94618ecb3560fbd82e50b59rbowen <VirtualHost 192.0.2.2:80><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive # ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost><br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
ca908c21f63a71c5efa7d32bd2cfafe9a42ba1fbrbowen<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Configures what features are available in a particular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnddirectory</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>Options
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd [+|-]<var>option</var> [[+|-]<var>option</var>] ...</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>Options</directive> directive controls which
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd server features are available in a particular directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><var>option</var> can be set to <code>None</code>, in which
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd case none of the extra features are enabled, or one or more of
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the following:</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <dd>All options except for <code>MultiViews</code>. This is the default
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd setting.</dd>
37742b630743e470b94618ecb3560fbd82e50b59rbowen Execution of CGI scripts using <module>mod_cgi</module>
37742b630743e470b94618ecb3560fbd82e50b59rbowen is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will follow symbolic links in this directory.
8490b2f9f6469d5089163f6dd303d9a81f8e908ctrawick <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 <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>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>Omitting this option should not be considered a security restriction,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess since symlink testing is subject to race conditions that make it
030108b1816bcda3d925df65357feabdce83bc94slive circumventable.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Server-side includes provided by <module>mod_include</module>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd are permitted.</dd>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Server-side includes are permitted, but the <code>#exec
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cmd</code> and <code>#exec cgi</code> are disabled. It is still
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive possible to <code>#include virtual</code> CGI scripts from
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_alias">ScriptAlias</directive>ed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directories.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive If a URL which maps to a directory is requested, and there
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is no <directive module="mod_dir">DirectoryIndex</directive>
7fbd7281d06cec1918aa370214df77c572f871a9sf (<em>e.g.</em>, <code>index.html</code>) in that directory, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <module>mod_autoindex</module> will return a formatted listing
7fbd7281d06cec1918aa370214df77c572f871a9sf of the directory.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "MultiViews" are allowed using
1597043cec6ad37fa4154bf09b0fccdabed1a239slive <dd>The server will only follow symbolic links for which the
1597043cec6ad37fa4154bf09b0fccdabed1a239slive target file or directory is owned by the same user id as the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Note</title> <p>This option gets ignored if
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>This option should not be considered a security restriction,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since symlink testing is subject to race conditions that make it
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Normally, if multiple <directive>Options</directive> could
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive apply to a directory, then the most specific one is used and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive others are ignored; the options are not merged. (See <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/sections.html#mergin">how sections are merged</a>.)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Options</directive> directive are preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>+</code> or <code>-</code> symbol, the options are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive merged. Any options preceded by a <code>+</code> are added to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive options currently in force, and any options preceded by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> are removed from the options currently in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive force. </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Mixing <directive>Options</directive> with a <code>+</code> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-</code> with those without is not valid syntax, and is likely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to cause unexpected results.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, without any <code>+</code> and <code>-</code> symbols:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options +Includes -Indexes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Includes</code> are set for the <code>/web/docs/spec</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>The default in the absence of any other settings is
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Limits the CPU consumption of processes launched
7fbd7281d06cec1918aa370214df77c572f871a9sfby Apache httpd children</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>RLimitCPU <var>seconds</var>|max [<var>seconds</var>|max]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context><context>.htaccess</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>Takes 1 or 2 parameters. The first parameter sets the soft
7fbd7281d06cec1918aa370214df77c572f871a9sf resource limit for all processes and the second parameter sets
7fbd7281d06cec1918aa370214df77c572f871a9sf the maximum resource limit. Either parameter can be a number,
7fbd7281d06cec1918aa370214df77c572f871a9sf or <code>max</code> to indicate to the server that the limit should
7fbd7281d06cec1918aa370214df77c572f871a9sf be set to the maximum allowed by the operating system
7fbd7281d06cec1918aa370214df77c572f871a9sf configuration. Raising the maximum resource limit requires that
7fbd7281d06cec1918aa370214df77c572f871a9sf the server is running as <code>root</code>, or in the initial startup
7fbd7281d06cec1918aa370214df77c572f871a9sf phase.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>This applies to processes forked off from Apache httpd children
7fbd7281d06cec1918aa370214df77c572f871a9sf servicing requests, not the Apache httpd children themselves. This
7fbd7281d06cec1918aa370214df77c572f871a9sf includes CGI scripts and SSI exec commands, but not any
7fbd7281d06cec1918aa370214df77c572f871a9sf processes forked off from the Apache httpd parent such as piped
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>CPU resource limits are expressed in seconds per
7fbd7281d06cec1918aa370214df77c572f871a9sf process.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><directive module="core">RLimitMEM</directive></seealso>
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><directive module="core">RLimitNPROC</directive></seealso>
7fbd7281d06cec1918aa370214df77c572f871a9sf</directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<directivesynopsis>
7fbd7281d06cec1918aa370214df77c572f871a9sf<description>Limits the memory consumption of processes launched
7fbd7281d06cec1918aa370214df77c572f871a9sfby Apache httpd children</description>
7fbd7281d06cec1918aa370214df77c572f871a9sf<syntax>RLimitMEM <var>bytes</var>|max [<var>bytes</var>|max]</syntax>
7fbd7281d06cec1918aa370214df77c572f871a9sf<contextlist><context>server config</context><context>virtual host</context>
7fbd7281d06cec1918aa370214df77c572f871a9sf<context>directory</context><context>.htaccess</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>Takes 1 or 2 parameters. The first parameter sets the soft
7fbd7281d06cec1918aa370214df77c572f871a9sf resource limit for all processes and the second parameter sets
7fbd7281d06cec1918aa370214df77c572f871a9sf the maximum resource limit. Either parameter can be a number,
7fbd7281d06cec1918aa370214df77c572f871a9sf or <code>max</code> to indicate to the server that the limit should
7fbd7281d06cec1918aa370214df77c572f871a9sf be set to the maximum allowed by the operating system
7fbd7281d06cec1918aa370214df77c572f871a9sf configuration. Raising the maximum resource limit requires that
7fbd7281d06cec1918aa370214df77c572f871a9sf the server is running as <code>root</code>, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache httpd children
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servicing requests, not the Apache httpd children themselves. This
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache httpd parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<seealso><directive module="core">RLimitCPU</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<seealso><directive module="core">RLimitNPROC</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
8b052d682204371decc64f942aede5ef1da98955erikabele<description>Limits the number of processes that can be launched by
8b052d682204371decc64f942aede5ef1da98955erikabeleprocesses launched by Apache httpd children</description>
8b052d682204371decc64f942aede5ef1da98955erikabele<syntax>RLimitNPROC <var>number</var>|max [<var>number</var>|max]</syntax>
8b052d682204371decc64f942aede5ef1da98955erikabele<default>Unset; uses operating system defaults</default>
8b052d682204371decc64f942aede5ef1da98955erikabele<contextlist><context>server config</context><context>virtual host</context>
8b052d682204371decc64f942aede5ef1da98955erikabele<context>directory</context><context>.htaccess</context></contextlist>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>Takes 1 or 2 parameters. The first parameter sets the soft
7fbd7281d06cec1918aa370214df77c572f871a9sf resource limit for all processes and the second parameter sets
fd410ae1fa431e734e6d0cd3c006002d4904466apoirier the maximum resource limit. Either parameter can be a number,
7fbd7281d06cec1918aa370214df77c572f871a9sf or <code>max</code> to indicate to the server that the limit
7fbd7281d06cec1918aa370214df77c572f871a9sf should be set to the maximum allowed by the operating system
7fbd7281d06cec1918aa370214df77c572f871a9sf configuration. Raising the maximum resource limit requires that
7fbd7281d06cec1918aa370214df77c572f871a9sf the server is running as <code>root</code>, or in the initial startup
7fbd7281d06cec1918aa370214df77c572f871a9sf phase.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>This applies to processes forked off from Apache httpd children
7fbd7281d06cec1918aa370214df77c572f871a9sf servicing requests, not the Apache httpd children themselves. This
7fbd7281d06cec1918aa370214df77c572f871a9sf includes CGI scripts and SSI exec commands, but not any
7fbd7281d06cec1918aa370214df77c572f871a9sf processes forked off from the Apache httpd parent such as piped
7fbd7281d06cec1918aa370214df77c572f871a9sf <p>Process limits control the number of processes per user.</p>
7fbd7281d06cec1918aa370214df77c572f871a9sf under user ids other than the web server user id, this directive
7fbd7281d06cec1918aa370214df77c572f871a9sf will limit the number of processes that the server itself can
7fbd7281d06cec1918aa370214df77c572f871a9sf create. Evidence of this situation will be indicated by
7fbd7281d06cec1918aa370214df77c572f871a9sf <strong><code>cannot fork</code></strong> messages in the
7fbd7281d06cec1918aa370214df77c572f871a9sf<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitCPU</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Technique for locating the interpreter for CGI
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivescripts</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>ScriptInterpreterSource Registry|Registry-Strict|Script</syntax>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<contextlist><context>server config</context><context>virtual host</context>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Win32 only;
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveoption <code>Registry-Strict</code> is available in Apache HTTP Server 2.0 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivelater</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache httpd finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. The default setting is
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <code>Script</code>. This causes Apache httpd to use the interpreter pointed to
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen by the shebang line (first line, starting with <code>#!</code>) in the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen script. On Win32 systems this line usually looks like:</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>or, if <code>perl</code> is in the <code>PATH</code>, simply:</p>
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>Setting <code>ScriptInterpreterSource Registry</code> will
6beba165aeced2ca77a6f1593ee08c47a32099efcovener cause the Windows Registry tree <code>HKEY_CLASSES_ROOT</code> to be
6beba165aeced2ca77a6f1593ee08c47a32099efcovener searched using the script file extension (e.g., <code>.pl</code>) as a
6beba165aeced2ca77a6f1593ee08c47a32099efcovener search key. The command defined by the registry subkey
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <code>Shell\ExecCGI\Command</code> or, if it does not exist, by the subkey
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <code>Shell\Open\Command</code> is used to open the script file. If the
6beba165aeced2ca77a6f1593ee08c47a32099efcovener registry keys cannot be found, Apache httpd falls back to the behavior of the
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <p>Be careful when using <code>ScriptInterpreterSource
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim module="mod_alias">ScriptAlias</directive>'ed directories, because
7a975d0413ba303546b7619e4785cb641f7f09fdcovener Apache httpd will try to execute <strong>every</strong> file within this
7a975d0413ba303546b7619e4785cb641f7f09fdcovener directory. The <code>Registry</code> setting may cause undesired
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim program calls on files which are typically not executed. For
7a975d0413ba303546b7619e4785cb641f7f09fdcovener example, the default open command on <code>.htm</code> files on
7a975d0413ba303546b7619e4785cb641f7f09fdcovener most Windows systems will execute Microsoft Internet Explorer, so
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim any HTTP request for an <code>.htm</code> file existing within the
7a975d0413ba303546b7619e4785cb641f7f09fdcovener script directory would start the browser in the background on the
7a975d0413ba303546b7619e4785cb641f7f09fdcovener server. This is a good way to crash your system within a minute or
7a975d0413ba303546b7619e4785cb641f7f09fdcovener <p>The option <code>Registry-Strict</code> which is new in Apache HTTP Server
7a975d0413ba303546b7619e4785cb641f7f09fdcovener 2.0 does the same thing as <code>Registry</code> but uses only the
6beba165aeced2ca77a6f1593ee08c47a32099efcovener <code>ExecCGI</code> key is not a common one. It must be
6beba165aeced2ca77a6f1593ee08c47a32099efcovener configured manually in the windows registry and hence prevents
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accidental program calls on your system.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</directivesynopsis>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<directivesynopsis>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<description>Determine if mod_status displays the first 63 characters
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjimof a request or the last 63, assuming the request itself is greater than
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim63 chars.</description>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<contextlist><context>server config</context></contextlist>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<compatibility>Available in Apache httpd 2.2.7 and later.</compatibility>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim displays the actual request being handled.
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim For historical purposes, only 63 characters of the request
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim are actually stored for display purposes. This directive
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim controls whether the 1st 63 characters are stored (the previous
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim behavior and the default) or if the last 63 characters are. This
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim is only applicable, of course, if the length of the request is
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim 64 characters or greater.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim >GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</code
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim > mod_status displays as follows:
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <td>GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples</td>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <td>orage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1</td>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</directivesynopsis>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<directivesynopsis>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<description>Email address that the server includes in error
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjimmessages sent to the client</description>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<syntax>ServerAdmin <var>email-address</var>|<var>URL</var></syntax>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim<contextlist><context>server config</context><context>virtual host</context>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim</contextlist>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>The <directive>ServerAdmin</directive> sets the contact address
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim that the server includes in any error messages it returns to the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim client. If the <code>httpd</code> doesn't recognize the supplied argument
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim as an URL, it
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim assumes, that it's an <var>email-address</var> and prepends it with
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <code>mailto:</code> in hyperlink targets. However, it's recommended to
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim actually use an email address, since there are a lot of CGI scripts that
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim make that assumption. If you want to use an URL, it should point to another
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim server under your control. Otherwise users may not be able to contact you in
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim case of errors.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>It may be worth setting up a dedicated address for this, e.g.</p>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim ServerAdmin www-admin@foo.example.com
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim </example>
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim <p>as users do not always mention that they are talking about the
f7acc4b00a8bf92fea10fce6ac09aa57eafec0ecjim server!</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Alternate names for a host used when matching requests
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickto name-virtual hosts</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>ServerAlias <var>hostname</var> [<var>hostname</var>] ...</syntax>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<contextlist><context>virtual host</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>ServerAlias</directive> directive sets the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick alternate names for a host, for use with <a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick href="/vhosts/name-based.html">name-based virtual hosts</a>. The
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive>ServerAlias</directive> may include wildcards, if appropriate.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <VirtualHost *:80><br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick # ...<br />
a0fed3e26656887c8458aa1081d516d08ced3c84trawick </VirtualHost>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Hostname and port that the server uses to identify
a0fed3e26656887c8458aa1081d516d08ced3c84trawickitself</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>ServerName [<var>scheme</var>://]<var>fully-qualified-domain-name</var>[:<var>port</var>]</syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<compatibility>In version 2.0, this
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directive supersedes the functionality of the <directive>Port</directive>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directive from version 1.3.</compatibility>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>ServerName</directive> directive sets the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick request scheme, hostname and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick port that the server uses to identify itself. This is used when
a0fed3e26656887c8458aa1081d516d08ced3c84trawick creating redirection URLs. For example, if the name of the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor machine hosting the web server is <code>simple.example.com</code>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick but the machine also has the DNS alias <code>www.example.com</code>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick and you wish the web server to be so identified, the following
a0fed3e26656887c8458aa1081d516d08ced3c84trawick directive should be used:</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>If no <directive>ServerName</directive> is specified, then the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick server attempts to deduce the hostname by performing a reverse
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick lookup on the IP address. If no port is specified in the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <directive>ServerName</directive>, then the server will use the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick port from the incoming request. For optimal reliability and
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick predictability, you should specify an explicit hostname and port
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick using the <directive>ServerName</directive> directive.</p>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick href="/vhosts/name-based.html">name-based virtual hosts</a>,
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive type="section" module="core">VirtualHost</directive>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor section specifies what hostname must appear in the request's
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <code>Host:</code> header to match this virtual host.</p>
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <p>Sometimes, the server runs behind a device that processes SSL,
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick such as a reverse proxy, load balancer or SSL offload
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick appliance. When this is the case, specify the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick <code>https://</code> scheme and the port number to which the
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick clients connect in the <directive>ServerName</directive> directive
bf0e7f6393e91c0a7c15cb0d889a4238c973dc2etrawick to make sure that the server generates the correct
a0fed3e26656887c8458aa1081d516d08ced3c84trawick self-referential URLs.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>See the description of the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive module="core">UseCanonicalName</directive> and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <directive module="core">UseCanonicalPhysicalPort</directive> directives for
a0fed3e26656887c8458aa1081d516d08ced3c84trawick settings which determine whether self-referential URLs (e.g., by the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick specified port, or to the port number given in the client's request.
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/vhosts/">Apache HTTP Server virtual host
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">UseCanonicalName</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">NameVirtualHost</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><directive module="core">ServerAlias</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor<description>Legacy URL pathname for a name-based virtual host that
a0fed3e26656887c8458aa1081d516d08ced3c84trawickis accessed by an incompatible browser</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>virtual host</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>ServerPath</directive> directive sets the legacy
a0fed3e26656887c8458aa1081d516d08ced3c84trawick URL pathname for a host, for use with <a
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Base directory for the server installation</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<syntax>ServerRoot <var>directory-path</var></syntax>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context></contextlist>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <p>The <directive>ServerRoot</directive> directive sets the
031bbbc0d1189b07330e38d0c126820a9ab7795egryzor directory in which the server lives. Typically it will contain the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick subdirectories <code>conf/</code> and <code>logs/</code>. Relative
215694531f7d868b906df96e22a80e6a1d2326a6lgentis paths in other configuration directives (such as <directive
a0fed3e26656887c8458aa1081d516d08ced3c84trawick module="mod_so">LoadModule</directive>, for example) are taken as
a0fed3e26656887c8458aa1081d516d08ced3c84trawick relative to this directory.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><a href="/invoking.html">the <code>-d</code>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><a href="/misc/security_tips.html#serverroot">the
a0fed3e26656887c8458aa1081d516d08ced3c84trawick security tips</a> for information on how to properly set
a0fed3e26656887c8458aa1081d516d08ced3c84trawick permissions on the <directive>ServerRoot</directive></seealso>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<directivesynopsis>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<description>Configures the footer on server-generated documents</description>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<contextlist><context>server config</context><context>virtual host</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick<context>directory</context><context>.htaccess</context>
a0fed3e26656887c8458aa1081d516d08ced3c84trawick</contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>The <directive>ServerSignature</directive> directive allows the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick configuration of a trailing footer line under server-generated
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick documents (error messages, <module>mod_proxy</module> ftp directory
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick listings, <module>mod_info</module> output, ...). The reason why you
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick would want to enable such a footer line is that in a chain of proxies,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick the user often has no possibility to tell which of the chained servers
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick actually produced a returned error message.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick setting, which is the default, suppresses the footer line (and is
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick therefore compatible with the behavior of Apache-1.2 and
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick below). The <code>On</code> setting simply adds a line with the
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick server version number and <directive
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick module="core">ServerName</directive> of the serving virtual host,
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick and the <code>EMail</code> setting additionally creates a
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick "mailto:" reference to the <directive
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick module="core">ServerAdmin</directive> of the referenced
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick document.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>After version 2.0.44, the details of the server version number
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick presented are controlled by the <directive
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick module="core">ServerTokens</directive> directive.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<seealso><directive module="core">ServerTokens</directive></seealso>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick</directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<directivesynopsis>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<description>Configures the <code>Server</code> HTTP response
2b6c7b8eb5fbc43564898aedac730df7e91da475trawickheader</description>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<syntax>ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full</syntax>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick<contextlist><context>server config</context></contextlist>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <p>This directive controls whether <code>Server</code> response
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick header field which is sent back to clients includes a
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick description of the generic OS-type of the server as well as
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick information about compiled-in modules.</p>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <dt><code>ServerTokens Full</code> (or not specified)</dt>
2b6c7b8eb5fbc43564898aedac730df7e91da475trawick <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
a0fed3e26656887c8458aa1081d516d08ced3c84trawick <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.4.1
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This setting applies to the entire server, and cannot be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd enabled or disabled on a virtualhost-by-virtualhost basis.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>After version 2.0.44, this directive also controls the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information presented by the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerSignature</directive> directive.</p>
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <note>Setting <directive>ServerTokens</directive> to less than
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener <code>minimal</code> is not recommended because it makes it more
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener difficult to debug interoperational problems. Also note that
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener disabling the Server: header does nothing at all to make your
fb77c505254b6e9c925e23e734463e87574f8f40kess server more secure; the idea of "security through obscurity"
ffec3e56ff5331a2d732ec07e9d107303fed43f4covener is a myth and leads to a false sense of safety.</note>
05201775eaa6b363b8a119c8aea5db246b967591yoshiki<seealso><directive module="core">ServerSignature</directive></seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetHandler <var>handler-name</var>|None</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Moved into the core in Apache httpd 2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <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
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler imap-file
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>http://servername/status</code> was called, you might put
13e5182a0c199ecc7a73db97b6448a544e940868slive <Location /status><br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess SetHandler server-status<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>You can override an earlier defined <directive>SetHandler</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><strong>Note:</strong> because SetHandler overrides default handlers,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd normal behaviour such as handling of URLs ending in a slash (/) as
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directories or index files is suppressed.</p>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process client requests and POST
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveinput</description>
13e5182a0c199ecc7a73db97b6448a544e940868slive<syntax>SetInputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
13e5182a0c199ecc7a73db97b6448a544e940868slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>The <directive>SetInputFilter</directive> directive sets the
13e5182a0c199ecc7a73db97b6448a544e940868slive filter or filters which will process client requests and POST
13e5182a0c199ecc7a73db97b6448a544e940868slive input when they are received by the server. This is in addition to
b00583f8e126bbb00b06dcf06af06c9d07978701kess any filters defined elsewhere, including the
13e5182a0c199ecc7a73db97b6448a544e940868slive <directive module="mod_mime">AddInputFilter</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
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
0d5b778ac63bc803c0dd1a4fdef371fe7a0f4b57kess content.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>SetOutputFilter <var>filter</var>[;<var>filter</var>...]</syntax>
13e5182a0c199ecc7a73db97b6448a544e940868slive<contextlist><context>server config</context><context>virtual host</context>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic<context>directory</context><context>.htaccess</context>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic</contextlist>
96969ed53a757bd9e0a4d7f2f499c9db5ef7899eigalic <p>The <directive>SetOutputFilter</directive> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess sent to the client. This is in addition to any filters defined
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive elsewhere, including the
13e5182a0c199ecc7a73db97b6448a544e940868slive <directive module="mod_mime">AddOutputFilter</directive>
13e5182a0c199ecc7a73db97b6448a544e940868slive directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, the following configuration will process all files
1c5fe3e61f0f3202ae0f853740d53f3aff4c4afbslive in the <code>/www/data/</code> directory for server-side
13e5182a0c199ecc7a73db97b6448a544e940868slive includes.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive SetOutputFilter INCLUDES<br />
13e5182a0c199ecc7a73db97b6448a544e940868slive </Directory>
13e5182a0c199ecc7a73db97b6448a544e940868slive <p>If more than one filter is specified, they must be separated
13e5182a0c199ecc7a73db97b6448a544e940868slive by semicolons in the order in which they should process the
13e5182a0c199ecc7a73db97b6448a544e940868slive content.</p>
13e5182a0c199ecc7a73db97b6448a544e940868slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
13e5182a0c199ecc7a73db97b6448a544e940868slive</directivesynopsis>
13e5182a0c199ecc7a73db97b6448a544e940868slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Amount of time the server will wait for
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figaliccertain events before failing a request</description>
2cef7e294acb5d8b8b5dcb21a55438da0b73f63figalic<contextlist><context>server config</context><context>virtual host</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>TimeOut</directive> directive defines the length
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of time Apache httpd will wait for I/O in various circumstances:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>When reading data from the client, the length of time to
130d299c4b2b15be45532a176604c71fdc7bea5bnd wait for a TCP packet to arrive if the read buffer is
130d299c4b2b15be45532a176604c71fdc7bea5bnd empty.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>When writing data to the client, the length of time to wait
130d299c4b2b15be45532a176604c71fdc7bea5bnd for an acknowledgement of a packet if the send buffer is
130d299c4b2b15be45532a176604c71fdc7bea5bnd full.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>In <module>mod_cgi</module>, the length of time to wait for
130d299c4b2b15be45532a176604c71fdc7bea5bnd output from a CGI script.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>In <module>mod_ext_filter</module>, the length of time to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wait for output from a filtering process.</li>
fb77c505254b6e9c925e23e734463e87574f8f40kess <li>In <module>mod_proxy</module>, the default timeout value if
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="mod_proxy">ProxyTimeout</directive> is not
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Determines the behaviour on <code>TRACE</code>
130d299c4b2b15be45532a176604c71fdc7bea5bndrequests</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<compatibility>Available in Apache HTTP Server 1.3.34, 2.0.55 and later</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive overrides the behavior of <code>TRACE</code> for both
fb77c505254b6e9c925e23e734463e87574f8f40kess the core server and <module>mod_proxy</module>. The default
fb77c505254b6e9c925e23e734463e87574f8f40kess <code>TraceEnable on</code> permits <code>TRACE</code> requests per
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess RFC 2616, which disallows any request body to accompany the request.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>TraceEnable off</code> causes the core server and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <module>mod_proxy</module> to return a <code>405</code> (Method not
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess allowed) error to the client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Finally, for testing and diagnostic purposes only, request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive bodies may be allowed using the non-compliant <code>TraceEnable
9e0536cd66a389bdaa758a825b8bbd8fea665a3eigalic extended</code> directive. The core (as an origin server) will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrict the request body to 64k (plus 8k for chunk headers if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Transfer-Encoding: chunked</code> is used). The core will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reflect the full headers and all chunk headers with the response
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen body. As a proxy server, the request body is not restricted to 64k.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<description>Undefine the existence of a variable</description>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<contextlist><context>server config</context></contextlist>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>Undoes the effect of a <directive module="core">Define</directive> or
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen of passing a <code>-D</code> argument to <program>httpd</program>.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <p>This directive can be used to toggle the use of <directive module="core"
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen type="section">IfDefine</directive> sections without needing to alter
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen <code>-D</code> arguments in any startup scripts.</p>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen</directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<directivesynopsis>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<description>Configures how the server determines its own name and
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowenport</description>
9f19223e8fb7b99f5f1cc02c8c3c2c6567793262rbowen<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In many situations Apache httpd must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalName On</code> Apache httpd will use the hostname and port
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen specified in the <directive module="core">ServerName</directive>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess directive to construct the canonical name for the server. This name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is used in all self-referential URLs, and for the values of
530eba85dbd41b8a0fa5255d3648d1440199a661slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> in CGIs.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>With <code>UseCanonicalName Off</code> Apache httpd will form
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive self-referential URLs using the hostname and port supplied by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the client if any are supplied (otherwise it will use the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive canonical name, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructed from the client supplied values as well.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen names such as <code>www</code>. You'll notice that if the users
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen type a shortname, and a URL which is a directory, such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www/splat</code>, <em>without the trailing
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen slash</em> then Apache httpd will redirect them to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www.domain.com/splat/</code>. If you have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authentication enabled, this will cause the user to have to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>UseCanonicalName</directive> is set <code>Off</code>, then
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache httpd will redirect to <code>http://www/splat/</code>.</p>
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
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <code>Host:</code> header. With this option Apache httpd does a
ef8e89e090461194ecadd31e8796a2c51e0531a2kess reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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<seealso><directive module="core">UseCanonicalPhysicalPort</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerName</directive></seealso>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<seealso><directive module="mpm_common">Listen</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures how the server determines its own name and
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowenport</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In many situations Apache httpd must construct a <em>self-referential</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL -- that is, a URL that refers back to the same server. With
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>UseCanonicalPhysicalPort On</code> Apache httpd will, when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructing the canonical port for the server to honor
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <directive module="core">UseCanonicalName</directive> directive,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess provide the actual physical port number being used by this request
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen as a potential port. With <code>UseCanonicalPhysicalPort Off</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Apache httpd will not ever use the actual physical port number, instead
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive relying on all configured information to construct a valid port number.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>The ordering of when the physical port is used is as follows:<br /><br />
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>With <code>UseCanonicalPhysicalPort Off</code>, the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive physical ports are removed from the ordering.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">UseCanonicalName</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">ServerName</directive></seealso>
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick<seealso><directive module="mpm_common">Listen</directive></seealso>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Contains directives that apply only to a specific
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehostname or IP address</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><VirtualHost
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <var>addr</var>[:<var>port</var>] [<var>addr</var>[:<var>port</var>]]
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ...> ... </VirtualHost></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p><directive type="section">VirtualHost</directive> and
003f0c9fda6664daf5092a0e42f65ede20098153slive <code></VirtualHost></code> are used to enclose a group of
fb77c505254b6e9c925e23e734463e87574f8f40kess directives that will apply only to a particular virtual host. Any
fb77c505254b6e9c925e23e734463e87574f8f40kess directive that is allowed in a virtual host context may be
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele used. When the server receives a request for a document on a
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele particular virtual host, it uses the configuration directives
003f0c9fda6664daf5092a0e42f65ede20098153slive enclosed in the <directive type="section">VirtualHost</directive>
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <li>A fully qualified domain name for the IP address of the
4cafc94e99922f00654e1779d30c2cccf5278c4fkess virtual host (not recommended);</li>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <li>The character <code>*</code>, which is used only in combination with
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <code>NameVirtualHost *</code> to match all IP addresses; or</li>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <li>The string <code>_default_</code>, which is used only
4cafc94e99922f00654e1779d30c2cccf5278c4fkess with IP virtual hosting to catch unmatched IP addresses.</li>
4cafc94e99922f00654e1779d30c2cccf5278c4fkess <VirtualHost 10.1.2.3><br />
4cafc94e99922f00654e1779d30c2cccf5278c4fkess ServerAdmin webmaster@host.example.com<br />
4cafc94e99922f00654e1779d30c2cccf5278c4fkess </VirtualHost>
6452eaa76913f6ba732f88cfce6d4f8bf142482bkess <p>IPv6 addresses must be specified in square brackets because
4cafc94e99922f00654e1779d30c2cccf5278c4fkess the optional port number could not be determined otherwise. An
27303c8bb552a8a5fc859feb735d686fc59f59a1yoshiki IPv6 example is shown below:</p>
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive <VirtualHost [2001:db8::a00:20ff:fea7:ccea]><br />
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive ServerAdmin webmaster@host.example.com<br />
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive </VirtualHost>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Each Virtual Host must correspond to a different IP address,
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen different port number or a different host name for the server,
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive in the former case the server machine must be configured to
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive accept IP packets for multiple addresses. (If the machine does
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive not have multiple network interfaces, then this can be
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive accomplished with the <code>ifconfig alias</code> command -- if
96a8ac87abbb04c2a925f7fde5eb12bf1d1f4bc3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The use of <directive type="section">VirtualHost</directive> does
a8ee031b2224ce5473826c9d4f603681589245fawrowe <strong>not</strong> affect what addresses Apache httpd listens on. You
a8ee031b2224ce5473826c9d4f603681589245fawrowe may need to ensure that Apache httpd is listening on the correct addresses
a8ee031b2224ce5473826c9d4f603681589245fawrowe using <directive module="mpm_common">Listen</directive>.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>When using IP-based virtual hosting, the special name
a8ee031b2224ce5473826c9d4f603681589245fawrowe which case this virtual host will match any IP address that is
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen not explicitly listed in another virtual host. In the absence
a8ee031b2224ce5473826c9d4f603681589245fawrowe of any <code>_default_</code> virtual host the "main" server config,
a8ee031b2224ce5473826c9d4f603681589245fawrowe consisting of all those definitions outside any VirtualHost
a8ee031b2224ce5473826c9d4f603681589245fawrowe section, is used when no IP-match occurs.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>You can specify a <code>:port</code> to change the port that is
a8ee031b2224ce5473826c9d4f603681589245fawrowe matched. If unspecified then it defaults to the same port as the
a8ee031b2224ce5473826c9d4f603681589245fawrowe most recent <directive module="mpm_common">Listen</directive>
a8ee031b2224ce5473826c9d4f603681589245fawrowe statement of the main server. You may also specify <code>:*</code>
a8ee031b2224ce5473826c9d4f603681589245fawrowe to match all ports on that address. (This is recommended when used
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen <p>A <directive module="core">ServerName</directive> should be
a8ee031b2224ce5473826c9d4f603681589245fawrowe specified inside each <directive
a8ee031b2224ce5473826c9d4f603681589245fawrowe type="section">VirtualHost</directive> block. If it is absent, the
a8ee031b2224ce5473826c9d4f603681589245fawrowe <directive module="core">ServerName</directive> from the "main"
a8ee031b2224ce5473826c9d4f603681589245fawrowe server configuration will be inherited.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe <p>See the <a href="/misc/security_tips.html">security tips</a>
a8ee031b2224ce5473826c9d4f603681589245fawrowe document for details on why your security could be compromised if the
a8ee031b2224ce5473826c9d4f603681589245fawrowe directory where log files are stored is writable by anyone other
a8ee031b2224ce5473826c9d4f603681589245fawrowe than the user that starts the server.</p>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><a href="/vhosts/">Apache HTTP Server Virtual Host documentation</a></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><a href="/dns-caveats.html">Issues Regarding DNS and
a8ee031b2224ce5473826c9d4f603681589245fawrowe which addresses and ports Apache HTTP Server uses</a></seealso>
a8ee031b2224ce5473826c9d4f603681589245fawrowe<seealso><a href="/sections.html">How <Directory>, <Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <Files> sections work</a> for an explanation of how these
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different sections are combined when a request is received</seealso>
003f0c9fda6664daf5092a0e42f65ede20098153slive</directivesynopsis>
2e5e2673cb64d3e4d445d911c6f61ac171020725nd</modulesynopsis>