httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: Problem with mod_proxy and ProxyPassReverse
Date Fri, 04 Nov 2005 09:16:19 GMT
Eric B. wrote:

> # Production Server
> <Location /ASPTest/>
>         ProxyPassReverse /
> </Location>
>         ProxyPass               /ASPTest/ http://192.168.100.1/
> 
> # Development & Test Server
> <Location /dev/ASPTest/>
>         ProxyPassReverse /
> </Location>
>         ProxyPass               /dev/ASPTest/ http://192.168.100.1:8080/

Unless you are trying to do something special, the ProxyPassReverse 
lines should look like this:

ProxyPassReverse /ASPTest/ http://192.168.100.1/
ProxyPass        /ASPTest/ http://192.168.100.1/

# Development & Test Server
ProxyPassReverse /dev/ASPTest/ http://192.168.100.1:8080/
ProxyPass        /dev/ASPTest/ http://192.168.100.1:8080/

Make sure that your backend webservers agree that they are called 
"http://192.168.100.1:8080", otherwise ProxyPassReverse won't do anything.

The ProxyPassReverse is a simple "find and replace" string match on the 
prefix of the URL returned by the backend server during redirects. You 
had this prefix set to "/", which won't match "http://...".

Another problem you may have is if hard coded references to the full 
site name are hard coded into your backend application. Proxy does not 
parse HTML, and so doesn't try any of the same find and replace magic 
inside the HTML itself.

If this is the case, either remove the references to the full site name 
from the backend, or introduce a mechanism to make sure the backend 
embeds the frontend world visible URL into the pages instead of your 
private http://192.168.0.1 URL.

Regards,
Graham
--

Mime
View raw message