Re: ProxyPassReverse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux