]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Caution against using non-regex ProxyPass inside of a <LocationMatch> container.
authorEric Covener <covener@apache.org>
Mon, 11 Oct 2010 19:12:13 +0000 (19:12 +0000)
committerEric Covener <covener@apache.org>
Mon, 11 Oct 2010 19:12:13 +0000 (19:12 +0000)
PR#50048

Submitted By: Luke Meyer
Reviewed By: Eric Covener

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1021468 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_proxy.html.en
docs/manual/mod/mod_proxy.xml

index 4ea568d945b26cddc459872ffdbd48a7d756b1c0..c17d88defdac1fb93b992713fb0006316c043bf3 100644 (file)
@@ -1177,7 +1177,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
@@ -1255,6 +1258,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>
@@ -1319,7 +1329,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>
index bea29108e3555ff89e0f16c120d037bda6d73da3..e1caaa28c582a0b02cb526d793529332a48d9589 100644 (file)
@@ -1050,7 +1050,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
@@ -1100,6 +1103,15 @@ expressions</description>
     </note>
     <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>
 
@@ -1171,7 +1183,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>