core.xml revision bea526116133aa3d7dabd1924bfc580b37fbf22a
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<modulesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Core Apache HTTP Server features that are always
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveavailable</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Resources accept trailing pathname information</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>Available in Apache 2.0.30 and later</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether requests that contain trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive pathname information that follows an actual filename (or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive non-existent file in an existing directory) will be accepted or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive rejected. The trailing pathname information can be made
fb77c505254b6e9c925e23e734463e87574f8f40kess available to scripts in the PATH_INFO environment variable.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For example, assume the location <code>/test/</code> points to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory that contains only the single file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The three possible arguments for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AcceptPathInfo</directive> directive are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>off</code></dt><dd>A request will only be accepted if it
fb77c505254b6e9c925e23e734463e87574f8f40kess 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 <dt><code>on</code></dt><dd>A request will be accepted if a
fb77c505254b6e9c925e23e734463e87574f8f40kess leading path component maps to a file that exists. The above
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example <code>/test/here.html/more</code> will be accepted if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/test/here.html</code> maps to a valid file.</dd>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dt><code>default</code></dt><dd>The treatment of requests with
fb77c505254b6e9c925e23e734463e87574f8f40kess 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.
fb77c505254b6e9c925e23e734463e87574f8f40kess Handlers that serve scripts, such as <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="mod_isapi.html">isapi-isa</a>, generally accept PATH_INFO by
fb77c505254b6e9c925e23e734463e87574f8f40kess default.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
fb77c505254b6e9c925e23e734463e87574f8f40kess example, when you use a <a href="/filter.html">filter</a>, such
fb77c505254b6e9c925e23e734463e87574f8f40kess as <a href="mod_include.html">INCLUDES</a>, to generate content
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive based on PATH_INFO. The core handler would usually reject the
fb77c505254b6e9c925e23e734463e87574f8f40kess request, so you can use the following configuration to enable
fb77c505254b6e9c925e23e734463e87574f8f40kess such a script:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Options +Includes<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd SetOutputFilter INCLUDES<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd AcceptPathInfo on<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd</Files>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Name of the distributed configuration file</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>AccessFileName <em>filename</em> [<em>filename</em>] ...</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When returning a document to the client the server looks for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the first existing configuration file from this list of names in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive every directory of the path to the document, if distributed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration files are enabled for that directory. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example:</p>
003f0c9fda6664daf5092a0e42f65ede20098153sliveAccessFileName .acl
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>before returning the document
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/local/web/index.html</code>, the server will read
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>/usr/local/.acl</code> and <code>/usr/local/web/.acl</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive for directives, unless they have been disabled with</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</Directory>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><directive module="core">AllowOverride</directive></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/configuring.html">Configuration Files</a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Default character set to be added for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveresponse without an explicit character set</description>
1a3f62ca37273a15a06bb94a61d3c6fcf4bf38c9rbowen<syntax>AddDefaultCharset On|Off|<em>charset</em></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>virtual host</context><context>directory</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the name of the character set that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive will be added to any response that does not have any parameter on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the content type in the HTTP headers. This will override any
003f0c9fda6664daf5092a0e42f65ede20098153slive character set specified in the body of the document via a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>META</code> tag. A setting of <code>AddDefaultCharset
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Off</code> disables this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive functionality. <code>AddDefaultCharset On</code> enables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Apache's internal default charset of <code>iso-8859-1</code> as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive required by the directive. You can also specify an alternate
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AddDefaultCharset utf-8
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Types of directives that are allowed in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive.htaccess files</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When the server finds an .htaccess file (as specified by <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="core">AccessFileName</directive>) it needs to know
58699879a562774640b95e9eedfd891f336e38c2nd which directives declared in that file can override earlier
58699879a562774640b95e9eedfd891f336e38c2nd access information.</p>
58699879a562774640b95e9eedfd891f336e38c2nd .htaccess files are completely ignored. In this case, the
58699879a562774640b95e9eedfd891f336e38c2nd server will not even attempt to read .htaccess files in the
58699879a562774640b95e9eedfd891f336e38c2nd filesystem.</p>
58699879a562774640b95e9eedfd891f336e38c2nd <p>When this directive is set to <code>All</code>, then any
58699879a562774640b95e9eedfd891f336e38c2nd directive which has the .htaccess <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="directive-dict.html#Context">Context</a> is allowed in
fb77c505254b6e9c925e23e734463e87574f8f40kess .htaccess files.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <em>directive-type</em> can be one of the following
fb77c505254b6e9c925e23e734463e87574f8f40kess groupings of directives.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess Allow use of the authorization directives (<directive
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="mod_auth_dbm">AuthDBMUserFile</directive>,
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive module="core">AuthType</directive>, <directive
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Require</directive>, <em>etc.</em>).</dd>
58699879a562774640b95e9eedfd891f336e38c2nd Allow use of the directives controlling document types (<directive
58699879a562774640b95e9eedfd891f336e38c2nd <directive module="core">SetHandler</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd Allow use of the directives controlling directory indexing
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd (<directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <directive module="mod_autoindex">AddIcon</directive>, <directive
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd <directive module="mod_autoindex">AddIconByType</directive>,
ec9b02c6869b75575ada34c800672162833a2c06nd <directive module="mod_autoindex">DefaultIcon</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_autoindex">FancyIndexing</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_autoindex">HeaderName</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_autoindex">IndexIgnore</directive>, <directive
58699879a562774640b95e9eedfd891f336e38c2nd module="mod_autoindex">IndexOptions</directive>, <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Allow use of the directives controlling host access (<directive
fb77c505254b6e9c925e23e734463e87574f8f40kess Allow use of the directives controlling specific directory
fb77c505254b6e9c925e23e734463e87574f8f40kess features (<directive module="core">Options</directive> and
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <directive module="mod_include">XBitHack</directive>).</dd>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<seealso><directive module="core">AccessFileName</directive></seealso>
10673857794a4b3d9568ca2d983722a87ed352f1rbowen<seealso><a href="/configuring.html">Configuration Files</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/htaccess.html">.htaccess Files</a></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Authorization realm for use in HTTP
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveauthentication</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive sets the name of the authorization realm for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. This realm is given to the client so that the user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive knows which username and password to send.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>AuthName</directive> takes a single argument; if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive realm name contains spaces, it must be enclosed in quotation
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive marks. It must be accompanied by <directive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="core">AuthType</directive> and <directive
1f53e295ebd19aed1767d12da7abfab9936c148cjerenkrantz module="core">Require</directive> directives, and directives such
9ed9eaf871c58d281af02e76125ceadb5060afa5nd as <directive module="mod_auth">AuthUserFile</directive> and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <directive module="mod_auth">AuthGroupFile</directive> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The string provided for the <code>AuthRealm</code> is what will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive appear in the password dialog provided by most browsers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/howto/auth.html">Authentication, Authorization, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive selects the type of user authentication for a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory. Only <code>Basic</code> and <code>Digest</code> are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive currently implemented.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive It must be accompanied by <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Require</directive> directives, and directives such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <directive module="mod_auth">AuthUserFile</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_auth">AuthGroupFile</directive> to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/howto/auth.html">Authentication, Authorization,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd<description>Technique for locating the interpreter for CGI
9ed9eaf871c58d281af02e76125ceadb5060afa5ndscripts</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. For example, setting <code>CGIMapExtension sys:\foo.nlm .foo</code> will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive cause all CGI script files with a .foo extension to be passed to the FOO interpreter.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables the generation of Content-MD5 HTTP Response
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveheaders</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive enables the generation of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Content-MD5</code> headers as defined in RFC1864
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive respectively RFC2068.</p>
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 <p>The <code>Content-MD5</code> header provides an end-to-end
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive message integrity check (MIC) of the entity-body. A proxy or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client may check this header for detecting accidental
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive modification of the entity-body in transit. Example header:</p>
9ed9eaf871c58d281af02e76125ceadb5060afa5nd Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that this can cause performance problems on your server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive since the message digest is computed on every request (the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd values are not cached).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><code>Content-MD5</code> is only sent for documents served
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by the core, and not by any module. For example, SSI documents,
1c9f7cdf2e1bc8313e559a96638c3c36e3143791yoshiki output from CGI scripts, and byte range responses do not have
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive this header.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>MIME content-type that will be sent if the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver cannot determine a type in any other way</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
530eba85dbd41b8a0fa5255d3648d1440199a661slive</contextlist>
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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess mappings.</p>
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 <p>would be appropriate for a directory which contained many gif
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive images with filenames missing the .gif extension.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes module="core">ForceType</directive>, this directive is only
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes provides the default mime-type. All other mime-type definitions,
fb77c505254b6e9c925e23e734463e87574f8f40kess including filename extensions, that might identify the media type
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes will override this default.</p>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes</directivesynopsis>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes<description>Enclose a group of directives that apply only to the
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholesnamed file-system directory and sub-directories</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess... </Directory></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <p><directive type="section">Directory</directive> and
4c7bdb15764021d39e486adb7bc2166d3f683773bnicholes <code></Directory></code> are used to enclose a group of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives that will apply only to the named directory and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sub-directories of that directory. Any directive that is allowed
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess in a directory context may be used. <em>Directory-path</em> is
fb77c505254b6e9c925e23e734463e87574f8f40kess either the full path to a directory, or a wild-card string using
fb77c505254b6e9c925e23e734463e87574f8f40kess Unix shell-style matching. In a wild-card string, `?' matches any
fb77c505254b6e9c925e23e734463e87574f8f40kess 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><Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /*/public_html></code> will not match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>/home/user/public_html</code>, but <code><Directory
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive /home/*/public_html></code> will match. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p>Be careful with the <em>directory-path</em> arguments: They have
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto literally match the filesystem path which Apache uses to access the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefiles. Directives applied to a particular <Directory> will not
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveapply to files accessed from that same directory via a different path,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivesuch as via different symbolic links.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Extended regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions can also be used, with the addition of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Directory ~ "^/www/.*/[0-9]{3}">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match directories in /www/ that consisted of three
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If multiple (non-regular expression) directory sections
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive match the directory (or its parents) containing a document,
fb77c505254b6e9c925e23e734463e87574f8f40kess then the directives are applied in the order of shortest match
fb77c505254b6e9c925e23e734463e87574f8f40kess first, interspersed with the directives from the <a
fb77c505254b6e9c925e23e734463e87574f8f40kess href="#accessfilename">.htaccess</a> files. For example,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive AllowOverride None<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </Directory><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Directory /home/><br />
76f2a3125fb6aca59d43b02220dabac91175a281slive AllowOverride FileInfo<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>for access to the document <code>/home/web/dir/doc.html</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the steps are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply directive <code>AllowOverride FileInfo</code> (for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>Apply any FileInfo directives in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Regular expressions are not considered until after all of the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd normal sections have been applied. Then all of the regular
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess expressions are tested in the order they appeared in the
fb77c505254b6e9c925e23e734463e87574f8f40kess configuration file. For example, with</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess ... directives here ...<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The regular expression section won't be considered until after
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all normal <Directory>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 <Directory /> is <code>Allow from All</code>. This means
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that Apache will serve any file mapped from an URL. It is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommended that you change this with a block such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Directory /><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from All<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </Directory>
fb77c505254b6e9c925e23e734463e87574f8f40kess href="/misc/security_tips.html">Security Tips</a> page for more
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The directory sections typically occur in
003f0c9fda6664daf5092a0e42f65ede20098153slive the access.conf file, but they may appear in any configuration
003f0c9fda6664daf5092a0e42f65ede20098153slive file. <directive type="section">Directory</directive> directives
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd cannot nest, and cannot appear in a <directive module="core"
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section">Limit</directive> or <directive module="core"
130d299c4b2b15be45532a176604c71fdc7bea5bnd Directory, Location and Files sections work</a> for an
130d299c4b2b15be45532a176604c71fdc7bea5bnd explanation of how these different sections are combined when a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd request is received</seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Enclose directives that apply to
fb77c505254b6e9c925e23e734463e87574f8f40kessfile-system directories matching a regular expression and their
fb77c505254b6e9c925e23e734463e87574f8f40kesssubdirectories</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd... </Directory></syntax>
b06660a3ed3d885e15d99c0209a46c4657df33fbrbowen<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p><directive type="section">DirectoryMatch</directive> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code></DirectoryMatch></code> are used to enclose a group
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd of directives which will apply only to the named directory and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd sub-directories of that directory, the same as <directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core" type="section">Directory</directive>. However, it
fb77c505254b6e9c925e23e734463e87574f8f40kess takes as an argument a regular expression. For example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <DirectoryMatch "^/www/.*/[0-9]{3}">
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>would match directories in <code>/www/</code> that consisted of three
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive numbers.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive type="section" module="core">Directory</directive> for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea description of how regular expressions are mixed in with normal
130d299c4b2b15be45532a176604c71fdc7bea5bndhref="/sections.html">How Directory, Location and Files sections
130d299c4b2b15be45532a176604c71fdc7bea5bndwork</a> for an explanation of how these different sections are
130d299c4b2b15be45532a176604c71fdc7bea5bndcombined when a request is received</seealso>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Directory that forms the main document tree visible
130d299c4b2b15be45532a176604c71fdc7bea5bndfrom the web</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
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 <p>then an access to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>http://www.my.host.com/index.html</code> refers to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>DocumentRoot</directive> should be specified without
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a trailing slash.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/urlmapping.html">Mapping URLs to Filesystem
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Use memory-mapping to read files during delivery</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>This directive controls whether the httpd may use
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess memory-mapping if it needs to read the contents of a file during
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess memory-maps the file if the OS supports it.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive This memory-mapping sometimes yields a performance improvement.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive But in some environments, it is better to disable the memory-mapping
130d299c4b2b15be45532a176604c71fdc7bea5bnd to prevent operational problems:
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>On some multiprocessor systems, memory-mapping can reduce the
130d299c4b2b15be45532a176604c71fdc7bea5bnd performance of the httpd.</li>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <li>With an NFS-mounted <directive module="core">DocumentRoot</directive>,
130d299c4b2b15be45532a176604c71fdc7bea5bnd the httpd may crash due tof a segmentation fault if a file is deleted
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or truncated while the httpd has it memory-mapped.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive For server configurations that are vulnerable to these problems,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive you should disable memory-mapping of delivered files by specifying:
fb77c505254b6e9c925e23e734463e87574f8f40kess EnableMMAP off
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>What the server will return to the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivein case of an error</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ErrorDocument <em>error-code document</em></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<compatibility>Quoting syntax for text messages is different in Apache
15ba1801088da1aad6d20609cf3f7b0b1eefce8aslive2.0</compatibility>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>In the event of a problem or error, Apache can be configured
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to do one of four things,</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>redirect to a local <em>URL-path</em> to handle the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The first option is the default, while options 2-4 are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configured using the <directive>ErrorDocument</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive, which is followed by the HTTP response code and a URL
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive or a message. Apache will sometimes offer additional information
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>URLs can begin with a slash (/) for local URLs, or be a full
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL which the client can resolve. Alternatively, a message can
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess be provided to be displayed by the browser. Examples:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ErrorDocument 500
003f0c9fda6664daf5092a0e42f65ede20098153slive ErrorDocument 403 "Sorry can't allow you access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that when you specify an <directive>ErrorDocument</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that points to a remote URL (ie. anything with a method such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "http" in front of it), Apache will send a redirect to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive client to tell it where to find the document, even if the
fb77c505254b6e9c925e23e734463e87574f8f40kess document ends up being on the same server. This has several
fb77c505254b6e9c925e23e734463e87574f8f40kess implications, the most important being that the client will not
fb77c505254b6e9c925e23e734463e87574f8f40kess receive the original error status code, but instead will
fb77c505254b6e9c925e23e734463e87574f8f40kess receive a redirect status code. This in turn can confuse web
fb77c505254b6e9c925e23e734463e87574f8f40kess robots and other clients which try to determine if a URL is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd valid using the status code. In addition, if you use a remote
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd URL in an <code>ErrorDocument 401</code>, the client will not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd know to prompt the user for a password since it will not
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd receive the 401 status code. Therefore, <strong>if you use an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd "ErrorDocument 401" directive then it must refer to a local
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Microsoft Internet Explorer (MSIE) will ignore server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error messages when they are "too small" and substitute its own
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "friendly" error messages. The size threshold varies depending on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error rather than masking it. More information is available in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Microsoft Knowledgebase article <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp <p>Prior to version 2.0, messages were indicated by prefixing
af18698b10b429b270551ca3a5d51a75e1c9db22brianp them with a single unmatched double quote character.</p>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp</directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<directivesynopsis>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<description>Location where the server will log errors</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax> ErrorLog <em>file-path</em>|syslog[:<em>facility</em>]</syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>ErrorLog</directive> directive sets the name of
af18698b10b429b270551ca3a5d51a75e1c9db22brianp the file to which the server will log any errors it encounters. If
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd the <em>file-path</em> does not begin with a slash (/) then it is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd assumed to be relative to the <directive
af18698b10b429b270551ca3a5d51a75e1c9db22brianp module="core">ServerRoot</directive>. If the <em>file-path</em>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp begins with a pipe (|) then it is assumed to be a command to spawn
fb77c505254b6e9c925e23e734463e87574f8f40kess to handle the error log.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Using <code>syslog</code> instead of a filename enables logging
fb77c505254b6e9c925e23e734463e87574f8f40kess via syslogd(8) if the system supports it. The default is to use
fb77c505254b6e9c925e23e734463e87574f8f40kess syslog facility <code>local7</code>, but you can override this by
af18698b10b429b270551ca3a5d51a75e1c9db22brianp using the <code>syslog:</code><em>facility</em> syntax where
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <em>facility</em> can be one of the names usually documented in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd syslog(1).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/misc/security_tips.html#serverroot">security tips</a>
fb77c505254b6e9c925e23e734463e87574f8f40kess document for details on why your security could be compromised
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd if the directory where logfiles are stored is writable by
41ef8b3051855b802104193ee0a587515af60a37wrowe anyone other than the user that starts the server.</p>
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><directive module="core">LogLevel</directive></seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe<seealso><a href="/logs.html">Apache Log Files</a></seealso>
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>File attributes used to create the ETag
41ef8b3051855b802104193ee0a587515af60a37wroweHTTP response header</description>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe<context>directory</context><context>.htaccess</context>
41ef8b3051855b802104193ee0a587515af60a37wrowe</contextlist>
41ef8b3051855b802104193ee0a587515af60a37wrowe The <directive>FileETag</directive> directive configures the file
41ef8b3051855b802104193ee0a587515af60a37wrowe attributes that are used to create the ETag (entity tag) response
41ef8b3051855b802104193ee0a587515af60a37wrowe header field when the document is based on a file. (The ETag
41ef8b3051855b802104193ee0a587515af60a37wrowe value is used in cache management to save network bandwidth.) In
9fb925624300c864fe3969a264e52aa83f3c2dd0slive Apache 1.3.22 and earlier, the ETag value was <em>always</em> formed
41ef8b3051855b802104193ee0a587515af60a37wrowe from the file's inode, size, and last-modified time (mtime). The
41ef8b3051855b802104193ee0a587515af60a37wrowe FileETag directive allows you to choose which of these -- if any
fb77c505254b6e9c925e23e734463e87574f8f40kess -- should be used. The recognized keywords are:
41ef8b3051855b802104193ee0a587515af60a37wrowe <dd>The file's i-node number will be included in the calculation</dd>
41ef8b3051855b802104193ee0a587515af60a37wrowe <dd>The date and time the file was last modified will be included</dd>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <dd>The number of bytes in the file will be included</dd>
41ef8b3051855b802104193ee0a587515af60a37wrowe <dd>All available fields will be used (equivalent to
41ef8b3051855b802104193ee0a587515af60a37wrowe '<code>FileETag INode MTime Size</code>')</dd>
41ef8b3051855b802104193ee0a587515af60a37wrowe <dd>If a document is file-based, no ETag field will be included in the
41ef8b3051855b802104193ee0a587515af60a37wrowe response</dd>
9fb925624300c864fe3969a264e52aa83f3c2dd0slive The INode, MTime, and Size keywords may be prefixed with either '+'
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess or '-', which allow changes to be made to the default setting
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess inherited from a broader scope. Any keyword appearing without
9fb925624300c864fe3969a264e52aa83f3c2dd0slive such a prefix immediately and completely cancels the inherited
05201775eaa6b363b8a119c8aea5db246b967591yoshiki If a directory's configuration includes
41ef8b3051855b802104193ee0a587515af60a37wrowe '<code>FileETag INode MTime Size</code>', and a
41ef8b3051855b802104193ee0a587515af60a37wrowe subdirectory's includes '<code>FileETag -INode</code>',
fb77c505254b6e9c925e23e734463e87574f8f40kess the setting for that subdirectory (which will be inherited by
41ef8b3051855b802104193ee0a587515af60a37wrowe any sub-subdirectories that don't override it) will be equivalent to
41ef8b3051855b802104193ee0a587515af60a37wrowe</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<description>Contains directives that apply to matched
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessfilenames</description>
41ef8b3051855b802104193ee0a587515af60a37wrowe<syntax><Files <em>filename</em>> ... </Files></syntax>
41ef8b3051855b802104193ee0a587515af60a37wrowe<contextlist><context>server config</context><context>virtual host</context>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp<context>directory</context><context>.htaccess</context>
af18698b10b429b270551ca3a5d51a75e1c9db22brianp</contextlist>
003f0c9fda6664daf5092a0e42f65ede20098153slive <p>The <directive type="section">Files</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provides for access control by filename. It is comparable to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core" type="directive">Directory</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="directive">Location</directive> directives. It should be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive matched with a <code></Files></code> directive. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives given within this section will be applied to any object
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive with a basename (not a full path) matching the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified filename. <directive type="section">Files</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections are processed in the order they appear in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file, after the <directive module="core"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>.htaccess</code> files are read, but before <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Location</directive> sections. Note
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that <directive type="section">Files</directive> can be nested
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> sections to restrict the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive portion of the filesystem they apply to.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <em>filename</em> argument should include a filename, or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a wild-card string, where `?' matches any single character, and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive `*' matches any sequences of characters. Extended regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Files ~ "\.(gif|jpe?g|png)$">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>would match most common Internet graphics formats. In Apache 1.3
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">FilesMatch</directive> is preferred, however.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Directory</directive> and <directive type="section"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">Location</directive> sections, <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Files</directive> sections can be used inside
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive .htaccess files. This allows users to control access to their own
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd files, at a file-by-file level.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Directory, Location and Files sections work</a> for an
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd explanation of how these different sections are combined when a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request is received</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply to regular-expression matched
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefilenames</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><FilesMatch <em>regex</em>> ... </FilesMatch></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The <directive type="section">FilesMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provides for access control by filename, just as the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core" type="section">Files</directive> directive
fb77c505254b6e9c925e23e734463e87574f8f40kess does. However, it accepts a regular expression. For example:</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <FilesMatch "\.(gif|jpe?g|png)$">
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive <p>would match most common Internet graphics formats.</p>
4f854c24127e28f7ad72ce9a39d4448aaf910fc1slive 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<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be served with the specified
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveMIME content-type</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<compatibility>Moved to the core in Apache 2.0</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When placed into an <code>.htaccess</code> file or a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Directory</directive>, or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Location</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Files</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be served
ef8e89e090461194ecadd31e8796a2c51e0531a2kess with the content type identification given by
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <em>mime-type</em>. For example, if you had a directory full of
fb109b84906e3ee61680aa289953c2f9e859354erbowen GIF files, but did not want to label them all with ".gif", you
fb109b84906e3ee61680aa289953c2f9e859354erbowen might want to use:</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>Note that unlike <directive module="core">DefaultType</directive>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive this directive overrides all mime-type associations, including
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive filename extensions, that might identify the media type.</p>
fb109b84906e3ee61680aa289953c2f9e859354erbowen</directivesynopsis>
fb109b84906e3ee61680aa289953c2f9e859354erbowen<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables DNS lookups on client IP addresses</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
fb109b84906e3ee61680aa289953c2f9e859354erbowen <p>This directive enables DNS lookups so that host names can be
fb109b84906e3ee61680aa289953c2f9e859354erbowen logged (and passed to CGIs/SSIs in <code>REMOTE_HOST</code>).
fb109b84906e3ee61680aa289953c2f9e859354erbowen The value <code>double</code> refers to doing double-reverse
fb109b84906e3ee61680aa289953c2f9e859354erbowen 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
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <p>Regardless of the setting, when <module>mod_access</module> is
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes used for controlling access by hostname, a double reverse lookup
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes will be performed. This is necessary for security. Note that the
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes result of this double-reverse isn't generally available unless you
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes set <code>HostnameLookups double</code>. For example, if only
2bac697634d965d9d9a921a99a68b2c454c8a95dbnicholes <code>HostnameLookups on</code> and a request is made to an object
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that is protected by hostname restrictions, regardless of whether
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the double-reverse fails or not, CGIs will still be passed the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive single-reverse result in <code>REMOTE_HOST</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <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
003f0c9fda6664daf5092a0e42f65ede20098153slive don't have to suffer the extra latency that a lookup entails.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Heavily loaded sites should leave this directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>off</code>, since DNS lookups can take considerable
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele amounts of time. The utility <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/programs/logresolve.html">logresolve</a>, provided in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the <em>/support</em> directory, can be used to look up host
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names from logged IP addresses offline.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Enables logging of the RFC1413 identity of the remote
fb77c505254b6e9c925e23e734463e87574f8f40kessuser</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This directive enables RFC1413-compliant logging of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive remote user name for each connection, where the client machine
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd runs identd or something similar. This information is logged in
530eba85dbd41b8a0fa5255d3648d1440199a661slive the access log.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The information should not be trusted in any way except for
530eba85dbd41b8a0fa5255d3648d1440199a661slive rudimentary usage tracking.</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>Note that this can cause serious latency problems accessing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your server since every request requires one of these lookups
530eba85dbd41b8a0fa5255d3648d1440199a661slive to be performed. When firewalls are involved each lookup might
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd possibly fail and add 30 seconds of latency to each hit. So in
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd general this is not very useful on public servers accessible
530eba85dbd41b8a0fa5255d3648d1440199a661slive from the Internet.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Encloses directives that will be processed only
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndif a test is true at startup</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax><IfDefine [!]<em>parameter-name</em>> <em>...</em>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </IfDefine></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>test</em>>...</IfDefine></code> section is used to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mark directives that are conditional. The directives within an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">IfDefine</directive> section are only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processed if the <em>test</em> is true. If <em>test</em> is false,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive everything between the start and end markers is ignored.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd type="section">IfDefine</directive> section directive can be one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of two forms:</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>In the former case, the directives between the start and end
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess markers are only processed if the parameter named
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <em>parameter-name</em> is defined. The second format reverses
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the test, and only processes the directives if
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <em>parameter-name</em> is <strong>not</strong> defined.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <em>parameter-name</em> argument is a define as given on
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>-D</code><em>parameter-</em>, at the time the server was
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive started.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfDefine</directive> sections are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nest-able, which can be used to implement simple
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive multiple-parameter tests. Example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive $ httpd -DReverseProxy ...
fb77c505254b6e9c925e23e734463e87574f8f40kess <IfDefine ReverseProxy>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </IfDefine>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Encloses directives that are processed conditional on the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivepresence of absence of a specific module</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><IfModule [!]<em>module-name</em>> <em>...</em>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </IfModule></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <em>test</em>>...</IfModule></code> section is used to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mark directives that are conditional on the presence of a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specific module. The directives within an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section">IfModule</directive> section are only
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processed if the <em>test</em> is true. If <em>test</em> is false,
003f0c9fda6664daf5092a0e42f65ede20098153slive everything between the start and end markers is ignored.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">IfModule</directive> section directive can be one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive of two forms:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In the former case, the directives between the start and end
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd markers are only processed if the module named <em>module
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd name</em> is included in Apache -- either compiled in or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd >LoadModule</directive>. The second format
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive reverses the test, and only processes the directives if <em>module
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess <p>The <em>module name</em> argument is the file name of the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module, at the time it was compiled. For example,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>mod_rewrite.c</code>. If a module consists of several
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess source files, use the name of the file containing the string
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">IfModule</directive> sections are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nest-able, which can be used to implement simple multiple-module
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <note>This section should only be used if you need to have one
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration file that works whether or not a specific module
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive is available. In normal operation, directives need not be
003f0c9fda6664daf5092a0e42f65ede20098153slive placed in <directive type="section">IfModule</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sections.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Includes other configuration files from within
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivethe server configuration files</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Include <em>file-path</em>|<em>directory-path</em></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive allows inclusion of other configuration files
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd from within the server configuration files.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If <directive>Include</directive> points to a directory, rather than a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive file, Apache will read all files in that directory and any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive subdirectory in alphabetical order, and parse those as configuration
7654193c1faf603feec999850322ad79e6c551bcnd files.</p>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd <p>The file path specified may be a fully qualified path (i.e.
7654193c1faf603feec999850322ad79e6c551bcnd starting with a slash), or may be relative to the
7654193c1faf603feec999850322ad79e6c551bcnd <directive module="core">ServerRoot</directive> directory.</p>
7654193c1faf603feec999850322ad79e6c551bcnd <p>Or, providing paths relative to your <code>ServerRoot</code>
7654193c1faf603feec999850322ad79e6c551bcnd directory:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Make sure that an included directory does not contain any stray
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive files, such as editor temporary files, for example, as Apache will
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive attempt to read them in and use the contents as configuration
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directives, which may cause the server to fail on start up.
fb77c505254b6e9c925e23e734463e87574f8f40kess Running <code>apachectl configtest</code> will give you a list of
fb77c505254b6e9c925e23e734463e87574f8f40kess the files that are being processed during the configuration
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive root@host# apachectl configtest
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config directory: /usr/local/apache/conf/vhosts
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Processing config file: /usr/local/apache/conf/vhosts/vhost1
fb77c505254b6e9c925e23e734463e87574f8f40kess Processing config file: /usr/local/apache/conf/vhosts/vhost2
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This will help in verifying that you are getting only the files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that you intended as part of your configuration.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/programs/apachectl.html">apachectl</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Enables HTTP persistent connections</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The Keep-Alive extension to HTTP/1.0 and the persistent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection feature of HTTP/1.1 provide long-lived HTTP sessions
fb77c505254b6e9c925e23e734463e87574f8f40kess which allow multiple requests to be sent over the same TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connection. In some cases this has been shown to result in an
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess almost 50% speedup in latency times for HTML documents with
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess many images. To enable Keep-Alive connections in Apache 1.2 and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For HTTP/1.0 clients, Keep-Alive connections will only be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used if they are specifically requested by a client. In
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive addition, a Keep-Alive connection with an HTTP/1.0 client can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive only be used when the length of the content is known in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive advance. This implies that dynamic content such as CGI output,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SSI pages, and server-generated directory listings will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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<seealso><directive module="core">MaxKeepAliveRequests</directive></seealso>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Amount of time the server will wait for subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndrequests on a persistent connection</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The number of seconds Apache will wait for a subsequent
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Setting <directive>KeepAliveTimeout</directive> to a high value
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd may cause performance problems in heavily loaded servers. The
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive higher the timeout, the more server processes will be kept
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd occupied waiting on connections with idle clients.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict enclosed access controls to only certain HTTP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemethods</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><Limit <em>method</em> [<em>method</em>] ... > ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Limit></syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Access controls are normally effective for
130d299c4b2b15be45532a176604c71fdc7bea5bnd <strong>all</strong> access methods, and this is the usual
130d299c4b2b15be45532a176604c71fdc7bea5bnd desired behavior. <strong>In the general case, access control
130d299c4b2b15be45532a176604c71fdc7bea5bnd directives should not be placed within a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive type="section">limit</directive> section.</strong></p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The purpose of the <directive type="section">Limit</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive is to restrict the effect of the access controls to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive nominated HTTP methods. For all other methods, the access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive restrictions that are enclosed in the <code><Limit></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive bracket <strong>will have no effect</strong>. The following
a04a96aae08a62f2d9d5833b3313a9751fa3f680yoshiki example applies the access control only to the methods POST, PUT,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd and DELETE, leaving all other methods unprotected:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require valid-user<br />
003f0c9fda6664daf5092a0e42f65ede20098153slive </Limit></code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The method names listed can be one or more of: GET, POST, PUT,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd DELETE, CONNECT, OPTIONS, TRACE, PATCH, PROPFIND, PROPPATCH,
fb77c505254b6e9c925e23e734463e87574f8f40kess MKCOL, COPY, MOVE, LOCK, and UNLOCK. <strong>The method name is
fb77c505254b6e9c925e23e734463e87574f8f40kess case-sensitive.</strong> If GET is used it will also restrict
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd HEAD requests.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restrict access controls to all HTTP methods
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveexcept the named ones</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax><LimitExcept <em>method</em> [<em>method</em>] ... > ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </LimitExcept></syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">LimitExcept</directive> and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd a group of access control directives which will then apply to any
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd HTTP access method <strong>not</strong> listed in the arguments;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive i.e., it is the opposite of a <directive type="section"
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd module="core">Limit</directive> section and can be used to control
bea526116133aa3d7dabd1924bfc580b37fbf22aslive both standard and nonstandard/unrecognized methods. See the
bea526116133aa3d7dabd1924bfc580b37fbf22aslive type="section">Limit</directive> for more details.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LimitExcept POST GET><br />
bea526116133aa3d7dabd1924bfc580b37fbf22aslive Require valid-user<br />
bea526116133aa3d7dabd1924bfc580b37fbf22aslive <LimitExcept>
bea526116133aa3d7dabd1924bfc580b37fbf22aslive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Restricts the total size of the HTTP request body sent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the client</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive<context>directory</context><context>.htaccess</context>
003f0c9fda6664daf5092a0e42f65ede20098153slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive specifies the number of <em>bytes</em> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive (meaning unlimited) to 2147483647 (2GB) that are allowed in a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request body. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_BODY</code> (0 as
ef8e89e090461194ecadd31e8796a2c51e0531a2kess distributed).</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>The <directive>LimitRequestBody</directive> directive allows
7b5535ed88e0f561b3bfb3330137bd804846afd4slive the user to set a limit on the allowed size of an HTTP request
7b5535ed88e0f561b3bfb3330137bd804846afd4slive message body within the context in which the directive is given
7b5535ed88e0f561b3bfb3330137bd804846afd4slive (server, per-directory, per-file or per-location). If the client
7b5535ed88e0f561b3bfb3330137bd804846afd4slive request exceeds that limit, the server will return an error
7b5535ed88e0f561b3bfb3330137bd804846afd4slive response instead of servicing the request. The size of a normal
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request message body will vary greatly depending on the nature of
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess the resource and the methods allowed on that resource. CGI scripts
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess typically use the message body for passing form information to the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
7b5535ed88e0f561b3bfb3330137bd804846afd4slive control over abnormal client request behavior, which may be
7b5535ed88e0f561b3bfb3330137bd804846afd4slive useful for avoiding some forms of denial-of-service
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd attacks.</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive <p>If, for example, you are permitting file upload to a particular
7b5535ed88e0f561b3bfb3330137bd804846afd4slive location, and wich to limit the size of the uploaded file to 100K,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd you might use the following directive:</p>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive LimitRequestBody 102400
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </example>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limits the number of HTTP request header fields that
7b5535ed88e0f561b3bfb3330137bd804846afd4slivewill be accepted from the client</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><em>Number</em> is an integer from 0 (meaning unlimited) to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 32767. The default value is defined by the compile-time
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constant <code>DEFAULT_LIMIT_REQUEST_FIELDS</code> (100 as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive distributed).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFields</directive> directive allows
003f0c9fda6664daf5092a0e42f65ede20098153slive the server administrator to modify the limit on the number of
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele client request might include. The number of request header fields
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele used by a client rarely exceeds 20, but this may vary among
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different client implementations, often depending upon the extent
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to which a user has configured their browser to support detailed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content negotiation. Optional HTTP extensions are often expressed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive using request header fields.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive gives the server administrator greater
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive control over abnormal client request behavior, which may be
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess useful for avoiding some forms of denial-of-service attacks.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess The value should be increased if normal clients see an error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive response from the server that indicates too many fields were
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent in the request.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestFields 50
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the size of the HTTP request header allowed from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveclient</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive specifies the number of <em>bytes</em> from 0
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive to the value of the compile-time constant
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <code>DEFAULT_LIMIT_REQUEST_FIELDSIZE</code> (8190 as
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele distributed) that will be allowed in an HTTP request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>LimitRequestFieldsize</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive allows the server administrator to reduce the limit on the allowed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive size of an HTTP request header field below the normal input buffer
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive size compiled with the server. A server needs this value to be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive large enough to hold any one header field from a normal client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request. The size of a normal request header field will vary
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
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 LimitRequestFieldSize 16380
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
003f0c9fda6664daf5092a0e42f65ede20098153slive the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Limit the size of the HTTP request line that will be accepted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivefrom the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>This directive sets the number of <em>bytes</em> from 0 to
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the value of the compile-time constant
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <code>DEFAULT_LIMIT_REQUEST_LINE</code> (8190 as distributed)
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that will be allowed on the HTTP request-line.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <directive>LimitRequestLine</directive> directive allows
130d299c4b2b15be45532a176604c71fdc7bea5bnd the server administrator to reduce the limit on the allowed size
130d299c4b2b15be45532a176604c71fdc7bea5bnd of a client's HTTP request-line below the normal input buffer size
130d299c4b2b15be45532a176604c71fdc7bea5bnd compiled with the server. Since the request-line consists of the
130d299c4b2b15be45532a176604c71fdc7bea5bnd HTTP method, URI, and protocol version, the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>LimitRequestLine</directive> directive places a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd restriction on the length of a request-URI allowed for a request
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd on the server. A server needs this value to be large enough to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd hold any of its resource names, including any information that
6c5c651b0b97607b8c8b4965c1385c67699f217fnd might be passed in the query part of a GET request.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive gives the server administrator greater
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd control over abnormal client request behavior, which may be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd useful for avoiding some forms of denial-of-service attacks.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive LimitRequestLine 16380
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note>Under normal conditions, the value should not be changed from
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the default.</note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
003f0c9fda6664daf5092a0e42f65ede20098153slive<description>Limits the size of an XML-based request body</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<context>directory</context><context>.htaccess</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Limit (in bytes) on maximum size of an XML-based request
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive body. A value of <code>0</code> will disable any checking.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen LimitXMLRequestBody 0
130d299c4b2b15be45532a176604c71fdc7bea5bnd </example>
130d299c4b2b15be45532a176604c71fdc7bea5bnd</directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Applies the enclosed directives only to matching
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveURLs</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><Location
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL-path|URL> ... </Location></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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 type="section">Location</directive> sections are processed in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive order they appear in the configuration file, after the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Directory</directive> sections and
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>.htaccess</code> files are read, and after the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section" module="core">Files</directive> sections.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Note that URLs do not have to line up with the filesystem at
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive all, it should be emphasized that <Location> operates
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive completely outside the filesystem.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>For all origin (non-proxy) requests, the URL to be matched is a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL-path of the form <code>/path/</code>. No scheme, hostname,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>The URL may use wildcards In a wild-card string, `?' matches
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess any single character, and `*' matches any sequences of
fb77c505254b6e9c925e23e734463e87574f8f40kess characters.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Extended regular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive expressions can also be used, with the addition of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <Location ~ "/(extra|special)/data">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match URLs that contained the substring "/extra/data" or
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen "/special/data". In Apache 1.3 and above, a new directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <directive type="section" module="core">LocationMatch</directive>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen exists which behaves identical to the regex version of
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p>The <directive type="section">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive functionality is especially useful when combined with the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive. For example, to enable status requests, but allow them
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <Location /status><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler server-status<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Order Deny,Allow<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Deny from all<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Location>
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"
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemodule="core">LocationMatch</directive> directive and the regex
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveversion of <directive type="section">Location</directive> require you
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto explicitly specify multiple slashes if that is your intention. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveexample, <code><LocationMatch ^/abc></code> would match the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivetype="section">Location</directive> directive behaves similarly when
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveused 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><Location /abc/def></code> and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliverequest is to <code>/abc//def</code> then it will match.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Directory, Location and Files sections work</a> for an
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen explanation of how these different sections are combined when a
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen request is received</seealso>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Applies the enclosed directives only to regular-expression
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematching URLs</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><LocationMatch
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive type="section">LocationMatch</directive> directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive provides for access control by URL, in an identical manner to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type="section">Location</directive>. However, it takes a regular
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd expression as an argument instead of a simple string. For
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <LocationMatch "/(extra|special)/data">
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>would match URLs that contained the substring "/extra/data"
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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<description>Controls the verbosity of the ErrorLog</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>server config</context><context>virtual host</context>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</contextlist>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <p><directive>LogLevel</directive> adjusts the verbosity of the
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen messages recorded in the error logs (see <directive
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen module="core">ErrorLog</directive> directive). The following
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <em>level</em>s are available, in order of decreasing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive significance:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"getpwuid: couldn't determine user name from uid"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"socket: Failed to get a socket, exiting child"</td>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <td>"child process 1234 did not exit, sending another
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele SIGHUP"</td>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <td>"httpd: caught SIGBUS, attempting to dump core in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <td>"Server seems busy, (you may need to increase
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 recommended.</p>
dc223428958ad9ff05011545bcdda000887b93e5slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Number of requests allowed on a persistent
313bb560bc5c323cfd40c9cad7335b4b8e060aedkessconnection</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>MaxKeepAliveRequests</directive> directive
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd limits the number of requests allowed per connection when
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core" >KeepAlive</directive> is on. If it is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd set to "<code>0</code>", unlimited requests will be allowed. We
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive recommend that this setting be kept to a high value for maximum
fb77c505254b6e9c925e23e734463e87574f8f40kess server performance.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Designates an IP address for name-virtual
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndhosting</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<syntax>NameVirtualHost <em>addr</em>[:<em>port</em>]</syntax>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context></contextlist>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>The <directive>NameVirtualHost</directive> directive is a
130d299c4b2b15be45532a176604c71fdc7bea5bnd required directive if you want to configure <a
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>Although <em>addr</em> can be hostname it is recommended
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>With the <directive>NameVirtualHost</directive> directive you
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd specify the IP address on which the server will receive requests
05201775eaa6b363b8a119c8aea5db246b967591yoshiki for the name-based virtual hosts. This will usually be the address
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to which your name-based virtual host names resolve. In cases
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd where a firewall or other proxy receives the requests and forwards
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd them on a different IP address to the server, you must specify the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd IP address of the physical interface on the machine which will be
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd servicing the requests. If you have multiple name-based hosts on
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess multiple addresses, repeat the directive for each address.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Note: the "main server" and any _default_ servers will
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive>NameVirtualHost</directive> IP Address (unless for some
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd reason you specify <directive>NameVirtualHost</directive> but then
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd don't define any VirtualHosts for that address).</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>Optionally you can specify a port number on which the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd name-based virtual hosts should be used, <em>e.g.</em></p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess <p>IPv6 addresses must be enclosed in square brackets, as shown
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess in the following example:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<example>NameVirtualHost [fe80::a00:20ff:fea7:ccea]:8080</example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>To receive requests on all interfaces, you can use an argument of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<note><title>Argument to <VirtualHost> directive</title>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<p>Note that the argument to the <VirtualHost> directive must exactly
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivematch the argument to the <directive>NameVirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedirective.</p>
6b64034fa2a644ba291c484c0c01c7df5b8d982ckessNameVirtualHost 1.2.3.4<br />
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess<VirtualHost 1.2.3.4><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd</VirtualHost><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures what features are available in a particular
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivedirectory</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>Options
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive [+|-]<em>option</em> [[+|-]<em>option</em>] ...</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>Options</directive> directive controls which
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server features are available in a particular directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <dd>All options except for MultiViews. This is the default
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive setting.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Execution of CGI scripts is permitted.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive The server will follow symbolic links in this directory.<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>Note</strong>: even though the server follows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive symlink it does <em>not</em> change the pathname used to match
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>Note</strong>: this option gets ignored if set inside a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Server-side includes are permitted.</dd>
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 If a URL which maps to a directory is requested, and the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive there is no DirectoryIndex (<em>e.g.</em>, index.html) in
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that directory, then the server will return a formatted
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive listing of the directory.</dd>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <a href="/content-negotiation.html">Content negotiated</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive MultiViews are allowed.</dd>
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 <p>Normally, if multiple <directive>Options</directive> could apply to a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive force. </p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Indexes FollowSymLinks<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Options Includes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>then only <code>Includes</code> will be set for the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive>Options</directive> directive uses the + and - symbols:</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen Options Indexes FollowSymLinks<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </Directory><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Options +Includes -Indexes<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </Directory>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Includes</code> are set for the /web/docs/spec directory.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Note:</strong> Using <code>-IncludesNOEXEC</code> or
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <code>-Includes</code> disables server-side includes completely
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive regardless of the previous setting.</p>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>The default in the absence of any other settings is
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Selects which authenticated users can access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivea resource</description>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<syntax>Require <em>entity-name</em> [<em>entity-name</em>] ...</syntax>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen<contextlist><context>directory</context><context>.htaccess</context>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive selects which authenticated users can access
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive a directory. The allowed syntaxes are:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive Require group <em>group-name</em> [<em>group-name</em>] ...
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Only users in the named groups can access the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directory.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Require valid-user
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive>Require</directive> must be accompanied by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">AuthName</directive> and <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">AuthType</directive> directives, and directives such
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive as <directive module="mod_auth">AuthUserFile</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and <directive module="mod_auth">AuthGroupFile</directive> (to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive define users and groups) in order to work correctly. Example:</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess AuthType Basic<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess AuthName "Restricted Directory"<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess Require group admin<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Access controls which are applied in this way are effective for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <strong>all</strong> methods. <strong>This is what is normally
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd desired.</strong> If you wish to apply access controls only to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specific methods, while leaving other methods unprotected, then
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd place the <directive>Require</directive> statement into a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <directive module="core" type="section">Limit</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd section.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<seealso><directive module="core">Satisfy</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the CPU consumption of processes launched
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowenby Apache children</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>RLimitCPU <em>number</em>|max [<em>number</em>|max]</syntax>
52bb691f8e13e9d0b55fcc214018ee85846fa87frbowen<default>Unset; uses operating system defaults</default>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Takes 1 or 2 parameters. The first parameter sets the soft
fb77c505254b6e9c925e23e734463e87574f8f40kess resource limit for all processes and the second parameter sets
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess the maximum resource limit. Either parameter can be a number,
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd or <em>max</em> to indicate to the server that the limit should
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd 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 <p>This applies to processes forked off from Apache children
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd servicing requests, not the Apache children themselves. This
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd includes CGI scripts and SSI exec commands, but not any
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd processes forked off from the Apache parent such as piped
05201775eaa6b363b8a119c8aea5db246b967591yoshiki <p>CPU resource limits are expressed in seconds per
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen process.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Limits the memory consumption of processes launched
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndby 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<context>directory</context><context>.htaccess</context></contextlist>
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,
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration. Raising the maximum resource limit requires that
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the server is running as root, or in the initial startup
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This applies to processes forked off from Apache children
fb77c505254b6e9c925e23e734463e87574f8f40kess 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 <p>Memory resource limits are expressed in bytes per
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive process.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<seealso><directive module="core">RLimitCPU</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitNPROC</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Limits the number of processes that can be launched by
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cndprocesses launched by Apache children</description>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<syntax>RLimitNPROC <em>number</em>|max [<em>number</em>|max]</syntax>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<contextlist><context>server config</context><context>virtual host</context>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<context>directory</context><context>.htaccess</context></contextlist>
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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>This applies to processes forked off from Apache children
fb77c505254b6e9c925e23e734463e87574f8f40kess servicing requests, not the Apache children themselves. This
fb77c505254b6e9c925e23e734463e87574f8f40kess includes CGI scripts and SSI exec commands, but not any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive processes forked off from the Apache parent such as piped
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Process limits control the number of processes per user.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>Note: If CGI processes are <strong>not</strong> running
fb77c505254b6e9c925e23e734463e87574f8f40kess under userids other than the web server userid, this directive
fb77c505254b6e9c925e23e734463e87574f8f40kess will limit the number of processes that the server itself can
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive create. Evidence of this situation will be indicated by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive error_log.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">RLimitMEM</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">RLimitCPU</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Interaction between host-level access control and
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveuser authentication</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess module="core">Require</directive> used. The parameter can be
fb77c505254b6e9c925e23e734463e87574f8f40kess either <em>'all'</em> or <em>'any'</em>. This directive is only
fb77c505254b6e9c925e23e734463e87574f8f40kess useful if access to a particular area is being restricted by both
fb77c505254b6e9c925e23e734463e87574f8f40kess 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
fb77c505254b6e9c925e23e734463e87574f8f40kess username and password. With the "any" option the client will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive granted access if they either pass the host restriction or enter a
130d299c4b2b15be45532a176604c71fdc7bea5bnd valid username and password. This can be used to password restrict
130d299c4b2b15be45532a176604c71fdc7bea5bnd an area, but to let clients from particular addresses in without
130d299c4b2b15be45532a176604c71fdc7bea5bnd prompting for a password.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd <p>For example, if you wanted to let people on your network have
130d299c4b2b15be45532a176604c71fdc7bea5bnd unrestricted access to a portion of your website, but require that
130d299c4b2b15be45532a176604c71fdc7bea5bnd people outside of your network provide a password, you could use a
130d299c4b2b15be45532a176604c71fdc7bea5bnd configuration similar to the following:</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd Require valid-user<br />
130d299c4b2b15be45532a176604c71fdc7bea5bnd Allow from 192.168.1<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd Satisfy any
fb77c505254b6e9c925e23e734463e87574f8f40kess <seealso><directive module="mod_access">Allow</directive></seealso>
fb77c505254b6e9c925e23e734463e87574f8f40kess <seealso><directive module="core">Require</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<directivesynopsis>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<description>Technique for locating the interpreter for CGI
130d299c4b2b15be45532a176604c71fdc7bea5bndscripts</description>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<contextlist><context>server config</context><context>virtual host</context>
130d299c4b2b15be45532a176604c71fdc7bea5bnd<context>directory</context><context>.htaccess</context></contextlist>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>This directive is used to control how Apache finds the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive interpreter used to run CGI scripts. The default technique is to
fb77c505254b6e9c925e23e734463e87574f8f40kess use the interpreter pointed to by the #! line in the
fb77c505254b6e9c925e23e734463e87574f8f40kess script. Setting <code>ScriptInterpreterSource registry</code> will
fb77c505254b6e9c925e23e734463e87574f8f40kess cause the Windows Registry to be searched using the script file
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess</directivesynopsis>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Email address that the server includes in error
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivemessages sent to the client</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerAdmin</directive> sets the e-mail address
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess that the server includes in any error messages it returns to the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd client.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>It may be worth setting up a dedicated address for this,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>as users do not always mention that they are talking about the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive server!</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<description>Alternate names for a host used when matching requests
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveto name-virtual hosts</description>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<syntax>ServerAlias <em>hostname</em> [<em>hostname</em>] ...</syntax>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<contextlist><context>virtual host</context></contextlist>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <p>The <directive>ServerAlias</directive> directive sets the
ef8e89e090461194ecadd31e8796a2c51e0531a2kess alternate names for a host, for use with <a
ef8e89e090461194ecadd31e8796a2c51e0531a2kess href="/vhosts/name-based.html">name-based virtual hosts</a>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost *><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd<description>Hostname and port that the server uses to identify
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveitself</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax>ServerName <em>fully-qualified-domain-name[:port]</em></syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<compatibility>In version 2.0, this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive supersedes the functionality of the <directive>Port</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive from version 1.3.</compatibility>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerName</directive> directive sets the hostname and
9ed9eaf871c58d281af02e76125ceadb5060afa5nd port that the server uses to identify itself. This is used when
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive creating redirection URLs. For example, if the name of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive machine hosting the webserver is <code>simple.example.com</code>,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive but the machine also has the DNS alias <code>www.example.com</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive and you wish the webserver to be so identified, the following
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive should be used:</p>
530eba85dbd41b8a0fa5255d3648d1440199a661slive <p>If no <directive>ServerName</directive> is specified, then the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele server attempts to deduce the hostname by performing a reverse
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele lookup on the IP address. If no port is specified in the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive servername, then the server will use the port from the incoming
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request. For optimal reliability and predictability, you should
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specify an explicit hostname and port using the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name-based virtual hosts</a>,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <directive type="section" module="core">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section specifies what hostname must appear in the request's
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Host:</code> header to match this virtual host.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>See the description of the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="core">UseCanonicalName</directive> directive for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive settings which determine whether self-referential URL's (e.g., by the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive specified port, or to the port number given in the client's request.
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/dns-caveats.html">DNS Issues</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">UseCanonicalName</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">NameVirtualHost</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerAlias</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Legacy URL pathname for a name-virtual host that
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabeleis accessed by an incompatible browser</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>virtual host</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerPath</directive> directive sets the legacy
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive URL pathname for a host, for use with <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Base directory for the server installation</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
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
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive paths for other configuration files are taken as relative to this
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directory.</p>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess </example>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele<seealso><a href="/misc/security_tips.html#serverroot">the
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele security tips</a> for information on how to properly set
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive permissions on the ServerRoot</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures the footer on server-generated documents</description>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<context>directory</context><context>.htaccess</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>ServerSignature</directive> directive allows the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive configuration of a trailing footer line under server-generated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documents (error messages, mod_proxy ftp directory listings,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive mod_info output, ...). The reason why you would want to enable
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive such a footer line is that in a chain of proxies, the user often
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess has no possibility to tell which of the chained servers actually
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess produced a returned error message.<br /> The <code>Off</code>
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess setting, which is the default, suppresses the error line (and is
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess therefore compatible with the behavior of Apache-1.2 and
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess below). The <code>On</code> setting simply adds a line with the
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess server version number and <directive
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess module="core">ServerName</directive> of the serving virtual host,
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess and the <code>EMail</code> setting additionally creates a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive "mailto:" reference to the <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">ServerAdmin</directive> of the referenced
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive document.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="core">ServerTokens</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<directivesynopsis>
fb77c505254b6e9c925e23e734463e87574f8f40kess<description>Configures the Server HTTP response header</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<syntax>ServerTokens Major|Minor|Minimal|ProductOnly|OS|Full</syntax>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>This directive controls whether <code>Server</code> response
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header field which is sent back to clients includes a
9ed9eaf871c58d281af02e76125ceadb5060afa5nd description of the generic OS-type of the server as well as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive information about compiled-in modules.</p>
d3f27ec18dfa6283e852aa98253212edafaa0e2brbowen <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <dt><code>ServerTokens Full</code> (or not specified)</dt>
fb77c505254b6e9c925e23e734463e87574f8f40kess <dd>Server sends (<em>e.g.</em>): <code>Server: Apache/2.0.41
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>This setting applies to the entire server, and cannot be
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele enabled or disabled on a virtualhost-by-virtualhost basis.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess<seealso><directive module="core">ServerSignature</directive></seealso>
ef8e89e090461194ecadd31e8796a2c51e0531a2kess</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Forces all matching files to be processed by a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehandler</description>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context><context>virtual host</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess<context>directory</context><context>.htaccess</context>
fb77c505254b6e9c925e23e734463e87574f8f40kess</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess<compatibility>Moved into the core in Apache 2.0</compatibility>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>When placed into an <code>.htaccess</code> file or a
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive type="section" module="core">Directory</directive> or
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive type="section" module="core">Location</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive section, this directive forces all matching files to be parsed
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive through the <a href="/handler.html">handler</a> given by
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>handler-name</em>. For example, if you had a directory you
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive wanted to be parsed entirely as imagemap rule files, regardless
003f0c9fda6664daf5092a0e42f65ede20098153slive of extension, you might put the following into an
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive SetHandler imap-file
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Another example: if you wanted to have the server display a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive status report whenever a URL of
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://servername/status</code> was called, you might put
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <Location /status><br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd SetHandler server-status<br />
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd </Location>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><directive module="mod_mime">AddHandler</directive></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>The <directive>SetInputFilter</directive> directive sets the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd filter or filters which will process client requests and POST
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd input when they are received by the server. This is in addition to
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd any filters defined elsewhere, including the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd directive.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>If more than one filter is specified, they must be separated
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive by semicolons in the order in which they should process the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive content.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sets the filters that will process responses from the
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveserver</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</contextlist>
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>The <directive>SetOutputFilter</directive> directive sets the filters
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive which will process responses from the server before they are
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive sent to the client. This is in addition to any filters defined
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive elsewhere, including the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <directive module="mod_mime">AddOutputFilter</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive.</p>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <p>For example, the following configuration will process all files
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive includes.</p>
fb77c505254b6e9c925e23e734463e87574f8f40kess SetOutputFilter INCLUDES<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</Directory>
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<seealso><a href="/filter.html">Filters</a> documentation</seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Amount of time the server will wait for
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivecertain events before failing a request</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>The <directive>TimeOut</directive> directive currently defines
ef8e89e090461194ecadd31e8796a2c51e0531a2kess the amount of time Apache will wait for three things:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The total amount of time it takes to receive a GET
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive request.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The amount of time between receipt of TCP packets on a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive POST or PUT request.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>The amount of time between ACKs on transmissions of TCP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive packets in responses.</li>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd <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</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Configures how the server determines its own name and
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveport</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<contextlist><context>server config</context><context>virtual host</context>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>In many situations Apache must construct a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <em>self-referential</em> URL -- that is, a URL that 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 the canonical
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen name for the server. This name is used in all self-referential
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen URLs, and for the values of <code>SERVER_NAME</code> and
58e56a1d61ae176cc5ecb7c4863881736947d8b8rbowen <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, as defined above). These values are the same
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive that are used to implement <a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/vhosts/name-based.html">name based virtual hosts</a>,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess and are available with the same clients. The CGI variables
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>SERVER_NAME</code> and <code>SERVER_PORT</code> will be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive constructed from the client supplied values as well.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>An example where this may be useful is on an intranet server
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive where you have users connecting to the machine using short
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive names such as <code>www</code>. You'll notice that if the users
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive type a shortname, and a URL which is a directory, such as
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www/splat</code>, <em>without the trailing
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive slash</em> then Apache will redirect them to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>http://www.domain.com/splat/</code>. If you have
003f0c9fda6664daf5092a0e42f65ede20098153slive authentication enabled, this will cause the user to have to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive authenticate twice (once for <code>www</code> and once again
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="http://httpd.apache.org/docs/misc/FAQ.html#prompted-twice">the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive FAQ on this subject for more information</a>). But if
fb77c505254b6e9c925e23e734463e87574f8f40kess <directive>UseCanonicalName</directive> is set off, then Apache will
fb77c505254b6e9c925e23e734463e87574f8f40kess <p>There is a third option, <code>UseCanonicalName DNS</code>,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess which is intended for use with mass IP-based virtual hosting to
ef8e89e090461194ecadd31e8796a2c51e0531a2kess support ancient clients that do not provide a
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <code>Host:</code> header. With this option Apache does a
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess reverse DNS lookup on the server IP address that the client
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive connected to in order to work out self-referential URLs.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><strong>Warning:</strong> if CGIs make assumptions about the
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive values of <code>SERVER_NAME</code> they may be broken by this
530eba85dbd41b8a0fa5255d3648d1440199a661slive 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>
23b36269d124e7a6aaa5221891f7ae2ef3eeb158jerenkrantz<seealso><directive module="core">ServerName</directive></seealso>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive<seealso><directive module="mpm_common">Listen</directive></seealso>
7b5535ed88e0f561b3bfb3330137bd804846afd4slive</directivesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Contains directives that apply only to a specific
80c4526970a11f37c0f8e3b82afdf03902dac3f3slivehostname or IP address</description>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<syntax><VirtualHost
ef8e89e090461194ecadd31e8796a2c51e0531a2kess <em>addr</em>[:<em>port</em>] [<em>addr</em>[:<em>port</em>]]
ef8e89e090461194ecadd31e8796a2c51e0531a2kess ...> ... </VirtualHost></syntax>
fb77c505254b6e9c925e23e734463e87574f8f40kess<contextlist><context>server config</context></contextlist>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p><directive type="section">VirtualHost</directive> and
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code></VirtualHost></code> are used to enclose a group of
530eba85dbd41b8a0fa5255d3648d1440199a661slive directives that will apply only to a particular virtual host. Any
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive directive that is allowed in a virtual host context may be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive used. When the server receives a request for a document on a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive particular virtual host, it uses the configuration directives
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive enclosed in the <directive type="section">VirtualHost</directive>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <li>A fully qualified domain name for the IP address of the
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh virtual host;</li>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <li>The character *, which is used only in combination with
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <code>NameVirtualHost *</code> to match all IP addresses; or</li>
cf1595220a90759be0a39ab8b11c8cb834b698a9ianh <li>The string <code>_default_</code>, which is used only
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh with IP virtual hosting to catch unmatched IP addresses.</li>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <VirtualHost 10.1.2.3><br />
530eba85dbd41b8a0fa5255d3648d1440199a661slive ServerAdmin webmaster@host.foo.com<br />
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh </VirtualHost>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>IPv6 addresses must be specified in square brackets because
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh the optional port number could not be determined otherwise. An
1a1cf0ee9229ee29e5750b25dd94dbb9b04072cfianh IPv6 example is shown below:</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<VirtualHost [fe80::a00:20ff:fea7:ccea]><br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive ServerAdmin webmaster@host.foo.com<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </VirtualHost>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>Each Virtual Host must correspond to a different IP address,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive different port number or a different host name for the server,
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive in the former case the server machine must be configured to
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive accept IP packets for multiple addresses. (If the machine does
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive not have multiple network interfaces, then this can be
fb77c505254b6e9c925e23e734463e87574f8f40kess accomplished with the <code>ifconfig alias</code> command (if
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive your OS supports it).</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>When using IP-based virtual hosting, the special name
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive 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
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess section, is used when no IP-match occurs. (But note that any IP
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive address that matches a <directive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive module="core">NameVirtualHost</directive> directive will use neither
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive the "main" server config nor the _default_ virtual host. See the <a
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd href="/vhosts/name-based.html">name-based virtual hosting</a>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive documentation for further details.)</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <p>You can specify a <code>:port</code> to change the port that is
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd matched. If unspecified then it defaults to the same port as the
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd most recent <directive module="mpm_common">Listen</directive>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd statement of the main server. You may also specify <code>:*</code>
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd to match all ports on that address. (This is recommended when used
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive href="/misc/security_tips.html">security tips</a> document
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess for details on why your security could be compromised if the
db1b819ff8966e3c6a5ca03c59a8ae06c2cecc9frbowen directory where logfiles are stored is writable by anyone other
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd than the user that starts the server.</p>
130d299c4b2b15be45532a176604c71fdc7bea5bnd type="section">VirtualHost</directive> does <strong>not</strong>
130d299c4b2b15be45532a176604c71fdc7bea5bnd affect what addresses Apache listens on. You may need to ensure
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd that Apache is listening on the correct addresses using <directive
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<seealso><a href="/vhosts/">Apache Virtual Host documentation</a></seealso>
c97e8972ab1f4dd167e3dc4db87daf91114009fbnd<seealso><a href="/dns-caveats.html">Warnings about DNS and
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>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</modulesynopsis>