Search squid archive

RE: Squid reverse proxy - URL change in the response

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

 



On Tue, 11 Oct 2005 DGeorgie@xxxxxxxxx wrote:

It looks to me Squid is not rewriting the URL of the response to look like
that of the request.

Correct. It only rewrites the request.

The Web/J2EE application is using lots of redirects and whatever it receives from Squid server ( httpd_accel_host & httpd_accel_port) it sends back in the response in the Location HTTP header.

Then you will run into trouble.

The accelerator support in Squid is designed with the assumtion that you have reasonable control over the backend servers making their responses look real.

Genereally my recommendataion is to avoid URL rewriting as much as possible in either direction. As soon as you start with URL rewrites you will sooner or later (usually sooner) end up in trouble.

If you have a single backend server then the simplest setup is

  httpd_accel_host your.real.sitename
  httpd_accel_uses_host_header off

then point your.real.sitename to the backend web server in /etc/hosts.

If you have multiple backend servers for different parts of the site then it's slightly more complicated.

Regards
Henrik

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux