From: Luca Toscano Date: Sun, 1 Apr 2018 07:33:41 +0000 (+0000) Subject: mod_proxy.xml: docs improvements X-Git-Tag: 2.4.34~249 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a79ec7c3bda66655e573805cc776cc79dae07736;p=apache mod_proxy.xml: docs improvements Tried to clarify the doubts raised in PR 61225 (related also to 60458) and also split a single note into multiple ones to improve the reader's attention span (reading through a long block of text may cause loss of attention to important details, as it happened to me :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1828128 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 44a5f66bf2..834274b04b 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -955,6 +955,19 @@ ProxyPass "/mirror/foo" "http://backend.example.com" 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.

+ Ordering ProxyPass Directives

The configured ProxyPass and ProxyPassMatch @@ -963,12 +976,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.

+
+ Ordering ProxyPass Directives in Locations +

Only one ProxyPass directive + can be placed in a Location block, + and the most specific location will take precedence.

+
+ Exclusions and the no-proxy environment variable +

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