RE: [squid-users] Multiple site example

From: Gregori Parker <>
Date: Fri, 14 Nov 2008 15:08:46 -0800

You only need one http_port statement with one defaultsite...define
multiple cache_peer parents, like so, and make sure you're acl's are
straight (this is the tricky aspect of reverse-proxy imo, getting the
security right)

http_port 80 accel vhost
cache_peer parent 80 0 no-query no-digest originserver
cache_peer parent 80 0 no-query no-digest originserver
cache_peer parent 80 0 no-query no-digest originserver
cache_peer_domain mysite1
cache_peer_domain mysite2
cache_peer_domain mysite3

acl my_site1 dstdomain
acl my_site2 dstdomain
acl my_site3 dstdomain
acl myaccelport port 80

cache allow my_site1
cache allow my_site2
cache allow my_site3

http_access allow my_site1 myaccelport
http_access allow my_site2 myaccelport
http_access allow my_site3 myaccelport

Personally, I use a load balancer to direct traffic to Squid, and have
the hostnames redefined in /etc/hosts to get traffic to the backend

Hope that helps, YMMV

- Gregori

-----Original Message-----
From: Ramon Moreno []
Sent: Friday, November 14, 2008 1:24 PM
To: Henrik Nordstrom
Subject: Re: [squid-users] Multiple site example


Thanks for the quick reply.

So I think this answers the cache peer question.

The other is what do I specify for the http_port section.

Currently I only am doing acceleration for one site:
http_port 80 accel

How do I configure this parameter for 3 sites while using the same
port? I am guessing, but would it be something like this:
http_port 80 accel vhost
http_port 80 accel vhost
http_port 80 accel vhost

On Fri, Nov 14, 2008 at 1:12 PM, Henrik Nordstrom
<> wrote:
> On fre, 2008-11-14 at 12:19 -0800, Ramon Moreno wrote:
>> I know how to accelerate for one site based on the faq, however not
>> too sure how to do multiple.
> It's also in the FAQ..
> Squid FAQ Reverse Proxy - Sending different requests to different
backend web servers
> Regards
> Henrik
Received on Fri Nov 14 2008 - 23:08:56 MST

This archive was generated by hypermail 2.2.0 : Sat Nov 15 2008 - 12:00:02 MST