Template:Squid default configuration

From ImageStream Router Documentation

(Difference between revisions)
Jump to: navigation, search
Syoder (Talk | contribs)
(New page: # ImageStream defaults visible_hostname Squid-Cache acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl localnet src 10.0.0.0/8 # RFC1918 pos...)
Newer edit →

Revision as of 14:34, 16 June 2009

  1. ImageStream defaults

visible_hostname Squid-Cache acl manager proto cache_object acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl localnet src 10.0.0.0/8 # RFC1918 possible internal network acl localnet src 172.16.0.0/12 # RFC1918 possible internal network acl localnet src 192.168.0.0/16 # RFC1918 possible internal network acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl Safe_ports port 70 # gopher acl Safe_ports port 210 # wais acl Safe_ports port 1025-65535 # unregistered ports acl Safe_ports port 280 # http-mgmt acl Safe_ports port 488 # gss-http acl Safe_ports port 591 # filemaker acl Safe_ports port 777 # multiling http acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access deny !Safe_ports http_access deny CONNECT !SSL_ports http_access allow localhost http_access allow localnet http_access deny all icp_access allow localnet icp_access deny all htcp_access allow localnet htcp_access deny all http_port 3128 hierarchy_stoplist cgi-bin ? access_log /usr/local/squid/var/logs/access.log squid refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern (cgi-bin|\?) 0 0% 0 refresh_pattern . 0 20% 4320 icp_port 3130 coredump_dir /usr/local/squid/var/cache

  1. WELCOME TO SQUID 3.0.STABLE8
  2. ----------------------------
  3. This is the default Squid configuration file. You may wish
  4. to look at the Squid home page (http://www.squid-cache.org/)
  5. for the FAQ and other documentation.
  6. The default Squid config file shows what the defaults for
  7. various options happen to be. If you don't need to change the
  8. default, you shouldn't uncomment the line. Doing so may cause
  9. run-time problems. In some cases "none" refers to no default
  10. setting at all, while in other cases it refers to a valid
  11. option - the comments for that keyword indicate if this is the
  12. case.


  1. Configuration options can be included using the "include" directive.
  2. Include takes a list of files to include. Quoting and wildcards is
  3. supported.
  4. For example,
  5. include /path/to/included/file/squid.acl.config
  6. Includes can be nested up to a hard-coded depth of 16 levels.
  7. This arbitrary restriction is to prevent recursive include references
  8. from causing Squid entering an infinite loop whilst trying to load
  9. configuration files.


  1. OPTIONS FOR AUTHENTICATION
  2. -----------------------------------------------------------------------------
  1. TAG: auth_param
  2. This is used to define parameters for the various authentication
  3. schemes supported by Squid.
  4. format: auth_param scheme parameter [setting]
  5. The order in which authentication schemes are presented to the client is
  6. dependent on the order the scheme first appears in config file. IE
  7. has a bug (it's not RFC 2617 compliant) in that it will use the basic
  8. scheme if basic is the first entry presented, even if more secure
  9. schemes are presented. For now use the order in the recommended
  10. settings section below. If other browsers have difficulties (don't
  11. recognize the schemes offered even if you are using basic) either
  12. put basic first, or disable the other schemes (by commenting out their
  13. program entry).
  14. Once an authentication scheme is fully configured, it can only be
  15. shutdown by shutting squid down and restarting. Changes can be made on
  16. the fly and activated with a reconfigure. I.E. You can change to a
  17. different helper, but not unconfigure the helper completely.
  18. Please note that while this directive defines how Squid processes
  19. authentication it does not automatically activate authentication.
  20. To use authentication you must in addition make use of ACLs based
  21. on login name in http_access (proxy_auth, proxy_auth_regex or
  22. external with %LOGIN used in the format tag). The browser will be
  23. challenged for authentication on the first such acl encountered
  24. in http_access processing and will also be re-challenged for new
  25. login credentials if the request is being denied by a proxy_auth
  26. type acl.
  27. WARNING: authentication can't be used in a transparently intercepting
  28. proxy as the client then thinks it is talking to an origin server and
  29. not the proxy. This is a limitation of bending the TCP/IP protocol to
  30. transparently intercepting port 80, not a limitation in Squid.
  31. Ports flagged 'transparent' or 'tproxy' have authentication disabled.
  32. === Parameters for the basic scheme follow. ===
  33. "program" cmdline
  34. Specify the command for the external authenticator. Such a program
  35. reads a line containing "username password" and replies "OK" or
  36. "ERR" in an endless loop. "ERR" responses may optionally be followed
  37. by a error description available as %m in the returned error page.
  38. If you use an authenticator, make sure you have 1 acl of type proxy_auth.
  39. By default, the basic authentication scheme is not used unless a
  40. program is specified.
  41. If you want to use the traditional NCSA proxy authentication, set
  42. this line to something like
  43. auth_param basic program /usr/local/squid/libexec/ncsa_auth /usr/local/squid/etc/passwd
  44. "children" numberofchildren
  45. The number of authenticator processes to spawn. If you start too few
  46. Squid will have to wait for them to process a backlog of credential
  47. verifications, slowing it down. When password verifications are
  48. done via a (slow) network you are likely to need lots of
  49. authenticator processes.
  50. auth_param basic children 5
  51. "concurrency" concurrency
  52. The number of concurrent requests the helper can process.
  53. The default of 0 is used for helpers who only supports
  54. one request at a time. Setting this changes the protocol used to
  55. include a channel number first on the request/response line, allowing
  56. multiple requests to be sent to the same helper in parallell without
  57. wating for the response.
  58. Must not be set unless it's known the helper supports this.
  59. auth_param basic concurrency 0
  60. "realm" realmstring
  61. Specifies the realm name which is to be reported to the
  62. client for the basic proxy authentication scheme (part of
  63. the text the user will see when prompted their username and
  64. password). There is no default.
  65. auth_param basic realm Squid proxy-caching web server
  66. "credentialsttl" timetolive
  67. Specifies how long squid assumes an externally validated
  68. username:password pair is valid for - in other words how
  69. often the helper program is called for that user. Set this
  70. low to force revalidation with short lived passwords. Note
  71. setting this high does not impact your susceptibility
  72. to replay attacks unless you are using an one-time password
  73. system (such as SecureID). If you are using such a system,
  74. you will be vulnerable to replay attacks unless you also
  75. use the max_user_ip ACL in an http_access rule.
  76. "casesensitive" on|off
  77. Specifies if usernames are case sensitive. Most user databases are
  78. case insensitive allowing the same username to be spelled using both
  79. lower and upper case letters, but some are case sensitive. This
  80. makes a big difference for user_max_ip ACL processing and similar.
  81. auth_param basic casesensitive off
  82. === Parameters for the digest scheme follow ===
  83. "program" cmdline
  84. Specify the command for the external authenticator. Such
  85. a program reads a line containing "username":"realm" and
  86. replies with the appropriate H(A1) value hex encoded or
  87. ERR if the user (or his H(A1) hash) does not exists.
  88. See rfc 2616 for the definition of H(A1).
  89. "ERR" responses may optionally be followed by a error description
  90. available as %m in the returned error page.
  91. By default, the digest authentication scheme is not used unless a
  92. program is specified.
  93. If you want to use a digest authenticator, set this line to
  94. something like
  95. auth_param digest program /usr/local/squid/bin/digest_auth_pw /usr/local/squid/etc/digpass
  96. "children" numberofchildren
  97. The number of authenticator processes to spawn (no default).
  98. If you start too few Squid will have to wait for them to
  99. process a backlog of H(A1) calculations, slowing it down.
  100. When the H(A1) calculations are done via a (slow) network
  101. you are likely to need lots of authenticator processes.
  102. auth_param digest children 5
  103. "realm" realmstring
  104. Specifies the realm name which is to be reported to the
  105. client for the digest proxy authentication scheme (part of
  106. the text the user will see when prompted their username and
  107. password). There is no default.
  108. auth_param digest realm Squid proxy-caching web server
  109. "nonce_garbage_interval" timeinterval
  110. Specifies the interval that nonces that have been issued
  111. to client_agent's are checked for validity.
  112. "nonce_max_duration" timeinterval
  113. Specifies the maximum length of time a given nonce will be
  114. valid for.
  115. "nonce_max_count" number
  116. Specifies the maximum number of times a given nonce can be
  117. used.
  118. "nonce_strictness" on|off
  119. Determines if squid requires strict increment-by-1 behavior
  120. for nonce counts, or just incrementing (off - for use when
  121. useragents generate nonce counts that occasionally miss 1
  122. (ie, 1,2,4,6)). Default off.
  123. "check_nonce_count" on|off
  124. This directive if set to off can disable the nonce count check
  125. completely to work around buggy digest qop implementations in
  126. certain mainstream browser versions. Default on to check the
  127. nonce count to protect from authentication replay attacks.
  128. "post_workaround" on|off
  129. This is a workaround to certain buggy browsers who sends
  130. an incorrect request digest in POST requests when reusing
  131. the same nonce as acquired earlier on a GET request.
  132. === NTLM scheme options follow ===
  133. "program" cmdline
  134. Specify the command for the external NTLM authenticator.
  135. Such a program reads exchanged NTLMSSP packets with
  136. the browser via Squid until authentication is completed.
  137. If you use an NTLM authenticator, make sure you have 1 acl
  138. of type proxy_auth. By default, the NTLM authenticator_program
  139. is not used.
  140. auth_param ntlm program /usr/local/squid/bin/ntlm_auth
  141. "children" numberofchildren
  142. The number of authenticator processes to spawn (no default).
  143. If you start too few Squid will have to wait for them to
  144. process a backlog of credential verifications, slowing it
  145. down. When credential verifications are done via a (slow)
  146. network you are likely to need lots of authenticator
  147. processes.
  148. auth_param ntlm children 5
  149. "keep_alive" on|off
  150. If you experience problems with PUT/POST requests when using the
  151. Negotiate authentication scheme then you can try setting this to
  152. off. This will cause Squid to forcibly close the connection on
  153. the initial requests where the browser asks which schemes are
  154. supported by the proxy.
  155. auth_param ntlm keep_alive on
  156. === Options for configuring the NEGOTIATE auth-scheme follow ===
  157. "program" cmdline
  158. Specify the command for the external Negotiate authenticator.
  159. This protocol is used in Microsoft Active-Directory enabled setups with
  160. the Microsoft Internet Explorer or Mozilla Firefox browsers.
  161. Its main purpose is to exchange credentials with the Squid proxy
  162. using the Kerberos mechanisms.
  163. If you use a Negotiate authenticator, make sure you have at least one acl
  164. of type proxy_auth active. By default, the negotiate authenticator_program
  165. is not used.
  166. The only supported program for this role is the ntlm_auth
  167. program distributed as part of Samba, version 4 or later.
  168. auth_param negotiate program /usr/local/squid/bin/ntlm_auth --helper-protocol=gss-spnego
  169. "children" numberofchildren
  170. The number of authenticator processes to spawn (no default).
  171. If you start too few Squid will have to wait for them to
  172. process a backlog of credential verifications, slowing it
  173. down. When crendential verifications are done via a (slow)
  174. network you are likely to need lots of authenticator
  175. processes.
  176. auth_param negotiate children 5
  177. "keep_alive" on|off
  178. If you experience problems with PUT/POST requests when using the
  179. Negotiate authentication scheme then you can try setting this to
  180. off. This will cause Squid to forcibly close the connection on
  181. the initial requests where the browser asks which schemes are
  182. supported by the proxy.
  183. auth_param negotiate keep_alive on
  184. Recommended minimum configuration per scheme:
  185. auth_param negotiate program <uncomment and complete this line to activate>
  186. auth_param negotiate children 5
  187. auth_param negotiate keep_alive on
  188. auth_param ntlm program <uncomment and complete this line to activate>
  189. auth_param ntlm children 5
  190. auth_param ntlm keep_alive on
  191. auth_param digest program <uncomment and complete this line>
  192. auth_param digest children 5
  193. auth_param digest realm Squid proxy-caching web server
  194. auth_param digest nonce_garbage_interval 5 minutes
  195. auth_param digest nonce_max_duration 30 minutes
  196. auth_param digest nonce_max_count 50
  197. auth_param basic program <uncomment and complete this line>
  198. auth_param basic children 5
  199. auth_param basic realm Squid proxy-caching web server
  200. auth_param basic credentialsttl 2 hours
  1. TAG: authenticate_cache_garbage_interval
  2. The time period between garbage collection across the username cache.
  3. This is a tradeoff between memory utilization (long intervals - say
  4. 2 days) and CPU (short intervals - say 1 minute). Only change if you
  5. have good reason to.
  6. Default:
  7. authenticate_cache_garbage_interval 1 hour
  1. TAG: authenticate_ttl
  2. The time a user & their credentials stay in the logged in
  3. user cache since their last request. When the garbage
  4. interval passes, all user credentials that have passed their
  5. TTL are removed from memory.
  6. Default:
  7. authenticate_ttl 1 hour
  1. TAG: authenticate_ip_ttl
  2. If you use proxy authentication and the 'max_user_ip' ACL,
  3. this directive controls how long Squid remembers the IP
  4. addresses associated with each user. Use a small value
  5. (e.g., 60 seconds) if your users might change addresses
  6. quickly, as is the case with dialups. You might be safe
  7. using a larger value (e.g., 2 hours) in a corporate LAN
  8. environment with relatively static address assignments.
  9. Default:
  10. authenticate_ip_ttl 0 seconds


  1. ACCESS CONTROLS
  2. -----------------------------------------------------------------------------
  1. TAG: external_acl_type
  2. This option defines external acl classes using a helper program
  3. to look up the status
  4. external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
  5. Options:
  6. ttl=n TTL in seconds for cached results (defaults to 3600
  7. for 1 hour)
  8. negative_ttl=n
  9. TTL for cached negative lookups (default same
  10. as ttl)
  11. children=n Number of acl helper processes spawn to service
  12. external acl lookups of this type. (default 5)
  13. concurrency=n concurrency level per process. Only used with helpers
  14. capable of processing more than one query at a time.
  15. cache=n result cache size, 0 is unbounded (default)
  16. grace=n Percentage remaining of TTL where a refresh of a
  17. cached entry should be initiated without needing to
  18. wait for a new reply. (default 0 for no grace period)
  19. protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
  20. FORMAT specifications
  21.  %LOGIN Authenticated user login name
  22.  %EXT_USER Username from external acl
  23.  %IDENT Ident user name
  24.  %SRC Client IP
  25.  %SRCPORT Client source port
  26.  %URI Requested URI
  27.  %DST Requested host
  28.  %PROTO Requested protocol
  29.  %PORT Requested port
  30.  %PATH Requested URL path
  31.  %METHOD Request method
  32.  %MYADDR Squid interface address
  33.  %MYPORT Squid http_port number
  34.  %PATH Requested URL-path (including query-string if any)
  35.  %USER_CERT SSL User certificate in PEM format
  36.  %USER_CERTCHAIN SSL User certificate chain in PEM format
  37.  %USER_CERT_xx SSL User certificate subject attribute xx
  38.  %USER_CA_xx SSL User certificate issuer attribute xx
  39.  %{Header} HTTP request header
  40.  %{Hdr:member} HTTP request header list member
  41.  %{Hdr:;member}
  42. HTTP request header list member using ; as
  43. list separator. ; can be any non-alphanumeric
  44. character.
  45. In addition to the above, any string specified in the referencing
  46. acl will also be included in the helper request line, after the
  47. specified formats (see the "acl external" directive)
  48. The helper receives lines per the above format specification,
  49. and returns lines starting with OK or ERR indicating the validity
  50. of the request and optionally followed by additional keywords with
  51. more details.
  52. General result syntax:
  53. OK/ERR keyword=value ...
  54. Defined keywords:
  55. user= The users name (login)
  56. password= The users password (for login= cache_peer option)
  57. message= Message describing the reason. Available as %o
  58. in error pages
  59. tag= Apply a tag to a request (for both ERR and OK results)
  60. Only sets a tag, does not alter existing tags.
  61. log= String to be logged in access.log. Available as
  62. %ea in logformat specifications
  63. If protocol=3.0 (the default) then URL escaping is used to protect
  64. each value in both requests and responses.
  65. If using protocol=2.5 then all values need to be enclosed in quotes
  66. if they may contain whitespace, or the whitespace escaped using \.
  67. And quotes or \ characters within the keyword value must be \ escaped.
  68. When using the concurrency= option the protocol is changed by
  69. introducing a query channel tag infront of the request/response.
  70. The query channel tag is a number between 0 and concurrency-1.
  71. Default:
  72. none
  1. TAG: acl
  2. Defining an Access List
  3. Every access list definition must begin with an aclname and acltype,
  4. followed by either type-specific arguments or a quoted filename that
  5. they are read from.
  6. acl aclname acltype argument ...
  7. acl aclname acltype "file" ...
  8. When using "file", the file should contain one item per line.
  9. By default, regular expressions are CASE-SENSITIVE. To make
  10. them case-insensitive, use the -i option.
  11. ***** ACL TYPES AVAILABLE *****
  12. acl aclname src ip-address/netmask ... # clients IP address
  13. acl aclname src addr1-addr2/netmask ... # range of addresses
  14. acl aclname dst ip-address/netmask ... # URL host's IP address
  15. acl aclname myip ip-address/netmask ... # local socket IP address
  16. acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
  17. # The arp ACL requires the special configure option --enable-arp-acl.
  18. # Furthermore, the ARP ACL code is not portable to all operating systems.
  19. # It works on Linux, Solaris, Windows, FreeBSD, and some other *BSD variants.
  20. #
  21. # NOTE: Squid can only determine the MAC address for clients that are on
  22. # the same subnet. If the client is on a different subnet, then Squid cannot
  23. # find out its MAC address.
  24. acl aclname srcdomain .foo.com ... # reverse lookup, from client IP
  25. acl aclname dstdomain .foo.com ... # Destination server from URL
  26. acl aclname srcdom_regex [-i] \.foo\.com ... # regex matching client name
  27. acl aclname dstdom_regex [-i] \.foo\.com ... # regex matching server
  28. # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
  29. # based URL is used and no match is found. The name "none" is used
  30. # if the reverse lookup fails.
  31. acl aclname src_as number ...
  32. acl aclname dst_as number ...
  33. # Except for access control, AS numbers can be used for
  34. # routing of requests to specific caches. Here's an
  35. # example for routing all requests for AS#1241 and only
  36. # those to mycache.mydomain.net:
  37. # acl asexample dst_as 1241
  38. # cache_peer_access mycache.mydomain.net allow asexample
  39. # cache_peer_access mycache_mydomain.net deny all
  40. acl aclname time [day-abbrevs] [h1:m1-h2:m2]
  41. # day-abbrevs:
  42. # S - Sunday
  43. # M - Monday
  44. # T - Tuesday
  45. # W - Wednesday
  46. # H - Thursday
  47. # F - Friday
  48. # A - Saturday
  49. # h1:m1 must be less than h2:m2
  50. acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
  51. acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path
  52. acl aclname port 80 70 21 ...
  53. acl aclname port 0-1024 ... # ranges allowed
  54. acl aclname myport 3128 ... # (local socket TCP port)
  55. acl aclname myportname 3128 ... # http(s)_port name
  56. acl aclname proto HTTP FTP ...
  57. acl aclname method GET POST ...
  58. acl aclname http_status 200 301 500- 400-403 ... # status code in reply
  59. acl aclname browser [-i] regexp ...
  60. # pattern match on User-Agent header (see also req_header below)
  61. acl aclname referer_regex [-i] regexp ...
  62. # pattern match on Referer header
  63. # Referer is highly unreliable, so use with care
  64. acl aclname ident username ...
  65. acl aclname ident_regex [-i] pattern ...
  66. # string match on ident output.
  67. # use REQUIRED to accept any non-null ident.
  68. acl aclname proxy_auth [-i] username ...
  69. acl aclname proxy_auth_regex [-i] pattern ...
  70. # list of valid usernames
  71. # use REQUIRED to accept any valid username.
  72. #
  73. # NOTE: when a Proxy-Authentication header is sent but it is not
  74. # needed during ACL checking the username is NOT logged
  75. # in access.log.
  76. #
  77. # NOTE: proxy_auth requires a EXTERNAL authentication program
  78. # to check username/password combinations (see
  79. # auth_param directive).
  80. #
  81. # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
  82. # as the browser needs to be configured for using a proxy in order
  83. # to respond to proxy authentication.
  84. acl aclname snmp_community string ...
  85. # A community string to limit access to your SNMP Agent
  86. # Example:
  87. #
  88. # acl snmppublic snmp_community public
  89. acl aclname maxconn number
  90. # This will be matched when the client's IP address has
  91. # more than <number> HTTP connections established.
  92. acl aclname max_user_ip [-s] number
  93. # This will be matched when the user attempts to log in from more
  94. # than <number> different ip addresses. The authenticate_ip_ttl
  95. # parameter controls the timeout on the ip entries.
  96. # If -s is specified the limit is strict, denying browsing
  97. # from any further IP addresses until the ttl has expired. Without
  98. # -s Squid will just annoy the user by "randomly" denying requests.
  99. # (the counter is reset each time the limit is reached and a
  100. # request is denied)
  101. # NOTE: in acceleration mode or where there is mesh of child proxies,
  102. # clients may appear to come from multiple addresses if they are
  103. # going through proxy farms, so a limit of 1 may cause user problems.
  104. acl aclname req_mime_type [-i] mime-type ...
  105. # regex match against the mime type of the request generated
  106. # by the client. Can be used to detect file upload or some
  107. # types HTTP tunneling requests.
  108. # NOTE: This does NOT match the reply. You cannot use this
  109. # to match the returned file type.
  110. acl aclname req_header header-name [-i] any\.regex\.here
  111. # regex match against any of the known request headers. May be
  112. # thought of as a superset of "browser", "referer" and "mime-type"
  113. # ACLs.
  114. acl aclname rep_mime_type [-i] mime-type ...
  115. # regex match against the mime type of the reply received by
  116. # squid. Can be used to detect file download or some
  117. # types HTTP tunneling requests.
  118. # NOTE: This has no effect in http_access rules. It only has
  119. # effect in rules that affect the reply data stream such as
  120. # http_reply_access.
  121. acl aclname rep_header header-name [-i] any\.regex\.here
  122. # regex match against any of the known reply headers. May be
  123. # thought of as a superset of "browser", "referer" and "mime-type"
  124. # ACLs.
  125. acl aclname external class_name [arguments...]
  126. # external ACL lookup via a helper class defined by the
  127. # external_acl_type directive.
  128. acl aclname user_cert attribute values...
  129. # match against attributes in a user SSL certificate
  130. # attribute is one of DN/C/O/CN/L/ST
  131. acl aclname ca_cert attribute values...
  132. # match against attributes a users issuing CA SSL certificate
  133. # attribute is one of DN/C/O/CN/L/ST
  134. acl aclname ext_user username ...
  135. acl aclname ext_user_regex [-i] pattern ...
  136. # string match on username returned by external acl helper
  137. # use REQUIRED to accept any non-null user name.
  138. Examples:
  139. acl macaddress arp 09:00:2b:23:45:67
  140. acl myexample dst_as 1241
  141. acl password proxy_auth REQUIRED
  142. acl fileupload req_mime_type -i ^multipart/form-data$
  143. acl javascript rep_mime_type -i ^application/x-javascript$
  144. Default:
  145. acl all src all
  146. Recommended minimum configuration:
  147. acl manager proto cache_object
  148. acl localhost src 127.0.0.1/32
  149. acl to_localhost dst 127.0.0.0/8
  150. Example rule allowing access from your local networks.
  151. Adapt to list your (internal) IP networks from where browsing
  152. should be allowed
  153. acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
  154. acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
  155. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
  156. acl SSL_ports port 443
  157. acl Safe_ports port 80 # http
  158. acl Safe_ports port 21 # ftp
  159. acl Safe_ports port 443 # https
  160. acl Safe_ports port 70 # gopher
  161. acl Safe_ports port 210 # wais
  162. acl Safe_ports port 1025-65535 # unregistered ports
  163. acl Safe_ports port 280 # http-mgmt
  164. acl Safe_ports port 488 # gss-http
  165. acl Safe_ports port 591 # filemaker
  166. acl Safe_ports port 777 # multiling http
  167. acl CONNECT method CONNECT
  1. TAG: http_access
  2. Allowing or Denying access based on defined access lists
  3. Access to the HTTP port:
  4. http_access allow|deny [!]aclname ...
  5. NOTE on default values:
  6. If there are no "access" lines present, the default is to deny
  7. the request.
  8. If none of the "access" lines cause a match, the default is the
  9. opposite of the last line in the list. If the last line was
  10. deny, the default is allow. Conversely, if the last line
  11. is allow, the default will be deny. For these reasons, it is a
  12. good idea to have an "deny all" or "allow all" entry at the end
  13. of your access lists to avoid potential confusion.
  14. Default:
  15. http_access deny all
  16. Recommended minimum configuration:
  17. Only allow cachemgr access from localhost
  18. http_access allow manager localhost
  19. http_access deny manager
  20. Deny requests to unknown ports
  21. http_access deny !Safe_ports
  22. Deny CONNECT to other than SSL ports
  23. http_access deny CONNECT !SSL_ports
  24. We strongly recommend the following be uncommented to protect innocent
  25. web applications running on the proxy server who think the only
  26. one who can access services on "localhost" is a local user
  27. http_access deny to_localhost
  28. INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  1. Example rule allowing access from your local networks.
  2. Adapt localnet in the ACL section to list your (internal) IP networks
  3. from where browsing should be allowed
  4. http_access allow localnet
  1. And finally deny all other access to this proxy
  2. http_access deny all
  1. TAG: http_reply_access
  2. Allow replies to client requests. This is complementary to http_access.
  3. http_reply_access allow|deny [!] aclname ...
  4. NOTE: if there are no access lines present, the default is to allow
  5. all replies
  6. If none of the access lines cause a match the opposite of the
  7. last line will apply. Thus it is good practice to end the rules
  8. with an "allow all" or "deny all" entry.
  9. Default:
  10. none
  1. TAG: icp_access
  2. Allowing or Denying access to the ICP port based on defined
  3. access lists
  4. icp_access allow|deny [!]aclname ...
  5. See http_access for details
  6. Default:
  7. icp_access deny all
  8. Allow ICP queries from local networks only
  9. icp_access allow localnet
  10. icp_access deny all
  1. TAG: htcp_access
  2. Allowing or Denying access to the HTCP port based on defined
  3. access lists
  4. htcp_access allow|deny [!]aclname ...
  5. See http_access for details
  6. NOTE: The default if no htcp_access lines are present is to
  7. deny all traffic. This default may cause problems with peers
  8. using the htcp or htcp-oldsquid options.
  9. Default:
  10. htcp_access deny all
  11. Allow HTCP queries from local networks only
  12. htcp_access allow localnet
  13. htcp_access deny all
  1. TAG: htcp_clr_access
  2. Allowing or Denying access to purge content using HTCP based
  3. on defined access lists
  4. htcp_clr_access allow|deny [!]aclname ...
  5. See http_access for details
    1. Allow HTCP CLR requests from trusted peers
  6. acl htcp_clr_peer src 172.16.1.2
  7. htcp_clr_access allow htcp_clr_peer
  8. Default:
  9. htcp_clr_access deny all
  1. TAG: miss_access
  2. Use to force your neighbors to use you as a sibling instead of
  3. a parent. For example:
  4. acl localclients src 172.16.0.0/16
  5. miss_access allow localclients
  6. miss_access deny  !localclients
  7. This means only your local clients are allowed to fetch
  8. MISSES and all other clients can only fetch HITS.
  9. By default, allow all clients who passed the http_access rules
  10. to fetch MISSES from us.
  11. Default setting:
  12. miss_access allow all
  1. TAG: ident_lookup_access
  2. A list of ACL elements which, if matched, cause an ident
  3. (RFC 931) lookup to be performed for this request. For
  4. example, you might choose to always perform ident lookups
  5. for your main multi-user Unix boxes, but not for your Macs
  6. and PCs. By default, ident lookups are not performed for
  7. any requests.
  8. To enable ident lookups for specific client addresses, you
  9. can follow this example:
  10. acl ident_aware_hosts src 198.168.1.0/255.255.255.0
  11. ident_lookup_access allow ident_aware_hosts
  12. ident_lookup_access deny all
  13. Only src type ACL checks are fully supported. A src_domain
  14. ACL might work at times, but it will not always provide
  15. the correct result.
  16. Default:
  17. ident_lookup_access deny all
  1. TAG: reply_body_max_size size [acl acl...]
  2. This option specifies the maximum size of a reply body. It can be
  3. used to prevent users from downloading very large files, such as
  4. MP3's and movies. When the reply headers are received, the
  5. reply_body_max_size lines are processed, and the first line where
  6. all (if any) listed ACLs are true is used as the maximum body size
  7. for this reply.
  8. This size is checked twice. First when we get the reply headers,
  9. we check the content-length value. If the content length value exists
  10. and is larger than the allowed size, the request is denied and the
  11. user receives an error message that says "the request or reply
  12. is too large." If there is no content-length, and the reply
  13. size exceeds this limit, the client's connection is just closed
  14. and they will receive a partial reply.
  15. WARNING: downstream caches probably can not detect a partial reply
  16. if there is no content-length header, so they will cache
  17. partial responses and give them out as hits. You should NOT
  18. use this option if you have downstream caches.
  19. WARNING: A maximum size smaller than the size of squid's error messages
  20. will cause an infinite loop and crash squid. Ensure that the smallest
  21. non-zero value you use is greater that the maximum header size plus
  22. the size of your largest error page.
  23. If you set this parameter none (the default), there will be
  24. no limit imposed.
  25. Default:
  26. none


  1. NETWORK OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: http_port
  2. Usage: port [options]
  3. hostname:port [options]
  4. 1.2.3.4:port [options]
  5. The socket addresses where Squid will listen for HTTP client
  6. requests. You may specify multiple socket addresses.
  7. There are three forms: port alone, hostname with port, and
  8. IP address with port. If you specify a hostname or IP
  9. address, Squid binds the socket to that specific
  10. address. This replaces the old 'tcp_incoming_address'
  11. option. Most likely, you do not need to bind to a specific
  12. address, so you can use the port number alone.
  13. If you are running Squid in accelerator mode, you
  14. probably want to listen on port 80 also, or instead.
  15. The -a command line option may be used to specify additional
  16. port(s) where Squid listens for proxy request. Such ports will
  17. be plain proxy ports with no options.
  18. You may specify multiple socket addresses on multiple lines.
  19. Options:
  20. transparent Support for transparent interception of
  21. outgoing requests without browser settings.
  22. NP: disables authentication on the port.
  23. tproxy Support Linux TPROXY for spoofing outgoing
  24. connections using the client IP address.
  25. NP: disables authentication on the port.
  26. accel Accelerator mode. Also needs at least one of
  27. vhost / vport / defaultsite.
  28. defaultsite=domainname
  29. What to use for the Host: header if it is not present
  30. in a request. Determines what site (not origin server)
  31. accelerators should consider the default.
  32. Implies accel.
  33. vhost Accelerator mode using Host header for virtual
  34. domain support. Implies accel.
  35. vport Accelerator with IP based virtual host support.
  36. Implies accel.
  37. vport=NN As above, but uses specified port number rather
  38. than the http_port number. Implies accel.
  39. protocol= Protocol to reconstruct accelerated requests with.
  40. Defaults to http.
  41. disable-pmtu-discovery=
  42. Control Path-MTU discovery usage:
  43. off lets OS decide on what to do (default).
  44. transparent disable PMTU discovery when transparent
  45. support is enabled.
  46. always disable always PMTU discovery.
  47. In many setups of transparently intercepting proxies
  48. Path-MTU discovery can not work on traffic towards the
  49. clients. This is the case when the intercepting device
  50. does not fully track connections and fails to forward
  51. ICMP must fragment messages to the cache server. If you
  52. have such setup and experience that certain clients
  53. sporadically hang or never complete requests set
  54. disable-pmtu-discovery option to 'transparent'.
  55. name= Specifies a internal name for the port. Defaults to
  56. the port specification (port or addr:port)
  57. If you run Squid on a dual-homed machine with an internal
  58. and an external interface we recommend you to specify the
  59. internal address:port in http_port. This way Squid will only be
  60. visible on the internal address.
  61. Squid normally listens to port 3128
  62. http_port 3128
  1. TAG: https_port
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
  5. The socket address where Squid will listen for HTTPS client
  6. requests.
  7. This is really only useful for situations where you are running
  8. squid in accelerator mode and you want to do the SSL work at the
  9. accelerator level.
  10. You may specify multiple socket addresses on multiple lines,
  11. each with their own SSL certificate and/or options.
  12. Options:
  13. accel Accelerator mode. Also needs at least one of
  14. defaultsite or vhost.
  15. defaultsite= The name of the https site presented on
  16. this port. Implies accel.
  17. vhost Accelerator mode using Host header for virtual
  18. domain support. Requires a wildcard certificate
  19. or other certificate valid for more than one domain.
  20. Implies accel.
  21. protocol= Protocol to reconstruct accelerated requests with.
  22. Defaults to https.
  23. cert= Path to SSL certificate (PEM format).
  24. key= Path to SSL private key file (PEM format)
  25. if not specified, the certificate file is
  26. assumed to be a combined certificate and
  27. key file.
  28. version= The version of SSL/TLS supported
  29. 1 automatic (default)
  30. 2 SSLv2 only
  31. 3 SSLv3 only
  32. 4 TLSv1 only
  33. cipher= Colon separated list of supported ciphers.
  34. options= Various SSL engine options. The most important
  35. being:
  36. NO_SSLv2 Disallow the use of SSLv2
  37. NO_SSLv3 Disallow the use of SSLv3
  38. NO_TLSv1 Disallow the use of TLSv1
  39. SINGLE_DH_USE Always create a new key when using
  40. temporary/ephemeral DH key exchanges
  41. See src/ssl_support.c or OpenSSL SSL_CTX_set_options
  42. documentation for a complete list of options.
  43. clientca= File containing the list of CAs to use when
  44. requesting a client certificate.
  45. cafile= File containing additional CA certificates to
  46. use when verifying client certificates. If unset
  47. clientca will be used.
  48. capath= Directory containing additional CA certificates
  49. and CRL lists to use when verifying client certificates.
  50. crlfile= File of additional CRL lists to use when verifying
  51. the client certificate, in addition to CRLs stored in
  52. the capath. Implies VERIFY_CRL flag below.
  53. dhparams= File containing DH parameters for temporary/ephemeral
  54. DH key exchanges.
  55. sslflags= Various flags modifying the use of SSL:
  56. DELAYED_AUTH
  57. Don't request client certificates
  58. immediately, but wait until acl processing
  59. requires a certificate (not yet implemented).
  60. NO_DEFAULT_CA
  61. Don't use the default CA lists built in
  62. to OpenSSL.
  63. NO_SESSION_REUSE
  64. Don't allow for session reuse. Each connection
  65. will result in a new SSL session.
  66. VERIFY_CRL
  67. Verify CRL lists when accepting client
  68. certificates.
  69. VERIFY_CRL_ALL
  70. Verify CRL lists for all certificates in the
  71. client certificate chain.
  72. sslcontext= SSL session ID context identifier.
  73. vport Accelerator with IP based virtual host support.
  74. vport=NN As above, but uses specified port number rather
  75. than the https_port number. Implies accel.
  76. name= Specifies a internal name for the port. Defaults to
  77. the port specification (port or addr:port)
  78. Default:
  79. none
  1. TAG: tcp_outgoing_tos
  2. Allows you to select a TOS/Diffserv value to mark outgoing
  3. connections with, based on the username or source address
  4. making the request.
  5. tcp_outgoing_tos ds-field [!]aclname ...
  6. Example where normal_service_net uses the TOS value 0x00
  7. and normal_service_net uses 0x20
  8. acl normal_service_net src 10.0.0.0/255.255.255.0
  9. acl good_service_net src 10.0.1.0/255.255.255.0
  10. tcp_outgoing_tos 0x00 normal_service_net
  11. tcp_outgoing_tos 0x20 good_service_net
  12. TOS/DSCP values really only have local significance - so you should
  13. know what you're specifying. For more information, see RFC2474 and
  14. RFC3260.
  15. The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
  16. "default" to use whatever default your host has. Note that in
  17. practice often only values 0 - 63 is usable as the two highest bits
  18. have been redefined for use by ECN (RFC3168).
  19. Processing proceeds in the order specified, and stops at first fully
  20. matching line.
  21. Note: The use of this directive using client dependent ACLs is
  22. incompatible with the use of server side persistent connections. To
  23. ensure correct results it is best to set server_persisten_connections
  24. to off when using this directive in such configurations.
  25. Default:
  26. none
  1. TAG: clientside_tos
  2. Allows you to select a TOS/Diffserv value to mark client-side
  3. connections with, based on the username or source address
  4. making the request.
  5. Default:
  6. none
  1. TAG: tcp_outgoing_address
  2. Allows you to map requests to different outgoing IP addresses
  3. based on the username or source address of the user making
  4. the request.
  5. tcp_outgoing_address ipaddr [[!]aclname] ...
  6. Example where requests from 10.0.0.0/24 will be forwarded
  7. with source address 10.1.0.1, 10.0.2.0/24 forwarded with
  8. source address 10.1.0.2 and the rest will be forwarded with
  9. source address 10.1.0.3.
  10. acl normal_service_net src 10.0.0.0/24
  11. acl good_service_net src 10.0.2.0/24
  12. tcp_outgoing_address 10.1.0.1 normal_service_net
  13. tcp_outgoing_address 10.1.0.2 good_service_net
  14. tcp_outgoing_address 10.1.0.3
  15. Processing proceeds in the order specified, and stops at first fully
  16. matching line.
  17. Note: The use of this directive using client dependent ACLs is
  18. incompatible with the use of server side persistent connections. To
  19. ensure correct results it is best to set server_persistent_connections
  20. to off when using this directive in such configurations.
  21. Default:
  22. none


  1. SSL OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: ssl_unclean_shutdown
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Some browsers (especially MSIE) bugs out on SSL shutdown
  5. messages.
  6. Default:
  7. ssl_unclean_shutdown off
  1. TAG: ssl_engine
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. The OpenSSL engine to use. You will need to set this if you
  5. would like to use hardware SSL acceleration for example.
  6. Default:
  7. none
  1. TAG: sslproxy_client_certificate
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Client SSL Certificate to use when proxying https:// URLs
  5. Default:
  6. none
  1. TAG: sslproxy_client_key
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Client SSL Key to use when proxying https:// URLs
  5. Default:
  6. none
  1. TAG: sslproxy_version
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. SSL version level to use when proxying https:// URLs
  5. Default:
  6. sslproxy_version 1
  1. TAG: sslproxy_options
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. SSL engine options to use when proxying https:// URLs
  5. Default:
  6. none
  1. TAG: sslproxy_cipher
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. SSL cipher list to use when proxying https:// URLs
  5. Default:
  6. none
  1. TAG: sslproxy_cafile
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. file containing CA certificates to use when verifying server
  5. certificates while proxying https:// URLs
  6. Default:
  7. none
  1. TAG: sslproxy_capath
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. directory containing CA certificates to use when verifying
  5. server certificates while proxying https:// URLs
  6. Default:
  7. none
  1. TAG: sslproxy_flags
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Various flags modifying the use of SSL while proxying https:// URLs:
  5. DONT_VERIFY_PEER Accept certificates even if they fail to
  6. verify.
  7. NO_DEFAULT_CA Don't use the default CA list built in
  8. to OpenSSL.
  9. Default:
  10. none
  1. TAG: sslpassword_program
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-ssl option
  4. Specify a program used for entering SSL key passphrases
  5. when using encrypted SSL certificate keys. If not specified
  6. keys must either be unencrypted, or Squid started with the -N
  7. option to allow it to query interactively for the passphrase.
  8. Default:
  9. none


  1. OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
  2. -----------------------------------------------------------------------------
  1. TAG: cache_peer
  2. To specify other caches in a hierarchy, use the format:
  3. cache_peer hostname type http-port icp-port [options]
  4. For example,
  5. # proxy icp
  6. # hostname type port port options
  7. # -------------------- -------- ----- ----- -----------
  8. cache_peer parent.foo.net parent 3128 3130 proxy-only default
  9. cache_peer sib1.foo.net sibling 3128 3130 proxy-only
  10. cache_peer sib2.foo.net sibling 3128 3130 proxy-only
  11. type: either 'parent', 'sibling', or 'multicast'.
  12. proxy-port: The port number where the cache listens for proxy
  13. requests.
  14. icp-port: Used for querying neighbor caches about
  15. objects. To have a non-ICP neighbor
  16. specify '7' for the ICP port and make sure the
  17. neighbor machine has the UDP echo port
  18. enabled in its /etc/inetd.conf file.
  19. NOTE: Also requires icp_port option enabled to send/receive
  20. requests via this method.
  21. options: proxy-only
  22. weight=n
  23. basetime=n
  24. ttl=n
  25. no-query
  26. background-ping
  27. default
  28. round-robin
  29. weighted-round-robin
  30. carp
  31. userhash
  32. sourcehash
  33. multicast-responder
  34. closest-only
  35. no-digest
  36. no-netdb-exchange
  37. no-delay
  38. login=user:password | PASS | *:password
  39. connect-timeout=nn
  40. digest-url=url
  41. allow-miss
  42. max-conn=n
  43. htcp
  44. htcp-oldsquid
  45. originserver
  46. name=xxx
  47. forceddomain=name
  48. ssl
  49. sslcert=/path/to/ssl/certificate
  50. sslkey=/path/to/ssl/key
  51. sslversion=1|2|3|4
  52. sslcipher=...
  53. ssloptions=...
  54. front-end-https[=on|auto]
  55. use 'proxy-only' to specify objects fetched
  56. from this cache should not be saved locally.
  57. use 'weight=n' to affect the selection of a peer
  58. during any weighted peer-selection mechanisms.
  59. The weight must be an integer; default is 1,
  60. larger weights are favored more.
  61. This option does not affect parent selection if a peering
  62. protocol is not in use.
  63. use 'basetime=n' to specify a base amount to
  64. be subtracted from round trip times of parents.
  65. It is subtracted before division by weight in calculating
  66. which parent to fectch from. If the rtt is less than the
  67. base time the rtt is set to a minimal value.
  68. use 'ttl=n' to specify a IP multicast TTL to use
  69. when sending an ICP queries to this address.
  70. Only useful when sending to a multicast group.
  71. Because we don't accept ICP replies from random
  72. hosts, you must configure other group members as
  73. peers with the 'multicast-responder' option below.
  74. use 'no-query' to NOT send ICP queries to this
  75. neighbor.
  76. use 'background-ping' to only send ICP queries to this
  77. neighbor infrequently. This is used to keep the neighbor
  78. round trip time updated and is usually used in
  79. conjunction with weighted-round-robin.
  80. use 'default' if this is a parent cache which can
  81. be used as a "last-resort" if a peer cannot be located
  82. by any of the peer-selection mechanisms.
  83. If specified more than once, only the first is used.
  84. use 'round-robin' to define a set of parents which
  85. should be used in a round-robin fashion in the
  86. absence of any ICP queries.
  87. use 'weighted-round-robin' to define a set of parents
  88. which should be used in a round-robin fashion with the
  89. frequency of each parent being based on the round trip
  90. time. Closer parents are used more often.
  91. Usually used for background-ping parents.
  92. use 'carp' to define a set of parents which should
  93. be used as a CARP array. The requests will be
  94. distributed among the parents based on the CARP load
  95. balancing hash function based on their weight.
  96. use 'userhash' to load-balance amongst a set of parents
  97. based on the client proxy_auth or ident username.
  98. use 'sourcehash' to load-balance amongst a set of parents
  99. based on the client source ip.
  100. 'multicast-responder' indicates the named peer
  101. is a member of a multicast group. ICP queries will
  102. not be sent directly to the peer, but ICP replies
  103. will be accepted from it.
  104. 'closest-only' indicates that, for ICP_OP_MISS
  105. replies, we'll only forward CLOSEST_PARENT_MISSes
  106. and never FIRST_PARENT_MISSes.
  107. use 'no-digest' to NOT request cache digests from
  108. this neighbor.
  109. 'no-netdb-exchange' disables requesting ICMP
  110. RTT database (NetDB) from the neighbor.
  111. use 'no-delay' to prevent access to this neighbor
  112. from influencing the delay pools.
  113. use 'login=user:password' if this is a personal/workgroup
  114. proxy and your parent requires proxy authentication.
  115. Note: The string can include URL escapes (i.e. %20 for
  116. spaces). This also means % must be written as %%.
  117. use 'login=PASS' if users must authenticate against
  118. the upstream proxy or in the case of a reverse proxy
  119. configuration, the origin web server. This will pass
  120. the users credentials as they are to the peer.
  121. This only works for the Basic HTTP authentication scheme.
  122. Note: To combine this with proxy_auth both proxies must
  123. share the same user database as HTTP only allows for
  124. a single login (one for proxy, one for origin server).
  125. Also be warned this will expose your users proxy
  126. password to the peer. USE WITH CAUTION
  127. use 'login=*:password' to pass the username to the
  128. upstream cache, but with a fixed password. This is meant
  129. to be used when the peer is in another administrative
  130. domain, but it is still needed to identify each user.
  131. The star can optionally be followed by some extra
  132. information which is added to the username. This can
  133. be used to identify this proxy to the peer, similar to
  134. the login=username:password option above.
  135. use 'connect-timeout=nn' to specify a peer
  136. specific connect timeout (also see the
  137. peer_connect_timeout directive)
  138. use 'digest-url=url' to tell Squid to fetch the cache
  139. digest (if digests are enabled) for this host from
  140. the specified URL rather than the Squid default
  141. location.
  142. use 'allow-miss' to disable Squid's use of only-if-cached
  143. when forwarding requests to siblings. This is primarily
  144. useful when icp_hit_stale is used by the sibling. To
  145. extensive use of this option may result in forwarding
  146. loops, and you should avoid having two-way peerings
  147. with this option. (for example to deny peer usage on
  148. requests from peer by denying cache_peer_access if the
  149. source is a peer)
  150. use 'max-conn=n' to limit the amount of connections Squid
  151. may open to this peer.
  152. use 'htcp' to send HTCP, instead of ICP, queries
  153. to the neighbor. You probably also want to
  154. set the "icp port" to 4827 instead of 3130.
  155. You MUST also set htcp_access expicitly. The default of
  156. deny all will prevent peer traffic.
  157. use 'htcp-oldsquid' to send HTCP to old Squid versions
  158. You MUST also set htcp_access expicitly. The default of
  159. deny all will prevent peer traffic.
  160. 'originserver' causes this parent peer to be contacted as
  161. a origin server. Meant to be used in accelerator setups.
  162. use 'name=xxx' if you have multiple peers on the same
  163. host but different ports. This name can be used to
  164. differentiate the peers in cache_peer_access and similar
  165. directives.
  166. use 'forceddomain=name' to forcibly set the Host header
  167. of requests forwarded to this peer. Useful in accelerator
  168. setups where the server (peer) expects a certain domain
  169. name and using redirectors to feed this domain name
  170. is not feasible.
  171. use 'ssl' to indicate connections to this peer should
  172. be SSL/TLS encrypted.
  173. use 'sslcert=/path/to/ssl/certificate' to specify a client
  174. SSL certificate to use when connecting to this peer.
  175. use 'sslkey=/path/to/ssl/key' to specify the private SSL
  176. key corresponding to sslcert above. If 'sslkey' is not
  177. specified 'sslcert' is assumed to reference a
  178. combined file containing both the certificate and the key.
  179. use sslversion=1|2|3|4 to specify the SSL version to use
  180. when connecting to this peer
  181. 1 = automatic (default)
  182. 2 = SSL v2 only
  183. 3 = SSL v3 only
  184. 4 = TLS v1 only
  185. use sslcipher=... to specify the list of valid SSL ciphers
  186. to use when connecting to this peer.
  187. use ssloptions=... to specify various SSL engine options:
  188. NO_SSLv2 Disallow the use of SSLv2
  189. NO_SSLv3 Disallow the use of SSLv3
  190. NO_TLSv1 Disallow the use of TLSv1
  191. See src/ssl_support.c or the OpenSSL documentation for
  192. a more complete list.
  193. use sslcafile=... to specify a file containing
  194. additional CA certificates to use when verifying the
  195. peer certificate.
  196. use sslcapath=... to specify a directory containing
  197. additional CA certificates to use when verifying the
  198. peer certificate.
  199. use sslcrlfile=... to specify a certificate revocation
  200. list file to use when verifying the peer certificate.
  201. use sslflags=... to specify various flags modifying the
  202. SSL implementation:
  203. DONT_VERIFY_PEER
  204. Accept certificates even if they fail to
  205. verify.
  206. NO_DEFAULT_CA
  207. Don't use the default CA list built in
  208. to OpenSSL.
  209. DONT_VERIFY_DOMAIN
  210. Don't verify the peer certificate
  211. matches the server name
  212. use ssldomain= to specify the peer name as advertised
  213. in it's certificate. Used for verifying the correctness
  214. of the received peer certificate. If not specified the
  215. peer hostname will be used.
  216. use front-end-https to enable the "Front-End-Https: On"
  217. header needed when using Squid as a SSL frontend in front
  218. of Microsoft OWA. See MS KB document Q307347 for details
  219. on this header. If set to auto the header will
  220. only be added if the request is forwarded as a https://
  221. URL.
  222. Default:
  223. none
  1. TAG: cache_peer_domain
  2. Use to limit the domains for which a neighbor cache will be
  3. queried. Usage:
  4. cache_peer_domain cache-host domain [domain ...]
  5. cache_peer_domain cache-host !domain
  6. For example, specifying
  7. cache_peer_domain parent.foo.net .edu
  8. has the effect such that UDP query packets are sent to
  9. 'bigserver' only when the requested object exists on a
  10. server in the .edu domain. Prefixing the domainname
  11. with '!' means the cache will be queried for objects
  12. NOT in that domain.
  13. NOTE: * Any number of domains may be given for a cache-host,
  14. either on the same or separate lines.
  15. * When multiple domains are given for a particular
  16. cache-host, the first matched domain is applied.
  17. * Cache hosts with no domain restrictions are queried
  18. for all requests.
  19. * There are no defaults.
  20. * There is also a 'cache_peer_access' tag in the ACL
  21. section.
  22. Default:
  23. none
  1. TAG: cache_peer_access
  2. Similar to 'cache_peer_domain' but provides more flexibility by
  3. using ACL elements.
  4. cache_peer_access cache-host allow|deny [!]aclname ...
  5. The syntax is identical to 'http_access' and the other lists of
  6. ACL elements. See the comments for 'http_access' below, or
  7. the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
  8. Default:
  9. none
  1. TAG: neighbor_type_domain
  2. usage: neighbor_type_domain neighbor parent|sibling domain domain ...
  3. Modifying the neighbor type for specific domains is now
  4. possible. You can treat some domains differently than the the
  5. default neighbor type specified on the 'cache_peer' line.
  6. Normally it should only be necessary to list domains which
  7. should be treated differently because the default neighbor type
  8. applies for hostnames which do not match domains listed here.
  9. EXAMPLE:
  10. cache_peer cache.foo.org parent 3128 3130
  11. neighbor_type_domain cache.foo.org sibling .com .net
  12. neighbor_type_domain cache.foo.org sibling .au .de
  13. Default:
  14. none
  1. TAG: dead_peer_timeout (seconds)
  2. This controls how long Squid waits to declare a peer cache
  3. as "dead." If there are no ICP replies received in this
  4. amount of time, Squid will declare the peer dead and not
  5. expect to receive any further ICP replies. However, it
  6. continues to send ICP queries, and will mark the peer as
  7. alive upon receipt of the first subsequent ICP reply.
  8. This timeout also affects when Squid expects to receive ICP
  9. replies from peers. If more than 'dead_peer' seconds have
  10. passed since the last ICP reply was received, Squid will not
  11. expect to receive an ICP reply on the next query. Thus, if
  12. your time between requests is greater than this timeout, you
  13. will see a lot of requests sent DIRECT to origin servers
  14. instead of to your parents.
  15. Default:
  16. dead_peer_timeout 10 seconds
  1. TAG: hierarchy_stoplist
  2. A list of words which, if found in a URL, cause the object to
  3. be handled directly by this cache. In other words, use this
  4. to not query neighbor caches for certain objects. You may
  5. list this option multiple times.
  6. Note: never_direct overrides this option.
  7. We recommend you to use at least the following line.
  8. hierarchy_stoplist cgi-bin ?


  1. MEMORY CACHE OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: cache_mem (bytes)
  2. NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
  3. IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
  4. USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
  5. THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
  6. 'cache_mem' specifies the ideal amount of memory to be used
  7. for:
  8. * In-Transit objects
  9. * Hot Objects
  10. * Negative-Cached objects
  11. Data for these objects are stored in 4 KB blocks. This
  12. parameter specifies the ideal upper limit on the total size of
  13. 4 KB blocks allocated. In-Transit objects take the highest
  14. priority.
  15. In-transit objects have priority over the others. When
  16. additional space is needed for incoming data, negative-cached
  17. and hot objects will be released. In other words, the
  18. negative-cached and hot objects will fill up any unused space
  19. not needed for in-transit objects.
  20. If circumstances require, this limit will be exceeded.
  21. Specifically, if your incoming request rate requires more than
  22. 'cache_mem' of memory to hold in-transit objects, Squid will
  23. exceed this limit to satisfy the new requests. When the load
  24. decreases, blocks will be freed until the high-water mark is
  25. reached. Thereafter, blocks will be used to store hot
  26. objects.
  27. Default:
  28. cache_mem 8 MB
  1. TAG: maximum_object_size_in_memory (bytes)
  2. Objects greater than this size will not be attempted to kept in
  3. the memory cache. This should be set high enough to keep objects
  4. accessed frequently in memory to improve performance whilst low
  5. enough to keep larger objects from hoarding cache_mem.
  6. Default:
  7. maximum_object_size_in_memory 8 KB
  1. TAG: memory_replacement_policy
  2. The memory replacement policy parameter determines which
  3. objects are purged from memory when memory space is needed.
  4. See cache_replacement_policy for details.
  5. Default:
  6. memory_replacement_policy lru


  1. DISK CACHE OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: cache_replacement_policy
  2. The cache replacement policy parameter determines which
  3. objects are evicted (replaced) when disk space is needed.
  4. lru  : Squid's original list based LRU policy
  5. heap GDSF : Greedy-Dual Size Frequency
  6. heap LFUDA: Least Frequently Used with Dynamic Aging
  7. heap LRU  : LRU policy implemented using a heap
  8. Applies to any cache_dir lines listed below this.
  9. The LRU policies keeps recently referenced objects.
  10. The heap GDSF policy optimizes object hit rate by keeping smaller
  11. popular objects in cache so it has a better chance of getting a
  12. hit. It achieves a lower byte hit rate than LFUDA though since
  13. it evicts larger (possibly popular) objects.
  14. The heap LFUDA policy keeps popular objects in cache regardless of
  15. their size and thus optimizes byte hit rate at the expense of
  16. hit rate since one large, popular object will prevent many
  17. smaller, slightly less popular objects from being cached.
  18. Both policies utilize a dynamic aging mechanism that prevents
  19. cache pollution that can otherwise occur with frequency-based
  20. replacement policies.
  21. NOTE: if using the LFUDA replacement policy you should increase
  22. the value of maximum_object_size above its default of 4096 KB to
  23. to maximize the potential byte hit rate improvement of LFUDA.
  24. For more information about the GDSF and LFUDA cache replacement
  25. policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
  26. and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
  27. Default:
  28. cache_replacement_policy lru
  1. TAG: cache_dir
  2. Usage:
  3. cache_dir Type Directory-Name Fs-specific-data [options]
  4. You can specify multiple cache_dir lines to spread the
  5. cache among different disk partitions.
  6. Type specifies the kind of storage system to use. Only "ufs"
  7. is built by default. To enable any of the other storage systems
  8. see the --enable-storeio configure option.
  9. 'Directory' is a top-level directory where cache swap
  10. files will be stored. If you want to use an entire disk
  11. for caching, this can be the mount-point directory.
  12. The directory must exist and be writable by the Squid
  13. process. Squid will NOT create this directory for you.
  14. The ufs store type:
  15. "ufs" is the old well-known Squid storage format that has always
  16. been there.
  17. cache_dir ufs Directory-Name Mbytes L1 L2 [options]
  18. 'Mbytes' is the amount of disk space (MB) to use under this
  19. directory. The default is 100 MB. Change this to suit your
  20. configuration. Do NOT put the size of your disk drive here.
  21. Instead, if you want Squid to use the entire disk drive,
  22. subtract 20% and use that value.
  23. 'Level-1' is the number of first-level subdirectories which
  24. will be created under the 'Directory'. The default is 16.
  25. 'Level-2' is the number of second-level subdirectories which
  26. will be created under each first-level directory. The default
  27. is 256.
  28. The aufs store type:
  29. "aufs" uses the same storage format as "ufs", utilizing
  30. POSIX-threads to avoid blocking the main Squid process on
  31. disk-I/O. This was formerly known in Squid as async-io.
  32. cache_dir aufs Directory-Name Mbytes L1 L2 [options]
  33. see argument descriptions under ufs above
  34. The diskd store type:
  35. "diskd" uses the same storage format as "ufs", utilizing a
  36. separate process to avoid blocking the main Squid process on
  37. disk-I/O.
  38. cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
  39. see argument descriptions under ufs above
  40. Q1 specifies the number of unacknowledged I/O requests when Squid
  41. stops opening new files. If this many messages are in the queues,
  42. Squid won't open new files. Default is 64
  43. Q2 specifies the number of unacknowledged messages when Squid
  44. starts blocking. If this many messages are in the queues,
  45. Squid blocks until it receives some replies. Default is 72
  46. When Q1 < Q2 (the default), the cache directory is optimized
  47. for lower response time at the expense of a decrease in hit
  48. ratio. If Q1 > Q2, the cache directory is optimized for
  49. higher hit ratio at the expense of an increase in response
  50. time.
  51. The coss store type:
  52. block-size=n defines the "block size" for COSS cache_dir's.
  53. Squid uses file numbers as block numbers. Since file numbers
  54. are limited to 24 bits, the block size determines the maximum
  55. size of the COSS partition. The default is 512 bytes, which
  56. leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
  57. you should not change the coss block size after Squid
  58. has written some objects to the cache_dir.
  59. The coss file store has changed from 2.5. Now it uses a file
  60. called 'stripe' in the directory names in the config - and
  61. this will be created by squid -z.
  62. The null store type:
  63. no options are allowed or required
  64. Common options:
  65. no-store, no new objects should be stored to this cache_dir
  66. max-size=n, refers to the max object size this storedir supports.
  67. It is used to initially choose the storedir to dump the object.
  68. Note: To make optimal use of the max-size limits you should order
  69. the cache_dir lines with the smallest max-size value first and the
  70. ones with no max-size specification last.
  71. Note for coss, max-size must be less than COSS_MEMBUF_SZ,
  72. which can be changed with the --with-coss-membuf-size=N configure
  73. option.
  74. Default:
  75. cache_dir ufs /usr/local/squid/var/cache 100 16 256
  1. TAG: store_dir_select_algorithm
  2. Set this to 'round-robin' as an alternative.
  3. Default:
  4. store_dir_select_algorithm least-load
  1. TAG: max_open_disk_fds
  2. To avoid having disk as the I/O bottleneck Squid can optionally
  3. bypass the on-disk cache if more than this amount of disk file
  4. descriptors are open.
  5. A value of 0 indicates no limit.
  6. Default:
  7. max_open_disk_fds 0
  1. TAG: minimum_object_size (bytes)
  2. Objects smaller than this size will NOT be saved on disk. The
  3. value is specified in kilobytes, and the default is 0 KB, which
  4. means there is no minimum.
  5. Default:
  6. minimum_object_size 0 KB
  1. TAG: maximum_object_size (bytes)
  2. Objects larger than this size will NOT be saved on disk. The
  3. value is specified in kilobytes, and the default is 4MB. If
  4. you wish to get a high BYTES hit ratio, you should probably
  5. increase this (one 32 MB object hit counts for 3200 10KB
  6. hits). If you wish to increase speed more than your want to
  7. save bandwidth you should leave this low.
  8. NOTE: if using the LFUDA replacement policy you should increase
  9. this value to maximize the byte hit rate improvement of LFUDA!
  10. See replacement_policy below for a discussion of this policy.
  11. Default:
  12. maximum_object_size 4096 KB
  1. TAG: cache_swap_low (percent, 0-100)
  2. TAG: cache_swap_high (percent, 0-100)
  3. The low- and high-water marks for cache object replacement.
  4. Replacement begins when the swap (disk) usage is above the
  5. low-water mark and attempts to maintain utilization near the
  6. low-water mark. As swap utilization gets close to high-water
  7. mark object eviction becomes more aggressive. If utilization is
  8. close to the low-water mark less replacement is done each time.
  9. Defaults are 90% and 95%. If you have a large cache, 5% could be
  10. hundreds of MB. If this is the case you may wish to set these
  11. numbers closer together.
  12. Default:
  13. cache_swap_low 90
  14. cache_swap_high 95


  1. LOGFILE OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: logformat
  2. Usage:
  3. logformat <name> <format specification>
  4. Defines an access log format.
  5. The <format specification> is a string with embedded % format codes
  6. % format codes all follow the same basic structure where all but
  7. the formatcode is optional. Output strings are automatically escaped
  8. as required according to their context and the output format
  9. modifiers are usually not needed, but can be specified if an explicit
  10. output format is desired.
  11. % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
  12. " output in quoted string format
  13. [ output in squid text log format as used by log_mime_hdrs
  14. # output in URL quoted format
  15. ' output as-is
  16. - left aligned
  17. width field width. If starting with 0 the
  18. output is zero padded
  19. {arg} argument such as header name etc
  20. Format codes:
  21. >a Client source IP address
  22. >A Client FQDN
  23. >p Client source port
  24. <A Server IP address or peer name
  25. la Local IP address (http_port)
  26. lp Local port number (http_port)
  27. ts Seconds since epoch
  28. tu subsecond time (milliseconds)
  29. tl Local time. Optional strftime format argument
  30. default %d/%b/%Y:%H:%M:%S %z
  31. tg GMT time. Optional strftime format argument
  32. default %d/%b/%Y:%H:%M:%S %z
  33. tr Response time (milliseconds)
  34. >h Request header. Optional header name argument
  35. on the format header[:[separator]element]
  36. <h Reply header. Optional header name argument
  37. as for >h
  38. un User name
  39. ul User name from authentication
  40. ui User name from ident
  41. us User name from SSL
  42. ue User name from external acl helper
  43. Hs HTTP status code
  44. Ss Squid request status (TCP_MISS etc)
  45. Sh Squid hierarchy status (DEFAULT_PARENT etc)
  46. mt MIME content type
  47. rm Request method (GET/POST etc)
  48. ru Request URL
  49. rp Request URL-Path excluding hostname
  50. rv Request protocol version
  51. et Tag returned by external acl
  52. ea Log string returned by external acl
  53. <st Reply size including HTTP headers
  54. >st Request size including HTTP headers
  55. st Request+Reply size including HTTP headers
  56. <sH Reply high offset sent
  57. <sS Upstream object size
  58. % a literal % character
  59. The default formats available (which do not need re-defining) are:
  60. logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
  61. logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
  62. logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
  63. logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  64. Default:
  65. none
  1. TAG: access_log
  2. These files log client request activities. Has a line every HTTP or
  3. ICP request. The format is:
  4. access_log <filepath> [<logformat name> [acl acl ...]]
  5. access_log none [acl acl ...]]
  6. Will log to the specified file using the specified format (which
  7. must be defined in a logformat directive) those entries which match
  8. ALL the acl's specified (which must be defined in acl clauses).
  9. If no acl is specified, all requests will be logged to this file.
  10. To disable logging of a request use the filepath "none", in which case
  11. a logformat name should not be specified.
  12. To log the request via syslog specify a filepath of "syslog":
  13. access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
  14. where facility could be any of:
  15. authpriv, daemon, local0 .. local7 or user.
  16. And priority could be any of:
  17. err, warning, notice, info, debug.
  18. access_log /usr/local/squid/var/logs/access.log squid
  1. TAG: log_access allow|deny acl acl...
  2. This options allows you to control which requests gets logged
  3. to access.log (see access_log directive). Requests denied for
  4. logging will also not be accounted for in performance counters.
  5. Default:
  6. none
  1. TAG: cache_log
  2. Cache logging file. This is where general information about
  3. your cache's behavior goes. You can increase the amount of data
  4. logged to this file with the "debug_options" tag below.
  5. Default:
  6. cache_log /usr/local/squid/var/logs/cache.log
  1. TAG: cache_store_log
  2. Logs the activities of the storage manager. Shows which
  3. objects are ejected from the cache, and which objects are
  4. saved and for how long. To disable, enter "none". There are
  5. not really utilities to analyze this data, so you can safely
  6. disable it.
  7. Default:
  8. cache_store_log /usr/local/squid/var/logs/store.log
  1. TAG: cache_swap_state
  2. Location for the cache "swap.state" file. This index file holds
  3. the metadata of objects saved on disk. It is used to rebuild
  4. the cache during startup. Normally this file resides in each
  5. 'cache_dir' directory, but you may specify an alternate
  6. pathname here. Note you must give a full filename, not just
  7. a directory. Since this is the index for the whole object
  8. list you CANNOT periodically rotate it!
  9. If %s can be used in the file name it will be replaced with a
  10. a representation of the cache_dir name where each / is replaced
  11. with '.'. This is needed to allow adding/removing cache_dir
  12. lines when cache_swap_log is being used.
  13. If have more than one 'cache_dir', and %s is not used in the name
  14. these swap logs will have names such as:
  15. cache_swap_log.00
  16. cache_swap_log.01
  17. cache_swap_log.02
  18. The numbered extension (which is added automatically)
  19. corresponds to the order of the 'cache_dir' lines in this
  20. configuration file. If you change the order of the 'cache_dir'
  21. lines in this file, these index files will NOT correspond to
  22. the correct 'cache_dir' entry (unless you manually rename
  23. them). We recommend you do NOT use this option. It is
  24. better to keep these index files in each 'cache_dir' directory.
  25. Default:
  26. none
  1. TAG: logfile_rotate
  2. Specifies the number of logfile rotations to make when you
  3. type 'squid -k rotate'. The default is 10, which will rotate
  4. with extensions 0 through 9. Setting logfile_rotate to 0 will
  5. disable the file name rotation, but the logfiles are still closed
  6. and re-opened. This will enable you to rename the logfiles
  7. yourself just before sending the rotate signal.
  8. Note, the 'squid -k rotate' command normally sends a USR1
  9. signal to the running squid process. In certain situations
  10. (e.g. on Linux with Async I/O), USR1 is used for other
  11. purposes, so -k rotate uses another signal. It is best to get
  12. in the habit of using 'squid -k rotate' instead of 'kill -USR1
  13. <pid>'.
  14. Default:
  15. logfile_rotate 10
  1. TAG: emulate_httpd_log on|off
  2. The Cache can emulate the log file format which many 'httpd'
  3. programs use. To disable/enable this emulation, set
  4. emulate_httpd_log to 'off' or 'on'. The default
  5. is to use the native log format since it includes useful
  6. information Squid-specific log analyzers use.
  7. Default:
  8. emulate_httpd_log off
  1. TAG: log_ip_on_direct on|off
  2. Log the destination IP address in the hierarchy log tag when going
  3. direct. Earlier Squid versions logged the hostname here. If you
  4. prefer the old way set this to off.
  5. Default:
  6. log_ip_on_direct on
  1. TAG: mime_table
  2. Pathname to Squid's MIME table. You shouldn't need to change
  3. this, but the default file contains examples and formatting
  4. information if you do.
  5. Default:
  6. mime_table /usr/local/squid/etc/mime.conf
  1. TAG: log_mime_hdrs on|off
  2. The Cache can record both the request and the response MIME
  3. headers for each HTTP transaction. The headers are encoded
  4. safely and will appear as two bracketed fields at the end of
  5. the access log (for either the native or httpd-emulated log
  6. formats). To enable this logging set log_mime_hdrs to 'on'.
  7. Default:
  8. log_mime_hdrs off
  1. TAG: useragent_log
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-useragent-log option
  4. Squid will write the User-Agent field from HTTP requests
  5. to the filename specified here. By default useragent_log
  6. is disabled.
  7. Default:
  8. none
  1. TAG: referer_log
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-referer-log option
  4. Squid will write the Referer field from HTTP requests to the
  5. filename specified here. By default referer_log is disabled.
  6. Note that "referer" is actually a misspelling of "referrer"
  7. however the misspelt version has been accepted into the HTTP RFCs
  8. and we accept both.
  9. Default:
  10. none
  1. TAG: pid_filename
  2. A filename to write the process-id to. To disable, enter "none".
  3. Default:
  4. pid_filename /usr/local/squid/var/logs/squid.pid
  1. TAG: debug_options
  2. Logging options are set as section,level where each source file
  3. is assigned a unique section. Lower levels result in less
  4. output, Full debugging (level 9) can result in a very large
  5. log file, so be careful. The magic word "ALL" sets debugging
  6. levels for all sections. We recommend normally running with
  7. "ALL,1".
  8. Default:
  9. debug_options ALL,1
  1. TAG: log_fqdn on|off
  2. Turn this on if you wish to log fully qualified domain names
  3. in the access.log. To do this Squid does a DNS lookup of all
  4. IP's connecting to it. This can (in some situations) increase
  5. latency, which makes your cache seem slower for interactive
  6. browsing.
  7. Default:
  8. log_fqdn off
  1. TAG: client_netmask
  2. A netmask for client addresses in logfiles and cachemgr output.
  3. Change this to protect the privacy of your cache clients.
  4. A netmask of 255.255.255.0 will log all IP's in that range with
  5. the last digit set to '0'.
  6. Default:
  7. client_netmask 255.255.255.255
  1. TAG: forward_log
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DWIP_FWD_LOG define
  4. Logs the server-side requests.
  5. This is currently work in progress.
  6. Default:
  7. none
  1. TAG: strip_query_terms
  2. By default, Squid strips query terms from requested URLs before
  3. logging. This protects your user's privacy.
  4. Default:
  5. strip_query_terms on
  1. TAG: buffered_logs on|off
  2. cache.log log file is written with stdio functions, and as such
  3. it can be buffered or unbuffered. By default it will be unbuffered.
  4. Buffering it can speed up the writing slightly (though you are
  5. unlikely to need to worry unless you run with tons of debugging
  6. enabled in which case performance will suffer badly anyway..).
  7. Default:
  8. buffered_logs off


  1. OPTIONS FOR FTP GATEWAYING
  2. -----------------------------------------------------------------------------
  1. TAG: ftp_user
  2. If you want the anonymous login password to be more informative
  3. (and enable the use of picky ftp servers), set this to something
  4. reasonable for your domain, like wwwuser@somewhere.net
  5. The reason why this is domainless by default is the
  6. request can be made on the behalf of a user in any domain,
  7. depending on how the cache is used.
  8. Some ftp server also validate the email address is valid
  9. (for example perl.com).
  10. Default:
  11. ftp_user Squid@
  1. TAG: ftp_list_width
  2. Sets the width of ftp listings. This should be set to fit in
  3. the width of a standard browser. Setting this too small
  4. can cut off long filenames when browsing ftp sites.
  5. Default:
  6. ftp_list_width 32
  1. TAG: ftp_passive
  2. If your firewall does not allow Squid to use passive
  3. connections, turn off this option.
  4. Default:
  5. ftp_passive on
  1. TAG: ftp_sanitycheck
  2. For security and data integrity reasons Squid by default performs
  3. sanity checks of the addresses of FTP data connections ensure the
  4. data connection is to the requested server. If you need to allow
  5. FTP connections to servers using another IP address for the data
  6. connection turn this off.
  7. Default:
  8. ftp_sanitycheck on
  1. TAG: ftp_telnet_protocol
  2. The FTP protocol is officially defined to use the telnet protocol
  3. as transport channel for the control connection. However, many
  4. implementations are broken and does not respect this aspect of
  5. the FTP protocol.
  6. If you have trouble accessing files with ASCII code 255 in the
  7. path or similar problems involving this ASCII code you can
  8. try setting this directive to off. If that helps, report to the
  9. operator of the FTP server in question that their FTP server
  10. is broken and does not follow the FTP standard.
  11. Default:
  12. ftp_telnet_protocol on


  1. OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
  2. -----------------------------------------------------------------------------
  1. TAG: diskd_program
  2. Specify the location of the diskd executable.
  3. Note this is only useful if you have compiled in
  4. diskd as one of the store io modules.
  5. Default:
  6. diskd_program /usr/local/squid/libexec/diskd
  1. TAG: unlinkd_program
  2. Specify the location of the executable for file deletion process.
  3. Default:
  4. unlinkd_program /usr/local/squid/libexec/unlinkd
  1. TAG: pinger_program
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-icmp option
  4. Specify the location of the executable for the pinger process.
  5. Default:
  6. pinger_program /usr/local/squid/libexec/pinger


  1. OPTIONS FOR URL REWRITING
  2. -----------------------------------------------------------------------------
  1. TAG: url_rewrite_program
  2. Specify the location of the executable for the URL rewriter.
  3. Since they can perform almost any function there isn't one included.
  4. For each requested URL rewriter will receive on line with the format
  5. URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL>
  6. In the future, the rewriter interface will be extended with
  7. key=value pairs ("kvpairs" shown above). Rewriter programs
  8. should be prepared to receive and possibly ignore additional
  9. whitespace-separated tokens on each input line.
  10. And the rewriter may return a rewritten URL. The other components of
  11. the request line does not need to be returned (ignored if they are).
  12. The rewriter can also indicate that a client-side redirect should
  13. be performed to the new URL. This is done by prefixing the returned
  14. URL with "301:" (moved permanently) or 302: (moved temporarily).
  15. By default, a URL rewriter is not used.
  16. Default:
  17. none
  1. TAG: url_rewrite_children
  2. The number of redirector processes to spawn. If you start
  3. too few Squid will have to wait for them to process a backlog of
  4. URLs, slowing it down. If you start too many they will use RAM
  5. and other system resources.
  6. Default:
  7. url_rewrite_children 5
  1. TAG: url_rewrite_concurrency
  2. The number of requests each redirector helper can handle in
  3. parallel. Defaults to 0 which indicates the redirector
  4. is a old-style single threaded redirector.
  5. Default:
  6. url_rewrite_concurrency 0
  1. TAG: url_rewrite_host_header
  2. By default Squid rewrites any Host: header in redirected
  3. requests. If you are running an accelerator this may
  4. not be a wanted effect of a redirector.
  5. WARNING: Entries are cached on the result of the URL rewriting
  6. process, so be careful if you have domain-virtual hosts.
  7. Default:
  8. url_rewrite_host_header on
  1. TAG: url_rewrite_access
  2. If defined, this access list specifies which requests are
  3. sent to the redirector processes. By default all requests
  4. are sent.
  5. Default:
  6. none
  1. TAG: url_rewrite_bypass
  2. When this is 'on', a request will not go through the
  3. redirector if all redirectors are busy. If this is 'off'
  4. and the redirector queue grows too large, Squid will exit
  5. with a FATAL error and ask you to increase the number of
  6. redirectors. You should only enable this if the redirectors
  7. are not critical to your caching system. If you use
  8. redirectors for access control, and you enable this option,
  9. users may have access to pages they should not
  10. be allowed to request.
  11. Default:
  12. url_rewrite_bypass off


  1. OPTIONS FOR TUNING THE CACHE
  2. -----------------------------------------------------------------------------
  1. TAG: cache
  2. A list of ACL elements which, if matched and denied, cause the request to
  3. not be satisfied from the cache and the reply to not be cached.
  4. In other words, use this to force certain objects to never be cached.
  5. You must use the words 'allow' or 'deny' to indicate whether items
  6. matching the ACL should be allowed or denied into the cache.
  7. Default is to allow all to be cached
  8. Default:
  9. none
  1. TAG: refresh_pattern
  2. usage: refresh_pattern [-i] regex min percent max [options]
  3. By default, regular expressions are CASE-SENSITIVE. To make
  4. them case-insensitive, use the -i option.
  5. 'Min' is the time (in minutes) an object without an explicit
  6. expiry time should be considered fresh. The recommended
  7. value is 0, any higher values may cause dynamic applications
  8. to be erroneously cached unless the application designer
  9. has taken the appropriate actions.
  10. 'Percent' is a percentage of the objects age (time since last
  11. modification age) an object without explicit expiry time
  12. will be considered fresh.
  13. 'Max' is an upper limit on how long objects without an explicit
  14. expiry time will be considered fresh.
  15. options: override-expire
  16. override-lastmod
  17. reload-into-ims
  18. ignore-reload
  19. ignore-no-cache
  20. ignore-no-store
  21. ignore-private
  22. ignore-auth
  23. refresh-ims
  24. override-expire enforces min age even if the server
  25. sent an explicit expiry time (e.g., with the
  26. Expires: header or Cache-Control: max-age). Doing this
  27. VIOLATES the HTTP standard. Enabling this feature
  28. could make you liable for problems which it causes.
  29. override-lastmod enforces min age even on objects
  30. that were modified recently.
  31. reload-into-ims changes client no-cache or ``reload
  32. to If-Modified-Since requests. Doing this VIOLATES the
  33. HTTP standard. Enabling this feature could make you
  34. liable for problems which it causes.
  35. ignore-reload ignores a client no-cache or ``reload
  36. header. Doing this VIOLATES the HTTP standard. Enabling
  37. this feature could make you liable for problems which
  38. it causes.
  39. ignore-no-cache ignores any ``Pragma: no-cache and
  40. ``Cache-control: no-cache headers received from a server.
  41. The HTTP RFC never allows the use of this (Pragma) header
  42. from a server, only a client, though plenty of servers
  43. send it anyway.
  44. ignore-no-store ignores any ``Cache-control: no-store
  45. headers received from a server. Doing this VIOLATES
  46. the HTTP standard. Enabling this feature could make you
  47. liable for problems which it causes.
  48. ignore-private ignores any ``Cache-control: private
  49. headers received from a server. Doing this VIOLATES
  50. the HTTP standard. Enabling this feature could make you
  51. liable for problems which it causes.
  52. ignore-auth caches responses to requests with authorization,
  53. as if the originserver had sent ``Cache-control: public
  54. in the response header. Doing this VIOLATES the HTTP standard.
  55. Enabling this feature could make you liable for problems which
  56. it causes.
  57. refresh-ims causes squid to contact the origin server
  58. when a client issues an If-Modified-Since request. This
  59. ensures that the client will receive an updated version
  60. if one is available.
  61. Basically a cached object is:
  62. FRESH if expires < now, else STALE
  63. STALE if age > max
  64. FRESH if lm-factor < percent, else STALE
  65. FRESH if age < min
  66. else STALE
  67. The refresh_pattern lines are checked in the order listed here.
  68. The first entry which matches is used. If none of the entries
  69. match the default will be used.
  70. Note, you must uncomment all the default lines if you want
  71. to change one. The default setting is only active if none is
  72. used.
  73. Suggested default:
  74. refresh_pattern ^ftp: 1440 20% 10080
  75. refresh_pattern ^gopher: 1440 0% 1440
  76. refresh_pattern (cgi-bin|\?) 0 0% 0
  77. refresh_pattern . 0 20% 4320
  1. TAG: quick_abort_min (KB)
  2. TAG: quick_abort_max (KB)
  3. TAG: quick_abort_pct (percent)
  4. The cache by default continues downloading aborted requests
  5. which are almost completed (less than 16 KB remaining). This
  6. may be undesirable on slow (e.g. SLIP) links and/or very busy
  7. caches. Impatient users may tie up file descriptors and
  8. bandwidth by repeatedly requesting and immediately aborting
  9. downloads.
  10. When the user aborts a request, Squid will check the
  11. quick_abort values to the amount of data transfered until
  12. then.
  13. If the transfer has less than 'quick_abort_min' KB remaining,
  14. it will finish the retrieval.
  15. If the transfer has more than 'quick_abort_max' KB remaining,
  16. it will abort the retrieval.
  17. If more than 'quick_abort_pct' of the transfer has completed,
  18. it will finish the retrieval.
  19. If you do not want any retrieval to continue after the client
  20. has aborted, set both 'quick_abort_min' and 'quick_abort_max'
  21. to '0 KB'.
  22. If you want retrievals to always continue if they are being
  23. cached set 'quick_abort_min' to '-1 KB'.
  24. Default:
  25. quick_abort_min 16 KB
  26. quick_abort_max 16 KB
  27. quick_abort_pct 95
  1. TAG: read_ahead_gap buffer-size
  2. The amount of data the cache will buffer ahead of what has been
  3. sent to the client when retrieving an object from another server.
  4. Default:
  5. read_ahead_gap 16 KB
  1. TAG: negative_ttl time-units
  2. Time-to-Live (TTL) for failed requests. Certain types of
  3. failures (such as "connection refused" and "404 Not Found") are
  4. negatively-cached for a configurable amount of time. The
  5. default is 5 minutes. Note that this is different from
  6. negative caching of DNS lookups.
  7. WARNING: Doing this VIOLATES the HTTP standard. Enabling
  8. this feature could make you liable for problems which it
  9. causes.
  10. Default:
  11. negative_ttl 5 minutes
  1. TAG: positive_dns_ttl time-units
  2. Upper limit on how long Squid will cache positive DNS responses.
  3. Default is 6 hours (360 minutes). This directive must be set
  4. larger than negative_dns_ttl.
  5. Default:
  6. positive_dns_ttl 6 hours
  1. TAG: negative_dns_ttl time-units
  2. Time-to-Live (TTL) for negative caching of failed DNS lookups.
  3. This also sets the lower cache limit on positive lookups.
  4. Minimum value is 1 second, and it is not recommendable to go
  5. much below 10 seconds.
  6. Default:
  7. negative_dns_ttl 1 minutes
  1. TAG: range_offset_limit (bytes)
  2. Sets a upper limit on how far into the the file a Range request
  3. may be to cause Squid to prefetch the whole file. If beyond this
  4. limit Squid forwards the Range request as it is and the result
  5. is NOT cached.
  6. This is to stop a far ahead range request (lets say start at 17MB)
  7. from making Squid fetch the whole object up to that point before
  8. sending anything to the client.
  9. A value of -1 causes Squid to always fetch the object from the
  10. beginning so it may cache the result. (2.0 style)
  11. A value of 0 causes Squid to never fetch more than the
  12. client requested. (default)
  13. Default:
  14. range_offset_limit 0 KB
  1. TAG: minimum_expiry_time (seconds)
  2. The minimum caching time according to (Expires - Date)
  3. Headers Squid honors if the object can't be revalidated
  4. defaults to 60 seconds. In reverse proxy environments it
  5. might be desirable to honor shorter object lifetimes. It
  6. is most likely better to make your server return a
  7. meaningful Last-Modified header however. In ESI environments
  8. where page fragments often have short lifetimes, this will
  9. often be best set to 0.
  10. Default:
  11. minimum_expiry_time 60 seconds
  1. TAG: store_avg_object_size (kbytes)
  2. Average object size, used to estimate number of objects your
  3. cache can hold. The default is 13 KB.
  4. Default:
  5. store_avg_object_size 13 KB
  1. TAG: store_objects_per_bucket
  2. Target number of objects per bucket in the store hash table.
  3. Lowering this value increases the total number of buckets and
  4. also the storage maintenance rate. The default is 20.
  5. Default:
  6. store_objects_per_bucket 20


  1. HTTP OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: request_header_max_size (KB)
  2. This specifies the maximum size for HTTP headers in a request.
  3. Request headers are usually relatively small (about 512 bytes).
  4. Placing a limit on the request header size will catch certain
  5. bugs (for example with persistent connections) and possibly
  6. buffer-overflow or denial-of-service attacks.
  7. Default:
  8. request_header_max_size 20 KB
  1. TAG: reply_header_max_size (KB)
  2. This specifies the maximum size for HTTP headers in a reply.
  3. Reply headers are usually relatively small (about 512 bytes).
  4. Placing a limit on the reply header size will catch certain
  5. bugs (for example with persistent connections) and possibly
  6. buffer-overflow or denial-of-service attacks.
  7. Default:
  8. reply_header_max_size 20 KB
  1. TAG: request_body_max_size (bytes)
  2. This specifies the maximum size for an HTTP request body.
  3. In other words, the maximum size of a PUT/POST request.
  4. A user who attempts to send a request with a body larger
  5. than this limit receives an "Invalid Request" error message.
  6. If you set this parameter to a zero (the default), there will
  7. be no limit imposed.
  8. Default:
  9. request_body_max_size 0 KB
  1. TAG: broken_posts
  2. A list of ACL elements which, if matched, causes Squid to send
  3. an extra CRLF pair after the body of a PUT/POST request.
  4. Some HTTP servers has broken implementations of PUT/POST,
  5. and rely on an extra CRLF pair sent by some WWW clients.
  6. Quote from RFC2616 section 4.1 on this matter:
  7. Note: certain buggy HTTP/1.0 client implementations generate an
  8. extra CRLF's after a POST request. To restate what is explicitly
  9. forbidden by the BNF, an HTTP/1.1 client must not preface or follow
  10. a request with an extra CRLF.
  11. Example:
  12. acl buggy_server url_regex ^http://....
  13. broken_posts allow buggy_server
  14. Default:
  15. none
  1. TAG: via on|off
  2. If set (default), Squid will include a Via header in requests and
  3. replies as required by RFC2616.
  4. Default:
  5. via on
  1. TAG: ie_refresh on|off
  2. Microsoft Internet Explorer up until version 5.5 Service
  3. Pack 1 has an issue with transparent proxies, wherein it
  4. is impossible to force a refresh. Turning this on provides
  5. a partial fix to the problem, by causing all IMS-REFRESH
  6. requests from older IE versions to check the origin server
  7. for fresh content. This reduces hit ratio by some amount
  8. (~10% in my experience), but allows users to actually get
  9. fresh content when they want it. Note because Squid
  10. cannot tell if the user is using 5.5 or 5.5SP1, the behavior
  11. of 5.5 is unchanged from old versions of Squid (i.e. a
  12. forced refresh is impossible). Newer versions of IE will,
  13. hopefully, continue to have the new behavior and will be
  14. handled based on that assumption. This option defaults to
  15. the old Squid behavior, which is better for hit ratios but
  16. worse for clients using IE, if they need to be able to
  17. force fresh content.
  18. Default:
  19. ie_refresh off
  1. TAG: vary_ignore_expire on|off
  2. Many HTTP servers supporting Vary gives such objects
  3. immediate expiry time with no cache-control header
  4. when requested by a HTTP/1.0 client. This option
  5. enables Squid to ignore such expiry times until
  6. HTTP/1.1 is fully implemented.
  7. WARNING: This may eventually cause some varying
  8. objects not intended for caching to get cached.
  9. Default:
  10. vary_ignore_expire off
  1. TAG: extension_methods
  2. Squid only knows about standardized HTTP request methods.
  3. You can add up to 20 additional "extension" methods here.
  4. Default:
  5. none
  1. TAG: request_entities
  2. Squid defaults to deny GET and HEAD requests with request entities,
  3. as the meaning of such requests are undefined in the HTTP standard
  4. even if not explicitly forbidden.
  5. Set this directive to on if you have clients which insists
  6. on sending request entities in GET or HEAD requests. But be warned
  7. that there is server software (both proxies and web servers) which
  8. can fail to properly process this kind of request which may make you
  9. vulnerable to cache pollution attacks if enabled.
  10. Default:
  11. request_entities off
  1. TAG: request_header_access
  2. Usage: request_header_access header_name allow|deny [!]aclname ...
  3. WARNING: Doing this VIOLATES the HTTP standard. Enabling
  4. this feature could make you liable for problems which it
  5. causes.
  6. This option replaces the old 'anonymize_headers' and the
  7. older 'http_anonymizer' option with something that is much
  8. more configurable. This new method creates a list of ACLs
  9. for each header, allowing you very fine-tuned header
  10. mangling.
  11. This option only applies to request headers, i.e., from the
  12. client to the server.
  13. You can only specify known headers for the header name.
  14. Other headers are reclassified as 'Other'. You can also
  15. refer to all the headers with 'All'.
  16. For example, to achieve the same behavior as the old
  17. 'http_anonymizer standard' option, you should use:
  18. request_header_access From deny all
  19. request_header_access Referer deny all
  20. request_header_access Server deny all
  21. request_header_access User-Agent deny all
  22. request_header_access WWW-Authenticate deny all
  23. request_header_access Link deny all
  24. Or, to reproduce the old 'http_anonymizer paranoid' feature
  25. you should use:
  26. request_header_access Allow allow all
  27. request_header_access Authorization allow all
  28. request_header_access WWW-Authenticate allow all
  29. request_header_access Proxy-Authorization allow all
  30. request_header_access Proxy-Authenticate allow all
  31. request_header_access Cache-Control allow all
  32. request_header_access Content-Encoding allow all
  33. request_header_access Content-Length allow all
  34. request_header_access Content-Type allow all
  35. request_header_access Date allow all
  36. request_header_access Expires allow all
  37. request_header_access Host allow all
  38. request_header_access If-Modified-Since allow all
  39. request_header_access Last-Modified allow all
  40. request_header_access Location allow all
  41. request_header_access Pragma allow all
  42. request_header_access Accept allow all
  43. request_header_access Accept-Charset allow all
  44. request_header_access Accept-Encoding allow all
  45. request_header_access Accept-Language allow all
  46. request_header_access Content-Language allow all
  47. request_header_access Mime-Version allow all
  48. request_header_access Retry-After allow all
  49. request_header_access Title allow all
  50. request_header_access Connection allow all
  51. request_header_access Proxy-Connection allow all
  52. request_header_access All deny all
  53. although many of those are HTTP reply headers, and so should be
  54. controlled with the reply_header_access directive.
  55. By default, all headers are allowed (no anonymizing is
  56. performed).
  57. Default:
  58. none
  1. TAG: reply_header_access
  2. Usage: reply_header_access header_name allow|deny [!]aclname ...
  3. WARNING: Doing this VIOLATES the HTTP standard. Enabling
  4. this feature could make you liable for problems which it
  5. causes.
  6. This option only applies to reply headers, i.e., from the
  7. server to the client.
  8. This is the same as request_header_access, but in the other
  9. direction.
  10. This option replaces the old 'anonymize_headers' and the
  11. older 'http_anonymizer' option with something that is much
  12. more configurable. This new method creates a list of ACLs
  13. for each header, allowing you very fine-tuned header
  14. mangling.
  15. You can only specify known headers for the header name.
  16. Other headers are reclassified as 'Other'. You can also
  17. refer to all the headers with 'All'.
  18. For example, to achieve the same behavior as the old
  19. 'http_anonymizer standard' option, you should use:
  20. reply_header_access From deny all
  21. reply_header_access Referer deny all
  22. reply_header_access Server deny all
  23. reply_header_access User-Agent deny all
  24. reply_header_access WWW-Authenticate deny all
  25. reply_header_access Link deny all
  26. Or, to reproduce the old 'http_anonymizer paranoid' feature
  27. you should use:
  28. reply_header_access Allow allow all
  29. reply_header_access Authorization allow all
  30. reply_header_access WWW-Authenticate allow all
  31. reply_header_access Proxy-Authorization allow all
  32. reply_header_access Proxy-Authenticate allow all
  33. reply_header_access Cache-Control allow all
  34. reply_header_access Content-Encoding allow all
  35. reply_header_access Content-Length allow all
  36. reply_header_access Content-Type allow all
  37. reply_header_access Date allow all
  38. reply_header_access Expires allow all
  39. reply_header_access Host allow all
  40. reply_header_access If-Modified-Since allow all
  41. reply_header_access Last-Modified allow all
  42. reply_header_access Location allow all
  43. reply_header_access Pragma allow all
  44. reply_header_access Accept allow all
  45. reply_header_access Accept-Charset allow all
  46. reply_header_access Accept-Encoding allow all
  47. reply_header_access Accept-Language allow all
  48. reply_header_access Content-Language allow all
  49. reply_header_access Mime-Version allow all
  50. reply_header_access Retry-After allow all
  51. reply_header_access Title allow all
  52. reply_header_access Connection allow all
  53. reply_header_access Proxy-Connection allow all
  54. reply_header_access All deny all
  55. although the HTTP request headers won't be usefully controlled
  56. by this directive -- see request_header_access for details.
  57. By default, all headers are allowed (no anonymizing is
  58. performed).
  59. Default:
  60. none
  1. TAG: header_replace
  2. Usage: header_replace header_name message
  3. Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
  4. This option allows you to change the contents of headers
  5. denied with header_access above, by replacing them with
  6. some fixed string. This replaces the old fake_user_agent
  7. option.
  8. This only applies to request headers, not reply headers.
  9. By default, headers are removed if denied.
  10. Default:
  11. none
  1. TAG: relaxed_header_parser on|off|warn
  2. In the default "on" setting Squid accepts certain forms
  3. of non-compliant HTTP messages where it is unambiguous
  4. what the sending application intended even if the message
  5. is not correctly formatted. The messages is then normalized
  6. to the correct form when forwarded by Squid.
  7. If set to "warn" then a warning will be emitted in cache.log
  8. each time such HTTP error is encountered.
  9. If set to "off" then such HTTP errors will cause the request
  10. or response to be rejected.
  11. Default:
  12. relaxed_header_parser on


  1. TIMEOUTS
  2. -----------------------------------------------------------------------------
  1. TAG: forward_timeout time-units
  2. This parameter specifies how long Squid should at most attempt in
  3. finding a forwarding path for the request before giving up.
  4. Default:
  5. forward_timeout 4 minutes
  1. TAG: connect_timeout time-units
  2. This parameter specifies how long to wait for the TCP connect to
  3. the requested server or peer to complete before Squid should
  4. attempt to find another path where to forward the request.
  5. Default:
  6. connect_timeout 1 minute
  1. TAG: peer_connect_timeout time-units
  2. This parameter specifies how long to wait for a pending TCP
  3. connection to a peer cache. The default is 30 seconds. You
  4. may also set different timeout values for individual neighbors
  5. with the 'connect-timeout' option on a 'cache_peer' line.
  6. Default:
  7. peer_connect_timeout 30 seconds
  1. TAG: read_timeout time-units
  2. The read_timeout is applied on server-side connections. After
  3. each successful read(), the timeout will be extended by this
  4. amount. If no data is read again after this amount of time,
  5. the request is aborted and logged with ERR_READ_TIMEOUT. The
  6. default is 15 minutes.
  7. Default:
  8. read_timeout 15 minutes
  1. TAG: request_timeout
  2. How long to wait for an HTTP request after initial
  3. connection establishment.
  4. Default:
  5. request_timeout 5 minutes
  1. TAG: persistent_request_timeout
  2. How long to wait for the next HTTP request on a persistent
  3. connection after the previous request completes.
  4. Default:
  5. persistent_request_timeout 2 minutes
  1. TAG: client_lifetime time-units
  2. The maximum amount of time a client (browser) is allowed to
  3. remain connected to the cache process. This protects the Cache
  4. from having a lot of sockets (and hence file descriptors) tied up
  5. in a CLOSE_WAIT state from remote clients that go away without
  6. properly shutting down (either because of a network failure or
  7. because of a poor client implementation). The default is one
  8. day, 1440 minutes.
  9. NOTE: The default value is intended to be much larger than any
  10. client would ever need to be connected to your cache. You
  11. should probably change client_lifetime only as a last resort.
  12. If you seem to have many client connections tying up
  13. filedescriptors, we recommend first tuning the read_timeout,
  14. request_timeout, persistent_request_timeout and quick_abort values.
  15. Default:
  16. client_lifetime 1 day
  1. TAG: half_closed_clients
  2. Some clients may shutdown the sending side of their TCP
  3. connections, while leaving their receiving sides open. Sometimes,
  4. Squid can not tell the difference between a half-closed and a
  5. fully-closed TCP connection. By default, half-closed client
  6. connections are kept open until a read(2) or write(2) on the
  7. socket returns an error. Change this option to 'off' and Squid
  8. will immediately close client connections when read(2) returns
  9. "no more data to read."
  10. Default:
  11. half_closed_clients on
  1. TAG: pconn_timeout
  2. Timeout for idle persistent connections to servers and other
  3. proxies.
  4. Default:
  5. pconn_timeout 1 minute
  1. TAG: ident_timeout
  2. Maximum time to wait for IDENT lookups to complete.
  3. If this is too high, and you enabled IDENT lookups from untrusted
  4. users, you might be susceptible to denial-of-service by having
  5. many ident requests going at once.
  6. Default:
  7. ident_timeout 10 seconds
  1. TAG: shutdown_lifetime time-units
  2. When SIGTERM or SIGHUP is received, the cache is put into
  3. "shutdown pending" mode until all active sockets are closed.
  4. This value is the lifetime to set for all open descriptors
  5. during shutdown mode. Any active clients after this many
  6. seconds will receive a 'timeout' message.
  7. Default:
  8. shutdown_lifetime 30 seconds


  1. ADMINISTRATIVE PARAMETERS
  2. -----------------------------------------------------------------------------
  1. TAG: cache_mgr
  2. Email-address of local cache manager who will receive
  3. mail if the cache dies. The default is "webmaster."
  4. Default:
  5. cache_mgr webmaster
  1. TAG: mail_from
  2. From: email-address for mail sent when the cache dies.
  3. The default is to use 'appname@unique_hostname'.
  4. Default appname value is "squid", can be changed into
  5. src/globals.h before building squid.
  6. Default:
  7. none
  1. TAG: mail_program
  2. Email program used to send mail if the cache dies.
  3. The default is "mail". The specified program must comply
  4. with the standard Unix mail syntax:
  5. mail-program recipient < mailfile
  6. Optional command line options can be specified.
  7. Default:
  8. mail_program mail
  1. TAG: cache_effective_user
  2. If you start Squid as root, it will change its effective/real
  3. UID/GID to the user specified below. The default is to change
  4. to UID of nobody.
  5. see also; cache_effective_group
  6. Default:
  7. cache_effective_user nobody
  1. TAG: cache_effective_group
  2. Squid sets the GID to the effective user's default group ID
  3. (taken from the password file) and supplementary group list
  4. from the groups membership.
  5. If you want Squid to run with a specific GID regardless of
  6. the group memberships of the effective user then set this
  7. to the group (or GID) you want Squid to run as. When set
  8. all other group privileges of the effective user are ignored
  9. and only this GID is effective. If Squid is not started as
  10. root the user starting Squid MUST be member of the specified
  11. group.
  12. This option is not recommended by the Squid Team.
  13. Our preference is for administrators to configure a secure
  14. user account for squid with UID/GID matching system policies.
  15. Default:
  16. none
  1. TAG: httpd_suppress_version_string on|off
  2. Suppress Squid version string info in HTTP headers and HTML error pages.
  3. Default:
  4. httpd_suppress_version_string off
  1. TAG: visible_hostname
  2. If you want to present a special hostname in error messages, etc,
  3. define this. Otherwise, the return value of gethostname()
  4. will be used. If you have multiple caches in a cluster and
  5. get errors about IP-forwarding you must set them to have individual
  6. names with this setting.
  7. Default:
  8. none
  1. TAG: unique_hostname
  2. If you want to have multiple machines with the same
  3. 'visible_hostname' you must give each machine a different
  4. 'unique_hostname' so forwarding loops can be detected.
  5. Default:
  6. none
  1. TAG: hostname_aliases
  2. A list of other DNS names your cache has.
  3. Default:
  4. none
  1. TAG: umask
  2. Minimum umask which should be enforced while the proxy
  3. is running, in addition to the umask set at startup.
  4. For a traditional octal representation of umasks, start
  5. your value with 0.
  6. Default:
  7. umask 027


  1. OPTIONS FOR THE CACHE REGISTRATION SERVICE
  2. -----------------------------------------------------------------------------
  3. This section contains parameters for the (optional) cache
  4. announcement service. This service is provided to help
  5. cache administrators locate one another in order to join or
  6. create cache hierarchies.
  7. An 'announcement' message is sent (via UDP) to the registration
  8. service by Squid. By default, the announcement message is NOT
  9. SENT unless you enable it with 'announce_period' below.
  10. The announcement message includes your hostname, plus the
  11. following information from this configuration file:
  12. http_port
  13. icp_port
  14. cache_mgr
  15. All current information is processed regularly and made
  16. available on the Web at http://www.ircache.net/Cache/Tracker/.
  1. TAG: announce_period
  2. This is how frequently to send cache announcements. The
  3. default is `0' which disables sending the announcement
  4. messages.
  5. To enable announcing your cache, just uncomment the line
  6. below.
  7. Default:
  8. announce_period 0
  9. To enable announcing your cache, just uncomment the line below.
  10. announce_period 1 day
  1. TAG: announce_host
  2. TAG: announce_file
  3. TAG: announce_port
  4. announce_host and announce_port set the hostname and port
  5. number where the registration message will be sent.
  6. Hostname will default to 'tracker.ircache.net' and port will
  7. default default to 3131. If the 'filename' argument is given,
  8. the contents of that file will be included in the announce
  9. message.
  10. Default:
  11. announce_host tracker.ircache.net
  12. announce_port 3131


  1. HTTPD-ACCELERATOR OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: httpd_accel_surrogate_id
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DUSE_SQUID_ESI define
  4. Surrogates (http://www.esi.org/architecture_spec_1.0.html)
  5. need an identification token to allow control targeting. Because
  6. a farm of surrogates may all perform the same tasks, they may share
  7. an identification token.
  8. Default:
  9. httpd_accel_surrogate_id unset-id
  1. TAG: http_accel_surrogate_remote on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DUSE_SQUID_ESI define
  4. Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
  5. Set this to on to have squid behave as a remote surrogate.
  6. Default:
  7. http_accel_surrogate_remote off
  1. TAG: esi_parser libxml2|expat|custom
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DUSE_SQUID_ESI define
  4. ESI markup is not strictly XML compatible. The custom ESI parser
  5. will give higher performance, but cannot handle non ASCII character
  6. encodings.
  7. Default:
  8. esi_parser custom


  1. DELAY POOL PARAMETERS
  2. -----------------------------------------------------------------------------
  1. TAG: delay_pools
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-delay-pools option
  4. This represents the number of delay pools to be used. For example,
  5. if you have one class 2 delay pool and one class 3 delays pool, you
  6. have a total of 2 delay pools.
  7. Default:
  8. delay_pools 0
  1. TAG: delay_class
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-delay-pools option
  4. This defines the class of each delay pool. There must be exactly one
  5. delay_class line for each delay pool. For example, to define two
  6. delay pools, one of class 2 and one of class 3, the settings above
  7. and here would be:
  8. Example:
  9. delay_pools 4 # 4 delay pools
  10. delay_class 1 2 # pool 1 is a class 2 pool
  11. delay_class 2 3 # pool 2 is a class 3 pool
  12. delay_class 3 4 # pool 3 is a class 4 pool
  13. delay_class 4 5 # pool 4 is a class 5 pool
  14. The delay pool classes are:
  15. class 1 Everything is limited by a single aggregate
  16. bucket.
  17. class 2 Everything is limited by a single aggregate
  18. bucket as well as an "individual" bucket chosen
  19. from bits 25 through 32 of the IP address.
  20. class 3 Everything is limited by a single aggregate
  21. bucket as well as a "network" bucket chosen
  22. from bits 17 through 24 of the IP address and a
  23. "individual" bucket chosen from bits 17 through
  24. 32 of the IP address.
  25. class 4 Everything in a class 3 delay pool, with an
  26. additional limit on a per user basis. This
  27. only takes effect if the username is established
  28. in advance - by forcing authentication in your
  29. http_access rules.
  30. class 5 Requests are grouped according their tag (see
  31. external_acl's tag= reply).
  32. NOTE: If an IP address is a.b.c.d
  33. -> bits 25 through 32 are "d"
  34. -> bits 17 through 24 are "c"
  35. -> bits 17 through 32 are "c * 256 + d"
  36. Default:
  37. none
  1. TAG: delay_access
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-delay-pools option
  4. This is used to determine which delay pool a request falls into.
  5. delay_access is sorted per pool and the matching starts with pool 1,
  6. then pool 2, ..., and finally pool N. The first delay pool where the
  7. request is allowed is selected for the request. If it does not allow
  8. the request to any pool then the request is not delayed (default).
  9. For example, if you want some_big_clients in delay
  10. pool 1 and lotsa_little_clients in delay pool 2:
  11. Example:
  12. delay_access 1 allow some_big_clients
  13. delay_access 1 deny all
  14. delay_access 2 allow lotsa_little_clients
  15. delay_access 2 deny all
  16. delay_access 3 allow authenticated_clients
  17. Default:
  18. none
  1. TAG: delay_parameters
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-delay-pools option
  4. This defines the parameters for a delay pool. Each delay pool has
  5. a number of "buckets" associated with it, as explained in the
  6. description of delay_class. For a class 1 delay pool, the syntax is:
  7. delay_parameters pool aggregate
  8. For a class 2 delay pool:
  9. delay_parameters pool aggregate individual
  10. For a class 3 delay pool:
  11. delay_parameters pool aggregate network individual
  12. For a class 4 delay pool:
  13. delay_parameters pool aggregate network individual user
  14. For a class 5 delay pool:
  15. delay_parameters pool tag
  16. The variables here are:
  17. pool a pool number - ie, a number between 1 and the
  18. number specified in delay_pools as used in
  19. delay_class lines.
  20. aggregate the "delay parameters" for the aggregate bucket
  21. (class 1, 2, 3).
  22. individual the "delay parameters" for the individual
  23. buckets (class 2, 3).
  24. network the "delay parameters" for the network buckets
  25. (class 3).
  26. user the delay parameters for the user buckets
  27. (class 4).
  28. tag the delay parameters for the tag buckets
  29. (class 5).
  30. A pair of delay parameters is written restore/maximum, where restore is
  31. the number of bytes (not bits - modem and network speeds are usually
  32. quoted in bits) per second placed into the bucket, and maximum is the
  33. maximum number of bytes which can be in the bucket at any time.
  34. For example, if delay pool number 1 is a class 2 delay pool as in the
  35. above example, and is being used to strictly limit each host to 64kbps
  36. (plus overheads), with no overall limit, the line is:
  37. delay_parameters 1 -1/-1 8000/8000
  38. Note that the figure -1 is used to represent "unlimited".
  39. And, if delay pool number 2 is a class 3 delay pool as in the above
  40. example, and you want to limit it to a total of 256kbps (strict limit)
  41. with each 8-bit network permitted 64kbps (strict limit) and each
  42. individual host permitted 4800bps with a bucket maximum size of 64kb
  43. to permit a decent web page to be downloaded at a decent speed
  44. (if the network is not being limited due to overuse) but slow down
  45. large downloads more significantly:
  46. delay_parameters 2 32000/32000 8000/8000 600/8000
  47. There must be one delay_parameters line for each delay pool.
  48. Finally, for a class 4 delay pool as in the example - each user will
  49. be limited to 128Kb no matter how many workstations they are logged into.:
  50. delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
  51. Default:
  52. none
  1. TAG: delay_initial_bucket_level (percent, 0-100)
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-delay-pools option
  4. The initial bucket percentage is used to determine how much is put
  5. in each bucket when squid starts, is reconfigured, or first notices
  6. a host accessing it (in class 2 and class 3, individual hosts and
  7. networks only have buckets associated with them once they have been
  8. "seen" by squid).
  9. Default:
  10. delay_initial_bucket_level 50


  1. WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: wccp_router
  2. TAG: wccp2_router
  3. Use this option to define your WCCP ``home router for
  4. Squid.
  5. wccp_router supports a single WCCP(v1) router
  6. wccp2_router supports multiple WCCPv2 routers
  7. only one of the two may be used at the same time and defines
  8. which version of WCCP to use.
  9. Default:
  10. wccp_router 0.0.0.0
  1. TAG: wccp_version
  2. This directive is only relevant if you need to set up WCCP(v1)
  3. to some very old and end-of-life Cisco routers. In all other
  4. setups it must be left unset or at the default setting.
  5. It defines an internal version in the WCCP(v1) protocol,
  6. with version 4 being the officially documented protocol.
  7. According to some users, Cisco IOS 11.2 and earlier only
  8. support WCCP version 3. If you're using that or an earlier
  9. version of IOS, you may need to change this value to 3, otherwise
  10. do not specify this parameter.
  11. Default:
  12. wccp_version 4
  1. TAG: wccp2_rebuild_wait
  2. If this is enabled Squid will wait for the cache dir rebuild to finish
  3. before sending the first wccp2 HereIAm packet
  4. Default:
  5. wccp2_rebuild_wait on
  1. TAG: wccp2_forwarding_method
  2. WCCP2 allows the setting of forwarding methods between the
  3. router/switch and the cache. Valid values are as follows:
  4. 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  5. 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  6. Currently (as of IOS 12.4) cisco routers only support GRE.
  7. Cisco switches only support the L2 redirect assignment method.
  8. Default:
  9. wccp2_forwarding_method 1
  1. TAG: wccp2_return_method
  2. WCCP2 allows the setting of return methods between the
  3. router/switch and the cache for packets that the cache
  4. decides not to handle. Valid values are as follows:
  5. 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  6. 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  7. Currently (as of IOS 12.4) cisco routers only support GRE.
  8. Cisco switches only support the L2 redirect assignment.
  9. If the "ip wccp redirect exclude in" command has been
  10. enabled on the cache interface, then it is still safe for
  11. the proxy server to use a l2 redirect method even if this
  12. option is set to GRE.
  13. Default:
  14. wccp2_return_method 1
  1. TAG: wccp2_assignment_method
  2. WCCP2 allows the setting of methods to assign the WCCP hash
  3. Valid values are as follows:
  4. 1 - Hash assignment
  5. 2 - Mask assignment
  6. As a general rule, cisco routers support the hash assignment method
  7. and cisco switches support the mask assignment method.
  8. Default:
  9. wccp2_assignment_method 1
  1. TAG: wccp2_service
  2. WCCP2 allows for multiple traffic services. There are two
  3. types: "standard" and "dynamic". The standard type defines
  4. one service id - http (id 0). The dynamic service ids can be from
  5. 51 to 255 inclusive. In order to use a dynamic service id
  6. one must define the type of traffic to be redirected; this is done
  7. using the wccp2_service_info option.
  8. The "standard" type does not require a wccp2_service_info option,
  9. just specifying the service id will suffice.
  10. MD5 service authentication can be enabled by adding
  11. "password=<password>" to the end of this service declaration.
  12. Examples:
  13. wccp2_service standard 0 # for the 'web-cache' standard service
  14. wccp2_service dynamic 80 # a dynamic service type which will be
  15. # fleshed out with subsequent options.
  16. wccp2_service standard 0 password=foo
  17. Default:
  18. wccp2_service standard 0
  1. TAG: wccp2_service_info
  2. Dynamic WCCPv2 services require further information to define the
  3. traffic you wish to have diverted.
  4. The format is:
  5. wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
  6. priority=<priority> ports=<port>,<port>..
  7. The relevant WCCPv2 flags:
  8. + src_ip_hash, dst_ip_hash
  9. + source_port_hash, dst_port_hash
  10. + src_ip_alt_hash, dst_ip_alt_hash
  11. + src_port_alt_hash, dst_port_alt_hash
  12. + ports_source
  13. The port list can be one to eight entries.
  14. Example:
  15. wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
  16. priority=240 ports=80
  17. Note: the service id must have been defined by a previous
  18. 'wccp2_service dynamic <id>' entry.
  19. Default:
  20. none
  1. TAG: wccp2_weight
  2. Each cache server gets assigned a set of the destination
  3. hash proportional to their weight.
  4. Default:
  5. wccp2_weight 10000
  1. TAG: wccp_address
  2. TAG: wccp2_address
  3. Use this option if you require WCCP to use a specific
  4. interface address.
  5. The default behavior is to not bind to any specific address.
  6. Default:
  7. wccp_address 0.0.0.0
  8. wccp2_address 0.0.0.0


  1. PERSISTENT CONNECTION HANDLING
  2. -----------------------------------------------------------------------------
  3. Also see "pconn_timeout" in the TIMEOUTS section
  1. TAG: client_persistent_connections
  2. TAG: server_persistent_connections
  3. Persistent connection support for clients and servers. By
  4. default, Squid uses persistent connections (when allowed)
  5. with its clients and servers. You can use these options to
  6. disable persistent connections with clients and/or servers.
  7. Default:
  8. client_persistent_connections on
  9. server_persistent_connections on
  1. TAG: persistent_connection_after_error
  2. With this directive the use of persistent connections after
  3. HTTP errors can be disabled. Useful if you have clients
  4. who fail to handle errors on persistent connections proper.
  5. Default:
  6. persistent_connection_after_error off
  1. TAG: detect_broken_pconn
  2. Some servers have been found to incorrectly signal the use
  3. of HTTP/1.0 persistent connections even on replies not
  4. compatible, causing significant delays. This server problem
  5. has mostly been seen on redirects.
  6. By enabling this directive Squid attempts to detect such
  7. broken replies and automatically assume the reply is finished
  8. after 10 seconds timeout.
  9. Default:
  10. detect_broken_pconn off


  1. CACHE DIGEST OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: digest_generation
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This controls whether the server will generate a Cache Digest
  5. of its contents. By default, Cache Digest generation is
  6. enabled if Squid is compiled with --enable-cache-digests defined.
  7. Default:
  8. digest_generation on
  1. TAG: digest_bits_per_entry
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This is the number of bits of the server's Cache Digest which
  5. will be associated with the Digest entry for a given HTTP
  6. Method and URL (public key) combination. The default is 5.
  7. Default:
  8. digest_bits_per_entry 5
  1. TAG: digest_rebuild_period (seconds)
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This is the wait time between Cache Digest rebuilds.
  5. Default:
  6. digest_rebuild_period 1 hour
  1. TAG: digest_rewrite_period (seconds)
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This is the wait time between Cache Digest writes to
  5. disk.
  6. Default:
  7. digest_rewrite_period 1 hour
  1. TAG: digest_swapout_chunk_size (bytes)
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This is the number of bytes of the Cache Digest to write to
  5. disk at a time. It defaults to 4096 bytes (4KB), the Squid
  6. default swap page.
  7. Default:
  8. digest_swapout_chunk_size 4096 bytes
  1. TAG: digest_rebuild_chunk_percentage (percent, 0-100)
  2. Note: This option is only available if Squid is rebuilt with the
  3. --enable-cache-digests option
  4. This is the percentage of the Cache Digest to be scanned at a
  5. time. By default it is set to 10% of the Cache Digest.
  6. Default:
  7. digest_rebuild_chunk_percentage 10


  1. SNMP OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: snmp_port
  2. The port number where Squid listens for SNMP requests. To enable
  3. SNMP support set this to a suitable port number. Port number
  4. 3401 is often used for the Squid SNMP agent. By default it's
  5. set to "0" (disabled)
  6. Default:
  7. snmp_port 0
  8. snmp_port 3401
  1. TAG: snmp_access
  2. Allowing or denying access to the SNMP port.
  3. All access to the agent is denied by default.
  4. usage:
  5. snmp_access allow|deny [!]aclname ...
  6. Example:
  7. snmp_access allow snmppublic localhost
  8. snmp_access deny all
  9. Default:
  10. snmp_access deny all
  1. TAG: snmp_incoming_address
  2. TAG: snmp_outgoing_address
  3. Just like 'udp_incoming_address' above, but for the SNMP port.
  4. snmp_incoming_address is used for the SNMP socket receiving
  5. messages from SNMP agents.
  6. snmp_outgoing_address is used for SNMP packets returned to SNMP
  7. agents.
  8. The default snmp_incoming_address (0.0.0.0) is to listen on all
  9. available network interfaces.
  10. If snmp_outgoing_address is set to 255.255.255.255 (the default)
  11. it will use the same socket as snmp_incoming_address. Only
  12. change this if you want to have SNMP replies sent using another
  13. address than where this Squid listens for SNMP queries.
  14. NOTE, snmp_incoming_address and snmp_outgoing_address can not have
  15. the same value since they both use port 3401.
  16. Default:
  17. snmp_incoming_address 0.0.0.0
  18. snmp_outgoing_address 255.255.255.255


  1. ICP OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: icp_port
  2. The port number where Squid sends and receives ICP queries to
  3. and from neighbor caches. The standard UDP port for ICP is 3130.
  4. Default is disabled (0).
  5. Default:
  6. icp_port 0
  7. icp_port 3130
  1. TAG: htcp_port
  2. The port number where Squid sends and receives HTCP queries to
  3. and from neighbor caches. To turn it on you want to set it to
  4. 4827. By default it is set to "0" (disabled).
  5. Default:
  6. htcp_port 0
  7. htcp_port 4827
  1. TAG: log_icp_queries on|off
  2. If set, ICP queries are logged to access.log. You may wish
  3. do disable this if your ICP load is VERY high to speed things
  4. up or to simplify log analysis.
  5. Default:
  6. log_icp_queries on
  1. TAG: udp_incoming_address
  2. udp_incoming_address is used for UDP packets received from other
  3. caches.
  4. The default behavior is to not bind to any specific address.
  5. Only change this if you want to have all UDP queries received on
  6. a specific interface/address.
  7. NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
  8. modules. Altering it will affect all of them in the same manner.
  9. see also; udp_outgoing_address
  10. NOTE, udp_incoming_address and udp_outgoing_address can not
  11. have the same value since they both use the same port.
  12. Default:
  13. udp_incoming_address 0.0.0.0
  1. TAG: udp_outgoing_address
  2. udp_outgoing_address is used for UDP packets sent out to other
  3. caches.
  4. The default behavior is to not bind to any specific address.
  5. Instead it will use the same socket as udp_incoming_address.
  6. Only change this if you want to have UDP queries sent using another
  7. address than where this Squid listens for UDP queries from other
  8. caches.
  9. NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
  10. modules. Altering it will affect all of them in the same manner.
  11. see also; udp_incoming_address
  12. NOTE, udp_incoming_address and udp_outgoing_address can not
  13. have the same value since they both use the same port.
  14. Default:
  15. udp_outgoing_address 255.255.255.255
  1. TAG: icp_hit_stale on|off
  2. If you want to return ICP_HIT for stale cache objects, set this
  3. option to 'on'. If you have sibling relationships with caches
  4. in other administrative domains, this should be 'off'. If you only
  5. have sibling relationships with caches under your control,
  6. it is probably okay to set this to 'on'.
  7. If set to 'on', your siblings should use the option "allow-miss"
  8. on their cache_peer lines for connecting to you.
  9. Default:
  10. icp_hit_stale off
  1. TAG: minimum_direct_hops
  2. If using the ICMP pinging stuff, do direct fetches for sites
  3. which are no more than this many hops away.
  4. Default:
  5. minimum_direct_hops 4
  1. TAG: minimum_direct_rtt
  2. If using the ICMP pinging stuff, do direct fetches for sites
  3. which are no more than this many rtt milliseconds away.
  4. Default:
  5. minimum_direct_rtt 400
  1. TAG: netdb_low
  2. TAG: netdb_high
  3. The low and high water marks for the ICMP measurement
  4. database. These are counts, not percents. The defaults are
  5. 900 and 1000. When the high water mark is reached, database
  6. entries will be deleted until the low mark is reached.
  7. Default:
  8. netdb_low 900
  9. netdb_high 1000
  1. TAG: netdb_ping_period
  2. The minimum period for measuring a site. There will be at
  3. least this much delay between successive pings to the same
  4. network. The default is five minutes.
  5. Default:
  6. netdb_ping_period 5 minutes
  1. TAG: query_icmp on|off
  2. If you want to ask your peers to include ICMP data in their ICP
  3. replies, enable this option.
  4. If your peer has configured Squid (during compilation) with
  5. '--enable-icmp' that peer will send ICMP pings to origin server
  6. sites of the URLs it receives. If you enable this option the
  7. ICP replies from that peer will include the ICMP data (if available).
  8. Then, when choosing a parent cache, Squid will choose the parent with
  9. the minimal RTT to the origin server. When this happens, the
  10. hierarchy field of the access.log will be
  11. "CLOSEST_PARENT_MISS". This option is off by default.
  12. Default:
  13. query_icmp off
  1. TAG: test_reachability on|off
  2. When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
  3. instead of ICP_MISS if the target host is NOT in the ICMP
  4. database, or has a zero RTT.
  5. Default:
  6. test_reachability off
  1. TAG: icp_query_timeout (msec)
  2. Normally Squid will automatically determine an optimal ICP
  3. query timeout value based on the round-trip-time of recent ICP
  4. queries. If you want to override the value determined by
  5. Squid, set this 'icp_query_timeout' to a non-zero value. This
  6. value is specified in MILLISECONDS, so, to use a 2-second
  7. timeout (the old default), you would write:
  8. icp_query_timeout 2000
  9. Default:
  10. icp_query_timeout 0
  1. TAG: maximum_icp_query_timeout (msec)
  2. Normally the ICP query timeout is determined dynamically. But
  3. sometimes it can lead to very large values (say 5 seconds).
  4. Use this option to put an upper limit on the dynamic timeout
  5. value. Do NOT use this option to always use a fixed (instead
  6. of a dynamic) timeout value. To set a fixed timeout see the
  7. 'icp_query_timeout' directive.
  8. Default:
  9. maximum_icp_query_timeout 2000
  1. TAG: minimum_icp_query_timeout (msec)
  2. Normally the ICP query timeout is determined dynamically. But
  3. sometimes it can lead to very small timeouts, even lower than
  4. the normal latency variance on your link due to traffic.
  5. Use this option to put an lower limit on the dynamic timeout
  6. value. Do NOT use this option to always use a fixed (instead
  7. of a dynamic) timeout value. To set a fixed timeout see the
  8. 'icp_query_timeout' directive.
  9. Default:
  10. minimum_icp_query_timeout 5
  1. TAG: background_ping_rate time-units
  2. Controls how often the ICP pings are sent to siblings that
  3. have background-ping set.
  4. Default:
  5. background_ping_rate 10 seconds


  1. MULTICAST ICP OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: mcast_groups
  2. This tag specifies a list of multicast groups which your server
  3. should join to receive multicasted ICP queries.
  4. NOTE! Be very careful what you put here! Be sure you
  5. understand the difference between an ICP _query_ and an ICP
  6. _reply_. This option is to be set only if you want to RECEIVE
  7. multicast queries. Do NOT set this option to SEND multicast
  8. ICP (use cache_peer for that). ICP replies are always sent via
  9. unicast, so this option does not affect whether or not you will
  10. receive replies from multicast group members.
  11. You must be very careful to NOT use a multicast address which
  12. is already in use by another group of caches.
  13. If you are unsure about multicast, please read the Multicast
  14. chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
  15. Usage: mcast_groups 239.128.16.128 224.0.1.20
  16. By default, Squid doesn't listen on any multicast groups.
  17. Default:
  18. none
  1. TAG: mcast_miss_addr
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DMULTICAST_MISS_STREAM define
  4. If you enable this option, every "cache miss" URL will
  5. be sent out on the specified multicast address.
  6. Do not enable this option unless you are are absolutely
  7. certain you understand what you are doing.
  8. Default:
  9. mcast_miss_addr 255.255.255.255
  1. TAG: mcast_miss_ttl
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DMULTICAST_MISS_STREAM define
  4. This is the time-to-live value for packets multicasted
  5. when multicasting off cache miss URLs is enabled. By
  6. default this is set to 'site scope', i.e. 16.
  7. Default:
  8. mcast_miss_ttl 16
  1. TAG: mcast_miss_port
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DMULTICAST_MISS_STREAM define
  4. This is the port number to be used in conjunction with
  5. 'mcast_miss_addr'.
  6. Default:
  7. mcast_miss_port 3135
  1. TAG: mcast_miss_encode_key
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DMULTICAST_MISS_STREAM define
  4. The URLs that are sent in the multicast miss stream are
  5. encrypted. This is the encryption key.
  6. Default:
  7. mcast_miss_encode_key XXXXXXXXXXXXXXXX
  1. TAG: mcast_icp_query_timeout (msec)
  2. For multicast peers, Squid regularly sends out ICP "probes" to
  3. count how many other peers are listening on the given multicast
  4. address. This value specifies how long Squid should wait to
  5. count all the replies. The default is 2000 msec, or 2
  6. seconds.
  7. Default:
  8. mcast_icp_query_timeout 2000


  1. INTERNAL ICON OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: icon_directory
  2. Where the icons are stored. These are normally kept in
  3. /usr/local/squid/share/icons
  4. Default:
  5. icon_directory /usr/local/squid/share/icons
  1. TAG: global_internal_static
  2. This directive controls is Squid should intercept all requests for
  3. /squid-internal-static/ no matter which host the URL is requesting
  4. (default on setting), or if nothing special should be done for
  5. such URLs (off setting). The purpose of this directive is to make
  6. icons etc work better in complex cache hierarchies where it may
  7. not always be possible for all corners in the cache mesh to reach
  8. the server generating a directory listing.
  9. Default:
  10. global_internal_static on
  1. TAG: short_icon_urls
  2. If this is enabled Squid will use short URLs for icons.
  3. If disabled it will revert to the old behavior of including
  4. it's own name and port in the URL.
  5. If you run a complex cache hierarchy with a mix of Squid and
  6. other proxies you may need to disable this directive.
  7. Default:
  8. short_icon_urls on


  1. ERROR PAGE OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: error_directory
  2. If you wish to create your own versions of the default
  3. (English) error files, either to customize them to suit your
  4. language or company copy the template English files to another
  5. directory and point this tag at them.
  6. The squid developers are interested in making squid available in
  7. a wide variety of languages. If you are making translations for a
  8. langauge that Squid does not currently provide please consider
  9. contributing your translation back to the project.
  10. Default:
  11. error_directory /usr/local/squid/share/errors/English
  1. TAG: err_html_text
  2. HTML text to include in error messages. Make this a "mailto"
  3. URL to your admin address, or maybe just a link to your
  4. organizations Web page.
  5. To include this in your error messages, you must rewrite
  6. the error template files (found in the "errors" directory).
  7. Wherever you want the 'err_html_text' line to appear,
  8. insert a %L tag in the error template file.
  9. Default:
  10. none
  1. TAG: email_err_data on|off
  2. If enabled, information about the occurred error will be
  3. included in the mailto links of the ERR pages (if %W is set)
  4. so that the email body contains the data.
  5. Syntax is <A HREF="mailto:%w%W">%w</A>
  6. Default:
  7. email_err_data on
  1. TAG: deny_info
  2. Usage: deny_info err_page_name acl
  3. or deny_info http://... acl
  4. Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
  5. This can be used to return a ERR_ page for requests which
  6. do not pass the 'http_access' rules. Squid remembers the last
  7. acl it evaluated in http_access, and if a 'deny_info' line exists
  8. for that ACL Squid returns a corresponding error page.
  9. The acl is typically the last acl on the http_access deny line which
  10. denied access. The exceptions to this rule are:
  11. - When Squid needs to request authentication credentials. It's then
  12. the first authentication related acl encountered
  13. - When none of the http_access lines matches. It's then the last
  14. acl processed on the last http_access line.
  15. You may use ERR_ pages that come with Squid or create your own pages
  16. and put them into the configured errors/ directory.
  17. Alternatively you can specify an error URL. The browsers will
  18. get redirected (302) to the specified URL. %s in the redirection
  19. URL will be replaced by the requested URL.
  20. Alternatively you can tell Squid to reset the TCP connection
  21. by specifying TCP_RESET.
  22. Default:
  23. none


  1. OPTIONS INFLUENCING REQUEST FORWARDING
  2. -----------------------------------------------------------------------------
  1. TAG: nonhierarchical_direct
  2. By default, Squid will send any non-hierarchical requests
  3. (matching hierarchy_stoplist or not cacheable request type) direct
  4. to origin servers.
  5. If you set this to off, Squid will prefer to send these
  6. requests to parents.
  7. Note that in most configurations, by turning this off you will only
  8. add latency to these request without any improvement in global hit
  9. ratio.
  10. If you are inside an firewall see never_direct instead of
  11. this directive.
  12. Default:
  13. nonhierarchical_direct on
  1. TAG: prefer_direct
  2. Normally Squid tries to use parents for most requests. If you for some
  3. reason like it to first try going direct and only use a parent if
  4. going direct fails set this to on.
  5. By combining nonhierarchical_direct off and prefer_direct on you
  6. can set up Squid to use a parent as a backup path if going direct
  7. fails.
  8. Note: If you want Squid to use parents for all requests see
  9. the never_direct directive. prefer_direct only modifies how Squid
  10. acts on cacheable requests.
  11. Default:
  12. prefer_direct off
  1. TAG: always_direct
  2. Usage: always_direct allow|deny [!]aclname ...
  3. Here you can use ACL elements to specify requests which should
  4. ALWAYS be forwarded by Squid to the origin servers without using
  5. any peers. For example, to always directly forward requests for
  6. local servers ignoring any parents or siblings you may have use
  7. something like:
  8. acl local-servers dstdomain my.domain.net
  9. always_direct allow local-servers
  10. To always forward FTP requests directly, use
  11. acl FTP proto FTP
  12. always_direct allow FTP
  13. NOTE: There is a similar, but opposite option named
  14. 'never_direct'. You need to be aware that "always_direct deny
  15. foo" is NOT the same thing as "never_direct allow foo". You
  16. may need to use a deny rule to exclude a more-specific case of
  17. some other rule. Example:
  18. acl local-external dstdomain external.foo.net
  19. acl local-servers dstdomain .foo.net
  20. always_direct deny local-external
  21. always_direct allow local-servers
  22. NOTE: If your goal is to make the client forward the request
  23. directly to the origin server bypassing Squid then this needs
  24. to be done in the client configuration. Squid configuration
  25. can only tell Squid how Squid should fetch the object.
  26. NOTE: This directive is not related to caching. The replies
  27. is cached as usual even if you use always_direct. To not cache
  28. the replies see no_cache.
  29. This option replaces some v1.1 options such as local_domain
  30. and local_ip.
  31. Default:
  32. none
  1. TAG: never_direct
  2. Usage: never_direct allow|deny [!]aclname ...
  3. never_direct is the opposite of always_direct. Please read
  4. the description for always_direct if you have not already.
  5. With 'never_direct' you can use ACL elements to specify
  6. requests which should NEVER be forwarded directly to origin
  7. servers. For example, to force the use of a proxy for all
  8. requests, except those in your local domain use something like:
  9. acl local-servers dstdomain .foo.net
  10. never_direct deny local-servers
  11. never_direct allow all
  12. or if Squid is inside a firewall and there are local intranet
  13. servers inside the firewall use something like:
  14. acl local-intranet dstdomain .foo.net
  15. acl local-external dstdomain external.foo.net
  16. always_direct deny local-external
  17. always_direct allow local-intranet
  18. never_direct allow all
  19. This option replaces some v1.1 options such as inside_firewall
  20. and firewall_ip.
  21. Default:
  22. none


  1. ADVANCED NETWORKING OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: incoming_icp_average
  2. TAG: incoming_http_average
  3. TAG: incoming_dns_average
  4. TAG: min_icp_poll_cnt
  5. TAG: min_dns_poll_cnt
  6. TAG: min_http_poll_cnt
  7. Heavy voodoo here. I can't even believe you are reading this.
  8. Are you crazy? Don't even think about adjusting these unless
  9. you understand the algorithms in comm_select.c first!
  10. Default:
  11. incoming_icp_average 6
  12. incoming_http_average 4
  13. incoming_dns_average 4
  14. min_icp_poll_cnt 8
  15. min_dns_poll_cnt 8
  16. min_http_poll_cnt 8
  1. TAG: accept_filter
  2. FreeBSD:
  3. The name of an accept(2) filter to install on Squid's
  4. listen socket(s). This feature is perhaps specific to
  5. FreeBSD and requires support in the kernel.
  6. The 'httpready' filter delays delivering new connections
  7. to Squid until a full HTTP request has been received.
  8. See the accf_http(9) man page for details.
  9. The 'dataready' filter delays delivering new connections
  10. to Squid until there is some data to process.
  11. See the accf_dataready(9) man page for details.
  12. Linux:
  13. The 'data' filter delays delivering of new connections
  14. to Squid until there is some data to process by TCP_ACCEPT_DEFER.
  15. You may optionally specify a number of seconds to wait by
  16. 'data=N' where N is the number of seconds. Defaults to 30
  17. if not specified. See the tcp(7) man page for details.
  18. EXAMPLE:
    1. FreeBSD
  19. accept_filter httpready
    1. Linux
  20. accept_filter data
  21. Default:
  22. none
  1. TAG: tcp_recv_bufsize (bytes)
  2. Size of receive buffer to set for TCP sockets. Probably just
  3. as easy to change your kernel's default. Set to zero to use
  4. the default buffer size.
  5. Default:
  6. tcp_recv_bufsize 0 bytes


  1. ICAP OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: icap_enable on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. If you want to enable the ICAP module support, set this to on.
  5. Default:
  6. icap_enable off
  1. TAG: icap_connect_timeout
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. This parameter specifies how long to wait for the TCP connect to
  5. the requested ICAP server to complete before giving up and either
  6. terminating the HTTP transaction or bypassing the failure.
  7. The default for optional services is peer_connect_timeout.
  8. The default for essential services is connect_timeout.
  9. If this option is explicitly set, its value applies to all services.
  10. Default:
  11. none
  1. TAG: icap_io_timeout time-units
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. This parameter specifies how long to wait for an I/O activity on
  5. an established, active ICAP connection before giving up and
  6. either terminating the HTTP transaction or bypassing the
  7. failure.
  8. The default is read_timeout.
  9. Default:
  10. none
  1. TAG: icap_service_failure_limit
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. The limit specifies the number of failures that Squid tolerates
  5. when establishing a new TCP connection with an ICAP service. If
  6. the number of failures exceeds the limit, the ICAP service is
  7. not used for new ICAP requests until it is time to refresh its
  8. OPTIONS. The per-service failure counter is reset to zero each
  9. time Squid fetches new service OPTIONS.
  10. A negative value disables the limit. Without the limit, an ICAP
  11. service will not be considered down due to connectivity failures
  12. between ICAP OPTIONS requests.
  13. Default:
  14. icap_service_failure_limit 10
  1. TAG: icap_service_revival_delay
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. The delay specifies the number of seconds to wait after an ICAP
  5. OPTIONS request failure before requesting the options again. The
  6. failed ICAP service is considered "down" until fresh OPTIONS are
  7. fetched.
  8. The actual delay cannot be smaller than the hardcoded minimum
  9. delay of 30 seconds.
  10. Default:
  11. icap_service_revival_delay 180
  1. TAG: icap_preview_enable on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. The ICAP Preview feature allows the ICAP server to handle the
  5. HTTP message by looking only at the beginning of the message body
  6. or even without receiving the body at all. In some environments,
  7. previews greatly speedup ICAP processing.
  8. During an ICAP OPTIONS transaction, the server may tell Squid what
  9. HTTP messages should be previewed and how big the preview should be.
  10. Squid will not use Preview if the server did not request one.
  11. To disable ICAP Preview for all ICAP services, regardless of
  12. individual ICAP server OPTIONS responses, set this option to "off".
  13. Example:
  14. icap_preview_enable off
  15. Default:
  16. icap_preview_enable on
  1. TAG: icap_preview_size
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. The default size of preview data to be sent to the ICAP server.
  5. -1 means no preview. This value might be overwritten on a per server
  6. basis by OPTIONS requests.
  7. Default:
  8. icap_preview_size -1
  1. TAG: icap_default_options_ttl
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. The default TTL value for ICAP OPTIONS responses that don't have
  5. an Options-TTL header.
  6. Default:
  7. icap_default_options_ttl 60
  1. TAG: icap_persistent_connections on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. Whether or not Squid should use persistent connections to
  5. an ICAP server.
  6. Default:
  7. icap_persistent_connections on
  1. TAG: icap_send_client_ip on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. This adds the header "X-Client-IP" to ICAP requests.
  5. Default:
  6. icap_send_client_ip off
  1. TAG: icap_send_client_username on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. This sends authenticated HTTP client username (if available) to
  5. the ICAP service. The username value is encoded based on the
  6. icap_client_username_encode option and is sent using the header
  7. specified by the icap_client_username_header option.
  8. Default:
  9. icap_send_client_username off
  1. TAG: icap_client_username_header
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. ICAP request header name to use for send_client_username.
  5. Default:
  6. icap_client_username_header X-Client-Username
  1. TAG: icap_client_username_encode on|off
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. Whether to base64 encode the authenticated client username.
  5. Default:
  6. icap_client_username_encode off
  1. TAG: icap_service
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. Defines a single ICAP service
  5. icap_service servicename vectoring_point bypass service_url
  6. vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
  7. This specifies at which point of transaction processing the
  8. ICAP service should be activated. *_postcache vectoring points
  9. are not yet supported.
  10. bypass = 1|0
  11. If set to 1, the ICAP service is treated as optional. If the
  12. service cannot be reached or malfunctions, Squid will try to
  13. ignore any errors and process the message as if the service
  14. was not enabled. No all ICAP errors can be bypassed.
  15. If set to 0, the ICAP service is treated as essential and all
  16. ICAP errors will result in an error page returned to the
  17. HTTP client.
  18. service_url = icap://servername:port/service
  19. Example:
  20. icap_service service_1 reqmod_precache 0 icap://icap1.mydomain.net:1344/reqmod
  21. icap_service service_2 respmod_precache 0 icap://icap2.mydomain.net:1344/respmod
  22. Default:
  23. none
  1. TAG: icap_class
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. Defines an ICAP service chain. Eventually, multiple services per
  5. vectoring point will be supported. For now, please specify a single
  6. service per class:
  7. icap_class classname servicename
  8. Example:
  9. icap_class class_1 service_1
  10. icap class class_2 service_1
  11. icap class class_3 service_3
  12. Default:
  13. none
  1. TAG: icap_access
  2. Note: This option is only available if Squid is rebuilt with the
  3. -DICAP_CLIENT define
  4. Redirects a request through an ICAP service class, depending
  5. on given acls
  6. icap_access classname allow|deny [!]aclname...
  7. The icap_access statements are processed in the order they appear in
  8. this configuration file. If an access list matches, the processing stops.
  9. For an "allow" rule, the specified class is used for the request. A "deny"
  10. rule simply stops processing without using the class. You can also use the
  11. special classname "None".
  12. For backward compatibility, it is also possible to use services
  13. directly here.
  14. Example:
  15. icap_access class_1 allow all
  16. Default:
  17. none


  1. DNS OPTIONS
  2. -----------------------------------------------------------------------------
  1. TAG: check_hostnames
  2. For security and stability reasons Squid can check
  3. hostnames for Internet standard RFC compliance. If you want
  4. Squid to perform these checks turn this directive on.
  5. Default:
  6. check_hostnames off
  1. TAG: allow_underscore
  2. Underscore characters is not strictly allowed in Internet hostnames
  3. but nevertheless used by many sites. Set this to off if you want
  4. Squid to be strict about the standard.
  5. This check is performed only when check_hostnames is set to on.
  6. Default:
  7. allow_underscore on
  1. TAG: cache_dns_program
  2. Note: This option is only available if Squid is rebuilt with the
  3. --disable-internal-dns option
  4. Specify the location of the executable for dnslookup process.
  5. Default:
  6. cache_dns_program /usr/local/squid/libexec/dnsserver
  1. TAG: dns_children
  2. Note: This option is only available if Squid is rebuilt with the
  3. --disable-internal-dns option
  4. The number of processes spawn to service DNS name lookups.
  5. For heavily loaded caches on large servers, you should
  6. probably increase this value to at least 10. The maximum
  7. is 32. The default is 5.
  8. You must have at least one dnsserver process.
  9. Default:
  10. dns_children 5
  1. TAG: dns_retransmit_interval
  2. Initial retransmit interval for DNS queries. The interval is
  3. doubled each time all configured DNS servers have been tried.
  4. Default:
  5. dns_retransmit_interval 5 seconds
  1. TAG: dns_timeout
  2. DNS Query timeout. If no response is received to a DNS query
  3. within this time all DNS servers for the queried domain
  4. are assumed to be unavailable.
  5. Default:
  6. dns_timeout 2 minutes
  1. TAG: dns_defnames on|off
  2. Normally the RES_DEFNAMES resolver option is disabled
  3. (see res_init(3)). This prevents caches in a hierarchy
  4. from interpreting single-component hostnames locally. To allow
  5. Squid to handle single-component names, enable this option.
  6. Default:
  7. dns_defnames off
  1. TAG: dns_nameservers
  2. Use this if you want to specify a list of DNS name servers
  3. (IP addresses) to use instead of those given in your
  4. /etc/resolv.conf file.
  5. On Windows platforms, if no value is specified here or in
  6. the /etc/resolv.conf file, the list of DNS name servers are
  7. taken from the Windows registry, both static and dynamic DHCP
  8. configurations are supported.
  9. Example: dns_nameservers 10.0.0.1 192.172.0.4
  10. Default:
  11. none
  1. TAG: hosts_file
  2. Location of the host-local IP name-address associations
  3. database. Most Operating Systems have such a file on different
  4. default locations:
  5. - Un*X & Linux: /etc/hosts
  6. - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
  7. (%SystemRoot% value install default is c:\winnt)
  8. - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
  9. (%SystemRoot% value install default is c:\windows)
  10. - Windows 9x/Me:  %windir%\hosts
  11. (%windir% value is usually c:\windows)
  12. - Cygwin: /etc/hosts
  13. The file contains newline-separated definitions, in the
  14. form ip_address_in_dotted_form name [name ...] names are
  15. whitespace-separated. Lines beginning with an hash (#)
  16. character are comments.
  17. The file is checked at startup and upon configuration.
  18. If set to 'none', it won't be checked.
  19. If append_domain is used, that domain will be added to
  20. domain-local (i.e. not containing any dot character) host
  21. definitions.
  22. Default:
  23. hosts_file /etc/hosts
  1. TAG: dns_testnames
  2. The DNS tests exit as soon as the first site is successfully looked up
  3. This test can be disabled with the -D command line option.
  4. Default:
  5. dns_testnames netscape.com internic.net nlanr.net microsoft.com
  1. TAG: append_domain
  2. Appends local domain name to hostnames without any dots in
  3. them. append_domain must begin with a period.
  4. Be warned there are now Internet names with no dots in
  5. them using only top-domain names, so setting this may
  6. cause some Internet sites to become unavailable.
  7. Example:
  8. append_domain .yourdomain.com
  9. Default:
  10. none
  1. TAG: ignore_unknown_nameservers
  2. By default Squid checks that DNS responses are received
  3. from the same IP addresses they are sent to. If they
  4. don't match, Squid ignores the response and writes a warning
  5. message to cache.log. You can allow responses from unknown
  6. nameservers by setting this option to 'off'.
  7. Default:
  8. ignore_unknown_nameservers on
  1. TAG: ipcache_size (number of entries)
  2. TAG: ipcache_low (percent)
  3. TAG: ipcache_high (percent)
  4. The size, low-, and high-water marks for the IP cache.
  5. Default:
  6. ipcache_size 1024
  7. ipcache_low 90
  8. ipcache_high 95
  1. TAG: fqdncache_size (number of entries)
  2. Maximum number of FQDN cache entries.
  3. Default:
  4. fqdncache_size 1024


  1. MISCELLANEOUS
  2. -----------------------------------------------------------------------------
  1. TAG: memory_pools on|off
  2. If set, Squid will keep pools of allocated (but unused) memory
  3. available for future use. If memory is a premium on your
  4. system and you believe your malloc library outperforms Squid
  5. routines, disable this.
  6. Default:
  7. memory_pools on
  1. TAG: memory_pools_limit (bytes)
  2. Used only with memory_pools on:
  3. memory_pools_limit 50 MB
  4. If set to a non-zero value, Squid will keep at most the specified
  5. limit of allocated (but unused) memory in memory pools. All free()
  6. requests that exceed this limit will be handled by your malloc
  7. library. Squid does not pre-allocate any memory, just safe-keeps
  8. objects that otherwise would be free()d. Thus, it is safe to set
  9. memory_pools_limit to a reasonably high value even if your
  10. configuration will use less memory.
  11. If set to zero, Squid will keep all memory it can. That is, there
  12. will be no limit on the total amount of memory used for safe-keeping.
  13. To disable memory allocation optimization, do not set
  14. memory_pools_limit to 0. Set memory_pools to "off" instead.
  15. An overhead for maintaining memory pools is not taken into account
  16. when the limit is checked. This overhead is close to four bytes per
  17. object kept. However, pools may actually _save_ memory because of
  18. reduced memory thrashing in your malloc library.
  19. Default:
  20. memory_pools_limit 5 MB
  1. TAG: forwarded_for on|off
  2. If set, Squid will include your system's IP address or name
  3. in the HTTP requests it forwards. By default it looks like
  4. this:
  5. X-Forwarded-For: 192.1.2.3
  6. If you disable this, it will appear as
  7. X-Forwarded-For: unknown
  8. Default:
  9. forwarded_for on
  1. TAG: cachemgr_passwd
  2. Specify passwords for cachemgr operations.
  3. Usage: cachemgr_passwd password action action ...
  4. Some valid actions are (see cache manager menu for a full list):
  5. 5min
  6. 60min
  7. asndb
  8. authenticator
  9. cbdata
  10. client_list
  11. comm_incoming
  12. config *
  13. counters
  14. delay
  15. digest_stats
  16. dns
  17. events
  18. filedescriptors
  19. fqdncache
  20. histograms
  21. http_headers
  22. info
  23. io
  24. ipcache
  25. mem
  26. menu
  27. netdb
  28. non_peers
  29. objects
  30. offline_toggle *
  31. pconn
  32. peer_select
  33. reconfigure *
  34. redirector
  35. refresh
  36. server_list
  37. shutdown *
  38. store_digest
  39. storedir
  40. utilization
  41. via_headers
  42. vm_objects
  43. * Indicates actions which will not be performed without a
  44. valid password, others can be performed if not listed here.
  45. To disable an action, set the password to "disable".
  46. To allow performing an action without a password, set the
  47. password to "none".
  48. Use the keyword "all" to set the same password for all actions.
  49. Example:
  50. cachemgr_passwd secret shutdown
  51. cachemgr_passwd lesssssssecret info stats/objects
  52. cachemgr_passwd disable all
  53. Default:
  54. none
  1. TAG: client_db on|off
  2. If you want to disable collecting per-client statistics,
  3. turn off client_db here.
  4. Default:
  5. client_db on
  1. TAG: refresh_all_ims on|off
  2. When you enable this option, squid will always check
  3. the origin server for an update when a client sends an
  4. If-Modified-Since request. Many browsers use IMS
  5. requests when the user requests a reload, and this
  6. ensures those clients receive the latest version.
  7. By default (off), squid may return a Not Modified response
  8. based on the age of the cached version.
  9. Default:
  10. refresh_all_ims off
  1. TAG: reload_into_ims on|off
  2. When you enable this option, client no-cache or ``reload
  3. requests will be changed to If-Modified-Since requests.
  4. Doing this VIOLATES the HTTP standard. Enabling this
  5. feature could make you liable for problems which it
  6. causes.
  7. see also refresh_pattern for a more selective approach.
  8. Default:
  9. reload_into_ims off
  1. TAG: maximum_single_addr_tries
  2. This sets the maximum number of connection attempts for a
  3. host that only has one address (for multiple-address hosts,
  4. each address is tried once).
  5. The default value is one attempt, the (not recommended)
  6. maximum is 255 tries. A warning message will be generated
  7. if it is set to a value greater than ten.
  8. Note: This is in addition to the request re-forwarding which
  9. takes place if Squid fails to get a satisfying response.
  10. Default:
  11. maximum_single_addr_tries 1
  1. TAG: retry_on_error
  2. If set to on Squid will automatically retry requests when
  3. receiving an error response. This is mainly useful if you
  4. are in a complex cache hierarchy to work around access
  5. control errors.
  6. Default:
  7. retry_on_error off
  1. TAG: as_whois_server
  2. WHOIS server to query for AS numbers. NOTE: AS numbers are
  3. queried only when Squid starts up, not for every request.
  4. Default:
  5. as_whois_server whois.ra.net
  6. as_whois_server whois.ra.net
  1. TAG: offline_mode
  2. Enable this option and Squid will never try to validate cached
  3. objects.
  4. Default:
  5. offline_mode off
  1. TAG: uri_whitespace
  2. What to do with requests that have whitespace characters in the
  3. URI. Options:
  4. strip: The whitespace characters are stripped out of the URL.
  5. This is the behavior recommended by RFC2396.
  6. deny: The request is denied. The user receives an "Invalid
  7. Request" message.
  8. allow: The request is allowed and the URI is not changed. The
  9. whitespace characters remain in the URI. Note the
  10. whitespace is passed to redirector processes if they
  11. are in use.
  12. encode: The request is allowed and the whitespace characters are
  13. encoded according to RFC1738. This could be considered
  14. a violation of the HTTP/1.1
  15. RFC because proxies are not allowed to rewrite URI's.
  16. chop: The request is allowed and the URI is chopped at the
  17. first whitespace. This might also be considered a
  18. violation.
  19. Default:
  20. uri_whitespace strip
  1. TAG: coredump_dir
  2. By default Squid leaves core files in the directory from where
  3. it was started. If you set 'coredump_dir' to a directory
  4. that exists, Squid will chdir() to that directory at startup
  5. and coredump files will be left there.
  6. Default:
  7. coredump_dir none
  8. Leave coredumps in the first cache dir
  9. coredump_dir /usr/local/squid/var/cache
  1. TAG: chroot
  2. Use this to have Squid do a chroot() while initializing. This
  3. also causes Squid to fully drop root privileges after
  4. initializing. This means, for example, if you use a HTTP
  5. port less than 1024 and try to reconfigure, you will may get an
  6. error saying that Squid can not open the port.
  7. Default:
  8. none
  1. TAG: balance_on_multiple_ip
  2. Some load balancing servers based on round robin DNS have been
  3. found not to preserve user session state across requests
  4. to different IP addresses.
  5. By default Squid rotates IP's per request. By disabling
  6. this directive only connection failure triggers rotation.
  7. Default:
  8. balance_on_multiple_ip on
  1. TAG: pipeline_prefetch
  2. To boost the performance of pipelined requests to closer
  3. match that of a non-proxied environment Squid can try to fetch
  4. up to two requests in parallel from a pipeline.
  5. Defaults to off for bandwidth management and access logging
  6. reasons.
  7. Default:
  8. pipeline_prefetch off
  1. TAG: high_response_time_warning (msec)
  2. If the one-minute median response time exceeds this value,
  3. Squid prints a WARNING with debug level 0 to get the
  4. administrators attention. The value is in milliseconds.
  5. Default:
  6. high_response_time_warning 0
  1. TAG: high_page_fault_warning
  2. If the one-minute average page fault rate exceeds this
  3. value, Squid prints a WARNING with debug level 0 to get
  4. the administrators attention. The value is in page faults
  5. per second.
  6. Default:
  7. high_page_fault_warning 0
  1. TAG: high_memory_warning
  2. If the memory usage (as determined by mallinfo) exceeds
  3. this amount, Squid prints a WARNING with debug level 0 to get
  4. the administrators attention.
  5. Default:
  6. high_memory_warning 0 KB
  1. TAG: sleep_after_fork (microseconds)
  2. When this is set to a non-zero value, the main Squid process
  3. sleeps the specified number of microseconds after a fork()
  4. system call. This sleep may help the situation where your
  5. system reports fork() failures due to lack of (virtual)
  6. memory. Note, however, if you have a lot of child
  7. processes, these sleep delays will add up and your
  8. Squid will not service requests for some amount of time
  9. until all the child processes have been started.
  10. On Windows value less then 1000 (1 milliseconds) are
  11. rounded to 1000.
  12. Default:
  13. sleep_after_fork 0
  1. TAG: windows_ipaddrchangemonitor on|off
  2. On Windows Squid by default will monitor IP address changes and will
  3. reconfigure itself after any detected event. This is very useful for
  4. proxies connected to internet with dial-up interfaces.
  5. In some cases (a Proxy server acting as VPN gateway is one) it could be
  6. desiderable to disable this behaviour setting this to 'off'.
  7. Note: after changing this, Squid service must be restarted.
  8. Default:
  9. windows_ipaddrchangemonitor on
Personal tools
Router software releases