]> git.ipfire.org Git - thirdparty/squid.git/blame - src/cf.data.pre
Bug 2794: ESI parsing fails on FreeBSD
[thirdparty/squid.git] / src / cf.data.pre
CommitLineData
9cef6668 1#
6845f129 2# SQUID Web Proxy Cache http://www.squid-cache.org/
9cef6668 3# ----------------------------------------------------------
4#
2b6662ba 5# Squid is the result of efforts by numerous individuals from
6# the Internet community; see the CONTRIBUTORS file for full
7# details. Many organizations have provided support for Squid's
8# development; see the SPONSORS file for full details. Squid is
9# Copyrighted (C) 2000 by the Regents of the University of
10# California; see the COPYRIGHT file for full details. Squid
11# incorporates software developed and/or copyrighted by other
12# sources; see the CREDITS file for full details.
9cef6668 13#
14# This program is free software; you can redistribute it and/or modify
15# it under the terms of the GNU General Public License as published by
16# the Free Software Foundation; either version 2 of the License, or
17# (at your option) any later version.
96d88dcb 18#
9cef6668 19# This program is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22# GNU General Public License for more details.
96d88dcb 23#
9cef6668 24# You should have received a copy of the GNU General Public License
25# along with this program; if not, write to the Free Software
26# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
27#
28
0f74202c 29COMMENT_START
ad12fb4b 30 WELCOME TO @SQUID@
cccac0a2 31 ----------------------------
3a278cb8 32
cccac0a2 33 This is the default Squid configuration file. You may wish
34 to look at the Squid home page (http://www.squid-cache.org/)
35 for the FAQ and other documentation.
3a278cb8 36
cccac0a2 37 The default Squid config file shows what the defaults for
38 various options happen to be. If you don't need to change the
39 default, you shouldn't uncomment the line. Doing so may cause
40 run-time problems. In some cases "none" refers to no default
41 setting at all, while in other cases it refers to a valid
42 option - the comments for that keyword indicate if this is the
43 case.
debd9a31 44
cccac0a2 45COMMENT_END
3a278cb8 46
592a09dc 47COMMENT_START
48 Configuration options can be included using the "include" directive.
49 Include takes a list of files to include. Quoting and wildcards is
50 supported.
51
52 For example,
53
54 include /path/to/included/file/squid.acl.config
55
56 Includes can be nested up to a hard-coded depth of 16 levels.
57 This arbitrary restriction is to prevent recursive include references
58 from causing Squid entering an infinite loop whilst trying to load
59 configuration files.
60COMMENT_END
61
5473c134 62COMMENT_START
41bd17a4 63 OPTIONS FOR AUTHENTICATION
5473c134 64 -----------------------------------------------------------------------------
65COMMENT_END
66
41bd17a4 67NAME: auth_param
68TYPE: authparam
69LOC: Config.authConfiguration
cccac0a2 70DEFAULT: none
71DOC_START
41bd17a4 72 This is used to define parameters for the various authentication
73 schemes supported by Squid.
cccac0a2 74
41bd17a4 75 format: auth_param scheme parameter [setting]
cccac0a2 76
41bd17a4 77 The order in which authentication schemes are presented to the client is
78 dependent on the order the scheme first appears in config file. IE
79 has a bug (it's not RFC 2617 compliant) in that it will use the basic
80 scheme if basic is the first entry presented, even if more secure
81 schemes are presented. For now use the order in the recommended
82 settings section below. If other browsers have difficulties (don't
83 recognize the schemes offered even if you are using basic) either
84 put basic first, or disable the other schemes (by commenting out their
85 program entry).
cccac0a2 86
41bd17a4 87 Once an authentication scheme is fully configured, it can only be
88 shutdown by shutting squid down and restarting. Changes can be made on
89 the fly and activated with a reconfigure. I.E. You can change to a
90 different helper, but not unconfigure the helper completely.
cccac0a2 91
41bd17a4 92 Please note that while this directive defines how Squid processes
93 authentication it does not automatically activate authentication.
94 To use authentication you must in addition make use of ACLs based
95 on login name in http_access (proxy_auth, proxy_auth_regex or
96 external with %LOGIN used in the format tag). The browser will be
97 challenged for authentication on the first such acl encountered
98 in http_access processing and will also be re-challenged for new
99 login credentials if the request is being denied by a proxy_auth
100 type acl.
cccac0a2 101
41bd17a4 102 WARNING: authentication can't be used in a transparently intercepting
103 proxy as the client then thinks it is talking to an origin server and
104 not the proxy. This is a limitation of bending the TCP/IP protocol to
105 transparently intercepting port 80, not a limitation in Squid.
b3567eb5
FC
106 Ports flagged 'transparent', 'intercept', or 'tproxy' have
107 authentication disabled.
cccac0a2 108
41bd17a4 109 === Parameters for the basic scheme follow. ===
cccac0a2 110
41bd17a4 111 "program" cmdline
112 Specify the command for the external authenticator. Such a program
113 reads a line containing "username password" and replies "OK" or
114 "ERR" in an endless loop. "ERR" responses may optionally be followed
115 by a error description available as %m in the returned error page.
b3567eb5
FC
116 If you use an authenticator, make sure you have 1 acl of type
117 proxy_auth.
cccac0a2 118
41bd17a4 119 By default, the basic authentication scheme is not used unless a
120 program is specified.
cccac0a2 121
41bd17a4 122 If you want to use the traditional NCSA proxy authentication, set
123 this line to something like
307b83b7 124
41bd17a4 125 auth_param basic program @DEFAULT_PREFIX@/libexec/ncsa_auth @DEFAULT_PREFIX@/etc/passwd
9e7dbc51 126
d2a89ac1
AJ
127 "utf8" on|off
128 HTTP uses iso-latin-1 as characterset, while some authentication
129 backends such as LDAP expects UTF-8. If this is set to on Squid will
130 translate the HTTP iso-latin-1 charset to UTF-8 before sending the
131 username & password to the helper.
132
41bd17a4 133 "children" numberofchildren
134 The number of authenticator processes to spawn. If you start too few
135 Squid will have to wait for them to process a backlog of credential
136 verifications, slowing it down. When password verifications are
137 done via a (slow) network you are likely to need lots of
138 authenticator processes.
139 auth_param basic children 5
9e7dbc51 140
41bd17a4 141 "concurrency" concurrency
142 The number of concurrent requests the helper can process.
143 The default of 0 is used for helpers who only supports
144 one request at a time. Setting this changes the protocol used to
145 include a channel number first on the request/response line, allowing
146 multiple requests to be sent to the same helper in parallell without
147 wating for the response.
148 Must not be set unless it's known the helper supports this.
149 auth_param basic concurrency 0
0fdafae7 150
41bd17a4 151 "realm" realmstring
152 Specifies the realm name which is to be reported to the
153 client for the basic proxy authentication scheme (part of
154 the text the user will see when prompted their username and
155 password). There is no default.
156 auth_param basic realm Squid proxy-caching web server
d1b63fc8 157
41bd17a4 158 "credentialsttl" timetolive
159 Specifies how long squid assumes an externally validated
160 username:password pair is valid for - in other words how
161 often the helper program is called for that user. Set this
162 low to force revalidation with short lived passwords. Note
163 setting this high does not impact your susceptibility
164 to replay attacks unless you are using an one-time password
165 system (such as SecureID). If you are using such a system,
166 you will be vulnerable to replay attacks unless you also
167 use the max_user_ip ACL in an http_access rule.
cccac0a2 168
41bd17a4 169 "casesensitive" on|off
170 Specifies if usernames are case sensitive. Most user databases are
171 case insensitive allowing the same username to be spelled using both
172 lower and upper case letters, but some are case sensitive. This
173 makes a big difference for user_max_ip ACL processing and similar.
174 auth_param basic casesensitive off
cccac0a2 175
41bd17a4 176 === Parameters for the digest scheme follow ===
cccac0a2 177
41bd17a4 178 "program" cmdline
179 Specify the command for the external authenticator. Such
180 a program reads a line containing "username":"realm" and
181 replies with the appropriate H(A1) value hex encoded or
182 ERR if the user (or his H(A1) hash) does not exists.
183 See rfc 2616 for the definition of H(A1).
184 "ERR" responses may optionally be followed by a error description
185 available as %m in the returned error page.
cccac0a2 186
41bd17a4 187 By default, the digest authentication scheme is not used unless a
188 program is specified.
b8c0c06d 189
41bd17a4 190 If you want to use a digest authenticator, set this line to
191 something like
cccac0a2 192
7ce93108 193 auth_param digest program @DEFAULT_PREFIX@/bin/digest_pw_auth @DEFAULT_PREFIX@/etc/digpass
cccac0a2 194
d2a89ac1
AJ
195 "utf8" on|off
196 HTTP uses iso-latin-1 as characterset, while some authentication
197 backends such as LDAP expects UTF-8. If this is set to on Squid will
198 translate the HTTP iso-latin-1 charset to UTF-8 before sending the
199 username & password to the helper.
200
41bd17a4 201 "children" numberofchildren
202 The number of authenticator processes to spawn (no default).
203 If you start too few Squid will have to wait for them to
204 process a backlog of H(A1) calculations, slowing it down.
205 When the H(A1) calculations are done via a (slow) network
206 you are likely to need lots of authenticator processes.
207 auth_param digest children 5
cccac0a2 208
41bd17a4 209 "realm" realmstring
210 Specifies the realm name which is to be reported to the
211 client for the digest proxy authentication scheme (part of
212 the text the user will see when prompted their username and
213 password). There is no default.
214 auth_param digest realm Squid proxy-caching web server
cccac0a2 215
41bd17a4 216 "nonce_garbage_interval" timeinterval
217 Specifies the interval that nonces that have been issued
218 to client_agent's are checked for validity.
cccac0a2 219
41bd17a4 220 "nonce_max_duration" timeinterval
221 Specifies the maximum length of time a given nonce will be
222 valid for.
cccac0a2 223
41bd17a4 224 "nonce_max_count" number
225 Specifies the maximum number of times a given nonce can be
226 used.
cccac0a2 227
41bd17a4 228 "nonce_strictness" on|off
229 Determines if squid requires strict increment-by-1 behavior
230 for nonce counts, or just incrementing (off - for use when
231 useragents generate nonce counts that occasionally miss 1
232 (ie, 1,2,4,6)). Default off.
cccac0a2 233
41bd17a4 234 "check_nonce_count" on|off
235 This directive if set to off can disable the nonce count check
236 completely to work around buggy digest qop implementations in
237 certain mainstream browser versions. Default on to check the
238 nonce count to protect from authentication replay attacks.
cccac0a2 239
41bd17a4 240 "post_workaround" on|off
241 This is a workaround to certain buggy browsers who sends
242 an incorrect request digest in POST requests when reusing
243 the same nonce as acquired earlier on a GET request.
cccac0a2 244
41bd17a4 245 === NTLM scheme options follow ===
cccac0a2 246
41bd17a4 247 "program" cmdline
248 Specify the command for the external NTLM authenticator.
249 Such a program reads exchanged NTLMSSP packets with
250 the browser via Squid until authentication is completed.
251 If you use an NTLM authenticator, make sure you have 1 acl
252 of type proxy_auth. By default, the NTLM authenticator_program
253 is not used.
cccac0a2 254
41bd17a4 255 auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth
cccac0a2 256
41bd17a4 257 "children" numberofchildren
258 The number of authenticator processes to spawn (no default).
259 If you start too few Squid will have to wait for them to
260 process a backlog of credential verifications, slowing it
261 down. When credential verifications are done via a (slow)
262 network you are likely to need lots of authenticator
263 processes.
cccac0a2 264
41bd17a4 265 auth_param ntlm children 5
cccac0a2 266
41bd17a4 267 "keep_alive" on|off
268 If you experience problems with PUT/POST requests when using the
269 Negotiate authentication scheme then you can try setting this to
270 off. This will cause Squid to forcibly close the connection on
271 the initial requests where the browser asks which schemes are
272 supported by the proxy.
cccac0a2 273
41bd17a4 274 auth_param ntlm keep_alive on
cccac0a2 275
41bd17a4 276 === Options for configuring the NEGOTIATE auth-scheme follow ===
cccac0a2 277
41bd17a4 278 "program" cmdline
279 Specify the command for the external Negotiate authenticator.
280 This protocol is used in Microsoft Active-Directory enabled setups with
281 the Microsoft Internet Explorer or Mozilla Firefox browsers.
282 Its main purpose is to exchange credentials with the Squid proxy
283 using the Kerberos mechanisms.
b3567eb5
FC
284 If you use a Negotiate authenticator, make sure you have at least
285 one acl of type proxy_auth active. By default, the negotiate
286 authenticator_program is not used.
41bd17a4 287 The only supported program for this role is the ntlm_auth
288 program distributed as part of Samba, version 4 or later.
cccac0a2 289
41bd17a4 290 auth_param negotiate program @DEFAULT_PREFIX@/bin/ntlm_auth --helper-protocol=gss-spnego
cccac0a2 291
41bd17a4 292 "children" numberofchildren
293 The number of authenticator processes to spawn (no default).
294 If you start too few Squid will have to wait for them to
295 process a backlog of credential verifications, slowing it
296 down. When crendential verifications are done via a (slow)
297 network you are likely to need lots of authenticator
298 processes.
299 auth_param negotiate children 5
d3803853 300
41bd17a4 301 "keep_alive" on|off
302 If you experience problems with PUT/POST requests when using the
303 Negotiate authentication scheme then you can try setting this to
304 off. This will cause Squid to forcibly close the connection on
305 the initial requests where the browser asks which schemes are
306 supported by the proxy.
527ee50d 307
41bd17a4 308 auth_param negotiate keep_alive on
cccac0a2 309
e0855596
AJ
310
311 Examples:
312
41bd17a4 313#Recommended minimum configuration per scheme:
314#auth_param negotiate program <uncomment and complete this line to activate>
315#auth_param negotiate children 5
316#auth_param negotiate keep_alive on
e0855596 317#
41bd17a4 318#auth_param ntlm program <uncomment and complete this line to activate>
319#auth_param ntlm children 5
320#auth_param ntlm keep_alive on
e0855596 321#
41bd17a4 322#auth_param digest program <uncomment and complete this line>
323#auth_param digest children 5
324#auth_param digest realm Squid proxy-caching web server
325#auth_param digest nonce_garbage_interval 5 minutes
326#auth_param digest nonce_max_duration 30 minutes
327#auth_param digest nonce_max_count 50
e0855596 328#
41bd17a4 329#auth_param basic program <uncomment and complete this line>
330#auth_param basic children 5
331#auth_param basic realm Squid proxy-caching web server
332#auth_param basic credentialsttl 2 hours
41bd17a4 333DOC_END
cccac0a2 334
41bd17a4 335NAME: authenticate_cache_garbage_interval
336TYPE: time_t
337DEFAULT: 1 hour
338LOC: Config.authenticateGCInterval
339DOC_START
340 The time period between garbage collection across the username cache.
341 This is a tradeoff between memory utilization (long intervals - say
342 2 days) and CPU (short intervals - say 1 minute). Only change if you
343 have good reason to.
344DOC_END
cccac0a2 345
41bd17a4 346NAME: authenticate_ttl
347TYPE: time_t
348DEFAULT: 1 hour
349LOC: Config.authenticateTTL
350DOC_START
351 The time a user & their credentials stay in the logged in
352 user cache since their last request. When the garbage
353 interval passes, all user credentials that have passed their
354 TTL are removed from memory.
355DOC_END
cccac0a2 356
41bd17a4 357NAME: authenticate_ip_ttl
358TYPE: time_t
359LOC: Config.authenticateIpTTL
360DEFAULT: 0 seconds
361DOC_START
362 If you use proxy authentication and the 'max_user_ip' ACL,
363 this directive controls how long Squid remembers the IP
364 addresses associated with each user. Use a small value
365 (e.g., 60 seconds) if your users might change addresses
366 quickly, as is the case with dialups. You might be safe
367 using a larger value (e.g., 2 hours) in a corporate LAN
368 environment with relatively static address assignments.
369DOC_END
cccac0a2 370
3d1e3e43 371COMMENT_START
372 ACCESS CONTROLS
373 -----------------------------------------------------------------------------
374COMMENT_END
375
41bd17a4 376NAME: external_acl_type
377TYPE: externalAclHelper
378LOC: Config.externalAclHelperList
cccac0a2 379DEFAULT: none
cccac0a2 380DOC_START
41bd17a4 381 This option defines external acl classes using a helper program
382 to look up the status
cccac0a2 383
41bd17a4 384 external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
cccac0a2 385
41bd17a4 386 Options:
cccac0a2 387
41bd17a4 388 ttl=n TTL in seconds for cached results (defaults to 3600
389 for 1 hour)
390 negative_ttl=n
391 TTL for cached negative lookups (default same
392 as ttl)
393 children=n Number of acl helper processes spawn to service
394 external acl lookups of this type. (default 5)
395 concurrency=n concurrency level per process. Only used with helpers
396 capable of processing more than one query at a time.
397 cache=n result cache size, 0 is unbounded (default)
398 grace=n Percentage remaining of TTL where a refresh of a
399 cached entry should be initiated without needing to
400 wait for a new reply. (default 0 for no grace period)
401 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
cc192b50 402 ipv4 / ipv6 IP-mode used to communicate to this helper.
403 For compatability with older configurations and helpers
1de68cc1 404 the default is 'ipv4'.
cccac0a2 405
41bd17a4 406 FORMAT specifications
cccac0a2 407
41bd17a4 408 %LOGIN Authenticated user login name
409 %EXT_USER Username from external acl
410 %IDENT Ident user name
411 %SRC Client IP
412 %SRCPORT Client source port
413 %URI Requested URI
414 %DST Requested host
415 %PROTO Requested protocol
416 %PORT Requested port
417 %PATH Requested URL path
418 %METHOD Request method
419 %MYADDR Squid interface address
420 %MYPORT Squid http_port number
421 %PATH Requested URL-path (including query-string if any)
422 %USER_CERT SSL User certificate in PEM format
423 %USER_CERTCHAIN SSL User certificate chain in PEM format
424 %USER_CERT_xx SSL User certificate subject attribute xx
425 %USER_CA_xx SSL User certificate issuer attribute xx
7b0ca1e8 426
c68c9682 427 %>{Header} HTTP request header "Header"
7b0ca1e8 428 %>{Hdr:member}
c68c9682 429 HTTP request header "Hdr" list member "member"
7b0ca1e8 430 %>{Hdr:;member}
41bd17a4 431 HTTP request header list member using ; as
432 list separator. ; can be any non-alphanumeric
433 character.
cccac0a2 434
c68c9682 435 %<{Header} HTTP reply header "Header"
7b0ca1e8 436 %<{Hdr:member}
c68c9682 437 HTTP reply header "Hdr" list member "member"
7b0ca1e8
AJ
438 %<{Hdr:;member}
439 HTTP reply header list member using ; as
440 list separator. ; can be any non-alphanumeric
441 character.
442
41bd17a4 443 In addition to the above, any string specified in the referencing
444 acl will also be included in the helper request line, after the
445 specified formats (see the "acl external" directive)
cccac0a2 446
41bd17a4 447 The helper receives lines per the above format specification,
448 and returns lines starting with OK or ERR indicating the validity
449 of the request and optionally followed by additional keywords with
450 more details.
cccac0a2 451
41bd17a4 452 General result syntax:
cccac0a2 453
41bd17a4 454 OK/ERR keyword=value ...
cccac0a2 455
41bd17a4 456 Defined keywords:
cccac0a2 457
41bd17a4 458 user= The users name (login)
459 password= The users password (for login= cache_peer option)
460 message= Message describing the reason. Available as %o
461 in error pages
462 tag= Apply a tag to a request (for both ERR and OK results)
463 Only sets a tag, does not alter existing tags.
464 log= String to be logged in access.log. Available as
465 %ea in logformat specifications
934b03fc 466
41bd17a4 467 If protocol=3.0 (the default) then URL escaping is used to protect
468 each value in both requests and responses.
6a566b9c 469
41bd17a4 470 If using protocol=2.5 then all values need to be enclosed in quotes
471 if they may contain whitespace, or the whitespace escaped using \.
472 And quotes or \ characters within the keyword value must be \ escaped.
1e5562e3 473
41bd17a4 474 When using the concurrency= option the protocol is changed by
475 introducing a query channel tag infront of the request/response.
476 The query channel tag is a number between 0 and concurrency-1.
cccac0a2 477DOC_END
478
41bd17a4 479NAME: acl
480TYPE: acl
481LOC: Config.aclList
1f5bd0a4 482DEFAULT: all src all
cccac0a2 483DOC_START
41bd17a4 484 Defining an Access List
cccac0a2 485
375eeb3b
AJ
486 Every access list definition must begin with an aclname and acltype,
487 followed by either type-specific arguments or a quoted filename that
488 they are read from.
cccac0a2 489
375eeb3b
AJ
490 acl aclname acltype argument ...
491 acl aclname acltype "file" ...
cccac0a2 492
375eeb3b 493 When using "file", the file should contain one item per line.
cccac0a2 494
41bd17a4 495 By default, regular expressions are CASE-SENSITIVE. To make
496 them case-insensitive, use the -i option.
cccac0a2 497
b3567eb5
FC
498 Some acl types require suspending the current request in order
499 to access some external data source.
500 Those which do are marked with the tag [slow], those which
501 don't are marked as [fast].
502 See http://wiki.squid-cache.org/SquidFaq/SquidAcl
503 for further information
e988aa40
AJ
504
505 ***** ACL TYPES AVAILABLE *****
506
b3567eb5
FC
507 acl aclname src ip-address/netmask ... # clients IP address [fast]
508 acl aclname src addr1-addr2/netmask ... # range of addresses [fast]
509 acl aclname dst ip-address/netmask ... # URL host's IP address [slow]
510 acl aclname myip ip-address/netmask ... # local socket IP address [fast]
cccac0a2 511
41bd17a4 512 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
513 # The arp ACL requires the special configure option --enable-arp-acl.
514 # Furthermore, the ARP ACL code is not portable to all operating systems.
b3567eb5
FC
515 # It works on Linux, Solaris, Windows, FreeBSD, and some
516 # other *BSD variants.
517 # [fast]
41bd17a4 518 #
519 # NOTE: Squid can only determine the MAC address for clients that are on
b3567eb5
FC
520 # the same subnet. If the client is on a different subnet,
521 # then Squid cannot find out its MAC address.
522
523 acl aclname srcdomain .foo.com ...
524 # reverse lookup, from client IP [slow]
525 acl aclname dstdomain .foo.com ...
e38c7724 526 # Destination server from URL [fast]
b3567eb5
FC
527 acl aclname srcdom_regex [-i] \.foo\.com ...
528 # regex matching client name [slow]
529 acl aclname dstdom_regex [-i] \.foo\.com ...
e38c7724 530 # regex matching server [fast]
b3567eb5 531 #
41bd17a4 532 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
533 # based URL is used and no match is found. The name "none" is used
534 # if the reverse lookup fails.
9bc73deb 535
375eeb3b
AJ
536 acl aclname src_as number ...
537 acl aclname dst_as number ...
b3567eb5 538 # [fast]
e988aa40
AJ
539 # Except for access control, AS numbers can be used for
540 # routing of requests to specific caches. Here's an
541 # example for routing all requests for AS#1241 and only
542 # those to mycache.mydomain.net:
543 # acl asexample dst_as 1241
544 # cache_peer_access mycache.mydomain.net allow asexample
545 # cache_peer_access mycache_mydomain.net deny all
7f7db318 546
6db78a1a 547 acl aclname peername myPeer ...
b3567eb5 548 # [fast]
6db78a1a
AJ
549 # match against a named cache_peer entry
550 # set unique name= on cache_peer lines for reliable use.
551
375eeb3b 552 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
b3567eb5 553 # [fast]
375eeb3b
AJ
554 # day-abbrevs:
555 # S - Sunday
556 # M - Monday
557 # T - Tuesday
558 # W - Wednesday
559 # H - Thursday
560 # F - Friday
561 # A - Saturday
562 # h1:m1 must be less than h2:m2
563
b3567eb5
FC
564 acl aclname url_regex [-i] ^http:// ...
565 # regex matching on whole URL [fast]
566 acl aclname urlpath_regex [-i] \.gif$ ...
567 # regex matching on URL path [fast]
e988aa40 568
b3567eb5
FC
569 acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
570 # ranges are alloed
571 acl aclname myport 3128 ... # local socket TCP port [fast]
572 acl aclname myportname 3128 ... # http(s)_port name [fast]
e988aa40 573
b3567eb5
FC
574 acl aclname proto HTTP FTP ... # request protocol [fast]
575
576 acl aclname method GET POST ... # HTTP request method [fast]
e988aa40 577
b3567eb5
FC
578 acl aclname http_status 200 301 500- 400-403 ...
579 # status code in reply [fast]
e988aa40 580
375eeb3b 581 acl aclname browser [-i] regexp ...
b3567eb5 582 # pattern match on User-Agent header (see also req_header below) [fast]
e988aa40 583
375eeb3b 584 acl aclname referer_regex [-i] regexp ...
b3567eb5 585 # pattern match on Referer header [fast]
41bd17a4 586 # Referer is highly unreliable, so use with care
e988aa40 587
375eeb3b 588 acl aclname ident username ...
41bd17a4 589 acl aclname ident_regex [-i] pattern ...
b3567eb5 590 # string match on ident output [slow]
41bd17a4 591 # use REQUIRED to accept any non-null ident.
cf5cc17e 592
41bd17a4 593 acl aclname proxy_auth [-i] username ...
594 acl aclname proxy_auth_regex [-i] pattern ...
b3567eb5
FC
595 # perform http authentication challenge to the client and match against
596 # supplied credentials [slow]
597 #
598 # takes a list of allowed usernames.
41bd17a4 599 # use REQUIRED to accept any valid username.
600 #
b3567eb5
FC
601 # Will use proxy authentication in forward-proxy scenarios, and plain
602 # http authenticaiton in reverse-proxy scenarios
603 #
41bd17a4 604 # NOTE: when a Proxy-Authentication header is sent but it is not
605 # needed during ACL checking the username is NOT logged
606 # in access.log.
607 #
608 # NOTE: proxy_auth requires a EXTERNAL authentication program
609 # to check username/password combinations (see
610 # auth_param directive).
611 #
e988aa40
AJ
612 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
613 # as the browser needs to be configured for using a proxy in order
41bd17a4 614 # to respond to proxy authentication.
8e8d4f30 615
41bd17a4 616 acl aclname snmp_community string ...
b3567eb5 617 # A community string to limit access to your SNMP Agent [fast]
41bd17a4 618 # Example:
619 #
620 # acl snmppublic snmp_community public
934b03fc 621
41bd17a4 622 acl aclname maxconn number
623 # This will be matched when the client's IP address has
b3567eb5 624 # more than <number> HTTP connections established. [fast]
1e5562e3 625
41bd17a4 626 acl aclname max_user_ip [-s] number
627 # This will be matched when the user attempts to log in from more
628 # than <number> different ip addresses. The authenticate_ip_ttl
b3567eb5 629 # parameter controls the timeout on the ip entries. [fast]
41bd17a4 630 # If -s is specified the limit is strict, denying browsing
631 # from any further IP addresses until the ttl has expired. Without
632 # -s Squid will just annoy the user by "randomly" denying requests.
633 # (the counter is reset each time the limit is reached and a
634 # request is denied)
635 # NOTE: in acceleration mode or where there is mesh of child proxies,
636 # clients may appear to come from multiple addresses if they are
637 # going through proxy farms, so a limit of 1 may cause user problems.
cccac0a2 638
375eeb3b 639 acl aclname req_mime_type [-i] mime-type ...
41bd17a4 640 # regex match against the mime type of the request generated
641 # by the client. Can be used to detect file upload or some
b3567eb5 642 # types HTTP tunneling requests [fast]
41bd17a4 643 # NOTE: This does NOT match the reply. You cannot use this
644 # to match the returned file type.
cccac0a2 645
41bd17a4 646 acl aclname req_header header-name [-i] any\.regex\.here
647 # regex match against any of the known request headers. May be
648 # thought of as a superset of "browser", "referer" and "mime-type"
b3567eb5 649 # ACL [fast]
cccac0a2 650
375eeb3b 651 acl aclname rep_mime_type [-i] mime-type ...
41bd17a4 652 # regex match against the mime type of the reply received by
653 # squid. Can be used to detect file download or some
b3567eb5 654 # types HTTP tunneling requests. [fast]
41bd17a4 655 # NOTE: This has no effect in http_access rules. It only has
656 # effect in rules that affect the reply data stream such as
657 # http_reply_access.
cccac0a2 658
41bd17a4 659 acl aclname rep_header header-name [-i] any\.regex\.here
660 # regex match against any of the known reply headers. May be
661 # thought of as a superset of "browser", "referer" and "mime-type"
b3567eb5 662 # ACLs [fast]
cccac0a2 663
375eeb3b 664 acl aclname external class_name [arguments...]
41bd17a4 665 # external ACL lookup via a helper class defined by the
b3567eb5 666 # external_acl_type directive [slow]
cccac0a2 667
41bd17a4 668 acl aclname user_cert attribute values...
669 # match against attributes in a user SSL certificate
b3567eb5 670 # attribute is one of DN/C/O/CN/L/ST [fast]
cccac0a2 671
41bd17a4 672 acl aclname ca_cert attribute values...
673 # match against attributes a users issuing CA SSL certificate
b3567eb5 674 # attribute is one of DN/C/O/CN/L/ST [fast]
cccac0a2 675
41bd17a4 676 acl aclname ext_user username ...
677 acl aclname ext_user_regex [-i] pattern ...
b3567eb5 678 # string match on username returned by external acl helper [slow]
41bd17a4 679 # use REQUIRED to accept any non-null user name.
b3567eb5 680
0ab50441 681 acl aclname tag tagvalue ...
b3567eb5 682 # string match on tag returned by external acl helper [slow]
cccac0a2 683
bbaf2685
AJ
684 acl aclname hier_code codename ...
685 # string match against squid hierarchy code(s); [fast]
686 # e.g., DIRECT, PARENT_HIT, NONE, etc.
687 #
688 # NOTE: This has no effect in http_access rules. It only has
689 # effect in rules that affect the reply data stream such as
690 # http_reply_access.
691
e0855596
AJ
692 Examples:
693 acl macaddress arp 09:00:2b:23:45:67
694 acl myexample dst_as 1241
695 acl password proxy_auth REQUIRED
696 acl fileupload req_mime_type -i ^multipart/form-data$
697 acl javascript rep_mime_type -i ^application/x-javascript$
cccac0a2 698
41bd17a4 699NOCOMMENT_START
e0855596
AJ
700#
701# Recommended minimum configuration:
702#
41bd17a4 703acl manager proto cache_object
ee776778 704acl localhost src 127.0.0.1/32
7f83a5f6 705acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
e0855596 706
ee776778 707# Example rule allowing access from your local networks.
708# Adapt to list your (internal) IP networks from where browsing
709# should be allowed
710acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
711acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
712acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
e0855596 713
41bd17a4 714acl SSL_ports port 443
715acl Safe_ports port 80 # http
716acl Safe_ports port 21 # ftp
717acl Safe_ports port 443 # https
718acl Safe_ports port 70 # gopher
719acl Safe_ports port 210 # wais
720acl Safe_ports port 1025-65535 # unregistered ports
721acl Safe_ports port 280 # http-mgmt
722acl Safe_ports port 488 # gss-http
723acl Safe_ports port 591 # filemaker
724acl Safe_ports port 777 # multiling http
725acl CONNECT method CONNECT
726NOCOMMENT_END
727DOC_END
cccac0a2 728
3d674977
AJ
729NAME: follow_x_forwarded_for
730TYPE: acl_access
731IFDEF: FOLLOW_X_FORWARDED_FOR
732LOC: Config.accessList.followXFF
733DEFAULT: none
734DEFAULT_IF_NONE: deny all
735DOC_START
736 Allowing or Denying the X-Forwarded-For header to be followed to
737 find the original source of a request.
738
739 Requests may pass through a chain of several other proxies
740 before reaching us. The X-Forwarded-For header will contain a
741 comma-separated list of the IP addresses in the chain, with the
742 rightmost address being the most recent.
743
744 If a request reaches us from a source that is allowed by this
745 configuration item, then we consult the X-Forwarded-For header
746 to see where that host received the request from. If the
747 X-Forwarded-For header contains multiple addresses, and if
748 acl_uses_indirect_client is on, then we continue backtracking
749 until we reach an address for which we are not allowed to
750 follow the X-Forwarded-For header, or until we reach the first
751 address in the list. (If acl_uses_indirect_client is off, then
752 it's impossible to backtrack through more than one level of
753 X-Forwarded-For addresses.)
754
755 The end result of this process is an IP address that we will
756 refer to as the indirect client address. This address may
757 be treated as the client address for access control, delay
758 pools and logging, depending on the acl_uses_indirect_client,
759 delay_pool_uses_indirect_client and log_uses_indirect_client
760 options.
761
b3567eb5
FC
762 This clause only supports fast acl types.
763 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
764
3d674977
AJ
765 SECURITY CONSIDERATIONS:
766
767 Any host for which we follow the X-Forwarded-For header
768 can place incorrect information in the header, and Squid
769 will use the incorrect information as if it were the
770 source address of the request. This may enable remote
771 hosts to bypass any access control restrictions that are
772 based on the client's source addresses.
773
774 For example:
775
776 acl localhost src 127.0.0.1
777 acl my_other_proxy srcdomain .proxy.example.com
778 follow_x_forwarded_for allow localhost
779 follow_x_forwarded_for allow my_other_proxy
780DOC_END
781
782NAME: acl_uses_indirect_client
783COMMENT: on|off
784TYPE: onoff
785IFDEF: FOLLOW_X_FORWARDED_FOR
786DEFAULT: on
787LOC: Config.onoff.acl_uses_indirect_client
788DOC_START
789 Controls whether the indirect client address
790 (see follow_x_forwarded_for) is used instead of the
791 direct client address in acl matching.
792DOC_END
793
794NAME: delay_pool_uses_indirect_client
795COMMENT: on|off
796TYPE: onoff
97a616ca 797IFDEF: FOLLOW_X_FORWARDED_FOR DELAY_POOLS
3d674977
AJ
798DEFAULT: on
799LOC: Config.onoff.delay_pool_uses_indirect_client
800DOC_START
801 Controls whether the indirect client address
802 (see follow_x_forwarded_for) is used instead of the
803 direct client address in delay pools.
804DOC_END
805
806NAME: log_uses_indirect_client
807COMMENT: on|off
808TYPE: onoff
809IFDEF: FOLLOW_X_FORWARDED_FOR
810DEFAULT: on
811LOC: Config.onoff.log_uses_indirect_client
812DOC_START
813 Controls whether the indirect client address
814 (see follow_x_forwarded_for) is used instead of the
815 direct client address in the access log.
816DOC_END
817
41bd17a4 818NAME: http_access
819TYPE: acl_access
820LOC: Config.accessList.http
821DEFAULT: none
822DEFAULT_IF_NONE: deny all
823DOC_START
824 Allowing or Denying access based on defined access lists
cccac0a2 825
41bd17a4 826 Access to the HTTP port:
827 http_access allow|deny [!]aclname ...
cccac0a2 828
41bd17a4 829 NOTE on default values:
cccac0a2 830
41bd17a4 831 If there are no "access" lines present, the default is to deny
832 the request.
cccac0a2 833
41bd17a4 834 If none of the "access" lines cause a match, the default is the
835 opposite of the last line in the list. If the last line was
836 deny, the default is allow. Conversely, if the last line
837 is allow, the default will be deny. For these reasons, it is a
51ae86b2
HN
838 good idea to have an "deny all" entry at the end of your access
839 lists to avoid potential confusion.
cccac0a2 840
b3567eb5
FC
841 This clause supports both fast and slow acl types.
842 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
843
41bd17a4 844NOCOMMENT_START
e0855596
AJ
845
846#
847# Recommended minimum Access Permission configuration:
41bd17a4 848#
849# Only allow cachemgr access from localhost
850http_access allow manager localhost
851http_access deny manager
e0855596
AJ
852
853# Deny requests to certain unsafe ports
41bd17a4 854http_access deny !Safe_ports
e0855596
AJ
855
856# Deny CONNECT to other than secure SSL ports
41bd17a4 857http_access deny CONNECT !SSL_ports
e0855596 858
41bd17a4 859# We strongly recommend the following be uncommented to protect innocent
860# web applications running on the proxy server who think the only
861# one who can access services on "localhost" is a local user
862#http_access deny to_localhost
e0855596 863
41bd17a4 864#
865# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
e0855596 866#
c8f4eac4 867
ee776778 868# Example rule allowing access from your local networks.
869# Adapt localnet in the ACL section to list your (internal) IP networks
870# from where browsing should be allowed
871http_access allow localnet
afb33856 872http_access allow localhost
7d90757b 873
41bd17a4 874# And finally deny all other access to this proxy
875http_access deny all
876NOCOMMENT_END
877DOC_END
7d90757b 878
41bd17a4 879NAME: http_reply_access
880TYPE: acl_access
881LOC: Config.accessList.reply
882DEFAULT: none
883DOC_START
884 Allow replies to client requests. This is complementary to http_access.
cccac0a2 885
41bd17a4 886 http_reply_access allow|deny [!] aclname ...
cccac0a2 887
41bd17a4 888 NOTE: if there are no access lines present, the default is to allow
889 all replies
1a224843 890
41bd17a4 891 If none of the access lines cause a match the opposite of the
892 last line will apply. Thus it is good practice to end the rules
893 with an "allow all" or "deny all" entry.
b3567eb5
FC
894
895 This clause supports both fast and slow acl types.
896 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
cccac0a2 897DOC_END
898
41bd17a4 899NAME: icp_access
900TYPE: acl_access
901LOC: Config.accessList.icp
902DEFAULT: none
903DEFAULT_IF_NONE: deny all
5473c134 904DOC_START
41bd17a4 905 Allowing or Denying access to the ICP port based on defined
906 access lists
5473c134 907
41bd17a4 908 icp_access allow|deny [!]aclname ...
5473c134 909
41bd17a4 910 See http_access for details
911
b3567eb5
FC
912 This clause only supports fast acl types.
913 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
914
915# Allow ICP queries from local networks only
df2eec10
AJ
916#icp_access allow localnet
917#icp_access deny all
5473c134 918DOC_END
919
41bd17a4 920NAME: htcp_access
921IFDEF: USE_HTCP
922TYPE: acl_access
923LOC: Config.accessList.htcp
924DEFAULT: none
925DEFAULT_IF_NONE: deny all
5473c134 926DOC_START
41bd17a4 927 Allowing or Denying access to the HTCP port based on defined
928 access lists
5473c134 929
41bd17a4 930 htcp_access allow|deny [!]aclname ...
5473c134 931
41bd17a4 932 See http_access for details
5473c134 933
0b48417e 934 NOTE: The default if no htcp_access lines are present is to
935 deny all traffic. This default may cause problems with peers
936 using the htcp or htcp-oldsquid options.
937
b3567eb5
FC
938 This clause only supports fast acl types.
939 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
940
941# Allow HTCP queries from local networks only
df2eec10
AJ
942#htcp_access allow localnet
943#htcp_access deny all
41bd17a4 944DOC_END
5473c134 945
41bd17a4 946NAME: htcp_clr_access
947IFDEF: USE_HTCP
948TYPE: acl_access
949LOC: Config.accessList.htcp_clr
950DEFAULT: none
951DEFAULT_IF_NONE: deny all
952DOC_START
953 Allowing or Denying access to purge content using HTCP based
954 on defined access lists
5473c134 955
41bd17a4 956 htcp_clr_access allow|deny [!]aclname ...
5473c134 957
41bd17a4 958 See http_access for details
5473c134 959
b3567eb5
FC
960 This clause only supports fast acl types.
961 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
962
963# Allow HTCP CLR requests from trusted peers
41bd17a4 964acl htcp_clr_peer src 172.16.1.2
965htcp_clr_access allow htcp_clr_peer
5473c134 966DOC_END
967
41bd17a4 968NAME: miss_access
969TYPE: acl_access
970LOC: Config.accessList.miss
df2eec10 971DEFAULT: allow all
5473c134 972DOC_START
41bd17a4 973 Use to force your neighbors to use you as a sibling instead of
974 a parent. For example:
5473c134 975
41bd17a4 976 acl localclients src 172.16.0.0/16
977 miss_access allow localclients
978 miss_access deny !localclients
5473c134 979
41bd17a4 980 This means only your local clients are allowed to fetch
981 MISSES and all other clients can only fetch HITS.
5473c134 982
41bd17a4 983 By default, allow all clients who passed the http_access rules
984 to fetch MISSES from us.
b3567eb5
FC
985
986 This clause only supports fast acl types.
987 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 988DOC_END
989
990NAME: ident_lookup_access
991TYPE: acl_access
992IFDEF: USE_IDENT
993DEFAULT: none
994DEFAULT_IF_NONE: deny all
4daaf3cb 995LOC: Ident::TheConfig.identLookup
5473c134 996DOC_START
41bd17a4 997 A list of ACL elements which, if matched, cause an ident
998 (RFC 931) lookup to be performed for this request. For
999 example, you might choose to always perform ident lookups
1000 for your main multi-user Unix boxes, but not for your Macs
1001 and PCs. By default, ident lookups are not performed for
1002 any requests.
5473c134 1003
41bd17a4 1004 To enable ident lookups for specific client addresses, you
1005 can follow this example:
5473c134 1006
4daaf3cb 1007 acl ident_aware_hosts src 198.168.1.0/24
41bd17a4 1008 ident_lookup_access allow ident_aware_hosts
1009 ident_lookup_access deny all
5473c134 1010
4daaf3cb 1011 Only src type ACL checks are fully supported. A srcdomain
41bd17a4 1012 ACL might work at times, but it will not always provide
1013 the correct result.
b3567eb5
FC
1014
1015 This clause only supports fast acl types.
1016 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 1017DOC_END
5473c134 1018
5b0f5383 1019NAME: reply_body_max_size
1020COMMENT: size [acl acl...]
1021TYPE: acl_b_size_t
1022DEFAULT: none
1023LOC: Config.ReplyBodySize
1024DOC_START
1025 This option specifies the maximum size of a reply body. It can be
1026 used to prevent users from downloading very large files, such as
1027 MP3's and movies. When the reply headers are received, the
1028 reply_body_max_size lines are processed, and the first line where
1029 all (if any) listed ACLs are true is used as the maximum body size
1030 for this reply.
1031
1032 This size is checked twice. First when we get the reply headers,
1033 we check the content-length value. If the content length value exists
1034 and is larger than the allowed size, the request is denied and the
1035 user receives an error message that says "the request or reply
1036 is too large." If there is no content-length, and the reply
1037 size exceeds this limit, the client's connection is just closed
1038 and they will receive a partial reply.
1039
1040 WARNING: downstream caches probably can not detect a partial reply
1041 if there is no content-length header, so they will cache
1042 partial responses and give them out as hits. You should NOT
1043 use this option if you have downstream caches.
1044
1045 WARNING: A maximum size smaller than the size of squid's error messages
1046 will cause an infinite loop and crash squid. Ensure that the smallest
1047 non-zero value you use is greater that the maximum header size plus
1048 the size of your largest error page.
1049
1050 If you set this parameter none (the default), there will be
1051 no limit imposed.
3bc32f2f
AJ
1052
1053 Configuration Format is:
1054 reply_body_max_size SIZE UNITS [acl ...]
1055 ie.
1056 reply_body_max_size 10 MB
1057
5b0f5383 1058DOC_END
1059
1060COMMENT_START
1061 NETWORK OPTIONS
1062 -----------------------------------------------------------------------------
1063COMMENT_END
1064
1065NAME: http_port ascii_port
1066TYPE: http_port_list
1067DEFAULT: none
1068LOC: Config.Sockaddr.http
1069DOC_START
1070 Usage: port [options]
1071 hostname:port [options]
1072 1.2.3.4:port [options]
1073
1074 The socket addresses where Squid will listen for HTTP client
1075 requests. You may specify multiple socket addresses.
1076 There are three forms: port alone, hostname with port, and
1077 IP address with port. If you specify a hostname or IP
1078 address, Squid binds the socket to that specific
1079 address. This replaces the old 'tcp_incoming_address'
1080 option. Most likely, you do not need to bind to a specific
1081 address, so you can use the port number alone.
1082
1083 If you are running Squid in accelerator mode, you
1084 probably want to listen on port 80 also, or instead.
1085
1086 The -a command line option may be used to specify additional
1087 port(s) where Squid listens for proxy request. Such ports will
1088 be plain proxy ports with no options.
1089
1090 You may specify multiple socket addresses on multiple lines.
1091
1092 Options:
1093
e77bdb4e 1094 intercept Support for IP-Layer interception of
5b0f5383 1095 outgoing requests without browser settings.
13b5cd0c 1096 NP: disables authentication and IPv6 on the port.
5b0f5383 1097
1098 tproxy Support Linux TPROXY for spoofing outgoing
1099 connections using the client IP address.
13b5cd0c 1100 NP: disables authentication and IPv6 on the port.
5b0f5383 1101
1102 accel Accelerator mode. Also needs at least one of
1103 vhost / vport / defaultsite.
1104
7f7bdd96
AJ
1105 allow-direct Allow direct forwarding in accelerator mode. Normally
1106 accelerated requests are denied direct forwarding as if
1107 never_direct was used.
1108
5b0f5383 1109 defaultsite=domainname
1110 What to use for the Host: header if it is not present
1111 in a request. Determines what site (not origin server)
1112 accelerators should consider the default.
1113 Implies accel.
1114
1115 vhost Accelerator mode using Host header for virtual
1116 domain support. Implies accel.
1117
1118 vport Accelerator with IP based virtual host support.
1119 Implies accel.
1120
1121 vport=NN As above, but uses specified port number rather
1122 than the http_port number. Implies accel.
1123
1124 protocol= Protocol to reconstruct accelerated requests with.
1125 Defaults to http.
1126
432bc83c
HN
1127 ignore-cc Ignore request Cache-Control headers.
1128
1129 Warning: This option violates HTTP specifications if
1130 used in non-accelerator setups.
1131
6b185b50
AJ
1132 connection-auth[=on|off]
1133 use connection-auth=off to tell Squid to prevent
1134 forwarding Microsoft connection oriented authentication
d67acb4e
AJ
1135 (NTLM, Negotiate and Kerberos)
1136
5b0f5383 1137 disable-pmtu-discovery=
1138 Control Path-MTU discovery usage:
1139 off lets OS decide on what to do (default).
1140 transparent disable PMTU discovery when transparent
1141 support is enabled.
1142 always disable always PMTU discovery.
1143
1144 In many setups of transparently intercepting proxies
1145 Path-MTU discovery can not work on traffic towards the
1146 clients. This is the case when the intercepting device
1147 does not fully track connections and fails to forward
1148 ICMP must fragment messages to the cache server. If you
1149 have such setup and experience that certain clients
1150 sporadically hang or never complete requests set
1151 disable-pmtu-discovery option to 'transparent'.
1152
b3567eb5 1153 sslBump Intercept each CONNECT request matching ssl_bump ACL,
4c9da963 1154 establish secure connection with the client and with
1155 the server, decrypt HTTP messages as they pass through
1156 Squid, and treat them as unencrypted HTTP messages,
1157 becoming the man-in-the-middle.
1158
1159 When this option is enabled, additional options become
1160 available to specify SSL-related properties of the
1161 client-side connection: cert, key, version, cipher,
1162 options, clientca, cafile, capath, crlfile, dhparams,
1163 sslflags, and sslcontext. See the https_port directive
1164 for more information on these options.
1165
1166 The ssl_bump option is required to fully enable
1167 the SslBump feature.
1168
81b6e9a7 1169 name= Specifies a internal name for the port. Defaults to
1170 the port specification (port or addr:port)
1171
68924b6d 1172 tcpkeepalive[=idle,interval,timeout]
b2130d58 1173 Enable TCP keepalive probes of idle connections
1174 idle is the initial time before TCP starts probing
1175 the connection, interval how often to probe, and
1176 timeout the time before giving up.
1177
5b0f5383 1178 If you run Squid on a dual-homed machine with an internal
1179 and an external interface we recommend you to specify the
1180 internal address:port in http_port. This way Squid will only be
1181 visible on the internal address.
1182
1183NOCOMMENT_START
e0855596 1184
5b0f5383 1185# Squid normally listens to port 3128
1186http_port @DEFAULT_HTTP_PORT@
1187NOCOMMENT_END
1188DOC_END
1189
1190NAME: https_port
1191IFDEF: USE_SSL
1192TYPE: https_port_list
1193DEFAULT: none
1194LOC: Config.Sockaddr.https
1195DOC_START
1196 Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
1197
1198 The socket address where Squid will listen for HTTPS client
1199 requests.
1200
1201 This is really only useful for situations where you are running
1202 squid in accelerator mode and you want to do the SSL work at the
1203 accelerator level.
1204
1205 You may specify multiple socket addresses on multiple lines,
1206 each with their own SSL certificate and/or options.
1207
1208 Options:
1209
1210 accel Accelerator mode. Also needs at least one of
1211 defaultsite or vhost.
1212
1213 defaultsite= The name of the https site presented on
1214 this port. Implies accel.
1215
1216 vhost Accelerator mode using Host header for virtual
1217 domain support. Requires a wildcard certificate
1218 or other certificate valid for more than one domain.
1219 Implies accel.
1220
1221 protocol= Protocol to reconstruct accelerated requests with.
1222 Defaults to https.
1223
1224 cert= Path to SSL certificate (PEM format).
1225
1226 key= Path to SSL private key file (PEM format)
1227 if not specified, the certificate file is
1228 assumed to be a combined certificate and
1229 key file.
1230
1231 version= The version of SSL/TLS supported
1232 1 automatic (default)
1233 2 SSLv2 only
1234 3 SSLv3 only
1235 4 TLSv1 only
1236
1237 cipher= Colon separated list of supported ciphers.
1238
1239 options= Various SSL engine options. The most important
1240 being:
1241 NO_SSLv2 Disallow the use of SSLv2
1242 NO_SSLv3 Disallow the use of SSLv3
1243 NO_TLSv1 Disallow the use of TLSv1
1244 SINGLE_DH_USE Always create a new key when using
1245 temporary/ephemeral DH key exchanges
1246 See src/ssl_support.c or OpenSSL SSL_CTX_set_options
1247 documentation for a complete list of options.
1248
1249 clientca= File containing the list of CAs to use when
1250 requesting a client certificate.
1251
1252 cafile= File containing additional CA certificates to
1253 use when verifying client certificates. If unset
1254 clientca will be used.
1255
1256 capath= Directory containing additional CA certificates
1257 and CRL lists to use when verifying client certificates.
1258
1259 crlfile= File of additional CRL lists to use when verifying
1260 the client certificate, in addition to CRLs stored in
1261 the capath. Implies VERIFY_CRL flag below.
1262
1263 dhparams= File containing DH parameters for temporary/ephemeral
1264 DH key exchanges.
1265
1266 sslflags= Various flags modifying the use of SSL:
1267 DELAYED_AUTH
1268 Don't request client certificates
1269 immediately, but wait until acl processing
1270 requires a certificate (not yet implemented).
1271 NO_DEFAULT_CA
1272 Don't use the default CA lists built in
1273 to OpenSSL.
1274 NO_SESSION_REUSE
1275 Don't allow for session reuse. Each connection
1276 will result in a new SSL session.
1277 VERIFY_CRL
1278 Verify CRL lists when accepting client
1279 certificates.
1280 VERIFY_CRL_ALL
1281 Verify CRL lists for all certificates in the
1282 client certificate chain.
1283
1284 sslcontext= SSL session ID context identifier.
1285
1286 vport Accelerator with IP based virtual host support.
1287
1288 vport=NN As above, but uses specified port number rather
1289 than the https_port number. Implies accel.
1290
81b6e9a7 1291 name= Specifies a internal name for the port. Defaults to
1292 the port specification (port or addr:port)
1293
5b0f5383 1294DOC_END
1295
41bd17a4 1296NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
1297TYPE: acl_tos
5473c134 1298DEFAULT: none
41bd17a4 1299LOC: Config.accessList.outgoing_tos
5473c134 1300DOC_START
41bd17a4 1301 Allows you to select a TOS/Diffserv value to mark outgoing
1302 connections with, based on the username or source address
1303 making the request.
5473c134 1304
41bd17a4 1305 tcp_outgoing_tos ds-field [!]aclname ...
cccac0a2 1306
41bd17a4 1307 Example where normal_service_net uses the TOS value 0x00
7def7206 1308 and good_service_net uses 0x20
cccac0a2 1309
41bd17a4 1310 acl normal_service_net src 10.0.0.0/255.255.255.0
1311 acl good_service_net src 10.0.1.0/255.255.255.0
2c73de90 1312 tcp_outgoing_tos 0x00 normal_service_net
41bd17a4 1313 tcp_outgoing_tos 0x20 good_service_net
fa38076e 1314
41bd17a4 1315 TOS/DSCP values really only have local significance - so you should
575cb927
AJ
1316 know what you're specifying. For more information, see RFC2474,
1317 RFC2475, and RFC3260.
cccac0a2 1318
41bd17a4 1319 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1320 "default" to use whatever default your host has. Note that in
1321 practice often only values 0 - 63 is usable as the two highest bits
1322 have been redefined for use by ECN (RFC3168).
cccac0a2 1323
41bd17a4 1324 Processing proceeds in the order specified, and stops at first fully
1325 matching line.
cccac0a2 1326
41bd17a4 1327 Note: The use of this directive using client dependent ACLs is
1328 incompatible with the use of server side persistent connections. To
1329 ensure correct results it is best to set server_persisten_connections
1330 to off when using this directive in such configurations.
cccac0a2 1331DOC_END
1332
41bd17a4 1333NAME: clientside_tos
1334TYPE: acl_tos
cccac0a2 1335DEFAULT: none
41bd17a4 1336LOC: Config.accessList.clientside_tos
cccac0a2 1337DOC_START
41bd17a4 1338 Allows you to select a TOS/Diffserv value to mark client-side
1339 connections with, based on the username or source address
1340 making the request.
1341DOC_END
cccac0a2 1342
575cb927
AJ
1343NAME: qos_flows
1344TYPE: QosConfig
7172612f 1345IFDEF: USE_ZPH_QOS
575cb927
AJ
1346DEFAULT: none
1347LOC: Config.zph
7172612f 1348DOC_START
575cb927
AJ
1349 Allows you to select a TOS/DSCP value to mark outgoing
1350 connections with, based on where the reply was sourced.
7172612f 1351
575cb927
AJ
1352 TOS values really only have local significance - so you should
1353 know what you're specifying. For more information, see RFC2474,
1354 RFC2475, and RFC3260.
7172612f 1355
575cb927
AJ
1356 The TOS/DSCP byte must be exactly that - octet value 0x00-0xFF.
1357 Note that in practice often only values up to 0x3F are usable
1358 as the two highest bits have been redefined for use by ECN
1359 (RFC3168).
7172612f 1360
575cb927
AJ
1361 This setting is configured by setting the source TOS values:
1362
1363 local-hit=0xFF Value to mark local cache hits.
1364
1365 sibling-hit=0xFF Value to mark hits from sibling peers.
1366
1367 parent-hit=0xFF Value to mark hits from parent peers.
1368
1369
2201bec6
AJ
1370 NOTE: 'miss' preserve feature is only possible on Linux at this time.
1371
575cb927
AJ
1372 For the following to work correctly, you will need to patch your
1373 linux kernel with the TOS preserving ZPH patch.
1374 The kernel patch can be downloaded from http://zph.bratcheda.org
1375
575cb927
AJ
1376 disable-preserve-miss
1377 If set, any HTTP response towards clients will
1378 have the TOS value of the response comming from the
1379 remote server masked with the value of miss-mask.
1380
1381 miss-mask=0xFF
1382 Allows you to mask certain bits in the TOS received from the
1383 remote server, before copying the value to the TOS sent
1384 towards clients.
1385 Default: 0xFF (TOS from server is not changed).
7172612f 1386
7172612f
AJ
1387DOC_END
1388
41bd17a4 1389NAME: tcp_outgoing_address
1390TYPE: acl_address
1391DEFAULT: none
1392LOC: Config.accessList.outgoing_address
1393DOC_START
1394 Allows you to map requests to different outgoing IP addresses
1395 based on the username or source address of the user making
1396 the request.
7f7db318 1397
41bd17a4 1398 tcp_outgoing_address ipaddr [[!]aclname] ...
c33aa074 1399
41bd17a4 1400 Example where requests from 10.0.0.0/24 will be forwarded
1401 with source address 10.1.0.1, 10.0.2.0/24 forwarded with
1402 source address 10.1.0.2 and the rest will be forwarded with
1403 source address 10.1.0.3.
9197cd13 1404
17148b2f 1405 acl normal_service_net src 10.0.0.0/24
1406 acl good_service_net src 10.0.2.0/24
1407 tcp_outgoing_address 10.1.0.1 normal_service_net
1408 tcp_outgoing_address 10.1.0.2 good_service_net
1409 tcp_outgoing_address 10.1.0.3
9197cd13 1410
41bd17a4 1411 Processing proceeds in the order specified, and stops at first fully
1412 matching line.
cccac0a2 1413
41bd17a4 1414 Note: The use of this directive using client dependent ACLs is
1415 incompatible with the use of server side persistent connections. To
1416 ensure correct results it is best to set server_persistent_connections
1417 to off when using this directive in such configurations.
cc192b50 1418
4ed968be
AJ
1419 Note: The use of this directive to set a local IP on outgoing TCP links
1420 is incompatible with using TPROXY to set client IP out outbound TCP links.
1421 When needing to contact peers use the no-tproxy cache_peer option to
1422 re-enable normal forwarding such as this.
cc192b50 1423
1424 IPv6 Magic:
1425
b3567eb5
FC
1426 Squid is built with a capability of bridging the IPv4 and IPv6
1427 internets.
cc192b50 1428 tcp_outgoing_address as exampled above breaks this bridging by forcing
1429 all outbound traffic through a certain IPv4 which may be on the wrong
1430 side of the IPv4/IPv6 boundary.
1431
1432 To operate with tcp_outgoing_address and keep the bridging benefits
1433 an additional ACL needs to be used which ensures the IPv6-bound traffic
1434 is never forced or permitted out the IPv4 interface.
1435
1436 acl to_ipv6 dst ipv6
1437 tcp_outgoing_address 2002::c001 good_service_net to_ipv6
17148b2f 1438 tcp_outgoing_address 10.1.0.2 good_service_net !to_ipv6
cc192b50 1439
1440 tcp_outgoing_address 2002::beef normal_service_net to_ipv6
17148b2f 1441 tcp_outgoing_address 10.1.0.1 normal_service_net !to_ipv6
cc192b50 1442
1443 tcp_outgoing_address 2002::1 to_ipv6
17148b2f 1444 tcp_outgoing_address 10.1.0.3 !to_ipv6
6db78a1a
AJ
1445
1446 WARNING:
1447 'dst ipv6' bases its selection assuming DIRECT access.
1448 If peers are used the peername ACL are needed to select outgoing
1449 address which can link to the peer.
1450
6b185b50
AJ
1451 'dst ipv6' is a slow ACL. It will only work here if 'dst' is used
1452 previously in the http_access rules to locate the destination IP.
1453 Some more magic may be needed for that:
1454 http_access allow to_ipv6 !all
1455 (meaning, allow if to IPv6 but not from anywhere ;)
1456
cccac0a2 1457DOC_END
1458
41bd17a4 1459COMMENT_START
1460 SSL OPTIONS
1461 -----------------------------------------------------------------------------
1462COMMENT_END
1463
1464NAME: ssl_unclean_shutdown
1465IFDEF: USE_SSL
cccac0a2 1466TYPE: onoff
1467DEFAULT: off
41bd17a4 1468LOC: Config.SSL.unclean_shutdown
cccac0a2 1469DOC_START
41bd17a4 1470 Some browsers (especially MSIE) bugs out on SSL shutdown
1471 messages.
cccac0a2 1472DOC_END
1473
41bd17a4 1474NAME: ssl_engine
1475IFDEF: USE_SSL
cccac0a2 1476TYPE: string
41bd17a4 1477LOC: Config.SSL.ssl_engine
1478DEFAULT: none
cccac0a2 1479DOC_START
41bd17a4 1480 The OpenSSL engine to use. You will need to set this if you
1481 would like to use hardware SSL acceleration for example.
cccac0a2 1482DOC_END
1483
41bd17a4 1484NAME: sslproxy_client_certificate
1485IFDEF: USE_SSL
cccac0a2 1486DEFAULT: none
41bd17a4 1487LOC: Config.ssl_client.cert
1488TYPE: string
cccac0a2 1489DOC_START
41bd17a4 1490 Client SSL Certificate to use when proxying https:// URLs
cccac0a2 1491DOC_END
1492
41bd17a4 1493NAME: sslproxy_client_key
1494IFDEF: USE_SSL
cccac0a2 1495DEFAULT: none
41bd17a4 1496LOC: Config.ssl_client.key
1497TYPE: string
cccac0a2 1498DOC_START
41bd17a4 1499 Client SSL Key to use when proxying https:// URLs
cccac0a2 1500DOC_END
1501
41bd17a4 1502NAME: sslproxy_version
1503IFDEF: USE_SSL
1504DEFAULT: 1
1505LOC: Config.ssl_client.version
1506TYPE: int
cccac0a2 1507DOC_START
41bd17a4 1508 SSL version level to use when proxying https:// URLs
cccac0a2 1509DOC_END
1510
41bd17a4 1511NAME: sslproxy_options
1512IFDEF: USE_SSL
1513DEFAULT: none
1514LOC: Config.ssl_client.options
1515TYPE: string
cccac0a2 1516DOC_START
41bd17a4 1517 SSL engine options to use when proxying https:// URLs
cccac0a2 1518DOC_END
1519
41bd17a4 1520NAME: sslproxy_cipher
1521IFDEF: USE_SSL
1522DEFAULT: none
1523LOC: Config.ssl_client.cipher
1524TYPE: string
cccac0a2 1525DOC_START
41bd17a4 1526 SSL cipher list to use when proxying https:// URLs
cccac0a2 1527DOC_END
1528
41bd17a4 1529NAME: sslproxy_cafile
1530IFDEF: USE_SSL
1531DEFAULT: none
1532LOC: Config.ssl_client.cafile
1533TYPE: string
cccac0a2 1534DOC_START
41bd17a4 1535 file containing CA certificates to use when verifying server
1536 certificates while proxying https:// URLs
cccac0a2 1537DOC_END
0976f8db 1538
41bd17a4 1539NAME: sslproxy_capath
1540IFDEF: USE_SSL
5473c134 1541DEFAULT: none
41bd17a4 1542LOC: Config.ssl_client.capath
1543TYPE: string
5473c134 1544DOC_START
41bd17a4 1545 directory containing CA certificates to use when verifying
1546 server certificates while proxying https:// URLs
5473c134 1547DOC_END
1548
4c9da963 1549NAME: ssl_bump
1550IFDEF: USE_SSL
1551TYPE: acl_access
1552LOC: Config.accessList.ssl_bump
1553DEFAULT: none
1554DOC_START
1555 This ACL controls which CONNECT requests to an http_port
1556 marked with an sslBump flag are actually "bumped". Please
1557 see the sslBump flag of an http_port option for more details
1558 about decoding proxied SSL connections.
1559
1560 By default, no requests are bumped.
1561
1562 See also: http_port sslBump
1563
b3567eb5
FC
1564 This clause only supports fast acl types.
1565 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
1566
1567
1568 # Example: Bump all requests except those originating from localhost and
1569 # those going to webax.com or example.com sites.
1570
1571 acl localhost src 127.0.0.1/32
1572 acl broken_sites dstdomain .webax.com
1573 acl broken_sites dstdomain .example.com
1574 ssl_bump deny localhost
1575 ssl_bump deny broken_sites
1576 ssl_bump allow all
4c9da963 1577DOC_END
1578
41bd17a4 1579NAME: sslproxy_flags
1580IFDEF: USE_SSL
1581DEFAULT: none
1582LOC: Config.ssl_client.flags
1583TYPE: string
5473c134 1584DOC_START
41bd17a4 1585 Various flags modifying the use of SSL while proxying https:// URLs:
4c9da963 1586 DONT_VERIFY_PEER Accept certificates that fail verification.
1587 For refined control, see sslproxy_cert_error.
41bd17a4 1588 NO_DEFAULT_CA Don't use the default CA list built in
1589 to OpenSSL.
5473c134 1590DOC_END
1591
4c9da963 1592
1593NAME: sslproxy_cert_error
1594IFDEF: USE_SSL
1595DEFAULT: none
1596LOC: Config.ssl_client.cert_error
1597TYPE: acl_access
1598DOC_START
1599 Use this ACL to bypass server certificate validation errors.
1600
1601 For example, the following lines will bypass all validation errors
1602 when talking to servers located at 172.16.0.0/16. All other
1603 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
1604
1605 acl BrokenServersAtTrustedIP dst 172.16.0.0/16
1606 sslproxy_cert_error allow BrokenServersAtTrustedIP
1607 sslproxy_cert_error deny all
1608
b3567eb5
FC
1609 This clause only supports fast acl types.
1610 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1611 Using slow acl types may result in server crashes
4c9da963 1612
1613 Without this option, all server certificate validation errors
1614 terminate the transaction. Bypassing validation errors is dangerous
1615 because an error usually implies that the server cannot be trusted and
1616 the connection may be insecure.
1617
1618 See also: sslproxy_flags and DONT_VERIFY_PEER.
1619
e0855596 1620 Default setting: sslproxy_cert_error deny all
4c9da963 1621DOC_END
1622
1623
1624
41bd17a4 1625NAME: sslpassword_program
1626IFDEF: USE_SSL
1627DEFAULT: none
1628LOC: Config.Program.ssl_password
1629TYPE: string
5473c134 1630DOC_START
41bd17a4 1631 Specify a program used for entering SSL key passphrases
1632 when using encrypted SSL certificate keys. If not specified
1633 keys must either be unencrypted, or Squid started with the -N
1634 option to allow it to query interactively for the passphrase.
5473c134 1635DOC_END
1636
cccac0a2 1637COMMENT_START
41bd17a4 1638 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
cccac0a2 1639 -----------------------------------------------------------------------------
1640COMMENT_END
1641
41bd17a4 1642NAME: cache_peer
1643TYPE: peer
1644DEFAULT: none
1645LOC: Config.peers
cccac0a2 1646DOC_START
41bd17a4 1647 To specify other caches in a hierarchy, use the format:
2b94f655 1648
41bd17a4 1649 cache_peer hostname type http-port icp-port [options]
2b94f655 1650
41bd17a4 1651 For example,
2b94f655 1652
41bd17a4 1653 # proxy icp
1654 # hostname type port port options
1655 # -------------------- -------- ----- ----- -----------
2b94f655 1656 cache_peer parent.foo.net parent 3128 3130 default
41bd17a4 1657 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
1658 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
2b94f655
AJ
1659 cache_peer example.com parent 80 0 no-query default
1660 cache_peer cdn.example.com sibling 3128 0
1661
1662 type: either 'parent', 'sibling', or 'multicast'.
1663
1664 proxy-port: The port number where the peer accept HTTP requests.
1665 For other Squid proxies this is usually 3128
1666 For web servers this is usually 80
1667
1668 icp-port: Used for querying neighbor caches about objects.
1669 Set to 0 if the peer does not support ICP or HTCP.
1670 See ICP and HTCP options below for additional details.
1671
1672
1673 ==== ICP OPTIONS ====
1674
1675 You MUST also set icp_port and icp_access explicitly when using these options.
1676 The defaults will prevent peer traffic using ICP.
1677
1678
1679 no-query Disable ICP queries to this neighbor.
1680
1681 multicast-responder
1682 Indicates the named peer is a member of a multicast group.
1683 ICP queries will not be sent directly to the peer, but ICP
1684 replies will be accepted from it.
1685
1686 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
1687 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
1688
1689 background-ping
1690 To only send ICP queries to this neighbor infrequently.
1691 This is used to keep the neighbor round trip time updated
1692 and is usually used in conjunction with weighted-round-robin.
1693
1694
1695 ==== HTCP OPTIONS ====
1696
1697 You MUST also set htcp_port and htcp_access explicitly when using these options.
1698 The defaults will prevent peer traffic using HTCP.
1699
1700
1701 htcp Send HTCP, instead of ICP, queries to the neighbor.
1702 You probably also want to set the "icp-port" to 4827
1703 instead of 3130.
1704
1705 htcp-oldsquid Send HTCP to old Squid versions.
1706
1707 htcp-no-clr Send HTCP to the neighbor but without
1708 sending any CLR requests. This cannot be used with
1709 htcp-only-clr.
1710
1711 htcp-only-clr Send HTCP to the neighbor but ONLY CLR requests.
1712 This cannot be used with htcp-no-clr.
1713
1714 htcp-no-purge-clr
1715 Send HTCP to the neighbor including CLRs but only when
1716 they do not result from PURGE requests.
1717
1718 htcp-forward-clr
1719 Forward any HTCP CLR requests this proxy receives to the peer.
1720
1721
1722 ==== PEER SELECTION METHODS ====
1723
1724 The default peer selection method is ICP, with the first responding peer
1725 being used as source. These options can be used for better load balancing.
1726
1727
1728 default This is a parent cache which can be used as a "last-resort"
1729 if a peer cannot be located by any of the peer-selection methods.
1730 If specified more than once, only the first is used.
1731
1732 round-robin Load-Balance parents which should be used in a round-robin
1733 fashion in the absence of any ICP queries.
1734 weight=N can be used to add bias.
1735
1736 weighted-round-robin
1737 Load-Balance parents which should be used in a round-robin
1738 fashion with the frequency of each parent being based on the
1739 round trip time. Closer parents are used more often.
1740 Usually used for background-ping parents.
1741 weight=N can be used to add bias.
1742
1743 carp Load-Balance parents which should be used as a CARP array.
1744 The requests will be distributed among the parents based on the
1745 CARP load balancing hash function based on their weight.
1746
1747 userhash Load-balance parents based on the client proxy_auth or ident username.
1748
1749 sourcehash Load-balance parents based on the client source IP.
1750
1751
1752 ==== PEER SELECTION OPTIONS ====
1753
1754 weight=N use to affect the selection of a peer during any weighted
1755 peer-selection mechanisms.
1756 The weight must be an integer; default is 1,
1757 larger weights are favored more.
1758 This option does not affect parent selection if a peering
1759 protocol is not in use.
1760
1761 basetime=N Specify a base amount to be subtracted from round trip
1762 times of parents.
1763 It is subtracted before division by weight in calculating
1764 which parent to fectch from. If the rtt is less than the
1765 base time the rtt is set to a minimal value.
1766
1767 ttl=N Specify a IP multicast TTL to use when sending an ICP
1768 queries to this address.
1769 Only useful when sending to a multicast group.
1770 Because we don't accept ICP replies from random
1771 hosts, you must configure other group members as
1772 peers with the 'multicast-responder' option.
1773
1774 no-delay To prevent access to this neighbor from influencing the
1775 delay pools.
1776
1777 digest-url=URL Tell Squid to fetch the cache digest (if digests are
1778 enabled) for this host from the specified URL rather
1779 than the Squid default location.
1780
1781
1782 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
1783
1784 originserver Causes this parent to be contacted as an origin server.
1785 Meant to be used in accelerator setups when the peer
1786 is a web server.
1787
1788 forceddomain=name
1789 Set the Host header of requests forwarded to this peer.
1790 Useful in accelerator setups where the server (peer)
1791 expects a certain domain name but clients may request
1792 others. ie example.com or www.example.com
1793
1794 no-digest Disable request of cache digests.
1795
1796 no-netdb-exchange
1797 Disables requesting ICMP RTT database (NetDB).
1798
1799
1800 ==== AUTHENTICATION OPTIONS ====
1801
1802 login=user:password
1803 If this is a personal/workgroup proxy and your parent
1804 requires proxy authentication.
1805
1806 Note: The string can include URL escapes (i.e. %20 for
1807 spaces). This also means % must be written as %%.
1808
11e4c5e5
AJ
1809 login=PASSTHRU
1810 Send login details received from client to this peer.
1811 Both Proxy- and WWW-Authorization headers are passed
1812 without alteration to the peer.
1813 Authentication is not required by Squid for this to work.
1814
1815 Note: This will pass any form of authentication but
1816 only Basic auth will work through a proxy unless the
1817 connection-auth options are also used.
ee0b94f4 1818
2b94f655
AJ
1819 login=PASS Send login details received from client to this peer.
1820 Authentication is not required by this option.
11e4c5e5 1821
2b94f655
AJ
1822 If there are no client-provided authentication headers
1823 to pass on, but username and password are available
ee0b94f4
HN
1824 from an external ACL user= and password= result tags
1825 they may be sent instead.
2b94f655
AJ
1826
1827 Note: To combine this with proxy_auth both proxies must
1828 share the same user database as HTTP only allows for
1829 a single login (one for proxy, one for origin server).
1830 Also be warned this will expose your users proxy
1831 password to the peer. USE WITH CAUTION
1832
1833 login=*:password
1834 Send the username to the upstream cache, but with a
1835 fixed password. This is meant to be used when the peer
1836 is in another administrative domain, but it is still
1837 needed to identify each user.
1838 The star can optionally be followed by some extra
1839 information which is added to the username. This can
1840 be used to identify this proxy to the peer, similar to
1841 the login=username:password option above.
1842
9ca29d23
AJ
1843 login=NEGOTIATE
1844 If this is a personal/workgroup proxy and your parent
1845 requires a secure proxy authentication.
1846 The first principal from the default keytab or defined by
1847 the environment variable KRB5_KTNAME will be used.
1848
1849 login=NEGOTIATE:principal_name
1850 If this is a personal/workgroup proxy and your parent
1851 requires a secure proxy authentication.
1852 The principal principal_name from the default keytab or
1853 defined by the environment variable KRB5_KTNAME will be
1854 used.
1855
2b94f655
AJ
1856 connection-auth=on|off
1857 Tell Squid that this peer does or not support Microsoft
1858 connection oriented authentication, and any such
1859 challenges received from there should be ignored.
1860 Default is auto to automatically determine the status
1861 of the peer.
1862
1863
1864 ==== SSL / HTTPS / TLS OPTIONS ====
1865
1866 ssl Encrypt connections to this peer with SSL/TLS.
1867
1868 sslcert=/path/to/ssl/certificate
1869 A client SSL certificate to use when connecting to
1870 this peer.
1871
1872 sslkey=/path/to/ssl/key
1873 The private SSL key corresponding to sslcert above.
1874 If 'sslkey' is not specified 'sslcert' is assumed to
1875 reference a combined file containing both the
1876 certificate and the key.
1877
1878 sslversion=1|2|3|4
1879 The SSL version to use when connecting to this peer
1880 1 = automatic (default)
1881 2 = SSL v2 only
1882 3 = SSL v3 only
1883 4 = TLS v1 only
1884
1885 sslcipher=... The list of valid SSL ciphers to use when connecting
1886 to this peer.
1887
1888 ssloptions=... Specify various SSL engine options:
1889 NO_SSLv2 Disallow the use of SSLv2
1890 NO_SSLv3 Disallow the use of SSLv3
1891 NO_TLSv1 Disallow the use of TLSv1
1892 See src/ssl_support.c or the OpenSSL documentation for
1893 a more complete list.
1894
1895 sslcafile=... A file containing additional CA certificates to use
1896 when verifying the peer certificate.
1897
1898 sslcapath=... A directory containing additional CA certificates to
1899 use when verifying the peer certificate.
1900
1901 sslcrlfile=... A certificate revocation list file to use when
1902 verifying the peer certificate.
1903
1904 sslflags=... Specify various flags modifying the SSL implementation:
1905
41bd17a4 1906 DONT_VERIFY_PEER
1907 Accept certificates even if they fail to
1908 verify.
1909 NO_DEFAULT_CA
1910 Don't use the default CA list built in
1911 to OpenSSL.
1912 DONT_VERIFY_DOMAIN
1913 Don't verify the peer certificate
1914 matches the server name
2b94f655
AJ
1915
1916 ssldomain= The peer name as advertised in it's certificate.
1917 Used for verifying the correctness of the received peer
1918 certificate. If not specified the peer hostname will be
1919 used.
1920
1921 front-end-https
1922 Enable the "Front-End-Https: On" header needed when
1923 using Squid as a SSL frontend in front of Microsoft OWA.
1924 See MS KB document Q307347 for details on this header.
1925 If set to auto the header will only be added if the
1926 request is forwarded as a https:// URL.
1927
1928
1929 ==== GENERAL OPTIONS ====
1930
1931 connect-timeout=N
1932 A peer-specific connect timeout.
1933 Also see the peer_connect_timeout directive.
1934
1935 connect-fail-limit=N
1936 How many times connecting to a peer must fail before
1937 it is marked as down. Default is 10.
1938
1939 allow-miss Disable Squid's use of only-if-cached when forwarding
1940 requests to siblings. This is primarily useful when
1941 icp_hit_stale is used by the sibling. To extensive use
1942 of this option may result in forwarding loops, and you
1943 should avoid having two-way peerings with this option.
1944 For example to deny peer usage on requests from peer
1945 by denying cache_peer_access if the source is a peer.
1946
1947 max-conn=N Limit the amount of connections Squid may open to this
1948 peer. see also
1949
1950 name=xxx Unique name for the peer.
1951 Required if you have multiple peers on the same host
1952 but different ports.
1953 This name can be used in cache_peer_access and similar
1954 directives to dentify the peer.
1955 Can be used by outgoing access controls through the
1956 peername ACL type.
1957
b0758e04
AJ
1958 no-tproxy Do not use the client-spoof TPROXY support when forwarding
1959 requests to this peer. Use normal address selection instead.
1960
2b94f655
AJ
1961 proxy-only objects fetched from the peer will not be stored locally.
1962
41bd17a4 1963DOC_END
cccac0a2 1964
41bd17a4 1965NAME: cache_peer_domain cache_host_domain
1966TYPE: hostdomain
1967DEFAULT: none
1968LOC: none
1969DOC_START
1970 Use to limit the domains for which a neighbor cache will be
1971 queried. Usage:
cccac0a2 1972
41bd17a4 1973 cache_peer_domain cache-host domain [domain ...]
1974 cache_peer_domain cache-host !domain
cccac0a2 1975
41bd17a4 1976 For example, specifying
cccac0a2 1977
41bd17a4 1978 cache_peer_domain parent.foo.net .edu
cccac0a2 1979
41bd17a4 1980 has the effect such that UDP query packets are sent to
1981 'bigserver' only when the requested object exists on a
1982 server in the .edu domain. Prefixing the domainname
1983 with '!' means the cache will be queried for objects
1984 NOT in that domain.
cccac0a2 1985
41bd17a4 1986 NOTE: * Any number of domains may be given for a cache-host,
1987 either on the same or separate lines.
1988 * When multiple domains are given for a particular
1989 cache-host, the first matched domain is applied.
1990 * Cache hosts with no domain restrictions are queried
1991 for all requests.
1992 * There are no defaults.
1993 * There is also a 'cache_peer_access' tag in the ACL
1994 section.
1995DOC_END
dd9b1776 1996
41bd17a4 1997NAME: cache_peer_access
1998TYPE: peer_access
1999DEFAULT: none
2000LOC: none
2001DOC_START
2002 Similar to 'cache_peer_domain' but provides more flexibility by
2003 using ACL elements.
cccac0a2 2004
41bd17a4 2005 cache_peer_access cache-host allow|deny [!]aclname ...
dd9b1776 2006
41bd17a4 2007 The syntax is identical to 'http_access' and the other lists of
2008 ACL elements. See the comments for 'http_access' below, or
2009 the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
2010DOC_END
dd9b1776 2011
41bd17a4 2012NAME: neighbor_type_domain
2013TYPE: hostdomaintype
2014DEFAULT: none
2015LOC: none
2016DOC_START
2017 usage: neighbor_type_domain neighbor parent|sibling domain domain ...
cccac0a2 2018
41bd17a4 2019 Modifying the neighbor type for specific domains is now
2020 possible. You can treat some domains differently than the the
2021 default neighbor type specified on the 'cache_peer' line.
2022 Normally it should only be necessary to list domains which
2023 should be treated differently because the default neighbor type
2024 applies for hostnames which do not match domains listed here.
6bf4f823 2025
41bd17a4 2026EXAMPLE:
dbe3992d 2027 cache_peer cache.foo.org parent 3128 3130
41bd17a4 2028 neighbor_type_domain cache.foo.org sibling .com .net
2029 neighbor_type_domain cache.foo.org sibling .au .de
2030DOC_END
6bf4f823 2031
41bd17a4 2032NAME: dead_peer_timeout
2033COMMENT: (seconds)
2034DEFAULT: 10 seconds
2035TYPE: time_t
2036LOC: Config.Timeout.deadPeer
2037DOC_START
2038 This controls how long Squid waits to declare a peer cache
2039 as "dead." If there are no ICP replies received in this
2040 amount of time, Squid will declare the peer dead and not
2041 expect to receive any further ICP replies. However, it
2042 continues to send ICP queries, and will mark the peer as
2043 alive upon receipt of the first subsequent ICP reply.
699acd19 2044
41bd17a4 2045 This timeout also affects when Squid expects to receive ICP
2046 replies from peers. If more than 'dead_peer' seconds have
2047 passed since the last ICP reply was received, Squid will not
2048 expect to receive an ICP reply on the next query. Thus, if
2049 your time between requests is greater than this timeout, you
2050 will see a lot of requests sent DIRECT to origin servers
2051 instead of to your parents.
2052DOC_END
cccac0a2 2053
437823b4
AJ
2054NAME: forward_max_tries
2055DEFAULT: 10
2056TYPE: int
2057LOC: Config.forward_max_tries
2058DOC_START
2059 Controls how many different forward paths Squid will try
2060 before giving up. See also forward_timeout.
2061DOC_END
2062
41bd17a4 2063NAME: hierarchy_stoplist
2064TYPE: wordlist
2065DEFAULT: none
2066LOC: Config.hierarchy_stoplist
2067DOC_START
2068 A list of words which, if found in a URL, cause the object to
2069 be handled directly by this cache. In other words, use this
2070 to not query neighbor caches for certain objects. You may
2071 list this option multiple times.
2072 Note: never_direct overrides this option.
cccac0a2 2073NOCOMMENT_START
e0855596
AJ
2074
2075# We recommend you to use at least the following line.
41bd17a4 2076hierarchy_stoplist cgi-bin ?
6b698a21 2077NOCOMMENT_END
2078DOC_END
0976f8db 2079
41bd17a4 2080COMMENT_START
2081 MEMORY CACHE OPTIONS
2082 -----------------------------------------------------------------------------
2083COMMENT_END
2084
2085NAME: cache_mem
2086COMMENT: (bytes)
2087TYPE: b_size_t
df2eec10 2088DEFAULT: 256 MB
41bd17a4 2089LOC: Config.memMaxSize
6b698a21 2090DOC_START
41bd17a4 2091 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
2092 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
2093 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
2094 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
2095
2096 'cache_mem' specifies the ideal amount of memory to be used
2097 for:
2098 * In-Transit objects
2099 * Hot Objects
2100 * Negative-Cached objects
2101
2102 Data for these objects are stored in 4 KB blocks. This
2103 parameter specifies the ideal upper limit on the total size of
2104 4 KB blocks allocated. In-Transit objects take the highest
2105 priority.
2106
2107 In-transit objects have priority over the others. When
2108 additional space is needed for incoming data, negative-cached
2109 and hot objects will be released. In other words, the
2110 negative-cached and hot objects will fill up any unused space
2111 not needed for in-transit objects.
2112
2113 If circumstances require, this limit will be exceeded.
2114 Specifically, if your incoming request rate requires more than
2115 'cache_mem' of memory to hold in-transit objects, Squid will
2116 exceed this limit to satisfy the new requests. When the load
2117 decreases, blocks will be freed until the high-water mark is
2118 reached. Thereafter, blocks will be used to store hot
2119 objects.
6b698a21 2120DOC_END
0976f8db 2121
41bd17a4 2122NAME: maximum_object_size_in_memory
2123COMMENT: (bytes)
2124TYPE: b_size_t
df2eec10 2125DEFAULT: 512 KB
41bd17a4 2126LOC: Config.Store.maxInMemObjSize
6b698a21 2127DOC_START
41bd17a4 2128 Objects greater than this size will not be attempted to kept in
2129 the memory cache. This should be set high enough to keep objects
2130 accessed frequently in memory to improve performance whilst low
2131 enough to keep larger objects from hoarding cache_mem.
6b698a21 2132DOC_END
0976f8db 2133
ea21d497
HN
2134NAME: memory_cache_mode
2135TYPE: memcachemode
2136LOC: Config
2137DEFAULT: always
ff4b33f4 2138DOC_START
ea21d497 2139 Controls which objects to keep in the memory cache (cache_mem)
ff4b33f4 2140
ea21d497
HN
2141 always Keep most recently fetched objects in memory (default)
2142
2143 disk Only disk cache hits are kept in memory, which means
2144 an object must first be cached on disk and then hit
2145 a second time before cached in memory.
2146
2147 network Only objects fetched from network is kept in memory
ff4b33f4
HN
2148DOC_END
2149
41bd17a4 2150NAME: memory_replacement_policy
2151TYPE: removalpolicy
2152LOC: Config.memPolicy
2153DEFAULT: lru
6b698a21 2154DOC_START
41bd17a4 2155 The memory replacement policy parameter determines which
2156 objects are purged from memory when memory space is needed.
7f7db318 2157
41bd17a4 2158 See cache_replacement_policy for details.
2159DOC_END
6b698a21 2160
41bd17a4 2161COMMENT_START
2162 DISK CACHE OPTIONS
2163 -----------------------------------------------------------------------------
2164COMMENT_END
6b698a21 2165
41bd17a4 2166NAME: cache_replacement_policy
2167TYPE: removalpolicy
2168LOC: Config.replPolicy
2169DEFAULT: lru
2170DOC_START
2171 The cache replacement policy parameter determines which
2172 objects are evicted (replaced) when disk space is needed.
6b698a21 2173
41bd17a4 2174 lru : Squid's original list based LRU policy
2175 heap GDSF : Greedy-Dual Size Frequency
2176 heap LFUDA: Least Frequently Used with Dynamic Aging
2177 heap LRU : LRU policy implemented using a heap
6b698a21 2178
41bd17a4 2179 Applies to any cache_dir lines listed below this.
7f7db318 2180
41bd17a4 2181 The LRU policies keeps recently referenced objects.
0976f8db 2182
41bd17a4 2183 The heap GDSF policy optimizes object hit rate by keeping smaller
2184 popular objects in cache so it has a better chance of getting a
2185 hit. It achieves a lower byte hit rate than LFUDA though since
2186 it evicts larger (possibly popular) objects.
0976f8db 2187
41bd17a4 2188 The heap LFUDA policy keeps popular objects in cache regardless of
2189 their size and thus optimizes byte hit rate at the expense of
2190 hit rate since one large, popular object will prevent many
2191 smaller, slightly less popular objects from being cached.
0976f8db 2192
41bd17a4 2193 Both policies utilize a dynamic aging mechanism that prevents
2194 cache pollution that can otherwise occur with frequency-based
2195 replacement policies.
7d90757b 2196
41bd17a4 2197 NOTE: if using the LFUDA replacement policy you should increase
2198 the value of maximum_object_size above its default of 4096 KB to
2199 to maximize the potential byte hit rate improvement of LFUDA.
dc1af3cf 2200
41bd17a4 2201 For more information about the GDSF and LFUDA cache replacement
2202 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
2203 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
6b698a21 2204DOC_END
0976f8db 2205
41bd17a4 2206NAME: cache_dir
2207TYPE: cachedir
2208DEFAULT: none
41bd17a4 2209LOC: Config.cacheSwap
6b698a21 2210DOC_START
41bd17a4 2211 Usage:
0976f8db 2212
41bd17a4 2213 cache_dir Type Directory-Name Fs-specific-data [options]
0976f8db 2214
41bd17a4 2215 You can specify multiple cache_dir lines to spread the
2216 cache among different disk partitions.
0976f8db 2217
41bd17a4 2218 Type specifies the kind of storage system to use. Only "ufs"
2219 is built by default. To enable any of the other storage systems
2220 see the --enable-storeio configure option.
0976f8db 2221
41bd17a4 2222 'Directory' is a top-level directory where cache swap
2223 files will be stored. If you want to use an entire disk
2224 for caching, this can be the mount-point directory.
2225 The directory must exist and be writable by the Squid
2226 process. Squid will NOT create this directory for you.
0976f8db 2227
41bd17a4 2228 The ufs store type:
0976f8db 2229
41bd17a4 2230 "ufs" is the old well-known Squid storage format that has always
2231 been there.
0976f8db 2232
41bd17a4 2233 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
0976f8db 2234
41bd17a4 2235 'Mbytes' is the amount of disk space (MB) to use under this
2236 directory. The default is 100 MB. Change this to suit your
2237 configuration. Do NOT put the size of your disk drive here.
2238 Instead, if you want Squid to use the entire disk drive,
2239 subtract 20% and use that value.
0976f8db 2240
41bd17a4 2241 'Level-1' is the number of first-level subdirectories which
2242 will be created under the 'Directory'. The default is 16.
0976f8db 2243
41bd17a4 2244 'Level-2' is the number of second-level subdirectories which
2245 will be created under each first-level directory. The default
2246 is 256.
0976f8db 2247
41bd17a4 2248 The aufs store type:
7f7db318 2249
41bd17a4 2250 "aufs" uses the same storage format as "ufs", utilizing
2251 POSIX-threads to avoid blocking the main Squid process on
2252 disk-I/O. This was formerly known in Squid as async-io.
38f9c547 2253
41bd17a4 2254 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
38f9c547 2255
41bd17a4 2256 see argument descriptions under ufs above
38f9c547 2257
41bd17a4 2258 The diskd store type:
38f9c547 2259
41bd17a4 2260 "diskd" uses the same storage format as "ufs", utilizing a
2261 separate process to avoid blocking the main Squid process on
2262 disk-I/O.
4c3ef9b2 2263
41bd17a4 2264 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
0976f8db 2265
41bd17a4 2266 see argument descriptions under ufs above
0976f8db 2267
41bd17a4 2268 Q1 specifies the number of unacknowledged I/O requests when Squid
2269 stops opening new files. If this many messages are in the queues,
2270 Squid won't open new files. Default is 64
0976f8db 2271
41bd17a4 2272 Q2 specifies the number of unacknowledged messages when Squid
2273 starts blocking. If this many messages are in the queues,
2274 Squid blocks until it receives some replies. Default is 72
0976f8db 2275
41bd17a4 2276 When Q1 < Q2 (the default), the cache directory is optimized
2277 for lower response time at the expense of a decrease in hit
2278 ratio. If Q1 > Q2, the cache directory is optimized for
2279 higher hit ratio at the expense of an increase in response
2280 time.
0976f8db 2281
41bd17a4 2282 The coss store type:
0976f8db 2283
db263d62
AJ
2284 NP: COSS filesystem in Squid-3 has been deemed too unstable for
2285 production use and has thus been removed from this release.
2286 We hope that it can be made usable again soon.
2287
41bd17a4 2288 block-size=n defines the "block size" for COSS cache_dir's.
2289 Squid uses file numbers as block numbers. Since file numbers
2290 are limited to 24 bits, the block size determines the maximum
2291 size of the COSS partition. The default is 512 bytes, which
2292 leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
2293 you should not change the coss block size after Squid
2294 has written some objects to the cache_dir.
0976f8db 2295
41bd17a4 2296 The coss file store has changed from 2.5. Now it uses a file
2297 called 'stripe' in the directory names in the config - and
2298 this will be created by squid -z.
0976f8db 2299
41bd17a4 2300 Common options:
0976f8db 2301
41bd17a4 2302 no-store, no new objects should be stored to this cache_dir
0976f8db 2303
41bd17a4 2304 max-size=n, refers to the max object size this storedir supports.
2305 It is used to initially choose the storedir to dump the object.
2306 Note: To make optimal use of the max-size limits you should order
2307 the cache_dir lines with the smallest max-size value first and the
2308 ones with no max-size specification last.
0976f8db 2309
41bd17a4 2310 Note for coss, max-size must be less than COSS_MEMBUF_SZ,
2311 which can be changed with the --with-coss-membuf-size=N configure
2312 option.
bebc043b 2313NOCOMMENT_START
e0855596
AJ
2314
2315# Uncomment and adjust the following to add a disk cache directory.
2316#cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
bebc043b 2317NOCOMMENT_END
6b698a21 2318DOC_END
0976f8db 2319
41bd17a4 2320NAME: store_dir_select_algorithm
2321TYPE: string
2322LOC: Config.store_dir_select_algorithm
2323DEFAULT: least-load
6b698a21 2324DOC_START
41bd17a4 2325 Set this to 'round-robin' as an alternative.
6b698a21 2326DOC_END
0976f8db 2327
41bd17a4 2328NAME: max_open_disk_fds
2329TYPE: int
2330LOC: Config.max_open_disk_fds
2331DEFAULT: 0
6b698a21 2332DOC_START
41bd17a4 2333 To avoid having disk as the I/O bottleneck Squid can optionally
2334 bypass the on-disk cache if more than this amount of disk file
2335 descriptors are open.
2336
2337 A value of 0 indicates no limit.
6b698a21 2338DOC_END
0976f8db 2339
41bd17a4 2340NAME: minimum_object_size
6b698a21 2341COMMENT: (bytes)
47f6e231 2342TYPE: b_int64_t
6b698a21 2343DEFAULT: 0 KB
41bd17a4 2344LOC: Config.Store.minObjectSize
6b698a21 2345DOC_START
41bd17a4 2346 Objects smaller than this size will NOT be saved on disk. The
2347 value is specified in kilobytes, and the default is 0 KB, which
2348 means there is no minimum.
6b698a21 2349DOC_END
0976f8db 2350
41bd17a4 2351NAME: maximum_object_size
2352COMMENT: (bytes)
2353TYPE: b_int64_t
2354DEFAULT: 4096 KB
2355LOC: Config.Store.maxObjectSize
777831e0 2356DOC_START
41bd17a4 2357 Objects larger than this size will NOT be saved on disk. The
2358 value is specified in kilobytes, and the default is 4MB. If
2359 you wish to get a high BYTES hit ratio, you should probably
2360 increase this (one 32 MB object hit counts for 3200 10KB
2361 hits). If you wish to increase speed more than your want to
2362 save bandwidth you should leave this low.
777831e0 2363
41bd17a4 2364 NOTE: if using the LFUDA replacement policy you should increase
2365 this value to maximize the byte hit rate improvement of LFUDA!
2366 See replacement_policy below for a discussion of this policy.
6b698a21 2367DOC_END
0976f8db 2368
41bd17a4 2369NAME: cache_swap_low
2370COMMENT: (percent, 0-100)
5473c134 2371TYPE: int
41bd17a4 2372DEFAULT: 90
2373LOC: Config.Swap.lowWaterMark
2374DOC_NONE
2375
2376NAME: cache_swap_high
2377COMMENT: (percent, 0-100)
2378TYPE: int
2379DEFAULT: 95
2380LOC: Config.Swap.highWaterMark
6b698a21 2381DOC_START
41bd17a4 2382
2383 The low- and high-water marks for cache object replacement.
2384 Replacement begins when the swap (disk) usage is above the
2385 low-water mark and attempts to maintain utilization near the
2386 low-water mark. As swap utilization gets close to high-water
2387 mark object eviction becomes more aggressive. If utilization is
2388 close to the low-water mark less replacement is done each time.
2389
2390 Defaults are 90% and 95%. If you have a large cache, 5% could be
2391 hundreds of MB. If this is the case you may wish to set these
2392 numbers closer together.
6b698a21 2393DOC_END
0976f8db 2394
5473c134 2395COMMENT_START
41bd17a4 2396 LOGFILE OPTIONS
5473c134 2397 -----------------------------------------------------------------------------
2398COMMENT_END
0976f8db 2399
41bd17a4 2400NAME: logformat
2401TYPE: logformat
2402LOC: Config.Log.logformats
5473c134 2403DEFAULT: none
6b698a21 2404DOC_START
41bd17a4 2405 Usage:
0976f8db 2406
41bd17a4 2407 logformat <name> <format specification>
0976f8db 2408
41bd17a4 2409 Defines an access log format.
6b698a21 2410
41bd17a4 2411 The <format specification> is a string with embedded % format codes
5473c134 2412
41bd17a4 2413 % format codes all follow the same basic structure where all but
2414 the formatcode is optional. Output strings are automatically escaped
2415 as required according to their context and the output format
2416 modifiers are usually not needed, but can be specified if an explicit
2417 output format is desired.
6b698a21 2418
41bd17a4 2419 % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
0976f8db 2420
41bd17a4 2421 " output in quoted string format
2422 [ output in squid text log format as used by log_mime_hdrs
2423 # output in URL quoted format
2424 ' output as-is
5473c134 2425
41bd17a4 2426 - left aligned
2427 width field width. If starting with 0 the
2428 output is zero padded
2429 {arg} argument such as header name etc
5473c134 2430
41bd17a4 2431 Format codes:
5473c134 2432
3ff65596 2433 % a literal % character
41bd17a4 2434 >a Client source IP address
2435 >A Client FQDN
2436 >p Client source port
2437 <A Server IP address or peer name
2438 la Local IP address (http_port)
2439 lp Local port number (http_port)
17fde513 2440 sn Unique sequence number per log line entry
41bd17a4 2441 ts Seconds since epoch
2442 tu subsecond time (milliseconds)
2443 tl Local time. Optional strftime format argument
3ff65596 2444 default %d/%b/%Y:%H:%M:%S %z
41bd17a4 2445 tg GMT time. Optional strftime format argument
3ff65596 2446 default %d/%b/%Y:%H:%M:%S %z
41bd17a4 2447 tr Response time (milliseconds)
3ff65596
AR
2448 dt Total time spent making DNS lookups (milliseconds)
2449
2450 HTTP cache related format codes:
2451
2452 [http::]>h Request header. Optional header name argument
2453 on the format header[:[separator]element]
2454 [http::]<h Reply header. Optional header name argument
2455 as for >h
2456 [http::]un User name
2457 [http::]ul User name from authentication
2458 [http::]ui User name from ident
2459 [http::]us User name from SSL
2460 [http::]ue User name from external acl helper
2461 [http::]>Hs HTTP status code sent to the client
2462 [http::]<Hs HTTP status code received from the next hop
2463 [http::]Ss Squid request status (TCP_MISS etc)
2464 [http::]Sh Squid hierarchy status (DEFAULT_PARENT etc)
2465 [http::]mt MIME content type
2466 [http::]rm Request method (GET/POST etc)
2467 [http::]ru Request URL
2468 [http::]rp Request URL-Path excluding hostname
2469 [http::]rv Request protocol version
2470 [http::]et Tag returned by external acl
2471 [http::]ea Log string returned by external acl
2472 [http::]<st Sent reply size including HTTP headers
2473 [http::]>st Received request size including HTTP headers. In the
2474 case of chunked requests the chunked encoding metadata
2475 are not included
2476 [http::]>sh Received HTTP request headers size
2477 [http::]<sh Sent HTTP reply headers size
2478 [http::]st Request+Reply size including HTTP headers
2479 [http::]<sH Reply high offset sent
2480 [http::]<sS Upstream object size
2481 [http::]<pt Peer response time in milliseconds. The timer starts
2482 when the last request byte is sent to the next hop
2483 and stops when the last response byte is received.
2484 [http::]<tt Total server-side time in milliseconds. The timer
2485 starts with the first connect request (or write I/O)
2486 sent to the first selected peer. The timer stops
2487 with the last I/O with the last peer.
2488
2489 If ICAP is enabled, the following two codes become available (as
2490 well as ICAP log codes documented with the icap_log option):
2491
2492 icap::tt Total ICAP processing time for the HTTP
2493 transaction. The timer ticks when ICAP
2494 ACLs are checked and when ICAP
2495 transaction is in progress.
2496
2497 icap::<last_h The header of the last ICAP response
2498 related to the HTTP transaction. Like
2499 <h, accepts an optional header name
2500 argument. Will not change semantics
2501 when multiple ICAP transactions per HTTP
2502 transaction are supported.
2503
2504 If adaptation is enabled the following two codes become available:
2505
2506 adapt::sum_trs Summed adaptation transaction response
2507 times recorded as a comma-separated list in
2508 the order of transaction start time. Each time
2509 value is recorded as an integer number,
2510 representing response time of one or more
2511 adaptation (ICAP or eCAP) transaction in
2512 milliseconds. When a failed transaction is
2513 being retried or repeated, its time is not
2514 logged individually but added to the
2515 replacement (next) transaction. See also:
2516 adapt::all_trs.
2517
2518 adapt::all_trs All adaptation transaction response times.
2519 Same as adaptation_strs but response times of
2520 individual transactions are never added
2521 together. Instead, all transaction response
2522 times are recorded individually.
2523
2524 You can prefix adapt::*_trs format codes with adaptation
2525 service name in curly braces to record response time(s) specific
2526 to that service. For example: %{my_service}adapt::sum_trs
5473c134 2527
7d9acc3c
AJ
2528 The default formats available (which do not need re-defining) are:
2529
3ff65596
AR
2530logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt
2531logformat squidmime %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
2532logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
2533logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
5473c134 2534DOC_END
2535
41bd17a4 2536NAME: access_log cache_access_log
2537TYPE: access_log
2538LOC: Config.Log.accesslogs
02424612 2539DEFAULT: none
01ddaf65 2540DEFAULT_IF_NONE: @DEFAULT_ACCESS_LOG@ squid
5473c134 2541DOC_START
41bd17a4 2542 These files log client request activities. Has a line every HTTP or
2543 ICP request. The format is:
2544 access_log <filepath> [<logformat name> [acl acl ...]]
2545 access_log none [acl acl ...]]
5473c134 2546
41bd17a4 2547 Will log to the specified file using the specified format (which
2548 must be defined in a logformat directive) those entries which match
2549 ALL the acl's specified (which must be defined in acl clauses).
2550 If no acl is specified, all requests will be logged to this file.
5473c134 2551
41bd17a4 2552 To disable logging of a request use the filepath "none", in which case
2553 a logformat name should not be specified.
5473c134 2554
41bd17a4 2555 To log the request via syslog specify a filepath of "syslog":
5473c134 2556
41bd17a4 2557 access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
2558 where facility could be any of:
2559 authpriv, daemon, local0 .. local7 or user.
5473c134 2560
41bd17a4 2561 And priority could be any of:
2562 err, warning, notice, info, debug.
df2eec10
AJ
2563
2564 Default:
2565 access_log @DEFAULT_ACCESS_LOG@ squid
41bd17a4 2566DOC_END
5473c134 2567
3ff65596
AR
2568NAME: icap_log
2569TYPE: access_log
2570IFDEF: ICAP_CLIENT
2571LOC: Config.Log.icaplogs
2572DEFAULT: none
2573DOC_START
2574 ICAP log files record ICAP transaction summaries, one line per
2575 transaction.
2576
2577 The icap_log option format is:
2578 icap_log <filepath> [<logformat name> [acl acl ...]]
2579 icap_log none [acl acl ...]]
2580
2581 Please see access_log option documentation for details. The two
2582 kinds of logs share the overall configuration approach and many
2583 features.
2584
2585 ICAP processing of a single HTTP message or transaction may
2586 require multiple ICAP transactions. In such cases, multiple
2587 ICAP transaction log lines will correspond to a single access
2588 log line.
2589
2590 ICAP log uses logformat codes that make sense for an ICAP
2591 transaction. Header-related codes are applied to the HTTP header
2592 embedded in an ICAP server response, with the following caveats:
2593 For REQMOD, there is no HTTP response header unless the ICAP
2594 server performed request satisfaction. For RESPMOD, the HTTP
2595 request header is the header sent to the ICAP server. For
2596 OPTIONS, there are no HTTP headers.
2597
2598 The following format codes are also available for ICAP logs:
2599
2600 icap::<A ICAP server IP address. Similar to <A.
2601
2602 icap::<service_name ICAP service name from the icap_service
2603 option in Squid configuration file.
2604
2605 icap::ru ICAP Request-URI. Similar to ru.
2606
2607 icap::rm ICAP request method (REQMOD, RESPMOD, or
2608 OPTIONS). Similar to existing rm.
2609
2610 icap::>st Bytes sent to the ICAP server (TCP payload
2611 only; i.e., what Squid writes to the socket).
2612
2613 icap::<st Bytes received from the ICAP server (TCP
2614 payload only; i.e., what Squid reads from
2615 the socket).
2616
2617 icap::tr Transaction response time (in
2618 milliseconds). The timer starts when
2619 the ICAP transaction is created and
2620 stops when the transaction is completed.
2621 Similar to tr.
2622
2623 icap::tio Transaction I/O time (in milliseconds). The
2624 timer starts when the first ICAP request
2625 byte is scheduled for sending. The timers
2626 stops when the last byte of the ICAP response
2627 is received.
2628
2629 icap::to Transaction outcome: ICAP_ERR* for all
2630 transaction errors, ICAP_OPT for OPTION
2631 transactions, ICAP_ECHO for 204
2632 responses, ICAP_MOD for message
2633 modification, and ICAP_SAT for request
2634 satisfaction. Similar to Ss.
2635
2636 icap::Hs ICAP response status code. Similar to Hs.
2637
2638 icap::>h ICAP request header(s). Similar to >h.
2639
2640 icap::<h ICAP response header(s). Similar to <h.
2641
2642 The default ICAP log format, which can be used without an explicit
2643 definition, is called icap_squid:
2644
2645logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
2646
2647 See also: logformat, log_icap, and %icap::<last_h
2648DOC_END
2649
5b0f5383 2650NAME: log_access
2651TYPE: acl_access
2652LOC: Config.accessList.log
2653DEFAULT: none
2654COMMENT: allow|deny acl acl...
2655DOC_START
2656 This options allows you to control which requests gets logged
2657 to access.log (see access_log directive). Requests denied for
2658 logging will also not be accounted for in performance counters.
b3567eb5
FC
2659
2660 This clause only supports fast acl types.
2661 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5b0f5383 2662DOC_END
2663
3ff65596
AR
2664NAME: log_icap
2665TYPE: acl_access
2666IFDEF: ICAP_CLIENT
2667LOC: Config.accessList.icap
2668DEFAULT: none
2669DOC_START
2670 This options allows you to control which requests get logged
2671 to icap.log. See the icap_log directive for ICAP log details.
2672DOC_END
2673
41bd17a4 2674NAME: cache_store_log
2675TYPE: string
df2eec10 2676DEFAULT: none
41bd17a4 2677LOC: Config.Log.store
2678DOC_START
2679 Logs the activities of the storage manager. Shows which
2680 objects are ejected from the cache, and which objects are
df2eec10
AJ
2681 saved and for how long. To disable, enter "none" or remove the line.
2682 There are not really utilities to analyze this data, so you can safely
41bd17a4 2683 disable it.
e0855596
AJ
2684
2685 Example:
2686 cache_store_log @DEFAULT_STORE_LOG@
5473c134 2687DOC_END
2688
41bd17a4 2689NAME: cache_swap_state cache_swap_log
2690TYPE: string
2691LOC: Config.Log.swap
5473c134 2692DEFAULT: none
2693DOC_START
41bd17a4 2694 Location for the cache "swap.state" file. This index file holds
2695 the metadata of objects saved on disk. It is used to rebuild
2696 the cache during startup. Normally this file resides in each
2697 'cache_dir' directory, but you may specify an alternate
2698 pathname here. Note you must give a full filename, not just
2699 a directory. Since this is the index for the whole object
2700 list you CANNOT periodically rotate it!
5473c134 2701
41bd17a4 2702 If %s can be used in the file name it will be replaced with a
2703 a representation of the cache_dir name where each / is replaced
2704 with '.'. This is needed to allow adding/removing cache_dir
2705 lines when cache_swap_log is being used.
5473c134 2706
41bd17a4 2707 If have more than one 'cache_dir', and %s is not used in the name
2708 these swap logs will have names such as:
5473c134 2709
41bd17a4 2710 cache_swap_log.00
2711 cache_swap_log.01
2712 cache_swap_log.02
5473c134 2713
41bd17a4 2714 The numbered extension (which is added automatically)
2715 corresponds to the order of the 'cache_dir' lines in this
2716 configuration file. If you change the order of the 'cache_dir'
2717 lines in this file, these index files will NOT correspond to
2718 the correct 'cache_dir' entry (unless you manually rename
2719 them). We recommend you do NOT use this option. It is
2720 better to keep these index files in each 'cache_dir' directory.
5473c134 2721DOC_END
2722
41bd17a4 2723NAME: logfile_rotate
2724TYPE: int
2725DEFAULT: 10
2726LOC: Config.Log.rotateNumber
5473c134 2727DOC_START
41bd17a4 2728 Specifies the number of logfile rotations to make when you
2729 type 'squid -k rotate'. The default is 10, which will rotate
2730 with extensions 0 through 9. Setting logfile_rotate to 0 will
2731 disable the file name rotation, but the logfiles are still closed
2732 and re-opened. This will enable you to rename the logfiles
2733 yourself just before sending the rotate signal.
5473c134 2734
41bd17a4 2735 Note, the 'squid -k rotate' command normally sends a USR1
2736 signal to the running squid process. In certain situations
2737 (e.g. on Linux with Async I/O), USR1 is used for other
2738 purposes, so -k rotate uses another signal. It is best to get
2739 in the habit of using 'squid -k rotate' instead of 'kill -USR1
2740 <pid>'.
62493678
AJ
2741
2742 Note, from Squid-3.1 this option has no effect on the cache.log,
2743 that log can be rotated separately by using debug_options
41bd17a4 2744DOC_END
5473c134 2745
41bd17a4 2746NAME: emulate_httpd_log
2747COMMENT: on|off
2748TYPE: onoff
2749DEFAULT: off
2750LOC: Config.onoff.common_log
2751DOC_START
2752 The Cache can emulate the log file format which many 'httpd'
2753 programs use. To disable/enable this emulation, set
2754 emulate_httpd_log to 'off' or 'on'. The default
2755 is to use the native log format since it includes useful
2756 information Squid-specific log analyzers use.
5473c134 2757DOC_END
2758
41bd17a4 2759NAME: log_ip_on_direct
2760COMMENT: on|off
2761TYPE: onoff
5473c134 2762DEFAULT: on
41bd17a4 2763LOC: Config.onoff.log_ip_on_direct
5473c134 2764DOC_START
41bd17a4 2765 Log the destination IP address in the hierarchy log tag when going
2766 direct. Earlier Squid versions logged the hostname here. If you
2767 prefer the old way set this to off.
2768DOC_END
5473c134 2769
41bd17a4 2770NAME: mime_table
2771TYPE: string
2772DEFAULT: @DEFAULT_MIME_TABLE@
2773LOC: Config.mimeTablePathname
2774DOC_START
2775 Pathname to Squid's MIME table. You shouldn't need to change
2776 this, but the default file contains examples and formatting
2777 information if you do.
5473c134 2778DOC_END
2779
41bd17a4 2780NAME: log_mime_hdrs
2781COMMENT: on|off
2782TYPE: onoff
2783LOC: Config.onoff.log_mime_hdrs
2784DEFAULT: off
2785DOC_START
2786 The Cache can record both the request and the response MIME
2787 headers for each HTTP transaction. The headers are encoded
2788 safely and will appear as two bracketed fields at the end of
2789 the access log (for either the native or httpd-emulated log
2790 formats). To enable this logging set log_mime_hdrs to 'on'.
2791DOC_END
5473c134 2792
41bd17a4 2793NAME: useragent_log
2794TYPE: string
2795LOC: Config.Log.useragent
2796DEFAULT: none
2797IFDEF: USE_USERAGENT_LOG
5473c134 2798DOC_START
41bd17a4 2799 Squid will write the User-Agent field from HTTP requests
2800 to the filename specified here. By default useragent_log
2801 is disabled.
5473c134 2802DOC_END
2803
41bd17a4 2804NAME: referer_log referrer_log
2805TYPE: string
2806LOC: Config.Log.referer
2807DEFAULT: none
2808IFDEF: USE_REFERER_LOG
5473c134 2809DOC_START
41bd17a4 2810 Squid will write the Referer field from HTTP requests to the
2811 filename specified here. By default referer_log is disabled.
2812 Note that "referer" is actually a misspelling of "referrer"
2813 however the misspelt version has been accepted into the HTTP RFCs
2814 and we accept both.
5473c134 2815DOC_END
2816
41bd17a4 2817NAME: pid_filename
2818TYPE: string
2819DEFAULT: @DEFAULT_PID_FILE@
2820LOC: Config.pidFilename
5473c134 2821DOC_START
41bd17a4 2822 A filename to write the process-id to. To disable, enter "none".
5473c134 2823DOC_END
2824
41bd17a4 2825NAME: log_fqdn
2826COMMENT: on|off
2827TYPE: onoff
2828DEFAULT: off
2829LOC: Config.onoff.log_fqdn
5473c134 2830DOC_START
41bd17a4 2831 Turn this on if you wish to log fully qualified domain names
2832 in the access.log. To do this Squid does a DNS lookup of all
2833 IP's connecting to it. This can (in some situations) increase
2834 latency, which makes your cache seem slower for interactive
2835 browsing.
5473c134 2836DOC_END
2837
41bd17a4 2838NAME: client_netmask
2839TYPE: address
2840LOC: Config.Addrs.client_netmask
2841DEFAULT: 255.255.255.255
5473c134 2842DOC_START
41bd17a4 2843 A netmask for client addresses in logfiles and cachemgr output.
2844 Change this to protect the privacy of your cache clients.
2845 A netmask of 255.255.255.0 will log all IP's in that range with
2846 the last digit set to '0'.
5473c134 2847DOC_END
2848
41bd17a4 2849NAME: forward_log
2850IFDEF: WIP_FWD_LOG
2851TYPE: string
2852DEFAULT: none
2853LOC: Config.Log.forward
5473c134 2854DOC_START
41bd17a4 2855 Logs the server-side requests.
5473c134 2856
41bd17a4 2857 This is currently work in progress.
5473c134 2858DOC_END
2859
41bd17a4 2860NAME: strip_query_terms
5473c134 2861TYPE: onoff
41bd17a4 2862LOC: Config.onoff.strip_query_terms
5473c134 2863DEFAULT: on
2864DOC_START
41bd17a4 2865 By default, Squid strips query terms from requested URLs before
2866 logging. This protects your user's privacy.
5473c134 2867DOC_END
2868
41bd17a4 2869NAME: buffered_logs
2870COMMENT: on|off
2871TYPE: onoff
2872DEFAULT: off
2873LOC: Config.onoff.buffered_logs
5473c134 2874DOC_START
41bd17a4 2875 cache.log log file is written with stdio functions, and as such
2876 it can be buffered or unbuffered. By default it will be unbuffered.
2877 Buffering it can speed up the writing slightly (though you are
2878 unlikely to need to worry unless you run with tons of debugging
2879 enabled in which case performance will suffer badly anyway..).
6b698a21 2880DOC_END
0976f8db 2881
2b753521 2882NAME: netdb_filename
2883TYPE: string
2884DEFAULT: @DEFAULT_NETDB_FILE@
2885LOC: Config.netdbFilename
fb6a61d1 2886IFDEF: USE_ICMP
2b753521 2887DOC_START
2888 A filename where Squid stores it's netdb state between restarts.
2889 To disable, enter "none".
2890DOC_END
2891
62493678
AJ
2892COMMENT_START
2893 OPTIONS FOR TROUBLESHOOTING
2894 -----------------------------------------------------------------------------
2895COMMENT_END
2896
2897NAME: cache_log
2898TYPE: string
2899DEFAULT: none
2900DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
2901LOC: Debug::cache_log
2902DOC_START
2903 Cache logging file. This is where general information about
2904 your cache's behavior goes. You can increase the amount of data
2905 logged to this file and how often its rotated with "debug_options"
2906DOC_END
2907
2908NAME: debug_options
2909TYPE: eol
47df1aa7 2910DEFAULT: ALL,1
62493678
AJ
2911LOC: Debug::debugOptions
2912DOC_START
2913 Logging options are set as section,level where each source file
2914 is assigned a unique section. Lower levels result in less
2915 output, Full debugging (level 9) can result in a very large
2916 log file, so be careful.
2917
2918 The magic word "ALL" sets debugging levels for all sections.
2919 We recommend normally running with "ALL,1".
2920
47df1aa7
AJ
2921 The rotate=N option can be used to keep more or less of these logs
2922 than would otherwise be kept by logfile_rotate.
62493678
AJ
2923 For most uses a single log should be enough to monitor current
2924 events affecting Squid.
2925DOC_END
2926
2927NAME: coredump_dir
2928TYPE: string
2929LOC: Config.coredump_dir
2930DEFAULT: none
2931DEFAULT_IF_NONE: none
2932DOC_START
2933 By default Squid leaves core files in the directory from where
2934 it was started. If you set 'coredump_dir' to a directory
2935 that exists, Squid will chdir() to that directory at startup
2936 and coredump files will be left there.
2937
2938NOCOMMENT_START
e0855596 2939
62493678
AJ
2940# Leave coredumps in the first cache dir
2941coredump_dir @DEFAULT_SWAP_DIR@
2942NOCOMMENT_END
2943DOC_END
2944
2945
41bd17a4 2946COMMENT_START
2947 OPTIONS FOR FTP GATEWAYING
2948 -----------------------------------------------------------------------------
2949COMMENT_END
2950
2951NAME: ftp_user
2952TYPE: string
2953DEFAULT: Squid@
2954LOC: Config.Ftp.anon_user
6b698a21 2955DOC_START
41bd17a4 2956 If you want the anonymous login password to be more informative
2957 (and enable the use of picky ftp servers), set this to something
2958 reasonable for your domain, like wwwuser@somewhere.net
7f7db318 2959
41bd17a4 2960 The reason why this is domainless by default is the
2961 request can be made on the behalf of a user in any domain,
2962 depending on how the cache is used.
2963 Some ftp server also validate the email address is valid
2964 (for example perl.com).
6b698a21 2965DOC_END
0976f8db 2966
41bd17a4 2967NAME: ftp_list_width
2968TYPE: size_t
2969DEFAULT: 32
2970LOC: Config.Ftp.list_width
6b698a21 2971DOC_START
41bd17a4 2972 Sets the width of ftp listings. This should be set to fit in
2973 the width of a standard browser. Setting this too small
2974 can cut off long filenames when browsing ftp sites.
6b698a21 2975DOC_END
9e7dbc51 2976
41bd17a4 2977NAME: ftp_passive
2978TYPE: onoff
2979DEFAULT: on
2980LOC: Config.Ftp.passive
6b698a21 2981DOC_START
41bd17a4 2982 If your firewall does not allow Squid to use passive
2983 connections, turn off this option.
a689bd4e 2984
2985 Use of ftp_epsv_all option requires this to be ON.
2986DOC_END
2987
2988NAME: ftp_epsv_all
2989TYPE: onoff
2990DEFAULT: off
2991LOC: Config.Ftp.epsv_all
2992DOC_START
2993 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
2994
2995 NATs may be able to put the connection on a "fast path" through the
2996 translator, as the EPRT command will never be used and therefore,
2997 translation of the data portion of the segments will never be needed.
2998
b3567eb5
FC
2999 When a client only expects to do two-way FTP transfers this may be
3000 useful.
a689bd4e 3001 If squid finds that it must do a three-way FTP transfer after issuing
3002 an EPSV ALL command, the FTP session will fail.
3003
3004 If you have any doubts about this option do not use it.
3005 Squid will nicely attempt all other connection methods.
3006
51ee534d
AJ
3007 Requires ftp_passive to be ON (default) for any effect.
3008DOC_END
3009
3010NAME: ftp_epsv
3011TYPE: onoff
3012DEFAULT: on
3013LOC: Config.Ftp.epsv
3014DOC_START
3015 FTP Protocol extensions permit the use of a special "EPSV" command.
3016
3017 NATs may be able to put the connection on a "fast path" through the
b3567eb5
FC
3018 translator using EPSV, as the EPRT command will never be used
3019 and therefore, translation of the data portion of the segments
3020 will never be needed.
51ee534d
AJ
3021
3022 Turning this OFF will prevent EPSV being attempted.
3023 WARNING: Doing so will convert Squid back to the old behavior with all
3024 the related problems with external NAT devices/layers.
3025
3026 Requires ftp_passive to be ON (default) for any effect.
41bd17a4 3027DOC_END
9e7dbc51 3028
41bd17a4 3029NAME: ftp_sanitycheck
3030TYPE: onoff
3031DEFAULT: on
3032LOC: Config.Ftp.sanitycheck
3033DOC_START
3034 For security and data integrity reasons Squid by default performs
3035 sanity checks of the addresses of FTP data connections ensure the
3036 data connection is to the requested server. If you need to allow
3037 FTP connections to servers using another IP address for the data
3038 connection turn this off.
3039DOC_END
9e7dbc51 3040
41bd17a4 3041NAME: ftp_telnet_protocol
3042TYPE: onoff
3043DEFAULT: on
3044LOC: Config.Ftp.telnet
3045DOC_START
3046 The FTP protocol is officially defined to use the telnet protocol
3047 as transport channel for the control connection. However, many
3048 implementations are broken and does not respect this aspect of
3049 the FTP protocol.
3050
3051 If you have trouble accessing files with ASCII code 255 in the
3052 path or similar problems involving this ASCII code you can
3053 try setting this directive to off. If that helps, report to the
3054 operator of the FTP server in question that their FTP server
3055 is broken and does not follow the FTP standard.
3056DOC_END
3057
3058COMMENT_START
3059 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
3060 -----------------------------------------------------------------------------
3061COMMENT_END
3062
3063NAME: diskd_program
3064TYPE: string
3065DEFAULT: @DEFAULT_DISKD@
3066LOC: Config.Program.diskd
3067DOC_START
3068 Specify the location of the diskd executable.
3069 Note this is only useful if you have compiled in
3070 diskd as one of the store io modules.
3071DOC_END
3072
3073NAME: unlinkd_program
3074IFDEF: USE_UNLINKD
3075TYPE: string
3076DEFAULT: @DEFAULT_UNLINKD@
3077LOC: Config.Program.unlinkd
3078DOC_START
3079 Specify the location of the executable for file deletion process.
3080DOC_END
3081
3082NAME: pinger_program
3083TYPE: string
3084DEFAULT: @DEFAULT_PINGER@
cc192b50 3085LOC: Config.pinger.program
41bd17a4 3086IFDEF: USE_ICMP
3087DOC_START
3088 Specify the location of the executable for the pinger process.
3089DOC_END
3090
cc192b50 3091NAME: pinger_enable
3092TYPE: onoff
3093DEFAULT: on
3094LOC: Config.pinger.enable
3095IFDEF: USE_ICMP
3096DOC_START
3097 Control whether the pinger is active at run-time.
b3567eb5
FC
3098 Enables turning ICMP pinger on and off with a simple
3099 squid -k reconfigure.
cc192b50 3100DOC_END
3101
3102
41bd17a4 3103COMMENT_START
3104 OPTIONS FOR URL REWRITING
3105 -----------------------------------------------------------------------------
3106COMMENT_END
3107
3108NAME: url_rewrite_program redirect_program
3109TYPE: wordlist
3110LOC: Config.Program.redirect
3111DEFAULT: none
3112DOC_START
3113 Specify the location of the executable for the URL rewriter.
3114 Since they can perform almost any function there isn't one included.
3115
3116 For each requested URL rewriter will receive on line with the format
3117
c71adec1 3118 URL <SP> client_ip "/" fqdn <SP> user <SP> method [<SP> kvpairs]<NL>
3119
3120 In the future, the rewriter interface will be extended with
3121 key=value pairs ("kvpairs" shown above). Rewriter programs
3122 should be prepared to receive and possibly ignore additional
3123 whitespace-separated tokens on each input line.
41bd17a4 3124
3125 And the rewriter may return a rewritten URL. The other components of
3126 the request line does not need to be returned (ignored if they are).
3127
3128 The rewriter can also indicate that a client-side redirect should
3129 be performed to the new URL. This is done by prefixing the returned
3130 URL with "301:" (moved permanently) or 302: (moved temporarily).
3131
3132 By default, a URL rewriter is not used.
3133DOC_END
3134
3135NAME: url_rewrite_children redirect_children
3136TYPE: int
3137DEFAULT: 5
3138LOC: Config.redirectChildren
3139DOC_START
3140 The number of redirector processes to spawn. If you start
3141 too few Squid will have to wait for them to process a backlog of
3142 URLs, slowing it down. If you start too many they will use RAM
3143 and other system resources.
3144DOC_END
3145
3146NAME: url_rewrite_concurrency redirect_concurrency
3147TYPE: int
3148DEFAULT: 0
3149LOC: Config.redirectConcurrency
3150DOC_START
3151 The number of requests each redirector helper can handle in
3152 parallel. Defaults to 0 which indicates the redirector
3153 is a old-style single threaded redirector.
6a171502
AJ
3154
3155 When this directive is set to a value >= 1 then the protocol
3156 used to communicate with the helper is modified to include
3157 a request ID in front of the request/response. The request
3158 ID from the request must be echoed back with the response
3159 to that request.
41bd17a4 3160DOC_END
3161
3162NAME: url_rewrite_host_header redirect_rewrites_host_header
3163TYPE: onoff
3164DEFAULT: on
3165LOC: Config.onoff.redir_rewrites_host
3166DOC_START
3167 By default Squid rewrites any Host: header in redirected
3168 requests. If you are running an accelerator this may
3169 not be a wanted effect of a redirector.
3170
3171 WARNING: Entries are cached on the result of the URL rewriting
3172 process, so be careful if you have domain-virtual hosts.
3173DOC_END
3174
3175NAME: url_rewrite_access redirector_access
3176TYPE: acl_access
3177DEFAULT: none
3178LOC: Config.accessList.redirector
3179DOC_START
3180 If defined, this access list specifies which requests are
3181 sent to the redirector processes. By default all requests
3182 are sent.
b3567eb5
FC
3183
3184 This clause supports both fast and slow acl types.
3185 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 3186DOC_END
3187
3188NAME: url_rewrite_bypass redirector_bypass
3189TYPE: onoff
3190LOC: Config.onoff.redirector_bypass
3191DEFAULT: off
3192DOC_START
3193 When this is 'on', a request will not go through the
3194 redirector if all redirectors are busy. If this is 'off'
3195 and the redirector queue grows too large, Squid will exit
3196 with a FATAL error and ask you to increase the number of
3197 redirectors. You should only enable this if the redirectors
3198 are not critical to your caching system. If you use
3199 redirectors for access control, and you enable this option,
3200 users may have access to pages they should not
3201 be allowed to request.
3202DOC_END
3203
3204COMMENT_START
3205 OPTIONS FOR TUNING THE CACHE
3206 -----------------------------------------------------------------------------
3207COMMENT_END
3208
f04b37d8 3209NAME: cache no_cache
3210TYPE: acl_access
3211DEFAULT: none
3212LOC: Config.accessList.noCache
41bd17a4 3213DOC_START
240887f0 3214 A list of ACL elements which, if matched and denied, cause the request to
f04b37d8 3215 not be satisfied from the cache and the reply to not be cached.
3216 In other words, use this to force certain objects to never be cached.
41bd17a4 3217
240887f0 3218 You must use the words 'allow' or 'deny' to indicate whether items
3219 matching the ACL should be allowed or denied into the cache.
f04b37d8 3220
240887f0 3221 Default is to allow all to be cached.
b3567eb5
FC
3222
3223 This clause supports both fast and slow acl types.
3224 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 3225DOC_END
3226
3227NAME: refresh_pattern
3228TYPE: refreshpattern
3229LOC: Config.Refresh
3230DEFAULT: none
3231DOC_START
3232 usage: refresh_pattern [-i] regex min percent max [options]
9e7dbc51 3233
6b698a21 3234 By default, regular expressions are CASE-SENSITIVE. To make
3235 them case-insensitive, use the -i option.
9e7dbc51 3236
41bd17a4 3237 'Min' is the time (in minutes) an object without an explicit
3238 expiry time should be considered fresh. The recommended
3239 value is 0, any higher values may cause dynamic applications
3240 to be erroneously cached unless the application designer
3241 has taken the appropriate actions.
9e7dbc51 3242
41bd17a4 3243 'Percent' is a percentage of the objects age (time since last
3244 modification age) an object without explicit expiry time
3245 will be considered fresh.
5b807763 3246
41bd17a4 3247 'Max' is an upper limit on how long objects without an explicit
3248 expiry time will be considered fresh.
9e7dbc51 3249
41bd17a4 3250 options: override-expire
3251 override-lastmod
3252 reload-into-ims
3253 ignore-reload
3254 ignore-no-cache
3255 ignore-no-store
4ca08219 3256 ignore-must-revalidate
41bd17a4 3257 ignore-private
3258 ignore-auth
3259 refresh-ims
a0ec9f68 3260
41bd17a4 3261 override-expire enforces min age even if the server
9b2ad080
HN
3262 sent an explicit expiry time (e.g., with the
3263 Expires: header or Cache-Control: max-age). Doing this
3264 VIOLATES the HTTP standard. Enabling this feature
3265 could make you liable for problems which it causes.
6468fe10 3266
04925576
AJ
3267 Note: override-expire does not enforce staleness - it only extends
3268 freshness / min. If the server returns a Expires time which
3269 is longer than your max time, Squid will still consider
3270 the object fresh for that period of time.
3271
41bd17a4 3272 override-lastmod enforces min age even on objects
3273 that were modified recently.
934b03fc 3274
41bd17a4 3275 reload-into-ims changes client no-cache or ``reload''
3276 to If-Modified-Since requests. Doing this VIOLATES the
3277 HTTP standard. Enabling this feature could make you
3278 liable for problems which it causes.
dba79ac5 3279
41bd17a4 3280 ignore-reload ignores a client no-cache or ``reload''
3281 header. Doing this VIOLATES the HTTP standard. Enabling
3282 this feature could make you liable for problems which
3283 it causes.
9bc73deb 3284
41bd17a4 3285 ignore-no-cache ignores any ``Pragma: no-cache'' and
3286 ``Cache-control: no-cache'' headers received from a server.
3287 The HTTP RFC never allows the use of this (Pragma) header
3288 from a server, only a client, though plenty of servers
3289 send it anyway.
3290
3291 ignore-no-store ignores any ``Cache-control: no-store''
3292 headers received from a server. Doing this VIOLATES
3293 the HTTP standard. Enabling this feature could make you
3294 liable for problems which it causes.
3295
4ca08219
AJ
3296 ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
3297 headers received from a server. Doing this VIOLATES
3298 the HTTP standard. Enabling this feature could make you
3299 liable for problems which it causes.
3300
41bd17a4 3301 ignore-private ignores any ``Cache-control: private''
3302 headers received from a server. Doing this VIOLATES
3303 the HTTP standard. Enabling this feature could make you
3304 liable for problems which it causes.
3305
3306 ignore-auth caches responses to requests with authorization,
3307 as if the originserver had sent ``Cache-control: public''
3308 in the response header. Doing this VIOLATES the HTTP standard.
3309 Enabling this feature could make you liable for problems which
3310 it causes.
3311
3312 refresh-ims causes squid to contact the origin server
3313 when a client issues an If-Modified-Since request. This
3314 ensures that the client will receive an updated version
3315 if one is available.
3316
3317 Basically a cached object is:
3318
3319 FRESH if expires < now, else STALE
3320 STALE if age > max
3321 FRESH if lm-factor < percent, else STALE
3322 FRESH if age < min
3323 else STALE
3324
3325 The refresh_pattern lines are checked in the order listed here.
3326 The first entry which matches is used. If none of the entries
3327 match the default will be used.
3328
3329 Note, you must uncomment all the default lines if you want
3330 to change one. The default setting is only active if none is
3331 used.
3332
41bd17a4 3333NOCOMMENT_START
e0855596
AJ
3334
3335# Add any of your own refresh_pattern entries above these.
41bd17a4 3336refresh_pattern ^ftp: 1440 20% 10080
3337refresh_pattern ^gopher: 1440 0% 1440
89db45fa 3338refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
41bd17a4 3339refresh_pattern . 0 20% 4320
3340NOCOMMENT_END
3341DOC_END
3342
3343NAME: quick_abort_min
3344COMMENT: (KB)
3345TYPE: kb_int64_t
3346DEFAULT: 16 KB
3347LOC: Config.quickAbort.min
3348DOC_NONE
3349
3350NAME: quick_abort_max
3351COMMENT: (KB)
3352TYPE: kb_int64_t
3353DEFAULT: 16 KB
3354LOC: Config.quickAbort.max
3355DOC_NONE
3356
3357NAME: quick_abort_pct
3358COMMENT: (percent)
3359TYPE: int
3360DEFAULT: 95
3361LOC: Config.quickAbort.pct
3362DOC_START
3363 The cache by default continues downloading aborted requests
3364 which are almost completed (less than 16 KB remaining). This
3365 may be undesirable on slow (e.g. SLIP) links and/or very busy
3366 caches. Impatient users may tie up file descriptors and
3367 bandwidth by repeatedly requesting and immediately aborting
3368 downloads.
3369
3370 When the user aborts a request, Squid will check the
3371 quick_abort values to the amount of data transfered until
3372 then.
3373
3374 If the transfer has less than 'quick_abort_min' KB remaining,
3375 it will finish the retrieval.
3376
3377 If the transfer has more than 'quick_abort_max' KB remaining,
3378 it will abort the retrieval.
3379
3380 If more than 'quick_abort_pct' of the transfer has completed,
3381 it will finish the retrieval.
3382
3383 If you do not want any retrieval to continue after the client
3384 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
3385 to '0 KB'.
3386
3387 If you want retrievals to always continue if they are being
3388 cached set 'quick_abort_min' to '-1 KB'.
3389DOC_END
60d096f4 3390
41bd17a4 3391NAME: read_ahead_gap
3392COMMENT: buffer-size
3393TYPE: b_int64_t
3394LOC: Config.readAheadGap
3395DEFAULT: 16 KB
3396DOC_START
3397 The amount of data the cache will buffer ahead of what has been
3398 sent to the client when retrieving an object from another server.
3399DOC_END
53e738c6 3400
41bd17a4 3401NAME: negative_ttl
ac9cc053 3402IFDEF: HTTP_VIOLATIONS
41bd17a4 3403COMMENT: time-units
3404TYPE: time_t
3405LOC: Config.negativeTtl
ac9cc053 3406DEFAULT: 0 seconds
41bd17a4 3407DOC_START
ac9cc053
AJ
3408 Set the Default Time-to-Live (TTL) for failed requests.
3409 Certain types of failures (such as "connection refused" and
3410 "404 Not Found") are able to be negatively-cached for a short time.
3411 Modern web servers should provide Expires: header, however if they
3412 do not this can provide a minimum TTL.
3413 The default is not to cache errors with unknown expiry details.
3414
3415 Note that this is different from negative caching of DNS lookups.
39956c7c
AJ
3416
3417 WARNING: Doing this VIOLATES the HTTP standard. Enabling
3418 this feature could make you liable for problems which it
3419 causes.
41bd17a4 3420DOC_END
53e738c6 3421
41bd17a4 3422NAME: positive_dns_ttl
3423COMMENT: time-units
3424TYPE: time_t
3425LOC: Config.positiveDnsTtl
3426DEFAULT: 6 hours
3427DOC_START
3428 Upper limit on how long Squid will cache positive DNS responses.
3429 Default is 6 hours (360 minutes). This directive must be set
3430 larger than negative_dns_ttl.
3431DOC_END
c4ab8329 3432
41bd17a4 3433NAME: negative_dns_ttl
3434COMMENT: time-units
3435TYPE: time_t
3436LOC: Config.negativeDnsTtl
3437DEFAULT: 1 minutes
3438DOC_START
3439 Time-to-Live (TTL) for negative caching of failed DNS lookups.
3440 This also sets the lower cache limit on positive lookups.
3441 Minimum value is 1 second, and it is not recommendable to go
3442 much below 10 seconds.
3443DOC_END
7df0bfd7 3444
41bd17a4 3445NAME: range_offset_limit
3446COMMENT: (bytes)
3447TYPE: b_int64_t
3448LOC: Config.rangeOffsetLimit
3449DEFAULT: 0 KB
3450DOC_START
3451 Sets a upper limit on how far into the the file a Range request
3452 may be to cause Squid to prefetch the whole file. If beyond this
3453 limit Squid forwards the Range request as it is and the result
3454 is NOT cached.
c4ab8329 3455
41bd17a4 3456 This is to stop a far ahead range request (lets say start at 17MB)
3457 from making Squid fetch the whole object up to that point before
3458 sending anything to the client.
a7ad6e4e 3459
ab275c7b
AJ
3460 A value of 0 causes Squid to never fetch more than the
3461 client requested. (default)
3462
41bd17a4 3463 A value of -1 causes Squid to always fetch the object from the
3464 beginning so it may cache the result. (2.0 style)
a7ad6e4e 3465
ab275c7b
AJ
3466 NP: Using -1 here will override any quick_abort settings that may
3467 otherwise apply to the range request. The range request will
3468 be fully fetched from start to finish regardless of the client
3469 actions. This affects bandwidth usage.
41bd17a4 3470DOC_END
d95b862f 3471
41bd17a4 3472NAME: minimum_expiry_time
3473COMMENT: (seconds)
3474TYPE: time_t
3475LOC: Config.minimum_expiry_time
3476DEFAULT: 60 seconds
3477DOC_START
3478 The minimum caching time according to (Expires - Date)
3479 Headers Squid honors if the object can't be revalidated
649fa918 3480 defaults to 60 seconds. In reverse proxy environments it
41bd17a4 3481 might be desirable to honor shorter object lifetimes. It
3482 is most likely better to make your server return a
3483 meaningful Last-Modified header however. In ESI environments
3484 where page fragments often have short lifetimes, this will
3485 often be best set to 0.
3486DOC_END
c68e9c6b 3487
41bd17a4 3488NAME: store_avg_object_size
3489COMMENT: (kbytes)
3e62bd58 3490TYPE: kb_int64_t
41bd17a4 3491DEFAULT: 13 KB
3492LOC: Config.Store.avgObjectSize
3493DOC_START
3494 Average object size, used to estimate number of objects your
3495 cache can hold. The default is 13 KB.
cccac0a2 3496DOC_END
3497
41bd17a4 3498NAME: store_objects_per_bucket
3499TYPE: int
3500DEFAULT: 20
3501LOC: Config.Store.objectsPerBucket
3502DOC_START
3503 Target number of objects per bucket in the store hash table.
3504 Lowering this value increases the total number of buckets and
3505 also the storage maintenance rate. The default is 20.
3506DOC_END
3507
3508COMMENT_START
3509 HTTP OPTIONS
3510 -----------------------------------------------------------------------------
3511COMMENT_END
3512
f04b37d8 3513NAME: request_header_max_size
3514COMMENT: (KB)
3515TYPE: b_size_t
df2eec10 3516DEFAULT: 64 KB
f04b37d8 3517LOC: Config.maxRequestHeaderSize
3518DOC_START
3519 This specifies the maximum size for HTTP headers in a request.
3520 Request headers are usually relatively small (about 512 bytes).
3521 Placing a limit on the request header size will catch certain
3522 bugs (for example with persistent connections) and possibly
3523 buffer-overflow or denial-of-service attacks.
3524DOC_END
3525
3526NAME: reply_header_max_size
3527COMMENT: (KB)
3528TYPE: b_size_t
df2eec10 3529DEFAULT: 64 KB
f04b37d8 3530LOC: Config.maxReplyHeaderSize
3531DOC_START
3532 This specifies the maximum size for HTTP headers in a reply.
3533 Reply headers are usually relatively small (about 512 bytes).
3534 Placing a limit on the reply header size will catch certain
3535 bugs (for example with persistent connections) and possibly
3536 buffer-overflow or denial-of-service attacks.
3537DOC_END
3538
3539NAME: request_body_max_size
3540COMMENT: (bytes)
3541TYPE: b_int64_t
3542DEFAULT: 0 KB
3543LOC: Config.maxRequestBodySize
3544DOC_START
3545 This specifies the maximum size for an HTTP request body.
3546 In other words, the maximum size of a PUT/POST request.
3547 A user who attempts to send a request with a body larger
3548 than this limit receives an "Invalid Request" error message.
3549 If you set this parameter to a zero (the default), there will
3550 be no limit imposed.
3551DOC_END
3552
3ff65596
AR
3553NAME: chunked_request_body_max_size
3554COMMENT: (bytes)
3555TYPE: b_int64_t
3556DEFAULT: 64 KB
3557LOC: Config.maxChunkedRequestBodySize
3558DOC_START
3559 A broken or confused HTTP/1.1 client may send a chunked HTTP
3560 request to Squid. Squid does not have full support for that
3561 feature yet. To cope with such requests, Squid buffers the
3562 entire request and then dechunks request body to create a
3563 plain HTTP/1.0 request with a known content length. The plain
3564 request is then used by the rest of Squid code as usual.
3565
3566 The option value specifies the maximum size of the buffer used
3567 to hold the request before the conversion. If the chunked
3568 request size exceeds the specified limit, the conversion
3569 fails, and the client receives an "unsupported request" error,
3570 as if dechunking was disabled.
3571
3572 Dechunking is enabled by default. To disable conversion of
3573 chunked requests, set the maximum to zero.
3574
3575 Request dechunking feature and this option in particular are a
3576 temporary hack. When chunking requests and responses are fully
3577 supported, there will be no need to buffer a chunked request.
3578DOC_END
3579
41bd17a4 3580NAME: broken_posts
aa49962c 3581IFDEF: HTTP_VIOLATIONS
cccac0a2 3582TYPE: acl_access
cccac0a2 3583DEFAULT: none
41bd17a4 3584LOC: Config.accessList.brokenPosts
cccac0a2 3585DOC_START
41bd17a4 3586 A list of ACL elements which, if matched, causes Squid to send
3587 an extra CRLF pair after the body of a PUT/POST request.
cccac0a2 3588
41bd17a4 3589 Some HTTP servers has broken implementations of PUT/POST,
3590 and rely on an extra CRLF pair sent by some WWW clients.
cccac0a2 3591
41bd17a4 3592 Quote from RFC2616 section 4.1 on this matter:
cccac0a2 3593
41bd17a4 3594 Note: certain buggy HTTP/1.0 client implementations generate an
3595 extra CRLF's after a POST request. To restate what is explicitly
3596 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
3597 a request with an extra CRLF.
cccac0a2 3598
b3567eb5
FC
3599 This clause only supports fast acl types.
3600 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3601
41bd17a4 3602Example:
3603 acl buggy_server url_regex ^http://....
3604 broken_posts allow buggy_server
3605DOC_END
cccac0a2 3606
41bd17a4 3607NAME: via
3608IFDEF: HTTP_VIOLATIONS
3609COMMENT: on|off
3610TYPE: onoff
3611DEFAULT: on
3612LOC: Config.onoff.via
3613DOC_START
3614 If set (default), Squid will include a Via header in requests and
3615 replies as required by RFC2616.
3616DOC_END
4cc6eb12 3617
41bd17a4 3618NAME: ie_refresh
3619COMMENT: on|off
3620TYPE: onoff
3621LOC: Config.onoff.ie_refresh
3622DEFAULT: off
3623DOC_START
3624 Microsoft Internet Explorer up until version 5.5 Service
3625 Pack 1 has an issue with transparent proxies, wherein it
3626 is impossible to force a refresh. Turning this on provides
3627 a partial fix to the problem, by causing all IMS-REFRESH
3628 requests from older IE versions to check the origin server
3629 for fresh content. This reduces hit ratio by some amount
3630 (~10% in my experience), but allows users to actually get
3631 fresh content when they want it. Note because Squid
3632 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
3633 of 5.5 is unchanged from old versions of Squid (i.e. a
3634 forced refresh is impossible). Newer versions of IE will,
3635 hopefully, continue to have the new behavior and will be
3636 handled based on that assumption. This option defaults to
3637 the old Squid behavior, which is better for hit ratios but
3638 worse for clients using IE, if they need to be able to
3639 force fresh content.
3640DOC_END
b9d7fe3e 3641
41bd17a4 3642NAME: vary_ignore_expire
3643COMMENT: on|off
3644TYPE: onoff
3645LOC: Config.onoff.vary_ignore_expire
3646DEFAULT: off
3647DOC_START
3648 Many HTTP servers supporting Vary gives such objects
3649 immediate expiry time with no cache-control header
3650 when requested by a HTTP/1.0 client. This option
3651 enables Squid to ignore such expiry times until
3652 HTTP/1.1 is fully implemented.
7e73cd78
AJ
3653
3654 WARNING: If turned on this may eventually cause some
3655 varying objects not intended for caching to get cached.
cccac0a2 3656DOC_END
c4ab8329 3657
41bd17a4 3658NAME: request_entities
3659TYPE: onoff
3660LOC: Config.onoff.request_entities
3661DEFAULT: off
3662DOC_START
3663 Squid defaults to deny GET and HEAD requests with request entities,
3664 as the meaning of such requests are undefined in the HTTP standard
3665 even if not explicitly forbidden.
0976f8db 3666
41bd17a4 3667 Set this directive to on if you have clients which insists
3668 on sending request entities in GET or HEAD requests. But be warned
3669 that there is server software (both proxies and web servers) which
3670 can fail to properly process this kind of request which may make you
3671 vulnerable to cache pollution attacks if enabled.
cccac0a2 3672DOC_END
6b53c392 3673
41bd17a4 3674NAME: request_header_access
3675IFDEF: HTTP_VIOLATIONS
3676TYPE: http_header_access[]
3677LOC: Config.request_header_access
cccac0a2 3678DEFAULT: none
cccac0a2 3679DOC_START
41bd17a4 3680 Usage: request_header_access header_name allow|deny [!]aclname ...
0976f8db 3681
41bd17a4 3682 WARNING: Doing this VIOLATES the HTTP standard. Enabling
3683 this feature could make you liable for problems which it
3684 causes.
0976f8db 3685
41bd17a4 3686 This option replaces the old 'anonymize_headers' and the
3687 older 'http_anonymizer' option with something that is much
3688 more configurable. This new method creates a list of ACLs
3689 for each header, allowing you very fine-tuned header
3690 mangling.
934b03fc 3691
41bd17a4 3692 This option only applies to request headers, i.e., from the
3693 client to the server.
5401aa8d 3694
41bd17a4 3695 You can only specify known headers for the header name.
3696 Other headers are reclassified as 'Other'. You can also
3697 refer to all the headers with 'All'.
5401aa8d 3698
41bd17a4 3699 For example, to achieve the same behavior as the old
3700 'http_anonymizer standard' option, you should use:
5401aa8d 3701
41bd17a4 3702 request_header_access From deny all
3703 request_header_access Referer deny all
3704 request_header_access Server deny all
3705 request_header_access User-Agent deny all
3706 request_header_access WWW-Authenticate deny all
3707 request_header_access Link deny all
5401aa8d 3708
41bd17a4 3709 Or, to reproduce the old 'http_anonymizer paranoid' feature
3710 you should use:
5401aa8d 3711
41bd17a4 3712 request_header_access Allow allow all
3713 request_header_access Authorization allow all
3714 request_header_access WWW-Authenticate allow all
3715 request_header_access Proxy-Authorization allow all
3716 request_header_access Proxy-Authenticate allow all
3717 request_header_access Cache-Control allow all
3718 request_header_access Content-Encoding allow all
3719 request_header_access Content-Length allow all
3720 request_header_access Content-Type allow all
3721 request_header_access Date allow all
3722 request_header_access Expires allow all
3723 request_header_access Host allow all
3724 request_header_access If-Modified-Since allow all
3725 request_header_access Last-Modified allow all
3726 request_header_access Location allow all
3727 request_header_access Pragma allow all
3728 request_header_access Accept allow all
3729 request_header_access Accept-Charset allow all
3730 request_header_access Accept-Encoding allow all
3731 request_header_access Accept-Language allow all
3732 request_header_access Content-Language allow all
3733 request_header_access Mime-Version allow all
3734 request_header_access Retry-After allow all
3735 request_header_access Title allow all
3736 request_header_access Connection allow all
3737 request_header_access Proxy-Connection allow all
3738 request_header_access All deny all
5401aa8d 3739
41bd17a4 3740 although many of those are HTTP reply headers, and so should be
3741 controlled with the reply_header_access directive.
5401aa8d 3742
41bd17a4 3743 By default, all headers are allowed (no anonymizing is
3744 performed).
5401aa8d 3745DOC_END
3746
41bd17a4 3747NAME: reply_header_access
3748IFDEF: HTTP_VIOLATIONS
3749TYPE: http_header_access[]
3750LOC: Config.reply_header_access
cccac0a2 3751DEFAULT: none
3752DOC_START
41bd17a4 3753 Usage: reply_header_access header_name allow|deny [!]aclname ...
934b03fc 3754
41bd17a4 3755 WARNING: Doing this VIOLATES the HTTP standard. Enabling
3756 this feature could make you liable for problems which it
3757 causes.
934b03fc 3758
41bd17a4 3759 This option only applies to reply headers, i.e., from the
3760 server to the client.
934b03fc 3761
41bd17a4 3762 This is the same as request_header_access, but in the other
3763 direction.
6b53c392 3764
41bd17a4 3765 This option replaces the old 'anonymize_headers' and the
3766 older 'http_anonymizer' option with something that is much
3767 more configurable. This new method creates a list of ACLs
3768 for each header, allowing you very fine-tuned header
3769 mangling.
cccac0a2 3770
41bd17a4 3771 You can only specify known headers for the header name.
3772 Other headers are reclassified as 'Other'. You can also
3773 refer to all the headers with 'All'.
cccac0a2 3774
41bd17a4 3775 For example, to achieve the same behavior as the old
3776 'http_anonymizer standard' option, you should use:
cccac0a2 3777
41bd17a4 3778 reply_header_access From deny all
3779 reply_header_access Referer deny all
3780 reply_header_access Server deny all
3781 reply_header_access User-Agent deny all
3782 reply_header_access WWW-Authenticate deny all
3783 reply_header_access Link deny all
cccac0a2 3784
41bd17a4 3785 Or, to reproduce the old 'http_anonymizer paranoid' feature
3786 you should use:
cccac0a2 3787
41bd17a4 3788 reply_header_access Allow allow all
3789 reply_header_access Authorization allow all
3790 reply_header_access WWW-Authenticate allow all
3791 reply_header_access Proxy-Authorization allow all
3792 reply_header_access Proxy-Authenticate allow all
3793 reply_header_access Cache-Control allow all
3794 reply_header_access Content-Encoding allow all
3795 reply_header_access Content-Length allow all
3796 reply_header_access Content-Type allow all
3797 reply_header_access Date allow all
3798 reply_header_access Expires allow all
3799 reply_header_access Host allow all
3800 reply_header_access If-Modified-Since allow all
3801 reply_header_access Last-Modified allow all
3802 reply_header_access Location allow all
3803 reply_header_access Pragma allow all
3804 reply_header_access Accept allow all
3805 reply_header_access Accept-Charset allow all
3806 reply_header_access Accept-Encoding allow all
3807 reply_header_access Accept-Language allow all
3808 reply_header_access Content-Language allow all
3809 reply_header_access Mime-Version allow all
3810 reply_header_access Retry-After allow all
3811 reply_header_access Title allow all
3812 reply_header_access Connection allow all
3813 reply_header_access Proxy-Connection allow all
3814 reply_header_access All deny all
cccac0a2 3815
41bd17a4 3816 although the HTTP request headers won't be usefully controlled
3817 by this directive -- see request_header_access for details.
cccac0a2 3818
41bd17a4 3819 By default, all headers are allowed (no anonymizing is
3820 performed).
cccac0a2 3821DOC_END
3822
41bd17a4 3823NAME: header_replace
3824IFDEF: HTTP_VIOLATIONS
3825TYPE: http_header_replace[]
3826LOC: Config.request_header_access
cccac0a2 3827DEFAULT: none
41bd17a4 3828DOC_START
3829 Usage: header_replace header_name message
3830 Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
cccac0a2 3831
41bd17a4 3832 This option allows you to change the contents of headers
3833 denied with header_access above, by replacing them with
3834 some fixed string. This replaces the old fake_user_agent
3835 option.
cccac0a2 3836
41bd17a4 3837 This only applies to request headers, not reply headers.
cccac0a2 3838
41bd17a4 3839 By default, headers are removed if denied.
3840DOC_END
cccac0a2 3841
41bd17a4 3842NAME: relaxed_header_parser
3843COMMENT: on|off|warn
3844TYPE: tristate
3845LOC: Config.onoff.relaxed_header_parser
3846DEFAULT: on
3847DOC_START
3848 In the default "on" setting Squid accepts certain forms
3849 of non-compliant HTTP messages where it is unambiguous
3850 what the sending application intended even if the message
3851 is not correctly formatted. The messages is then normalized
3852 to the correct form when forwarded by Squid.
cccac0a2 3853
41bd17a4 3854 If set to "warn" then a warning will be emitted in cache.log
3855 each time such HTTP error is encountered.
cccac0a2 3856
41bd17a4 3857 If set to "off" then such HTTP errors will cause the request
3858 or response to be rejected.
3859DOC_END
7d90757b 3860
41bd17a4 3861COMMENT_START
3862 TIMEOUTS
3863 -----------------------------------------------------------------------------
3864COMMENT_END
3865
3866NAME: forward_timeout
3867COMMENT: time-units
3868TYPE: time_t
3869LOC: Config.Timeout.forward
3870DEFAULT: 4 minutes
3871DOC_START
3872 This parameter specifies how long Squid should at most attempt in
3873 finding a forwarding path for the request before giving up.
cccac0a2 3874DOC_END
3875
41bd17a4 3876NAME: connect_timeout
3877COMMENT: time-units
3878TYPE: time_t
3879LOC: Config.Timeout.connect
3880DEFAULT: 1 minute
057f5854 3881DOC_START
41bd17a4 3882 This parameter specifies how long to wait for the TCP connect to
3883 the requested server or peer to complete before Squid should
3884 attempt to find another path where to forward the request.
057f5854 3885DOC_END
3886
41bd17a4 3887NAME: peer_connect_timeout
3888COMMENT: time-units
3889TYPE: time_t
3890LOC: Config.Timeout.peer_connect
3891DEFAULT: 30 seconds
cccac0a2 3892DOC_START
41bd17a4 3893 This parameter specifies how long to wait for a pending TCP
3894 connection to a peer cache. The default is 30 seconds. You
3895 may also set different timeout values for individual neighbors
3896 with the 'connect-timeout' option on a 'cache_peer' line.
3897DOC_END
7f7db318 3898
41bd17a4 3899NAME: read_timeout
3900COMMENT: time-units
3901TYPE: time_t
3902LOC: Config.Timeout.read
3903DEFAULT: 15 minutes
3904DOC_START
3905 The read_timeout is applied on server-side connections. After
3906 each successful read(), the timeout will be extended by this
3907 amount. If no data is read again after this amount of time,
3908 the request is aborted and logged with ERR_READ_TIMEOUT. The
3909 default is 15 minutes.
3910DOC_END
cccac0a2 3911
41bd17a4 3912NAME: request_timeout
3913TYPE: time_t
3914LOC: Config.Timeout.request
3915DEFAULT: 5 minutes
3916DOC_START
3917 How long to wait for an HTTP request after initial
3918 connection establishment.
3919DOC_END
cccac0a2 3920
41bd17a4 3921NAME: persistent_request_timeout
3922TYPE: time_t
3923LOC: Config.Timeout.persistent_request
3924DEFAULT: 2 minutes
3925DOC_START
3926 How long to wait for the next HTTP request on a persistent
3927 connection after the previous request completes.
3928DOC_END
cccac0a2 3929
41bd17a4 3930NAME: client_lifetime
3931COMMENT: time-units
3932TYPE: time_t
3933LOC: Config.Timeout.lifetime
3934DEFAULT: 1 day
3935DOC_START
3936 The maximum amount of time a client (browser) is allowed to
3937 remain connected to the cache process. This protects the Cache
3938 from having a lot of sockets (and hence file descriptors) tied up
3939 in a CLOSE_WAIT state from remote clients that go away without
3940 properly shutting down (either because of a network failure or
3941 because of a poor client implementation). The default is one
3942 day, 1440 minutes.
7d90757b 3943
41bd17a4 3944 NOTE: The default value is intended to be much larger than any
3945 client would ever need to be connected to your cache. You
3946 should probably change client_lifetime only as a last resort.
3947 If you seem to have many client connections tying up
3948 filedescriptors, we recommend first tuning the read_timeout,
3949 request_timeout, persistent_request_timeout and quick_abort values.
cccac0a2 3950DOC_END
3951
41bd17a4 3952NAME: half_closed_clients
3953TYPE: onoff
3954LOC: Config.onoff.half_closed_clients
0c2f5c4f 3955DEFAULT: off
4eb368f9 3956DOC_START
41bd17a4 3957 Some clients may shutdown the sending side of their TCP
3958 connections, while leaving their receiving sides open. Sometimes,
3959 Squid can not tell the difference between a half-closed and a
0c2f5c4f
AJ
3960 fully-closed TCP connection.
3961
3962 By default, Squid will immediately close client connections when
3963 read(2) returns "no more data to read."
3964
abdf1651 3965 Change this option to 'on' and Squid will keep open connections
0c2f5c4f
AJ
3966 until a read(2) or write(2) on the socket returns an error.
3967 This may show some benefits for reverse proxies. But if not
3968 it is recommended to leave OFF.
4eb368f9 3969DOC_END
3970
41bd17a4 3971NAME: pconn_timeout
3972TYPE: time_t
3973LOC: Config.Timeout.pconn
3974DEFAULT: 1 minute
cccac0a2 3975DOC_START
41bd17a4 3976 Timeout for idle persistent connections to servers and other
3977 proxies.
3978DOC_END
cccac0a2 3979
41bd17a4 3980NAME: ident_timeout
3981TYPE: time_t
3982IFDEF: USE_IDENT
4daaf3cb 3983LOC: Ident::TheConfig.timeout
41bd17a4 3984DEFAULT: 10 seconds
3985DOC_START
3986 Maximum time to wait for IDENT lookups to complete.
cccac0a2 3987
41bd17a4 3988 If this is too high, and you enabled IDENT lookups from untrusted
3989 users, you might be susceptible to denial-of-service by having
3990 many ident requests going at once.
cccac0a2 3991DOC_END
3992
41bd17a4 3993NAME: shutdown_lifetime
3994COMMENT: time-units
3995TYPE: time_t
3996LOC: Config.shutdownLifetime
3997DEFAULT: 30 seconds
cccac0a2 3998DOC_START
41bd17a4 3999 When SIGTERM or SIGHUP is received, the cache is put into
4000 "shutdown pending" mode until all active sockets are closed.
4001 This value is the lifetime to set for all open descriptors
4002 during shutdown mode. Any active clients after this many
4003 seconds will receive a 'timeout' message.
cccac0a2 4004DOC_END
0976f8db 4005
cccac0a2 4006COMMENT_START
4007 ADMINISTRATIVE PARAMETERS
4008 -----------------------------------------------------------------------------
4009COMMENT_END
4010
4011NAME: cache_mgr
4012TYPE: string
4013DEFAULT: webmaster
4014LOC: Config.adminEmail
4015DOC_START
4016 Email-address of local cache manager who will receive
4017 mail if the cache dies. The default is "webmaster."
4018DOC_END
4019
abacf776 4020NAME: mail_from
4021TYPE: string
4022DEFAULT: none
4023LOC: Config.EmailFrom
4024DOC_START
4025 From: email-address for mail sent when the cache dies.
4026 The default is to use 'appname@unique_hostname'.
b8c0c06d 4027 Default appname value is "squid", can be changed into
abacf776 4028 src/globals.h before building squid.
4029DOC_END
4030
d084bf20 4031NAME: mail_program
4032TYPE: eol
4033DEFAULT: mail
4034LOC: Config.EmailProgram
4035DOC_START
4036 Email program used to send mail if the cache dies.
846a5e31 4037 The default is "mail". The specified program must comply
d084bf20 4038 with the standard Unix mail syntax:
846a5e31 4039 mail-program recipient < mailfile
4040
d084bf20 4041 Optional command line options can be specified.
4042DOC_END
4043
cccac0a2 4044NAME: cache_effective_user
4045TYPE: string
5483d916 4046DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
cccac0a2 4047LOC: Config.effectiveUser
e3d74828 4048DOC_START
4049 If you start Squid as root, it will change its effective/real
4050 UID/GID to the user specified below. The default is to change
5483d916 4051 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
64e288bd 4052 see also; cache_effective_group
e3d74828 4053DOC_END
4054
cccac0a2 4055NAME: cache_effective_group
4056TYPE: string
4057DEFAULT: none
4058LOC: Config.effectiveGroup
4059DOC_START
64e288bd 4060 Squid sets the GID to the effective user's default group ID
4061 (taken from the password file) and supplementary group list
4062 from the groups membership.
4063
e3d74828 4064 If you want Squid to run with a specific GID regardless of
4065 the group memberships of the effective user then set this
4066 to the group (or GID) you want Squid to run as. When set
64e288bd 4067 all other group privileges of the effective user are ignored
e3d74828 4068 and only this GID is effective. If Squid is not started as
64e288bd 4069 root the user starting Squid MUST be member of the specified
e3d74828 4070 group.
64e288bd 4071
4072 This option is not recommended by the Squid Team.
4073 Our preference is for administrators to configure a secure
4074 user account for squid with UID/GID matching system policies.
cccac0a2 4075DOC_END
4076
d3caee79 4077NAME: httpd_suppress_version_string
4078COMMENT: on|off
4079TYPE: onoff
4080DEFAULT: off
4081LOC: Config.onoff.httpd_suppress_version_string
4082DOC_START
4083 Suppress Squid version string info in HTTP headers and HTML error pages.
4084DOC_END
4085
cccac0a2 4086NAME: visible_hostname
4087TYPE: string
4088LOC: Config.visibleHostname
4089DEFAULT: none
4090DOC_START
4091 If you want to present a special hostname in error messages, etc,
7f7db318 4092 define this. Otherwise, the return value of gethostname()
cccac0a2 4093 will be used. If you have multiple caches in a cluster and
4094 get errors about IP-forwarding you must set them to have individual
4095 names with this setting.
4096DOC_END
4097
cccac0a2 4098NAME: unique_hostname
4099TYPE: string
4100LOC: Config.uniqueHostname
4101DEFAULT: none
4102DOC_START
4103 If you want to have multiple machines with the same
7f7db318 4104 'visible_hostname' you must give each machine a different
4105 'unique_hostname' so forwarding loops can be detected.
cccac0a2 4106DOC_END
4107
cccac0a2 4108NAME: hostname_aliases
4109TYPE: wordlist
4110LOC: Config.hostnameAliases
4111DEFAULT: none
4112DOC_START
7f7db318 4113 A list of other DNS names your cache has.
cccac0a2 4114DOC_END
0976f8db 4115
c642c141
AJ
4116NAME: umask
4117TYPE: int
4118LOC: Config.umask
4119DEFAULT: 027
4120DOC_START
4121 Minimum umask which should be enforced while the proxy
4122 is running, in addition to the umask set at startup.
4123
4124 For a traditional octal representation of umasks, start
4125 your value with 0.
4126DOC_END
4127
cccac0a2 4128COMMENT_START
4129 OPTIONS FOR THE CACHE REGISTRATION SERVICE
4130 -----------------------------------------------------------------------------
4131
4132 This section contains parameters for the (optional) cache
4133 announcement service. This service is provided to help
4134 cache administrators locate one another in order to join or
4135 create cache hierarchies.
4136
4137 An 'announcement' message is sent (via UDP) to the registration
4138 service by Squid. By default, the announcement message is NOT
4139 SENT unless you enable it with 'announce_period' below.
4140
4141 The announcement message includes your hostname, plus the
4142 following information from this configuration file:
4143
4144 http_port
4145 icp_port
4146 cache_mgr
4147
4148 All current information is processed regularly and made
4149 available on the Web at http://www.ircache.net/Cache/Tracker/.
4150COMMENT_END
4151
4152NAME: announce_period
4153TYPE: time_t
4154LOC: Config.Announce.period
4155DEFAULT: 0
4156DOC_START
4157 This is how frequently to send cache announcements. The
4158 default is `0' which disables sending the announcement
4159 messages.
4160
e0855596 4161 To enable announcing your cache, just set an announce period.
cccac0a2 4162
e0855596
AJ
4163 Example:
4164 announce_period 1 day
cccac0a2 4165DOC_END
4166
cccac0a2 4167NAME: announce_host
4168TYPE: string
4169DEFAULT: tracker.ircache.net
4170LOC: Config.Announce.host
4171DOC_NONE
4172
4173NAME: announce_file
4174TYPE: string
4175DEFAULT: none
4176LOC: Config.Announce.file
4177DOC_NONE
4178
4179NAME: announce_port
4180TYPE: ushort
4181DEFAULT: 3131
4182LOC: Config.Announce.port
4183DOC_START
4184 announce_host and announce_port set the hostname and port
4185 number where the registration message will be sent.
4186
4187 Hostname will default to 'tracker.ircache.net' and port will
4188 default default to 3131. If the 'filename' argument is given,
4189 the contents of that file will be included in the announce
4190 message.
4191DOC_END
4192
8d6275c0 4193COMMENT_START
4194 HTTPD-ACCELERATOR OPTIONS
4195 -----------------------------------------------------------------------------
4196COMMENT_END
4197
cccac0a2 4198NAME: httpd_accel_surrogate_id
f41735ea 4199IFDEF: USE_SQUID_ESI
cccac0a2 4200TYPE: string
4201LOC: Config.Accel.surrogate_id
4202DEFAULT: unset-id
4203DOC_START
4204 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
4205 need an identification token to allow control targeting. Because
4206 a farm of surrogates may all perform the same tasks, they may share
4207 an identification token.
4208DOC_END
4209
4210NAME: http_accel_surrogate_remote
f41735ea 4211IFDEF: USE_SQUID_ESI
cccac0a2 4212COMMENT: on|off
4213TYPE: onoff
4214DEFAULT: off
4215LOC: Config.onoff.surrogate_is_remote
4216DOC_START
4217 Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
4218 Set this to on to have squid behave as a remote surrogate.
4219DOC_END
4220
4221NAME: esi_parser
f41735ea 4222IFDEF: USE_SQUID_ESI
964b44c3 4223COMMENT: libxml2|expat|custom
cccac0a2 4224TYPE: string
4225LOC: ESIParser::Type
4226DEFAULT: custom
4227DOC_START
4228 ESI markup is not strictly XML compatible. The custom ESI parser
4229 will give higher performance, but cannot handle non ASCII character
4230 encodings.
4231DOC_END
0976f8db 4232
9edd9041 4233COMMENT_START
8d6275c0 4234 DELAY POOL PARAMETERS
9edd9041 4235 -----------------------------------------------------------------------------
4236COMMENT_END
4237
4238NAME: delay_pools
4239TYPE: delay_pool_count
4240DEFAULT: 0
4241IFDEF: DELAY_POOLS
4242LOC: Config.Delay
4243DOC_START
4244 This represents the number of delay pools to be used. For example,
4245 if you have one class 2 delay pool and one class 3 delays pool, you
4246 have a total of 2 delay pools.
4247DOC_END
4248
4249NAME: delay_class
4250TYPE: delay_pool_class
4251DEFAULT: none
4252IFDEF: DELAY_POOLS
4253LOC: Config.Delay
4254DOC_START
4255 This defines the class of each delay pool. There must be exactly one
4256 delay_class line for each delay pool. For example, to define two
4257 delay pools, one of class 2 and one of class 3, the settings above
4258 and here would be:
4259
b1fb3348
AJ
4260 Example:
4261 delay_pools 4 # 4 delay pools
4262 delay_class 1 2 # pool 1 is a class 2 pool
4263 delay_class 2 3 # pool 2 is a class 3 pool
4264 delay_class 3 4 # pool 3 is a class 4 pool
4265 delay_class 4 5 # pool 4 is a class 5 pool
9edd9041 4266
4267 The delay pool classes are:
4268
4269 class 1 Everything is limited by a single aggregate
4270 bucket.
4271
4272 class 2 Everything is limited by a single aggregate
4273 bucket as well as an "individual" bucket chosen
b1fb3348 4274 from bits 25 through 32 of the IPv4 address.
9edd9041 4275
4276 class 3 Everything is limited by a single aggregate
4277 bucket as well as a "network" bucket chosen
4278 from bits 17 through 24 of the IP address and a
4279 "individual" bucket chosen from bits 17 through
b1fb3348 4280 32 of the IPv4 address.
9edd9041 4281
4282 class 4 Everything in a class 3 delay pool, with an
4283 additional limit on a per user basis. This
4284 only takes effect if the username is established
4285 in advance - by forcing authentication in your
4286 http_access rules.
4287
4288 class 5 Requests are grouped according their tag (see
4289 external_acl's tag= reply).
4290
4291 NOTE: If an IP address is a.b.c.d
4292 -> bits 25 through 32 are "d"
4293 -> bits 17 through 24 are "c"
4294 -> bits 17 through 32 are "c * 256 + d"
b1fb3348
AJ
4295
4296 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
4297 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
9edd9041 4298DOC_END
4299
4300NAME: delay_access
4301TYPE: delay_pool_access
4302DEFAULT: none
4303IFDEF: DELAY_POOLS
4304LOC: Config.Delay
4305DOC_START
4306 This is used to determine which delay pool a request falls into.
4307
4308 delay_access is sorted per pool and the matching starts with pool 1,
4309 then pool 2, ..., and finally pool N. The first delay pool where the
4310 request is allowed is selected for the request. If it does not allow
4311 the request to any pool then the request is not delayed (default).
4312
4313 For example, if you want some_big_clients in delay
4314 pool 1 and lotsa_little_clients in delay pool 2:
4315
4316Example:
4317 delay_access 1 allow some_big_clients
4318 delay_access 1 deny all
4319 delay_access 2 allow lotsa_little_clients
4320 delay_access 2 deny all
4321 delay_access 3 allow authenticated_clients
4322DOC_END
4323
4324NAME: delay_parameters
4325TYPE: delay_pool_rates
4326DEFAULT: none
4327IFDEF: DELAY_POOLS
4328LOC: Config.Delay
4329DOC_START
4330 This defines the parameters for a delay pool. Each delay pool has
4331 a number of "buckets" associated with it, as explained in the
4332 description of delay_class. For a class 1 delay pool, the syntax is:
4333
4334delay_parameters pool aggregate
4335
4336 For a class 2 delay pool:
4337
4338delay_parameters pool aggregate individual
4339
4340 For a class 3 delay pool:
4341
4342delay_parameters pool aggregate network individual
4343
4344 For a class 4 delay pool:
4345
4346delay_parameters pool aggregate network individual user
4347
4348 For a class 5 delay pool:
4349
4350delay_parameters pool tag
4351
4352 The variables here are:
4353
4354 pool a pool number - ie, a number between 1 and the
4355 number specified in delay_pools as used in
4356 delay_class lines.
4357
4358 aggregate the "delay parameters" for the aggregate bucket
4359 (class 1, 2, 3).
4360
4361 individual the "delay parameters" for the individual
4362 buckets (class 2, 3).
4363
4364 network the "delay parameters" for the network buckets
4365 (class 3).
4366
4367 user the delay parameters for the user buckets
4368 (class 4).
4369
4370 tag the delay parameters for the tag buckets
4371 (class 5).
4372
4373 A pair of delay parameters is written restore/maximum, where restore is
4374 the number of bytes (not bits - modem and network speeds are usually
4375 quoted in bits) per second placed into the bucket, and maximum is the
4376 maximum number of bytes which can be in the bucket at any time.
4377
4378 For example, if delay pool number 1 is a class 2 delay pool as in the
4379 above example, and is being used to strictly limit each host to 64kbps
4380 (plus overheads), with no overall limit, the line is:
4381
4382delay_parameters 1 -1/-1 8000/8000
4383
4384 Note that the figure -1 is used to represent "unlimited".
4385
4386 And, if delay pool number 2 is a class 3 delay pool as in the above
4387 example, and you want to limit it to a total of 256kbps (strict limit)
4388 with each 8-bit network permitted 64kbps (strict limit) and each
4389 individual host permitted 4800bps with a bucket maximum size of 64kb
4390 to permit a decent web page to be downloaded at a decent speed
4391 (if the network is not being limited due to overuse) but slow down
4392 large downloads more significantly:
4393
4394delay_parameters 2 32000/32000 8000/8000 600/8000
4395
4396 There must be one delay_parameters line for each delay pool.
4397
4398 Finally, for a class 4 delay pool as in the example - each user will
4399 be limited to 128Kb no matter how many workstations they are logged into.:
4400
4401delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
4402DOC_END
4403
4404NAME: delay_initial_bucket_level
4405COMMENT: (percent, 0-100)
4406TYPE: ushort
4407DEFAULT: 50
4408IFDEF: DELAY_POOLS
4409LOC: Config.Delay.initial
4410DOC_START
4411 The initial bucket percentage is used to determine how much is put
4412 in each bucket when squid starts, is reconfigured, or first notices
4413 a host accessing it (in class 2 and class 3, individual hosts and
4414 networks only have buckets associated with them once they have been
4415 "seen" by squid).
4416DOC_END
4417
cccac0a2 4418COMMENT_START
8d6275c0 4419 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
cccac0a2 4420 -----------------------------------------------------------------------------
4421COMMENT_END
4422
8d6275c0 4423NAME: wccp_router
4424TYPE: address
4425LOC: Config.Wccp.router
4426DEFAULT: 0.0.0.0
4427IFDEF: USE_WCCP
e313ab0a
AJ
4428DOC_START
4429 Use this option to define your WCCP ``home'' router for
4430 Squid.
4431
4432 wccp_router supports a single WCCP(v1) router
4433
4434 wccp2_router supports multiple WCCPv2 routers
4435
4436 only one of the two may be used at the same time and defines
4437 which version of WCCP to use.
4438DOC_END
df2eec10 4439
8d6275c0 4440NAME: wccp2_router
9fb4efad 4441TYPE: IpAddress_list
8d6275c0 4442LOC: Config.Wccp2.router
cccac0a2 4443DEFAULT: none
8d6275c0 4444IFDEF: USE_WCCPv2
cccac0a2 4445DOC_START
8d6275c0 4446 Use this option to define your WCCP ``home'' router for
4447 Squid.
cccac0a2 4448
8d6275c0 4449 wccp_router supports a single WCCP(v1) router
cccac0a2 4450
8d6275c0 4451 wccp2_router supports multiple WCCPv2 routers
cccac0a2 4452
8d6275c0 4453 only one of the two may be used at the same time and defines
4454 which version of WCCP to use.
4455DOC_END
4456
4457NAME: wccp_version
cccac0a2 4458TYPE: int
8d6275c0 4459LOC: Config.Wccp.version
4460DEFAULT: 4
4461IFDEF: USE_WCCP
cccac0a2 4462DOC_START
8d6275c0 4463 This directive is only relevant if you need to set up WCCP(v1)
4464 to some very old and end-of-life Cisco routers. In all other
4465 setups it must be left unset or at the default setting.
4466 It defines an internal version in the WCCP(v1) protocol,
4467 with version 4 being the officially documented protocol.
cccac0a2 4468
8d6275c0 4469 According to some users, Cisco IOS 11.2 and earlier only
4470 support WCCP version 3. If you're using that or an earlier
4471 version of IOS, you may need to change this value to 3, otherwise
4472 do not specify this parameter.
cccac0a2 4473DOC_END
4474
8d6275c0 4475NAME: wccp2_rebuild_wait
4476TYPE: onoff
4477LOC: Config.Wccp2.rebuildwait
4478DEFAULT: on
4479IFDEF: USE_WCCPv2
4480DOC_START
4481 If this is enabled Squid will wait for the cache dir rebuild to finish
4482 before sending the first wccp2 HereIAm packet
4483DOC_END
cccac0a2 4484
8d6275c0 4485NAME: wccp2_forwarding_method
e313ab0a 4486TYPE: wccp2_method
8d6275c0 4487LOC: Config.Wccp2.forwarding_method
451c4786 4488DEFAULT: gre
8d6275c0 4489IFDEF: USE_WCCPv2
cccac0a2 4490DOC_START
699acd19 4491 WCCP2 allows the setting of forwarding methods between the
8d6275c0 4492 router/switch and the cache. Valid values are as follows:
cccac0a2 4493
451c4786
AJ
4494 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
4495 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 4496
8d6275c0 4497 Currently (as of IOS 12.4) cisco routers only support GRE.
4498 Cisco switches only support the L2 redirect assignment method.
cccac0a2 4499DOC_END
4500
8d6275c0 4501NAME: wccp2_return_method
e313ab0a 4502TYPE: wccp2_method
8d6275c0 4503LOC: Config.Wccp2.return_method
451c4786 4504DEFAULT: gre
8d6275c0 4505IFDEF: USE_WCCPv2
cccac0a2 4506DOC_START
699acd19 4507 WCCP2 allows the setting of return methods between the
8d6275c0 4508 router/switch and the cache for packets that the cache
4509 decides not to handle. Valid values are as follows:
cccac0a2 4510
451c4786
AJ
4511 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
4512 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 4513
8d6275c0 4514 Currently (as of IOS 12.4) cisco routers only support GRE.
4515 Cisco switches only support the L2 redirect assignment.
cccac0a2 4516
699acd19 4517 If the "ip wccp redirect exclude in" command has been
8d6275c0 4518 enabled on the cache interface, then it is still safe for
4519 the proxy server to use a l2 redirect method even if this
4520 option is set to GRE.
cccac0a2 4521DOC_END
4522
8d6275c0 4523NAME: wccp2_assignment_method
451c4786 4524TYPE: wccp2_amethod
8d6275c0 4525LOC: Config.Wccp2.assignment_method
451c4786 4526DEFAULT: hash
8d6275c0 4527IFDEF: USE_WCCPv2
cccac0a2 4528DOC_START
8d6275c0 4529 WCCP2 allows the setting of methods to assign the WCCP hash
4530 Valid values are as follows:
cccac0a2 4531
451c4786
AJ
4532 hash - Hash assignment
4533 mask - Mask assignment
cccac0a2 4534
8d6275c0 4535 As a general rule, cisco routers support the hash assignment method
4536 and cisco switches support the mask assignment method.
4537DOC_END
cccac0a2 4538
8d6275c0 4539NAME: wccp2_service
4540TYPE: wccp2_service
4541LOC: Config.Wccp2.info
4542DEFAULT: none
4543DEFAULT_IF_NONE: standard 0
4544IFDEF: USE_WCCPv2
4545DOC_START
4546 WCCP2 allows for multiple traffic services. There are two
4547 types: "standard" and "dynamic". The standard type defines
4548 one service id - http (id 0). The dynamic service ids can be from
4549 51 to 255 inclusive. In order to use a dynamic service id
4550 one must define the type of traffic to be redirected; this is done
4551 using the wccp2_service_info option.
4552
4553 The "standard" type does not require a wccp2_service_info option,
4554 just specifying the service id will suffice.
4555
4556 MD5 service authentication can be enabled by adding
4557 "password=<password>" to the end of this service declaration.
4558
4559 Examples:
4560
4561 wccp2_service standard 0 # for the 'web-cache' standard service
4562 wccp2_service dynamic 80 # a dynamic service type which will be
4563 # fleshed out with subsequent options.
4564 wccp2_service standard 0 password=foo
8d6275c0 4565DOC_END
4566
4567NAME: wccp2_service_info
4568TYPE: wccp2_service_info
4569LOC: Config.Wccp2.info
4570DEFAULT: none
4571IFDEF: USE_WCCPv2
4572DOC_START
4573 Dynamic WCCPv2 services require further information to define the
4574 traffic you wish to have diverted.
4575
4576 The format is:
4577
4578 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
4579 priority=<priority> ports=<port>,<port>..
4580
4581 The relevant WCCPv2 flags:
4582 + src_ip_hash, dst_ip_hash
005fe566 4583 + source_port_hash, dst_port_hash
8d6275c0 4584 + src_ip_alt_hash, dst_ip_alt_hash
4585 + src_port_alt_hash, dst_port_alt_hash
4586 + ports_source
4587
4588 The port list can be one to eight entries.
4589
4590 Example:
4591
4592 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
4593 priority=240 ports=80
4594
4595 Note: the service id must have been defined by a previous
4596 'wccp2_service dynamic <id>' entry.
4597DOC_END
4598
4599NAME: wccp2_weight
4600TYPE: int
4601LOC: Config.Wccp2.weight
4602DEFAULT: 10000
4603IFDEF: USE_WCCPv2
4604DOC_START
4605 Each cache server gets assigned a set of the destination
4606 hash proportional to their weight.
4607DOC_END
4608
4609NAME: wccp_address
4610TYPE: address
4611LOC: Config.Wccp.address
4612DEFAULT: 0.0.0.0
4613IFDEF: USE_WCCP
4614DOC_NONE
df2eec10 4615
8d6275c0 4616NAME: wccp2_address
4617TYPE: address
4618LOC: Config.Wccp2.address
4619DEFAULT: 0.0.0.0
4620IFDEF: USE_WCCPv2
4621DOC_START
4622 Use this option if you require WCCP to use a specific
4623 interface address.
4624
4625 The default behavior is to not bind to any specific address.
4626DOC_END
4627
4628COMMENT_START
4629 PERSISTENT CONNECTION HANDLING
4630 -----------------------------------------------------------------------------
4631
4632 Also see "pconn_timeout" in the TIMEOUTS section
4633COMMENT_END
4634
4635NAME: client_persistent_connections
4636TYPE: onoff
4637LOC: Config.onoff.client_pconns
4638DEFAULT: on
4639DOC_NONE
4640
4641NAME: server_persistent_connections
4642TYPE: onoff
4643LOC: Config.onoff.server_pconns
4644DEFAULT: on
4645DOC_START
4646 Persistent connection support for clients and servers. By
4647 default, Squid uses persistent connections (when allowed)
4648 with its clients and servers. You can use these options to
4649 disable persistent connections with clients and/or servers.
4650DOC_END
4651
4652NAME: persistent_connection_after_error
4653TYPE: onoff
4654LOC: Config.onoff.error_pconns
4655DEFAULT: off
4656DOC_START
4657 With this directive the use of persistent connections after
4658 HTTP errors can be disabled. Useful if you have clients
4659 who fail to handle errors on persistent connections proper.
4660DOC_END
4661
4662NAME: detect_broken_pconn
4663TYPE: onoff
4664LOC: Config.onoff.detect_broken_server_pconns
4665DEFAULT: off
4666DOC_START
4667 Some servers have been found to incorrectly signal the use
4668 of HTTP/1.0 persistent connections even on replies not
4669 compatible, causing significant delays. This server problem
4670 has mostly been seen on redirects.
4671
4672 By enabling this directive Squid attempts to detect such
4673 broken replies and automatically assume the reply is finished
4674 after 10 seconds timeout.
4675DOC_END
4676
4677COMMENT_START
4678 CACHE DIGEST OPTIONS
4679 -----------------------------------------------------------------------------
4680COMMENT_END
4681
4682NAME: digest_generation
4683IFDEF: USE_CACHE_DIGESTS
4684TYPE: onoff
4685LOC: Config.onoff.digest_generation
4686DEFAULT: on
4687DOC_START
4688 This controls whether the server will generate a Cache Digest
4689 of its contents. By default, Cache Digest generation is
13e917b5 4690 enabled if Squid is compiled with --enable-cache-digests defined.
8d6275c0 4691DOC_END
4692
4693NAME: digest_bits_per_entry
4694IFDEF: USE_CACHE_DIGESTS
4695TYPE: int
4696LOC: Config.digest.bits_per_entry
4697DEFAULT: 5
4698DOC_START
4699 This is the number of bits of the server's Cache Digest which
4700 will be associated with the Digest entry for a given HTTP
4701 Method and URL (public key) combination. The default is 5.
4702DOC_END
4703
4704NAME: digest_rebuild_period
4705IFDEF: USE_CACHE_DIGESTS
4706COMMENT: (seconds)
4707TYPE: time_t
4708LOC: Config.digest.rebuild_period
4709DEFAULT: 1 hour
4710DOC_START
749ceff8 4711 This is the wait time between Cache Digest rebuilds.
8d6275c0 4712DOC_END
4713
4714NAME: digest_rewrite_period
4715COMMENT: (seconds)
4716IFDEF: USE_CACHE_DIGESTS
4717TYPE: time_t
4718LOC: Config.digest.rewrite_period
4719DEFAULT: 1 hour
4720DOC_START
749ceff8 4721 This is the wait time between Cache Digest writes to
8d6275c0 4722 disk.
4723DOC_END
4724
4725NAME: digest_swapout_chunk_size
4726COMMENT: (bytes)
4727TYPE: b_size_t
4728IFDEF: USE_CACHE_DIGESTS
4729LOC: Config.digest.swapout_chunk_size
4730DEFAULT: 4096 bytes
4731DOC_START
4732 This is the number of bytes of the Cache Digest to write to
4733 disk at a time. It defaults to 4096 bytes (4KB), the Squid
4734 default swap page.
4735DOC_END
4736
4737NAME: digest_rebuild_chunk_percentage
4738COMMENT: (percent, 0-100)
4739IFDEF: USE_CACHE_DIGESTS
4740TYPE: int
4741LOC: Config.digest.rebuild_chunk_percentage
4742DEFAULT: 10
4743DOC_START
4744 This is the percentage of the Cache Digest to be scanned at a
4745 time. By default it is set to 10% of the Cache Digest.
4746DOC_END
4747
1db9eacd 4748COMMENT_START
5473c134 4749 SNMP OPTIONS
1db9eacd 4750 -----------------------------------------------------------------------------
4751COMMENT_END
4752
5473c134 4753NAME: snmp_port
4754TYPE: ushort
4755LOC: Config.Port.snmp
87630341 4756DEFAULT: 0
5473c134 4757IFDEF: SQUID_SNMP
8d6275c0 4758DOC_START
87630341 4759 The port number where Squid listens for SNMP requests. To enable
4760 SNMP support set this to a suitable port number. Port number
4761 3401 is often used for the Squid SNMP agent. By default it's
4762 set to "0" (disabled)
e0855596
AJ
4763
4764 Example:
4765 snmp_port 3401
8d6275c0 4766DOC_END
4767
5473c134 4768NAME: snmp_access
4769TYPE: acl_access
4770LOC: Config.accessList.snmp
8d6275c0 4771DEFAULT: none
5473c134 4772DEFAULT_IF_NONE: deny all
4773IFDEF: SQUID_SNMP
8d6275c0 4774DOC_START
5473c134 4775 Allowing or denying access to the SNMP port.
8d6275c0 4776
5473c134 4777 All access to the agent is denied by default.
4778 usage:
8d6275c0 4779
5473c134 4780 snmp_access allow|deny [!]aclname ...
8d6275c0 4781
b3567eb5
FC
4782 This clause only supports fast acl types.
4783 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5473c134 4784Example:
4785 snmp_access allow snmppublic localhost
4786 snmp_access deny all
cccac0a2 4787DOC_END
4788
5473c134 4789NAME: snmp_incoming_address
4790TYPE: address
4791LOC: Config.Addrs.snmp_incoming
4792DEFAULT: 0.0.0.0
4793IFDEF: SQUID_SNMP
4794DOC_NONE
df2eec10 4795
5473c134 4796NAME: snmp_outgoing_address
4797TYPE: address
4798LOC: Config.Addrs.snmp_outgoing
4799DEFAULT: 255.255.255.255
4800IFDEF: SQUID_SNMP
cccac0a2 4801DOC_START
df2eec10 4802 Just like 'udp_incoming_address', but for the SNMP port.
cccac0a2 4803
5473c134 4804 snmp_incoming_address is used for the SNMP socket receiving
4805 messages from SNMP agents.
4806 snmp_outgoing_address is used for SNMP packets returned to SNMP
4807 agents.
cccac0a2 4808
5473c134 4809 The default snmp_incoming_address (0.0.0.0) is to listen on all
4810 available network interfaces.
cccac0a2 4811
5473c134 4812 If snmp_outgoing_address is set to 255.255.255.255 (the default)
4813 it will use the same socket as snmp_incoming_address. Only
4814 change this if you want to have SNMP replies sent using another
4815 address than where this Squid listens for SNMP queries.
cccac0a2 4816
5473c134 4817 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
4818 the same value since they both use port 3401.
cccac0a2 4819DOC_END
4820
5473c134 4821COMMENT_START
4822 ICP OPTIONS
4823 -----------------------------------------------------------------------------
4824COMMENT_END
4825
4826NAME: icp_port udp_port
4827TYPE: ushort
4828DEFAULT: 0
4829LOC: Config.Port.icp
cccac0a2 4830DOC_START
5473c134 4831 The port number where Squid sends and receives ICP queries to
4832 and from neighbor caches. The standard UDP port for ICP is 3130.
4833 Default is disabled (0).
e0855596
AJ
4834
4835 Example:
4836 icp_port @DEFAULT_ICP_PORT@
cccac0a2 4837DOC_END
4838
5473c134 4839NAME: htcp_port
4840IFDEF: USE_HTCP
4841TYPE: ushort
87630341 4842DEFAULT: 0
5473c134 4843LOC: Config.Port.htcp
cccac0a2 4844DOC_START
5473c134 4845 The port number where Squid sends and receives HTCP queries to
87630341 4846 and from neighbor caches. To turn it on you want to set it to
4847 4827. By default it is set to "0" (disabled).
e0855596
AJ
4848
4849 Example:
4850 htcp_port 4827
cccac0a2 4851DOC_END
4852
4853NAME: log_icp_queries
4854COMMENT: on|off
4855TYPE: onoff
4856DEFAULT: on
4857LOC: Config.onoff.log_udp
4858DOC_START
4859 If set, ICP queries are logged to access.log. You may wish
4860 do disable this if your ICP load is VERY high to speed things
4861 up or to simplify log analysis.
4862DOC_END
4863
5473c134 4864NAME: udp_incoming_address
4865TYPE: address
4866LOC:Config.Addrs.udp_incoming
4867DEFAULT: 0.0.0.0
8524d4b2 4868DOC_START
4869 udp_incoming_address is used for UDP packets received from other
4870 caches.
4871
4872 The default behavior is to not bind to any specific address.
4873
4874 Only change this if you want to have all UDP queries received on
4875 a specific interface/address.
4876
4877 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
4878 modules. Altering it will affect all of them in the same manner.
4879
4880 see also; udp_outgoing_address
4881
4882 NOTE, udp_incoming_address and udp_outgoing_address can not
4883 have the same value since they both use the same port.
4884DOC_END
cccac0a2 4885
5473c134 4886NAME: udp_outgoing_address
4887TYPE: address
4888LOC: Config.Addrs.udp_outgoing
4889DEFAULT: 255.255.255.255
cccac0a2 4890DOC_START
8524d4b2 4891 udp_outgoing_address is used for UDP packets sent out to other
5473c134 4892 caches.
cccac0a2 4893
5473c134 4894 The default behavior is to not bind to any specific address.
cccac0a2 4895
8524d4b2 4896 Instead it will use the same socket as udp_incoming_address.
4897 Only change this if you want to have UDP queries sent using another
4898 address than where this Squid listens for UDP queries from other
5473c134 4899 caches.
4900
8524d4b2 4901 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
4902 modules. Altering it will affect all of them in the same manner.
4903
4904 see also; udp_incoming_address
4905
5473c134 4906 NOTE, udp_incoming_address and udp_outgoing_address can not
8524d4b2 4907 have the same value since they both use the same port.
cccac0a2 4908DOC_END
4909
3d1e3e43 4910NAME: icp_hit_stale
4911COMMENT: on|off
4912TYPE: onoff
4913DEFAULT: off
4914LOC: Config.onoff.icp_hit_stale
4915DOC_START
4916 If you want to return ICP_HIT for stale cache objects, set this
4917 option to 'on'. If you have sibling relationships with caches
4918 in other administrative domains, this should be 'off'. If you only
4919 have sibling relationships with caches under your control,
4920 it is probably okay to set this to 'on'.
4921 If set to 'on', your siblings should use the option "allow-miss"
4922 on their cache_peer lines for connecting to you.
4923DOC_END
4924
5473c134 4925NAME: minimum_direct_hops
cccac0a2 4926TYPE: int
5473c134 4927DEFAULT: 4
4928LOC: Config.minDirectHops
cccac0a2 4929DOC_START
5473c134 4930 If using the ICMP pinging stuff, do direct fetches for sites
4931 which are no more than this many hops away.
cccac0a2 4932DOC_END
4933
5473c134 4934NAME: minimum_direct_rtt
4935TYPE: int
4936DEFAULT: 400
4937LOC: Config.minDirectRtt
cccac0a2 4938DOC_START
5473c134 4939 If using the ICMP pinging stuff, do direct fetches for sites
4940 which are no more than this many rtt milliseconds away.
cccac0a2 4941DOC_END
4942
cccac0a2 4943NAME: netdb_low
4944TYPE: int
4945DEFAULT: 900
4946LOC: Config.Netdb.low
4947DOC_NONE
4948
4949NAME: netdb_high
4950TYPE: int
4951DEFAULT: 1000
4952LOC: Config.Netdb.high
4953DOC_START
4954 The low and high water marks for the ICMP measurement
4955 database. These are counts, not percents. The defaults are
4956 900 and 1000. When the high water mark is reached, database
4957 entries will be deleted until the low mark is reached.
4958DOC_END
4959
cccac0a2 4960NAME: netdb_ping_period
4961TYPE: time_t
4962LOC: Config.Netdb.period
4963DEFAULT: 5 minutes
4964DOC_START
4965 The minimum period for measuring a site. There will be at
4966 least this much delay between successive pings to the same
4967 network. The default is five minutes.
4968DOC_END
4969
cccac0a2 4970NAME: query_icmp
4971COMMENT: on|off
4972TYPE: onoff
4973DEFAULT: off
4974LOC: Config.onoff.query_icmp
4975DOC_START
4976 If you want to ask your peers to include ICMP data in their ICP
4977 replies, enable this option.
4978
4979 If your peer has configured Squid (during compilation) with
7f7db318 4980 '--enable-icmp' that peer will send ICMP pings to origin server
4981 sites of the URLs it receives. If you enable this option the
cccac0a2 4982 ICP replies from that peer will include the ICMP data (if available).
4983 Then, when choosing a parent cache, Squid will choose the parent with
4984 the minimal RTT to the origin server. When this happens, the
4985 hierarchy field of the access.log will be
4986 "CLOSEST_PARENT_MISS". This option is off by default.
4987DOC_END
4988
4989NAME: test_reachability
4990COMMENT: on|off
4991TYPE: onoff
4992DEFAULT: off
4993LOC: Config.onoff.test_reachability
4994DOC_START
4995 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
4996 instead of ICP_MISS if the target host is NOT in the ICMP
4997 database, or has a zero RTT.
4998DOC_END
4999
5473c134 5000NAME: icp_query_timeout
5001COMMENT: (msec)
5002DEFAULT: 0
5003TYPE: int
5004LOC: Config.Timeout.icp_query
4c3ef9b2 5005DOC_START
5473c134 5006 Normally Squid will automatically determine an optimal ICP
5007 query timeout value based on the round-trip-time of recent ICP
5008 queries. If you want to override the value determined by
5009 Squid, set this 'icp_query_timeout' to a non-zero value. This
5010 value is specified in MILLISECONDS, so, to use a 2-second
5011 timeout (the old default), you would write:
4c3ef9b2 5012
5473c134 5013 icp_query_timeout 2000
4c3ef9b2 5014DOC_END
5015
5473c134 5016NAME: maximum_icp_query_timeout
5017COMMENT: (msec)
5018DEFAULT: 2000
5019TYPE: int
5020LOC: Config.Timeout.icp_query_max
cccac0a2 5021DOC_START
5473c134 5022 Normally the ICP query timeout is determined dynamically. But
5023 sometimes it can lead to very large values (say 5 seconds).
5024 Use this option to put an upper limit on the dynamic timeout
5025 value. Do NOT use this option to always use a fixed (instead
5026 of a dynamic) timeout value. To set a fixed timeout see the
5027 'icp_query_timeout' directive.
cccac0a2 5028DOC_END
5029
5473c134 5030NAME: minimum_icp_query_timeout
5031COMMENT: (msec)
5032DEFAULT: 5
5033TYPE: int
5034LOC: Config.Timeout.icp_query_min
cccac0a2 5035DOC_START
5473c134 5036 Normally the ICP query timeout is determined dynamically. But
5037 sometimes it can lead to very small timeouts, even lower than
5038 the normal latency variance on your link due to traffic.
5039 Use this option to put an lower limit on the dynamic timeout
5040 value. Do NOT use this option to always use a fixed (instead
5041 of a dynamic) timeout value. To set a fixed timeout see the
5042 'icp_query_timeout' directive.
cccac0a2 5043DOC_END
5044
5473c134 5045NAME: background_ping_rate
5046COMMENT: time-units
5047TYPE: time_t
5048DEFAULT: 10 seconds
5049LOC: Config.backgroundPingRate
cccac0a2 5050DOC_START
5473c134 5051 Controls how often the ICP pings are sent to siblings that
5052 have background-ping set.
cccac0a2 5053DOC_END
5054
5473c134 5055COMMENT_START
5056 MULTICAST ICP OPTIONS
5057 -----------------------------------------------------------------------------
5058COMMENT_END
5059
5060NAME: mcast_groups
5061TYPE: wordlist
5062LOC: Config.mcast_group_list
8c01ada0 5063DEFAULT: none
5064DOC_START
5473c134 5065 This tag specifies a list of multicast groups which your server
5066 should join to receive multicasted ICP queries.
8c01ada0 5067
5473c134 5068 NOTE! Be very careful what you put here! Be sure you
5069 understand the difference between an ICP _query_ and an ICP
5070 _reply_. This option is to be set only if you want to RECEIVE
5071 multicast queries. Do NOT set this option to SEND multicast
5072 ICP (use cache_peer for that). ICP replies are always sent via
5073 unicast, so this option does not affect whether or not you will
5074 receive replies from multicast group members.
8c01ada0 5075
5473c134 5076 You must be very careful to NOT use a multicast address which
5077 is already in use by another group of caches.
8c01ada0 5078
5473c134 5079 If you are unsure about multicast, please read the Multicast
5080 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
8c01ada0 5081
5473c134 5082 Usage: mcast_groups 239.128.16.128 224.0.1.20
8c01ada0 5083
5473c134 5084 By default, Squid doesn't listen on any multicast groups.
5085DOC_END
8c01ada0 5086
5473c134 5087NAME: mcast_miss_addr
5088IFDEF: MULTICAST_MISS_STREAM
5089TYPE: address
5090LOC: Config.mcast_miss.addr
5091DEFAULT: 255.255.255.255
5092DOC_START
5093 If you enable this option, every "cache miss" URL will
5094 be sent out on the specified multicast address.
cccac0a2 5095
5473c134 5096 Do not enable this option unless you are are absolutely
5097 certain you understand what you are doing.
cccac0a2 5098DOC_END
5099
5473c134 5100NAME: mcast_miss_ttl
5101IFDEF: MULTICAST_MISS_STREAM
5102TYPE: ushort
5103LOC: Config.mcast_miss.ttl
5104DEFAULT: 16
cccac0a2 5105DOC_START
5473c134 5106 This is the time-to-live value for packets multicasted
5107 when multicasting off cache miss URLs is enabled. By
5108 default this is set to 'site scope', i.e. 16.
5109DOC_END
cccac0a2 5110
5473c134 5111NAME: mcast_miss_port
5112IFDEF: MULTICAST_MISS_STREAM
5113TYPE: ushort
5114LOC: Config.mcast_miss.port
5115DEFAULT: 3135
5116DOC_START
5117 This is the port number to be used in conjunction with
5118 'mcast_miss_addr'.
5119DOC_END
cccac0a2 5120
5473c134 5121NAME: mcast_miss_encode_key
5122IFDEF: MULTICAST_MISS_STREAM
5123TYPE: string
5124LOC: Config.mcast_miss.encode_key
5125DEFAULT: XXXXXXXXXXXXXXXX
5126DOC_START
5127 The URLs that are sent in the multicast miss stream are
5128 encrypted. This is the encryption key.
5129DOC_END
8c01ada0 5130
5473c134 5131NAME: mcast_icp_query_timeout
5132COMMENT: (msec)
5133DEFAULT: 2000
5134TYPE: int
5135LOC: Config.Timeout.mcast_icp_query
5136DOC_START
5137 For multicast peers, Squid regularly sends out ICP "probes" to
5138 count how many other peers are listening on the given multicast
5139 address. This value specifies how long Squid should wait to
5140 count all the replies. The default is 2000 msec, or 2
5141 seconds.
cccac0a2 5142DOC_END
5143
5473c134 5144COMMENT_START
5145 INTERNAL ICON OPTIONS
5146 -----------------------------------------------------------------------------
5147COMMENT_END
5148
cccac0a2 5149NAME: icon_directory
5150TYPE: string
5151LOC: Config.icons.directory
5152DEFAULT: @DEFAULT_ICON_DIR@
5153DOC_START
5154 Where the icons are stored. These are normally kept in
5155 @DEFAULT_ICON_DIR@
5156DOC_END
5157
f024c970 5158NAME: global_internal_static
5159TYPE: onoff
5160LOC: Config.onoff.global_internal_static
5161DEFAULT: on
5162DOC_START
5163 This directive controls is Squid should intercept all requests for
5164 /squid-internal-static/ no matter which host the URL is requesting
5165 (default on setting), or if nothing special should be done for
5166 such URLs (off setting). The purpose of this directive is to make
5167 icons etc work better in complex cache hierarchies where it may
5168 not always be possible for all corners in the cache mesh to reach
5169 the server generating a directory listing.
5170DOC_END
5171
5473c134 5172NAME: short_icon_urls
5173TYPE: onoff
5174LOC: Config.icons.use_short_names
5175DEFAULT: on
5176DOC_START
5177 If this is enabled Squid will use short URLs for icons.
5178 If disabled it will revert to the old behavior of including
5179 it's own name and port in the URL.
5180
5181 If you run a complex cache hierarchy with a mix of Squid and
5182 other proxies you may need to disable this directive.
5183DOC_END
5184
5185COMMENT_START
5186 ERROR PAGE OPTIONS
5187 -----------------------------------------------------------------------------
5188COMMENT_END
5189
5190NAME: error_directory
5191TYPE: string
5192LOC: Config.errorDirectory
43000484 5193DEFAULT: none
5473c134 5194DOC_START
5195 If you wish to create your own versions of the default
43000484
AJ
5196 error files to customize them to suit your company copy
5197 the error/template files to another directory and point
5198 this tag at them.
5199
5200 WARNING: This option will disable multi-language support
5201 on error pages if used.
5473c134 5202
5203 The squid developers are interested in making squid available in
5204 a wide variety of languages. If you are making translations for a
43000484 5205 language that Squid does not currently provide please consider
5473c134 5206 contributing your translation back to the project.
43000484
AJ
5207 http://wiki.squid-cache.org/Translations
5208
5209 The squid developers working on translations are happy to supply drop-in
5210 translated error files in exchange for any new language contributions.
5211DOC_END
5212
5213NAME: error_default_language
5214IFDEF: USE_ERR_LOCALES
5215TYPE: string
5216LOC: Config.errorDefaultLanguage
5217DEFAULT: none
5218DOC_START
5219 Set the default language which squid will send error pages in
5220 if no existing translation matches the clients language
5221 preferences.
5222
5223 If unset (default) generic English will be used.
5224
5225 The squid developers are interested in making squid available in
5226 a wide variety of languages. If you are interested in making
5227 translations for any language see the squid wiki for details.
5228 http://wiki.squid-cache.org/Translations
5473c134 5229DOC_END
5230
c411820c
AJ
5231NAME: error_log_languages
5232IFDEF: USE_ERR_LOCALES
5233TYPE: onoff
5234LOC: Config.errorLogMissingLanguages
5235DEFAULT: on
5236DOC_START
5237 Log to cache.log what languages users are attempting to
5238 auto-negotiate for translations.
5239
5240 Successful negotiations are not logged. Only failures
5241 have meaning to indicate that Squid may need an upgrade
0c49f10e 5242 of its error page translations.
c411820c
AJ
5243DOC_END
5244
5b52cb6c
AJ
5245NAME: err_page_stylesheet
5246TYPE: string
5247LOC: Config.errorStylesheet
5248DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
5249DOC_START
5250 CSS Stylesheet to pattern the display of Squid default error pages.
5251
5252 For information on CSS see http://www.w3.org/Style/CSS/
5253DOC_END
5254
5473c134 5255NAME: err_html_text
5256TYPE: eol
5257LOC: Config.errHtmlText
5258DEFAULT: none
5259DOC_START
5260 HTML text to include in error messages. Make this a "mailto"
5261 URL to your admin address, or maybe just a link to your
5262 organizations Web page.
5263
5264 To include this in your error messages, you must rewrite
5265 the error template files (found in the "errors" directory).
5266 Wherever you want the 'err_html_text' line to appear,
5267 insert a %L tag in the error template file.
5268DOC_END
5269
5270NAME: email_err_data
5271COMMENT: on|off
5272TYPE: onoff
5273LOC: Config.onoff.emailErrData
5274DEFAULT: on
5275DOC_START
5276 If enabled, information about the occurred error will be
5277 included in the mailto links of the ERR pages (if %W is set)
5278 so that the email body contains the data.
5279 Syntax is <A HREF="mailto:%w%W">%w</A>
5280DOC_END
5281
5282NAME: deny_info
5283TYPE: denyinfo
5284LOC: Config.denyInfoList
5285DEFAULT: none
5286DOC_START
5287 Usage: deny_info err_page_name acl
5288 or deny_info http://... acl
43000484 5289 or deny_info TCP_RESET acl
5473c134 5290
5291 This can be used to return a ERR_ page for requests which
5292 do not pass the 'http_access' rules. Squid remembers the last
5293 acl it evaluated in http_access, and if a 'deny_info' line exists
5294 for that ACL Squid returns a corresponding error page.
5295
5296 The acl is typically the last acl on the http_access deny line which
5297 denied access. The exceptions to this rule are:
5298 - When Squid needs to request authentication credentials. It's then
5299 the first authentication related acl encountered
5300 - When none of the http_access lines matches. It's then the last
5301 acl processed on the last http_access line.
5302
43000484
AJ
5303 NP: If providing your own custom error pages with error_directory
5304 you may also specify them by your custom file name:
5305 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
5473c134 5306
5307 Alternatively you can specify an error URL. The browsers will
5308 get redirected (302) to the specified URL. %s in the redirection
5309 URL will be replaced by the requested URL.
5310
5311 Alternatively you can tell Squid to reset the TCP connection
5312 by specifying TCP_RESET.
5313DOC_END
5314
5315COMMENT_START
5316 OPTIONS INFLUENCING REQUEST FORWARDING
5317 -----------------------------------------------------------------------------
5318COMMENT_END
5319
5320NAME: nonhierarchical_direct
e72a0ec0 5321TYPE: onoff
5473c134 5322LOC: Config.onoff.nonhierarchical_direct
e72a0ec0 5323DEFAULT: on
5324DOC_START
5473c134 5325 By default, Squid will send any non-hierarchical requests
5326 (matching hierarchy_stoplist or not cacheable request type) direct
5327 to origin servers.
e72a0ec0 5328
5473c134 5329 If you set this to off, Squid will prefer to send these
5330 requests to parents.
0b0cfcf2 5331
5473c134 5332 Note that in most configurations, by turning this off you will only
5333 add latency to these request without any improvement in global hit
5334 ratio.
0b0cfcf2 5335
5473c134 5336 If you are inside an firewall see never_direct instead of
5337 this directive.
8d6275c0 5338DOC_END
0b0cfcf2 5339
5473c134 5340NAME: prefer_direct
8d6275c0 5341TYPE: onoff
5473c134 5342LOC: Config.onoff.prefer_direct
8d6275c0 5343DEFAULT: off
5344DOC_START
5473c134 5345 Normally Squid tries to use parents for most requests. If you for some
5346 reason like it to first try going direct and only use a parent if
5347 going direct fails set this to on.
0b0cfcf2 5348
5473c134 5349 By combining nonhierarchical_direct off and prefer_direct on you
5350 can set up Squid to use a parent as a backup path if going direct
5351 fails.
5352
5353 Note: If you want Squid to use parents for all requests see
5354 the never_direct directive. prefer_direct only modifies how Squid
5355 acts on cacheable requests.
cccac0a2 5356DOC_END
5357
5473c134 5358NAME: always_direct
8d6275c0 5359TYPE: acl_access
5473c134 5360LOC: Config.accessList.AlwaysDirect
0b0cfcf2 5361DEFAULT: none
0b0cfcf2 5362DOC_START
5473c134 5363 Usage: always_direct allow|deny [!]aclname ...
0b0cfcf2 5364
5473c134 5365 Here you can use ACL elements to specify requests which should
5366 ALWAYS be forwarded by Squid to the origin servers without using
5367 any peers. For example, to always directly forward requests for
5368 local servers ignoring any parents or siblings you may have use
5369 something like:
0b0cfcf2 5370
5473c134 5371 acl local-servers dstdomain my.domain.net
5372 always_direct allow local-servers
0b0cfcf2 5373
5473c134 5374 To always forward FTP requests directly, use
f16fbc82 5375
5473c134 5376 acl FTP proto FTP
5377 always_direct allow FTP
cccac0a2 5378
5473c134 5379 NOTE: There is a similar, but opposite option named
5380 'never_direct'. You need to be aware that "always_direct deny
5381 foo" is NOT the same thing as "never_direct allow foo". You
5382 may need to use a deny rule to exclude a more-specific case of
5383 some other rule. Example:
8d6275c0 5384
5473c134 5385 acl local-external dstdomain external.foo.net
5386 acl local-servers dstdomain .foo.net
5387 always_direct deny local-external
5388 always_direct allow local-servers
8d6275c0 5389
5473c134 5390 NOTE: If your goal is to make the client forward the request
5391 directly to the origin server bypassing Squid then this needs
5392 to be done in the client configuration. Squid configuration
5393 can only tell Squid how Squid should fetch the object.
8d6275c0 5394
5473c134 5395 NOTE: This directive is not related to caching. The replies
5396 is cached as usual even if you use always_direct. To not cache
b3567eb5 5397 the replies see the 'cache' directive.
5473c134 5398
b3567eb5
FC
5399 This clause supports both fast and slow acl types.
5400 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
cccac0a2 5401DOC_END
0976f8db 5402
5473c134 5403NAME: never_direct
5404TYPE: acl_access
5405LOC: Config.accessList.NeverDirect
5406DEFAULT: none
8d6275c0 5407DOC_START
5473c134 5408 Usage: never_direct allow|deny [!]aclname ...
5409
5410 never_direct is the opposite of always_direct. Please read
5411 the description for always_direct if you have not already.
5412
5413 With 'never_direct' you can use ACL elements to specify
5414 requests which should NEVER be forwarded directly to origin
5415 servers. For example, to force the use of a proxy for all
5416 requests, except those in your local domain use something like:
5417
5418 acl local-servers dstdomain .foo.net
5473c134 5419 never_direct deny local-servers
5420 never_direct allow all
5421
5422 or if Squid is inside a firewall and there are local intranet
5423 servers inside the firewall use something like:
5424
5425 acl local-intranet dstdomain .foo.net
5426 acl local-external dstdomain external.foo.net
5427 always_direct deny local-external
5428 always_direct allow local-intranet
5429 never_direct allow all
5430
b3567eb5
FC
5431 This clause supports both fast and slow acl types.
5432 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8d6275c0 5433DOC_END
0976f8db 5434
5473c134 5435COMMENT_START
5436 ADVANCED NETWORKING OPTIONS
5437 -----------------------------------------------------------------------------
5438COMMENT_END
5439
cccac0a2 5440NAME: incoming_icp_average
5441TYPE: int
5442DEFAULT: 6
5443LOC: Config.comm_incoming.icp_average
5444DOC_NONE
5445
5446NAME: incoming_http_average
5447TYPE: int
5448DEFAULT: 4
5449LOC: Config.comm_incoming.http_average
5450DOC_NONE
5451
5452NAME: incoming_dns_average
5453TYPE: int
5454DEFAULT: 4
5455LOC: Config.comm_incoming.dns_average
5456DOC_NONE
5457
5458NAME: min_icp_poll_cnt
5459TYPE: int
5460DEFAULT: 8
5461LOC: Config.comm_incoming.icp_min_poll
5462DOC_NONE
5463
5464NAME: min_dns_poll_cnt
5465TYPE: int
5466DEFAULT: 8
5467LOC: Config.comm_incoming.dns_min_poll
5468DOC_NONE
5469
5470NAME: min_http_poll_cnt
5471TYPE: int
5472DEFAULT: 8
5473LOC: Config.comm_incoming.http_min_poll
5474DOC_START
5473c134 5475 Heavy voodoo here. I can't even believe you are reading this.
5476 Are you crazy? Don't even think about adjusting these unless
5477 you understand the algorithms in comm_select.c first!
5478DOC_END
5479
5480NAME: accept_filter
5473c134 5481TYPE: string
5482DEFAULT: none
5483LOC: Config.accept_filter
5484DOC_START
0b4d4be5 5485 FreeBSD:
5486
5473c134 5487 The name of an accept(2) filter to install on Squid's
5488 listen socket(s). This feature is perhaps specific to
5489 FreeBSD and requires support in the kernel.
5490
5491 The 'httpready' filter delays delivering new connections
2324cda2 5492 to Squid until a full HTTP request has been received.
0b4d4be5 5493 See the accf_http(9) man page for details.
5494
5495 The 'dataready' filter delays delivering new connections
5496 to Squid until there is some data to process.
5497 See the accf_dataready(9) man page for details.
5498
5499 Linux:
5500
5501 The 'data' filter delays delivering of new connections
5502 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
5503 You may optionally specify a number of seconds to wait by
5504 'data=N' where N is the number of seconds. Defaults to 30
5505 if not specified. See the tcp(7) man page for details.
5473c134 5506EXAMPLE:
0b4d4be5 5507# FreeBSD
5473c134 5508accept_filter httpready
0b4d4be5 5509# Linux
5510accept_filter data
5473c134 5511DOC_END
5512
5513NAME: tcp_recv_bufsize
5514COMMENT: (bytes)
5515TYPE: b_size_t
5516DEFAULT: 0 bytes
5517LOC: Config.tcpRcvBufsz
5518DOC_START
5519 Size of receive buffer to set for TCP sockets. Probably just
5520 as easy to change your kernel's default. Set to zero to use
5521 the default buffer size.
5522DOC_END
5523
5524COMMENT_START
5525 ICAP OPTIONS
5526 -----------------------------------------------------------------------------
5527COMMENT_END
5528
5529NAME: icap_enable
5530TYPE: onoff
5531IFDEF: ICAP_CLIENT
5532COMMENT: on|off
26cc52cb 5533LOC: Adaptation::Icap::TheConfig.onoff
5473c134 5534DEFAULT: off
5535DOC_START
53e738c6 5536 If you want to enable the ICAP module support, set this to on.
5473c134 5537DOC_END
5538
5539NAME: icap_connect_timeout
5540TYPE: time_t
5541DEFAULT: none
26cc52cb 5542LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
5473c134 5543IFDEF: ICAP_CLIENT
5544DOC_START
5545 This parameter specifies how long to wait for the TCP connect to
5546 the requested ICAP server to complete before giving up and either
5547 terminating the HTTP transaction or bypassing the failure.
5548
5549 The default for optional services is peer_connect_timeout.
5550 The default for essential services is connect_timeout.
5551 If this option is explicitly set, its value applies to all services.
5552DOC_END
5553
5554NAME: icap_io_timeout
5555COMMENT: time-units
5556TYPE: time_t
5557DEFAULT: none
26cc52cb 5558LOC: Adaptation::Icap::TheConfig.io_timeout_raw
5473c134 5559IFDEF: ICAP_CLIENT
5560DOC_START
5561 This parameter specifies how long to wait for an I/O activity on
5562 an established, active ICAP connection before giving up and
5563 either terminating the HTTP transaction or bypassing the
5564 failure.
5565
5566 The default is read_timeout.
5567DOC_END
5568
5569NAME: icap_service_failure_limit
5570TYPE: int
5571IFDEF: ICAP_CLIENT
26cc52cb 5572LOC: Adaptation::Icap::TheConfig.service_failure_limit
5473c134 5573DEFAULT: 10
5574DOC_START
5575 The limit specifies the number of failures that Squid tolerates
5576 when establishing a new TCP connection with an ICAP service. If
5577 the number of failures exceeds the limit, the ICAP service is
5578 not used for new ICAP requests until it is time to refresh its
5579 OPTIONS. The per-service failure counter is reset to zero each
5580 time Squid fetches new service OPTIONS.
5581
5582 A negative value disables the limit. Without the limit, an ICAP
5583 service will not be considered down due to connectivity failures
5584 between ICAP OPTIONS requests.
cccac0a2 5585DOC_END
5586
5473c134 5587NAME: icap_service_revival_delay
cccac0a2 5588TYPE: int
5473c134 5589IFDEF: ICAP_CLIENT
26cc52cb 5590LOC: Adaptation::Icap::TheConfig.service_revival_delay
5473c134 5591DEFAULT: 180
cccac0a2 5592DOC_START
5473c134 5593 The delay specifies the number of seconds to wait after an ICAP
5594 OPTIONS request failure before requesting the options again. The
5595 failed ICAP service is considered "down" until fresh OPTIONS are
5596 fetched.
cccac0a2 5597
5473c134 5598 The actual delay cannot be smaller than the hardcoded minimum
5599 delay of 30 seconds.
cccac0a2 5600DOC_END
5601
5473c134 5602NAME: icap_preview_enable
cccac0a2 5603TYPE: onoff
5473c134 5604IFDEF: ICAP_CLIENT
5605COMMENT: on|off
26cc52cb 5606LOC: Adaptation::Icap::TheConfig.preview_enable
ac7a62f9 5607DEFAULT: on
cccac0a2 5608DOC_START
ac7a62f9 5609 The ICAP Preview feature allows the ICAP server to handle the
5610 HTTP message by looking only at the beginning of the message body
5611 or even without receiving the body at all. In some environments,
5612 previews greatly speedup ICAP processing.
5613
5614 During an ICAP OPTIONS transaction, the server may tell Squid what
5615 HTTP messages should be previewed and how big the preview should be.
5616 Squid will not use Preview if the server did not request one.
5617
5618 To disable ICAP Preview for all ICAP services, regardless of
5619 individual ICAP server OPTIONS responses, set this option to "off".
5620Example:
5621icap_preview_enable off
cccac0a2 5622DOC_END
5623
5473c134 5624NAME: icap_preview_size
5625TYPE: int
5626IFDEF: ICAP_CLIENT
26cc52cb 5627LOC: Adaptation::Icap::TheConfig.preview_size
5473c134 5628DEFAULT: -1
cccac0a2 5629DOC_START
53e738c6 5630 The default size of preview data to be sent to the ICAP server.
5631 -1 means no preview. This value might be overwritten on a per server
5632 basis by OPTIONS requests.
cccac0a2 5633DOC_END
5634
5473c134 5635NAME: icap_default_options_ttl
5636TYPE: int
5637IFDEF: ICAP_CLIENT
26cc52cb 5638LOC: Adaptation::Icap::TheConfig.default_options_ttl
5473c134 5639DEFAULT: 60
cccac0a2 5640DOC_START
53e738c6 5641 The default TTL value for ICAP OPTIONS responses that don't have
5473c134 5642 an Options-TTL header.
cccac0a2 5643DOC_END
5644
5473c134 5645NAME: icap_persistent_connections
5646TYPE: onoff
5647IFDEF: ICAP_CLIENT
5648COMMENT: on|off
26cc52cb 5649LOC: Adaptation::Icap::TheConfig.reuse_connections
5473c134 5650DEFAULT: on
cccac0a2 5651DOC_START
5473c134 5652 Whether or not Squid should use persistent connections to
5653 an ICAP server.
cccac0a2 5654DOC_END
5655
5473c134 5656NAME: icap_send_client_ip
5657TYPE: onoff
5658IFDEF: ICAP_CLIENT
5659COMMENT: on|off
26cc52cb 5660LOC: Adaptation::Icap::TheConfig.send_client_ip
5473c134 5661DEFAULT: off
cccac0a2 5662DOC_START
53e738c6 5663 This adds the header "X-Client-IP" to ICAP requests.
cccac0a2 5664DOC_END
5665
5473c134 5666NAME: icap_send_client_username
5667TYPE: onoff
5668IFDEF: ICAP_CLIENT
5669COMMENT: on|off
26cc52cb 5670LOC: Adaptation::Icap::TheConfig.send_client_username
5473c134 5671DEFAULT: off
cccac0a2 5672DOC_START
5473c134 5673 This sends authenticated HTTP client username (if available) to
5674 the ICAP service. The username value is encoded based on the
5675 icap_client_username_encode option and is sent using the header
5676 specified by the icap_client_username_header option.
cccac0a2 5677DOC_END
5678
5473c134 5679NAME: icap_client_username_header
cccac0a2 5680TYPE: string
5473c134 5681IFDEF: ICAP_CLIENT
26cc52cb 5682LOC: Adaptation::Icap::TheConfig.client_username_header
5473c134 5683DEFAULT: X-Client-Username
cccac0a2 5684DOC_START
5473c134 5685 ICAP request header name to use for send_client_username.
cccac0a2 5686DOC_END
5687
5473c134 5688NAME: icap_client_username_encode
cccac0a2 5689TYPE: onoff
5473c134 5690IFDEF: ICAP_CLIENT
5691COMMENT: on|off
26cc52cb 5692LOC: Adaptation::Icap::TheConfig.client_username_encode
5473c134 5693DEFAULT: off
cccac0a2 5694DOC_START
5473c134 5695 Whether to base64 encode the authenticated client username.
cccac0a2 5696DOC_END
5697
5473c134 5698NAME: icap_service
5699TYPE: icap_service_type
5700IFDEF: ICAP_CLIENT
26cc52cb 5701LOC: Adaptation::Icap::TheConfig
5473c134 5702DEFAULT: none
cccac0a2 5703DOC_START
a22e6cd3 5704 Defines a single ICAP service using the following format:
cccac0a2 5705
a22e6cd3 5706 icap_service service_name vectoring_point [options] service_url
7d90757b 5707
a22e6cd3
AR
5708 service_name: ID
5709 an opaque identifier which must be unique in squid.conf
5710
5711 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
f3db09e2 5712 This specifies at which point of transaction processing the
5713 ICAP service should be activated. *_postcache vectoring points
5714 are not yet supported.
a22e6cd3
AR
5715
5716 service_url: icap://servername:port/servicepath
5717 ICAP server and service location.
5718
5719 ICAP does not allow a single service to handle both REQMOD and RESPMOD
5720 transactions. Squid does not enforce that requirement. You can specify
5721 services with the same service_url and different vectoring_points. You
5722 can even specify multiple identical services as long as their
5723 service_names differ.
5724
5725
5726 Service options are separated by white space. ICAP services support
5727 the following name=value options:
5728
5729 bypass=on|off|1|0
5730 If set to 'on' or '1', the ICAP service is treated as
5731 optional. If the service cannot be reached or malfunctions,
5732 Squid will try to ignore any errors and process the message as
5733 if the service was not enabled. No all ICAP errors can be
5734 bypassed. If set to 0, the ICAP service is treated as
5735 essential and all ICAP errors will result in an error page
5736 returned to the HTTP client.
5737
5738 Bypass is off by default: services are treated as essential.
5739
5740 routing=on|off|1|0
5741 If set to 'on' or '1', the ICAP service is allowed to
5742 dynamically change the current message adaptation plan by
5743 returning a chain of services to be used next. The services
5744 are specified using the X-Next-Services ICAP response header
5745 value, formatted as a comma-separated list of service names.
5746 Each named service should be configured in squid.conf and
5747 should have the same method and vectoring point as the current
5748 ICAP transaction. Services violating these rules are ignored.
5749 An empty X-Next-Services value results in an empty plan which
5750 ends the current adaptation.
5751
5752 Routing is not allowed by default: the ICAP X-Next-Services
5753 response header is ignored.
5754
5755 Older icap_service format without optional named parameters is
5756 deprecated but supported for backward compatibility.
5473c134 5757
5473c134 5758Example:
a22e6cd3
AR
5759icap_service svcBlocker reqmod_precache bypass=0 icap://icap1.mydomain.net:1344/reqmod
5760icap_service svcLogger reqmod_precache routing=on icap://icap2.mydomain.net:1344/respmod
cccac0a2 5761DOC_END
5762
5473c134 5763NAME: icap_class
5764TYPE: icap_class_type
5765IFDEF: ICAP_CLIENT
21a26d31 5766LOC: none
5473c134 5767DEFAULT: none
cccac0a2 5768DOC_START
a22e6cd3 5769 This deprecated option was documented to define an ICAP service
62c7f90e
AR
5770 chain, even though it actually defined a set of similar, redundant
5771 services, and the chains were not supported.
5473c134 5772
62c7f90e 5773 To define a set of redundant services, please use the
a22e6cd3
AR
5774 adaptation_service_set directive. For service chains, use
5775 adaptation_service_chain.
cccac0a2 5776DOC_END
5777
5473c134 5778NAME: icap_access
5779TYPE: icap_access_type
5780IFDEF: ICAP_CLIENT
21a26d31 5781LOC: none
cccac0a2 5782DEFAULT: none
cccac0a2 5783DOC_START
a22e6cd3 5784 This option is deprecated. Please use adaptation_access, which
62c7f90e
AR
5785 has the same ICAP functionality, but comes with better
5786 documentation, and eCAP support.
cccac0a2 5787DOC_END
5788
57afc994
AR
5789COMMENT_START
5790 eCAP OPTIONS
5791 -----------------------------------------------------------------------------
5792COMMENT_END
5793
21a26d31
AR
5794NAME: ecap_enable
5795TYPE: onoff
5796IFDEF: USE_ECAP
5797COMMENT: on|off
574b508c 5798LOC: Adaptation::Ecap::TheConfig.onoff
21a26d31
AR
5799DEFAULT: off
5800DOC_START
5801 Controls whether eCAP support is enabled.
5802DOC_END
5803
5804NAME: ecap_service
5805TYPE: ecap_service_type
5806IFDEF: USE_ECAP
574b508c 5807LOC: Adaptation::Ecap::TheConfig
21a26d31
AR
5808DEFAULT: none
5809DOC_START
5810 Defines a single eCAP service
5811
5812 ecap_service servicename vectoring_point bypass service_url
5813
5814 vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
5815 This specifies at which point of transaction processing the
5816 eCAP service should be activated. *_postcache vectoring points
5817 are not yet supported.
5818 bypass = 1|0
5819 If set to 1, the eCAP service is treated as optional. If the
5820 service cannot be reached or malfunctions, Squid will try to
5821 ignore any errors and process the message as if the service
5822 was not enabled. No all eCAP errors can be bypassed.
5823 If set to 0, the eCAP service is treated as essential and all
5824 eCAP errors will result in an error page returned to the
5825 HTTP client.
5826 service_url = ecap://vendor/service_name?custom&cgi=style&parameters=optional
5827
5828Example:
5829ecap_service service_1 reqmod_precache 0 ecap://filters-R-us/leakDetector?on_error=block
5830ecap_service service_2 respmod_precache 1 icap://filters-R-us/virusFilter?config=/etc/vf.cfg
5831DOC_END
5832
57afc994
AR
5833NAME: loadable_modules
5834TYPE: wordlist
5835IFDEF: USE_LOADABLE_MODULES
5836LOC: Config.loadable_module_names
5837DEFAULT: none
5838DOC_START
5839 Instructs Squid to load the specified dynamic module(s) or activate
5840 preloaded module(s).
5841Example:
5842loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
5843DOC_END
5844
62c7f90e
AR
5845COMMENT_START
5846 MESSAGE ADAPTATION OPTIONS
5847 -----------------------------------------------------------------------------
5848COMMENT_END
5849
5850NAME: adaptation_service_set
5851TYPE: adaptation_service_set_type
5852IFDEF: USE_ADAPTATION
5853LOC: none
5854DEFAULT: none
5855DOC_START
5856
a22e6cd3
AR
5857 Configures an ordered set of similar, redundant services. This is
5858 useful when hot standby or backup adaptation servers are available.
5859
5860 adaptation_service_set set_name service_name1 service_name2 ...
5861
5862 The named services are used in the set declaration order. The first
5863 applicable adaptation service from the set is used first. The next
5864 applicable service is tried if and only if the transaction with the
5865 previous service fails and the message waiting to be adapted is still
5866 intact.
62c7f90e 5867
a22e6cd3
AR
5868 When adaptation starts, broken services are ignored as if they were
5869 not a part of the set. A broken service is a down optional service.
62c7f90e 5870
a22e6cd3
AR
5871 The services in a set must be attached to the same vectoring point
5872 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
5873
5874 If all services in a set are optional then adaptation failures are
5875 bypassable. If all services in the set are essential, then a
5876 transaction failure with one service may still be retried using
5877 another service from the set, but when all services fail, the master
5878 transaction fails as well.
5879
5880 A set may contain a mix of optional and essential services, but that
5881 is likely to lead to surprising results because broken services become
5882 ignored (see above), making previously bypassable failures fatal.
5883 Technically, it is the bypassability of the last failed service that
5884 matters.
5885
5886 See also: adaptation_access adaptation_service_chain
62c7f90e
AR
5887
5888Example:
5889adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
5890adaptation service_set svcLogger loggerLocal loggerRemote
5891DOC_END
5892
a22e6cd3
AR
5893NAME: adaptation_service_chain
5894TYPE: adaptation_service_chain_type
5895IFDEF: USE_ADAPTATION
5896LOC: none
5897DEFAULT: none
5898DOC_START
5899
5900 Configures a list of complementary services that will be applied
5901 one-by-one, forming an adaptation chain or pipeline. This is useful
5902 when Squid must perform different adaptations on the same message.
5903
5904 adaptation_service_chain chain_name service_name1 svc_name2 ...
5905
5906 The named services are used in the chain declaration order. The first
5907 applicable adaptation service from the chain is used first. The next
5908 applicable service is applied to the successful adaptation results of
5909 the previous service in the chain.
5910
5911 When adaptation starts, broken services are ignored as if they were
5912 not a part of the chain. A broken service is a down optional service.
5913
5914 Request satisfaction terminates the adaptation chain because Squid
5915 does not currently allow declaration of RESPMOD services at the
5916 "reqmod_precache" vectoring point (see icap_service or ecap_service).
5917
5918 The services in a chain must be attached to the same vectoring point
5919 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
5920
5921 A chain may contain a mix of optional and essential services. If an
5922 essential adaptation fails (or the failure cannot be bypassed for
5923 other reasons), the master transaction fails. Otherwise, the failure
5924 is bypassed as if the failed adaptation service was not in the chain.
5925
5926 See also: adaptation_access adaptation_service_set
5927
5928Example:
5929adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
5930DOC_END
5931
62c7f90e
AR
5932NAME: adaptation_access
5933TYPE: adaptation_access_type
5934IFDEF: USE_ADAPTATION
5935LOC: none
5936DEFAULT: none
5937DOC_START
5938 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
5939
5940 adaptation_access service_name allow|deny [!]aclname...
5941 adaptation_access set_name allow|deny [!]aclname...
5942
5943 At each supported vectoring point, the adaptation_access
5944 statements are processed in the order they appear in this
5945 configuration file. Statements pointing to the following services
5946 are ignored (i.e., skipped without checking their ACL):
5947
5948 - services serving different vectoring points
5949 - "broken-but-bypassable" services
5950 - "up" services configured to ignore such transactions
5951 (e.g., based on the ICAP Transfer-Ignore header).
5952
5953 When a set_name is used, all services in the set are checked
5954 using the same rules, to find the first applicable one. See
5955 adaptation_service_set for details.
5956
5957 If an access list is checked and there is a match, the
5958 processing stops: For an "allow" rule, the corresponding
5959 adaptation service is used for the transaction. For a "deny"
5960 rule, no adaptation service is activated.
5961
5962 It is currently not possible to apply more than one adaptation
5963 service at the same vectoring point to the same HTTP transaction.
5964
5965 See also: icap_service and ecap_service
5966
5967Example:
5968adaptation_access service_1 allow all
5969DOC_END
5970
a22e6cd3
AR
5971NAME: adaptation_service_iteration_limit
5972TYPE: int
5973IFDEF: USE_ADAPTATION
5974LOC: Adaptation::Config::service_iteration_limit
5975DEFAULT: 16
5976DOC_START
5977 Limits the number of iterations allowed when applying adaptation
5978 services to a message. If your longest adaptation set or chain
5979 may have more than 16 services, increase the limit beyond its
5980 default value of 16. If detecting infinite iteration loops sooner
5981 is critical, make the iteration limit match the actual number
5982 of services in your longest adaptation set or chain.
5983
5984 Infinite adaptation loops are most likely with routing services.
5985
5986 See also: icap_service routing=1
5987DOC_END
5988
3ff65596
AR
5989NAME: adaptation_masterx_shared_names
5990TYPE: string
5991IFDEF: USE_ADAPTATION
5992LOC: Adaptation::Config::masterx_shared_name
5993DEFAULT: none
5994DOC_START
5995 For each master transaction (i.e., the HTTP request and response
5996 sequence, including all related ICAP and eCAP exchanges), Squid
5997 maintains a table of metadata. The table entries are (name, value)
5998 pairs shared among eCAP and ICAP exchanges. The table is destroyed
5999 with the master transaction.
6000
6001 This option specifies the table entry names that Squid must accept
6002 from and forward to the adaptation transactions.
6003
6004 An ICAP REQMOD or RESPMOD transaction may set an entry in the
6005 shared table by returning an ICAP header field with a name
6006 specified in adaptation_masterx_shared_names. Squid will store
6007 and forward that ICAP header field to subsequent ICAP
6008 transactions within the same master transaction scope.
6009
6010 Only one shared entry name is supported at this time.
6011
6012Example:
6013# share authentication information among ICAP services
6014adaptation_masterx_shared_names X-Subscriber-ID
6015DOC_END
6016
6017NAME: icap_retry
6018TYPE: acl_access
6019IFDEF: ICAP_CLIENT
6020LOC: Adaptation::Icap::TheConfig.repeat
6021DEFAULT: none
6022DEFAULT_IF_NONE: deny all
6023DOC_START
6024 This ACL determines which retriable ICAP transactions are
6025 retried. Transactions that received a complete ICAP response
6026 and did not have to consume or produce HTTP bodies to receive
6027 that response are usually retriable.
6028
6029 icap_retry allow|deny [!]aclname ...
6030
6031 Squid automatically retries some ICAP I/O timeouts and errors
6032 due to persistent connection race conditions.
6033
6034 See also: icap_retry_limit
6035DOC_END
6036
6037NAME: icap_retry_limit
6038TYPE: int
6039IFDEF: ICAP_CLIENT
6040LOC: Adaptation::Icap::TheConfig.repeat_limit
6041DEFAULT: 0
6042DOC_START
6043 Limits the number of retries allowed. When set to zero (default),
6044 no retries are allowed.
6045
6046 Communication errors due to persistent connection race
6047 conditions are unavoidable, automatically retried, and do not
6048 count against this limit.
6049
6050 See also: icap_retry
6051DOC_END
6052
6053
5473c134 6054COMMENT_START
6055 DNS OPTIONS
6056 -----------------------------------------------------------------------------
6057COMMENT_END
6058
6059NAME: check_hostnames
cccac0a2 6060TYPE: onoff
cccac0a2 6061DEFAULT: off
5473c134 6062LOC: Config.onoff.check_hostnames
cccac0a2 6063DOC_START
5473c134 6064 For security and stability reasons Squid can check
6065 hostnames for Internet standard RFC compliance. If you want
6066 Squid to perform these checks turn this directive on.
cccac0a2 6067DOC_END
6068
5473c134 6069NAME: allow_underscore
cccac0a2 6070TYPE: onoff
cccac0a2 6071DEFAULT: on
5473c134 6072LOC: Config.onoff.allow_underscore
cccac0a2 6073DOC_START
5473c134 6074 Underscore characters is not strictly allowed in Internet hostnames
6075 but nevertheless used by many sites. Set this to off if you want
6076 Squid to be strict about the standard.
6077 This check is performed only when check_hostnames is set to on.
cccac0a2 6078DOC_END
6079
5473c134 6080NAME: cache_dns_program
cccac0a2 6081TYPE: string
5473c134 6082IFDEF: USE_DNSSERVERS
6083DEFAULT: @DEFAULT_DNSSERVER@
6084LOC: Config.Program.dnsserver
cccac0a2 6085DOC_START
5473c134 6086 Specify the location of the executable for dnslookup process.
cccac0a2 6087DOC_END
6088
5473c134 6089NAME: dns_children
6090TYPE: int
6091IFDEF: USE_DNSSERVERS
6092DEFAULT: 5
6093LOC: Config.dnsChildren
58850d15 6094DOC_START
5473c134 6095 The number of processes spawn to service DNS name lookups.
6096 For heavily loaded caches on large servers, you should
6097 probably increase this value to at least 10. The maximum
6098 is 32. The default is 5.
58850d15 6099
5473c134 6100 You must have at least one dnsserver process.
58850d15 6101DOC_END
6102
5473c134 6103NAME: dns_retransmit_interval
6104TYPE: time_t
6105DEFAULT: 5 seconds
6106LOC: Config.Timeout.idns_retransmit
6107IFDEF: !USE_DNSSERVERS
cccac0a2 6108DOC_START
5473c134 6109 Initial retransmit interval for DNS queries. The interval is
6110 doubled each time all configured DNS servers have been tried.
cccac0a2 6111
cccac0a2 6112DOC_END
6113
5473c134 6114NAME: dns_timeout
6115TYPE: time_t
6116DEFAULT: 2 minutes
6117LOC: Config.Timeout.idns_query
6118IFDEF: !USE_DNSSERVERS
cccac0a2 6119DOC_START
5473c134 6120 DNS Query timeout. If no response is received to a DNS query
6121 within this time all DNS servers for the queried domain
6122 are assumed to be unavailable.
cccac0a2 6123DOC_END
6124
5473c134 6125NAME: dns_defnames
6126COMMENT: on|off
cccac0a2 6127TYPE: onoff
cccac0a2 6128DEFAULT: off
5473c134 6129LOC: Config.onoff.res_defnames
cccac0a2 6130DOC_START
5473c134 6131 Normally the RES_DEFNAMES resolver option is disabled
6132 (see res_init(3)). This prevents caches in a hierarchy
6133 from interpreting single-component hostnames locally. To allow
6134 Squid to handle single-component names, enable this option.
cccac0a2 6135DOC_END
6136
5473c134 6137NAME: dns_nameservers
6138TYPE: wordlist
6139DEFAULT: none
6140LOC: Config.dns_nameservers
cccac0a2 6141DOC_START
5473c134 6142 Use this if you want to specify a list of DNS name servers
6143 (IP addresses) to use instead of those given in your
6144 /etc/resolv.conf file.
6145 On Windows platforms, if no value is specified here or in
6146 the /etc/resolv.conf file, the list of DNS name servers are
6147 taken from the Windows registry, both static and dynamic DHCP
6148 configurations are supported.
cccac0a2 6149
5473c134 6150 Example: dns_nameservers 10.0.0.1 192.172.0.4
cccac0a2 6151DOC_END
6152
5473c134 6153NAME: hosts_file
cccac0a2 6154TYPE: string
5473c134 6155DEFAULT: @DEFAULT_HOSTS@
6156LOC: Config.etcHostsPath
cccac0a2 6157DOC_START
5473c134 6158 Location of the host-local IP name-address associations
6159 database. Most Operating Systems have such a file on different
6160 default locations:
6161 - Un*X & Linux: /etc/hosts
6162 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
6163 (%SystemRoot% value install default is c:\winnt)
6164 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
6165 (%SystemRoot% value install default is c:\windows)
6166 - Windows 9x/Me: %windir%\hosts
6167 (%windir% value is usually c:\windows)
6168 - Cygwin: /etc/hosts
cccac0a2 6169
5473c134 6170 The file contains newline-separated definitions, in the
6171 form ip_address_in_dotted_form name [name ...] names are
6172 whitespace-separated. Lines beginning with an hash (#)
6173 character are comments.
cccac0a2 6174
5473c134 6175 The file is checked at startup and upon configuration.
6176 If set to 'none', it won't be checked.
6177 If append_domain is used, that domain will be added to
6178 domain-local (i.e. not containing any dot character) host
6179 definitions.
cccac0a2 6180DOC_END
6181
5473c134 6182NAME: append_domain
6183TYPE: string
6184LOC: Config.appendDomain
6185DEFAULT: none
6a2f3fcf 6186DOC_START
5473c134 6187 Appends local domain name to hostnames without any dots in
6188 them. append_domain must begin with a period.
6189
6190 Be warned there are now Internet names with no dots in
6191 them using only top-domain names, so setting this may
6192 cause some Internet sites to become unavailable.
6193
6194Example:
6195 append_domain .yourdomain.com
6a2f3fcf 6196DOC_END
6197
5473c134 6198NAME: ignore_unknown_nameservers
6199TYPE: onoff
6200LOC: Config.onoff.ignore_unknown_nameservers
df6fd596 6201DEFAULT: on
6202DOC_START
5473c134 6203 By default Squid checks that DNS responses are received
6204 from the same IP addresses they are sent to. If they
6205 don't match, Squid ignores the response and writes a warning
6206 message to cache.log. You can allow responses from unknown
6207 nameservers by setting this option to 'off'.
df6fd596 6208DOC_END
6209
cc192b50 6210NAME: dns_v4_fallback
6211TYPE: onoff
6212DEFAULT: on
6213LOC: Config.onoff.dns_require_A
6214DOC_START
6215 Standard practice with DNS is to lookup either A or AAAA records
6216 and use the results if it succeeds. Only looking up the other if
6217 the first attempt fails or otherwise produces no results.
6218
6219 That policy however will cause squid to produce error pages for some
6220 servers that advertise AAAA but are unreachable over IPv6.
6221
6222 If this is ON squid will always lookup both AAAA and A, using both.
6223 If this is OFF squid will lookup AAAA and only try A if none found.
6224
6225 WARNING: There are some possibly unwanted side-effects with this on:
6226 *) Doubles the load placed by squid on the DNS network.
6227 *) May negatively impact connection delay times.
6228DOC_END
6229
6bc15a4f 6230NAME: ipcache_size
6231COMMENT: (number of entries)
6232TYPE: int
6233DEFAULT: 1024
6234LOC: Config.ipcache.size
6235DOC_NONE
6236
6237NAME: ipcache_low
6238COMMENT: (percent)
6239TYPE: int
6240DEFAULT: 90
6241LOC: Config.ipcache.low
6242DOC_NONE
6243
6244NAME: ipcache_high
6245COMMENT: (percent)
6246TYPE: int
6247DEFAULT: 95
6248LOC: Config.ipcache.high
6249DOC_START
6250 The size, low-, and high-water marks for the IP cache.
6251DOC_END
6252
6253NAME: fqdncache_size
6254COMMENT: (number of entries)
6255TYPE: int
6256DEFAULT: 1024
6257LOC: Config.fqdncache.size
6258DOC_START
6259 Maximum number of FQDN cache entries.
6260DOC_END
6261
a58ff010 6262COMMENT_START
5473c134 6263 MISCELLANEOUS
a58ff010 6264 -----------------------------------------------------------------------------
6265COMMENT_END
6266
5473c134 6267NAME: memory_pools
a58ff010 6268COMMENT: on|off
5473c134 6269TYPE: onoff
6270DEFAULT: on
6271LOC: Config.onoff.mem_pools
a58ff010 6272DOC_START
5473c134 6273 If set, Squid will keep pools of allocated (but unused) memory
6274 available for future use. If memory is a premium on your
6275 system and you believe your malloc library outperforms Squid
6276 routines, disable this.
a58ff010 6277DOC_END
6278
5473c134 6279NAME: memory_pools_limit
6280COMMENT: (bytes)
6281TYPE: b_size_t
6282DEFAULT: 5 MB
6283LOC: Config.MemPools.limit
ec1245f8 6284DOC_START
5473c134 6285 Used only with memory_pools on:
6286 memory_pools_limit 50 MB
ec1245f8 6287
5473c134 6288 If set to a non-zero value, Squid will keep at most the specified
6289 limit of allocated (but unused) memory in memory pools. All free()
6290 requests that exceed this limit will be handled by your malloc
6291 library. Squid does not pre-allocate any memory, just safe-keeps
6292 objects that otherwise would be free()d. Thus, it is safe to set
6293 memory_pools_limit to a reasonably high value even if your
6294 configuration will use less memory.
ec1245f8 6295
5473c134 6296 If set to zero, Squid will keep all memory it can. That is, there
6297 will be no limit on the total amount of memory used for safe-keeping.
ec1245f8 6298
5473c134 6299 To disable memory allocation optimization, do not set
6300 memory_pools_limit to 0. Set memory_pools to "off" instead.
6301
6302 An overhead for maintaining memory pools is not taken into account
6303 when the limit is checked. This overhead is close to four bytes per
6304 object kept. However, pools may actually _save_ memory because of
6305 reduced memory thrashing in your malloc library.
ec1245f8 6306DOC_END
6307
5473c134 6308NAME: forwarded_for
67c06f0d
AJ
6309COMMENT: on|off|transparent|truncate|delete
6310TYPE: string
5473c134 6311DEFAULT: on
6312LOC: opt_forwarded_for
5f8252d2 6313DOC_START
67c06f0d
AJ
6314 If set to "on", Squid will append your client's IP address
6315 in the HTTP requests it forwards. By default it looks like:
5f8252d2 6316
5473c134 6317 X-Forwarded-For: 192.1.2.3
6318
67c06f0d 6319 If set to "off", it will appear as
5473c134 6320
6321 X-Forwarded-For: unknown
67c06f0d
AJ
6322
6323 If set to "transparent", Squid will not alter the
6324 X-Forwarded-For header in any way.
6325
6326 If set to "delete", Squid will delete the entire
6327 X-Forwarded-For header.
6328
6329 If set to "truncate", Squid will remove all existing
6330 X-Forwarded-For entries, and place itself as the sole entry.
5f8252d2 6331DOC_END
6332
5473c134 6333NAME: cachemgr_passwd
6334TYPE: cachemgrpasswd
6335DEFAULT: none
6336LOC: Config.passwd_list
5f8252d2 6337DOC_START
5473c134 6338 Specify passwords for cachemgr operations.
5f8252d2 6339
5473c134 6340 Usage: cachemgr_passwd password action action ...
6341
6342 Some valid actions are (see cache manager menu for a full list):
6343 5min
6344 60min
6345 asndb
6346 authenticator
6347 cbdata
6348 client_list
6349 comm_incoming
6350 config *
6351 counters
6352 delay
6353 digest_stats
6354 dns
6355 events
6356 filedescriptors
6357 fqdncache
6358 histograms
6359 http_headers
6360 info
6361 io
6362 ipcache
6363 mem
6364 menu
6365 netdb
6366 non_peers
6367 objects
6368 offline_toggle *
6369 pconn
6370 peer_select
b360c477 6371 reconfigure *
5473c134 6372 redirector
6373 refresh
6374 server_list
6375 shutdown *
6376 store_digest
6377 storedir
6378 utilization
6379 via_headers
6380 vm_objects
6381
6382 * Indicates actions which will not be performed without a
6383 valid password, others can be performed if not listed here.
6384
6385 To disable an action, set the password to "disable".
6386 To allow performing an action without a password, set the
6387 password to "none".
6388
6389 Use the keyword "all" to set the same password for all actions.
6390
6391Example:
6392 cachemgr_passwd secret shutdown
6393 cachemgr_passwd lesssssssecret info stats/objects
6394 cachemgr_passwd disable all
5f8252d2 6395DOC_END
6396
5473c134 6397NAME: client_db
a58ff010 6398COMMENT: on|off
5473c134 6399TYPE: onoff
6400DEFAULT: on
6401LOC: Config.onoff.client_db
a58ff010 6402DOC_START
5473c134 6403 If you want to disable collecting per-client statistics,
6404 turn off client_db here.
a58ff010 6405DOC_END
6406
5473c134 6407NAME: refresh_all_ims
6408COMMENT: on|off
6409TYPE: onoff
6410DEFAULT: off
6411LOC: Config.onoff.refresh_all_ims
a58ff010 6412DOC_START
5473c134 6413 When you enable this option, squid will always check
6414 the origin server for an update when a client sends an
6415 If-Modified-Since request. Many browsers use IMS
6416 requests when the user requests a reload, and this
6417 ensures those clients receive the latest version.
a58ff010 6418
5473c134 6419 By default (off), squid may return a Not Modified response
6420 based on the age of the cached version.
78e8cfc4 6421DOC_END
6422
5473c134 6423NAME: reload_into_ims
6424IFDEF: HTTP_VIOLATIONS
12b91c99 6425COMMENT: on|off
5473c134 6426TYPE: onoff
6427DEFAULT: off
6428LOC: Config.onoff.reload_into_ims
12b91c99 6429DOC_START
5473c134 6430 When you enable this option, client no-cache or ``reload''
6431 requests will be changed to If-Modified-Since requests.
6432 Doing this VIOLATES the HTTP standard. Enabling this
6433 feature could make you liable for problems which it
6434 causes.
6435
6436 see also refresh_pattern for a more selective approach.
12b91c99 6437DOC_END
6438
5473c134 6439NAME: maximum_single_addr_tries
6440TYPE: int
6441LOC: Config.retry.maxtries
6442DEFAULT: 1
a58ff010 6443DOC_START
5473c134 6444 This sets the maximum number of connection attempts for a
6445 host that only has one address (for multiple-address hosts,
6446 each address is tried once).
6447
6448 The default value is one attempt, the (not recommended)
6449 maximum is 255 tries. A warning message will be generated
6450 if it is set to a value greater than ten.
6451
6452 Note: This is in addition to the request re-forwarding which
6453 takes place if Squid fails to get a satisfying response.
a58ff010 6454DOC_END
6455
5473c134 6456NAME: retry_on_error
a58ff010 6457TYPE: onoff
5473c134 6458LOC: Config.retry.onerror
a58ff010 6459DEFAULT: off
6460DOC_START
5473c134 6461 If set to on Squid will automatically retry requests when
6462 receiving an error response. This is mainly useful if you
6463 are in a complex cache hierarchy to work around access
6464 control errors.
5f8252d2 6465DOC_END
6466
5473c134 6467NAME: as_whois_server
5f8252d2 6468TYPE: string
5473c134 6469LOC: Config.as_whois_server
6470DEFAULT: whois.ra.net
6471DEFAULT_IF_NONE: whois.ra.net
5f8252d2 6472DOC_START
5473c134 6473 WHOIS server to query for AS numbers. NOTE: AS numbers are
6474 queried only when Squid starts up, not for every request.
5f8252d2 6475DOC_END
6476
5473c134 6477NAME: offline_mode
5f8252d2 6478TYPE: onoff
5473c134 6479LOC: Config.onoff.offline
5f8252d2 6480DEFAULT: off
6481DOC_START
5473c134 6482 Enable this option and Squid will never try to validate cached
6483 objects.
a58ff010 6484DOC_END
6485
5473c134 6486NAME: uri_whitespace
6487TYPE: uri_whitespace
6488LOC: Config.uri_whitespace
6489DEFAULT: strip
a58ff010 6490DOC_START
5473c134 6491 What to do with requests that have whitespace characters in the
6492 URI. Options:
a58ff010 6493
5473c134 6494 strip: The whitespace characters are stripped out of the URL.
6495 This is the behavior recommended by RFC2396.
6496 deny: The request is denied. The user receives an "Invalid
6497 Request" message.
6498 allow: The request is allowed and the URI is not changed. The
6499 whitespace characters remain in the URI. Note the
6500 whitespace is passed to redirector processes if they
6501 are in use.
6502 encode: The request is allowed and the whitespace characters are
6503 encoded according to RFC1738. This could be considered
6504 a violation of the HTTP/1.1
6505 RFC because proxies are not allowed to rewrite URI's.
6506 chop: The request is allowed and the URI is chopped at the
6507 first whitespace. This might also be considered a
6508 violation.
6509DOC_END
a58ff010 6510
5473c134 6511NAME: chroot
6512TYPE: string
6513LOC: Config.chroot_dir
a58ff010 6514DEFAULT: none
6515DOC_START
2d89f399
HN
6516 Specifies a directiry where Squid should do a chroot() while
6517 initializing. This also causes Squid to fully drop root
6518 privileges after initializing. This means, for example, if you
6519 use a HTTP port less than 1024 and try to reconfigure, you may
6520 get an error saying that Squid can not open the port.
5473c134 6521DOC_END
a58ff010 6522
5473c134 6523NAME: balance_on_multiple_ip
6524TYPE: onoff
6525LOC: Config.onoff.balance_on_multiple_ip
cc192b50 6526DEFAULT: off
5473c134 6527DOC_START
cc192b50 6528 Modern IP resolvers in squid sort lookup results by preferred access.
6529 By default squid will use these IP in order and only rotates to
6530 the next listed when the most preffered fails.
6531
5473c134 6532 Some load balancing servers based on round robin DNS have been
6533 found not to preserve user session state across requests
6534 to different IP addresses.
a58ff010 6535
cc192b50 6536 Enabling this directive Squid rotates IP's per request.
a58ff010 6537DOC_END
6538
5473c134 6539NAME: pipeline_prefetch
6540TYPE: onoff
6541LOC: Config.onoff.pipeline_prefetch
6542DEFAULT: off
a58ff010 6543DOC_START
5473c134 6544 To boost the performance of pipelined requests to closer
6545 match that of a non-proxied environment Squid can try to fetch
6546 up to two requests in parallel from a pipeline.
a58ff010 6547
5473c134 6548 Defaults to off for bandwidth management and access logging
6549 reasons.
6550DOC_END
a58ff010 6551
5473c134 6552NAME: high_response_time_warning
6553TYPE: int
6554COMMENT: (msec)
6555LOC: Config.warnings.high_rptm
6556DEFAULT: 0
6557DOC_START
6558 If the one-minute median response time exceeds this value,
6559 Squid prints a WARNING with debug level 0 to get the
6560 administrators attention. The value is in milliseconds.
a58ff010 6561DOC_END
6562
5473c134 6563NAME: high_page_fault_warning
6564TYPE: int
6565LOC: Config.warnings.high_pf
6566DEFAULT: 0
cc9f92d4 6567DOC_START
5473c134 6568 If the one-minute average page fault rate exceeds this
6569 value, Squid prints a WARNING with debug level 0 to get
6570 the administrators attention. The value is in page faults
6571 per second.
6572DOC_END
cc9f92d4 6573
5473c134 6574NAME: high_memory_warning
6575TYPE: b_size_t
6576LOC: Config.warnings.high_memory
904971da 6577DEFAULT: 0 KB
5473c134 6578DOC_START
6579 If the memory usage (as determined by mallinfo) exceeds
904971da 6580 this amount, Squid prints a WARNING with debug level 0 to get
5473c134 6581 the administrators attention.
6582DOC_END
cc9f92d4 6583
5473c134 6584NAME: sleep_after_fork
6585COMMENT: (microseconds)
6586TYPE: int
6587LOC: Config.sleep_after_fork
6588DEFAULT: 0
6589DOC_START
6590 When this is set to a non-zero value, the main Squid process
6591 sleeps the specified number of microseconds after a fork()
6592 system call. This sleep may help the situation where your
6593 system reports fork() failures due to lack of (virtual)
6594 memory. Note, however, if you have a lot of child
6595 processes, these sleep delays will add up and your
6596 Squid will not service requests for some amount of time
6597 until all the child processes have been started.
6598 On Windows value less then 1000 (1 milliseconds) are
6599 rounded to 1000.
cc9f92d4 6600DOC_END
6601
b6696974 6602NAME: windows_ipaddrchangemonitor
6b0516c6 6603IFDEF: _SQUID_MSWIN_
b6696974
GS
6604COMMENT: on|off
6605TYPE: onoff
6606DEFAULT: on
6607LOC: Config.onoff.WIN32_IpAddrChangeMonitor
6608DOC_START
6609 On Windows Squid by default will monitor IP address changes and will
6610 reconfigure itself after any detected event. This is very useful for
6611 proxies connected to internet with dial-up interfaces.
6612 In some cases (a Proxy server acting as VPN gateway is one) it could be
6613 desiderable to disable this behaviour setting this to 'off'.
6614 Note: after changing this, Squid service must be restarted.
6615DOC_END
6616
cccac0a2 6617EOF