Comment 2 for bug 438694

Revision history for this message
Michael Lenaghan (michaell) wrote :

Henrik Nordstrom, the primary maintainer of Squid, added this description:

===

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..

===

I believe it's the last part of no. 4 that I was seeing in action: "or if vport is not set to a static port number then the
local http_port number".