From: Yann Ylavic Date: Mon, 13 Dec 2021 16:37:29 +0000 (+0000) Subject: Add a note about aliging mapping= with the backend's. [skip ci] X-Git-Tag: 2.5.0-alpha2-ci-test-only~649 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10fbb5c3cda73c5dbfc801aafbcac013a8b219a1;p=thirdparty%2Fapache%2Fhttpd.git Add a note about aliging mapping= with the backend's. [skip ci] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895907 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 2d720cc012b..850729a1ec3 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -1286,19 +1286,29 @@ ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300 mapping -

Type of mapping between the path and the url. - This determines the normalization and/or (non-)decoding that mod_proxy will - apply to the request's uri-path to match the path. If/when the mapping - matches, the request uri-path is committed such that <Location - and other directory contexts using a path will match according to the same mapping.

-

The encoded mapping avoids the %-decoding of the uri-path such that - one can match for instance /some%2furi%2fpath%2fwith%2fslash in a ProxyPass - or <Location context.

-

The servlet mapping refers to the one defined by the Servlet specification, which - is for instance applied by Apache Tomcat for servlet containers (notably the path parameters are - ignored for the mapping). An uri-path like /some;foo/path is then mapped - as /some/path and thus matches <Location /some/path> or - ProxyPass "/some/path" "https://tomcat.example.com" regardless of the requested - path parameters.

+ This determines the normalization and/or (non-)decoding that mod_proxy + will apply to the requested uri-path before matching the path. If + a mapping matches, it's committed to the uri-path such that all the directory + contexts that use a path (like <Location>) will be matched using the + same mapping. +

mapping=encoded prevents the %-decoding of the uri-path so + that one can match for instance /some%2furi%2fpath%2fwith%2fslash in a + ProxyPass or in a <Location> context.

+

mapping=servlet refers to the normalization defined by the Servlet + specification, which is for instance applied by Apache Tomcat for servlet containers + (notably the path parameters are ignored for the mapping). An uri-path like + /some;foo/path is then mapped as /some/path hence matches:

+

<Location /some/path> or:

+

ProxyPass "/some/path" "https://tomcat.example.com/some/path"

+

regardless of the requested path parameters.

+ Note +

It is recommended to use the same mapping on the Apache httpd side than the one + used on the backend side. For instance when configuring authorizations in + <Location> blocks for paths that are mapped by mod_proxy + to some servlet containers (like applications running on Apache Tomcat), one should + use the mapping=servlet setting to prevent path parameters and alike from + interfering with the authorizations that are to be enforced in by the Apache httpd.

+