cache_peer_domain

 < Day Day Up > 

cache_peer_domain

This directive allows you to restrict forwarded requests by their domain names. For example, you can make sure that URIs in a certain domain never go to your parent cache. Similarly, you can make sure that requests for only a few specific domain names are sent to a neighbor. The cache_peer_domain directive has been largely superseded by cache_peer_access , which is much more flexible.

Following the neighbor's hostname, you can specify a list of domain names. These are searched in order, until Squid finds a match. A match means that the request can be sent to the neighbor, unless you prefix the domain name with ! ("not"). For example, .foo.com means "allow .foo.com," while !.bar.net means "disallow .bar.net." If none of the listed domains match the URL, the default action (allow or deny) is the opposite of the last one in the list.

Note, the domain name matching algorithm is somewhat tricky. See the description in Section 6.1.1.2.

Syntax

 cache_peer_domain   hostname     domain   ... 

Default

No default

Example

 cache_peer_domain bigcache.isp.net .net .org cache_peer_domain aol.web-cache.net !.ads.aol.com .aol.com 

Related

cache_peer , cache_peer_access , neighbor_type_domain

 < Day Day Up > 


Squid
Squid: The Definitive Guide
ISBN: 0596001622
EAN: 2147483647
Year: 2004
Pages: 401
Authors: Duane Wessels

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net