Time for action – configuring Squid for domain-based forwarding
Let's see an example configuration:
cache_peer parent.example.com parent 3128 3130 default proxy-only cache_peer acad.example.com parent 3128 3130 proxy-only cache_peer video.example.com parent 3128 3130 proxy-only cache_peer social.example.com parent 3128 3130 proxy-only cache_peer search.example.com parent 3128 3130 proxy-only cache_peer_domain acad.example.com .edu cache_peer_domain video.example.com .youtube.com .vimeo.com cache_peer_domain video.example.com .metacafe.com .dailymotion.com cache_peer_domain social.example.com .facebook.com .myspace.com cache_peer_domain social.example.com .twitter.com cache_peer_domain search.example.com .google.com .yahoo.com .bing.com
According to the previous configuration example, the proxy server acad.example.com
can be used to forward requests for the .edu
domains only. A cache peer can only be contacted for the domain names matching the ones specified with cache_peer_domain...