Hi,
On 30/03/2012 11:01, Igor Cicimov wrote:
Have you actually read the mod_proxy documentation or you are just
working with some example you found somewhere? If you read it you will
find that you can use ! in the ProxyPass to exclude a path from the proxy.
Of course I have, but I don't think that's the issue: i do want to
reverse proxy requests starting with /apps/. All works fine without
ProxyPreserveHost:
ProxyRequests off
ProxyPass//apps// http://localhost:8082/ <http://localhost:8080/>
ProxyPassReverse///apps/http://localhost:8082/ <http://localhost:8080/>
ProxyPassReverseCookiePath//apps// /
Yet, switching ProxyPreserveHost on seems to make ProxyPassReverse to be
ignored. Internal redirects end up without the /apps/ part, while it
should be preserved. With ProxyPreserveHost, it's as if above
ProxyPassReverse instructive is always interpreted as:
ProxyPassReverse/// http://localhost:8082/ <http://localhost:8080/>
...no matter what actual value is given in the first argument: all
internal redirects inside the proxied app end up at the wrong path,
e.g.: <http://mydomain/my_app/index.htm> instead of
<http://mydomain/apps/my_app/index.htm>.
Unfortunately, some part of the proxied app needs access to the original
host (http://mydomain/), instead of the proxied host
(http://localhost:8082). That's what I understood ProxyPreserveHost was
for, but it doesn't work completely as I'd expect, given the ProxyPass
directive, and I don't see what causes this difference.
I want to seriously investigate and fix this issue and really appreciate
your help. However, I'll be off-line for the next week, but will
investigate further when I'm back from holiday.
Kind regards,
Ron