[squid-users] Virtual server. Common images across domains.

From: David Brown <david@dont-contact.us>
Date: Wed, 6 Nov 2002 14:56:01 -0000

Hi,

I have multiple domains on the same machine (single IP address) and am
running Squid (2.4.STABLE-7) as an accelerator.

Main configuration values set are:

httpd_accel_single_host on
httpd_accel_uses_host_header on
httpd_accel_host 127.0.0.1
httpd_accel_port 80
hostname_aliases www.domain1.com www.domain2.com www.domain3.com
www.domain4.com ..
httpd_accel_with_proxy off

The problem is, Squid is caching a version of each GIF object for each
domain name, so for example there's an entry under the cached objects for

domain1/signup.gif
domain2/signup.gif
domain3/signup.gif

and so on..

But because it's a virtual server, sharing the same document root and the
same images for each site, we only really need one copy of signup.gif
cached, which can be used for any request from those domains. The current
setup is very wasteful, keeping 4-5 copies of the each image in memory.

Can Squid be configured to be clever enough to store objects based on their
local paths, rather than their internet paths ?

If so, what are the correct configuration options ?

NOTE: From the programming side, I still need to know what domain is being
used so that I can send back slightly tailored HTML output for each domain.

Regards
Received on Wed Nov 06 2002 - 07:56:16 MST

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