Re: [squid-users] Multiple different parents and no default

From: Chris Robertson <crobertson_at_gci.net>
Date: Tue, 28 Apr 2009 12:32:18 -0800

Markus Meyer wrote:
> Hi all,
>
> sorry for the bad subject choice. I'm quite stuck here and could use
> some help ;)
>
> Here an example setup to explain my issue.
> My own proxy goes under the name "myproxy".
> I have two parent proxies:
> - jallah.image
> - kalimba.image
>
> Now it comes. I know that I have a request for "jallah.image" when the
> client-request contains of http://myproxy/jallah_img/foo/bar.jpg. This
> needs to be rewritten to http://myproxy/foo/bar.jpg since /foo/bar.jpg
> is the original address on "jallah.image". Same with "kalimba.images".
>
> The rewrite program isn't the problem. But how can I tell Squid to pick
> the right parent. Especially since I don't have a default proxy. So what
> to do with requests that neither contain "/jallah_img" nor "/kalimba_img"?
>

What do you *want* to do?

Go direct?

acl jallah url_regex ^jallah_img\/
acl kalimba url_regex ^kalimba_img\/
always_direct allow !jallah !kalimba

Pick a (pseudo) random parent for requests that DON'T match those terms
in the URL?

cache_peer jallah.image parent 3128 3130 sourcehash
cache_peer kalimba.image parent 3128 3130 sourcehash
acl jallah url_regex ^jallah_img\/
acl kalimba url_regex ^kalimba_img\/
cache_peer_access deny jallah.image kalimba
cache_peer_access deny kalimba.image jallah

Use one parent proxy for all requests that DON'T match match those terms
in the URL?

cache_peer jallah.image parent 3128 3130 default
cache_peer kalimba.image parent 3128 3130
acl jallah url_regex ^jallah_img\/
acl kalimba url_regex ^kalimba_img\/
cache_peer_access deny jallah.image kalimba
cache_peer_access deny kalimba.image jallah

Something else?

> I hope I could more or less make clear my issue.
>

More or less... :o)

>
> Cheers,
>
> Markus

Chris
Received on Tue Apr 28 2009 - 20:32:18 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 29 2009 - 12:00:03 MDT