Commit 819185ab authored by Eric Covener's avatar Eric Covener
Browse files
Caution against using non-regex ProxyPass inside of a <LocationMatch> container.
PR#50048

Submitted By: Luke Meyer
Reviewed By: Eric Covener




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1021471 13f79535-47bb-0310-9956-ffa450edef68
parent 727a8086
Loading
Loading
Loading
Loading
+15 −2
Changes for docs/manual/mod/mod_proxy.html.en: 15 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1179,7 +1179,10 @@ through</td></tr>
    for complex rules.</p>

    <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>.</p>
    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. The same will occur inside a
    <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section,
    however ProxyPass does not interpret the regexp as such, so it is necessary
    to use <code class="directive">ProxyPassMatch</code> in this situation instead.</p>

    <p>If you require a more flexible reverse-proxy configuration, see the
    <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
@@ -1259,6 +1262,13 @@ through</td></tr>
    <p>The <code>!</code> directive is useful in situations where you don't want
    to reverse-proxy a subdirectory.</p>

    <p>When used inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, the first argument is omitted and the
    regexp is obtained from the <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code>.</p>

    <p>If you require a more flexible reverse-proxy configuration, see the
    <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
    <code>[P]</code> flag.</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyPassReverse" id="ProxyPassReverse">ProxyPassReverse</a> <a name="proxypassreverse" id="proxypassreverse">Directive</a></h2>
@@ -1323,7 +1333,10 @@ proxied server</td></tr>
    </p>

    <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>.</p>
    directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. The same occurs inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, but will probably not work as
    intended, as ProxyPassReverse will interpret the regexp literally as a
    path; if needed in this situation, specify the ProxyPassReverse outside
    the section, or in a separate <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section.</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+19 −2
Changes for docs/manual/mod/mod_proxy.xml: 19 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1036,7 +1036,10 @@ expressions</description>
    <p>When used inside a <directive type="section" module="core"
    >Location</directive> section, the first argument is omitted and the local
    directory is obtained from the <directive type="section" module="core"
    >Location</directive>.</p>
    >Location</directive>. The same will occur inside a
    <directive type="section" module="core">LocationMatch</directive> section,
    however ProxyPass does not interpret the regexp as such, so it is necessary
    to use <directive>ProxyPassMatch</directive> in this situation instead.</p>

    <p>If you require a more flexible reverse-proxy configuration, see the
    <directive module="mod_rewrite">RewriteRule</directive> directive with the
@@ -1088,6 +1091,15 @@ expressions</description>

    <p>The <code>!</code> directive is useful in situations where you don't want
    to reverse-proxy a subdirectory.</p>

    <p>When used inside a <directive type="section" module="core"
    >LocationMatch</directive> section, the first argument is omitted and the
    regexp is obtained from the <directive type="section" module="core"
    >LocationMatch</directive>.</p>

    <p>If you require a more flexible reverse-proxy configuration, see the
    <directive module="mod_rewrite">RewriteRule</directive> directive with the
    <code>[P]</code> flag.</p>
</usage>
</directivesynopsis>

@@ -1159,7 +1171,12 @@ proxied server</description>
    <p>When used inside a <directive type="section" module="core"
    >Location</directive> section, the first argument is omitted and the local
    directory is obtained from the <directive type="section" module="core"
    >Location</directive>.</p>
    >Location</directive>. The same occurs inside a <directive type="section"
    module="core">LocationMatch</directive> section, but will probably not work as
    intended, as ProxyPassReverse will interpret the regexp literally as a
    path; if needed in this situation, specify the ProxyPassReverse outside
    the section, or in a separate <directive type="section" module="core"
    >Location</directive> section.</p>
</usage>
</directivesynopsis>