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