Re: [SQU] Forwarding all requests for a particular domain to another proxy

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 12 Aug 2000 10:00:27 +0200

Anders K. Pedersen wrote:

> cache_peer proxy1 sibling 3128 3130 proxy-only
> neighbor_type_domain proxy1 parent .xyz.dk
> acl xyz dstdomain .xyz.dk
> never_direct allow xyz
> prefer_direct off
>
> But this doesn't work - whenever I try to retrieve anything from xyz.dk
> through proxy2, I get the following error:

> Valid document was not found in the cache and only-if-cached
> directive was specified.

Smells like a bug. It would be nice to see the details of the request
sent to proxy1 here. Can you enable log_mime_hdrs on proxy1?

> If I change the cache_peer line to "cache_peer proxy1 parent 3128 3130
> proxy-only" (and remove the neighbor_type_domain, acl, and never_direct
> directives abov), all requests for xyz.dk is sent through proxy1, but so
> are all other requests, and that is not what we want.

See also the cache_peer_access option.

You should still use the never_direct option to tell the first Squid
that it cannot go directly to this domain.

> Am I doing
> something wrong, or is the neighbor_type_domain not working?

The first setup should work, provided there are no other cache peers and
that it is ok to use proxy1 as a sibling on other domains. If you have
other peers then cache_peer_access should be used to make sure the other
are not used for this domain.

Most often when conditions like this are seen, the proxy for the domain
(and only that one) should only be used for that domain and nothing
else. In such case a setup solely based on cache_peer_access for peer
selection and never_direct is more appropriate.

You do not need the prefer_direct option when using never_direct.

--
Henrik Nordstrom
Squid hacker
Received on Sat Aug 12 2000 - 02:34:40 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:50 MST