]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: Warn about ProxyPassMatch backreference worker matching and connection...
authorRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 20:52:17 +0000 (20:52 +0000)
committerRich Bowen <rbowen@apache.org>
Wed, 29 Apr 2026 20:52:17 +0000 (20:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933559 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_proxy.xml

index 6721c8d0a071bdcad0e6bbac89f9c2a71a9d5a1f..979fc0035ead27d9617fb2674d1c99145eca3adf 100644 (file)
@@ -1578,6 +1578,24 @@ when the <var>url</var> parameter contains backreference(s) (see note below).
     <note><strong>Note: </strong>This directive cannot be used within a
     <code>&lt;Directory&gt;</code> context.</note>
 
+    <note type="warning"><title>Worker matching with backreferences</title>
+    <p>When <directive>ProxyPassMatch</directive> contains
+    backreferences (e.g., <code>$1</code>) in the target URL, each
+    request produces a different resolved URL. Because <a
+    href="#workers">workers</a> are matched by URL, these requests
+    will not match the worker created by this directive and will
+    instead use the default reverse proxy worker, which does not
+    reuse connections or cache DNS lookups. To enable connection
+    pooling, define an explicit worker for the backend separately:</p>
+    <highlight language="config">
+ProxyPass        "/notused" "http://backend.example.com/" connectiontimeout=5 timeout=30
+ProxyPassMatch   "^/(.*\.gif)$" "http://backend.example.com/$1"
+    </highlight>
+    <p>The explicit <directive>ProxyPass</directive> worker definition
+    ensures that the backend connection pool is available for use by
+    <directive>ProxyPassMatch</directive> requests.</p>
+    </note>
+
     <p>Suppose the local server has address <code>http://example.com/</code>;
     then</p>