Re: [squid-users] Squid and multiple domains going to a Single Apache Server

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 06 Feb 2010 11:52:38 +1300

Drew Wrobel wrote:
>
> I'm currently running Squid 2.7 STABLE 7.
>
> I had some help getting squid setup to redirect all requests that were not for the main site to the main site.
> Which works great!!!
>
> Here's my new problem. I have to setup a new domain that will be going to the same apache server but it
> would have it's own configuration.
>
> Not sure what I need to do to allow this specific domain to get sent over to the apache server so that it hits
> it's configuration and everything else follows the previous rules.
>
> Here is what I currently have defined ( this is a test server so only apache server is used ) that works:
>
> The entries for storelocatorStie are the new entries:
>
> http_port 80 accel vport
>
> cache_peer 172.21.174.78 parent 80 0 no-query originserver round-robin login=PASS
>
> acl mainSite dstdomain www-dev1.company.com
>
> cache_peer_access 172.21.174.78 allow mainSite
> cache_peer_access 172.21.174.78 deny all
>
> http_access allow mainSite
> http access deny !mainSite
>
>
> deny_info http://www-dev1.pepboys.com/ mainSite
>
>
> Here are the new entries I thought I would need to handle the new domain:
>
> acl mainSite dstdomain www-dev1.company.com
> acl storelocatorSite dstdomain localstores-dev1.company.com
>
> cache_peer_access 172.21.174.78 allow mainSite
> cache_peer_access 172.21.174.78 allow storelocatorSite
>
> cache_peer_access
> 172.21.174.78 deny all
>
> http_access allow storelocatorSite
> http_access deny ! mainSite
> !storelocatorSite
>
> deny_info http://www-dev1.pepboys.com/ mainSite
>
>
> Can I even do this???

Yes. That will work.

I'd just do this though:
  acl mainSite dstdomain www-dev1.company.com localstores-dev1.company.com

(watch the wrap, thats one line)

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE7 or 3.0.STABLE23
   Current Beta Squid 3.1.0.16
Received on Fri Feb 05 2010 - 23:02:46 MST

This archive was generated by hypermail 2.2.0 : Sat Feb 06 2010 - 12:00:03 MST