Commit ee12afab authored by Luca Toscano's avatar Luca Toscano
Browse files

Add a note in the docs about evaluation of Location sections

The sections.html doc was missing, in my opinion, a direct
reference to the fact multiple Location blocks matching
a HTTP request will be evaluated in the order in which they
appear in the configuration files (same as Ifs, etc..).

Reworked a bit a single block of text to be a bit more readable.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1786709 13f79535-47bb-0310-9956-ffa450edef68
parent fa645019
Loading
Loading
Loading
Loading
+34 −26
Original line number Diff line number Diff line
@@ -483,32 +483,40 @@ are interpreted, it is important to understand how this works.</p>

    </ol>

    <p>Apart from <directive type="section"
    module="core">Directory</directive>, each group is processed in
    the order that they appear in the configuration files.  <directive
    type="section" module="core">Directory</directive> (group 1 above)
    is processed in the order shortest directory component to longest.
    So for example, <code>&lt;Directory "/var/web/dir"&gt;</code> will
    be processed before <code>&lt;Directory
    "/var/web/dir/subdir"&gt;</code>.  If multiple <directive
    <p>Some important remarks:</p>
    <ul>
        <li>Apart from <directive type="section"
        module="core">Directory</directive>, within each group the sections are
        processed in the order they appear in the configuration files.
        For example, a request for <em>/foo</em> will match
        <code>&lt;Location "/foo/bar"&gt;</code> and 
        <code>&lt;Location "/foo"&gt;</code> (group 4 in this case):
        both sections will be evaluated
        but in the order they appear in the configuration files.</li>
        <li><directive type="section" module="core">Directory</directive>
        (group 1 above) is processed in the order shortest directory
        component to longest. For example,
        <code>&lt;Directory "/var/web/dir"&gt;</code> will be processed before
        <code>&lt;Directory "/var/web/dir/subdir"&gt;</code>.</li>
        <li>If multiple <directive
        type="section" module="core">Directory</directive> sections apply
        to the same directory they are processed in the configuration file
    order. Configurations included via the <directive
        order.</li>
        <li>Configurations included via the <directive
        module="core">Include</directive> directive will be treated as if
        they were inside the including file at the location of the
    <directive module="core">Include</directive> directive.</p>

    <p>Sections inside <directive type="section"
        <directive module="core">Include</directive> directive.</li>
        <li>Sections inside <directive type="section"
        module="core">VirtualHost</directive> sections
        are applied <em>after</em> the corresponding sections outside
        the virtual host definition. This allows virtual hosts to
    override the main server configuration.</p>

    <p>When the request is served by <module>mod_proxy</module>, the
        override the main server configuration.</li>
        <li>When the request is served by <module>mod_proxy</module>, the
        <directive module="mod_proxy" type="section">Proxy</directive>
        container takes the place of the <directive module="core"
        type="section">Directory</directive> container in the processing
    order.</p>
        order.</li>
    </ul>

    <note><title>Technical Note</title>
      There is actually a