Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

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.

share|improve this answer
    
sorry snipt.net/search?q=apache+reverse+proxies+chain –  Sergei May 20 '11 at 13:47
up vote 0 down vote accepted

adding follwing in webproxy fixed it
ProxyPreserveHost On

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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