Search squid archive

Is there a way to select a cache peer before URL rewrite occur ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all:

I wonder if it's possible to select a peer before URL rewrite takes
place. This my scenario:

I've got 2 domains: www.foo.org and www.bar.org, and a rewriter that
does the following rewriting:

www.foo.org => localhost/foo
www.bar.org => localhost/bar

My config is:

cache_peer localhost parent 1080 0 originserver name=foo
cache_peer localhost parent 1081 0 originserver name=bar

acl bar_acl dstdomain .bar.org
acl foo_acl dstdomain .foo.org
cache_peer_access foo deny bar_acl
cache_peer_access bar deny foo_acl

Will not work. Debuging section 28 I saw that 'cache_peer_access' is checked
*after* the URL rewrite, so It does against 'localhost/foo' and
'localhost/bar', not
against 'www.foo.org' or 'www.bar.org'.

 I know that using 'url_regex' it'll work. But since 'dstdomain' (and others)
uses splay tree, it's less CPU intensive than using regexes.... In such busy
sites it makes a large difference.

Any tip ?

regards
Lucas Brasilino

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux