Squid configuration directive always_direct

Squid configuration directive always_direct

Available in: v7   v6   v5   v4   3.5   3.4   3.3   3.2   2.7   3.1   3.0   2.6

This directive is not available in the v8 version of Squid.

For older versions than v5 see the linked pages above

Configuration Details:

Option Name: always_direct
Replaces:
Requires:
Default Value: Prevent any cache_peer being used for this request.
Suggested Config:
Usage: always_direct allow|deny [!]aclname ... Here you can use ACL elements to specify requests which should ALWAYS be forwarded by Squid to the origin servers without using any peers. For example, to always directly forward requests for local servers ignoring any parents or siblings you may have use something like: acl local-servers dstdomain my.domain.net always_direct allow local-servers To always forward FTP requests directly, use acl FTP proto FTP always_direct allow FTP NOTE: There is a similar, but opposite option named 'never_direct'. You need to be aware that “always_direct deny foo” is NOT the same thing as “never_direct allow foo”. You may need to use a deny rule to exclude a more-specific case of some other rule. Example: acl local-external dstdomain external.foo.net acl local-servers dstdomain .foo.net always_direct deny local-external always_direct allow local-servers NOTE: If your goal is to make the client forward the request directly to the origin server bypassing Squid then this needs to be done in the client configuration. Squid configuration can only tell Squid how Squid should fetch the object. NOTE: This directive is not related to caching. The replies is cached as usual even if you use always_direct. To not cache the replies see the 'cache' directive. This clause supports both fast and slow acl types. See https://wiki.squid-cache.org/SquidFaq/SquidAcl for details.

Back

Introduction

Documentation

Support

Miscellaneous