You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Guild <ja...@alaska.gov> on 2013/07/26 21:52:08 UTC

[users@httpd] apache 2.2.25: error in ProxyPass URL parsing with interpolation

Hi there:

I have a virtual host which acts as a reverse proxy to an application
running on a different server. The reverse proxy must preserve the
protocol used by the incoming request (HTTP or HTTPS) when making the
proxied request.

This was accomplished easily in httpd 2.2.21 with the following statements:

      ProxyPassInterpolateEnv On
      RewriteEngine On

      RewriteCond %{HTTPS} =off
      RewriteRule . - [E=protocol:http]
      RewriteCond %{HTTPS} =on
      RewriteRule . - [E=protocol:https]

      ProxyPass/my_app/  ${protocol}://1.2.3.4/my_app/ interpolate
      ProxyPassReverse/my_app/  ${protocol}://1.2.3.4/my_app/ interpolate

When I upgraded to httpd 2.2.25, the server now chokes on parsing the
URLs of the ProxyPass and ProxyPassReverse statements above.
Removing the ${protocol} from those URLs allows the server to start.

Is there another or better way to accomplish this setup?
Perhaps this is a regression in mod_proxy?

My setup is:
Windows 7 x64
Apache httpd 2.2.25 win32 x86

Any help or recommendations you can provide is appreciated.

Thanks,
Jason