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