You (Sam Eaton) wrote:
> My next question is - is there a way to make virtual hosts work using
> Squid? I know how to set up Apache to do it, by binding to the
> addresses I want - but how can I stick Squid in the way first - let's
> say I have
>
> www.cocoon.co.uk 194.200.187.42
> www.company.co.uk 194.200.187.52
>
> I can set Apache to bind onto those two addresses and serve the
> requisite web pages, no problem. Now if I want to use Squid as an
> accelerator, will I need to put a copy of squid running bound to each of
> those addresses passing requests onto the single copy of Apache bound to
> each one but on a different port ? Like this :
>
> request -> 194.200.187.42:80 -> Squid1 -> Apache1:88
> request -> 194.200.187.52:80 -> Squid2 -> Apache1:88
>
> So that there is one copy of squid for each virtual host, and only one
> Apache??? This seems like a bad move as squid isn't exactly tiny....
Well you probably have to hack squid for that, but the HTTP/1.1 standard
defines a Host: header so that virtual WWW servers no longer need their
own IP number, just a CNAME in the DNS will be enough (major design
flaw in the original HTTP specs).
If you could tell squid to lookup the hostname of the ip number that
getsockname() returns and add a HTTP "Host" header, apache would know
what virtual host to serve.
Apache 1.0.5 does not support this, but 1.1 is supposed to..
Mike.
-- Miquel van | Cistron Internet Services -- Alphen aan den Rijn. Smoorenburg, | mailto:[email protected] http://www.cistron.nl/ miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)Received on Mon Jul 01 1996 - 09:02:31 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:32:33 MST