Re: [squid-users] Problem with host-header on a accelerated proxy

From: Amos Jeffries <squid3@dont-contact.us>
Date: Wed, 23 Apr 2008 23:50:39 +1200

Marcus Johansson wrote:
> Hi
>
> I'm using Squid as an accelerator for an apache web server which
> resides on a internal private network. Squid resides on the firewall
> and receives all requests for the web server.
> I have configured it this way in squid.conf:
>
> httpd_accel_host 192.168.0.51 # IP address of web server
> httpd_accel_port 80 # Port of web server
>
> httpd_accel_single_host on # Forward uncached requests to single host
> httpd_accel_with_proxy on #
> httpd_accel_uses_host_header off
>
> (I'm also using Squid as a proxy, that's why "httpd_accel_with_proxy" is on.)
>
> The problem is that the Host-header seen by apache always is
> "192.168.0.51" regardless of which address was used to access the
> squid server.
> I would like the host-header used by the browser client to be sent
> through the proxy to the web server (so that I can use virtual hosts
> on my web server).
>
> I have tried to set "redirect_rewrites_host_header" to off but that
> didn't seem to change anything.
> Changing "httpd_accel_uses_host_header" seemed only to redirect the
> requests to the wrong machine, and it failed to get pass my access
> list rules.
>
> The version of squid is: Squid Cache: Version 2.5.STABLE12
>

If you can I'd seriously advise upgrading. 2.5 is rather old and even
2.6 is on it planned final release cycle now. If there is any code or
feature reason you have not, please let us know.

Methinks the problem is:
   httpd_accel_uses_host_header off

That option makes accelerators use the Host: header. If it then fails
your ACL, thats a secondary problem with the ACL configuration.

Amos

-- 
Please use Squid 2.6.STABLE19 or 3.0.STABLE4
Received on Wed Apr 23 2008 - 11:50:10 MDT

This archive was generated by hypermail 2.2.0 : Thu May 01 2008 - 12:00:04 MDT