Re: [squid-users] Multiple hosts with cache_peer and urlpath_regex

From: Amos Jeffries <squid3@dont-contact.us>
Date: Wed, 27 Feb 2008 11:10:35 +1300

Chris Malek wrote:
> Well...thank you for your suggestions, but i still have the same problem.
> In the cache.log everything looks OK except this one line: icmpSend:
> send: (111) Connection refused
>

Ah, your pinger helper is not working.

You may need to go to the dir you built squid and run "make install-pinger".

If its a package. It may be bundled seperately or a help call to the
maintainer.

Squid 3.1+ has "pinger_enable" option to turn it off at run-time.

Amos

> Below are all the things that I have added to the squid.conf
> Maybe there is some crucial mistake that squid newbie can't find :)
> Anyway,
> here it is:
>
> http_port 80
> cache_peer 192.86.77.19 parent 80 0 no-query originserver name=server1
> cache_peer 192.86.77.26 parent 80 0 no-query originserver name=server2
> acl amd5 urlpath_regex ^/amd5
> acl view urlpath_regex ^/view
>
> cache_peer_access server1 allow amd5
> cache_peer_access server1 deny view
> never_direct deny amd5
> cache_peer_access server2 allow view
> cache_peer_access server2 deny amd5
> never_direct deny view
>
> http_access allow localhost
> acl port80 port 80
> http_access allow port80
> http_access allow amd5 view
>
> always_direct allow all
>
>
>
>
> Amos Jeffries wrote:
>> Chris Malek wrote:
>>> Hello squid users,
>>>
>>> I'm a bit puzzled here. I was recently asked to setup a squid box with
>>> the following requirements:
>>>
>>> when people would hit http://example.com/srv1 that request should go to
>>> server1
>>> and http://example.com/srv2 and that request should go to server2
>>>
>>> I have tried the following, but with no success:
>>>
>>> cache_peer ip.of.server1 parent 80 0 no-query originserver name=server1
>>> cache_peer ip.of.server2 parent 80 0 no-query originserver name=server2
>>> acl foo urlpath_regex ^/foo
>>> cache_peer_access server2 allow foo
>>> cache_peer_access server1 deny foo
>>>
>>>
>>> I'm getting "The requested URL could not be retrieved" error.
>>> Can anyone put me on right track here?
>>
>> not quite enough foo ;-)
>>
>> cache_peer_access server1 allow foo1
>> cache_peer_access server1 deny foo2
>> never_direct deny foo1
>>
>> cache_peer_access server2 allow foo2
>> cache_peer_access server2 deny foo1
>> never_direct deny foo2
>>
>> (I'm a bit fuzzy this morning, but I think I've got the never_direct
>> allow/deny the right way round.)
>>
>> Amos

-- 
Please use Squid 2.6STABLE17+ or 3.0STABLE1+
There are serious security advisories out on all earlier releases.
Received on Tue Feb 26 2008 - 15:10:11 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:05 MST