Re: Virtual Site Accelerator

From: Keith Heinemann <>
Date: Thu, 30 Oct 1997 03:04:42 -0500 (EST)

> We're running virtual WWW sites based on different IP addresses on a
> same machine. This is easy to do with W3C httpd and yet easier with
> apache.
> Now we're thinking about accelerating those pages with squid. Is
> there (will there be) some way to do virtual acceleration with squid
> other than running one squid process for each IP address ?
> Jonny

Yes, and it's pretty cool. The actual inner-workings are fairly OS
specific I believe, and I am only familiar with doing this under Linux.
My understanding is that Solaris does this too, and I imagine BSDi could
probably handle it as well. Basically the way I am doing it here is-

Linux 2.0.31 (or 2.0.29) kernel w/ transparant proxy support compiled in.

I assume you already have all the correct routes in place such that your
web sites are working.

First configure squid to listen on TCP port 80. (If you would also like
to use the same squid for normal cache operations, you can either set the
clients to talk to port 80, or issue the following:

/sbin/ipfwadm -I -a acc -P tcp -S -D
{the-ip-address-cache-clients-talk-to}/32 3128 -r 80

the above (one line) will redirect any requests to TCP port 3128 to port
80 on whatever IP address you specify.

Then you need to modify squid.conf to turn on all the httpd_accel + proxy
stuff, and configure the httpd_accel forwarder as

httpd_accel virtual 81

You then simply configure all your web servers to run on port 81 instead
of 80. (Port 81 is by no means carved into any sort of stone whatsoever),
and away you go. If your configuration gets more complex then just a
one-box web server you can furthur configure the transparent-redirect
functions to automatically cache any request routed to another web server.

Hope this help(ed/s)

Received on Thu Oct 30 1997 - 00:15:48 MST

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