[squid-users] Re: Problem with Squid 2.6 as reverse proxy

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Thu, 07 Jun 2007 10:41:24 +0200

ons 2007-06-06 klockan 19:34 -0300 skrev Santiago Del Castillo:
> Hi henrik,
>
> One question: can wildcards be used on cache_peer_access?? Because
> i've 100 domains (www1.example.com, www2.example.com ...
> www*.example.com) forwarded to one specific origin server and it could
> be great if i could use www*.example.com on cache_peer_access rule

Yes, using the dstdom_regex acl in cache_peer_access. Or if it's the
whole domain then use a dstdomain acl .example.com

> Also that may change and i've to forward from www1 to www50 to other
> origin server... How should I do that in a few lines and not more than
> 50?

1 to 50 is ([1-9]|[1-4][0-9]|50) in regex, so www(1-50).example.com
becomes

  ^www\([1-9]|[1-4][0-9]|50\)\.example\.com$

But you can also use the dstdomain acl, with a list of all domains. Or
exclusions using !acl in cache_peer_access.

Regards
Henrik

Received on Thu Jun 07 2007 - 02:41:30 MDT

This archive was generated by hypermail pre-2.1.9 : Sun Jul 01 2007 - 12:00:04 MDT