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


2 Answers 2


Check that you have a ProxyPassReverse directive for each ProxyPass 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.

  • sorry snipt.net/search?q=apache+reverse+proxies+chain
    – Sergei
    May 20, 2011 at 13:47

adding follwing in webproxy fixed it
ProxyPreserveHost On

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.