RE: [squid-users] Multiple httpd_accel_host

From: Spyros Ioakim <[email protected]>
Date: Tue, 11 Nov 2003 21:15:46 +0200

> On Tue, 11 Nov 2003, Ioakim Spyros wrote:
>
> > Is it possilbe to have more than one httpd_accel_host?
>
> Yes, but not by using httpd_accel_host..
>
> > I want to have a front end squid proxy that will answer
> requests for
> > 127.0.0.1:80 (this is an apache server with 5 virtual
> domains) but it
> > will also answer for a server @ 192.168.0.10:80 (which is IIS)
>
> This is not really the job of httpd_accel_host. The job of
> httpd_accel_host is to define the primary domain on your
> virtual server, used if no Host header is present.
>
> Selection of which server to forward the request to belongs
> in /etc/hosts or cache_peer+cache_peer_access depending on
> your Squid version.

The way I had it realised was that you configure all your web servers
(including virtual) to a DNS A record of the address of squid.
Example:
Squid server is at 195.10.10.1
I setup my dns for my apache dns that has 5 virtual domains as:
www.domain1.com A 195.10.10.1
www.domain2.com A 195.10.10.1
www.domain3.com A 195.10.10.1
www.domain4.com A 195.10.10.1
www.domain5.com A 195.10.10.1

Apache is configured with virtualhost support and configured ok!

I move Apache from 195.10.10.1:80 to 127.0.0.1:80

I also have www.domain6.com which is IIS and is at 192.168.10.20
So I change the DNS to point to:
www.domain6.com A 195.10.10.1

What I understand is that I go into /etc/hosts and add...
www.domain1.com 127.0.0.1
www.domain2.com 127.0.0.1
www.domain3.com 127.0.0.1
www.domain4.com 127.0.0.1
www.domain5.com 127.0.0.1
www.domain6.com 192.168.10.20

Then whenever squid accept a request will lookup /etc/hosts and will fetch
the page and display it.
But if someone ask http://195.10.10.1 I need a httpd_accel_host to point to
195.10.10.1 so that something will be displayed. Otherwise he will get a
connection refused or something...

Am I getting this right or is it just plain science fiction ;-?

Thanks,
Spyros
Received on Tue Nov 11 2003 - 12:15:50 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:21:14 MST