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

From: Marcus Johansson <marcus@dont-contact.us>
Date: Wed, 23 Apr 2008 13:10:54 +0200

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

I would be very grateful for any help on this!

Regards,
Marcus Johansson
Received on Wed Apr 23 2008 - 11:11:02 MDT

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