Re: Squid and virtual domains

From: Miguel A.L. Paraz <>
Date: Sun, 27 Oct 1996 15:21:34 +0800 (PST)


Rudy Amid wrote:

> Thanks for the suggestion. I am using the ifconfig alias for virtual
> domains and I find that if I configure just one squid to listen on port 80
> for just one IP address, I'm still connected the other virtual IP address
> into that same one!
> For example, still
> translates to The real server is listening on
> port 81.

I failed to mention earlier that -V for virtual hosting works for
Squid 1.0. This is what you can use. Squid will use the address that
the client connect to, to determine what virtual host on port 81 to
use. Example:

I have two web sites, and, which are
on and, respectively. Both are driven by
Apache listening on port 81.

To accelerate one server only, say, use:

http_port 80
httpd_accel 81

With this setup, even if a browser connects to,
they would still see Squid will always request

To make both work, use the same configuration as above, but specify -V.
With this, Squid will *ignore* the in the httpd_accel
line, but will use the port 81 specified. Instead, it will look
at the IP address that the browser connected to, and use that as
the request. It does not use the hostname, and will request for and

> I'm not sure if Apache 1.1.1 lets me configure the virtual hostname to
> listen on other ports. That way I don't have to run more than
> one squid on a less busy virtual hostname.

I believe the BindAddress directive does it. As shipped, Squid
virtual hosting doesn't work for Host: header based virtual hosting,
which Apache does if you don't specify a BindAddress.

Hope this helps!

miguel a.l. paraz  <>  PGP: 0x43F0D011
iphil communications:  isp/intranet design and implementation, makati city, ph
Received on Sun Oct 27 1996 - 00:21:33 MDT

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