Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you need to control which peers are used when, then you'd be wanting to use the cache_peer_access directive in conjunction with a suitable generic acl, presumably just a dstdomain one.
Lets say I want to forward requests for .youtube.com, to the cache 10.0.0.20, and process all the other queries on itself-not directly, I need caching.
I'm not 100% sure, but i'm pretty sure that the always / never direct statements read top down just like http_access ones, so the always_direct allow all will be overriding the later ones.
no it's not, it's there *AFTER* the more specific ones, not *BEFORE*
Code:
Example(s)
To force the use of a proxy for all requests, except those in your local domain use something like
acl local-servers dstdomain .foo.net
acl all src 0.0.0.0/0.0.0.0
never_direct deny local-servers
never_direct allow all <--- AT THE END
or if Squid is inside a firewall and there is local intranet
servers inside the firewall then use something like:
acl local-intranet dstdomain .foo.net
acl local-external dstdomain external.foo.net
always_direct deny local-external
always_direct allow local-intranet
never_direct allow all <--- AT THE END
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.