We have reverse web proxy on Apache2 that proxies requests to the remote webserver using URL http://server1 that gets content proxied from http://realserver1
Now I am trying to add another site to webproxy that does the same, the difference is that remote server already runs Apache as a reverse proxy (for the java application on the same host but different port).
I.e. webproxy serves URL http://server2 that gets content proxied from http://realserver2, which in turn gets its content from http://localhost:someport
Now I would expect that this setup would just work, however it does not.
Instead I am being redirected to http://realserver2.Any idea what ai am doing wrong?
Thank you!
Code can be seen in snipt.net/search?q=apache+reverse+proxies+chain
Check that you have a
ProxyPassReverse
directive for eachProxyPass
already in place.Check that you're not performing any erroneous rewrites (with flag R in particular) or standard redirections on realserver2.
Also: post the relevant bits of configuration so we can have a look at them.
adding follwing in webproxy fixed it
ProxyPreserveHost On