httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1532824 - in /httpd/httpd/branches/2.4.x: ./ docs/manual/ docs/manual/mod/ docs/manual/mod/mod_proxy.xml
Date Wed, 16 Oct 2013 17:23:18 GMT
Author: trawick
Date: Wed Oct 16 17:23:18 2013
New Revision: 1532824

URL: http://svn.apache.org/r1532824
Log:
Merge r1532816 from trunk:

Interpolation worked within the scheme portion of URLs for
ProxyPass and ProxyPassReverse until a fix to apr_uri_parse()
in APR-Util 1.5.2 closed the hole that had previously allowed
the necessary {} characters within the scheme.

Lack of support for interpolation within the scheme will be a
permanent limitation.

The mod_proxy documentation is updated to provide an alternate
configuration solution.

PR: 55315
Submitted by: Mike Rumph <mike.rumph oracle.com>
Tweaked by: trawick

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1532816

Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual:r1532816

Propchange: httpd/httpd/branches/2.4.x/docs/manual/mod/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual/mod:r1532816

Modified: httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml?rev=1532824&r1=1532823&r2=1532824&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/mod/mod_proxy.xml Wed Oct 16 17:23:18 2013
@@ -1214,15 +1214,6 @@ ProxyPass / balancer://hotcluster/
     removes the normal limited protection against URL-based attacks
     provided by the proxy.</p>
 
-    <p>The optional <var>interpolate</var> keyword (available in
-    httpd 2.2.9 and later), in combination with
-    <directive>ProxyPassInterpolateEnv</directive> causes the ProxyPass
-    to interpolate environment variables, using the syntax
-    <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
-    environment variables will not exist when this interpolation happens,
-    so you may still have to resort to <module>mod_rewrite</module>
-    for complex rules.</p>
-
     <p>Normally, mod_proxy will include the query string when
     generating the <var>SCRIPT_FILENAME</var> environment variable.
     The optional <var>noquery</var> keyword (available in
@@ -1244,6 +1235,30 @@ ProxyPass / balancer://hotcluster/
     <directive module="mod_rewrite">RewriteRule</directive> directive with the
     <code>[P]</code> flag.</p>
 
+    <p>The optional <var>interpolate</var> keyword (available in
+    httpd 2.2.9 and later), in combination with
+    <directive>ProxyPassInterpolateEnv</directive> causes the ProxyPass
+    to interpolate environment variables, using the syntax
+    <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
+    environment variables will not exist when this interpolation happens,
+    so you may still have to resort to <module>mod_rewrite</module>
+    for complex rules.  Also note that interpolation is not supported
+    within the scheme portion of a URL.  Dynamic determination of the
+    scheme can be accomplished with <module>mod_rewrite</module> as in the
+    following example.</p>
+
+    <highlight language="config">
+RewriteEngine On
+
+RewriteCond %{HTTPS} =off
+RewriteRule . - [E=protocol:http]
+RewriteCond %{HTTPS} =on
+RewriteRule . - [E=protocol:https]
+
+RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P]
+ProxyPassReverse  /mirror/foo/ http://backend.example.com/
+ProxyPassReverse  /mirror/foo/ https://backend.example.com/
+    </highlight>
 </usage>
 </directivesynopsis>
 
@@ -1375,7 +1390,8 @@ ProxyPassReverseCookiePath  /  /mirror/f
     httpd 2.2.9 and later), used together with
     <directive>ProxyPassInterpolateEnv</directive>, enables interpolation
     of environment variables specified using the format <var>${VARNAME}</var>.
-    </p>
+    Note that interpolation is not supported within the scheme portion of a
+    URL.</p>
 
     <p>When used inside a <directive type="section" module="core"
     >Location</directive> section, the first argument is omitted and the local



Mime
View raw message