I am implementing a reverse http proxy:
This will forward requests to servers based on URI:
proxy.example.com/server1 -> server1.example.com
When a user requests proxy.example.com/server1, server1 sends a programatically generated (Ruby Devise Gem) 302 response with the following "Location" value:
I need this to be:
I have implemented the following config in Apache:
ProxyPass "/server1/" "http://server1.example.com/"
ProxyPassReverse "/server1/" "http://server1.example.com/"
This directive lets Apache adjust the URL in the Location, Content-Location and URI headers on HTTP redirect responses. This is essential when Apache is used as a reverse proxy (or gateway) to avoid bypassing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy.
But the Location header that is being returned by server1 is still:
Is there something wrong with my config?