From: Luca Toscano backend.example.com except requests made to
/mirror/foo/i.
Mixing ProxyPass settings in different contexts does not work:
+ProxyPass "/mirror/foo/i" "!" +<Location "/mirror/foo/"> + ProxyPass "http://backend.example.com/" +</Location>+ +
In this case, a request to /mirror/foo/i will get proxied,
+ because the ProxyPass directive in the Location block will be evaluated
+ first. The fact that ProxyPass supports both server and directory contexts
+ does not mean that their scope and position in the configuration file will
+ guarantee any ordering or override.
The configured ProxyPass
and ProxyPassMatch
@@ -1119,12 +1131,15 @@ ProxyPass "/mirror/foo" "http://backend.example.com"
ProxyPass rules starting with the
longest URLs first. Otherwise, later rules for longer URLS will be hidden
by any earlier rule which uses a leading substring of the URL. Note that
- there is some relation with worker sharing. In contrast, only one
- ProxyPass directive can be placed
- in a Location block, and the most
- specific location will take precedence.
For the same reasons, exclusions must come before the + there is some relation with worker sharing.
+Only one ProxyPass directive
+ can be placed in a Location block,
+ and the most specific location will take precedence.
Exclusions must come before the
general ProxyPass directives. In 2.4.26 and later, the "no-proxy"
environment variable is an alternative to exclusions, and is the only
way to configure an exclusion of a ProxyPass