On 10/17/2012 7:32 AM, Eric Covener wrote:
> Sometimes headers have a URL in them. If your backend puts its own URL
> in a header, Apache can replace it with the frontend URL.

Exactly - ProxyPassReverse fixes Location headers sent by a backend
during a redirect. It replaces the part matched with the value of your
server name (note UseCanonicalName comes into play in this case).

For a bit more elaboration, consider this configuration snippet:
   ProxyPass /context  http://backend.com/context
   #ProxyPassReverse /context http://backend.com/context

Request:
   GET /context HTTP/1.1
   host: frontend.com
   connection:close

Response:
   HTTP/1.1 302 Found
   Location: http://backend.com/context/

With ProxyPassReverse line enabled (uncommented), this will instead happen:
Request:
   GET /context HTTP/1.1
   host: frontend.com
   connection:close

Response:
   HTTP/1.1 302 Found
   Location: http://frontend.com/context/

It will replace all occurrences of the second argument with a
self-constructed URL of the server. The first argument is used to
translate the path if needed.

--
Daniel Ruggeri



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to