Re: Virtual hosts setup

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Tue, 27 Oct 1998 23:30:29 +0100

Sergey Gribov wrote:

> I want to have some virtual Web servers, so I've put:
> httpd_accel_host virtual
> httpd_accel_uses_host_header on

httpd_accel_host virtual

Is not really for virtual servers. Its use is when you have
multiple IP addresses configured on the squid server, and
each IP is accelerating a separate server.

It also requires the use of a redirector that rewrites
the requests from IP address to the accelerated servers
name/address.

> But then I'm trying to access venus1.cgen.com

> IN: http://4.17.160.178/ 198.112.213.2/- - GET
> OUT: http://4.17.160.178/ 198.112.213.2/- - GET

How are you trying to access it? It looks like you are doing
a manual request using telnet or something similar..

Another possibility is that you are using 2.1.PRE1 which is
severely broken. If you are using 2.1.PRE1 then downgrade
to 2.0.PATCH2.

If you have are accelerating a single HTTP server (one IP
address)the Squid setup should look like this:

httpd_accel_host main.www.server
httpd_accel_uses_host_header on

And /etc/hosts should list all domainnames (real and virtual)
on the server with IP address of the backend server serving
that domain/site.

If you have multiple official IPs then the setup becomes more
complex, but the need for such setups is getting smaller and
smaller as more and more people upgrade their browsers to
versions supporting Host: based virtual servers.

---
Henrik Nordstrom
Spare time Squid hacker
Received on Tue Oct 27 1998 - 15:47:33 MST

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