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