Controlling communication with peers
Unil now we have learned about various options that can be used to configure cache peers or neighbors as parents or siblings. Now, we'll learn about controlling access to different peers and sending a variety of requests to different peers, depending on various rules. Access control over peer communication is achieved via various directives in the Squid configuration file. We have learned about these directives briefly, but we'll explore them in detail now.
Domain-based forwarding
Squid provides a directive cache_peer_domain
, using which we can restrict the domains for which a particular peer or neighbor will be referred. The general format for the cache_peer_domain
directive is:
cache_peer_domain NAME [!]domain [[!]domain] ...
In the preceding format, NAME
is the name of the neighbor cache, which will be either the values of the name option, the hostname, or the IP address specified while declaring it as a peer using the cache_peer
directive.
We can specify...