Re: [squid-users] squid.conf and Squid 2.6 vs. Squid 2.7

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Mon, 05 Oct 2009 12:01:33 +0200

tis 2009-09-29 klockan 00:10 -0400 skrev Michael Lenaghan:

> I've had a very difficult time finding good docs for vhost, vport and
> defaultsite. I've looked and I've searched in many places, but I
> haven't found anything that would help me explain *why* this change
> worked. Indeed, the bits I did find made me think that perhaps you
> don't need defaultsite when you're using vhost--but I'm not even sure
> about that!

vport is a little overloaded and serves two purposes. Controls both the
port number of the reconstructed URL and may be used to enable IP based
host reconstruction as fallback when there is no Host header (or when
vhost is not enabled).

You need at least one of vhost, vport or defaultsite enabled.

Basically

1. If vhost is enabled then use the Host header.

2. If vhost is not enabled or if there is no host header then use
defaultsite if set.

3. If none of the above and vport is set without argument then use the
local IP address as hostname.

4. If the above do not contain a port number then vport=NN is used as
port number, or if vport is not set to a static port number then the
local http_port number.

> (The 2.7 change notes say that for http_port "Accelerator mode options
> cleaned up (accel, defaultsite, vport, vhost and combinations
> thereof)". Is the difference in behaviour here related to that
> clean-up?)

Yes. Was even more odd before..

Regards
Henrik
Received on Mon Oct 05 2009 - 10:01:40 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 05 2009 - 12:00:02 MDT