Re: [squid-users] httpd_accel_uses_host_header and Virtual Hosts problem

From: Robert Collins <>
Date: Wed, 14 Mar 2001 08:20:02 +1100

As a workaround for this, you can bind another ip address to your
loopback adapter, and then have apache bind to port 80 on that ip. That
will give you ip based acceleration, on port 80, on a single machine.


----- Original Message -----
From: "Xavier Renaut" <>
To: "squid ml" <>
Sent: Wednesday, March 14, 2001 4:30 AM
Subject: Re: [squid-users] httpd_accel_uses_host_header and Virtual
Hosts problem

On 2001-03-13, at 12:48, Raśl Ortiz-Boyero wrote :

|Hi there,
|Sorry if somebody has posted this problem before but I have checked the
|and the searchable archive and I cannot find any relevant information
|regarding the problem I'm experiencing.
|I'm trying to use Squid Version 2.3.STABLE4 in order to accelerate
|back-end virtual Apache-SSL webservers running on the same local
|Squid is listening on port 80 and Apache runs on port 8090. My basic
|is that this is not working at all! All works perfectly ok when I
|one host but stops working when I activate the directive
|'httpd_accel_uses_host_header', which I understand is necessary in
order to
|get the virtual hosts stuff working. I need to pass the host part of
|HTTP header to Apache so it knows where to go to look for the
|for each of the Virtual Hosts running.
|The main bits of my squid.conf look like this:
|http_port 80
|httpd_accel_host virtual
|httpd_accel_port 8090
|httpd_accel_with_proxy off on
|httpd_accel_uses_host_header on
|acl acceleratedHost dst
|acl acceleratedPort port 8090
|acl all src
|# my test PC has an IP of
|acl myNet src
|# we also don't want requests for localhost passed on to a peer
|always_direct allow acceleratedHost
|# Allow requests when they are to the accelerated machine AND to the
|# right port
|http_access allow acceleratedHost acceleratedPort
|http_access allow myNet
|http_access deny all
|The documentation mentions that you must combine
|'httpd_accel_uses_host_header' with strict source-address checks, so
|cannot use this option to accelerate multiple backend servers (although
|is certain to change in a later version of Squid). Does this mean that
|I'm trying to do will never work? If so, please let me know so I can
|evaluating other alternatives.

If this is a namebased virtual host (same ip)
you have to remove the
"httpd_accel_host virtual"

this is only valid on ip based virtual hosts.

but you'll get the same problem as me : in some of the apache response
(redirect from /directory to /directory/, for exemple), apache will say
that it
is running on the 8090 port, and netscape or lynx will try to access
your site
on this port. which breaks the squid advantage, and is probably not
allowed by
your firewall.


Received on Tue Mar 13 2001 - 14:20:45 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:58:38 MST