]> git.ipfire.org Git - thirdparty/squid.git/blame - src/cf.data.pre
Fix malloc corruption from use-after-free in peer_select.cc
[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 ----------------------------
5945964d
AJ
32
33 This is the documentation for the Squid configuration file.
34 This documentation can also be found online at:
35 http://www.squid-cache.org/Doc/config/
36
37 You may wish to look at the Squid home page and wiki for the
38 FAQ and other documentation:
39 http://www.squid-cache.org/
40 http://wiki.squid-cache.org/SquidFaq
41 http://wiki.squid-cache.org/ConfigExamples
42
43 This documentation shows what the defaults for various directives
44 happen to be. If you don't need to change the default, you should
45 leave the line out of your squid.conf in most cases.
46
47 In some cases "none" refers to no default setting at all,
48 while in other cases it refers to the value of the option
49 - the comments for that keyword indicate if this is the case.
debd9a31 50
cccac0a2 51COMMENT_END
3a278cb8 52
592a09dc 53COMMENT_START
54 Configuration options can be included using the "include" directive.
5945964d 55 Include takes a list of files to include. Quoting and wildcards are
592a09dc 56 supported.
57
58 For example,
59
60 include /path/to/included/file/squid.acl.config
61
62 Includes can be nested up to a hard-coded depth of 16 levels.
63 This arbitrary restriction is to prevent recursive include references
64 from causing Squid entering an infinite loop whilst trying to load
65 configuration files.
d4a3e179
AR
66
67
2eceb328
CT
68 Values with spaces, quotes, and other special characters
69
70 Squid supports directive parameters with spaces, quotes, and other
71 special characters. Surround such parameters with "double quotes". Use
72 the configuration_includes_quoted_values directive to enable or
73 disable that support.
74
75 Squid supports reading configuration option parameters from external
76 files using the syntax:
77 parameters("/path/filename")
78 For example:
79 acl whitelist dstdomain parameters("/etc/squid/whitelist.txt")
80
5735d30b
AR
81 Conditional configuration
82
83 If-statements can be used to make configuration directives
84 depend on conditions:
85
86 if <CONDITION>
87 ... regular configuration directives ...
88 [else
89 ... regular configuration directives ...]
90 endif
91
92 The else part is optional. The keywords "if", "else", and "endif"
93 must be typed on their own lines, as if they were regular
94 configuration directives.
95
5945964d
AJ
96 NOTE: An else-if condition is not supported.
97
5735d30b
AR
98 These individual conditions types are supported:
99
100 true
101 Always evaluates to true.
102 false
103 Always evaluates to false.
104 <integer> = <integer>
105 Equality comparison of two integer numbers.
106
107
d4a3e179
AR
108 SMP-Related Macros
109
110 The following SMP-related preprocessor macros can be used.
111
112 ${process_name} expands to the current Squid process "name"
113 (e.g., squid1, squid2, or cache1).
114
115 ${process_number} expands to the current Squid process
116 identifier, which is an integer number (e.g., 1, 2, 3) unique
6fe8c876
AJ
117 across all Squid processes of the current service instance.
118
119 ${service_name} expands into the current Squid service instance
120 name identifier which is provided by -n on the command line.
121
592a09dc 122COMMENT_END
123
25234ebd
AJ
124# options still not yet ported from 2.7 to 3.x
125NAME: broken_vary_encoding
126TYPE: obsolete
127DOC_START
128 This option is not yet supported by Squid-3.
129DOC_END
130
131NAME: cache_vary
132TYPE: obsolete
133DOC_START
134 This option is not yet supported by Squid-3.
135DOC_END
136
25234ebd
AJ
137NAME: error_map
138TYPE: obsolete
139DOC_START
140 This option is not yet supported by Squid-3.
141DOC_END
142
143NAME: external_refresh_check
144TYPE: obsolete
145DOC_START
146 This option is not yet supported by Squid-3.
147DOC_END
148
96598f93 149NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency
25234ebd
AJ
150TYPE: obsolete
151DOC_START
152 This option is not yet supported by Squid-3.
153DOC_END
154
96598f93 155NAME: refresh_stale_hit
25234ebd
AJ
156TYPE: obsolete
157DOC_START
158 This option is not yet supported by Squid-3.
159DOC_END
160
96598f93
AJ
161# Options Removed in 3.3
162NAME: ignore_ims_on_miss
25234ebd
AJ
163TYPE: obsolete
164DOC_START
96598f93 165 Remove this line. The HTTP/1.1 feature is now fully supported by default.
25234ebd
AJ
166DOC_END
167
76f44481
AJ
168# Options Removed in 3.2
169NAME: ignore_expect_100
170TYPE: obsolete
171DOC_START
172 Remove this line. The HTTP/1.1 feature is now fully supported by default.
173DOC_END
174
6e095b46
AJ
175NAME: dns_v4_fallback
176TYPE: obsolete
177DOC_START
4ded749e 178 Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant.
6e095b46
AJ
179DOC_END
180
76f44481
AJ
181NAME: ftp_list_width
182TYPE: obsolete
183DOC_START
184 Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead.
185DOC_END
186
38493d67
AJ
187NAME: maximum_single_addr_tries
188TYPE: obsolete
189DOC_START
190 Replaced by connect_retries. The behaviour has changed, please read the documentation before altering.
191DOC_END
192
4ded749e
AJ
193NAME: update_headers
194TYPE: obsolete
195DOC_START
196 Remove this line. The feature is supported by default in storage types where update is implemented.
197DOC_END
198
76f44481
AJ
199NAME: url_rewrite_concurrency
200TYPE: obsolete
201DOC_START
202 Remove this line. Set the 'concurrency=' option of url_rewrite_children instead.
203DOC_END
204
205# Options Removed in 3.1
206NAME: dns_testnames
207TYPE: obsolete
208DOC_START
209 Remove this line. DNS is no longer tested on startup.
210DOC_END
211
212NAME: extension_methods
213TYPE: obsolete
214DOC_START
215 Remove this line. All valid methods for HTTP are accepted by default.
216DOC_END
217
c72a2049
AJ
218# 2.7 Options Removed/Replaced in 3.2
219NAME: zero_buffers
220TYPE: obsolete
221DOC_NONE
222
76f44481
AJ
223# 2.7 Options Removed/Replaced in 3.1
224NAME: incoming_rate
225TYPE: obsolete
226DOC_NONE
227
228NAME: server_http11
229TYPE: obsolete
230DOC_START
231 Remove this line. HTTP/1.1 is supported by default.
232DOC_END
233
234NAME: upgrade_http0.9
235TYPE: obsolete
236DOC_START
237 Remove this line. ICY/1.0 streaming protocol is supported by default.
238DOC_END
239
240NAME: zph_local zph_mode zph_option zph_parent zph_sibling
241TYPE: obsolete
242DOC_START
243 Alter these entries. Use the qos_flows directive instead.
244DOC_END
245
246# Options Removed in 3.0
247NAME: header_access
248TYPE: obsolete
249DOC_START
250 Since squid-3.0 replace with request_header_access or reply_header_access
251 depending on whether you wish to match client requests or server replies.
252DOC_END
253
254NAME: httpd_accel_no_pmtu_disc
255TYPE: obsolete
256DOC_START
257 Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead.
258DOC_END
259
3b31a711
AJ
260NAME: wais_relay_host
261TYPE: obsolete
262DOC_START
263 Replace this line with 'cache_peer' configuration.
264DOC_END
265
266NAME: wais_relay_port
267TYPE: obsolete
268DOC_START
269 Replace this line with 'cache_peer' configuration.
270DOC_END
271
5473c134 272COMMENT_START
41bd17a4 273 OPTIONS FOR AUTHENTICATION
5473c134 274 -----------------------------------------------------------------------------
275COMMENT_END
276
41bd17a4 277NAME: auth_param
278TYPE: authparam
2f1431ea 279IFDEF: USE_AUTH
5817ee13 280LOC: Auth::TheConfig
cccac0a2 281DEFAULT: none
282DOC_START
41bd17a4 283 This is used to define parameters for the various authentication
284 schemes supported by Squid.
cccac0a2 285
41bd17a4 286 format: auth_param scheme parameter [setting]
cccac0a2 287
41bd17a4 288 The order in which authentication schemes are presented to the client is
289 dependent on the order the scheme first appears in config file. IE
290 has a bug (it's not RFC 2617 compliant) in that it will use the basic
291 scheme if basic is the first entry presented, even if more secure
292 schemes are presented. For now use the order in the recommended
293 settings section below. If other browsers have difficulties (don't
294 recognize the schemes offered even if you are using basic) either
295 put basic first, or disable the other schemes (by commenting out their
296 program entry).
cccac0a2 297
41bd17a4 298 Once an authentication scheme is fully configured, it can only be
299 shutdown by shutting squid down and restarting. Changes can be made on
300 the fly and activated with a reconfigure. I.E. You can change to a
301 different helper, but not unconfigure the helper completely.
cccac0a2 302
41bd17a4 303 Please note that while this directive defines how Squid processes
304 authentication it does not automatically activate authentication.
305 To use authentication you must in addition make use of ACLs based
306 on login name in http_access (proxy_auth, proxy_auth_regex or
307 external with %LOGIN used in the format tag). The browser will be
308 challenged for authentication on the first such acl encountered
309 in http_access processing and will also be re-challenged for new
310 login credentials if the request is being denied by a proxy_auth
311 type acl.
cccac0a2 312
41bd17a4 313 WARNING: authentication can't be used in a transparently intercepting
314 proxy as the client then thinks it is talking to an origin server and
315 not the proxy. This is a limitation of bending the TCP/IP protocol to
316 transparently intercepting port 80, not a limitation in Squid.
b3567eb5
FC
317 Ports flagged 'transparent', 'intercept', or 'tproxy' have
318 authentication disabled.
cccac0a2 319
d4806c91
CT
320 === Parameters common to all schemes. ===
321
322 "program" cmdline
323 Specifies the command for the external authenticator. Such a program
324 runs a loop that, on every iteration, reads a request line from
325 the standard and responds with a scheme-specific answer. The loop
326 stops when all input is exchausted (EOF). See scheme-specific
327 "program" descriptions below for details.
328
329 "key_extras" format
330 Specifies a string to be append to request line format for the
331 authentication helper. "Quoted" format values may contain spaces and
332 logformat %macros. In theory, any logformat %macro can be used.
333 In practice, a %macro expands as a dash (-) if the helper request is
334 sent before the required macro information is available to Squid.
335 By default, Squid uses request formats provided in scheme-specific
336 examples below (search for %credentials).
b853db41
CT
337 The expanded key_extras value is added to the Squid credentials
338 cache and, hence, will affect authentication. It can be used to
339 autenticate different users with identical user names (e.g., when user
340 authentication depends on http_port).
341 Avoid adding frequently changing information to key_extras. For
342 example, if you add user source IP, and it changes frequently
343 in your environment, then max_user_ip ACL is going to treat every
344 user+IP combination as a unique "user", breaking the ACL and
345 wasting a lot of memory on those user records. It will also force
346 users to authenticate from scratch whenever their IP changes.
d4806c91 347
41bd17a4 348 === Parameters for the basic scheme follow. ===
cccac0a2 349
41bd17a4 350 "program" cmdline
351 Specify the command for the external authenticator. Such a program
d4806c91
CT
352 reads a request_format line ("username password" by default) and
353 replies with one of three results:
5269ec0e
AJ
354
355 OK
356 the user exists.
357
358 ERR
359 the user does not exist.
360
361 BH
4ded749e 362 An internal error occurred in the helper, preventing
5269ec0e
AJ
363 a result being identified.
364
365 "ERR" and "BH" results may optionally be followed by message="..."
366 containing a description available as %m in the returned error page.
367
b3567eb5
FC
368 If you use an authenticator, make sure you have 1 acl of type
369 proxy_auth.
cccac0a2 370
41bd17a4 371 By default, the basic authentication scheme is not used unless a
372 program is specified.
cccac0a2 373
41bd17a4 374 If you want to use the traditional NCSA proxy authentication, set
375 this line to something like
307b83b7 376
f6c0fef2 377 auth_param basic program @DEFAULT_PREFIX@/libexec/basic_ncsa_auth @DEFAULT_PREFIX@/etc/passwd
9e7dbc51 378
d2a89ac1 379 "utf8" on|off
4ded749e 380 HTTP uses iso-latin-1 as character set, while some authentication
d2a89ac1
AJ
381 backends such as LDAP expects UTF-8. If this is set to on Squid will
382 translate the HTTP iso-latin-1 charset to UTF-8 before sending the
383 username & password to the helper.
384
7353861b 385 "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
48d54e4d 386 The maximum number of authenticator processes to spawn. If you start too few
41bd17a4 387 Squid will have to wait for them to process a backlog of credential
388 verifications, slowing it down. When password verifications are
389 done via a (slow) network you are likely to need lots of
390 authenticator processes.
48d54e4d
AJ
391
392 The startup= and idle= options permit some skew in the exact amount
64d2327b
AJ
393 run. A minimum of startup=N will begin during startup and reconfigure.
394 Squid will start more in groups of up to idle=N in an attempt to meet
48d54e4d
AJ
395 traffic needs and to keep idle=N free above those traffic needs up to
396 the maximum.
397
7353861b
HN
398 The concurrency= option sets the number of concurrent requests the
399 helper can process. The default of 0 is used for helpers who only
400 supports one request at a time. Setting this to a number greater than
401 0 changes the protocol used to include a channel number first on the
402 request/response line, allowing multiple requests to be sent to the
4ded749e 403 same helper in parallel without waiting for the response.
41bd17a4 404 Must not be set unless it's known the helper supports this.
7353861b
HN
405
406 auth_param basic children 20 startup=0 idle=1
0fdafae7 407
41bd17a4 408 "realm" realmstring
409 Specifies the realm name which is to be reported to the
410 client for the basic proxy authentication scheme (part of
411 the text the user will see when prompted their username and
412 password). There is no default.
413 auth_param basic realm Squid proxy-caching web server
d1b63fc8 414
41bd17a4 415 "credentialsttl" timetolive
416 Specifies how long squid assumes an externally validated
417 username:password pair is valid for - in other words how
418 often the helper program is called for that user. Set this
419 low to force revalidation with short lived passwords. Note
420 setting this high does not impact your susceptibility
421 to replay attacks unless you are using an one-time password
422 system (such as SecureID). If you are using such a system,
423 you will be vulnerable to replay attacks unless you also
424 use the max_user_ip ACL in an http_access rule.
cccac0a2 425
41bd17a4 426 "casesensitive" on|off
427 Specifies if usernames are case sensitive. Most user databases are
428 case insensitive allowing the same username to be spelled using both
429 lower and upper case letters, but some are case sensitive. This
430 makes a big difference for user_max_ip ACL processing and similar.
431 auth_param basic casesensitive off
cccac0a2 432
41bd17a4 433 === Parameters for the digest scheme follow ===
cccac0a2 434
41bd17a4 435 "program" cmdline
d4806c91
CT
436 Specify the command for the external authenticator. Such a program
437 reads a request_format line ("username":"realm" by default) and
5269ec0e
AJ
438 replies with one of three results:
439
440 OK ha1="..."
441 the user exists. The ha1= key is mandatory and
442 contains the appropriate H(A1) value, hex encoded.
443 See rfc 2616 for the definition of H(A1).
444
445 ERR
446 the user does not exist.
447
448 BH
4ded749e 449 An internal error occurred in the helper, preventing
5269ec0e
AJ
450 a result being identified.
451
452 "ERR" and "BH" results may optionally be followed by message="..."
453 containing a description available as %m in the returned error page.
cccac0a2 454
41bd17a4 455 By default, the digest authentication scheme is not used unless a
456 program is specified.
b8c0c06d 457
41bd17a4 458 If you want to use a digest authenticator, set this line to
459 something like
cccac0a2 460
7ce93108 461 auth_param digest program @DEFAULT_PREFIX@/bin/digest_pw_auth @DEFAULT_PREFIX@/etc/digpass
cccac0a2 462
d2a89ac1 463 "utf8" on|off
4ded749e 464 HTTP uses iso-latin-1 as character set, while some authentication
d2a89ac1
AJ
465 backends such as LDAP expects UTF-8. If this is set to on Squid will
466 translate the HTTP iso-latin-1 charset to UTF-8 before sending the
467 username & password to the helper.
468
7353861b 469 "children" numberofchildren [startup=N] [idle=N] [concurrency=N]
48d54e4d 470 The maximum number of authenticator processes to spawn (default 5).
41bd17a4 471 If you start too few Squid will have to wait for them to
472 process a backlog of H(A1) calculations, slowing it down.
473 When the H(A1) calculations are done via a (slow) network
474 you are likely to need lots of authenticator processes.
48d54e4d
AJ
475
476 The startup= and idle= options permit some skew in the exact amount
64d2327b
AJ
477 run. A minimum of startup=N will begin during startup and reconfigure.
478 Squid will start more in groups of up to idle=N in an attempt to meet
48d54e4d
AJ
479 traffic needs and to keep idle=N free above those traffic needs up to
480 the maximum.
481
7353861b
HN
482 The concurrency= option sets the number of concurrent requests the
483 helper can process. The default of 0 is used for helpers who only
484 supports one request at a time. Setting this to a number greater than
485 0 changes the protocol used to include a channel number first on the
486 request/response line, allowing multiple requests to be sent to the
4ded749e 487 same helper in parallel without waiting for the response.
7353861b
HN
488 Must not be set unless it's known the helper supports this.
489
48d54e4d 490 auth_param digest children 20 startup=0 idle=1
cccac0a2 491
41bd17a4 492 "realm" realmstring
493 Specifies the realm name which is to be reported to the
494 client for the digest proxy authentication scheme (part of
495 the text the user will see when prompted their username and
496 password). There is no default.
497 auth_param digest realm Squid proxy-caching web server
cccac0a2 498
41bd17a4 499 "nonce_garbage_interval" timeinterval
500 Specifies the interval that nonces that have been issued
501 to client_agent's are checked for validity.
cccac0a2 502
41bd17a4 503 "nonce_max_duration" timeinterval
504 Specifies the maximum length of time a given nonce will be
505 valid for.
cccac0a2 506
41bd17a4 507 "nonce_max_count" number
508 Specifies the maximum number of times a given nonce can be
509 used.
cccac0a2 510
41bd17a4 511 "nonce_strictness" on|off
512 Determines if squid requires strict increment-by-1 behavior
513 for nonce counts, or just incrementing (off - for use when
4ded749e 514 user agents generate nonce counts that occasionally miss 1
41bd17a4 515 (ie, 1,2,4,6)). Default off.
cccac0a2 516
41bd17a4 517 "check_nonce_count" on|off
518 This directive if set to off can disable the nonce count check
519 completely to work around buggy digest qop implementations in
520 certain mainstream browser versions. Default on to check the
521 nonce count to protect from authentication replay attacks.
cccac0a2 522
41bd17a4 523 "post_workaround" on|off
524 This is a workaround to certain buggy browsers who sends
525 an incorrect request digest in POST requests when reusing
526 the same nonce as acquired earlier on a GET request.
cccac0a2 527
41bd17a4 528 === NTLM scheme options follow ===
cccac0a2 529
41bd17a4 530 "program" cmdline
531 Specify the command for the external NTLM authenticator.
532 Such a program reads exchanged NTLMSSP packets with
533 the browser via Squid until authentication is completed.
534 If you use an NTLM authenticator, make sure you have 1 acl
5269ec0e 535 of type proxy_auth. By default, the NTLM authenticator program
41bd17a4 536 is not used.
cccac0a2 537
e4752e21 538 auth_param ntlm program /usr/bin/ntlm_auth
cccac0a2 539
48d54e4d
AJ
540 "children" numberofchildren [startup=N] [idle=N]
541 The maximum number of authenticator processes to spawn (default 5).
41bd17a4 542 If you start too few Squid will have to wait for them to
543 process a backlog of credential verifications, slowing it
544 down. When credential verifications are done via a (slow)
545 network you are likely to need lots of authenticator
546 processes.
cccac0a2 547
48d54e4d 548 The startup= and idle= options permit some skew in the exact amount
64d2327b
AJ
549 run. A minimum of startup=N will begin during startup and reconfigure.
550 Squid will start more in groups of up to idle=N in an attempt to meet
48d54e4d
AJ
551 traffic needs and to keep idle=N free above those traffic needs up to
552 the maximum.
553
554 auth_param ntlm children 20 startup=0 idle=1
cccac0a2 555
41bd17a4 556 "keep_alive" on|off
557 If you experience problems with PUT/POST requests when using the
558 Negotiate authentication scheme then you can try setting this to
559 off. This will cause Squid to forcibly close the connection on
560 the initial requests where the browser asks which schemes are
561 supported by the proxy.
cccac0a2 562
41bd17a4 563 auth_param ntlm keep_alive on
cccac0a2 564
41bd17a4 565 === Options for configuring the NEGOTIATE auth-scheme follow ===
cccac0a2 566
41bd17a4 567 "program" cmdline
568 Specify the command for the external Negotiate authenticator.
569 This protocol is used in Microsoft Active-Directory enabled setups with
570 the Microsoft Internet Explorer or Mozilla Firefox browsers.
571 Its main purpose is to exchange credentials with the Squid proxy
572 using the Kerberos mechanisms.
b3567eb5
FC
573 If you use a Negotiate authenticator, make sure you have at least
574 one acl of type proxy_auth active. By default, the negotiate
5269ec0e 575 authenticator program is not used.
41bd17a4 576 The only supported program for this role is the ntlm_auth
577 program distributed as part of Samba, version 4 or later.
cccac0a2 578
e4752e21 579 auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=gss-spnego
cccac0a2 580
48d54e4d
AJ
581 "children" numberofchildren [startup=N] [idle=N]
582 The maximum number of authenticator processes to spawn (default 5).
41bd17a4 583 If you start too few Squid will have to wait for them to
584 process a backlog of credential verifications, slowing it
4ded749e 585 down. When credential verifications are done via a (slow)
41bd17a4 586 network you are likely to need lots of authenticator
587 processes.
48d54e4d
AJ
588
589 The startup= and idle= options permit some skew in the exact amount
64d2327b
AJ
590 run. A minimum of startup=N will begin during startup and reconfigure.
591 Squid will start more in groups of up to idle=N in an attempt to meet
48d54e4d
AJ
592 traffic needs and to keep idle=N free above those traffic needs up to
593 the maximum.
594
595 auth_param negotiate children 20 startup=0 idle=1
d3803853 596
41bd17a4 597 "keep_alive" on|off
598 If you experience problems with PUT/POST requests when using the
599 Negotiate authentication scheme then you can try setting this to
600 off. This will cause Squid to forcibly close the connection on
601 the initial requests where the browser asks which schemes are
602 supported by the proxy.
527ee50d 603
41bd17a4 604 auth_param negotiate keep_alive on
e0855596
AJ
605
606 Examples:
607
41bd17a4 608#Recommended minimum configuration per scheme:
609#auth_param negotiate program <uncomment and complete this line to activate>
48d54e4d 610#auth_param negotiate children 20 startup=0 idle=1
41bd17a4 611#auth_param negotiate keep_alive on
e0855596 612#
41bd17a4 613#auth_param ntlm program <uncomment and complete this line to activate>
48d54e4d 614#auth_param ntlm children 20 startup=0 idle=1
41bd17a4 615#auth_param ntlm keep_alive on
e0855596 616#
41bd17a4 617#auth_param digest program <uncomment and complete this line>
48d54e4d 618#auth_param digest children 20 startup=0 idle=1
41bd17a4 619#auth_param digest realm Squid proxy-caching web server
620#auth_param digest nonce_garbage_interval 5 minutes
621#auth_param digest nonce_max_duration 30 minutes
622#auth_param digest nonce_max_count 50
e0855596 623#
41bd17a4 624#auth_param basic program <uncomment and complete this line>
6f4d3ed6 625#auth_param basic children 5 startup=5 idle=1
41bd17a4 626#auth_param basic realm Squid proxy-caching web server
627#auth_param basic credentialsttl 2 hours
41bd17a4 628DOC_END
cccac0a2 629
41bd17a4 630NAME: authenticate_cache_garbage_interval
631TYPE: time_t
632DEFAULT: 1 hour
633LOC: Config.authenticateGCInterval
634DOC_START
635 The time period between garbage collection across the username cache.
4ded749e 636 This is a trade-off between memory utilization (long intervals - say
41bd17a4 637 2 days) and CPU (short intervals - say 1 minute). Only change if you
638 have good reason to.
639DOC_END
cccac0a2 640
41bd17a4 641NAME: authenticate_ttl
642TYPE: time_t
643DEFAULT: 1 hour
644LOC: Config.authenticateTTL
645DOC_START
646 The time a user & their credentials stay in the logged in
647 user cache since their last request. When the garbage
648 interval passes, all user credentials that have passed their
649 TTL are removed from memory.
650DOC_END
cccac0a2 651
41bd17a4 652NAME: authenticate_ip_ttl
653TYPE: time_t
654LOC: Config.authenticateIpTTL
c35dd848 655DEFAULT: 1 second
41bd17a4 656DOC_START
657 If you use proxy authentication and the 'max_user_ip' ACL,
658 this directive controls how long Squid remembers the IP
659 addresses associated with each user. Use a small value
660 (e.g., 60 seconds) if your users might change addresses
4ded749e 661 quickly, as is the case with dialup. You might be safe
41bd17a4 662 using a larger value (e.g., 2 hours) in a corporate LAN
663 environment with relatively static address assignments.
664DOC_END
cccac0a2 665
3d1e3e43 666COMMENT_START
667 ACCESS CONTROLS
668 -----------------------------------------------------------------------------
669COMMENT_END
670
41bd17a4 671NAME: external_acl_type
672TYPE: externalAclHelper
673LOC: Config.externalAclHelperList
cccac0a2 674DEFAULT: none
cccac0a2 675DOC_START
41bd17a4 676 This option defines external acl classes using a helper program
677 to look up the status
cccac0a2 678
41bd17a4 679 external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
cccac0a2 680
41bd17a4 681 Options:
cccac0a2 682
41bd17a4 683 ttl=n TTL in seconds for cached results (defaults to 3600
684 for 1 hour)
685 negative_ttl=n
686 TTL for cached negative lookups (default same
687 as ttl)
48d54e4d
AJ
688 children-max=n
689 Maximum number of acl helper processes spawned to service
690 external acl lookups of this type. (default 20)
691 children-startup=n
692 Minimum number of acl helper processes to spawn during
693 startup and reconfigure to service external acl lookups
694 of this type. (default 0)
695 children-idle=n
696 Number of acl helper processes to keep ahead of traffic
697 loads. Squid will spawn this many at once whenever load
698 rises above the capabilities of existing processes.
699 Up to the value of children-max. (default 1)
41bd17a4 700 concurrency=n concurrency level per process. Only used with helpers
701 capable of processing more than one query at a time.
48d54e4d 702 cache=n limit the result cache size, default is unbounded.
41bd17a4 703 grace=n Percentage remaining of TTL where a refresh of a
704 cached entry should be initiated without needing to
48d54e4d 705 wait for a new reply. (default is for no grace period)
41bd17a4 706 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
91e64de9
AJ
707 ipv4 / ipv6 IP protocol used to communicate with this helper.
708 The default is to auto-detect IPv6 and use it when available.
cccac0a2 709
41bd17a4 710 FORMAT specifications
cccac0a2 711
41bd17a4 712 %LOGIN Authenticated user login name
99e4ad67
JB
713 %EXT_USER Username from previous external acl
714 %EXT_LOG Log details from previous external acl
715 %EXT_TAG Tag from previous external acl
41bd17a4 716 %IDENT Ident user name
717 %SRC Client IP
718 %SRCPORT Client source port
719 %URI Requested URI
720 %DST Requested host
721 %PROTO Requested protocol
722 %PORT Requested port
723 %PATH Requested URL path
724 %METHOD Request method
725 %MYADDR Squid interface address
726 %MYPORT Squid http_port number
727 %PATH Requested URL-path (including query-string if any)
728 %USER_CERT SSL User certificate in PEM format
729 %USER_CERTCHAIN SSL User certificate chain in PEM format
730 %USER_CERT_xx SSL User certificate subject attribute xx
731 %USER_CA_xx SSL User certificate issuer attribute xx
7b0ca1e8 732
c68c9682 733 %>{Header} HTTP request header "Header"
7b0ca1e8 734 %>{Hdr:member}
c68c9682 735 HTTP request header "Hdr" list member "member"
7b0ca1e8 736 %>{Hdr:;member}
41bd17a4 737 HTTP request header list member using ; as
738 list separator. ; can be any non-alphanumeric
739 character.
cccac0a2 740
c68c9682 741 %<{Header} HTTP reply header "Header"
7b0ca1e8 742 %<{Hdr:member}
c68c9682 743 HTTP reply header "Hdr" list member "member"
7b0ca1e8
AJ
744 %<{Hdr:;member}
745 HTTP reply header list member using ; as
746 list separator. ; can be any non-alphanumeric
747 character.
748
ec2d5242
HN
749 %ACL The name of the ACL being tested.
750 %DATA The ACL arguments. If not used then any arguments
751 is automatically added at the end of the line
752 sent to the helper.
753 NOTE: this will encode the arguments as one token,
754 whereas the default will pass each separately.
755
0db8942f
AJ
756 %% The percent sign. Useful for helpers which need
757 an unchanging input format.
758
cccac0a2 759
5269ec0e
AJ
760 General request syntax:
761
762 [channel-ID] FORMAT-values [acl-values ...]
763
764
765 FORMAT-values consists of transaction details expanded with
766 whitespace separation per the config file FORMAT specification
767 using the FORMAT macros listed above.
768
769 acl-values consists of any string specified in the referencing
770 config 'acl ... external' line. see the "acl external" directive.
771
772 Request values sent to the helper are URL escaped to protect
773 each value in requests against whitespaces.
774
775 If using protocol=2.5 then the request sent to the helper is not
776 URL escaped to protect against whitespace.
777
778 NOTE: protocol=3.0 is deprecated as no longer necessary.
779
780 When using the concurrency= option the protocol is changed by
781 introducing a query channel tag in front of the request/response.
782 The query channel tag is a number between 0 and concurrency-1.
783 This value must be echoed back unchanged to Squid as the first part
784 of the response relating to its request.
785
786
787 The helper receives lines expanded per the above format specification
788 and for each input line returns 1 line starting with OK/ERR/BH result
789 code and optionally followed by additional keywords with more details.
790
cccac0a2 791
41bd17a4 792 General result syntax:
cccac0a2 793
5269ec0e
AJ
794 [channel-ID] result keyword=value ...
795
796 Result consists of one of the codes:
797
798 OK
799 the ACL test produced a match.
800
801 ERR
802 the ACL test does not produce a match.
803
804 BH
4ded749e 805 An internal error occurred in the helper, preventing
5269ec0e
AJ
806 a result being identified.
807
808 The meaning of 'a match' is determined by your squid.conf
809 access control configuration. See the Squid wiki for details.
cccac0a2 810
41bd17a4 811 Defined keywords:
cccac0a2 812
41bd17a4 813 user= The users name (login)
5269ec0e 814
41bd17a4 815 password= The users password (for login= cache_peer option)
5269ec0e 816
05e52854 817 message= Message describing the reason for this response.
5269ec0e
AJ
818 Available as %o in error pages.
819 Useful on (ERR and BH results).
820
05e52854
AJ
821 tag= Apply a tag to a request. Only sets a tag once,
822 does not alter existing tags.
5269ec0e 823
41bd17a4 824 log= String to be logged in access.log. Available as
5269ec0e 825 %ea in logformat specifications.
934b03fc 826
05e52854 827 Any keywords may be sent on any response whether OK, ERR or BH.
6a566b9c 828
05e52854
AJ
829 All response keyword values need to be a single token with URL
830 escaping, or enclosed in double quotes (") and escaped using \ on
24eac830
AJ
831 any double quotes or \ characters within the value. The wrapping
832 double quotes are removed before the value is interpreted by Squid.
833 \r and \n are also replace by CR and LF.
1e5562e3 834
24eac830
AJ
835 Some example key values:
836
5269ec0e 837 user=John%20Smith
24eac830
AJ
838 user="John Smith"
839 user="J. \"Bob\" Smith"
cccac0a2 840DOC_END
841
41bd17a4 842NAME: acl
843TYPE: acl
844LOC: Config.aclList
cb4f4424 845IF USE_OPENSSL
cf1c09f6
CT
846DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED
847DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID
848DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH
849DEFAULT: ssl::certUntrusted ssl_error X509_V_ERR_INVALID_CA X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY X509_V_ERR_CERT_UNTRUSTED
850DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
851ENDIF
1f5bd0a4 852DEFAULT: all src all
b8a25eaa
AJ
853DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/
854DEFAULT: localhost src 127.0.0.1/32 ::1
855DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
856DEFAULT_DOC: ACLs all, manager, localhost, and to_localhost are predefined.
cccac0a2 857DOC_START
41bd17a4 858 Defining an Access List
cccac0a2 859
375eeb3b
AJ
860 Every access list definition must begin with an aclname and acltype,
861 followed by either type-specific arguments or a quoted filename that
862 they are read from.
cccac0a2 863
375eeb3b
AJ
864 acl aclname acltype argument ...
865 acl aclname acltype "file" ...
cccac0a2 866
375eeb3b 867 When using "file", the file should contain one item per line.
cccac0a2 868
0f987978
CT
869 Some acl types supports options which changes their default behaviour.
870 The available options are:
871
872 -i,+i By default, regular expressions are CASE-SENSITIVE. To make them
873 case-insensitive, use the -i option. To return case-sensitive
874 use the +i option between patterns, or make a new ACL line
875 without -i.
876
877 -n Disable lookups and address type conversions. If lookup or
878 conversion is required because the parameter type (IP or
879 domain name) does not match the message address type (domain
880 name or IP), then the ACL would immediately declare a mismatch
881 without any warnings or lookups.
882
883 -- Used to stop processing all options, in the case the first acl
884 value has '-' character as first character (for example the '-'
885 is a valid domain name)
cccac0a2 886
b3567eb5
FC
887 Some acl types require suspending the current request in order
888 to access some external data source.
889 Those which do are marked with the tag [slow], those which
890 don't are marked as [fast].
891 See http://wiki.squid-cache.org/SquidFaq/SquidAcl
892 for further information
e988aa40
AJ
893
894 ***** ACL TYPES AVAILABLE *****
895
1e40905d
AJ
896 acl aclname src ip-address/mask ... # clients IP address [fast]
897 acl aclname src addr1-addr2/mask ... # range of addresses [fast]
0f987978 898 acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow]
1e40905d 899 acl aclname localip ip-address/mask ... # IP address the client connected to [fast]
cccac0a2 900
41bd17a4 901 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
902 # The arp ACL requires the special configure option --enable-arp-acl.
903 # Furthermore, the ARP ACL code is not portable to all operating systems.
b3567eb5
FC
904 # It works on Linux, Solaris, Windows, FreeBSD, and some
905 # other *BSD variants.
906 # [fast]
41bd17a4 907 #
908 # NOTE: Squid can only determine the MAC address for clients that are on
b3567eb5
FC
909 # the same subnet. If the client is on a different subnet,
910 # then Squid cannot find out its MAC address.
911
912 acl aclname srcdomain .foo.com ...
913 # reverse lookup, from client IP [slow]
0f987978 914 acl aclname dstdomain [-n] .foo.com ...
e38c7724 915 # Destination server from URL [fast]
b3567eb5
FC
916 acl aclname srcdom_regex [-i] \.foo\.com ...
917 # regex matching client name [slow]
0f987978 918 acl aclname dstdom_regex [-n] [-i] \.foo\.com ...
e38c7724 919 # regex matching server [fast]
b3567eb5 920 #
41bd17a4 921 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
922 # based URL is used and no match is found. The name "none" is used
923 # if the reverse lookup fails.
9bc73deb 924
375eeb3b
AJ
925 acl aclname src_as number ...
926 acl aclname dst_as number ...
b3567eb5 927 # [fast]
e988aa40
AJ
928 # Except for access control, AS numbers can be used for
929 # routing of requests to specific caches. Here's an
930 # example for routing all requests for AS#1241 and only
931 # those to mycache.mydomain.net:
932 # acl asexample dst_as 1241
933 # cache_peer_access mycache.mydomain.net allow asexample
934 # cache_peer_access mycache_mydomain.net deny all
7f7db318 935
6db78a1a 936 acl aclname peername myPeer ...
b3567eb5 937 # [fast]
6db78a1a
AJ
938 # match against a named cache_peer entry
939 # set unique name= on cache_peer lines for reliable use.
940
375eeb3b 941 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
b3567eb5 942 # [fast]
375eeb3b
AJ
943 # day-abbrevs:
944 # S - Sunday
945 # M - Monday
946 # T - Tuesday
947 # W - Wednesday
948 # H - Thursday
949 # F - Friday
950 # A - Saturday
951 # h1:m1 must be less than h2:m2
952
b3567eb5
FC
953 acl aclname url_regex [-i] ^http:// ...
954 # regex matching on whole URL [fast]
9d35fe37
AJ
955 acl aclname urllogin [-i] [^a-zA-Z0-9] ...
956 # regex matching on URL login field
b3567eb5
FC
957 acl aclname urlpath_regex [-i] \.gif$ ...
958 # regex matching on URL path [fast]
e988aa40 959
b3567eb5
FC
960 acl aclname port 80 70 21 0-1024... # destination TCP port [fast]
961 # ranges are alloed
1e40905d
AJ
962 acl aclname localport 3128 ... # TCP port the client connected to [fast]
963 # NP: for interception mode this is usually '80'
964
b3567eb5 965 acl aclname myportname 3128 ... # http(s)_port name [fast]
e988aa40 966
b3567eb5
FC
967 acl aclname proto HTTP FTP ... # request protocol [fast]
968
969 acl aclname method GET POST ... # HTTP request method [fast]
e988aa40 970
b3567eb5
FC
971 acl aclname http_status 200 301 500- 400-403 ...
972 # status code in reply [fast]
e988aa40 973
375eeb3b 974 acl aclname browser [-i] regexp ...
b3567eb5 975 # pattern match on User-Agent header (see also req_header below) [fast]
e988aa40 976
375eeb3b 977 acl aclname referer_regex [-i] regexp ...
b3567eb5 978 # pattern match on Referer header [fast]
41bd17a4 979 # Referer is highly unreliable, so use with care
e988aa40 980
375eeb3b 981 acl aclname ident username ...
41bd17a4 982 acl aclname ident_regex [-i] pattern ...
b3567eb5 983 # string match on ident output [slow]
41bd17a4 984 # use REQUIRED to accept any non-null ident.
cf5cc17e 985
41bd17a4 986 acl aclname proxy_auth [-i] username ...
987 acl aclname proxy_auth_regex [-i] pattern ...
b3567eb5
FC
988 # perform http authentication challenge to the client and match against
989 # supplied credentials [slow]
990 #
991 # takes a list of allowed usernames.
41bd17a4 992 # use REQUIRED to accept any valid username.
993 #
b3567eb5
FC
994 # Will use proxy authentication in forward-proxy scenarios, and plain
995 # http authenticaiton in reverse-proxy scenarios
996 #
41bd17a4 997 # NOTE: when a Proxy-Authentication header is sent but it is not
998 # needed during ACL checking the username is NOT logged
999 # in access.log.
1000 #
1001 # NOTE: proxy_auth requires a EXTERNAL authentication program
1002 # to check username/password combinations (see
1003 # auth_param directive).
1004 #
e988aa40
AJ
1005 # NOTE: proxy_auth can't be used in a transparent/intercepting proxy
1006 # as the browser needs to be configured for using a proxy in order
41bd17a4 1007 # to respond to proxy authentication.
8e8d4f30 1008
41bd17a4 1009 acl aclname snmp_community string ...
b3567eb5 1010 # A community string to limit access to your SNMP Agent [fast]
41bd17a4 1011 # Example:
1012 #
1013 # acl snmppublic snmp_community public
934b03fc 1014
41bd17a4 1015 acl aclname maxconn number
1016 # This will be matched when the client's IP address has
55d0fae8
AJ
1017 # more than <number> TCP connections established. [fast]
1018 # NOTE: This only measures direct TCP links so X-Forwarded-For
1019 # indirect clients are not counted.
1e5562e3 1020
41bd17a4 1021 acl aclname max_user_ip [-s] number
1022 # This will be matched when the user attempts to log in from more
1023 # than <number> different ip addresses. The authenticate_ip_ttl
b3567eb5 1024 # parameter controls the timeout on the ip entries. [fast]
41bd17a4 1025 # If -s is specified the limit is strict, denying browsing
1026 # from any further IP addresses until the ttl has expired. Without
1027 # -s Squid will just annoy the user by "randomly" denying requests.
1028 # (the counter is reset each time the limit is reached and a
1029 # request is denied)
1030 # NOTE: in acceleration mode or where there is mesh of child proxies,
1031 # clients may appear to come from multiple addresses if they are
1032 # going through proxy farms, so a limit of 1 may cause user problems.
cccac0a2 1033
cb1b906f
AJ
1034 acl aclname random probability
1035 # Pseudo-randomly match requests. Based on the probability given.
1036 # Probability may be written as a decimal (0.333), fraction (1/3)
1037 # or ratio of matches:non-matches (3:5).
1038
375eeb3b 1039 acl aclname req_mime_type [-i] mime-type ...
41bd17a4 1040 # regex match against the mime type of the request generated
1041 # by the client. Can be used to detect file upload or some
b3567eb5 1042 # types HTTP tunneling requests [fast]
41bd17a4 1043 # NOTE: This does NOT match the reply. You cannot use this
1044 # to match the returned file type.
cccac0a2 1045
41bd17a4 1046 acl aclname req_header header-name [-i] any\.regex\.here
1047 # regex match against any of the known request headers. May be
1048 # thought of as a superset of "browser", "referer" and "mime-type"
b3567eb5 1049 # ACL [fast]
cccac0a2 1050
375eeb3b 1051 acl aclname rep_mime_type [-i] mime-type ...
41bd17a4 1052 # regex match against the mime type of the reply received by
1053 # squid. Can be used to detect file download or some
b3567eb5 1054 # types HTTP tunneling requests. [fast]
41bd17a4 1055 # NOTE: This has no effect in http_access rules. It only has
1056 # effect in rules that affect the reply data stream such as
1057 # http_reply_access.
cccac0a2 1058
41bd17a4 1059 acl aclname rep_header header-name [-i] any\.regex\.here
1060 # regex match against any of the known reply headers. May be
1061 # thought of as a superset of "browser", "referer" and "mime-type"
b3567eb5 1062 # ACLs [fast]
cccac0a2 1063
375eeb3b 1064 acl aclname external class_name [arguments...]
41bd17a4 1065 # external ACL lookup via a helper class defined by the
b3567eb5 1066 # external_acl_type directive [slow]
cccac0a2 1067
41bd17a4 1068 acl aclname user_cert attribute values...
1069 # match against attributes in a user SSL certificate
b3567eb5 1070 # attribute is one of DN/C/O/CN/L/ST [fast]
cccac0a2 1071
41bd17a4 1072 acl aclname ca_cert attribute values...
1073 # match against attributes a users issuing CA SSL certificate
b3567eb5 1074 # attribute is one of DN/C/O/CN/L/ST [fast]
cccac0a2 1075
41bd17a4 1076 acl aclname ext_user username ...
1077 acl aclname ext_user_regex [-i] pattern ...
b3567eb5 1078 # string match on username returned by external acl helper [slow]
41bd17a4 1079 # use REQUIRED to accept any non-null user name.
b3567eb5 1080
0ab50441 1081 acl aclname tag tagvalue ...
b3567eb5 1082 # string match on tag returned by external acl helper [slow]
cccac0a2 1083
bbaf2685
AJ
1084 acl aclname hier_code codename ...
1085 # string match against squid hierarchy code(s); [fast]
1086 # e.g., DIRECT, PARENT_HIT, NONE, etc.
1087 #
1088 # NOTE: This has no effect in http_access rules. It only has
1089 # effect in rules that affect the reply data stream such as
1090 # http_reply_access.
1091
39baccc8
CT
1092 acl aclname note name [value ...]
1093 # match transaction annotation [fast]
1094 # Without values, matches any annotation with a given name.
1095 # With value(s), matches any annotation with a given name that
1096 # also has one of the given values.
1097 # Names and values are compared using a string equality test.
1098 # Annotation sources include note and adaptation_meta directives
1099 # as well as helper and eCAP responses.
1100
c302ddb5
CT
1101 acl aclname adaptation_service service ...
1102 # Matches the name of any icap_service, ecap_service,
1103 # adaptation_service_set, or adaptation_service_chain that Squid
1104 # has used (or attempted to use) for the master transaction.
1105 # This ACL must be defined after the corresponding adaptation
1106 # service is named in squid.conf. This ACL is usable with
1107 # adaptation_meta because it starts matching immediately after
1108 # the service has been selected for adaptation.
1109
cb4f4424 1110IF USE_OPENSSL
cf1c09f6
CT
1111 acl aclname ssl_error errorname
1112 # match against SSL certificate validation error [fast]
cf1c09f6 1113 #
7a957a93
AR
1114 # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt
1115 # template file.
cf1c09f6 1116 #
7a957a93
AR
1117 # The following can be used as shortcuts for certificate properties:
1118 # [ssl::]certHasExpired: the "not after" field is in the past
1119 # [ssl::]certNotYetValid: the "not before" field is in the future
1120 # [ssl::]certUntrusted: The certificate issuer is not to be trusted.
1121 # [ssl::]certSelfSigned: The certificate is self signed.
1122 # [ssl::]certDomainMismatch: The certificate CN domain does not
1123 # match the name the name of the host we are connecting to.
1124 #
1125 # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch,
1126 # ssl::certUntrusted, and ssl::certSelfSigned can also be used as
1127 # predefined ACLs, just like the 'all' ACL.
1128 #
1129 # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error,
1130 # sslproxy_cert_sign, and sslproxy_cert_adapt options.
00352183 1131
72b12f9e 1132 acl aclname server_cert_fingerprint [-sha1] fingerprint
00352183
AR
1133 # match against server SSL certificate fingerprint [fast]
1134 #
1135 # The fingerprint is the digest of the DER encoded version
1136 # of the whole certificate. The user should use the form: XX:XX:...
1137 # Optional argument specifies the digest algorithm to use.
1138 # The SHA1 digest algorithm is the default and is currently
1139 # the only algorithm supported (-sha1).
cf1c09f6 1140ENDIF
6f58d7d7
AR
1141 acl aclname any-of acl1 acl2 ...
1142 # match any one of the acls [fast or slow]
1143 # The first matching ACL stops further ACL evaluation.
1144 #
1145 # ACLs from multiple any-of lines with the same name are ORed.
1146 # For example, A = (a1 or a2) or (a3 or a4) can be written as
1147 # acl A any-of a1 a2
1148 # acl A any-of a3 a4
1149 #
1150 # This group ACL is fast if all evaluated ACLs in the group are fast
1151 # and slow otherwise.
1152
1153 acl aclname all-of acl1 acl2 ...
1154 # match all of the acls [fast or slow]
1155 # The first mismatching ACL stops further ACL evaluation.
1156 #
1157 # ACLs from multiple all-of lines with the same name are ORed.
1158 # For example, B = (b1 and b2) or (b3 and b4) can be written as
1159 # acl B all-of b1 b2
1160 # acl B all-of b3 b4
1161 #
1162 # This group ACL is fast if all evaluated ACLs in the group are fast
1163 # and slow otherwise.
cf1c09f6 1164
e0855596
AJ
1165 Examples:
1166 acl macaddress arp 09:00:2b:23:45:67
1167 acl myexample dst_as 1241
1168 acl password proxy_auth REQUIRED
1169 acl fileupload req_mime_type -i ^multipart/form-data$
1170 acl javascript rep_mime_type -i ^application/x-javascript$
cccac0a2 1171
41bd17a4 1172NOCOMMENT_START
e0855596
AJ
1173#
1174# Recommended minimum configuration:
1175#
e0855596 1176
ee776778 1177# Example rule allowing access from your local networks.
1178# Adapt to list your (internal) IP networks from where browsing
1179# should be allowed
1180acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
1181acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
1182acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
055421ee
AJ
1183acl localnet src fc00::/7 # RFC 4193 local private network range
1184acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
e0855596 1185
41bd17a4 1186acl SSL_ports port 443
1187acl Safe_ports port 80 # http
1188acl Safe_ports port 21 # ftp
1189acl Safe_ports port 443 # https
1190acl Safe_ports port 70 # gopher
1191acl Safe_ports port 210 # wais
1192acl Safe_ports port 1025-65535 # unregistered ports
1193acl Safe_ports port 280 # http-mgmt
1194acl Safe_ports port 488 # gss-http
1195acl Safe_ports port 591 # filemaker
1196acl Safe_ports port 777 # multiling http
1197acl CONNECT method CONNECT
1198NOCOMMENT_END
1199DOC_END
cccac0a2 1200
3d674977
AJ
1201NAME: follow_x_forwarded_for
1202TYPE: acl_access
1203IFDEF: FOLLOW_X_FORWARDED_FOR
1204LOC: Config.accessList.followXFF
3d674977 1205DEFAULT_IF_NONE: deny all
638402dd 1206DEFAULT_DOC: X-Forwarded-For header will be ignored.
3d674977
AJ
1207DOC_START
1208 Allowing or Denying the X-Forwarded-For header to be followed to
1209 find the original source of a request.
1210
1211 Requests may pass through a chain of several other proxies
1212 before reaching us. The X-Forwarded-For header will contain a
1213 comma-separated list of the IP addresses in the chain, with the
1214 rightmost address being the most recent.
1215
1216 If a request reaches us from a source that is allowed by this
1217 configuration item, then we consult the X-Forwarded-For header
1218 to see where that host received the request from. If the
2bf4e8fa
AJ
1219 X-Forwarded-For header contains multiple addresses, we continue
1220 backtracking until we reach an address for which we are not allowed
1221 to follow the X-Forwarded-For header, or until we reach the first
1222 address in the list. For the purpose of ACL used in the
1223 follow_x_forwarded_for directive the src ACL type always matches
1224 the address we are testing and srcdomain matches its rDNS.
3d674977
AJ
1225
1226 The end result of this process is an IP address that we will
1227 refer to as the indirect client address. This address may
57d76dd4 1228 be treated as the client address for access control, ICAP, delay
3d674977 1229 pools and logging, depending on the acl_uses_indirect_client,
96d64448
AJ
1230 icap_uses_indirect_client, delay_pool_uses_indirect_client,
1231 log_uses_indirect_client and tproxy_uses_indirect_client options.
3d674977 1232
b3567eb5
FC
1233 This clause only supports fast acl types.
1234 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1235
3d674977
AJ
1236 SECURITY CONSIDERATIONS:
1237
1238 Any host for which we follow the X-Forwarded-For header
1239 can place incorrect information in the header, and Squid
1240 will use the incorrect information as if it were the
1241 source address of the request. This may enable remote
1242 hosts to bypass any access control restrictions that are
1243 based on the client's source addresses.
1244
1245 For example:
1246
1247 acl localhost src 127.0.0.1
1248 acl my_other_proxy srcdomain .proxy.example.com
1249 follow_x_forwarded_for allow localhost
1250 follow_x_forwarded_for allow my_other_proxy
1251DOC_END
1252
1253NAME: acl_uses_indirect_client
1254COMMENT: on|off
1255TYPE: onoff
1256IFDEF: FOLLOW_X_FORWARDED_FOR
1257DEFAULT: on
1258LOC: Config.onoff.acl_uses_indirect_client
1259DOC_START
1260 Controls whether the indirect client address
1261 (see follow_x_forwarded_for) is used instead of the
1262 direct client address in acl matching.
55d0fae8
AJ
1263
1264 NOTE: maxconn ACL considers direct TCP links and indirect
1265 clients will always have zero. So no match.
3d674977
AJ
1266DOC_END
1267
1268NAME: delay_pool_uses_indirect_client
1269COMMENT: on|off
1270TYPE: onoff
9a0a18de 1271IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS
3d674977
AJ
1272DEFAULT: on
1273LOC: Config.onoff.delay_pool_uses_indirect_client
1274DOC_START
1275 Controls whether the indirect client address
1276 (see follow_x_forwarded_for) is used instead of the
1277 direct client address in delay pools.
1278DOC_END
1279
1280NAME: log_uses_indirect_client
1281COMMENT: on|off
1282TYPE: onoff
1283IFDEF: FOLLOW_X_FORWARDED_FOR
1284DEFAULT: on
1285LOC: Config.onoff.log_uses_indirect_client
1286DOC_START
1287 Controls whether the indirect client address
1288 (see follow_x_forwarded_for) is used instead of the
1289 direct client address in the access log.
1290DOC_END
1291
96d64448
AJ
1292NAME: tproxy_uses_indirect_client
1293COMMENT: on|off
1294TYPE: onoff
1295IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER
4d7ab5a2 1296DEFAULT: off
96d64448
AJ
1297LOC: Config.onoff.tproxy_uses_indirect_client
1298DOC_START
1299 Controls whether the indirect client address
1300 (see follow_x_forwarded_for) is used instead of the
1301 direct client address when spoofing the outgoing client.
4d7ab5a2
AJ
1302
1303 This has no effect on requests arriving in non-tproxy
1304 mode ports.
1305
1306 SECURITY WARNING: Usage of this option is dangerous
1307 and should not be used trivially. Correct configuration
b01a2238 1308 of follow_x_forewarded_for with a limited set of trusted
4d7ab5a2 1309 sources is required to prevent abuse of your proxy.
96d64448
AJ
1310DOC_END
1311
0d901ef4
SH
1312NAME: spoof_client_ip
1313TYPE: acl_access
1314LOC: Config.accessList.spoof_client_ip
1315DEFAULT: none
1316DEFAULT_DOC: Allow spoofing on all TPROXY traffic.
1317DOC_START
1318 Control client IP address spoofing of TPROXY traffic based on
1319 defined access lists.
1320
1321 spoof_client_ip allow|deny [!]aclname ...
1322
1323 If there are no "spoof_client_ip" lines present, the default
1324 is to "allow" spoofing of any suitable request.
1325
1326 Note that the cache_peer "no-tproxy" option overrides this ACL.
1327
1328 This clause supports fast acl types.
1329 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1330DOC_END
1331
41bd17a4 1332NAME: http_access
1333TYPE: acl_access
1334LOC: Config.accessList.http
41bd17a4 1335DEFAULT_IF_NONE: deny all
638402dd 1336DEFAULT_DOC: Deny, unless rules exist in squid.conf.
41bd17a4 1337DOC_START
1338 Allowing or Denying access based on defined access lists
cccac0a2 1339
41bd17a4 1340 Access to the HTTP port:
1341 http_access allow|deny [!]aclname ...
cccac0a2 1342
41bd17a4 1343 NOTE on default values:
cccac0a2 1344
41bd17a4 1345 If there are no "access" lines present, the default is to deny
1346 the request.
cccac0a2 1347
41bd17a4 1348 If none of the "access" lines cause a match, the default is the
1349 opposite of the last line in the list. If the last line was
1350 deny, the default is allow. Conversely, if the last line
1351 is allow, the default will be deny. For these reasons, it is a
51ae86b2
HN
1352 good idea to have an "deny all" entry at the end of your access
1353 lists to avoid potential confusion.
cccac0a2 1354
b3567eb5
FC
1355 This clause supports both fast and slow acl types.
1356 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
1357
41bd17a4 1358NOCOMMENT_START
e0855596
AJ
1359
1360#
1361# Recommended minimum Access Permission configuration:
41bd17a4 1362#
e0855596 1363# Deny requests to certain unsafe ports
41bd17a4 1364http_access deny !Safe_ports
e0855596
AJ
1365
1366# Deny CONNECT to other than secure SSL ports
41bd17a4 1367http_access deny CONNECT !SSL_ports
e0855596 1368
baa3ea7e
AJ
1369# Only allow cachemgr access from localhost
1370http_access allow localhost manager
1371http_access deny manager
1372
41bd17a4 1373# We strongly recommend the following be uncommented to protect innocent
1374# web applications running on the proxy server who think the only
1375# one who can access services on "localhost" is a local user
1376#http_access deny to_localhost
e0855596 1377
41bd17a4 1378#
1379# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
e0855596 1380#
c8f4eac4 1381
ee776778 1382# Example rule allowing access from your local networks.
1383# Adapt localnet in the ACL section to list your (internal) IP networks
1384# from where browsing should be allowed
1385http_access allow localnet
afb33856 1386http_access allow localhost
7d90757b 1387
41bd17a4 1388# And finally deny all other access to this proxy
1389http_access deny all
1390NOCOMMENT_END
1391DOC_END
7d90757b 1392
533493da
AJ
1393NAME: adapted_http_access http_access2
1394TYPE: acl_access
1395LOC: Config.accessList.adapted_http
1396DEFAULT: none
638402dd 1397DEFAULT_DOC: Allow, unless rules exist in squid.conf.
533493da
AJ
1398DOC_START
1399 Allowing or Denying access based on defined access lists
1400
1401 Essentially identical to http_access, but runs after redirectors
1402 and ICAP/eCAP adaptation. Allowing access control based on their
1403 output.
1404
1405 If not set then only http_access is used.
1406DOC_END
1407
41bd17a4 1408NAME: http_reply_access
1409TYPE: acl_access
1410LOC: Config.accessList.reply
1411DEFAULT: none
638402dd 1412DEFAULT_DOC: Allow, unless rules exist in squid.conf.
41bd17a4 1413DOC_START
1414 Allow replies to client requests. This is complementary to http_access.
cccac0a2 1415
41bd17a4 1416 http_reply_access allow|deny [!] aclname ...
cccac0a2 1417
41bd17a4 1418 NOTE: if there are no access lines present, the default is to allow
638402dd 1419 all replies.
1a224843 1420
41bd17a4 1421 If none of the access lines cause a match the opposite of the
1422 last line will apply. Thus it is good practice to end the rules
1423 with an "allow all" or "deny all" entry.
b3567eb5
FC
1424
1425 This clause supports both fast and slow acl types.
1426 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
cccac0a2 1427DOC_END
1428
41bd17a4 1429NAME: icp_access
1430TYPE: acl_access
1431LOC: Config.accessList.icp
638402dd
AJ
1432DEFAULT: none
1433DEFAULT_DOC: Deny, unless rules exist in squid.conf.
5473c134 1434DOC_START
41bd17a4 1435 Allowing or Denying access to the ICP port based on defined
1436 access lists
5473c134 1437
41bd17a4 1438 icp_access allow|deny [!]aclname ...
5473c134 1439
638402dd
AJ
1440 NOTE: The default if no icp_access lines are present is to
1441 deny all traffic. This default may cause problems with peers
1442 using ICP.
41bd17a4 1443
b3567eb5
FC
1444 This clause only supports fast acl types.
1445 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
1446
1447# Allow ICP queries from local networks only
df2eec10
AJ
1448#icp_access allow localnet
1449#icp_access deny all
5473c134 1450DOC_END
1451
41bd17a4 1452NAME: htcp_access
1453IFDEF: USE_HTCP
1454TYPE: acl_access
1455LOC: Config.accessList.htcp
638402dd
AJ
1456DEFAULT: none
1457DEFAULT_DOC: Deny, unless rules exist in squid.conf.
5473c134 1458DOC_START
41bd17a4 1459 Allowing or Denying access to the HTCP port based on defined
1460 access lists
5473c134 1461
41bd17a4 1462 htcp_access allow|deny [!]aclname ...
5473c134 1463
638402dd
AJ
1464 See also htcp_clr_access for details on access control for
1465 cache purge (CLR) HTCP messages.
5473c134 1466
0b48417e 1467 NOTE: The default if no htcp_access lines are present is to
1468 deny all traffic. This default may cause problems with peers
18191440 1469 using the htcp option.
0b48417e 1470
b3567eb5
FC
1471 This clause only supports fast acl types.
1472 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
1473
1474# Allow HTCP queries from local networks only
df2eec10
AJ
1475#htcp_access allow localnet
1476#htcp_access deny all
41bd17a4 1477DOC_END
5473c134 1478
41bd17a4 1479NAME: htcp_clr_access
1480IFDEF: USE_HTCP
1481TYPE: acl_access
1482LOC: Config.accessList.htcp_clr
638402dd
AJ
1483DEFAULT: none
1484DEFAULT_DOC: Deny, unless rules exist in squid.conf.
41bd17a4 1485DOC_START
1486 Allowing or Denying access to purge content using HTCP based
638402dd
AJ
1487 on defined access lists.
1488 See htcp_access for details on general HTCP access control.
5473c134 1489
41bd17a4 1490 htcp_clr_access allow|deny [!]aclname ...
5473c134 1491
b3567eb5
FC
1492 This clause only supports fast acl types.
1493 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596
AJ
1494
1495# Allow HTCP CLR requests from trusted peers
638402dd 1496acl htcp_clr_peer src 192.0.2.2 2001:DB8::2
41bd17a4 1497htcp_clr_access allow htcp_clr_peer
638402dd 1498htcp_clr_access deny all
5473c134 1499DOC_END
1500
41bd17a4 1501NAME: miss_access
1502TYPE: acl_access
1503LOC: Config.accessList.miss
b8a25eaa 1504DEFAULT: none
638402dd 1505DEFAULT_DOC: Allow, unless rules exist in squid.conf.
5473c134 1506DOC_START
0b4fb91a
AJ
1507 Determins whether network access is permitted when satisfying a request.
1508
1509 For example;
1510 to force your neighbors to use you as a sibling instead of
1511 a parent.
5473c134 1512
638402dd 1513 acl localclients src 192.0.2.0/24 2001:DB8::a:0/64
41bd17a4 1514 miss_access deny !localclients
638402dd 1515 miss_access allow all
5473c134 1516
0b4fb91a
AJ
1517 This means only your local clients are allowed to fetch relayed/MISS
1518 replies from the network and all other clients can only fetch cached
1519 objects (HITs).
1520
0b4fb91a
AJ
1521 The default for this setting allows all clients who passed the
1522 http_access rules to relay via this proxy.
b3567eb5
FC
1523
1524 This clause only supports fast acl types.
1525 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 1526DOC_END
1527
1528NAME: ident_lookup_access
1529TYPE: acl_access
1530IFDEF: USE_IDENT
638402dd
AJ
1531DEFAULT: none
1532DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched.
4daaf3cb 1533LOC: Ident::TheConfig.identLookup
5473c134 1534DOC_START
41bd17a4 1535 A list of ACL elements which, if matched, cause an ident
1536 (RFC 931) lookup to be performed for this request. For
1537 example, you might choose to always perform ident lookups
1538 for your main multi-user Unix boxes, but not for your Macs
1539 and PCs. By default, ident lookups are not performed for
1540 any requests.
5473c134 1541
41bd17a4 1542 To enable ident lookups for specific client addresses, you
1543 can follow this example:
5473c134 1544
4daaf3cb 1545 acl ident_aware_hosts src 198.168.1.0/24
41bd17a4 1546 ident_lookup_access allow ident_aware_hosts
1547 ident_lookup_access deny all
5473c134 1548
4daaf3cb 1549 Only src type ACL checks are fully supported. A srcdomain
41bd17a4 1550 ACL might work at times, but it will not always provide
1551 the correct result.
b3567eb5
FC
1552
1553 This clause only supports fast acl types.
1554 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 1555DOC_END
5473c134 1556
5b0f5383 1557NAME: reply_body_max_size
1558COMMENT: size [acl acl...]
1559TYPE: acl_b_size_t
1560DEFAULT: none
638402dd 1561DEFAULT_DOC: No limit is applied.
5b0f5383 1562LOC: Config.ReplyBodySize
1563DOC_START
1564 This option specifies the maximum size of a reply body. It can be
1565 used to prevent users from downloading very large files, such as
1566 MP3's and movies. When the reply headers are received, the
1567 reply_body_max_size lines are processed, and the first line where
1568 all (if any) listed ACLs are true is used as the maximum body size
1569 for this reply.
1570
1571 This size is checked twice. First when we get the reply headers,
1572 we check the content-length value. If the content length value exists
1573 and is larger than the allowed size, the request is denied and the
1574 user receives an error message that says "the request or reply
1575 is too large." If there is no content-length, and the reply
1576 size exceeds this limit, the client's connection is just closed
1577 and they will receive a partial reply.
1578
1579 WARNING: downstream caches probably can not detect a partial reply
1580 if there is no content-length header, so they will cache
1581 partial responses and give them out as hits. You should NOT
1582 use this option if you have downstream caches.
1583
1584 WARNING: A maximum size smaller than the size of squid's error messages
1585 will cause an infinite loop and crash squid. Ensure that the smallest
1586 non-zero value you use is greater that the maximum header size plus
1587 the size of your largest error page.
1588
1589 If you set this parameter none (the default), there will be
1590 no limit imposed.
3bc32f2f
AJ
1591
1592 Configuration Format is:
1593 reply_body_max_size SIZE UNITS [acl ...]
1594 ie.
1595 reply_body_max_size 10 MB
1596
5b0f5383 1597DOC_END
1598
1599COMMENT_START
1600 NETWORK OPTIONS
1601 -----------------------------------------------------------------------------
1602COMMENT_END
1603
1604NAME: http_port ascii_port
65d448bc 1605TYPE: PortCfg
5b0f5383 1606DEFAULT: none
1607LOC: Config.Sockaddr.http
1608DOC_START
c7b1dd5d
AJ
1609 Usage: port [mode] [options]
1610 hostname:port [mode] [options]
1611 1.2.3.4:port [mode] [options]
5b0f5383 1612
1613 The socket addresses where Squid will listen for HTTP client
1614 requests. You may specify multiple socket addresses.
1615 There are three forms: port alone, hostname with port, and
1616 IP address with port. If you specify a hostname or IP
1617 address, Squid binds the socket to that specific
c7b1dd5d 1618 address. Most likely, you do not need to bind to a specific
5b0f5383 1619 address, so you can use the port number alone.
1620
1621 If you are running Squid in accelerator mode, you
1622 probably want to listen on port 80 also, or instead.
1623
1624 The -a command line option may be used to specify additional
1625 port(s) where Squid listens for proxy request. Such ports will
1626 be plain proxy ports with no options.
1627
1628 You may specify multiple socket addresses on multiple lines.
1629
c7b1dd5d 1630 Modes:
5b0f5383 1631
e77bdb4e 1632 intercept Support for IP-Layer interception of
5b0f5383 1633 outgoing requests without browser settings.
13b5cd0c 1634 NP: disables authentication and IPv6 on the port.
5b0f5383 1635
1636 tproxy Support Linux TPROXY for spoofing outgoing
1637 connections using the client IP address.
6f05d9c8 1638 NP: disables authentication and maybe IPv6 on the port.
5b0f5383 1639
7f45065d 1640 accel Accelerator / reverse proxy mode
5b0f5383 1641
caf3666d 1642 ssl-bump For each CONNECT request allowed by ssl_bump ACLs,
c7b1dd5d 1643 establish secure connection with the client and with
caf3666d 1644 the server, decrypt HTTPS messages as they pass through
c7b1dd5d
AJ
1645 Squid, and treat them as unencrypted HTTP messages,
1646 becoming the man-in-the-middle.
1647
7a957a93 1648 The ssl_bump option is required to fully enable
caf3666d 1649 bumping of CONNECT requests.
c7b1dd5d
AJ
1650
1651 Omitting the mode flag causes default forward proxy mode to be used.
1652
1653
1654 Accelerator Mode Options:
1655
5b0f5383 1656 defaultsite=domainname
1657 What to use for the Host: header if it is not present
1658 in a request. Determines what site (not origin server)
1659 accelerators should consider the default.
5b0f5383 1660
cf673853 1661 no-vhost Disable using HTTP/1.1 Host header for virtual domain support.
5b0f5383 1662
a9f60805
AJ
1663 protocol= Protocol to reconstruct accelerated and intercepted
1664 requests with. Defaults to HTTP/1.1 for http_port and
1665 HTTPS/1.1 for https_port.
1666 When an unsupported value is configured Squid will
1667 produce a FATAL error.
1668 Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1
5b0f5383 1669
cf673853
AJ
1670 vport Virtual host port support. Using the http_port number
1671 instead of the port passed on Host: headers.
5b0f5383 1672
cf673853
AJ
1673 vport=NN Virtual host port support. Using the specified port
1674 number instead of the port passed on Host: headers.
5b0f5383 1675
7f45065d
HN
1676 act-as-origin
1677 Act as if this Squid is the origin server.
1678 This currently means generate new Date: and Expires:
1679 headers on HIT instead of adding Age:.
5b0f5383 1680
432bc83c
HN
1681 ignore-cc Ignore request Cache-Control headers.
1682
7f45065d 1683 WARNING: This option violates HTTP specifications if
432bc83c
HN
1684 used in non-accelerator setups.
1685
7f45065d
HN
1686 allow-direct Allow direct forwarding in accelerator mode. Normally
1687 accelerated requests are denied direct forwarding as if
1688 never_direct was used.
1689
1690 WARNING: this option opens accelerator mode to security
1691 vulnerabilities usually only affecting in interception
1692 mode. Make sure to protect forwarding with suitable
1693 http_access rules when using this.
1694
c7b1dd5d
AJ
1695
1696 SSL Bump Mode Options:
859741ed
AJ
1697 In addition to these options ssl-bump requires TLS/SSL options.
1698
1699 generate-host-certificates[=<on|off>]
1700 Dynamically create SSL server certificates for the
1701 destination hosts of bumped CONNECT requests.When
1702 enabled, the cert and key options are used to sign
1703 generated certificates. Otherwise generated
1704 certificate will be selfsigned.
1705 If there is a CA certificate lifetime of the generated
1706 certificate equals lifetime of the CA certificate. If
1707 generated certificate is selfsigned lifetime is three
1708 years.
1709 This option is enabled by default when ssl-bump is used.
1710 See the ssl-bump option above for more information.
1711
1712 dynamic_cert_mem_cache_size=SIZE
1713 Approximate total RAM size spent on cached generated
1714 certificates. If set to zero, caching is disabled. The
23bb0ebf 1715 default value is 4MB.
859741ed
AJ
1716
1717 TLS / SSL Options:
c7b1dd5d
AJ
1718
1719 cert= Path to SSL certificate (PEM format).
1720
1721 key= Path to SSL private key file (PEM format)
1722 if not specified, the certificate file is
1723 assumed to be a combined certificate and
1724 key file.
1725
1726 version= The version of SSL/TLS supported
1727 1 automatic (default)
1728 2 SSLv2 only
1729 3 SSLv3 only
3d96b0e8
AJ
1730 4 TLSv1.0 only
1731 5 TLSv1.1 only
1732 6 TLSv1.2 only
c7b1dd5d
AJ
1733
1734 cipher= Colon separated list of supported ciphers.
bebdc6fb
AJ
1735 NOTE: some ciphers such as EDH ciphers depend on
1736 additional settings. If those settings are
1737 omitted the ciphers may be silently ignored
1738 by the OpenSSL library.
c7b1dd5d 1739
943c5f16 1740 options= Various SSL implementation options. The most important
c7b1dd5d 1741 being:
3d96b0e8
AJ
1742 NO_SSLv2 Disallow the use of SSLv2
1743 NO_SSLv3 Disallow the use of SSLv3
1744 NO_TLSv1 Disallow the use of TLSv1.0
1745 NO_TLSv1_1 Disallow the use of TLSv1.1
1746 NO_TLSv1_2 Disallow the use of TLSv1.2
c7b1dd5d
AJ
1747 SINGLE_DH_USE Always create a new key when using
1748 temporary/ephemeral DH key exchanges
943c5f16
HN
1749 ALL Enable various bug workarounds
1750 suggested as "harmless" by OpenSSL
1751 Be warned that this reduces SSL/TLS
1752 strength to some attacks.
bebdc6fb
AJ
1753 See OpenSSL SSL_CTX_set_options documentation for a
1754 complete list of options.
c7b1dd5d
AJ
1755
1756 clientca= File containing the list of CAs to use when
1757 requesting a client certificate.
1758
1759 cafile= File containing additional CA certificates to
1760 use when verifying client certificates. If unset
1761 clientca will be used.
1762
1763 capath= Directory containing additional CA certificates
1764 and CRL lists to use when verifying client certificates.
1765
1766 crlfile= File of additional CRL lists to use when verifying
1767 the client certificate, in addition to CRLs stored in
1768 the capath. Implies VERIFY_CRL flag below.
1769
1770 dhparams= File containing DH parameters for temporary/ephemeral
bebdc6fb
AJ
1771 DH key exchanges. See OpenSSL documentation for details
1772 on how to create this file.
1773 WARNING: EDH ciphers will be silently disabled if this
1774 option is not set.
c7b1dd5d
AJ
1775
1776 sslflags= Various flags modifying the use of SSL:
1777 DELAYED_AUTH
1778 Don't request client certificates
1779 immediately, but wait until acl processing
1780 requires a certificate (not yet implemented).
1781 NO_DEFAULT_CA
1782 Don't use the default CA lists built in
1783 to OpenSSL.
1784 NO_SESSION_REUSE
1785 Don't allow for session reuse. Each connection
1786 will result in a new SSL session.
1787 VERIFY_CRL
1788 Verify CRL lists when accepting client
1789 certificates.
1790 VERIFY_CRL_ALL
1791 Verify CRL lists for all certificates in the
1792 client certificate chain.
1793
1794 sslcontext= SSL session ID context identifier.
1795
c7b1dd5d
AJ
1796 Other Options:
1797
6b185b50
AJ
1798 connection-auth[=on|off]
1799 use connection-auth=off to tell Squid to prevent
1800 forwarding Microsoft connection oriented authentication
d67acb4e
AJ
1801 (NTLM, Negotiate and Kerberos)
1802
5b0f5383 1803 disable-pmtu-discovery=
1804 Control Path-MTU discovery usage:
1805 off lets OS decide on what to do (default).
1806 transparent disable PMTU discovery when transparent
1807 support is enabled.
1808 always disable always PMTU discovery.
1809
1810 In many setups of transparently intercepting proxies
1811 Path-MTU discovery can not work on traffic towards the
1812 clients. This is the case when the intercepting device
1813 does not fully track connections and fails to forward
1814 ICMP must fragment messages to the cache server. If you
1815 have such setup and experience that certain clients
1816 sporadically hang or never complete requests set
1817 disable-pmtu-discovery option to 'transparent'.
1818
81b6e9a7 1819 name= Specifies a internal name for the port. Defaults to
1820 the port specification (port or addr:port)
1821
68924b6d 1822 tcpkeepalive[=idle,interval,timeout]
fb6c6dbe
AJ
1823 Enable TCP keepalive probes of idle connections.
1824 In seconds; idle is the initial time before TCP starts
1825 probing the connection, interval how often to probe, and
b2130d58 1826 timeout the time before giving up.
1827
5b0f5383 1828 If you run Squid on a dual-homed machine with an internal
1829 and an external interface we recommend you to specify the
1830 internal address:port in http_port. This way Squid will only be
1831 visible on the internal address.
1832
1833NOCOMMENT_START
e0855596 1834
5b0f5383 1835# Squid normally listens to port 3128
1836http_port @DEFAULT_HTTP_PORT@
1837NOCOMMENT_END
1838DOC_END
1839
1840NAME: https_port
cb4f4424 1841IFDEF: USE_OPENSSL
65d448bc 1842TYPE: PortCfg
5b0f5383 1843DEFAULT: none
1844LOC: Config.Sockaddr.https
1845DOC_START
7f45065d 1846 Usage: [ip:]port cert=certificate.pem [key=key.pem] [mode] [options...]
5b0f5383 1847
859741ed
AJ
1848 The socket address where Squid will listen for client requests made
1849 over TLS or SSL connections. Commonly referred to as HTTPS.
5b0f5383 1850
859741ed
AJ
1851 This is most useful for situations where you are running squid in
1852 accelerator mode and you want to do the SSL work at the accelerator level.
5b0f5383 1853
1854 You may specify multiple socket addresses on multiple lines,
1855 each with their own SSL certificate and/or options.
1856
7f45065d 1857 Modes:
5b0f5383 1858
7f45065d 1859 accel Accelerator / reverse proxy mode
5b0f5383 1860
38450a50
CT
1861 intercept Support for IP-Layer interception of
1862 outgoing requests without browser settings.
1863 NP: disables authentication and IPv6 on the port.
1864
379e8c1c
AR
1865 tproxy Support Linux TPROXY for spoofing outgoing
1866 connections using the client IP address.
1867 NP: disables authentication and maybe IPv6 on the port.
1868
caf3666d 1869 ssl-bump For each intercepted connection allowed by ssl_bump
7a957a93 1870 ACLs, establish a secure connection with the client and with
caf3666d 1871 the server, decrypt HTTPS messages as they pass through
379e8c1c
AR
1872 Squid, and treat them as unencrypted HTTP messages,
1873 becoming the man-in-the-middle.
1874
caf3666d
AR
1875 An "ssl_bump server-first" match is required to
1876 fully enable bumping of intercepted SSL connections.
379e8c1c 1877
38450a50 1878 Requires tproxy or intercept.
379e8c1c 1879
7f45065d 1880 Omitting the mode flag causes default forward proxy mode to be used.
5b0f5383 1881
5b0f5383 1882
7f45065d
HN
1883 See http_port for a list of generic options
1884
1885
1886 SSL Options:
5b0f5383 1887
1888 cert= Path to SSL certificate (PEM format).
1889
1890 key= Path to SSL private key file (PEM format)
1891 if not specified, the certificate file is
1892 assumed to be a combined certificate and
1893 key file.
1894
1895 version= The version of SSL/TLS supported
1896 1 automatic (default)
1897 2 SSLv2 only
1898 3 SSLv3 only
1899 4 TLSv1 only
1900
1901 cipher= Colon separated list of supported ciphers.
1902
1903 options= Various SSL engine options. The most important
1904 being:
1905 NO_SSLv2 Disallow the use of SSLv2
1906 NO_SSLv3 Disallow the use of SSLv3
1907 NO_TLSv1 Disallow the use of TLSv1
1908 SINGLE_DH_USE Always create a new key when using
1909 temporary/ephemeral DH key exchanges
1910 See src/ssl_support.c or OpenSSL SSL_CTX_set_options
1911 documentation for a complete list of options.
1912
1913 clientca= File containing the list of CAs to use when
1914 requesting a client certificate.
1915
1916 cafile= File containing additional CA certificates to
1917 use when verifying client certificates. If unset
1918 clientca will be used.
1919
1920 capath= Directory containing additional CA certificates
1921 and CRL lists to use when verifying client certificates.
1922
1923 crlfile= File of additional CRL lists to use when verifying
1924 the client certificate, in addition to CRLs stored in
1925 the capath. Implies VERIFY_CRL flag below.
1926
1927 dhparams= File containing DH parameters for temporary/ephemeral
1928 DH key exchanges.
1929
1930 sslflags= Various flags modifying the use of SSL:
1931 DELAYED_AUTH
1932 Don't request client certificates
1933 immediately, but wait until acl processing
1934 requires a certificate (not yet implemented).
1935 NO_DEFAULT_CA
1936 Don't use the default CA lists built in
1937 to OpenSSL.
1938 NO_SESSION_REUSE
1939 Don't allow for session reuse. Each connection
1940 will result in a new SSL session.
1941 VERIFY_CRL
1942 Verify CRL lists when accepting client
1943 certificates.
1944 VERIFY_CRL_ALL
1945 Verify CRL lists for all certificates in the
1946 client certificate chain.
1947
1948 sslcontext= SSL session ID context identifier.
1949
379e8c1c
AR
1950 generate-host-certificates[=<on|off>]
1951 Dynamically create SSL server certificates for the
1952 destination hosts of bumped SSL requests.When
1953 enabled, the cert and key options are used to sign
1954 generated certificates. Otherwise generated
1955 certificate will be selfsigned.
1956 If there is CA certificate life time of generated
1957 certificate equals lifetime of CA certificate. If
1958 generated certificate is selfsigned lifetime is three
1959 years.
1960 This option is enabled by default when SslBump is used.
1961 See the sslBump option above for more information.
1962
1963 dynamic_cert_mem_cache_size=SIZE
1964 Approximate total RAM size spent on cached generated
1965 certificates. If set to zero, caching is disabled. The
23bb0ebf 1966 default value is 4MB.
379e8c1c 1967
859741ed 1968 See http_port for a list of available options.
5b0f5383 1969DOC_END
1970
41bd17a4 1971NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
1972TYPE: acl_tos
5473c134 1973DEFAULT: none
425de4c8 1974LOC: Ip::Qos::TheConfig.tosToServer
5473c134 1975DOC_START
425de4c8
AJ
1976 Allows you to select a TOS/Diffserv value for packets outgoing
1977 on the server side, based on an ACL.
5473c134 1978
41bd17a4 1979 tcp_outgoing_tos ds-field [!]aclname ...
cccac0a2 1980
41bd17a4 1981 Example where normal_service_net uses the TOS value 0x00
7def7206 1982 and good_service_net uses 0x20
cccac0a2 1983
864a62b5
AJ
1984 acl normal_service_net src 10.0.0.0/24
1985 acl good_service_net src 10.0.1.0/24
2c73de90 1986 tcp_outgoing_tos 0x00 normal_service_net
41bd17a4 1987 tcp_outgoing_tos 0x20 good_service_net
fa38076e 1988
41bd17a4 1989 TOS/DSCP values really only have local significance - so you should
575cb927
AJ
1990 know what you're specifying. For more information, see RFC2474,
1991 RFC2475, and RFC3260.
cccac0a2 1992
41bd17a4 1993 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
1994 "default" to use whatever default your host has. Note that in
864a62b5
AJ
1995 practice often only multiples of 4 is usable as the two rightmost bits
1996 have been redefined for use by ECN (RFC 3168 section 23.1).
cccac0a2 1997
41bd17a4 1998 Processing proceeds in the order specified, and stops at first fully
1999 matching line.
cccac0a2 2000DOC_END
2001
41bd17a4 2002NAME: clientside_tos
2003TYPE: acl_tos
cccac0a2 2004DEFAULT: none
425de4c8
AJ
2005LOC: Ip::Qos::TheConfig.tosToClient
2006DOC_START
2007 Allows you to select a TOS/Diffserv value for packets being transmitted
2008 on the client-side, based on an ACL.
2009
2010 clientside_tos ds-field [!]aclname ...
2011
2012 Example where normal_service_net uses the TOS value 0x00
2013 and good_service_net uses 0x20
2014
2015 acl normal_service_net src 10.0.0.0/24
2016 acl good_service_net src 10.0.1.0/24
2017 clientside_tos 0x00 normal_service_net
2018 clientside_tos 0x20 good_service_net
2019
2020 Note: This feature is incompatible with qos_flows. Any TOS values set here
2021 will be overwritten by TOS values in qos_flows.
2022DOC_END
2023
2024NAME: tcp_outgoing_mark
2025TYPE: acl_nfmark
11e8cfe3 2026IFDEF: SO_MARK&&USE_LIBCAP
425de4c8
AJ
2027DEFAULT: none
2028LOC: Ip::Qos::TheConfig.nfmarkToServer
2029DOC_START
2030 Allows you to apply a Netfilter mark value to outgoing packets
2031 on the server side, based on an ACL.
2032
2033 tcp_outgoing_mark mark-value [!]aclname ...
2034
2035 Example where normal_service_net uses the mark value 0x00
2036 and good_service_net uses 0x20
2037
2038 acl normal_service_net src 10.0.0.0/24
2039 acl good_service_net src 10.0.1.0/24
2040 tcp_outgoing_mark 0x00 normal_service_net
2041 tcp_outgoing_mark 0x20 good_service_net
2042DOC_END
2043
2044NAME: clientside_mark
2045TYPE: acl_nfmark
11e8cfe3 2046IFDEF: SO_MARK&&USE_LIBCAP
425de4c8
AJ
2047DEFAULT: none
2048LOC: Ip::Qos::TheConfig.nfmarkToClient
cccac0a2 2049DOC_START
425de4c8
AJ
2050 Allows you to apply a Netfilter mark value to packets being transmitted
2051 on the client-side, based on an ACL.
2052
2053 clientside_mark mark-value [!]aclname ...
2054
2055 Example where normal_service_net uses the mark value 0x00
2056 and good_service_net uses 0x20
2057
2058 acl normal_service_net src 10.0.0.0/24
2059 acl good_service_net src 10.0.1.0/24
2060 clientside_mark 0x00 normal_service_net
2061 clientside_mark 0x20 good_service_net
2062
2063 Note: This feature is incompatible with qos_flows. Any mark values set here
2064 will be overwritten by mark values in qos_flows.
41bd17a4 2065DOC_END
cccac0a2 2066
575cb927
AJ
2067NAME: qos_flows
2068TYPE: QosConfig
425de4c8 2069IFDEF: USE_QOS_TOS
575cb927 2070DEFAULT: none
b7ac5457 2071LOC: Ip::Qos::TheConfig
7172612f 2072DOC_START
575cb927 2073 Allows you to select a TOS/DSCP value to mark outgoing
196a7776
AB
2074 connections to the client, based on where the reply was sourced.
2075 For platforms using netfilter, allows you to set a netfilter mark
425de4c8 2076 value instead of, or in addition to, a TOS value.
7172612f 2077
196a7776
AB
2078 By default this functionality is disabled. To enable it with the default
2079 settings simply use "qos_flows mark" or "qos_flows tos". Default
2080 settings will result in the netfilter mark or TOS value being copied
2081 from the upstream connection to the client. Note that it is the connection
2082 CONNMARK value not the packet MARK value that is copied.
2083
2084 It is not currently possible to copy the mark or TOS value from the
2085 client to the upstream connection request.
2086
575cb927
AJ
2087 TOS values really only have local significance - so you should
2088 know what you're specifying. For more information, see RFC2474,
2089 RFC2475, and RFC3260.
7172612f 2090
425de4c8
AJ
2091 The TOS/DSCP byte must be exactly that - a octet value 0 - 255. Note that
2092 in practice often only multiples of 4 is usable as the two rightmost bits
2093 have been redefined for use by ECN (RFC 3168 section 23.1).
2094
2095 Mark values can be any unsigned 32-bit integer value.
7172612f 2096
425de4c8
AJ
2097 This setting is configured by setting the following values:
2098
2099 tos|mark Whether to set TOS or netfilter mark values
575cb927
AJ
2100
2101 local-hit=0xFF Value to mark local cache hits.
2102
2103 sibling-hit=0xFF Value to mark hits from sibling peers.
2104
2105 parent-hit=0xFF Value to mark hits from parent peers.
2106
a29d2a95
AB
2107 miss=0xFF[/mask] Value to mark cache misses. Takes precedence
2108 over the preserve-miss feature (see below), unless
2109 mask is specified, in which case only the bits
2110 specified in the mask are written.
575cb927 2111
425de4c8
AJ
2112 The TOS variant of the following features are only possible on Linux
2113 and require your kernel to be patched with the TOS preserving ZPH
2114 patch, available from http://zph.bratcheda.org
2115 No patch is needed to preserve the netfilter mark, which will work
2116 with all variants of netfilter.
575cb927 2117
575cb927 2118 disable-preserve-miss
425de4c8
AJ
2119 This option disables the preservation of the TOS or netfilter
2120 mark. By default, the existing TOS or netfilter mark value of
2121 the response coming from the remote server will be retained
2122 and masked with miss-mark.
2123 NOTE: in the case of a netfilter mark, the mark must be set on
2124 the connection (using the CONNMARK target) not on the packet
2125 (MARK target).
575cb927
AJ
2126
2127 miss-mask=0xFF
425de4c8
AJ
2128 Allows you to mask certain bits in the TOS or mark value
2129 received from the remote server, before copying the value to
2130 the TOS sent towards clients.
2131 Default for tos: 0xFF (TOS from server is not changed).
2132 Default for mark: 0xFFFFFFFF (mark from server is not changed).
2133
2134 All of these features require the --enable-zph-qos compilation flag
2135 (enabled by default). Netfilter marking also requires the
2136 libnetfilter_conntrack libraries (--with-netfilter-conntrack) and
2137 libcap 2.09+ (--with-libcap).
7172612f 2138
7172612f
AJ
2139DOC_END
2140
41bd17a4 2141NAME: tcp_outgoing_address
2142TYPE: acl_address
2143DEFAULT: none
638402dd 2144DEFAULT_DOC: Address selection is performed by the operating system.
41bd17a4 2145LOC: Config.accessList.outgoing_address
2146DOC_START
2147 Allows you to map requests to different outgoing IP addresses
2148 based on the username or source address of the user making
2149 the request.
7f7db318 2150
41bd17a4 2151 tcp_outgoing_address ipaddr [[!]aclname] ...
c33aa074 2152
2dd51400
AJ
2153 For example;
2154 Forwarding clients with dedicated IPs for certain subnets.
9197cd13 2155
2dd51400
AJ
2156 acl normal_service_net src 10.0.0.0/24
2157 acl good_service_net src 10.0.2.0/24
2158
2159 tcp_outgoing_address 2001:db8::c001 good_service_net
2160 tcp_outgoing_address 10.1.0.2 good_service_net
2161
2162 tcp_outgoing_address 2001:db8::beef normal_service_net
2163 tcp_outgoing_address 10.1.0.1 normal_service_net
2164
2165 tcp_outgoing_address 2001:db8::1
2166 tcp_outgoing_address 10.1.0.3
9197cd13 2167
41bd17a4 2168 Processing proceeds in the order specified, and stops at first fully
2169 matching line.
cccac0a2 2170
2dd51400
AJ
2171 Squid will add an implicit IP version test to each line.
2172 Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses.
2173 Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses.
2174
2175
2176 NOTE: The use of this directive using client dependent ACLs is
41bd17a4 2177 incompatible with the use of server side persistent connections. To
2178 ensure correct results it is best to set server_persistent_connections
2179 to off when using this directive in such configurations.
cc192b50 2180
2dd51400 2181 NOTE: The use of this directive to set a local IP on outgoing TCP links
4ed968be 2182 is incompatible with using TPROXY to set client IP out outbound TCP links.
2dd51400
AJ
2183 When needing to contact peers use the no-tproxy cache_peer option and the
2184 client_dst_passthru directive re-enable normal forwarding such as this.
cc192b50 2185
cccac0a2 2186DOC_END
6db78a1a 2187
90529125
AJ
2188NAME: host_verify_strict
2189TYPE: onoff
2190DEFAULT: off
2191LOC: Config.onoff.hostStrictVerify
2192DOC_START
d8821934
AR
2193 Regardless of this option setting, when dealing with intercepted
2194 traffic, Squid always verifies that the destination IP address matches
2962f8b8 2195 the Host header domain or IP (called 'authority form URL').
d8821934
AR
2196
2197 This enforcement is performed to satisfy a MUST-level requirement in
2198 RFC 2616 section 14.23: "The Host field value MUST represent the naming
2199 authority of the origin server or gateway given by the original URL".
2962f8b8
AJ
2200
2201 When set to ON:
2202 Squid always responds with an HTTP 409 (Conflict) error
2203 page and logs a security warning if there is no match.
2204
2205 Squid verifies that the destination IP address matches
2206 the Host header for forward-proxy and reverse-proxy traffic
2207 as well. For those traffic types, Squid also enables the
2208 following checks, comparing the corresponding Host header
2209 and Request-URI components:
2210
2211 * The host names (domain or IP) must be identical,
2212 but valueless or missing Host header disables all checks.
2213 For the two host names to match, both must be either IP
2214 or FQDN.
2215
2216 * Port numbers must be identical, but if a port is missing
2217 the scheme-default port is assumed.
2218
2219
2220 When set to OFF (the default):
2221 Squid allows suspicious requests to continue but logs a
2222 security warning and blocks caching of the response.
2223
2224 * Forward-proxy traffic is not checked at all.
2225
2226 * Reverse-proxy traffic is not checked at all.
2227
2228 * Intercepted traffic which passes verification is handled
32c32865 2229 according to client_dst_passthru.
2962f8b8 2230
7177edfb
AJ
2231 * Intercepted requests which fail verification are sent
2232 to the client original destination instead of DIRECT.
2233 This overrides 'client_dst_passthru off'.
2962f8b8
AJ
2234
2235 For now suspicious intercepted CONNECT requests are always
2236 responded to with an HTTP 409 (Conflict) error page.
bfe4e2fe 2237
bfe4e2fe 2238
7177edfb 2239 SECURITY NOTE:
bfe4e2fe
AJ
2240
2241 As described in CVE-2009-0801 when the Host: header alone is used
2242 to determine the destination of a request it becomes trivial for
2243 malicious scripts on remote websites to bypass browser same-origin
2244 security policy and sandboxing protections.
2245
2246 The cause of this is that such applets are allowed to perform their
2247 own HTTP stack, in which case the same-origin policy of the browser
2248 sandbox only verifies that the applet tries to contact the same IP
2249 as from where it was loaded at the IP level. The Host: header may
2250 be different from the connected IP and approved origin.
7177edfb
AJ
2251
2252DOC_END
6b185b50 2253
7177edfb
AJ
2254NAME: client_dst_passthru
2255TYPE: onoff
2256DEFAULT: on
2257LOC: Config.onoff.client_dst_passthru
2258DOC_START
2259 With NAT or TPROXY intercepted traffic Squid may pass the request
2260 directly to the original client destination IP or seek a faster
2261 source using the HTTP Host header.
2262
2263 Using Host to locate alternative servers can provide faster
2264 connectivity with a range of failure recovery options.
2265 But can also lead to connectivity trouble when the client and
2266 server are attempting stateful interactions unaware of the proxy.
2267
2268 This option (on by default) prevents alternative DNS entries being
2269 located to send intercepted traffic DIRECT to an origin server.
2270 The clients original destination IP and port will be used instead.
2271
2272 Regardless of this option setting, when dealing with intercepted
2273 traffic Squid will verify the Host: header and any traffic which
2274 fails Host verification will be treated as if this option were ON.
2275
2276 see host_verify_strict for details on the verification process.
cccac0a2 2277DOC_END
2278
41bd17a4 2279COMMENT_START
2280 SSL OPTIONS
2281 -----------------------------------------------------------------------------
2282COMMENT_END
2283
2284NAME: ssl_unclean_shutdown
cb4f4424 2285IFDEF: USE_OPENSSL
cccac0a2 2286TYPE: onoff
2287DEFAULT: off
41bd17a4 2288LOC: Config.SSL.unclean_shutdown
cccac0a2 2289DOC_START
41bd17a4 2290 Some browsers (especially MSIE) bugs out on SSL shutdown
2291 messages.
cccac0a2 2292DOC_END
2293
41bd17a4 2294NAME: ssl_engine
cb4f4424 2295IFDEF: USE_OPENSSL
cccac0a2 2296TYPE: string
41bd17a4 2297LOC: Config.SSL.ssl_engine
2298DEFAULT: none
cccac0a2 2299DOC_START
41bd17a4 2300 The OpenSSL engine to use. You will need to set this if you
2301 would like to use hardware SSL acceleration for example.
cccac0a2 2302DOC_END
2303
41bd17a4 2304NAME: sslproxy_client_certificate
cb4f4424 2305IFDEF: USE_OPENSSL
cccac0a2 2306DEFAULT: none
41bd17a4 2307LOC: Config.ssl_client.cert
2308TYPE: string
cccac0a2 2309DOC_START
41bd17a4 2310 Client SSL Certificate to use when proxying https:// URLs
cccac0a2 2311DOC_END
2312
41bd17a4 2313NAME: sslproxy_client_key
cb4f4424 2314IFDEF: USE_OPENSSL
cccac0a2 2315DEFAULT: none
41bd17a4 2316LOC: Config.ssl_client.key
2317TYPE: string
cccac0a2 2318DOC_START
41bd17a4 2319 Client SSL Key to use when proxying https:// URLs
cccac0a2 2320DOC_END
2321
41bd17a4 2322NAME: sslproxy_version
cb4f4424 2323IFDEF: USE_OPENSSL
41bd17a4 2324DEFAULT: 1
638402dd 2325DEFAULT_DOC: automatic SSL/TLS version negotiation
41bd17a4 2326LOC: Config.ssl_client.version
2327TYPE: int
cccac0a2 2328DOC_START
41bd17a4 2329 SSL version level to use when proxying https:// URLs
3d96b0e8
AJ
2330
2331 The versions of SSL/TLS supported:
2332
2333 1 automatic (default)
2334 2 SSLv2 only
2335 3 SSLv3 only
2336 4 TLSv1.0 only
2337 5 TLSv1.1 only
2338 6 TLSv1.2 only
cccac0a2 2339DOC_END
2340
41bd17a4 2341NAME: sslproxy_options
cb4f4424 2342IFDEF: USE_OPENSSL
41bd17a4 2343DEFAULT: none
2344LOC: Config.ssl_client.options
2345TYPE: string
cccac0a2 2346DOC_START
943c5f16 2347 SSL implementation options to use when proxying https:// URLs
ab202e4c
AJ
2348
2349 The most important being:
2350
3d96b0e8
AJ
2351 NO_SSLv2 Disallow the use of SSLv2
2352 NO_SSLv3 Disallow the use of SSLv3
2353 NO_TLSv1 Disallow the use of TLSv1.0
2354 NO_TLSv1_1 Disallow the use of TLSv1.1
2355 NO_TLSv1_2 Disallow the use of TLSv1.2
943c5f16
HN
2356 SINGLE_DH_USE
2357 Always create a new key when using temporary/ephemeral
2358 DH key exchanges
2359 SSL_OP_NO_TICKET
2360 Disable use of RFC5077 session tickets. Some servers
2361 may have problems understanding the TLS extension due
2362 to ambiguous specification in RFC4507.
2363 ALL Enable various bug workarounds suggested as "harmless"
2364 by OpenSSL. Be warned that this may reduce SSL/TLS
2365 strength to some attacks.
ab202e4c 2366
ab202e4c
AJ
2367 See the OpenSSL SSL_CTX_set_options documentation for a
2368 complete list of possible options.
cccac0a2 2369DOC_END
2370
41bd17a4 2371NAME: sslproxy_cipher
cb4f4424 2372IFDEF: USE_OPENSSL
41bd17a4 2373DEFAULT: none
2374LOC: Config.ssl_client.cipher
2375TYPE: string
cccac0a2 2376DOC_START
41bd17a4 2377 SSL cipher list to use when proxying https:// URLs
ab202e4c
AJ
2378
2379 Colon separated list of supported ciphers.
cccac0a2 2380DOC_END
2381
41bd17a4 2382NAME: sslproxy_cafile
cb4f4424 2383IFDEF: USE_OPENSSL
41bd17a4 2384DEFAULT: none
2385LOC: Config.ssl_client.cafile
2386TYPE: string
cccac0a2 2387DOC_START
41bd17a4 2388 file containing CA certificates to use when verifying server
2389 certificates while proxying https:// URLs
cccac0a2 2390DOC_END
0976f8db 2391
41bd17a4 2392NAME: sslproxy_capath
cb4f4424 2393IFDEF: USE_OPENSSL
5473c134 2394DEFAULT: none
41bd17a4 2395LOC: Config.ssl_client.capath
2396TYPE: string
5473c134 2397DOC_START
41bd17a4 2398 directory containing CA certificates to use when verifying
2399 server certificates while proxying https:// URLs
5473c134 2400DOC_END
2401
10a69fc0 2402NAME: sslproxy_session_ttl
cb4f4424 2403IFDEF: USE_OPENSSL
10a69fc0
CT
2404DEFAULT: 300
2405LOC: Config.SSL.session_ttl
2406TYPE: int
2407DOC_START
2408 Sets the timeout value for SSL sessions
2409DOC_END
2410
2411NAME: sslproxy_session_cache_size
cb4f4424 2412IFDEF: USE_OPENSSL
10a69fc0
CT
2413DEFAULT: 2 MB
2414LOC: Config.SSL.sessionCacheSize
2415TYPE: b_size_t
2416DOC_START
2417 Sets the cache size to use for ssl session
2418DOC_END
2419
4c9da963 2420NAME: ssl_bump
cb4f4424 2421IFDEF: USE_OPENSSL
caf3666d 2422TYPE: sslproxy_ssl_bump
4c9da963 2423LOC: Config.accessList.ssl_bump
638402dd 2424DEFAULT_DOC: Does not bump unless rules are present in squid.conf
4c9da963 2425DEFAULT: none
2426DOC_START
caf3666d
AR
2427 This option is consulted when a CONNECT request is received on
2428 an http_port (or a new connection is intercepted at an
2429 https_port), provided that port was configured with an ssl-bump
2430 flag. The subsequent data on the connection is either treated as
2431 HTTPS and decrypted OR tunneled at TCP level without decryption,
2432 depending on the first bumping "mode" which ACLs match.
2433
2434 ssl_bump <mode> [!]acl ...
2435
2436 The following bumping modes are supported:
2437
2438 client-first
2439 Allow bumping of the connection. Establish a secure connection
2440 with the client first, then connect to the server. This old mode
2441 does not allow Squid to mimic server SSL certificate and does
2442 not work with intercepted SSL connections.
2443
2444 server-first
2445 Allow bumping of the connection. Establish a secure connection
2446 with the server first, then establish a secure connection with
2447 the client, using a mimicked server certificate. Works with both
2448 CONNECT requests and intercepted SSL connections.
2449
2450 none
2451 Become a TCP tunnel without decoding the connection.
2452 Works with both CONNECT requests and intercepted SSL
2453 connections. This is the default behavior when no
2454 ssl_bump option is given or no ssl_bump ACLs match.
2455
2456 By default, no connections are bumped.
2457
2458 The first matching ssl_bump option wins. If no ACLs match, the
2459 connection is not bumped. Unlike most allow/deny ACL lists, ssl_bump
2460 does not have an implicit "negate the last given option" rule. You
2461 must make that rule explicit if you convert old ssl_bump allow/deny
2462 rules that rely on such an implicit rule.
4c9da963 2463
e0c0d54c 2464 This clause supports both fast and slow acl types.
b3567eb5 2465 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
e0855596 2466
caf3666d
AR
2467 See also: http_port ssl-bump, https_port ssl-bump
2468
e0855596 2469
caf3666d 2470 # Example: Bump all requests except those originating from
638402dd 2471 # localhost or those going to example.com.
e0855596 2472
e0855596 2473 acl broken_sites dstdomain .example.com
caf3666d
AR
2474 ssl_bump none localhost
2475 ssl_bump none broken_sites
2476 ssl_bump server-first all
4c9da963 2477DOC_END
2478
41bd17a4 2479NAME: sslproxy_flags
cb4f4424 2480IFDEF: USE_OPENSSL
41bd17a4 2481DEFAULT: none
2482LOC: Config.ssl_client.flags
2483TYPE: string
5473c134 2484DOC_START
41bd17a4 2485 Various flags modifying the use of SSL while proxying https:// URLs:
4c9da963 2486 DONT_VERIFY_PEER Accept certificates that fail verification.
2487 For refined control, see sslproxy_cert_error.
41bd17a4 2488 NO_DEFAULT_CA Don't use the default CA list built in
2489 to OpenSSL.
5473c134 2490DOC_END
2491
4c9da963 2492NAME: sslproxy_cert_error
cb4f4424 2493IFDEF: USE_OPENSSL
4c9da963 2494DEFAULT: none
638402dd 2495DEFAULT_DOC: Server certificate errors terminate the transaction.
4c9da963 2496LOC: Config.ssl_client.cert_error
2497TYPE: acl_access
2498DOC_START
2499 Use this ACL to bypass server certificate validation errors.
2500
2501 For example, the following lines will bypass all validation errors
3b8f558c 2502 when talking to servers for example.com. All other
4c9da963 2503 validation errors will result in ERR_SECURE_CONNECT_FAIL error.
2504
a87bfd3b
AR
2505 acl BrokenButTrustedServers dstdomain example.com
2506 sslproxy_cert_error allow BrokenButTrustedServers
4c9da963 2507 sslproxy_cert_error deny all
2508
b3567eb5
FC
2509 This clause only supports fast acl types.
2510 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
2511 Using slow acl types may result in server crashes
4c9da963 2512
2513 Without this option, all server certificate validation errors
638402dd 2514 terminate the transaction to protect Squid and the client.
4c9da963 2515
0ad3ff51
CT
2516 SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed
2517 but should not happen unless your OpenSSL library is buggy.
2518
638402dd
AJ
2519 SECURITY WARNING:
2520 Bypassing validation errors is dangerous because an
2521 error usually implies that the server cannot be trusted
2522 and the connection may be insecure.
4c9da963 2523
638402dd 2524 See also: sslproxy_flags and DONT_VERIFY_PEER.
4c9da963 2525DOC_END
2526
aebe6888 2527NAME: sslproxy_cert_sign
cb4f4424 2528IFDEF: USE_OPENSSL
aebe6888 2529DEFAULT: none
10d914f6
CT
2530POSTSCRIPTUM: signUntrusted ssl::certUntrusted
2531POSTSCRIPTUM: signSelf ssl::certSelfSigned
2532POSTSCRIPTUM: signTrusted all
aebe6888
CT
2533TYPE: sslproxy_cert_sign
2534LOC: Config.ssl_client.cert_sign
2535DOC_START
2536
69742b76 2537 sslproxy_cert_sign <signing algorithm> acl ...
aebe6888 2538
69742b76 2539 The following certificate signing algorithms are supported:
638402dd 2540
aebe6888 2541 signTrusted
69742b76
AR
2542 Sign using the configured CA certificate which is usually
2543 placed in and trusted by end-user browsers. This is the
2544 default for trusted origin server certificates.
638402dd 2545
aebe6888 2546 signUntrusted
69742b76
AR
2547 Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error.
2548 This is the default for untrusted origin server certificates
2549 that are not self-signed (see ssl::certUntrusted).
638402dd 2550
aebe6888 2551 signSelf
69742b76 2552 Sign using a self-signed certificate with the right CN to
aebe6888 2553 generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the
69742b76
AR
2554 browser. This is the default for self-signed origin server
2555 certificates (see ssl::certSelfSigned).
aebe6888 2556
cf1c09f6
CT
2557 This clause only supports fast acl types.
2558
69742b76
AR
2559 When sslproxy_cert_sign acl(s) match, Squid uses the corresponding
2560 signing algorithm to generate the certificate and ignores all
2561 subsequent sslproxy_cert_sign options (the first match wins). If no
2562 acl(s) match, the default signing algorithm is determined by errors
2563 detected when obtaining and validating the origin server certificate.
cf1c09f6 2564
4b0d23b7
CT
2565 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2566 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2567 CONNECT request that carries a domain name. In all other cases (CONNECT
2568 to an IP address or an intercepted SSL connection), Squid cannot detect
2569 the domain mismatch at certificate generation time when
2570 bump-server-first is used.
aebe6888
CT
2571DOC_END
2572
638402dd 2573NAME: sslproxy_cert_adapt
cb4f4424 2574IFDEF: USE_OPENSSL
fb2178bb
CT
2575DEFAULT: none
2576TYPE: sslproxy_cert_adapt
2577LOC: Config.ssl_client.cert_adapt
2578DOC_START
2579
2580 sslproxy_cert_adapt <adaptation algorithm> acl ...
2581
69742b76 2582 The following certificate adaptation algorithms are supported:
638402dd 2583
fb2178bb 2584 setValidAfter
69742b76
AR
2585 Sets the "Not After" property to the "Not After" property of
2586 the CA certificate used to sign generated certificates.
638402dd 2587
fb2178bb 2588 setValidBefore
69742b76
AR
2589 Sets the "Not Before" property to the "Not Before" property of
2590 the CA certificate used to sign generated certificates.
638402dd 2591
69742b76
AR
2592 setCommonName or setCommonName{CN}
2593 Sets Subject.CN property to the host name specified as a
2594 CN parameter or, if no explicit CN parameter was specified,
2595 extracted from the CONNECT request. It is a misconfiguration
2596 to use setCommonName without an explicit parameter for
2597 intercepted or tproxied SSL connections.
fb2178bb 2598
cf1c09f6
CT
2599 This clause only supports fast acl types.
2600
69742b76
AR
2601 Squid first groups sslproxy_cert_adapt options by adaptation algorithm.
2602 Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the
2603 corresponding adaptation algorithm to generate the certificate and
2604 ignores all subsequent sslproxy_cert_adapt options in that algorithm's
2605 group (i.e., the first match wins within each algorithm group). If no
2606 acl(s) match, the default mimicking action takes place.
cf1c09f6 2607
4b0d23b7
CT
2608 WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can
2609 be used with sslproxy_cert_adapt, but if and only if Squid is bumping a
2610 CONNECT request that carries a domain name. In all other cases (CONNECT
2611 to an IP address or an intercepted SSL connection), Squid cannot detect
2612 the domain mismatch at certificate generation time when
2613 bump-server-first is used.
fb2178bb
CT
2614DOC_END
2615
41bd17a4 2616NAME: sslpassword_program
cb4f4424 2617IFDEF: USE_OPENSSL
41bd17a4 2618DEFAULT: none
2619LOC: Config.Program.ssl_password
2620TYPE: string
5473c134 2621DOC_START
41bd17a4 2622 Specify a program used for entering SSL key passphrases
2623 when using encrypted SSL certificate keys. If not specified
2624 keys must either be unencrypted, or Squid started with the -N
2625 option to allow it to query interactively for the passphrase.
7acb9ddd
HN
2626
2627 The key file name is given as argument to the program allowing
2628 selection of the right password if you have multiple encrypted
2629 keys.
5473c134 2630DOC_END
2631
95d2589c
CT
2632COMMENT_START
2633 OPTIONS RELATING TO EXTERNAL SSL_CRTD
2634 -----------------------------------------------------------------------------
2635COMMENT_END
2636
2637NAME: sslcrtd_program
2638TYPE: eol
2639IFDEF: USE_SSL_CRTD
2640DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB
2641LOC: Ssl::TheConfig.ssl_crtd
2642DOC_START
2643 Specify the location and options of the executable for ssl_crtd process.
2644 @DEFAULT_SSL_CRTD@ program requires -s and -M parameters
2645 For more information use:
2646 @DEFAULT_SSL_CRTD@ -h
2647DOC_END
2648
2649NAME: sslcrtd_children
2650TYPE: HelperChildConfig
2651IFDEF: USE_SSL_CRTD
2652DEFAULT: 32 startup=5 idle=1
2653LOC: Ssl::TheConfig.ssl_crtdChildren
2654DOC_START
2655 The maximum number of processes spawn to service ssl server.
2656 The maximum this may be safely set to is 32.
2657
2658 The startup= and idle= options allow some measure of skew in your
2659 tuning.
2660
2661 startup=N
2662
2663 Sets the minimum number of processes to spawn when Squid
2664 starts or reconfigures. When set to zero the first request will
2665 cause spawning of the first child process to handle it.
2666
2667 Starting too few children temporary slows Squid under load while it
2668 tries to spawn enough additional processes to cope with traffic.
2669
2670 idle=N
2671
2672 Sets a minimum of how many processes Squid is to try and keep available
2673 at all times. When traffic begins to rise above what the existing
2674 processes can handle this many more will be spawned up to the maximum
2675 configured. A minimum setting of 1 is required.
2676
2677 You must have at least one ssl_crtd process.
2678DOC_END
2679
2cef0ca6
AR
2680NAME: sslcrtvalidator_program
2681TYPE: eol
cb4f4424 2682IFDEF: USE_OPENSSL
2cef0ca6
AR
2683DEFAULT: none
2684LOC: Ssl::TheConfig.ssl_crt_validator
2685DOC_START
2686 Specify the location and options of the executable for ssl_crt_validator
638402dd
AJ
2687 process.
2688
2689 Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ...
14798e73
CT
2690
2691 Options:
638402dd 2692 ttl=n TTL in seconds for cached results. The default is 60 secs
14798e73 2693 cache=n limit the result cache size. The default value is 2048
2cef0ca6
AR
2694DOC_END
2695
2696NAME: sslcrtvalidator_children
2697TYPE: HelperChildConfig
cb4f4424 2698IFDEF: USE_OPENSSL
413bb969 2699DEFAULT: 32 startup=5 idle=1 concurrency=1
2cef0ca6
AR
2700LOC: Ssl::TheConfig.ssl_crt_validator_Children
2701DOC_START
638402dd 2702 The maximum number of processes spawn to service SSL server.
2cef0ca6
AR
2703 The maximum this may be safely set to is 32.
2704
2705 The startup= and idle= options allow some measure of skew in your
2706 tuning.
2707
2708 startup=N
2709
2710 Sets the minimum number of processes to spawn when Squid
2711 starts or reconfigures. When set to zero the first request will
2712 cause spawning of the first child process to handle it.
2713
2714 Starting too few children temporary slows Squid under load while it
2715 tries to spawn enough additional processes to cope with traffic.
2716
2717 idle=N
2718
2719 Sets a minimum of how many processes Squid is to try and keep available
2720 at all times. When traffic begins to rise above what the existing
2721 processes can handle this many more will be spawned up to the maximum
2722 configured. A minimum setting of 1 is required.
4a77bb4e
CT
2723
2724 concurrency=
2725
2726 The number of requests each certificate validator helper can handle in
dffc462a
CT
2727 parallel. A value of 0 indicates the certficate validator does not
2728 support concurrency. Defaults to 1.
4a77bb4e
CT
2729
2730 When this directive is set to a value >= 1 then the protocol
2731 used to communicate with the helper is modified to include
2732 a request ID in front of the request/response. The request
2733 ID from the request must be echoed back with the response
2734 to that request.
2cef0ca6
AR
2735
2736 You must have at least one ssl_crt_validator process.
2737DOC_END
2738
cccac0a2 2739COMMENT_START
41bd17a4 2740 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
cccac0a2 2741 -----------------------------------------------------------------------------
2742COMMENT_END
2743
41bd17a4 2744NAME: cache_peer
2745TYPE: peer
2746DEFAULT: none
2747LOC: Config.peers
cccac0a2 2748DOC_START
41bd17a4 2749 To specify other caches in a hierarchy, use the format:
2b94f655 2750
41bd17a4 2751 cache_peer hostname type http-port icp-port [options]
2b94f655 2752
41bd17a4 2753 For example,
2b94f655 2754
41bd17a4 2755 # proxy icp
2756 # hostname type port port options
2757 # -------------------- -------- ----- ----- -----------
2b94f655 2758 cache_peer parent.foo.net parent 3128 3130 default
41bd17a4 2759 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
2760 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
2e9993e1 2761 cache_peer example.com parent 80 0 default
2b94f655
AJ
2762 cache_peer cdn.example.com sibling 3128 0
2763
2764 type: either 'parent', 'sibling', or 'multicast'.
2765
2766 proxy-port: The port number where the peer accept HTTP requests.
2767 For other Squid proxies this is usually 3128
2768 For web servers this is usually 80
2769
2770 icp-port: Used for querying neighbor caches about objects.
2771 Set to 0 if the peer does not support ICP or HTCP.
2772 See ICP and HTCP options below for additional details.
2773
2774
2775 ==== ICP OPTIONS ====
2776
2777 You MUST also set icp_port and icp_access explicitly when using these options.
2778 The defaults will prevent peer traffic using ICP.
2779
2780
2781 no-query Disable ICP queries to this neighbor.
2782
2783 multicast-responder
2784 Indicates the named peer is a member of a multicast group.
2785 ICP queries will not be sent directly to the peer, but ICP
2786 replies will be accepted from it.
2787
2788 closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward
2789 CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
2790
2791 background-ping
2792 To only send ICP queries to this neighbor infrequently.
2793 This is used to keep the neighbor round trip time updated
2794 and is usually used in conjunction with weighted-round-robin.
2795
2796
2797 ==== HTCP OPTIONS ====
2798
2799 You MUST also set htcp_port and htcp_access explicitly when using these options.
2800 The defaults will prevent peer traffic using HTCP.
2801
2802
2803 htcp Send HTCP, instead of ICP, queries to the neighbor.
2804 You probably also want to set the "icp-port" to 4827
18191440
AJ
2805 instead of 3130. This directive accepts a comma separated
2806 list of options described below.
2b94f655 2807
18191440 2808 htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier).
2b94f655 2809
18191440 2810 htcp=no-clr Send HTCP to the neighbor but without
2b94f655 2811 sending any CLR requests. This cannot be used with
18191440 2812 only-clr.
2b94f655 2813
18191440
AJ
2814 htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests.
2815 This cannot be used with no-clr.
2b94f655 2816
18191440 2817 htcp=no-purge-clr
2b94f655
AJ
2818 Send HTCP to the neighbor including CLRs but only when
2819 they do not result from PURGE requests.
2820
18191440 2821 htcp=forward-clr
2b94f655
AJ
2822 Forward any HTCP CLR requests this proxy receives to the peer.
2823
2824
2825 ==== PEER SELECTION METHODS ====
2826
2827 The default peer selection method is ICP, with the first responding peer
2828 being used as source. These options can be used for better load balancing.
2829
2830
2831 default This is a parent cache which can be used as a "last-resort"
2832 if a peer cannot be located by any of the peer-selection methods.
2833 If specified more than once, only the first is used.
2834
2835 round-robin Load-Balance parents which should be used in a round-robin
2836 fashion in the absence of any ICP queries.
2837 weight=N can be used to add bias.
2838
2839 weighted-round-robin
2840 Load-Balance parents which should be used in a round-robin
2841 fashion with the frequency of each parent being based on the
2842 round trip time. Closer parents are used more often.
2843 Usually used for background-ping parents.
2844 weight=N can be used to add bias.
2845
2846 carp Load-Balance parents which should be used as a CARP array.
2847 The requests will be distributed among the parents based on the
2848 CARP load balancing hash function based on their weight.
2849
2850 userhash Load-balance parents based on the client proxy_auth or ident username.
2851
2852 sourcehash Load-balance parents based on the client source IP.
8a368316
AJ
2853
2854 multicast-siblings
2855 To be used only for cache peers of type "multicast".
2856 ALL members of this multicast group have "sibling"
2e9993e1 2857 relationship with it, not "parent". This is to a multicast
8a368316
AJ
2858 group when the requested object would be fetched only from
2859 a "parent" cache, anyway. It's useful, e.g., when
2860 configuring a pool of redundant Squid proxies, being
2861 members of the same multicast group.
2b94f655
AJ
2862
2863
2864 ==== PEER SELECTION OPTIONS ====
2865
2866 weight=N use to affect the selection of a peer during any weighted
2867 peer-selection mechanisms.
2868 The weight must be an integer; default is 1,
2869 larger weights are favored more.
2870 This option does not affect parent selection if a peering
2871 protocol is not in use.
2872
2873 basetime=N Specify a base amount to be subtracted from round trip
2874 times of parents.
2875 It is subtracted before division by weight in calculating
2876 which parent to fectch from. If the rtt is less than the
2877 base time the rtt is set to a minimal value.
2878
3c72389f
AJ
2879 ttl=N Specify a TTL to use when sending multicast ICP queries
2880 to this address.
2b94f655
AJ
2881 Only useful when sending to a multicast group.
2882 Because we don't accept ICP replies from random
2883 hosts, you must configure other group members as
2884 peers with the 'multicast-responder' option.
2885
2886 no-delay To prevent access to this neighbor from influencing the
2887 delay pools.
2888
2889 digest-url=URL Tell Squid to fetch the cache digest (if digests are
2890 enabled) for this host from the specified URL rather
2891 than the Squid default location.
2892
2893
de03b596
FC
2894 ==== CARP OPTIONS ====
2895
2896 carp-key=key-specification
2897 use a different key than the full URL to hash against the peer.
2898 the key-specification is a comma-separated list of the keywords
2899 scheme, host, port, path, params
2900 Order is not important.
2901
2b94f655
AJ
2902 ==== ACCELERATOR / REVERSE-PROXY OPTIONS ====
2903
2904 originserver Causes this parent to be contacted as an origin server.
2905 Meant to be used in accelerator setups when the peer
2906 is a web server.
2907
2908 forceddomain=name
2909 Set the Host header of requests forwarded to this peer.
2910 Useful in accelerator setups where the server (peer)
2911 expects a certain domain name but clients may request
2912 others. ie example.com or www.example.com
2913
2914 no-digest Disable request of cache digests.
2915
2916 no-netdb-exchange
2917 Disables requesting ICMP RTT database (NetDB).
2918
2919
2920 ==== AUTHENTICATION OPTIONS ====
2921
2922 login=user:password
2923 If this is a personal/workgroup proxy and your parent
2924 requires proxy authentication.
2925
2926 Note: The string can include URL escapes (i.e. %20 for
2927 spaces). This also means % must be written as %%.
2928
11e4c5e5
AJ
2929 login=PASSTHRU
2930 Send login details received from client to this peer.
2931 Both Proxy- and WWW-Authorization headers are passed
2932 without alteration to the peer.
2933 Authentication is not required by Squid for this to work.
2934
2935 Note: This will pass any form of authentication but
2936 only Basic auth will work through a proxy unless the
2937 connection-auth options are also used.
ee0b94f4 2938
2b94f655
AJ
2939 login=PASS Send login details received from client to this peer.
2940 Authentication is not required by this option.
11e4c5e5 2941
2b94f655
AJ
2942 If there are no client-provided authentication headers
2943 to pass on, but username and password are available
ee0b94f4
HN
2944 from an external ACL user= and password= result tags
2945 they may be sent instead.
2b94f655
AJ
2946
2947 Note: To combine this with proxy_auth both proxies must
2948 share the same user database as HTTP only allows for
2949 a single login (one for proxy, one for origin server).
2950 Also be warned this will expose your users proxy
2951 password to the peer. USE WITH CAUTION
2952
2953 login=*:password
2954 Send the username to the upstream cache, but with a
2955 fixed password. This is meant to be used when the peer
2956 is in another administrative domain, but it is still
2957 needed to identify each user.
2958 The star can optionally be followed by some extra
2959 information which is added to the username. This can
2960 be used to identify this proxy to the peer, similar to
2961 the login=username:password option above.
2962
9ca29d23
AJ
2963 login=NEGOTIATE
2964 If this is a personal/workgroup proxy and your parent
2965 requires a secure proxy authentication.
2966 The first principal from the default keytab or defined by
2967 the environment variable KRB5_KTNAME will be used.
2968
63f03f79
PL
2969 WARNING: The connection may transmit requests from multiple
2970 clients. Negotiate often assumes end-to-end authentication
2971 and a single-client. Which is not strictly true here.
2972
9ca29d23
AJ
2973 login=NEGOTIATE:principal_name
2974 If this is a personal/workgroup proxy and your parent
2975 requires a secure proxy authentication.
2976 The principal principal_name from the default keytab or
2977 defined by the environment variable KRB5_KTNAME will be
2978 used.
2979
63f03f79
PL
2980 WARNING: The connection may transmit requests from multiple
2981 clients. Negotiate often assumes end-to-end authentication
2982 and a single-client. Which is not strictly true here.
2983
2b94f655
AJ
2984 connection-auth=on|off
2985 Tell Squid that this peer does or not support Microsoft
2986 connection oriented authentication, and any such
2987 challenges received from there should be ignored.
2988 Default is auto to automatically determine the status
2989 of the peer.
2990
2991
2992 ==== SSL / HTTPS / TLS OPTIONS ====
2993
2994 ssl Encrypt connections to this peer with SSL/TLS.
2995
2996 sslcert=/path/to/ssl/certificate
2997 A client SSL certificate to use when connecting to
2998 this peer.
2999
3000 sslkey=/path/to/ssl/key
3001 The private SSL key corresponding to sslcert above.
3002 If 'sslkey' is not specified 'sslcert' is assumed to
3003 reference a combined file containing both the
3004 certificate and the key.
3005
3d96b0e8 3006 sslversion=1|2|3|4|5|6
2b94f655
AJ
3007 The SSL version to use when connecting to this peer
3008 1 = automatic (default)
3009 2 = SSL v2 only
3010 3 = SSL v3 only
3d96b0e8
AJ
3011 4 = TLS v1.0 only
3012 5 = TLS v1.1 only
3013 6 = TLS v1.2 only
2b94f655
AJ
3014
3015 sslcipher=... The list of valid SSL ciphers to use when connecting
3016 to this peer.
3017
943c5f16
HN
3018 ssloptions=... Specify various SSL implementation options:
3019
3d96b0e8
AJ
3020 NO_SSLv2 Disallow the use of SSLv2
3021 NO_SSLv3 Disallow the use of SSLv3
3022 NO_TLSv1 Disallow the use of TLSv1.0
3023 NO_TLSv1_1 Disallow the use of TLSv1.1
3024 NO_TLSv1_2 Disallow the use of TLSv1.2
943c5f16
HN
3025 SINGLE_DH_USE
3026 Always create a new key when using
3027 temporary/ephemeral DH key exchanges
3028 ALL Enable various bug workarounds
3029 suggested as "harmless" by OpenSSL
3030 Be warned that this reduces SSL/TLS
3031 strength to some attacks.
3032
3033 See the OpenSSL SSL_CTX_set_options documentation for a
3034 more complete list.
2b94f655
AJ
3035
3036 sslcafile=... A file containing additional CA certificates to use
3037 when verifying the peer certificate.
3038
3039 sslcapath=... A directory containing additional CA certificates to
3040 use when verifying the peer certificate.
3041
3042 sslcrlfile=... A certificate revocation list file to use when
3043 verifying the peer certificate.
3044
3045 sslflags=... Specify various flags modifying the SSL implementation:
3046
41bd17a4 3047 DONT_VERIFY_PEER
3048 Accept certificates even if they fail to
3049 verify.
3050 NO_DEFAULT_CA
3051 Don't use the default CA list built in
3052 to OpenSSL.
3053 DONT_VERIFY_DOMAIN
3054 Don't verify the peer certificate
3055 matches the server name
2b94f655
AJ
3056
3057 ssldomain= The peer name as advertised in it's certificate.
3058 Used for verifying the correctness of the received peer
3059 certificate. If not specified the peer hostname will be
3060 used.
3061
3062 front-end-https
3063 Enable the "Front-End-Https: On" header needed when
3064 using Squid as a SSL frontend in front of Microsoft OWA.
3065 See MS KB document Q307347 for details on this header.
3066 If set to auto the header will only be added if the
3067 request is forwarded as a https:// URL.
3068
3069
3070 ==== GENERAL OPTIONS ====
3071
3072 connect-timeout=N
3073 A peer-specific connect timeout.
3074 Also see the peer_connect_timeout directive.
3075
3076 connect-fail-limit=N
3077 How many times connecting to a peer must fail before
3078 it is marked as down. Default is 10.
3079
3080 allow-miss Disable Squid's use of only-if-cached when forwarding
3081 requests to siblings. This is primarily useful when
3082 icp_hit_stale is used by the sibling. To extensive use
3083 of this option may result in forwarding loops, and you
3084 should avoid having two-way peerings with this option.
3085 For example to deny peer usage on requests from peer
3086 by denying cache_peer_access if the source is a peer.
3087
3088 max-conn=N Limit the amount of connections Squid may open to this
3089 peer. see also
3090
3091 name=xxx Unique name for the peer.
3092 Required if you have multiple peers on the same host
3093 but different ports.
3094 This name can be used in cache_peer_access and similar
3095 directives to dentify the peer.
3096 Can be used by outgoing access controls through the
3097 peername ACL type.
3098
b0758e04
AJ
3099 no-tproxy Do not use the client-spoof TPROXY support when forwarding
3100 requests to this peer. Use normal address selection instead.
0d901ef4 3101 This overrides the spoof_client_ip ACL.
b0758e04 3102
2b94f655
AJ
3103 proxy-only objects fetched from the peer will not be stored locally.
3104
41bd17a4 3105DOC_END
cccac0a2 3106
41bd17a4 3107NAME: cache_peer_domain cache_host_domain
3108TYPE: hostdomain
3109DEFAULT: none
3110LOC: none
3111DOC_START
3112 Use to limit the domains for which a neighbor cache will be
638402dd 3113 queried.
cccac0a2 3114
638402dd
AJ
3115 Usage:
3116 cache_peer_domain cache-host domain [domain ...]
3117 cache_peer_domain cache-host !domain
cccac0a2 3118
41bd17a4 3119 For example, specifying
cccac0a2 3120
41bd17a4 3121 cache_peer_domain parent.foo.net .edu
cccac0a2 3122
41bd17a4 3123 has the effect such that UDP query packets are sent to
3124 'bigserver' only when the requested object exists on a
3125 server in the .edu domain. Prefixing the domainname
3126 with '!' means the cache will be queried for objects
3127 NOT in that domain.
cccac0a2 3128
41bd17a4 3129 NOTE: * Any number of domains may be given for a cache-host,
3130 either on the same or separate lines.
3131 * When multiple domains are given for a particular
3132 cache-host, the first matched domain is applied.
3133 * Cache hosts with no domain restrictions are queried
3134 for all requests.
3135 * There are no defaults.
3136 * There is also a 'cache_peer_access' tag in the ACL
3137 section.
3138DOC_END
dd9b1776 3139
41bd17a4 3140NAME: cache_peer_access
3141TYPE: peer_access
3142DEFAULT: none
3143LOC: none
3144DOC_START
3145 Similar to 'cache_peer_domain' but provides more flexibility by
3146 using ACL elements.
cccac0a2 3147
638402dd
AJ
3148 Usage:
3149 cache_peer_access cache-host allow|deny [!]aclname ...
dd9b1776 3150
41bd17a4 3151 The syntax is identical to 'http_access' and the other lists of
3152 ACL elements. See the comments for 'http_access' below, or
e314b7b9 3153 the Squid FAQ (http://wiki.squid-cache.org/SquidFaq/SquidAcl).
41bd17a4 3154DOC_END
dd9b1776 3155
41bd17a4 3156NAME: neighbor_type_domain
3157TYPE: hostdomaintype
3158DEFAULT: none
638402dd 3159DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer.
41bd17a4 3160LOC: none
3161DOC_START
638402dd
AJ
3162 Modify the cache_peer neighbor type when passing requests
3163 about specific domains to the peer.
cccac0a2 3164
638402dd
AJ
3165 Usage:
3166 neighbor_type_domain neighbor parent|sibling domain domain ...
6bf4f823 3167
638402dd
AJ
3168 For example:
3169 cache_peer foo.example.com parent 3128 3130
3170 neighbor_type_domain foo.example.com sibling .au .de
6bf4f823 3171
638402dd
AJ
3172 The above configuration treats all requests to foo.example.com as a
3173 parent proxy unless the request is for a .au or .de ccTLD domain name.
41bd17a4 3174DOC_END
6bf4f823 3175
41bd17a4 3176NAME: dead_peer_timeout
3177COMMENT: (seconds)
3178DEFAULT: 10 seconds
3179TYPE: time_t
3180LOC: Config.Timeout.deadPeer
3181DOC_START
3182 This controls how long Squid waits to declare a peer cache
3183 as "dead." If there are no ICP replies received in this
3184 amount of time, Squid will declare the peer dead and not
3185 expect to receive any further ICP replies. However, it
3186 continues to send ICP queries, and will mark the peer as
3187 alive upon receipt of the first subsequent ICP reply.
699acd19 3188
41bd17a4 3189 This timeout also affects when Squid expects to receive ICP
3190 replies from peers. If more than 'dead_peer' seconds have
3191 passed since the last ICP reply was received, Squid will not
3192 expect to receive an ICP reply on the next query. Thus, if
3193 your time between requests is greater than this timeout, you
3194 will see a lot of requests sent DIRECT to origin servers
3195 instead of to your parents.
3196DOC_END
cccac0a2 3197
437823b4 3198NAME: forward_max_tries
6c367206 3199DEFAULT: 25
437823b4
AJ
3200TYPE: int
3201LOC: Config.forward_max_tries
3202DOC_START
3203 Controls how many different forward paths Squid will try
3204 before giving up. See also forward_timeout.
31ef19cd
AJ
3205
3206 NOTE: connect_retries (default: none) can make each of these
3207 possible forwarding paths be tried multiple times.
437823b4
AJ
3208DOC_END
3209
41bd17a4 3210NAME: hierarchy_stoplist
3211TYPE: wordlist
3212DEFAULT: none
3213LOC: Config.hierarchy_stoplist
3214DOC_START
3215 A list of words which, if found in a URL, cause the object to
3216 be handled directly by this cache. In other words, use this
3217 to not query neighbor caches for certain objects. You may
3218 list this option multiple times.
e0855596 3219
3387b5a4
AJ
3220 Example:
3221 hierarchy_stoplist cgi-bin ?
3222
3223 Note: never_direct overrides this option.
6b698a21 3224DOC_END
0976f8db 3225
41bd17a4 3226COMMENT_START
3227 MEMORY CACHE OPTIONS
3228 -----------------------------------------------------------------------------
3229COMMENT_END
3230
3231NAME: cache_mem
3232COMMENT: (bytes)
3233TYPE: b_size_t
df2eec10 3234DEFAULT: 256 MB
41bd17a4 3235LOC: Config.memMaxSize
6b698a21 3236DOC_START
41bd17a4 3237 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
3238 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
3239 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
3240 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
3241
3242 'cache_mem' specifies the ideal amount of memory to be used
3243 for:
3244 * In-Transit objects
3245 * Hot Objects
3246 * Negative-Cached objects
3247
3248 Data for these objects are stored in 4 KB blocks. This
3249 parameter specifies the ideal upper limit on the total size of
3250 4 KB blocks allocated. In-Transit objects take the highest
3251 priority.
3252
3253 In-transit objects have priority over the others. When
3254 additional space is needed for incoming data, negative-cached
3255 and hot objects will be released. In other words, the
3256 negative-cached and hot objects will fill up any unused space
3257 not needed for in-transit objects.
3258
3259 If circumstances require, this limit will be exceeded.
3260 Specifically, if your incoming request rate requires more than
3261 'cache_mem' of memory to hold in-transit objects, Squid will
3262 exceed this limit to satisfy the new requests. When the load
3263 decreases, blocks will be freed until the high-water mark is
3264 reached. Thereafter, blocks will be used to store hot
3265 objects.
29f35ca5
AR
3266
3267 If shared memory caching is enabled, Squid does not use the shared
3268 cache space for in-transit objects, but they still consume as much
3269 local memory as they need. For more details about the shared memory
3270 cache, see memory_cache_shared.
6b698a21 3271DOC_END
0976f8db 3272
41bd17a4 3273NAME: maximum_object_size_in_memory
3274COMMENT: (bytes)
3275TYPE: b_size_t
df2eec10 3276DEFAULT: 512 KB
41bd17a4 3277LOC: Config.Store.maxInMemObjSize
6b698a21 3278DOC_START
41bd17a4 3279 Objects greater than this size will not be attempted to kept in
3280 the memory cache. This should be set high enough to keep objects
3281 accessed frequently in memory to improve performance whilst low
3282 enough to keep larger objects from hoarding cache_mem.
6b698a21 3283DOC_END
0976f8db 3284
57af1e3f
AR
3285NAME: memory_cache_shared
3286COMMENT: on|off
3287TYPE: YesNoNone
3288LOC: Config.memShared
3289DEFAULT: none
70f856bc 3290DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers.
57af1e3f
AR
3291DOC_START
3292 Controls whether the memory cache is shared among SMP workers.
3293
70f856bc
AR
3294 The shared memory cache is meant to occupy cache_mem bytes and replace
3295 the non-shared memory cache, although some entities may still be
3296 cached locally by workers for now (e.g., internal and in-transit
3297 objects may be served from a local memory cache even if shared memory
3298 caching is enabled).
3299
65b81b27 3300 By default, the memory cache is shared if and only if all of the
70f856bc
AR
3301 following conditions are satisfied: Squid runs in SMP mode with
3302 multiple workers, cache_mem is positive, and Squid environment
3303 supports required IPC primitives (e.g., POSIX shared memory segments
3304 and GCC-style atomic operations).
3305
3306 To avoid blocking locks, shared memory uses opportunistic algorithms
3307 that do not guarantee that every cachable entity that could have been
3308 shared among SMP workers will actually be shared.
3309
3310 Currently, entities exceeding 32KB in size cannot be shared.
57af1e3f
AR
3311DOC_END
3312
ea21d497
HN
3313NAME: memory_cache_mode
3314TYPE: memcachemode
3315LOC: Config
3316DEFAULT: always
638402dd 3317DEFAULT_DOC: Keep the most recently fetched objects in memory
ff4b33f4 3318DOC_START
ea21d497 3319 Controls which objects to keep in the memory cache (cache_mem)
ff4b33f4 3320
ea21d497
HN
3321 always Keep most recently fetched objects in memory (default)
3322
3323 disk Only disk cache hits are kept in memory, which means
3324 an object must first be cached on disk and then hit
3325 a second time before cached in memory.
3326
3327 network Only objects fetched from network is kept in memory
ff4b33f4
HN
3328DOC_END
3329
41bd17a4 3330NAME: memory_replacement_policy
3331TYPE: removalpolicy
3332LOC: Config.memPolicy
3333DEFAULT: lru
6b698a21 3334DOC_START
41bd17a4 3335 The memory replacement policy parameter determines which
3336 objects are purged from memory when memory space is needed.
7f7db318 3337
638402dd 3338 See cache_replacement_policy for details on algorithms.
41bd17a4 3339DOC_END
6b698a21 3340
41bd17a4 3341COMMENT_START
3342 DISK CACHE OPTIONS
3343 -----------------------------------------------------------------------------
3344COMMENT_END
6b698a21 3345
41bd17a4 3346NAME: cache_replacement_policy
3347TYPE: removalpolicy
3348LOC: Config.replPolicy
3349DEFAULT: lru
3350DOC_START
3351 The cache replacement policy parameter determines which
3352 objects are evicted (replaced) when disk space is needed.
6b698a21 3353
41bd17a4 3354 lru : Squid's original list based LRU policy
3355 heap GDSF : Greedy-Dual Size Frequency
3356 heap LFUDA: Least Frequently Used with Dynamic Aging
3357 heap LRU : LRU policy implemented using a heap
6b698a21 3358
638402dd 3359 Applies to any cache_dir lines listed below this directive.
7f7db318 3360
41bd17a4 3361 The LRU policies keeps recently referenced objects.
0976f8db 3362
41bd17a4 3363 The heap GDSF policy optimizes object hit rate by keeping smaller
3364 popular objects in cache so it has a better chance of getting a
3365 hit. It achieves a lower byte hit rate than LFUDA though since
3366 it evicts larger (possibly popular) objects.
0976f8db 3367
41bd17a4 3368 The heap LFUDA policy keeps popular objects in cache regardless of
3369 their size and thus optimizes byte hit rate at the expense of
3370 hit rate since one large, popular object will prevent many
3371 smaller, slightly less popular objects from being cached.
0976f8db 3372
41bd17a4 3373 Both policies utilize a dynamic aging mechanism that prevents
3374 cache pollution that can otherwise occur with frequency-based
3375 replacement policies.
7d90757b 3376
41bd17a4 3377 NOTE: if using the LFUDA replacement policy you should increase
b51ec8c8 3378 the value of maximum_object_size above its default of 4 MB to
41bd17a4 3379 to maximize the potential byte hit rate improvement of LFUDA.
dc1af3cf 3380
41bd17a4 3381 For more information about the GDSF and LFUDA cache replacement
3382 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
3383 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
6b698a21 3384DOC_END
0976f8db 3385
41bd17a4 3386NAME: cache_dir
3387TYPE: cachedir
3388DEFAULT: none
638402dd 3389DEFAULT_DOC: No disk cache. Store cache ojects only in memory.
41bd17a4 3390LOC: Config.cacheSwap
6b698a21 3391DOC_START
638402dd
AJ
3392 Format:
3393 cache_dir Type Directory-Name Fs-specific-data [options]
0976f8db 3394
41bd17a4 3395 You can specify multiple cache_dir lines to spread the
3396 cache among different disk partitions.
0976f8db 3397
41bd17a4 3398 Type specifies the kind of storage system to use. Only "ufs"
3399 is built by default. To enable any of the other storage systems
3400 see the --enable-storeio configure option.
0976f8db 3401
41bd17a4 3402 'Directory' is a top-level directory where cache swap
3403 files will be stored. If you want to use an entire disk
3404 for caching, this can be the mount-point directory.
3405 The directory must exist and be writable by the Squid
3406 process. Squid will NOT create this directory for you.
0976f8db 3407
acf69d74
AJ
3408 In SMP configurations, cache_dir must not precede the workers option
3409 and should use configuration macros or conditionals to give each
3410 worker interested in disk caching a dedicated cache directory.
3411
638402dd
AJ
3412
3413 ==== The ufs store type ====
0976f8db 3414
41bd17a4 3415 "ufs" is the old well-known Squid storage format that has always
3416 been there.
0976f8db 3417
638402dd
AJ
3418 Usage:
3419 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
0976f8db 3420
41bd17a4 3421 'Mbytes' is the amount of disk space (MB) to use under this
3422 directory. The default is 100 MB. Change this to suit your
3423 configuration. Do NOT put the size of your disk drive here.
3424 Instead, if you want Squid to use the entire disk drive,
3425 subtract 20% and use that value.
0976f8db 3426
56fba4d0 3427 'L1' is the number of first-level subdirectories which
41bd17a4 3428 will be created under the 'Directory'. The default is 16.
0976f8db 3429
56fba4d0 3430 'L2' is the number of second-level subdirectories which
41bd17a4 3431 will be created under each first-level directory. The default
3432 is 256.
0976f8db 3433
638402dd
AJ
3434
3435 ==== The aufs store type ====
7f7db318 3436
41bd17a4 3437 "aufs" uses the same storage format as "ufs", utilizing
3438 POSIX-threads to avoid blocking the main Squid process on
3439 disk-I/O. This was formerly known in Squid as async-io.
38f9c547 3440
638402dd
AJ
3441 Usage:
3442 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
38f9c547 3443
41bd17a4 3444 see argument descriptions under ufs above
38f9c547 3445
638402dd
AJ
3446
3447 ==== The diskd store type ====
38f9c547 3448
41bd17a4 3449 "diskd" uses the same storage format as "ufs", utilizing a
3450 separate process to avoid blocking the main Squid process on
3451 disk-I/O.
4c3ef9b2 3452
638402dd
AJ
3453 Usage:
3454 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
0976f8db 3455
41bd17a4 3456 see argument descriptions under ufs above
0976f8db 3457
41bd17a4 3458 Q1 specifies the number of unacknowledged I/O requests when Squid
3459 stops opening new files. If this many messages are in the queues,
3460 Squid won't open new files. Default is 64
0976f8db 3461
41bd17a4 3462 Q2 specifies the number of unacknowledged messages when Squid
3463 starts blocking. If this many messages are in the queues,
3464 Squid blocks until it receives some replies. Default is 72
0976f8db 3465
41bd17a4 3466 When Q1 < Q2 (the default), the cache directory is optimized
3467 for lower response time at the expense of a decrease in hit
3468 ratio. If Q1 > Q2, the cache directory is optimized for
3469 higher hit ratio at the expense of an increase in response
3470 time.
0976f8db 3471
e2851fe7 3472
638402dd
AJ
3473 ==== The rock store type ====
3474
3475 Usage:
e51ce7da 3476 cache_dir rock Directory-Name Mbytes [options]
e2851fe7 3477
2e55f083 3478 The Rock Store type is a database-style storage. All cached
e51ce7da
AR
3479 entries are stored in a "database" file, using fixed-size slots.
3480 A single entry occupies one or more slots.
e2851fe7 3481
3e1dfe3d
AR
3482 If possible, Squid using Rock Store creates a dedicated kid
3483 process called "disker" to avoid blocking Squid worker(s) on disk
3484 I/O. One disker kid is created for each rock cache_dir. Diskers
3485 are created only when Squid, running in daemon mode, has support
3486 for the IpcIo disk I/O module.
3487
43ebbac3
AR
3488 swap-timeout=msec: Squid will not start writing a miss to or
3489 reading a hit from disk if it estimates that the swap operation
3490 will take more than the specified number of milliseconds. By
3491 default and when set to zero, disables the disk I/O time limit
3492 enforcement. Ignored when using blocking I/O module because
3493 blocking synchronous I/O does not allow Squid to estimate the
3494 expected swap wait time.
3495
df881a0f 3496 max-swap-rate=swaps/sec: Artificially limits disk access using
1e614370 3497 the specified I/O rate limit. Swap out requests that
df881a0f 3498 would cause the average I/O rate to exceed the limit are
1e614370
DK
3499 delayed. Individual swap in requests (i.e., hits or reads) are
3500 not delayed, but they do contribute to measured swap rate and
3501 since they are placed in the same FIFO queue as swap out
3502 requests, they may wait longer if max-swap-rate is smaller.
3503 This is necessary on file systems that buffer "too
df881a0f
AR
3504 many" writes and then start blocking Squid and other processes
3505 while committing those writes to disk. Usually used together
3506 with swap-timeout to avoid excessive delays and queue overflows
3507 when disk demand exceeds available disk "bandwidth". By default
3508 and when set to zero, disables the disk I/O rate limit
3509 enforcement. Currently supported by IpcIo module only.
3510
e51ce7da
AR
3511 slot-size=bytes: The size of a database "record" used for
3512 storing cached responses. A cached response occupies at least
3513 one slot and all database I/O is done using individual slots so
3514 increasing this parameter leads to more disk space waste while
3515 decreasing it leads to more disk I/O overheads. Should be a
3516 multiple of your operating system I/O page size. Defaults to
3517 16KBytes. A housekeeping header is stored with each slot and
3518 smaller slot-sizes will be rejected. The header is smaller than
3519 100 bytes.
3520
df881a0f 3521
638402dd 3522 ==== COMMON OPTIONS ====
0976f8db 3523
638402dd
AJ
3524 no-store no new objects should be stored to this cache_dir.
3525
3526 min-size=n the minimum object size in bytes this cache_dir
3527 will accept. It's used to restrict a cache_dir
3528 to only store large objects (e.g. AUFS) while
3529 other stores are optimized for smaller objects
73656056 3530 (e.g. Rock).
638402dd 3531 Defaults to 0.
0976f8db 3532
638402dd
AJ
3533 max-size=n the maximum object size in bytes this cache_dir
3534 supports.
3535 The value in maximum_object_size directive, sets
3536 a default unless more specific details are available
3537 about the cache_dir (ie a small store capacity).
b6662ffd 3538
41bd17a4 3539 Note: To make optimal use of the max-size limits you should order
638402dd 3540 the cache_dir lines with the smallest max-size value first.
0976f8db 3541
bebc043b 3542NOCOMMENT_START
e0855596
AJ
3543
3544# Uncomment and adjust the following to add a disk cache directory.
3545#cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
bebc043b 3546NOCOMMENT_END
6b698a21 3547DOC_END
0976f8db 3548
41bd17a4 3549NAME: store_dir_select_algorithm
3550TYPE: string
3551LOC: Config.store_dir_select_algorithm
3552DEFAULT: least-load
6b698a21 3553DOC_START
638402dd
AJ
3554 How Squid selects which cache_dir to use when the response
3555 object will fit into more than one.
3556
3557 Regardless of which algorithm is used the cache_dir min-size
3558 and max-size parameters are obeyed. As such they can affect
3559 the selection algorithm by limiting the set of considered
3560 cache_dir.
3561
3562 Algorithms:
3563
3564 least-load
3565
3566 This algorithm is suited to caches with similar cache_dir
3567 sizes and disk speeds.
3568
3569 The disk with the least I/O pending is selected.
3570 When there are multiple disks with the same I/O load ranking
3571 the cache_dir with most available capacity is selected.
3572
3573 When a mix of cache_dir sizes are configured the faster disks
3574 have a naturally lower I/O loading and larger disks have more
3575 capacity. So space used to store objects and data throughput
3576 may be very unbalanced towards larger disks.
3577
3578
3579 round-robin
3580
3581 This algorithm is suited to caches with unequal cache_dir
3582 disk sizes.
3583
3584 Each cache_dir is selected in a rotation. The next suitable
3585 cache_dir is used.
3586
3587 Available cache_dir capacity is only considered in relation
3588 to whether the object will fit and meets the min-size and
3589 max-size parameters.
3590
3591 Disk I/O loading is only considered to prevent overload on slow
3592 disks. This algorithm does not spread objects by size, so any
3593 I/O loading per-disk may appear very unbalanced and volatile.
3594
6b698a21 3595DOC_END
0976f8db 3596
41bd17a4 3597NAME: max_open_disk_fds
3598TYPE: int
3599LOC: Config.max_open_disk_fds
3600DEFAULT: 0
638402dd 3601DEFAULT_DOC: no limit
6b698a21 3602DOC_START
41bd17a4 3603 To avoid having disk as the I/O bottleneck Squid can optionally
3604 bypass the on-disk cache if more than this amount of disk file
3605 descriptors are open.
3606
3607 A value of 0 indicates no limit.
6b698a21 3608DOC_END
0976f8db 3609
41bd17a4 3610NAME: minimum_object_size
6b698a21 3611COMMENT: (bytes)
47f6e231 3612TYPE: b_int64_t
6b698a21 3613DEFAULT: 0 KB
638402dd 3614DEFAULT_DOC: no limit
41bd17a4 3615LOC: Config.Store.minObjectSize
6b698a21 3616DOC_START
41bd17a4 3617 Objects smaller than this size will NOT be saved on disk. The
638402dd
AJ
3618 value is specified in bytes, and the default is 0 KB, which
3619 means all responses can be stored.
6b698a21 3620DOC_END
0976f8db 3621
41bd17a4 3622NAME: maximum_object_size
3623COMMENT: (bytes)
3624TYPE: b_int64_t
b51ec8c8 3625DEFAULT: 4 MB
41bd17a4 3626LOC: Config.Store.maxObjectSize
777831e0 3627DOC_START
b51ec8c8
AJ
3628 The default limit on size of objects stored to disk.
3629 This size is used for cache_dir where max-size is not set.
3630 The value is specified in bytes, and the default is 4 MB.
3631
3632 If you wish to get a high BYTES hit ratio, you should probably
41bd17a4 3633 increase this (one 32 MB object hit counts for 3200 10KB
b51ec8c8
AJ
3634 hits).
3635
3636 If you wish to increase hit ratio more than you want to
41bd17a4 3637 save bandwidth you should leave this low.
777831e0 3638
41bd17a4 3639 NOTE: if using the LFUDA replacement policy you should increase
3640 this value to maximize the byte hit rate improvement of LFUDA!
3641 See replacement_policy below for a discussion of this policy.
6b698a21 3642DOC_END
0976f8db 3643
41bd17a4 3644NAME: cache_swap_low
3645COMMENT: (percent, 0-100)
5473c134 3646TYPE: int
41bd17a4 3647DEFAULT: 90
3648LOC: Config.Swap.lowWaterMark
638402dd
AJ
3649DOC_START
3650 The low-water mark for cache object replacement.
3651 Replacement begins when the swap (disk) usage is above the
3652 low-water mark and attempts to maintain utilization near the
3653 low-water mark. As swap utilization gets close to high-water
3654 mark object eviction becomes more aggressive. If utilization is
3655 close to the low-water mark less replacement is done each time.
3656
3657 Defaults are 90% and 95%. If you have a large cache, 5% could be
3658 hundreds of MB. If this is the case you may wish to set these
3659 numbers closer together.
3660
3661 See also cache_swap_high
3662DOC_END
41bd17a4 3663
3664NAME: cache_swap_high
3665COMMENT: (percent, 0-100)
3666TYPE: int
3667DEFAULT: 95
3668LOC: Config.Swap.highWaterMark
6b698a21 3669DOC_START
638402dd 3670 The high-water mark for cache object replacement.
41bd17a4 3671 Replacement begins when the swap (disk) usage is above the
3672 low-water mark and attempts to maintain utilization near the
3673 low-water mark. As swap utilization gets close to high-water
3674 mark object eviction becomes more aggressive. If utilization is
3675 close to the low-water mark less replacement is done each time.
3676
3677 Defaults are 90% and 95%. If you have a large cache, 5% could be
3678 hundreds of MB. If this is the case you may wish to set these
3679 numbers closer together.
638402dd
AJ
3680
3681 See also cache_swap_low
6b698a21 3682DOC_END
0976f8db 3683
5473c134 3684COMMENT_START
41bd17a4 3685 LOGFILE OPTIONS
5473c134 3686 -----------------------------------------------------------------------------
3687COMMENT_END
0976f8db 3688
41bd17a4 3689NAME: logformat
3690TYPE: logformat
20efa1c2 3691LOC: Log::TheConfig
5473c134 3692DEFAULT: none
638402dd 3693DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in.
6b698a21 3694DOC_START
41bd17a4 3695 Usage:
0976f8db 3696
41bd17a4 3697 logformat <name> <format specification>
0976f8db 3698
41bd17a4 3699 Defines an access log format.
6b698a21 3700
41bd17a4 3701 The <format specification> is a string with embedded % format codes
5473c134 3702
41bd17a4 3703 % format codes all follow the same basic structure where all but
3704 the formatcode is optional. Output strings are automatically escaped
3705 as required according to their context and the output format
3706 modifiers are usually not needed, but can be specified if an explicit
3707 output format is desired.
6b698a21 3708
41bd17a4 3709 % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
0976f8db 3710
41bd17a4 3711 " output in quoted string format
3712 [ output in squid text log format as used by log_mime_hdrs
3713 # output in URL quoted format
3714 ' output as-is
5473c134 3715
41bd17a4 3716 - left aligned
c32c6db7
AR
3717
3718 width minimum and/or maximum field width:
3719 [width_min][.width_max]
e2851fe7
AR
3720 When minimum starts with 0, the field is zero-padded.
3721 String values exceeding maximum width are truncated.
c32c6db7 3722
41bd17a4 3723 {arg} argument such as header name etc
5473c134 3724
41bd17a4 3725 Format codes:
5473c134 3726
3ff65596 3727 % a literal % character
f4b68e1a
AJ
3728 sn Unique sequence number per log line entry
3729 err_code The ID of an error response served by Squid or
3730 a similar internal error identifier.
3731 err_detail Additional err_code-dependent error information.
d7f4a0b7
CT
3732 note The meta header specified by the argument. Also
3733 logs the adaptation meta headers set by the
3734 adaptation_meta configuration parameter.
3735 If no argument given all meta headers logged.
f4b68e1a
AJ
3736
3737 Connection related format codes:
3738
41bd17a4 3739 >a Client source IP address
3740 >A Client FQDN
3741 >p Client source port
8652f8e7
AJ
3742 >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier)
3743 >la Local IP address the client connected to
3744 >lp Local port number the client connected to
f123f5e9
CT
3745 >qos Client connection TOS/DSCP value set by Squid
3746 >nfmark Client connection netfilter mark set by Squid
8652f8e7 3747
28417506
CT
3748 la Local listening IP address the client connection was connected to.
3749 lp Local listening port number the client connection was connected to.
3750
8652f8e7
AJ
3751 <a Server IP address of the last server or peer connection
3752 <A Server FQDN or peer name
3753 <p Server port number of the last server or peer connection
c3a082ae 3754 <la Local IP address of the last server or peer connection
152e24b3 3755 <lp Local port number of the last server or peer connection
f123f5e9
CT
3756 <qos Server connection TOS/DSCP value set by Squid
3757 <nfmark Server connection netfilter mark set by Squid
f4b68e1a
AJ
3758
3759 Time related format codes:
3760
41bd17a4 3761 ts Seconds since epoch
3762 tu subsecond time (milliseconds)
3763 tl Local time. Optional strftime format argument
3ff65596 3764 default %d/%b/%Y:%H:%M:%S %z
41bd17a4 3765 tg GMT time. Optional strftime format argument
3ff65596 3766 default %d/%b/%Y:%H:%M:%S %z
41bd17a4 3767 tr Response time (milliseconds)
3ff65596 3768 dt Total time spent making DNS lookups (milliseconds)
af0ded40
CT
3769 tS Approximate master transaction start time in
3770 <full seconds since epoch>.<fractional seconds> format.
3771 Currently, Squid considers the master transaction
3772 started when a complete HTTP request header initiating
3773 the transaction is received from the client. This is
3774 the same value that Squid uses to calculate transaction
3775 response time when logging %tr to access.log. Currently,
3776 Squid uses millisecond resolution for %tS values,
3777 similar to the default access.log "current time" field
3778 (%ts.%03tu).
3ff65596 3779
8652f8e7
AJ
3780 Access Control related format codes:
3781
3782 et Tag returned by external acl
3783 ea Log string returned by external acl
3784 un User name (any available)
3785 ul User name from authentication
3786 ue User name from external acl helper
3787 ui User name from ident
3788 us User name from SSL
d4806c91
CT
3789 credentials Client credentials. The exact meaning depends on
3790 the authentication scheme: For Basic authentication,
3791 it is the password; for Digest, the realm sent by the
3792 client; for NTLM and Negotiate, the client challenge
3793 or client credentials prefixed with "YR " or "KK ".
8652f8e7
AJ
3794
3795 HTTP related format codes:
3ff65596 3796
d6df21d2
AJ
3797 REQUEST
3798
3799 [http::]rm Request method (GET/POST etc)
3800 [http::]>rm Request method from client
3801 [http::]<rm Request method sent to server or peer
3802 [http::]ru Request URL from client (historic, filtered for logging)
3803 [http::]>ru Request URL from client
3804 [http::]<ru Request URL sent to server or peer
fa450988 3805 [http::]>rd Request URL domain from client
d6df21d2
AJ
3806 [http::]rp Request URL-Path excluding hostname
3807 [http::]>rp Request URL-Path excluding hostname from client
3808 [http::]<rp Request URL-Path excluding hostname sent to server or peer
3809 [http::]rv Request protocol version
3810 [http::]>rv Request protocol version from client
3811 [http::]<rv Request protocol version sent to server or peer
3812
19483c50
AR
3813 [http::]>h Original received request header.
3814 Usually differs from the request header sent by
3815 Squid, although most fields are often preserved.
3816 Accepts optional header field name/value filter
3817 argument using name[:[separator]element] format.
3818 [http::]>ha Received request header after adaptation and
3819 redirection (pre-cache REQMOD vectoring point).
3820 Usually differs from the request header sent by
3821 Squid, although most fields are often preserved.
6fca33e0 3822 Optional header name argument as for >h
d6df21d2
AJ
3823
3824
3825 RESPONSE
3826
3827 [http::]<Hs HTTP status code received from the next hop
3828 [http::]>Hs HTTP status code sent to the client
3829
3ff65596
AR
3830 [http::]<h Reply header. Optional header name argument
3831 as for >h
d6df21d2
AJ
3832
3833 [http::]mt MIME content type
3834
3835
3836 SIZE COUNTERS
3837
3838 [http::]st Total size of request + reply traffic with client
3839 [http::]>st Total size of request received from client.
3840 Excluding chunked encoding bytes.
3841 [http::]<st Total size of reply sent to client (after adaptation)
3842
3843 [http::]>sh Size of request headers received from client
3844 [http::]<sh Size of reply headers sent to client (after adaptation)
3845
3846 [http::]<sH Reply high offset sent
3847 [http::]<sS Upstream object size
3848
bae917ac
CT
3849 [http::]<bs Number of HTTP-equivalent message body bytes
3850 received from the next hop, excluding chunked
3851 transfer encoding and control messages.
3852 Generated FTP/Gopher listings are treated as
3853 received bodies.
d6df21d2
AJ
3854
3855
3856 TIMING
3857
3ff65596
AR
3858 [http::]<pt Peer response time in milliseconds. The timer starts
3859 when the last request byte is sent to the next hop
3860 and stops when the last response byte is received.
3861 [http::]<tt Total server-side time in milliseconds. The timer
3862 starts with the first connect request (or write I/O)
3863 sent to the first selected peer. The timer stops
3864 with the last I/O with the last peer.
3865
8652f8e7
AJ
3866 Squid handling related format codes:
3867
3868 Ss Squid request status (TCP_MISS etc)
3869 Sh Squid hierarchy status (DEFAULT_PARENT etc)
3870
08097970
AR
3871 SSL-related format codes:
3872
3873 ssl::bump_mode SslBump decision for the transaction:
3874
3875 For CONNECT requests that initiated bumping of
3876 a connection and for any request received on
3877 an already bumped connection, Squid logs the
3878 corresponding SslBump mode ("server-first" or
3879 "client-first"). See the ssl_bump option for
3880 more information about these modes.
3881
3882 A "none" token is logged for requests that
3883 triggered "ssl_bump" ACL evaluation matching
3884 either a "none" rule or no rules at all.
3885
3886 In all other cases, a single dash ("-") is
3887 logged.
3888
5038f9d8 3889 If ICAP is enabled, the following code becomes available (as
3ff65596
AR
3890 well as ICAP log codes documented with the icap_log option):
3891
3892 icap::tt Total ICAP processing time for the HTTP
3893 transaction. The timer ticks when ICAP
3894 ACLs are checked and when ICAP
3895 transaction is in progress.
3896
5038f9d8 3897 If adaptation is enabled the following three codes become available:
3ff65596 3898
5038f9d8
AR
3899 adapt::<last_h The header of the last ICAP response or
3900 meta-information from the last eCAP
3901 transaction related to the HTTP transaction.
3902 Like <h, accepts an optional header name
3903 argument.
3ff65596
AR
3904
3905 adapt::sum_trs Summed adaptation transaction response
3906 times recorded as a comma-separated list in
3907 the order of transaction start time. Each time
3908 value is recorded as an integer number,
3909 representing response time of one or more
3910 adaptation (ICAP or eCAP) transaction in
3911 milliseconds. When a failed transaction is
3912 being retried or repeated, its time is not
3913 logged individually but added to the
3914 replacement (next) transaction. See also:
3915 adapt::all_trs.
3916
3917 adapt::all_trs All adaptation transaction response times.
3918 Same as adaptation_strs but response times of
3919 individual transactions are never added
3920 together. Instead, all transaction response
3921 times are recorded individually.
3922
3923 You can prefix adapt::*_trs format codes with adaptation
3924 service name in curly braces to record response time(s) specific
3925 to that service. For example: %{my_service}adapt::sum_trs
5473c134 3926
f4698e0b
CT
3927 If SSL is enabled, the following formating codes become available:
3928
3929 %ssl::>cert_subject The Subject field of the received client
3930 SSL certificate or a dash ('-') if Squid has
3931 received an invalid/malformed certificate or
3932 no certificate at all. Consider encoding the
3933 logged value because Subject often has spaces.
3934
3935 %ssl::>cert_issuer The Issuer field of the received client
3936 SSL certificate or a dash ('-') if Squid has
3937 received an invalid/malformed certificate or
3938 no certificate at all. Consider encoding the
3939 logged value because Issuer often has spaces.
3940
7d9acc3c
AJ
3941 The default formats available (which do not need re-defining) are:
3942
bd85ea1f
AJ
3943logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
3944logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh
3945logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
20efa1c2
AJ
3946logformat referrer %ts.%03tu %>a %{Referer}>h %ru
3947logformat useragent %>a [%tl] "%{User-Agent}>h"
3948
8652f8e7
AJ
3949 NOTE: When the log_mime_hdrs directive is set to ON.
3950 The squid, common and combined formats have a safely encoded copy
3951 of the mime headers appended to each line within a pair of brackets.
3952
3953 NOTE: The common and combined formats are not quite true to the Apache definition.
3954 The logs from Squid contain an extra status and hierarchy code appended.
20efa1c2 3955
5473c134 3956DOC_END
3957
41bd17a4 3958NAME: access_log cache_access_log
3959TYPE: access_log
3960LOC: Config.Log.accesslogs
82b7abe3 3961DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid
5473c134 3962DOC_START
fb0c2f17
NH
3963 Configures whether and how Squid logs HTTP and ICP transactions.
3964 If access logging is enabled, a single line is logged for every
3965 matching HTTP or ICP request. The recommended directive formats are:
3966
3967 access_log <module>:<place> [option ...] [acl acl ...]
3968 access_log none [acl acl ...]
3969
3970 The following directive format is accepted but may be deprecated:
82b7abe3 3971 access_log <module>:<place> [<logformat name> [acl acl ...]]
fb0c2f17
NH
3972
3973 In most cases, the first ACL name must not contain the '=' character
3974 and should not be equal to an existing logformat name. You can always
3975 start with an 'all' ACL to work around those restrictions.
82b7abe3
AJ
3976
3977 Will log to the specified module:place using the specified format (which
41bd17a4 3978 must be defined in a logformat directive) those entries which match
3979 ALL the acl's specified (which must be defined in acl clauses).
82b7abe3
AJ
3980 If no acl is specified, all requests will be logged to this destination.
3981
fb0c2f17
NH
3982 ===== Available options for the recommended directive format =====
3983
3984 logformat=name Names log line format (either built-in or
3985 defined by a logformat directive). Defaults
3986 to 'squid'.
3987
3988 buffer-size=64KB Defines approximate buffering limit for log
3989 records (see buffered_logs). Squid should not
3990 keep more than the specified size and, hence,
3991 should flush records before the buffer becomes
3992 full to avoid overflows under normal
3993 conditions (the exact flushing algorithm is
3994 module-dependent though). The on-error option
3995 controls overflow handling.
3996
3997 on-error=die|drop Defines action on unrecoverable errors. The
3998 'drop' action ignores (i.e., does not log)
3999 affected log records. The default 'die' action
4000 kills the affected worker. The drop action
4001 support has not been tested for modules other
4002 than tcp.
4003
82b7abe3
AJ
4004 ===== Modules Currently available =====
4005
bb7a1781 4006 none Do not log any requests matching these ACL.
82b7abe3
AJ
4007 Do not specify Place or logformat name.
4008
4009 stdio Write each log line to disk immediately at the completion of
4010 each request.
4011 Place: the filename and path to be written.
4012
4013 daemon Very similar to stdio. But instead of writing to disk the log
4014 line is passed to a daemon helper for asychronous handling instead.
4015 Place: varies depending on the daemon.
4016
4017 log_file_daemon Place: the file name and path to be written.
4018
4019 syslog To log each request via syslog facility.
4020 Place: The syslog facility and priority level for these entries.
4021 Place Format: facility.priority
5473c134 4022
82b7abe3
AJ
4023 where facility could be any of:
4024 authpriv, daemon, local0 ... local7 or user.
5473c134 4025
82b7abe3
AJ
4026 And priority could be any of:
4027 err, warning, notice, info, debug.
4028
4029 udp To send each log line as text data to a UDP receiver.
4030 Place: The destination host name or IP and port.
f4fc8610 4031 Place Format: //host:port
df2eec10 4032
2bf4e8fa 4033 tcp To send each log line as text data to a TCP receiver.
fb0c2f17 4034 Lines may be accumulated before sending (see buffered_logs).
2bf4e8fa 4035 Place: The destination host name or IP and port.
f4fc8610 4036 Place Format: //host:port
df2eec10
AJ
4037
4038 Default:
82b7abe3 4039 access_log daemon:@DEFAULT_ACCESS_LOG@ squid
41bd17a4 4040DOC_END
5473c134 4041
3ff65596
AR
4042NAME: icap_log
4043TYPE: access_log
4044IFDEF: ICAP_CLIENT
4045LOC: Config.Log.icaplogs
4046DEFAULT: none
4047DOC_START
4048 ICAP log files record ICAP transaction summaries, one line per
4049 transaction.
4050
4051 The icap_log option format is:
4052 icap_log <filepath> [<logformat name> [acl acl ...]]
4053 icap_log none [acl acl ...]]
4054
4055 Please see access_log option documentation for details. The two
4056 kinds of logs share the overall configuration approach and many
4057 features.
4058
4059 ICAP processing of a single HTTP message or transaction may
4060 require multiple ICAP transactions. In such cases, multiple
4061 ICAP transaction log lines will correspond to a single access
4062 log line.
4063
4064 ICAP log uses logformat codes that make sense for an ICAP
4065 transaction. Header-related codes are applied to the HTTP header
4066 embedded in an ICAP server response, with the following caveats:
4067 For REQMOD, there is no HTTP response header unless the ICAP
4068 server performed request satisfaction. For RESPMOD, the HTTP
4069 request header is the header sent to the ICAP server. For
4070 OPTIONS, there are no HTTP headers.
4071
4072 The following format codes are also available for ICAP logs:
4073
4074 icap::<A ICAP server IP address. Similar to <A.
4075
4076 icap::<service_name ICAP service name from the icap_service
4077 option in Squid configuration file.
4078
4079 icap::ru ICAP Request-URI. Similar to ru.
4080
4081 icap::rm ICAP request method (REQMOD, RESPMOD, or
4082 OPTIONS). Similar to existing rm.
4083
4084 icap::>st Bytes sent to the ICAP server (TCP payload
4085 only; i.e., what Squid writes to the socket).
4086
4087 icap::<st Bytes received from the ICAP server (TCP
4088 payload only; i.e., what Squid reads from
4089 the socket).
4090
bae917ac
CT
4091 icap::<bs Number of message body bytes received from the
4092 ICAP server. ICAP message body, if any, usually
4093 includes encapsulated HTTP message headers and
4094 possibly encapsulated HTTP message body. The
4095 HTTP body part is dechunked before its size is
4096 computed.
4097
3ff65596
AR
4098 icap::tr Transaction response time (in
4099 milliseconds). The timer starts when
4100 the ICAP transaction is created and
4101 stops when the transaction is completed.
4102 Similar to tr.
4103
4104 icap::tio Transaction I/O time (in milliseconds). The
4105 timer starts when the first ICAP request
4106 byte is scheduled for sending. The timers
4107 stops when the last byte of the ICAP response
4108 is received.
4109
4110 icap::to Transaction outcome: ICAP_ERR* for all
4111 transaction errors, ICAP_OPT for OPTION
4112 transactions, ICAP_ECHO for 204
4113 responses, ICAP_MOD for message
4114 modification, and ICAP_SAT for request
4115 satisfaction. Similar to Ss.
4116
4117 icap::Hs ICAP response status code. Similar to Hs.
4118
4119 icap::>h ICAP request header(s). Similar to >h.
4120
4121 icap::<h ICAP response header(s). Similar to <h.
4122
4123 The default ICAP log format, which can be used without an explicit
4124 definition, is called icap_squid:
4125
4126logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A -
4127
5038f9d8 4128 See also: logformat, log_icap, and %adapt::<last_h
3ff65596
AR
4129DOC_END
4130
82b7abe3
AJ
4131NAME: logfile_daemon
4132TYPE: string
4133DEFAULT: @DEFAULT_LOGFILED@
4134LOC: Log::TheConfig.logfile_daemon
4135DOC_START
4136 Specify the path to the logfile-writing daemon. This daemon is
4137 used to write the access and store logs, if configured.
14b24caf
HN
4138
4139 Squid sends a number of commands to the log daemon:
4140 L<data>\n - logfile data
4141 R\n - rotate file
4142 T\n - truncate file
dd68402f 4143 O\n - reopen file
14b24caf
HN
4144 F\n - flush file
4145 r<n>\n - set rotate count to <n>
4146 b<n>\n - 1 = buffer output, 0 = don't buffer output
4147
4148 No responses is expected.
82b7abe3
AJ
4149DOC_END
4150
5b0f5383 4151NAME: log_access
8ebad780 4152TYPE: obsolete
5b0f5383 4153DOC_START
8ebad780 4154 Remove this line. Use acls with access_log directives to control access logging
5b0f5383 4155DOC_END
4156
3ff65596 4157NAME: log_icap
8ebad780
CT
4158TYPE: obsolete
4159DOC_START
4160 Remove this line. Use acls with icap_log directives to control icap logging
4161DOC_END
4162
4163NAME: stats_collection
3ff65596 4164TYPE: acl_access
8ebad780 4165LOC: Config.accessList.stats_collection
3ff65596 4166DEFAULT: none
638402dd 4167DEFAULT_DOC: Allow logging for all transactions.
5b0f5383 4168COMMENT: allow|deny acl acl...
3ff65596 4169DOC_START
8ebad780
CT
4170 This options allows you to control which requests gets accounted
4171 in performance counters.
b3567eb5
FC
4172
4173 This clause only supports fast acl types.
4174 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
3ff65596
AR
4175DOC_END
4176
41bd17a4 4177NAME: cache_store_log
4178TYPE: string
df2eec10 4179DEFAULT: none
41bd17a4 4180LOC: Config.Log.store
4181DOC_START
4182 Logs the activities of the storage manager. Shows which
4183 objects are ejected from the cache, and which objects are
6d1dfcfc 4184 saved and for how long.
df2eec10 4185 There are not really utilities to analyze this data, so you can safely
6d1dfcfc
AJ
4186 disable it (the default).
4187
4188 Store log uses modular logging outputs. See access_log for the list
4189 of modules supported.
4190
e0855596 4191 Example:
6d1dfcfc
AJ
4192 cache_store_log stdio:@DEFAULT_STORE_LOG@
4193 cache_store_log daemon:@DEFAULT_STORE_LOG@
5473c134 4194DOC_END
4195
41bd17a4 4196NAME: cache_swap_state cache_swap_log
4197TYPE: string
4198LOC: Config.Log.swap
5473c134 4199DEFAULT: none
638402dd 4200DEFAULT_DOC: Store the journal inside its cache_dir
5473c134 4201DOC_START
41bd17a4 4202 Location for the cache "swap.state" file. This index file holds
4203 the metadata of objects saved on disk. It is used to rebuild
4204 the cache during startup. Normally this file resides in each
4205 'cache_dir' directory, but you may specify an alternate
4206 pathname here. Note you must give a full filename, not just
4207 a directory. Since this is the index for the whole object
4208 list you CANNOT periodically rotate it!
5473c134 4209
41bd17a4 4210 If %s can be used in the file name it will be replaced with a
4211 a representation of the cache_dir name where each / is replaced
4212 with '.'. This is needed to allow adding/removing cache_dir
4213 lines when cache_swap_log is being used.
5473c134 4214
41bd17a4 4215 If have more than one 'cache_dir', and %s is not used in the name
4216 these swap logs will have names such as:
5473c134 4217
41bd17a4 4218 cache_swap_log.00
4219 cache_swap_log.01
4220 cache_swap_log.02
5473c134 4221
41bd17a4 4222 The numbered extension (which is added automatically)
4223 corresponds to the order of the 'cache_dir' lines in this
4224 configuration file. If you change the order of the 'cache_dir'
4225 lines in this file, these index files will NOT correspond to
4226 the correct 'cache_dir' entry (unless you manually rename
4227 them). We recommend you do NOT use this option. It is
4228 better to keep these index files in each 'cache_dir' directory.
5473c134 4229DOC_END
4230
41bd17a4 4231NAME: logfile_rotate
4232TYPE: int
4233DEFAULT: 10
4234LOC: Config.Log.rotateNumber
5473c134 4235DOC_START
41bd17a4 4236 Specifies the number of logfile rotations to make when you
4237 type 'squid -k rotate'. The default is 10, which will rotate
4238 with extensions 0 through 9. Setting logfile_rotate to 0 will
4239 disable the file name rotation, but the logfiles are still closed
4240 and re-opened. This will enable you to rename the logfiles
4241 yourself just before sending the rotate signal.
5473c134 4242
41bd17a4 4243 Note, the 'squid -k rotate' command normally sends a USR1
4244 signal to the running squid process. In certain situations
4245 (e.g. on Linux with Async I/O), USR1 is used for other
4246 purposes, so -k rotate uses another signal. It is best to get
4247 in the habit of using 'squid -k rotate' instead of 'kill -USR1
4248 <pid>'.
62493678 4249
638402dd
AJ
4250 Note, from Squid-3.1 this option is only a default for cache.log,
4251 that log can be rotated separately by using debug_options.
41bd17a4 4252DOC_END
5473c134 4253
41bd17a4 4254NAME: emulate_httpd_log
20efa1c2 4255TYPE: obsolete
41bd17a4 4256DOC_START
20efa1c2 4257 Replace this with an access_log directive using the format 'common' or 'combined'.
5473c134 4258DOC_END
4259
41bd17a4 4260NAME: log_ip_on_direct
8652f8e7 4261TYPE: obsolete
5473c134 4262DOC_START
8652f8e7 4263 Remove this option from your config. To log server or peer names use %<A in the log format.
41bd17a4 4264DOC_END
5473c134 4265
41bd17a4 4266NAME: mime_table
4267TYPE: string
4268DEFAULT: @DEFAULT_MIME_TABLE@
4269LOC: Config.mimeTablePathname
4270DOC_START
638402dd
AJ
4271 Path to Squid's icon configuration file.
4272
4273 You shouldn't need to change this, but the default file contains
4274 examples and formatting information if you do.
5473c134 4275DOC_END
4276
41bd17a4 4277NAME: log_mime_hdrs
4278COMMENT: on|off
4279TYPE: onoff
4280LOC: Config.onoff.log_mime_hdrs
4281DEFAULT: off
4282DOC_START
4283 The Cache can record both the request and the response MIME
4284 headers for each HTTP transaction. The headers are encoded
4285 safely and will appear as two bracketed fields at the end of
4286 the access log (for either the native or httpd-emulated log
4287 formats). To enable this logging set log_mime_hdrs to 'on'.
4288DOC_END
5473c134 4289
41bd17a4 4290NAME: useragent_log
20efa1c2 4291TYPE: obsolete
5473c134 4292DOC_START
20efa1c2 4293 Replace this with an access_log directive using the format 'useragent'.
5473c134 4294DOC_END
4295
41bd17a4 4296NAME: referer_log referrer_log
20efa1c2 4297TYPE: obsolete
5473c134 4298DOC_START
20efa1c2 4299 Replace this with an access_log directive using the format 'referrer'.
5473c134 4300DOC_END
4301
41bd17a4 4302NAME: pid_filename
4303TYPE: string
4304DEFAULT: @DEFAULT_PID_FILE@
4305LOC: Config.pidFilename
5473c134 4306DOC_START
41bd17a4 4307 A filename to write the process-id to. To disable, enter "none".
5473c134 4308DOC_END
4309
41bd17a4 4310NAME: log_fqdn
c581e96b 4311TYPE: obsolete
5473c134 4312DOC_START
c581e96b 4313 Remove this option from your config. To log FQDN use %>A in the log format.
5473c134 4314DOC_END
4315
41bd17a4 4316NAME: client_netmask
4317TYPE: address
4318LOC: Config.Addrs.client_netmask
0eb08770 4319DEFAULT: no_addr
638402dd 4320DEFAULT_DOC: Log full client IP address
5473c134 4321DOC_START
41bd17a4 4322 A netmask for client addresses in logfiles and cachemgr output.
4323 Change this to protect the privacy of your cache clients.
4324 A netmask of 255.255.255.0 will log all IP's in that range with
4325 the last digit set to '0'.
5473c134 4326DOC_END
4327
41bd17a4 4328NAME: forward_log
20efa1c2 4329TYPE: obsolete
5473c134 4330DOC_START
20efa1c2 4331 Use a regular access.log with ACL limiting it to MISS events.
5473c134 4332DOC_END
4333
41bd17a4 4334NAME: strip_query_terms
5473c134 4335TYPE: onoff
41bd17a4 4336LOC: Config.onoff.strip_query_terms
5473c134 4337DEFAULT: on
4338DOC_START
41bd17a4 4339 By default, Squid strips query terms from requested URLs before
638402dd
AJ
4340 logging. This protects your user's privacy and reduces log size.
4341
4342 When investigating HIT/MISS or other caching behaviour you
4343 will need to disable this to see the full URL used by Squid.
5473c134 4344DOC_END
4345
41bd17a4 4346NAME: buffered_logs
4347COMMENT: on|off
4348TYPE: onoff
4349DEFAULT: off
4350LOC: Config.onoff.buffered_logs
5473c134 4351DOC_START
638402dd
AJ
4352 Whether to write/send access_log records ASAP or accumulate them and
4353 then write/send them in larger chunks. Buffering may improve
4354 performance because it decreases the number of I/Os. However,
4355 buffering increases the delay before log records become available to
4356 the final recipient (e.g., a disk file or logging daemon) and,
4357 hence, increases the risk of log records loss.
4358
4359 Note that even when buffered_logs are off, Squid may have to buffer
4360 records if it cannot write/send them immediately due to pending I/Os
4361 (e.g., the I/O writing the previous log record) or connectivity loss.
4362
fb0c2f17 4363 Currently honored by 'daemon' and 'tcp' access_log modules only.
6b698a21 4364DOC_END
0976f8db 4365
2b753521 4366NAME: netdb_filename
4367TYPE: string
221faecb 4368DEFAULT: stdio:@DEFAULT_NETDB_FILE@
2b753521 4369LOC: Config.netdbFilename
fb6a61d1 4370IFDEF: USE_ICMP
2b753521 4371DOC_START
638402dd
AJ
4372 Where Squid stores it's netdb journal.
4373 When enabled this journal preserves netdb state between restarts.
4374
2b753521 4375 To disable, enter "none".
4376DOC_END
4377
62493678
AJ
4378COMMENT_START
4379 OPTIONS FOR TROUBLESHOOTING
4380 -----------------------------------------------------------------------------
4381COMMENT_END
4382
4383NAME: cache_log
4384TYPE: string
62493678
AJ
4385DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@
4386LOC: Debug::cache_log
4387DOC_START
638402dd
AJ
4388 Squid administrative logging file.
4389
4390 This is where general information about Squid behavior goes. You can
4391 increase the amount of data logged to this file and how often it is
4392 rotated with "debug_options"
62493678
AJ
4393DOC_END
4394
4395NAME: debug_options
4396TYPE: eol
47df1aa7 4397DEFAULT: ALL,1
638402dd 4398DEFAULT_DOC: Log all critical and important messages.
62493678
AJ
4399LOC: Debug::debugOptions
4400DOC_START
4401 Logging options are set as section,level where each source file
4402 is assigned a unique section. Lower levels result in less
4403 output, Full debugging (level 9) can result in a very large
4404 log file, so be careful.
4405
4406 The magic word "ALL" sets debugging levels for all sections.
638402dd 4407 The default is to run with "ALL,1" to record important warnings.
62493678 4408
47df1aa7
AJ
4409 The rotate=N option can be used to keep more or less of these logs
4410 than would otherwise be kept by logfile_rotate.
62493678
AJ
4411 For most uses a single log should be enough to monitor current
4412 events affecting Squid.
4413DOC_END
4414
4415NAME: coredump_dir
4416TYPE: string
4417LOC: Config.coredump_dir
62493678 4418DEFAULT_IF_NONE: none
638402dd 4419DEFAULT_DOC: Use the directory from where Squid was started.
62493678
AJ
4420DOC_START
4421 By default Squid leaves core files in the directory from where
4422 it was started. If you set 'coredump_dir' to a directory
4423 that exists, Squid will chdir() to that directory at startup
4424 and coredump files will be left there.
4425
4426NOCOMMENT_START
e0855596 4427
62493678
AJ
4428# Leave coredumps in the first cache dir
4429coredump_dir @DEFAULT_SWAP_DIR@
4430NOCOMMENT_END
4431DOC_END
4432
4433
41bd17a4 4434COMMENT_START
4435 OPTIONS FOR FTP GATEWAYING
4436 -----------------------------------------------------------------------------
4437COMMENT_END
4438
4439NAME: ftp_user
4440TYPE: string
4441DEFAULT: Squid@
4442LOC: Config.Ftp.anon_user
6b698a21 4443DOC_START
41bd17a4 4444 If you want the anonymous login password to be more informative
638402dd 4445 (and enable the use of picky FTP servers), set this to something
41bd17a4 4446 reasonable for your domain, like wwwuser@somewhere.net
7f7db318 4447
41bd17a4 4448 The reason why this is domainless by default is the
4449 request can be made on the behalf of a user in any domain,
4450 depending on how the cache is used.
638402dd 4451 Some FTP server also validate the email address is valid
41bd17a4 4452 (for example perl.com).
6b698a21 4453DOC_END
0976f8db 4454
41bd17a4 4455NAME: ftp_passive
4456TYPE: onoff
4457DEFAULT: on
4458LOC: Config.Ftp.passive
6b698a21 4459DOC_START
41bd17a4 4460 If your firewall does not allow Squid to use passive
4461 connections, turn off this option.
a689bd4e 4462
4463 Use of ftp_epsv_all option requires this to be ON.
4464DOC_END
4465
4466NAME: ftp_epsv_all
4467TYPE: onoff
4468DEFAULT: off
4469LOC: Config.Ftp.epsv_all
4470DOC_START
4471 FTP Protocol extensions permit the use of a special "EPSV ALL" command.
4472
4473 NATs may be able to put the connection on a "fast path" through the
4474 translator, as the EPRT command will never be used and therefore,
4475 translation of the data portion of the segments will never be needed.
4476
b3567eb5
FC
4477 When a client only expects to do two-way FTP transfers this may be
4478 useful.
a689bd4e 4479 If squid finds that it must do a three-way FTP transfer after issuing
4480 an EPSV ALL command, the FTP session will fail.
4481
4482 If you have any doubts about this option do not use it.
4483 Squid will nicely attempt all other connection methods.
4484
51ee534d
AJ
4485 Requires ftp_passive to be ON (default) for any effect.
4486DOC_END
4487
4488NAME: ftp_epsv
4489TYPE: onoff
4490DEFAULT: on
4491LOC: Config.Ftp.epsv
4492DOC_START
4493 FTP Protocol extensions permit the use of a special "EPSV" command.
4494
4495 NATs may be able to put the connection on a "fast path" through the
b3567eb5
FC
4496 translator using EPSV, as the EPRT command will never be used
4497 and therefore, translation of the data portion of the segments
4498 will never be needed.
51ee534d
AJ
4499
4500 Turning this OFF will prevent EPSV being attempted.
4501 WARNING: Doing so will convert Squid back to the old behavior with all
4502 the related problems with external NAT devices/layers.
4503
4504 Requires ftp_passive to be ON (default) for any effect.
41bd17a4 4505DOC_END
9e7dbc51 4506
63ee5443
AJ
4507NAME: ftp_eprt
4508TYPE: onoff
4509DEFAULT: on
4510LOC: Config.Ftp.eprt
4511DOC_START
4512 FTP Protocol extensions permit the use of a special "EPRT" command.
4513
4514 This extension provides a protocol neutral alternative to the
4515 IPv4-only PORT command. When supported it enables active FTP data
4516 channels over IPv6 and efficient NAT handling.
4517
4518 Turning this OFF will prevent EPRT being attempted and will skip
4519 straight to using PORT for IPv4 servers.
4520
4521 Some devices are known to not handle this extension correctly and
4522 may result in crashes. Devices which suport EPRT enough to fail
4523 cleanly will result in Squid attempting PORT anyway. This directive
4524 should only be disabled when EPRT results in device failures.
4525
4526 WARNING: Doing so will convert Squid back to the old behavior with all
4527 the related problems with external NAT devices/layers and IPv4-only FTP.
4528DOC_END
4529
41bd17a4 4530NAME: ftp_sanitycheck
4531TYPE: onoff
4532DEFAULT: on
4533LOC: Config.Ftp.sanitycheck
4534DOC_START
4535 For security and data integrity reasons Squid by default performs
4536 sanity checks of the addresses of FTP data connections ensure the
4537 data connection is to the requested server. If you need to allow
4538 FTP connections to servers using another IP address for the data
4539 connection turn this off.
4540DOC_END
9e7dbc51 4541
41bd17a4 4542NAME: ftp_telnet_protocol
4543TYPE: onoff
4544DEFAULT: on
4545LOC: Config.Ftp.telnet
4546DOC_START
4547 The FTP protocol is officially defined to use the telnet protocol
4548 as transport channel for the control connection. However, many
4549 implementations are broken and does not respect this aspect of
4550 the FTP protocol.
4551
4552 If you have trouble accessing files with ASCII code 255 in the
4553 path or similar problems involving this ASCII code you can
4554 try setting this directive to off. If that helps, report to the
4555 operator of the FTP server in question that their FTP server
4556 is broken and does not follow the FTP standard.
4557DOC_END
4558
4559COMMENT_START
4560 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
4561 -----------------------------------------------------------------------------
4562COMMENT_END
4563
4564NAME: diskd_program
4565TYPE: string
4566DEFAULT: @DEFAULT_DISKD@
4567LOC: Config.Program.diskd
4568DOC_START
4569 Specify the location of the diskd executable.
4570 Note this is only useful if you have compiled in
4571 diskd as one of the store io modules.
4572DOC_END
4573
4574NAME: unlinkd_program
4575IFDEF: USE_UNLINKD
4576TYPE: string
4577DEFAULT: @DEFAULT_UNLINKD@
4578LOC: Config.Program.unlinkd
4579DOC_START
4580 Specify the location of the executable for file deletion process.
4581DOC_END
4582
4583NAME: pinger_program
4584TYPE: string
4585DEFAULT: @DEFAULT_PINGER@
cc192b50 4586LOC: Config.pinger.program
41bd17a4 4587IFDEF: USE_ICMP
4588DOC_START
4589 Specify the location of the executable for the pinger process.
4590DOC_END
4591
cc192b50 4592NAME: pinger_enable
4593TYPE: onoff
4594DEFAULT: on
4595LOC: Config.pinger.enable
4596IFDEF: USE_ICMP
4597DOC_START
4598 Control whether the pinger is active at run-time.
b3567eb5
FC
4599 Enables turning ICMP pinger on and off with a simple
4600 squid -k reconfigure.
cc192b50 4601DOC_END
4602
4603
41bd17a4 4604COMMENT_START
4605 OPTIONS FOR URL REWRITING
4606 -----------------------------------------------------------------------------
4607COMMENT_END
4608
4609NAME: url_rewrite_program redirect_program
4610TYPE: wordlist
4611LOC: Config.Program.redirect
4612DEFAULT: none
4613DOC_START
2c7aad89 4614 Specify the location of the executable URL rewriter to use.
41bd17a4 4615 Since they can perform almost any function there isn't one included.
4616
2c7aad89 4617 For each requested URL, the rewriter will receive on line with the format
41bd17a4 4618
b11724bb 4619 [channel-ID <SP>] URL [<SP> extras]<NL>
5269ec0e 4620
c71adec1 4621
5269ec0e
AJ
4622 After processing the request the helper must reply using the following format:
4623
24eac830 4624 [channel-ID <SP>] result [<SP> kv-pairs]
5269ec0e
AJ
4625
4626 The result code can be:
4627
4628 OK status=30N url="..."
4629 Redirect the URL to the one supplied in 'url='.
4630 'status=' is optional and contains the status code to send
4631 the client in Squids HTTP response. It must be one of the
4632 HTTP redirect status codes: 301, 302, 303, 307, 308.
4633 When no status is given Squid will use 302.
c71adec1 4634
5269ec0e
AJ
4635 OK rewrite-url="..."
4636 Rewrite the URL to the one supplied in 'rewrite-url='.
4637 The new URL is fetched directly by Squid and returned to
4638 the client as the response to its request.
4639
c2cbbb02
AJ
4640 OK
4641 When neither of url= and rewrite-url= are sent Squid does
4642 not change the URL.
4643
5269ec0e
AJ
4644 ERR
4645 Do not change the URL.
4646
4647 BH
4ded749e 4648 An internal error occurred in the helper, preventing
c2cbbb02
AJ
4649 a result being identified. The 'message=' key name is
4650 reserved for delivering a log message.
5269ec0e
AJ
4651
4652
4653 In the future, the interface protocol will be extended with
24eac830 4654 key=value pairs ("kv-pairs" shown above). Helper programs
c71adec1 4655 should be prepared to receive and possibly ignore additional
4656 whitespace-separated tokens on each input line.
41bd17a4 4657
5269ec0e
AJ
4658 When using the concurrency= option the protocol is changed by
4659 introducing a query channel tag in front of the request/response.
4660 The query channel tag is a number between 0 and concurrency-1.
4661 This value must be echoed back unchanged to Squid as the first part
4662 of the response relating to its request.
4663
4664 WARNING: URL re-writing ability should be avoided whenever possible.
4665 Use the URL redirect form of response instead.
41bd17a4 4666
5269ec0e
AJ
4667 Re-write creates a difference in the state held by the client
4668 and server. Possibly causing confusion when the server response
4669 contains snippets of its view state. Embeded URLs, response
4670 and content Location headers, etc. are not re-written by this
4671 interface.
41bd17a4 4672
4673 By default, a URL rewriter is not used.
4674DOC_END
4675
4676NAME: url_rewrite_children redirect_children
48d54e4d 4677TYPE: HelperChildConfig
5b708d95 4678DEFAULT: 20 startup=0 idle=1 concurrency=0
41bd17a4 4679LOC: Config.redirectChildren
4680DOC_START
48d54e4d
AJ
4681 The maximum number of redirector processes to spawn. If you limit
4682 it too few Squid will have to wait for them to process a backlog of
4683 URLs, slowing it down. If you allow too many they will use RAM
4684 and other system resources noticably.
4685
4686 The startup= and idle= options allow some measure of skew in your
4687 tuning.
4688
4689 startup=
4690
4691 Sets a minimum of how many processes are to be spawned when Squid
4692 starts or reconfigures. When set to zero the first request will
4693 cause spawning of the first child process to handle it.
4694
4695 Starting too few will cause an initial slowdown in traffic as Squid
4696 attempts to simultaneously spawn enough processes to cope.
4697
4698 idle=
4699
4700 Sets a minimum of how many processes Squid is to try and keep available
4701 at all times. When traffic begins to rise above what the existing
4702 processes can handle this many more will be spawned up to the maximum
4703 configured. A minimum setting of 1 is required.
4704
4705 concurrency=
41bd17a4 4706
41bd17a4 4707 The number of requests each redirector helper can handle in
4708 parallel. Defaults to 0 which indicates the redirector
4709 is a old-style single threaded redirector.
6a171502
AJ
4710
4711 When this directive is set to a value >= 1 then the protocol
4712 used to communicate with the helper is modified to include
9bef05b1
AJ
4713 an ID in front of the request/response. The ID from the request
4714 must be echoed back with the response to that request.
41bd17a4 4715DOC_END
4716
4717NAME: url_rewrite_host_header redirect_rewrites_host_header
4718TYPE: onoff
4719DEFAULT: on
4720LOC: Config.onoff.redir_rewrites_host
4721DOC_START
3ce33807
AJ
4722 To preserve same-origin security policies in browsers and
4723 prevent Host: header forgery by redirectors Squid rewrites
4724 any Host: header in redirected requests.
4725
4726 If you are running an accelerator this may not be a wanted
4727 effect of a redirector. This directive enables you disable
4728 Host: alteration in reverse-proxy traffic.
4729
41bd17a4 4730 WARNING: Entries are cached on the result of the URL rewriting
4731 process, so be careful if you have domain-virtual hosts.
3ce33807
AJ
4732
4733 WARNING: Squid and other software verifies the URL and Host
4734 are matching, so be careful not to relay through other proxies
4735 or inspecting firewalls with this disabled.
41bd17a4 4736DOC_END
4737
4738NAME: url_rewrite_access redirector_access
4739TYPE: acl_access
4740DEFAULT: none
638402dd 4741DEFAULT_DOC: Allow, unless rules exist in squid.conf.
41bd17a4 4742LOC: Config.accessList.redirector
4743DOC_START
4744 If defined, this access list specifies which requests are
638402dd 4745 sent to the redirector processes.
b3567eb5
FC
4746
4747 This clause supports both fast and slow acl types.
4748 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 4749DOC_END
4750
4751NAME: url_rewrite_bypass redirector_bypass
4752TYPE: onoff
4753LOC: Config.onoff.redirector_bypass
4754DEFAULT: off
4755DOC_START
4756 When this is 'on', a request will not go through the
638402dd 4757 redirector if all the helpers are busy. If this is 'off'
41bd17a4 4758 and the redirector queue grows too large, Squid will exit
4759 with a FATAL error and ask you to increase the number of
4760 redirectors. You should only enable this if the redirectors
4761 are not critical to your caching system. If you use
4762 redirectors for access control, and you enable this option,
4763 users may have access to pages they should not
4764 be allowed to request.
4765DOC_END
4766
fe7966ec 4767NAME: url_rewrite_extras
b11724bb
CT
4768TYPE: TokenOrQuotedString
4769LOC: Config.redirector_extras
4770DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
4771DOC_START
4772 Specifies a string to be append to request line format for the
4773 rewriter helper. "Quoted" format values may contain spaces and
4774 logformat %macros. In theory, any logformat %macro can be used.
4775 In practice, a %macro expands as a dash (-) if the helper request is
4776 sent before the required macro information is available to Squid.
4777DOC_END
4778
a8a0b1c2
EC
4779COMMENT_START
4780 OPTIONS FOR STORE ID
4781 -----------------------------------------------------------------------------
4782COMMENT_END
4783
4784NAME: store_id_program storeurl_rewrite_program
4785TYPE: wordlist
4786LOC: Config.Program.store_id
4787DEFAULT: none
4788DOC_START
4789 Specify the location of the executable StoreID helper to use.
4790 Since they can perform almost any function there isn't one included.
4791
4792 For each requested URL, the helper will receive one line with the format
4793
b11724bb 4794 [channel-ID <SP>] URL [<SP> extras]<NL>
a8a0b1c2
EC
4795
4796
4797 After processing the request the helper must reply using the following format:
4798
4799 [channel-ID <SP>] result [<SP> kv-pairs]
4800
4801 The result code can be:
4802
4803 OK store-id="..."
4804 Use the StoreID supplied in 'store-id='.
4805
4806 ERR
4807 The default is to use HTTP request URL as the store ID.
4808
4809 BH
4810 An internal error occured in the helper, preventing
4811 a result being identified.
4812
4813
b11724bb
CT
4814 Helper programs should be prepared to receive and possibly ignore
4815 additional whitespace-separated tokens on each input line.
a8a0b1c2
EC
4816
4817 When using the concurrency= option the protocol is changed by
4818 introducing a query channel tag in front of the request/response.
4819 The query channel tag is a number between 0 and concurrency-1.
4820 This value must be echoed back unchanged to Squid as the first part
4821 of the response relating to its request.
4822
4823 NOTE: when using StoreID refresh_pattern will apply to the StoreID
4824 returned from the helper and not the URL.
4825
4826 WARNING: Wrong StoreID value returned by a careless helper may result
4827 in the wrong cached response returned to the user.
4828
4829 By default, a StoreID helper is not used.
4830DOC_END
4831
fe7966ec 4832NAME: store_id_extras
b11724bb
CT
4833TYPE: TokenOrQuotedString
4834LOC: Config.storeId_extras
4835DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
4836DOC_START
4837 Specifies a string to be append to request line format for the
4838 StoreId helper. "Quoted" format values may contain spaces and
4839 logformat %macros. In theory, any logformat %macro can be used.
4840 In practice, a %macro expands as a dash (-) if the helper request is
4841 sent before the required macro information is available to Squid.
4842DOC_END
4843
a8a0b1c2
EC
4844NAME: store_id_children storeurl_rewrite_children
4845TYPE: HelperChildConfig
4846DEFAULT: 20 startup=0 idle=1 concurrency=0
4847LOC: Config.storeIdChildren
4848DOC_START
4849 The maximum number of StoreID helper processes to spawn. If you limit
4850 it too few Squid will have to wait for them to process a backlog of
4851 requests, slowing it down. If you allow too many they will use RAM
4852 and other system resources noticably.
4853
4854 The startup= and idle= options allow some measure of skew in your
4855 tuning.
4856
4857 startup=
4858
4859 Sets a minimum of how many processes are to be spawned when Squid
4860 starts or reconfigures. When set to zero the first request will
4861 cause spawning of the first child process to handle it.
4862
4863 Starting too few will cause an initial slowdown in traffic as Squid
4864 attempts to simultaneously spawn enough processes to cope.
4865
4866 idle=
4867
4868 Sets a minimum of how many processes Squid is to try and keep available
4869 at all times. When traffic begins to rise above what the existing
4870 processes can handle this many more will be spawned up to the maximum
4871 configured. A minimum setting of 1 is required.
4872
4873 concurrency=
4874
4875 The number of requests each storeID helper can handle in
4876 parallel. Defaults to 0 which indicates the helper
4877 is a old-style single threaded program.
4878
4879 When this directive is set to a value >= 1 then the protocol
4880 used to communicate with the helper is modified to include
4881 an ID in front of the request/response. The ID from the request
4882 must be echoed back with the response to that request.
4883DOC_END
4884
4885NAME: store_id_access storeurl_rewrite_access
4886TYPE: acl_access
4887DEFAULT: none
638402dd 4888DEFAULT_DOC: Allow, unless rules exist in squid.conf.
a8a0b1c2
EC
4889LOC: Config.accessList.store_id
4890DOC_START
4891 If defined, this access list specifies which requests are
4892 sent to the StoreID processes. By default all requests
4893 are sent.
4894
4895 This clause supports both fast and slow acl types.
4896 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4897DOC_END
4898
4899NAME: store_id_bypass storeurl_rewrite_bypass
4900TYPE: onoff
4901LOC: Config.onoff.store_id_bypass
4902DEFAULT: on
4903DOC_START
4904 When this is 'on', a request will not go through the
4905 helper if all helpers are busy. If this is 'off'
4906 and the helper queue grows too large, Squid will exit
4907 with a FATAL error and ask you to increase the number of
4908 helpers. You should only enable this if the helperss
4909 are not critical to your caching system. If you use
4910 helpers for critical caching components, and you enable this
4911 option, users may not get objects from cache.
4912DOC_END
4913
41bd17a4 4914COMMENT_START
4915 OPTIONS FOR TUNING THE CACHE
4916 -----------------------------------------------------------------------------
4917COMMENT_END
4918
f04b37d8 4919NAME: cache no_cache
4920TYPE: acl_access
4921DEFAULT: none
70706149 4922DEFAULT_DOC: By default, this directive is unused and has no effect.
f04b37d8 4923LOC: Config.accessList.noCache
41bd17a4 4924DOC_START
70706149
AR
4925 Requests denied by this directive will not be served from the cache
4926 and their responses will not be stored in the cache. This directive
4927 has no effect on other transactions and on already cached responses.
f04b37d8 4928
b3567eb5
FC
4929 This clause supports both fast and slow acl types.
4930 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
70706149
AR
4931
4932 This and the two other similar caching directives listed below are
4933 checked at different transaction processing stages, have different
4934 access to response information, affect different cache operations,
4935 and differ in slow ACLs support:
4936
4937 * cache: Checked before Squid makes a hit/miss determination.
4938 No access to reply information!
4939 Denies both serving a hit and storing a miss.
4940 Supports both fast and slow ACLs.
4941 * send_hit: Checked after a hit was detected.
4942 Has access to reply (hit) information.
4943 Denies serving a hit only.
4944 Supports fast ACLs only.
4945 * store_miss: Checked before storing a cachable miss.
4946 Has access to reply (miss) information.
4947 Denies storing a miss only.
4948 Supports fast ACLs only.
4949
4950 If you are not sure which of the three directives to use, apply the
4951 following decision logic:
4952
4953 * If your ACL(s) are of slow type _and_ need response info, redesign.
4954 Squid does not support that particular combination at this time.
4955 Otherwise:
4956 * If your directive ACL(s) are of slow type, use "cache"; and/or
4957 * if your directive ACL(s) need no response info, use "cache".
4958 Otherwise:
4959 * If you do not want the response cached, use store_miss; and/or
4960 * if you do not want a hit on a cached response, use send_hit.
4961DOC_END
4962
4963NAME: send_hit
4964TYPE: acl_access
4965DEFAULT: none
4966DEFAULT_DOC: By default, this directive is unused and has no effect.
4967LOC: Config.accessList.sendHit
4968DOC_START
4969 Responses denied by this directive will not be served from the cache
4970 (but may still be cached, see store_miss). This directive has no
4971 effect on the responses it allows and on the cached objects.
4972
4973 Please see the "cache" directive for a summary of differences among
4974 store_miss, send_hit, and cache directives.
4975
4976 Unlike the "cache" directive, send_hit only supports fast acl
4977 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4978
4979 For example:
4980
4981 # apply custom Store ID mapping to some URLs
4982 acl MapMe dstdomain .c.example.com
4983 store_id_program ...
4984 store_id_access allow MapMe
4985
4986 # but prevent caching of special responses
4987 # such as 302 redirects that cause StoreID loops
4988 acl Ordinary http_status 200-299
4989 store_miss deny MapMe !Ordinary
4990
4991 # and do not serve any previously stored special responses
4992 # from the cache (in case they were already cached before
4993 # the above store_miss rule was in effect).
4994 send_hit deny MapMe !Ordinary
4995DOC_END
4996
4997NAME: store_miss
4998TYPE: acl_access
4999DEFAULT: none
5000DEFAULT_DOC: By default, this directive is unused and has no effect.
5001LOC: Config.accessList.storeMiss
5002DOC_START
5003 Responses denied by this directive will not be cached (but may still
5004 be served from the cache, see send_hit). This directive has no
5005 effect on the responses it allows and on the already cached responses.
5006
5007 Please see the "cache" directive for a summary of differences among
5008 store_miss, send_hit, and cache directives. See the
5009 send_hit directive for a usage example.
5010
5011 Unlike the "cache" directive, store_miss only supports fast acl
5012 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 5013DOC_END
5014
570d3f75
AJ
5015NAME: max_stale
5016COMMENT: time-units
5017TYPE: time_t
5018LOC: Config.maxStale
5019DEFAULT: 1 week
5020DOC_START
5021 This option puts an upper limit on how stale content Squid
5022 will serve from the cache if cache validation fails.
5023 Can be overriden by the refresh_pattern max-stale option.
5024DOC_END
5025
41bd17a4 5026NAME: refresh_pattern
5027TYPE: refreshpattern
5028LOC: Config.Refresh
5029DEFAULT: none
5030DOC_START
5031 usage: refresh_pattern [-i] regex min percent max [options]
9e7dbc51 5032
6b698a21 5033 By default, regular expressions are CASE-SENSITIVE. To make
5034 them case-insensitive, use the -i option.
9e7dbc51 5035
41bd17a4 5036 'Min' is the time (in minutes) an object without an explicit
5037 expiry time should be considered fresh. The recommended
5038 value is 0, any higher values may cause dynamic applications
5039 to be erroneously cached unless the application designer
5040 has taken the appropriate actions.
9e7dbc51 5041
41bd17a4 5042 'Percent' is a percentage of the objects age (time since last
5043 modification age) an object without explicit expiry time
5044 will be considered fresh.
5b807763 5045
41bd17a4 5046 'Max' is an upper limit on how long objects without an explicit
5047 expiry time will be considered fresh.
9e7dbc51 5048
41bd17a4 5049 options: override-expire
5050 override-lastmod
5051 reload-into-ims
5052 ignore-reload
41bd17a4 5053 ignore-no-store
4ca08219 5054 ignore-must-revalidate
41bd17a4 5055 ignore-private
5056 ignore-auth
570d3f75 5057 max-stale=NN
41bd17a4 5058 refresh-ims
3d8b6ba4 5059 store-stale
a0ec9f68 5060
41bd17a4 5061 override-expire enforces min age even if the server
9b2ad080
HN
5062 sent an explicit expiry time (e.g., with the
5063 Expires: header or Cache-Control: max-age). Doing this
5064 VIOLATES the HTTP standard. Enabling this feature
5065 could make you liable for problems which it causes.
6468fe10 5066
04925576
AJ
5067 Note: override-expire does not enforce staleness - it only extends
5068 freshness / min. If the server returns a Expires time which
5069 is longer than your max time, Squid will still consider
5070 the object fresh for that period of time.
5071
41bd17a4 5072 override-lastmod enforces min age even on objects
5073 that were modified recently.
934b03fc 5074
46017fdd
CT
5075 reload-into-ims changes a client no-cache or ``reload''
5076 request for a cached entry into a conditional request using
5077 If-Modified-Since and/or If-None-Match headers, provided the
5078 cached entry has a Last-Modified and/or a strong ETag header.
5079 Doing this VIOLATES the HTTP standard. Enabling this feature
5080 could make you liable for problems which it causes.
dba79ac5 5081
41bd17a4 5082 ignore-reload ignores a client no-cache or ``reload''
5083 header. Doing this VIOLATES the HTTP standard. Enabling
5084 this feature could make you liable for problems which
5085 it causes.
9bc73deb 5086
41bd17a4 5087 ignore-no-store ignores any ``Cache-control: no-store''
5088 headers received from a server. Doing this VIOLATES
5089 the HTTP standard. Enabling this feature could make you
5090 liable for problems which it causes.
5091
4ca08219
AJ
5092 ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
5093 headers received from a server. Doing this VIOLATES
5094 the HTTP standard. Enabling this feature could make you
5095 liable for problems which it causes.
5096
41bd17a4 5097 ignore-private ignores any ``Cache-control: private''
5098 headers received from a server. Doing this VIOLATES
5099 the HTTP standard. Enabling this feature could make you
5100 liable for problems which it causes.
5101
5102 ignore-auth caches responses to requests with authorization,
5103 as if the originserver had sent ``Cache-control: public''
5104 in the response header. Doing this VIOLATES the HTTP standard.
5105 Enabling this feature could make you liable for problems which
5106 it causes.
5107
5108 refresh-ims causes squid to contact the origin server
5109 when a client issues an If-Modified-Since request. This
5110 ensures that the client will receive an updated version
5111 if one is available.
5112
3d8b6ba4
AJ
5113 store-stale stores responses even if they don't have explicit
5114 freshness or a validator (i.e., Last-Modified or an ETag)
5115 present, or if they're already stale. By default, Squid will
5116 not cache such responses because they usually can't be
5117 reused. Note that such responses will be stale by default.
5118
570d3f75
AJ
5119 max-stale=NN provide a maximum staleness factor. Squid won't
5120 serve objects more stale than this even if it failed to
5121 validate the object. Default: use the max_stale global limit.
5122
41bd17a4 5123 Basically a cached object is:
5124
5125 FRESH if expires < now, else STALE
5126 STALE if age > max
5127 FRESH if lm-factor < percent, else STALE
5128 FRESH if age < min
5129 else STALE
5130
5131 The refresh_pattern lines are checked in the order listed here.
5132 The first entry which matches is used. If none of the entries
5133 match the default will be used.
5134
5135 Note, you must uncomment all the default lines if you want
5136 to change one. The default setting is only active if none is
5137 used.
5138
41bd17a4 5139NOCOMMENT_START
e0855596 5140
638402dd 5141#
e0855596 5142# Add any of your own refresh_pattern entries above these.
638402dd 5143#
41bd17a4 5144refresh_pattern ^ftp: 1440 20% 10080
5145refresh_pattern ^gopher: 1440 0% 1440
89db45fa 5146refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
41bd17a4 5147refresh_pattern . 0 20% 4320
5148NOCOMMENT_END
5149DOC_END
5150
5151NAME: quick_abort_min
5152COMMENT: (KB)
5153TYPE: kb_int64_t
5154DEFAULT: 16 KB
5155LOC: Config.quickAbort.min
5156DOC_NONE
5157
5158NAME: quick_abort_max
5159COMMENT: (KB)
5160TYPE: kb_int64_t
5161DEFAULT: 16 KB
5162LOC: Config.quickAbort.max
5163DOC_NONE
5164
5165NAME: quick_abort_pct
5166COMMENT: (percent)
5167TYPE: int
5168DEFAULT: 95
5169LOC: Config.quickAbort.pct
5170DOC_START
5171 The cache by default continues downloading aborted requests
5172 which are almost completed (less than 16 KB remaining). This
5173 may be undesirable on slow (e.g. SLIP) links and/or very busy
5174 caches. Impatient users may tie up file descriptors and
5175 bandwidth by repeatedly requesting and immediately aborting
5176 downloads.
5177
5178 When the user aborts a request, Squid will check the
5179 quick_abort values to the amount of data transfered until
5180 then.
5181
5182 If the transfer has less than 'quick_abort_min' KB remaining,
5183 it will finish the retrieval.
5184
5185 If the transfer has more than 'quick_abort_max' KB remaining,
5186 it will abort the retrieval.
5187
5188 If more than 'quick_abort_pct' of the transfer has completed,
5189 it will finish the retrieval.
5190
5191 If you do not want any retrieval to continue after the client
5192 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
5193 to '0 KB'.
5194
5195 If you want retrievals to always continue if they are being
5196 cached set 'quick_abort_min' to '-1 KB'.
5197DOC_END
60d096f4 5198
41bd17a4 5199NAME: read_ahead_gap
5200COMMENT: buffer-size
5201TYPE: b_int64_t
5202LOC: Config.readAheadGap
5203DEFAULT: 16 KB
5204DOC_START
5205 The amount of data the cache will buffer ahead of what has been
5206 sent to the client when retrieving an object from another server.
5207DOC_END
53e738c6 5208
41bd17a4 5209NAME: negative_ttl
626096be 5210IFDEF: USE_HTTP_VIOLATIONS
41bd17a4 5211COMMENT: time-units
5212TYPE: time_t
5213LOC: Config.negativeTtl
ac9cc053 5214DEFAULT: 0 seconds
41bd17a4 5215DOC_START
ac9cc053
AJ
5216 Set the Default Time-to-Live (TTL) for failed requests.
5217 Certain types of failures (such as "connection refused" and
5218 "404 Not Found") are able to be negatively-cached for a short time.
5219 Modern web servers should provide Expires: header, however if they
5220 do not this can provide a minimum TTL.
5221 The default is not to cache errors with unknown expiry details.
5222
5223 Note that this is different from negative caching of DNS lookups.
39956c7c
AJ
5224
5225 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5226 this feature could make you liable for problems which it
5227 causes.
41bd17a4 5228DOC_END
53e738c6 5229
41bd17a4 5230NAME: positive_dns_ttl
5231COMMENT: time-units
5232TYPE: time_t
5233LOC: Config.positiveDnsTtl
5234DEFAULT: 6 hours
5235DOC_START
5236 Upper limit on how long Squid will cache positive DNS responses.
5237 Default is 6 hours (360 minutes). This directive must be set
5238 larger than negative_dns_ttl.
5239DOC_END
c4ab8329 5240
41bd17a4 5241NAME: negative_dns_ttl
5242COMMENT: time-units
5243TYPE: time_t
5244LOC: Config.negativeDnsTtl
5245DEFAULT: 1 minutes
5246DOC_START
5247 Time-to-Live (TTL) for negative caching of failed DNS lookups.
5248 This also sets the lower cache limit on positive lookups.
5249 Minimum value is 1 second, and it is not recommendable to go
5250 much below 10 seconds.
5251DOC_END
7df0bfd7 5252
41bd17a4 5253NAME: range_offset_limit
11e3fa1c
AJ
5254COMMENT: size [acl acl...]
5255TYPE: acl_b_size_t
41bd17a4 5256LOC: Config.rangeOffsetLimit
11e3fa1c 5257DEFAULT: none
41bd17a4 5258DOC_START
11e3fa1c
AJ
5259 usage: (size) [units] [[!]aclname]
5260
5261 Sets an upper limit on how far (number of bytes) into the file
5262 a Range request may be to cause Squid to prefetch the whole file.
5263 If beyond this limit, Squid forwards the Range request as it is and
5264 the result is NOT cached.
5265
41bd17a4 5266 This is to stop a far ahead range request (lets say start at 17MB)
5267 from making Squid fetch the whole object up to that point before
5268 sending anything to the client.
11e3fa1c
AJ
5269
5270 Multiple range_offset_limit lines may be specified, and they will
5271 be searched from top to bottom on each request until a match is found.
5272 The first match found will be used. If no line matches a request, the
5273 default limit of 0 bytes will be used.
5274
5275 'size' is the limit specified as a number of units.
5276
5277 'units' specifies whether to use bytes, KB, MB, etc.
5278 If no units are specified bytes are assumed.
5279
5280 A size of 0 causes Squid to never fetch more than the
ab275c7b 5281 client requested. (default)
11e3fa1c
AJ
5282
5283 A size of 'none' causes Squid to always fetch the object from the
41bd17a4 5284 beginning so it may cache the result. (2.0 style)
11e3fa1c
AJ
5285
5286 'aclname' is the name of a defined ACL.
5287
5288 NP: Using 'none' as the byte value here will override any quick_abort settings
5289 that may otherwise apply to the range request. The range request will
ab275c7b
AJ
5290 be fully fetched from start to finish regardless of the client
5291 actions. This affects bandwidth usage.
41bd17a4 5292DOC_END
d95b862f 5293
41bd17a4 5294NAME: minimum_expiry_time
5295COMMENT: (seconds)
5296TYPE: time_t
5297LOC: Config.minimum_expiry_time
5298DEFAULT: 60 seconds
5299DOC_START
5300 The minimum caching time according to (Expires - Date)
638402dd
AJ
5301 headers Squid honors if the object can't be revalidated.
5302 The default is 60 seconds.
5303
5304 In reverse proxy environments it might be desirable to honor
5305 shorter object lifetimes. It is most likely better to make
5306 your server return a meaningful Last-Modified header however.
5307
5308 In ESI environments where page fragments often have short
5309 lifetimes, this will often be best set to 0.
41bd17a4 5310DOC_END
c68e9c6b 5311
41bd17a4 5312NAME: store_avg_object_size
58d5c5dd
DK
5313COMMENT: (bytes)
5314TYPE: b_int64_t
41bd17a4 5315DEFAULT: 13 KB
5316LOC: Config.Store.avgObjectSize
5317DOC_START
5318 Average object size, used to estimate number of objects your
5319 cache can hold. The default is 13 KB.
638402dd
AJ
5320
5321 This is used to pre-seed the cache index memory allocation to
5322 reduce expensive reallocate operations while handling clients
5323 traffic. Too-large values may result in memory allocation during
5324 peak traffic, too-small values will result in wasted memory.
5325
5326 Check the cache manager 'info' report metrics for the real
5327 object sizes seen by your Squid before tuning this.
cccac0a2 5328DOC_END
5329
41bd17a4 5330NAME: store_objects_per_bucket
5331TYPE: int
5332DEFAULT: 20
5333LOC: Config.Store.objectsPerBucket
5334DOC_START
5335 Target number of objects per bucket in the store hash table.
5336 Lowering this value increases the total number of buckets and
5337 also the storage maintenance rate. The default is 20.
5338DOC_END
5339
5340COMMENT_START
5341 HTTP OPTIONS
5342 -----------------------------------------------------------------------------
5343COMMENT_END
5344
f04b37d8 5345NAME: request_header_max_size
5346COMMENT: (KB)
5347TYPE: b_size_t
df2eec10 5348DEFAULT: 64 KB
f04b37d8 5349LOC: Config.maxRequestHeaderSize
5350DOC_START
5351 This specifies the maximum size for HTTP headers in a request.
5352 Request headers are usually relatively small (about 512 bytes).
5353 Placing a limit on the request header size will catch certain
5354 bugs (for example with persistent connections) and possibly
5355 buffer-overflow or denial-of-service attacks.
5356DOC_END
5357
5358NAME: reply_header_max_size
5359COMMENT: (KB)
5360TYPE: b_size_t
df2eec10 5361DEFAULT: 64 KB
f04b37d8 5362LOC: Config.maxReplyHeaderSize
5363DOC_START
5364 This specifies the maximum size for HTTP headers in a reply.
5365 Reply headers are usually relatively small (about 512 bytes).
5366 Placing a limit on the reply header size will catch certain
5367 bugs (for example with persistent connections) and possibly
5368 buffer-overflow or denial-of-service attacks.
5369DOC_END
5370
5371NAME: request_body_max_size
5372COMMENT: (bytes)
5373TYPE: b_int64_t
5374DEFAULT: 0 KB
638402dd 5375DEFAULT_DOC: No limit.
f04b37d8 5376LOC: Config.maxRequestBodySize
5377DOC_START
5378 This specifies the maximum size for an HTTP request body.
5379 In other words, the maximum size of a PUT/POST request.
5380 A user who attempts to send a request with a body larger
5381 than this limit receives an "Invalid Request" error message.
5382 If you set this parameter to a zero (the default), there will
5383 be no limit imposed.
638402dd
AJ
5384
5385 See also client_request_buffer_max_size for an alternative
5386 limitation on client uploads which can be configured.
f04b37d8 5387DOC_END
5388
1368d115
CT
5389NAME: client_request_buffer_max_size
5390COMMENT: (bytes)
5391TYPE: b_size_t
5392DEFAULT: 512 KB
5393LOC: Config.maxRequestBufferSize
5394DOC_START
5395 This specifies the maximum buffer size of a client request.
5396 It prevents squid eating too much memory when somebody uploads
5397 a large file.
5398DOC_END
5399
3ff65596
AR
5400NAME: chunked_request_body_max_size
5401COMMENT: (bytes)
5402TYPE: b_int64_t
5403DEFAULT: 64 KB
5404LOC: Config.maxChunkedRequestBodySize
5405DOC_START
5406 A broken or confused HTTP/1.1 client may send a chunked HTTP
5407 request to Squid. Squid does not have full support for that
5408 feature yet. To cope with such requests, Squid buffers the
5409 entire request and then dechunks request body to create a
5410 plain HTTP/1.0 request with a known content length. The plain
5411 request is then used by the rest of Squid code as usual.
5412
5413 The option value specifies the maximum size of the buffer used
5414 to hold the request before the conversion. If the chunked
5415 request size exceeds the specified limit, the conversion
5416 fails, and the client receives an "unsupported request" error,
5417 as if dechunking was disabled.
5418
5419 Dechunking is enabled by default. To disable conversion of
5420 chunked requests, set the maximum to zero.
5421
5422 Request dechunking feature and this option in particular are a
5423 temporary hack. When chunking requests and responses are fully
5424 supported, there will be no need to buffer a chunked request.
5425DOC_END
5426
41bd17a4 5427NAME: broken_posts
626096be 5428IFDEF: USE_HTTP_VIOLATIONS
cccac0a2 5429TYPE: acl_access
cccac0a2 5430DEFAULT: none
638402dd 5431DEFAULT_DOC: Obey RFC 2616.
41bd17a4 5432LOC: Config.accessList.brokenPosts
cccac0a2 5433DOC_START
41bd17a4 5434 A list of ACL elements which, if matched, causes Squid to send
5435 an extra CRLF pair after the body of a PUT/POST request.
cccac0a2 5436
41bd17a4 5437 Some HTTP servers has broken implementations of PUT/POST,
5438 and rely on an extra CRLF pair sent by some WWW clients.
cccac0a2 5439
41bd17a4 5440 Quote from RFC2616 section 4.1 on this matter:
cccac0a2 5441
41bd17a4 5442 Note: certain buggy HTTP/1.0 client implementations generate an
5443 extra CRLF's after a POST request. To restate what is explicitly
5444 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
5445 a request with an extra CRLF.
cccac0a2 5446
b3567eb5
FC
5447 This clause only supports fast acl types.
5448 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5449
41bd17a4 5450Example:
5451 acl buggy_server url_regex ^http://....
5452 broken_posts allow buggy_server
5453DOC_END
cccac0a2 5454
22fff3bf 5455NAME: adaptation_uses_indirect_client icap_uses_indirect_client
57d76dd4
AJ
5456COMMENT: on|off
5457TYPE: onoff
22fff3bf 5458IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
57d76dd4 5459DEFAULT: on
22fff3bf 5460LOC: Adaptation::Config::use_indirect_client
57d76dd4 5461DOC_START
ea3ae478
AR
5462 Controls whether the indirect client IP address (instead of the direct
5463 client IP address) is passed to adaptation services.
5464
5465 See also: follow_x_forwarded_for adaptation_send_client_ip
57d76dd4
AJ
5466DOC_END
5467
41bd17a4 5468NAME: via
626096be 5469IFDEF: USE_HTTP_VIOLATIONS
41bd17a4 5470COMMENT: on|off
5471TYPE: onoff
5472DEFAULT: on
5473LOC: Config.onoff.via
5474DOC_START
5475 If set (default), Squid will include a Via header in requests and
5476 replies as required by RFC2616.
5477DOC_END
4cc6eb12 5478
41bd17a4 5479NAME: ie_refresh
5480COMMENT: on|off
5481TYPE: onoff
5482LOC: Config.onoff.ie_refresh
5483DEFAULT: off
5484DOC_START
5485 Microsoft Internet Explorer up until version 5.5 Service
5486 Pack 1 has an issue with transparent proxies, wherein it
5487 is impossible to force a refresh. Turning this on provides
5488 a partial fix to the problem, by causing all IMS-REFRESH
5489 requests from older IE versions to check the origin server
5490 for fresh content. This reduces hit ratio by some amount
5491 (~10% in my experience), but allows users to actually get
5492 fresh content when they want it. Note because Squid
5493 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
5494 of 5.5 is unchanged from old versions of Squid (i.e. a
5495 forced refresh is impossible). Newer versions of IE will,
5496 hopefully, continue to have the new behavior and will be
5497 handled based on that assumption. This option defaults to
5498 the old Squid behavior, which is better for hit ratios but
5499 worse for clients using IE, if they need to be able to
5500 force fresh content.
5501DOC_END
b9d7fe3e 5502
41bd17a4 5503NAME: vary_ignore_expire
5504COMMENT: on|off
5505TYPE: onoff
5506LOC: Config.onoff.vary_ignore_expire
5507DEFAULT: off
5508DOC_START
5509 Many HTTP servers supporting Vary gives such objects
5510 immediate expiry time with no cache-control header
5511 when requested by a HTTP/1.0 client. This option
5512 enables Squid to ignore such expiry times until
5513 HTTP/1.1 is fully implemented.
7e73cd78
AJ
5514
5515 WARNING: If turned on this may eventually cause some
5516 varying objects not intended for caching to get cached.
cccac0a2 5517DOC_END
c4ab8329 5518
41bd17a4 5519NAME: request_entities
5520TYPE: onoff
5521LOC: Config.onoff.request_entities
5522DEFAULT: off
5523DOC_START
5524 Squid defaults to deny GET and HEAD requests with request entities,
5525 as the meaning of such requests are undefined in the HTTP standard
5526 even if not explicitly forbidden.
0976f8db 5527
41bd17a4 5528 Set this directive to on if you have clients which insists
5529 on sending request entities in GET or HEAD requests. But be warned
5530 that there is server software (both proxies and web servers) which
5531 can fail to properly process this kind of request which may make you
5532 vulnerable to cache pollution attacks if enabled.
cccac0a2 5533DOC_END
6b53c392 5534
41bd17a4 5535NAME: request_header_access
626096be 5536IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5537TYPE: http_header_access
41bd17a4 5538LOC: Config.request_header_access
cccac0a2 5539DEFAULT: none
638402dd 5540DEFAULT_DOC: No limits.
cccac0a2 5541DOC_START
41bd17a4 5542 Usage: request_header_access header_name allow|deny [!]aclname ...
0976f8db 5543
41bd17a4 5544 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5545 this feature could make you liable for problems which it
5546 causes.
0976f8db 5547
41bd17a4 5548 This option replaces the old 'anonymize_headers' and the
5549 older 'http_anonymizer' option with something that is much
3b07476b
CT
5550 more configurable. A list of ACLs for each header name allows
5551 removal of specific header fields under specific conditions.
5552
5553 This option only applies to outgoing HTTP request headers (i.e.,
5554 headers sent by Squid to the next HTTP hop such as a cache peer
5555 or an origin server). The option has no effect during cache hit
5556 detection. The equivalent adaptation vectoring point in ICAP
5557 terminology is post-cache REQMOD.
5558
5559 The option is applied to individual outgoing request header
5560 fields. For each request header field F, Squid uses the first
5561 qualifying sets of request_header_access rules:
5562
5563 1. Rules with header_name equal to F's name.
5564 2. Rules with header_name 'Other', provided F's name is not
5565 on the hard-coded list of commonly used HTTP header names.
5566 3. Rules with header_name 'All'.
5567
5568 Within that qualifying rule set, rule ACLs are checked as usual.
5569 If ACLs of an "allow" rule match, the header field is allowed to
5570 go through as is. If ACLs of a "deny" rule match, the header is
5571 removed and request_header_replace is then checked to identify
5572 if the removed header has a replacement. If no rules within the
5573 set have matching ACLs, the header field is left as is.
5401aa8d 5574
41bd17a4 5575 For example, to achieve the same behavior as the old
5576 'http_anonymizer standard' option, you should use:
5401aa8d 5577
41bd17a4 5578 request_header_access From deny all
5579 request_header_access Referer deny all
41bd17a4 5580 request_header_access User-Agent deny all
5401aa8d 5581
41bd17a4 5582 Or, to reproduce the old 'http_anonymizer paranoid' feature
5583 you should use:
5401aa8d 5584
41bd17a4 5585 request_header_access Authorization allow all
41bd17a4 5586 request_header_access Proxy-Authorization allow all
41bd17a4 5587 request_header_access Cache-Control allow all
41bd17a4 5588 request_header_access Content-Length allow all
5589 request_header_access Content-Type allow all
5590 request_header_access Date allow all
41bd17a4 5591 request_header_access Host allow all
5592 request_header_access If-Modified-Since allow all
41bd17a4 5593 request_header_access Pragma allow all
5594 request_header_access Accept allow all
5595 request_header_access Accept-Charset allow all
5596 request_header_access Accept-Encoding allow all
5597 request_header_access Accept-Language allow all
41bd17a4 5598 request_header_access Connection allow all
41bd17a4 5599 request_header_access All deny all
5401aa8d 5600
638402dd 5601 HTTP reply headers are controlled with the reply_header_access directive.
5401aa8d 5602
638402dd 5603 By default, all headers are allowed (no anonymizing is performed).
5401aa8d 5604DOC_END
5605
41bd17a4 5606NAME: reply_header_access
626096be 5607IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5608TYPE: http_header_access
41bd17a4 5609LOC: Config.reply_header_access
cccac0a2 5610DEFAULT: none
638402dd 5611DEFAULT_DOC: No limits.
cccac0a2 5612DOC_START
41bd17a4 5613 Usage: reply_header_access header_name allow|deny [!]aclname ...
934b03fc 5614
41bd17a4 5615 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5616 this feature could make you liable for problems which it
5617 causes.
934b03fc 5618
41bd17a4 5619 This option only applies to reply headers, i.e., from the
5620 server to the client.
934b03fc 5621
41bd17a4 5622 This is the same as request_header_access, but in the other
3b07476b
CT
5623 direction. Please see request_header_access for detailed
5624 documentation.
cccac0a2 5625
41bd17a4 5626 For example, to achieve the same behavior as the old
5627 'http_anonymizer standard' option, you should use:
cccac0a2 5628
41bd17a4 5629 reply_header_access Server deny all
41bd17a4 5630 reply_header_access WWW-Authenticate deny all
5631 reply_header_access Link deny all
cccac0a2 5632
41bd17a4 5633 Or, to reproduce the old 'http_anonymizer paranoid' feature
5634 you should use:
cccac0a2 5635
41bd17a4 5636 reply_header_access Allow allow all
41bd17a4 5637 reply_header_access WWW-Authenticate allow all
41bd17a4 5638 reply_header_access Proxy-Authenticate allow all
5639 reply_header_access Cache-Control allow all
5640 reply_header_access Content-Encoding allow all
5641 reply_header_access Content-Length allow all
5642 reply_header_access Content-Type allow all
5643 reply_header_access Date allow all
5644 reply_header_access Expires allow all
41bd17a4 5645 reply_header_access Last-Modified allow all
5646 reply_header_access Location allow all
5647 reply_header_access Pragma allow all
41bd17a4 5648 reply_header_access Content-Language allow all
41bd17a4 5649 reply_header_access Retry-After allow all
5650 reply_header_access Title allow all
638402dd 5651 reply_header_access Content-Disposition allow all
41bd17a4 5652 reply_header_access Connection allow all
41bd17a4 5653 reply_header_access All deny all
cccac0a2 5654
638402dd 5655 HTTP request headers are controlled with the request_header_access directive.
cccac0a2 5656
41bd17a4 5657 By default, all headers are allowed (no anonymizing is
5658 performed).
cccac0a2 5659DOC_END
5660
75e4f2ea 5661NAME: request_header_replace header_replace
626096be 5662IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5663TYPE: http_header_replace
41bd17a4 5664LOC: Config.request_header_access
cccac0a2 5665DEFAULT: none
41bd17a4 5666DOC_START
75e4f2ea
MB
5667 Usage: request_header_replace header_name message
5668 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
cccac0a2 5669
41bd17a4 5670 This option allows you to change the contents of headers
75e4f2ea 5671 denied with request_header_access above, by replacing them
638402dd 5672 with some fixed string.
cccac0a2 5673
41bd17a4 5674 This only applies to request headers, not reply headers.
cccac0a2 5675
41bd17a4 5676 By default, headers are removed if denied.
5677DOC_END
cccac0a2 5678
75e4f2ea
MB
5679NAME: reply_header_replace
5680IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5681TYPE: http_header_replace
75e4f2ea
MB
5682LOC: Config.reply_header_access
5683DEFAULT: none
5684DOC_START
5685 Usage: reply_header_replace header_name message
5686 Example: reply_header_replace Server Foo/1.0
5687
5688 This option allows you to change the contents of headers
5689 denied with reply_header_access above, by replacing them
5690 with some fixed string.
5691
5692 This only applies to reply headers, not request headers.
5693
5694 By default, headers are removed if denied.
5695DOC_END
5696
f4698e0b
CT
5697NAME: request_header_add
5698TYPE: HeaderWithAclList
5699LOC: Config.request_header_add
5700DEFAULT: none
5701DOC_START
5702 Usage: request_header_add field-name field-value acl1 [acl2] ...
5703 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
5704
5705 This option adds header fields to outgoing HTTP requests (i.e.,
5706 request headers sent by Squid to the next HTTP hop such as a
5707 cache peer or an origin server). The option has no effect during
5708 cache hit detection. The equivalent adaptation vectoring point
5709 in ICAP terminology is post-cache REQMOD.
5710
5711 Field-name is a token specifying an HTTP header name. If a
5712 standard HTTP header name is used, Squid does not check whether
5713 the new header conflicts with any existing headers or violates
5714 HTTP rules. If the request to be modified already contains a
5715 field with the same name, the old field is preserved but the
5716 header field values are not merged.
5717
5718 Field-value is either a token or a quoted string. If quoted
5719 string format is used, then the surrounding quotes are removed
5720 while escape sequences and %macros are processed.
5721
5722 In theory, all of the logformat codes can be used as %macros.
5723 However, unlike logging (which happens at the very end of
5724 transaction lifetime), the transaction may not yet have enough
5725 information to expand a macro when the new header value is needed.
5726 And some information may already be available to Squid but not yet
5727 committed where the macro expansion code can access it (report
5728 such instances!). The macro will be expanded into a single dash
5729 ('-') in such cases. Not all macros have been tested.
5730
5731 One or more Squid ACLs may be specified to restrict header
5732 injection to matching requests. As always in squid.conf, all
5733 ACLs in an option ACL list must be satisfied for the insertion
5734 to happen. The request_header_add option supports fast ACLs
5735 only.
5736DOC_END
5737
d7f4a0b7
CT
5738NAME: note
5739TYPE: note
5740LOC: Config.notes
5741DEFAULT: none
5742DOC_START
5743 This option used to log custom information about the master
5744 transaction. For example, an admin may configure Squid to log
5745 which "user group" the transaction belongs to, where "user group"
5746 will be determined based on a set of ACLs and not [just]
5747 authentication information.
5748 Values of key/value pairs can be logged using %{key}note macros:
5749
5750 note key value acl ...
5751 logformat myFormat ... %{key}note ...
5752DOC_END
5753
41bd17a4 5754NAME: relaxed_header_parser
5755COMMENT: on|off|warn
5756TYPE: tristate
5757LOC: Config.onoff.relaxed_header_parser
5758DEFAULT: on
5759DOC_START
5760 In the default "on" setting Squid accepts certain forms
5761 of non-compliant HTTP messages where it is unambiguous
5762 what the sending application intended even if the message
5763 is not correctly formatted. The messages is then normalized
5764 to the correct form when forwarded by Squid.
cccac0a2 5765
41bd17a4 5766 If set to "warn" then a warning will be emitted in cache.log
5767 each time such HTTP error is encountered.
cccac0a2 5768
41bd17a4 5769 If set to "off" then such HTTP errors will cause the request
5770 or response to be rejected.
5771DOC_END
7d90757b 5772
55eae904
AR
5773NAME: collapsed_forwarding
5774COMMENT: (on|off)
5775TYPE: onoff
5776LOC: Config.onoff.collapsed_forwarding
5777DEFAULT: off
5778DOC_START
5779 This option controls whether Squid is allowed to merge multiple
5780 potentially cachable requests for the same URI before Squid knows
5781 whether the response is going to be cachable.
5782
5783 This feature is disabled by default: Enabling collapsed forwarding
5784 needlessly delays forwarding requests that look cachable (when they are
5785 collapsed) but then need to be forwarded individually anyway because
5786 they end up being for uncachable content. However, in some cases, such
5787 as accelleration of highly cachable content with periodic or groupped
5788 expiration times, the gains from collapsing [large volumes of
5789 simultenous refresh requests] outweigh losses from such delays.
5790DOC_END
5791
41bd17a4 5792COMMENT_START
5793 TIMEOUTS
5794 -----------------------------------------------------------------------------
5795COMMENT_END
5796
5797NAME: forward_timeout
5798COMMENT: time-units
5799TYPE: time_t
5800LOC: Config.Timeout.forward
5801DEFAULT: 4 minutes
5802DOC_START
5803 This parameter specifies how long Squid should at most attempt in
5804 finding a forwarding path for the request before giving up.
cccac0a2 5805DOC_END
5806
41bd17a4 5807NAME: connect_timeout
5808COMMENT: time-units
5809TYPE: time_t
5810LOC: Config.Timeout.connect
5811DEFAULT: 1 minute
057f5854 5812DOC_START
41bd17a4 5813 This parameter specifies how long to wait for the TCP connect to
5814 the requested server or peer to complete before Squid should
5815 attempt to find another path where to forward the request.
057f5854 5816DOC_END
5817
41bd17a4 5818NAME: peer_connect_timeout
5819COMMENT: time-units
5820TYPE: time_t
5821LOC: Config.Timeout.peer_connect
5822DEFAULT: 30 seconds
cccac0a2 5823DOC_START
41bd17a4 5824 This parameter specifies how long to wait for a pending TCP
5825 connection to a peer cache. The default is 30 seconds. You
5826 may also set different timeout values for individual neighbors
5827 with the 'connect-timeout' option on a 'cache_peer' line.
5828DOC_END
7f7db318 5829
41bd17a4 5830NAME: read_timeout
5831COMMENT: time-units
5832TYPE: time_t
5833LOC: Config.Timeout.read
5834DEFAULT: 15 minutes
5835DOC_START
5836 The read_timeout is applied on server-side connections. After
5837 each successful read(), the timeout will be extended by this
5838 amount. If no data is read again after this amount of time,
5839 the request is aborted and logged with ERR_READ_TIMEOUT. The
5840 default is 15 minutes.
5841DOC_END
cccac0a2 5842
5ef5e5cc
AJ
5843NAME: write_timeout
5844COMMENT: time-units
5845TYPE: time_t
5846LOC: Config.Timeout.write
5847DEFAULT: 15 minutes
5848DOC_START
5849 This timeout is tracked for all connections that have data
5850 available for writing and are waiting for the socket to become
5851 ready. After each successful write, the timeout is extended by
5852 the configured amount. If Squid has data to write but the
5853 connection is not ready for the configured duration, the
5854 transaction associated with the connection is terminated. The
5855 default is 15 minutes.
5856DOC_END
5857
41bd17a4 5858NAME: request_timeout
5859TYPE: time_t
5860LOC: Config.Timeout.request
5861DEFAULT: 5 minutes
5862DOC_START
6b2a2108 5863 How long to wait for complete HTTP request headers after initial
41bd17a4 5864 connection establishment.
5865DOC_END
cccac0a2 5866
97b32442 5867NAME: client_idle_pconn_timeout persistent_request_timeout
41bd17a4 5868TYPE: time_t
97b32442 5869LOC: Config.Timeout.clientIdlePconn
41bd17a4 5870DEFAULT: 2 minutes
5871DOC_START
5872 How long to wait for the next HTTP request on a persistent
97b32442 5873 client connection after the previous request completes.
41bd17a4 5874DOC_END
cccac0a2 5875
41bd17a4 5876NAME: client_lifetime
5877COMMENT: time-units
5878TYPE: time_t
5879LOC: Config.Timeout.lifetime
5880DEFAULT: 1 day
5881DOC_START
5882 The maximum amount of time a client (browser) is allowed to
5883 remain connected to the cache process. This protects the Cache
5884 from having a lot of sockets (and hence file descriptors) tied up
5885 in a CLOSE_WAIT state from remote clients that go away without
5886 properly shutting down (either because of a network failure or
5887 because of a poor client implementation). The default is one
5888 day, 1440 minutes.
7d90757b 5889
41bd17a4 5890 NOTE: The default value is intended to be much larger than any
5891 client would ever need to be connected to your cache. You
5892 should probably change client_lifetime only as a last resort.
5893 If you seem to have many client connections tying up
5894 filedescriptors, we recommend first tuning the read_timeout,
5895 request_timeout, persistent_request_timeout and quick_abort values.
cccac0a2 5896DOC_END
5897
41bd17a4 5898NAME: half_closed_clients
5899TYPE: onoff
5900LOC: Config.onoff.half_closed_clients
0c2f5c4f 5901DEFAULT: off
4eb368f9 5902DOC_START
41bd17a4 5903 Some clients may shutdown the sending side of their TCP
5904 connections, while leaving their receiving sides open. Sometimes,
5905 Squid can not tell the difference between a half-closed and a
0c2f5c4f
AJ
5906 fully-closed TCP connection.
5907
5908 By default, Squid will immediately close client connections when
5909 read(2) returns "no more data to read."
5910
abdf1651 5911 Change this option to 'on' and Squid will keep open connections
0c2f5c4f
AJ
5912 until a read(2) or write(2) on the socket returns an error.
5913 This may show some benefits for reverse proxies. But if not
5914 it is recommended to leave OFF.
4eb368f9 5915DOC_END
5916
97b32442 5917NAME: server_idle_pconn_timeout pconn_timeout
41bd17a4 5918TYPE: time_t
97b32442 5919LOC: Config.Timeout.serverIdlePconn
41bd17a4 5920DEFAULT: 1 minute
cccac0a2 5921DOC_START
41bd17a4 5922 Timeout for idle persistent connections to servers and other
5923 proxies.
5924DOC_END
cccac0a2 5925
41bd17a4 5926NAME: ident_timeout
5927TYPE: time_t
5928IFDEF: USE_IDENT
4daaf3cb 5929LOC: Ident::TheConfig.timeout
41bd17a4 5930DEFAULT: 10 seconds
5931DOC_START
5932 Maximum time to wait for IDENT lookups to complete.
cccac0a2 5933
41bd17a4 5934 If this is too high, and you enabled IDENT lookups from untrusted
5935 users, you might be susceptible to denial-of-service by having
5936 many ident requests going at once.
cccac0a2 5937DOC_END
5938
41bd17a4 5939NAME: shutdown_lifetime
5940COMMENT: time-units
5941TYPE: time_t
5942LOC: Config.shutdownLifetime
5943DEFAULT: 30 seconds
cccac0a2 5944DOC_START
41bd17a4 5945 When SIGTERM or SIGHUP is received, the cache is put into
5946 "shutdown pending" mode until all active sockets are closed.
5947 This value is the lifetime to set for all open descriptors
5948 during shutdown mode. Any active clients after this many
5949 seconds will receive a 'timeout' message.
cccac0a2 5950DOC_END
0976f8db 5951
cccac0a2 5952COMMENT_START
5953 ADMINISTRATIVE PARAMETERS
5954 -----------------------------------------------------------------------------
5955COMMENT_END
5956
5957NAME: cache_mgr
5958TYPE: string
5959DEFAULT: webmaster
5960LOC: Config.adminEmail
5961DOC_START
5962 Email-address of local cache manager who will receive
638402dd 5963 mail if the cache dies. The default is "webmaster".
cccac0a2 5964DOC_END
5965
abacf776 5966NAME: mail_from
5967TYPE: string
5968DEFAULT: none
5969LOC: Config.EmailFrom
5970DOC_START
5971 From: email-address for mail sent when the cache dies.
638402dd
AJ
5972 The default is to use 'squid@unique_hostname'.
5973
5974 See also: unique_hostname directive.
abacf776 5975DOC_END
5976
d084bf20 5977NAME: mail_program
5978TYPE: eol
5979DEFAULT: mail
5980LOC: Config.EmailProgram
5981DOC_START
5982 Email program used to send mail if the cache dies.
846a5e31 5983 The default is "mail". The specified program must comply
d084bf20 5984 with the standard Unix mail syntax:
846a5e31 5985 mail-program recipient < mailfile
5986
d084bf20 5987 Optional command line options can be specified.
5988DOC_END
5989
cccac0a2 5990NAME: cache_effective_user
5991TYPE: string
5483d916 5992DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
cccac0a2 5993LOC: Config.effectiveUser
e3d74828 5994DOC_START
5995 If you start Squid as root, it will change its effective/real
5996 UID/GID to the user specified below. The default is to change
5483d916 5997 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
64e288bd 5998 see also; cache_effective_group
e3d74828 5999DOC_END
6000
cccac0a2 6001NAME: cache_effective_group
6002TYPE: string
6003DEFAULT: none
638402dd 6004DEFAULT_DOC: Use system group memberships of the cache_effective_user account
cccac0a2 6005LOC: Config.effectiveGroup
6006DOC_START
64e288bd 6007 Squid sets the GID to the effective user's default group ID
6008 (taken from the password file) and supplementary group list
6009 from the groups membership.
6010
e3d74828 6011 If you want Squid to run with a specific GID regardless of
6012 the group memberships of the effective user then set this
6013 to the group (or GID) you want Squid to run as. When set
64e288bd 6014 all other group privileges of the effective user are ignored
e3d74828 6015 and only this GID is effective. If Squid is not started as
64e288bd 6016 root the user starting Squid MUST be member of the specified
e3d74828 6017 group.
64e288bd 6018
6019 This option is not recommended by the Squid Team.
6020 Our preference is for administrators to configure a secure
6021 user account for squid with UID/GID matching system policies.
cccac0a2 6022DOC_END
6023
d3caee79 6024NAME: httpd_suppress_version_string
6025COMMENT: on|off
6026TYPE: onoff
6027DEFAULT: off
6028LOC: Config.onoff.httpd_suppress_version_string
6029DOC_START
6030 Suppress Squid version string info in HTTP headers and HTML error pages.
6031DOC_END
6032
cccac0a2 6033NAME: visible_hostname
6034TYPE: string
6035LOC: Config.visibleHostname
6036DEFAULT: none
638402dd 6037DEFAULT_DOC: Automatically detect the system host name
cccac0a2 6038DOC_START
6039 If you want to present a special hostname in error messages, etc,
7f7db318 6040 define this. Otherwise, the return value of gethostname()
cccac0a2 6041 will be used. If you have multiple caches in a cluster and
6042 get errors about IP-forwarding you must set them to have individual
6043 names with this setting.
6044DOC_END
6045
cccac0a2 6046NAME: unique_hostname
6047TYPE: string
6048LOC: Config.uniqueHostname
6049DEFAULT: none
638402dd 6050DEFAULT_DOC: Copy the value from visible_hostname
cccac0a2 6051DOC_START
6052 If you want to have multiple machines with the same
7f7db318 6053 'visible_hostname' you must give each machine a different
6054 'unique_hostname' so forwarding loops can be detected.
cccac0a2 6055DOC_END
6056
cccac0a2 6057NAME: hostname_aliases
6058TYPE: wordlist
6059LOC: Config.hostnameAliases
6060DEFAULT: none
6061DOC_START
7f7db318 6062 A list of other DNS names your cache has.
cccac0a2 6063DOC_END
0976f8db 6064
c642c141
AJ
6065NAME: umask
6066TYPE: int
6067LOC: Config.umask
6068DEFAULT: 027
6069DOC_START
6070 Minimum umask which should be enforced while the proxy
6071 is running, in addition to the umask set at startup.
6072
6073 For a traditional octal representation of umasks, start
6074 your value with 0.
6075DOC_END
6076
cccac0a2 6077COMMENT_START
6078 OPTIONS FOR THE CACHE REGISTRATION SERVICE
6079 -----------------------------------------------------------------------------
6080
6081 This section contains parameters for the (optional) cache
6082 announcement service. This service is provided to help
6083 cache administrators locate one another in order to join or
6084 create cache hierarchies.
6085
6086 An 'announcement' message is sent (via UDP) to the registration
6087 service by Squid. By default, the announcement message is NOT
6088 SENT unless you enable it with 'announce_period' below.
6089
6090 The announcement message includes your hostname, plus the
6091 following information from this configuration file:
6092
6093 http_port
6094 icp_port
6095 cache_mgr
6096
6097 All current information is processed regularly and made
6098 available on the Web at http://www.ircache.net/Cache/Tracker/.
6099COMMENT_END
6100
6101NAME: announce_period
6102TYPE: time_t
6103LOC: Config.Announce.period
6104DEFAULT: 0
638402dd 6105DEFAULT_DOC: Announcement messages disabled.
cccac0a2 6106DOC_START
638402dd 6107 This is how frequently to send cache announcements.
cccac0a2 6108
e0855596 6109 To enable announcing your cache, just set an announce period.
cccac0a2 6110
e0855596
AJ
6111 Example:
6112 announce_period 1 day
cccac0a2 6113DOC_END
6114
cccac0a2 6115NAME: announce_host
6116TYPE: string
6117DEFAULT: tracker.ircache.net
6118LOC: Config.Announce.host
638402dd
AJ
6119DOC_START
6120 Set the hostname where announce registration messages will be sent.
6121
6122 See also announce_port and announce_file
6123DOC_END
cccac0a2 6124
6125NAME: announce_file
6126TYPE: string
6127DEFAULT: none
6128LOC: Config.Announce.file
638402dd
AJ
6129DOC_START
6130 The contents of this file will be included in the announce
6131 registration messages.
6132DOC_END
cccac0a2 6133
6134NAME: announce_port
ae870270 6135TYPE: u_short
cccac0a2 6136DEFAULT: 3131
6137LOC: Config.Announce.port
6138DOC_START
638402dd 6139 Set the port where announce registration messages will be sent.
cccac0a2 6140
638402dd 6141 See also announce_host and announce_file
cccac0a2 6142DOC_END
6143
8d6275c0 6144COMMENT_START
6145 HTTPD-ACCELERATOR OPTIONS
6146 -----------------------------------------------------------------------------
6147COMMENT_END
6148
cccac0a2 6149NAME: httpd_accel_surrogate_id
cccac0a2 6150TYPE: string
b2b40d8c 6151DEFAULT: none
638402dd 6152DEFAULT_DOC: visible_hostname is used if no specific ID is set.
cccac0a2 6153LOC: Config.Accel.surrogate_id
cccac0a2 6154DOC_START
6155 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
6156 need an identification token to allow control targeting. Because
6157 a farm of surrogates may all perform the same tasks, they may share
6158 an identification token.
6159DOC_END
6160
6161NAME: http_accel_surrogate_remote
cccac0a2 6162COMMENT: on|off
6163TYPE: onoff
6164DEFAULT: off
6165LOC: Config.onoff.surrogate_is_remote
6166DOC_START
638402dd
AJ
6167 Remote surrogates (such as those in a CDN) honour the header
6168 "Surrogate-Control: no-store-remote".
6169
cccac0a2 6170 Set this to on to have squid behave as a remote surrogate.
6171DOC_END
6172
6173NAME: esi_parser
f41735ea 6174IFDEF: USE_SQUID_ESI
964b44c3 6175COMMENT: libxml2|expat|custom
cccac0a2 6176TYPE: string
6177LOC: ESIParser::Type
6178DEFAULT: custom
6179DOC_START
6180 ESI markup is not strictly XML compatible. The custom ESI parser
6181 will give higher performance, but cannot handle non ASCII character
6182 encodings.
6183DOC_END
0976f8db 6184
9edd9041 6185COMMENT_START
8d6275c0 6186 DELAY POOL PARAMETERS
9edd9041 6187 -----------------------------------------------------------------------------
6188COMMENT_END
6189
6190NAME: delay_pools
6191TYPE: delay_pool_count
6192DEFAULT: 0
9a0a18de 6193IFDEF: USE_DELAY_POOLS
9edd9041 6194LOC: Config.Delay
6195DOC_START
6196 This represents the number of delay pools to be used. For example,
6197 if you have one class 2 delay pool and one class 3 delays pool, you
6198 have a total of 2 delay pools.
638402dd
AJ
6199
6200 See also delay_parameters, delay_class, delay_access for pool
6201 configuration details.
9edd9041 6202DOC_END
6203
6204NAME: delay_class
6205TYPE: delay_pool_class
6206DEFAULT: none
9a0a18de 6207IFDEF: USE_DELAY_POOLS
9edd9041 6208LOC: Config.Delay
6209DOC_START
6210 This defines the class of each delay pool. There must be exactly one
6211 delay_class line for each delay pool. For example, to define two
6212 delay pools, one of class 2 and one of class 3, the settings above
6213 and here would be:
6214
b1fb3348
AJ
6215 Example:
6216 delay_pools 4 # 4 delay pools
6217 delay_class 1 2 # pool 1 is a class 2 pool
6218 delay_class 2 3 # pool 2 is a class 3 pool
6219 delay_class 3 4 # pool 3 is a class 4 pool
6220 delay_class 4 5 # pool 4 is a class 5 pool
9edd9041 6221
6222 The delay pool classes are:
6223
6224 class 1 Everything is limited by a single aggregate
6225 bucket.
6226
6227 class 2 Everything is limited by a single aggregate
6228 bucket as well as an "individual" bucket chosen
b1fb3348 6229 from bits 25 through 32 of the IPv4 address.
9edd9041 6230
6231 class 3 Everything is limited by a single aggregate
6232 bucket as well as a "network" bucket chosen
6233 from bits 17 through 24 of the IP address and a
6234 "individual" bucket chosen from bits 17 through
b1fb3348 6235 32 of the IPv4 address.
9edd9041 6236
6237 class 4 Everything in a class 3 delay pool, with an
6238 additional limit on a per user basis. This
6239 only takes effect if the username is established
6240 in advance - by forcing authentication in your
6241 http_access rules.
6242
6243 class 5 Requests are grouped according their tag (see
6244 external_acl's tag= reply).
6245
0b68481a
AJ
6246
6247 Each pool also requires a delay_parameters directive to configure the pool size
6248 and speed limits used whenever the pool is applied to a request. Along with
6249 a set of delay_access directives to determine when it is used.
6250
9edd9041 6251 NOTE: If an IP address is a.b.c.d
6252 -> bits 25 through 32 are "d"
6253 -> bits 17 through 24 are "c"
6254 -> bits 17 through 32 are "c * 256 + d"
b1fb3348
AJ
6255
6256 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
6257 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
638402dd
AJ
6258
6259 This clause only supports fast acl types.
6260 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6261
6262 See also delay_parameters and delay_access.
9edd9041 6263DOC_END
6264
6265NAME: delay_access
6266TYPE: delay_pool_access
6267DEFAULT: none
638402dd 6268DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
9a0a18de 6269IFDEF: USE_DELAY_POOLS
9edd9041 6270LOC: Config.Delay
6271DOC_START
6272 This is used to determine which delay pool a request falls into.
6273
6274 delay_access is sorted per pool and the matching starts with pool 1,
6275 then pool 2, ..., and finally pool N. The first delay pool where the
6276 request is allowed is selected for the request. If it does not allow
6277 the request to any pool then the request is not delayed (default).
6278
6279 For example, if you want some_big_clients in delay
6280 pool 1 and lotsa_little_clients in delay pool 2:
6281
638402dd
AJ
6282 delay_access 1 allow some_big_clients
6283 delay_access 1 deny all
6284 delay_access 2 allow lotsa_little_clients
6285 delay_access 2 deny all
6286 delay_access 3 allow authenticated_clients
6287
6288 See also delay_parameters and delay_class.
6289
9edd9041 6290DOC_END
6291
6292NAME: delay_parameters
6293TYPE: delay_pool_rates
6294DEFAULT: none
9a0a18de 6295IFDEF: USE_DELAY_POOLS
9edd9041 6296LOC: Config.Delay
6297DOC_START
6298 This defines the parameters for a delay pool. Each delay pool has
6299 a number of "buckets" associated with it, as explained in the
0b68481a 6300 description of delay_class.
9edd9041 6301
0b68481a
AJ
6302 For a class 1 delay pool, the syntax is:
6303 delay_pools pool 1
6304 delay_parameters pool aggregate
9edd9041 6305
6306 For a class 2 delay pool:
0b68481a
AJ
6307 delay_pools pool 2
6308 delay_parameters pool aggregate individual
9edd9041 6309
6310 For a class 3 delay pool:
0b68481a
AJ
6311 delay_pools pool 3
6312 delay_parameters pool aggregate network individual
9edd9041 6313
6314 For a class 4 delay pool:
0b68481a
AJ
6315 delay_pools pool 4
6316 delay_parameters pool aggregate network individual user
9edd9041 6317
6318 For a class 5 delay pool:
0b68481a
AJ
6319 delay_pools pool 5
6320 delay_parameters pool tagrate
9edd9041 6321
0b68481a 6322 The option variables are:
9edd9041 6323
6324 pool a pool number - ie, a number between 1 and the
6325 number specified in delay_pools as used in
6326 delay_class lines.
6327
fdb47ac6 6328 aggregate the speed limit parameters for the aggregate bucket
9edd9041 6329 (class 1, 2, 3).
6330
fdb47ac6 6331 individual the speed limit parameters for the individual
9edd9041 6332 buckets (class 2, 3).
6333
fdb47ac6 6334 network the speed limit parameters for the network buckets
9edd9041 6335 (class 3).
6336
fdb47ac6 6337 user the speed limit parameters for the user buckets
9edd9041 6338 (class 4).
6339
fdb47ac6 6340 tagrate the speed limit parameters for the tag buckets
9edd9041 6341 (class 5).
6342
6343 A pair of delay parameters is written restore/maximum, where restore is
6344 the number of bytes (not bits - modem and network speeds are usually
6345 quoted in bits) per second placed into the bucket, and maximum is the
6346 maximum number of bytes which can be in the bucket at any time.
6347
0b68481a
AJ
6348 There must be one delay_parameters line for each delay pool.
6349
6350
9edd9041 6351 For example, if delay pool number 1 is a class 2 delay pool as in the
0b68481a 6352 above example, and is being used to strictly limit each host to 64Kbit/sec
9edd9041 6353 (plus overheads), with no overall limit, the line is:
6354
0b68481a
AJ
6355 delay_parameters 1 -1/-1 8000/8000
6356
6357 Note that 8 x 8000 KByte/sec -> 64Kbit/sec.
9edd9041 6358
6359 Note that the figure -1 is used to represent "unlimited".
6360
0b68481a 6361
9edd9041 6362 And, if delay pool number 2 is a class 3 delay pool as in the above
0b68481a
AJ
6363 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
6364 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
6365 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
9edd9041 6366 to permit a decent web page to be downloaded at a decent speed
6367 (if the network is not being limited due to overuse) but slow down
6368 large downloads more significantly:
6369
0b68481a
AJ
6370 delay_parameters 2 32000/32000 8000/8000 600/8000
6371
6372 Note that 8 x 32000 KByte/sec -> 256Kbit/sec.
6373 8 x 8000 KByte/sec -> 64Kbit/sec.
6374 8 x 600 Byte/sec -> 4800bit/sec.
9edd9041 6375
9edd9041 6376
6377 Finally, for a class 4 delay pool as in the example - each user will
0b68481a 6378 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
9edd9041 6379
0b68481a 6380 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
638402dd
AJ
6381
6382
6383 See also delay_class and delay_access.
6384
9edd9041 6385DOC_END
6386
6387NAME: delay_initial_bucket_level
6388COMMENT: (percent, 0-100)
ae870270 6389TYPE: u_short
9edd9041 6390DEFAULT: 50
9a0a18de 6391IFDEF: USE_DELAY_POOLS
9edd9041 6392LOC: Config.Delay.initial
6393DOC_START
6394 The initial bucket percentage is used to determine how much is put
6395 in each bucket when squid starts, is reconfigured, or first notices
6396 a host accessing it (in class 2 and class 3, individual hosts and
6397 networks only have buckets associated with them once they have been
6398 "seen" by squid).
6399DOC_END
6400
b4cd430a
CT
6401COMMENT_START
6402 CLIENT DELAY POOL PARAMETERS
6403 -----------------------------------------------------------------------------
6404COMMENT_END
6405
6406NAME: client_delay_pools
6407TYPE: client_delay_pool_count
6408DEFAULT: 0
9a0a18de 6409IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6410LOC: Config.ClientDelay
6411DOC_START
6412 This option specifies the number of client delay pools used. It must
6413 preceed other client_delay_* options.
6414
638402dd
AJ
6415 Example:
6416 client_delay_pools 2
6417
6418 See also client_delay_parameters and client_delay_access.
b4cd430a
CT
6419DOC_END
6420
6421NAME: client_delay_initial_bucket_level
6422COMMENT: (percent, 0-no_limit)
ae870270 6423TYPE: u_short
b4cd430a 6424DEFAULT: 50
9a0a18de 6425IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6426LOC: Config.ClientDelay.initial
6427DOC_START
6428 This option determines the initial bucket size as a percentage of
6429 max_bucket_size from client_delay_parameters. Buckets are created
6430 at the time of the "first" connection from the matching IP. Idle
6431 buckets are periodically deleted up.
6432
6433 You can specify more than 100 percent but note that such "oversized"
6434 buckets are not refilled until their size goes down to max_bucket_size
6435 from client_delay_parameters.
6436
638402dd
AJ
6437 Example:
6438 client_delay_initial_bucket_level 50
b4cd430a
CT
6439DOC_END
6440
6441NAME: client_delay_parameters
6442TYPE: client_delay_pool_rates
6443DEFAULT: none
9a0a18de 6444IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6445LOC: Config.ClientDelay
6446DOC_START
6447
6448 This option configures client-side bandwidth limits using the
6449 following format:
6450
6451 client_delay_parameters pool speed_limit max_bucket_size
6452
6453 pool is an integer ID used for client_delay_access matching.
6454
6455 speed_limit is bytes added to the bucket per second.
6456
6457 max_bucket_size is the maximum size of a bucket, enforced after any
6458 speed_limit additions.
6459
6460 Please see the delay_parameters option for more information and
6461 examples.
6462
638402dd
AJ
6463 Example:
6464 client_delay_parameters 1 1024 2048
6465 client_delay_parameters 2 51200 16384
6466
6467 See also client_delay_access.
6468
b4cd430a
CT
6469DOC_END
6470
6471NAME: client_delay_access
6472TYPE: client_delay_pool_access
6473DEFAULT: none
638402dd 6474DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
9a0a18de 6475IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6476LOC: Config.ClientDelay
6477DOC_START
b4cd430a
CT
6478 This option determines the client-side delay pool for the
6479 request:
6480
6481 client_delay_access pool_ID allow|deny acl_name
6482
6483 All client_delay_access options are checked in their pool ID
6484 order, starting with pool 1. The first checked pool with allowed
6485 request is selected for the request. If no ACL matches or there
6486 are no client_delay_access options, the request bandwidth is not
6487 limited.
6488
6489 The ACL-selected pool is then used to find the
6490 client_delay_parameters for the request. Client-side pools are
6491 not used to aggregate clients. Clients are always aggregated
6492 based on their source IP addresses (one bucket per source IP).
6493
638402dd
AJ
6494 This clause only supports fast acl types.
6495 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6496 Additionally, only the client TCP connection details are available.
6497 ACLs testing HTTP properties will not work.
6498
b4cd430a
CT
6499 Please see delay_access for more examples.
6500
638402dd
AJ
6501 Example:
6502 client_delay_access 1 allow low_rate_network
6503 client_delay_access 2 allow vips_network
6504
6505
6506 See also client_delay_parameters and client_delay_pools.
b4cd430a
CT
6507DOC_END
6508
cccac0a2 6509COMMENT_START
8d6275c0 6510 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
cccac0a2 6511 -----------------------------------------------------------------------------
6512COMMENT_END
6513
8d6275c0 6514NAME: wccp_router
6515TYPE: address
6516LOC: Config.Wccp.router
0eb08770 6517DEFAULT: any_addr
638402dd 6518DEFAULT_DOC: WCCP disabled.
8d6275c0 6519IFDEF: USE_WCCP
e313ab0a
AJ
6520DOC_START
6521 Use this option to define your WCCP ``home'' router for
6522 Squid.
6523
6524 wccp_router supports a single WCCP(v1) router
6525
6526 wccp2_router supports multiple WCCPv2 routers
6527
6528 only one of the two may be used at the same time and defines
6529 which version of WCCP to use.
6530DOC_END
df2eec10 6531
8d6275c0 6532NAME: wccp2_router
9fb4efad 6533TYPE: IpAddress_list
8d6275c0 6534LOC: Config.Wccp2.router
cccac0a2 6535DEFAULT: none
638402dd 6536DEFAULT_DOC: WCCPv2 disabled.
8d6275c0 6537IFDEF: USE_WCCPv2
cccac0a2 6538DOC_START
8d6275c0 6539 Use this option to define your WCCP ``home'' router for
6540 Squid.
cccac0a2 6541
8d6275c0 6542 wccp_router supports a single WCCP(v1) router
cccac0a2 6543
8d6275c0 6544 wccp2_router supports multiple WCCPv2 routers
cccac0a2 6545
8d6275c0 6546 only one of the two may be used at the same time and defines
6547 which version of WCCP to use.
6548DOC_END
6549
6550NAME: wccp_version
cccac0a2 6551TYPE: int
8d6275c0 6552LOC: Config.Wccp.version
6553DEFAULT: 4
6554IFDEF: USE_WCCP
cccac0a2 6555DOC_START
8d6275c0 6556 This directive is only relevant if you need to set up WCCP(v1)
6557 to some very old and end-of-life Cisco routers. In all other
6558 setups it must be left unset or at the default setting.
6559 It defines an internal version in the WCCP(v1) protocol,
6560 with version 4 being the officially documented protocol.
cccac0a2 6561
8d6275c0 6562 According to some users, Cisco IOS 11.2 and earlier only
6563 support WCCP version 3. If you're using that or an earlier
6564 version of IOS, you may need to change this value to 3, otherwise
6565 do not specify this parameter.
cccac0a2 6566DOC_END
6567
8d6275c0 6568NAME: wccp2_rebuild_wait
6569TYPE: onoff
6570LOC: Config.Wccp2.rebuildwait
6571DEFAULT: on
6572IFDEF: USE_WCCPv2
6573DOC_START
6574 If this is enabled Squid will wait for the cache dir rebuild to finish
6575 before sending the first wccp2 HereIAm packet
6576DOC_END
cccac0a2 6577
8d6275c0 6578NAME: wccp2_forwarding_method
e313ab0a 6579TYPE: wccp2_method
8d6275c0 6580LOC: Config.Wccp2.forwarding_method
451c4786 6581DEFAULT: gre
8d6275c0 6582IFDEF: USE_WCCPv2
cccac0a2 6583DOC_START
699acd19 6584 WCCP2 allows the setting of forwarding methods between the
8d6275c0 6585 router/switch and the cache. Valid values are as follows:
cccac0a2 6586
451c4786
AJ
6587 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6588 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 6589
8d6275c0 6590 Currently (as of IOS 12.4) cisco routers only support GRE.
6591 Cisco switches only support the L2 redirect assignment method.
cccac0a2 6592DOC_END
6593
8d6275c0 6594NAME: wccp2_return_method
e313ab0a 6595TYPE: wccp2_method
8d6275c0 6596LOC: Config.Wccp2.return_method
451c4786 6597DEFAULT: gre
8d6275c0 6598IFDEF: USE_WCCPv2
cccac0a2 6599DOC_START
699acd19 6600 WCCP2 allows the setting of return methods between the
8d6275c0 6601 router/switch and the cache for packets that the cache
6602 decides not to handle. Valid values are as follows:
cccac0a2 6603
451c4786
AJ
6604 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6605 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 6606
8d6275c0 6607 Currently (as of IOS 12.4) cisco routers only support GRE.
6608 Cisco switches only support the L2 redirect assignment.
cccac0a2 6609
699acd19 6610 If the "ip wccp redirect exclude in" command has been
8d6275c0 6611 enabled on the cache interface, then it is still safe for
6612 the proxy server to use a l2 redirect method even if this
6613 option is set to GRE.
cccac0a2 6614DOC_END
6615
8d6275c0 6616NAME: wccp2_assignment_method
451c4786 6617TYPE: wccp2_amethod
8d6275c0 6618LOC: Config.Wccp2.assignment_method
451c4786 6619DEFAULT: hash
8d6275c0 6620IFDEF: USE_WCCPv2
cccac0a2 6621DOC_START
8d6275c0 6622 WCCP2 allows the setting of methods to assign the WCCP hash
6623 Valid values are as follows:
cccac0a2 6624
451c4786 6625 hash - Hash assignment
bb7a1781 6626 mask - Mask assignment
cccac0a2 6627
8d6275c0 6628 As a general rule, cisco routers support the hash assignment method
6629 and cisco switches support the mask assignment method.
6630DOC_END
cccac0a2 6631
8d6275c0 6632NAME: wccp2_service
6633TYPE: wccp2_service
6634LOC: Config.Wccp2.info
8d6275c0 6635DEFAULT_IF_NONE: standard 0
638402dd 6636DEFAULT_DOC: Use the 'web-cache' standard service.
8d6275c0 6637IFDEF: USE_WCCPv2
6638DOC_START
6639 WCCP2 allows for multiple traffic services. There are two
6640 types: "standard" and "dynamic". The standard type defines
6641 one service id - http (id 0). The dynamic service ids can be from
6642 51 to 255 inclusive. In order to use a dynamic service id
6643 one must define the type of traffic to be redirected; this is done
6644 using the wccp2_service_info option.
6645
6646 The "standard" type does not require a wccp2_service_info option,
6647 just specifying the service id will suffice.
6648
6649 MD5 service authentication can be enabled by adding
6650 "password=<password>" to the end of this service declaration.
6651
6652 Examples:
6653
6654 wccp2_service standard 0 # for the 'web-cache' standard service
6655 wccp2_service dynamic 80 # a dynamic service type which will be
6656 # fleshed out with subsequent options.
6657 wccp2_service standard 0 password=foo
8d6275c0 6658DOC_END
6659
6660NAME: wccp2_service_info
6661TYPE: wccp2_service_info
6662LOC: Config.Wccp2.info
6663DEFAULT: none
6664IFDEF: USE_WCCPv2
6665DOC_START
6666 Dynamic WCCPv2 services require further information to define the
6667 traffic you wish to have diverted.
6668
6669 The format is:
6670
6671 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
6672 priority=<priority> ports=<port>,<port>..
6673
6674 The relevant WCCPv2 flags:
6675 + src_ip_hash, dst_ip_hash
005fe566 6676 + source_port_hash, dst_port_hash
8d6275c0 6677 + src_ip_alt_hash, dst_ip_alt_hash
6678 + src_port_alt_hash, dst_port_alt_hash
6679 + ports_source
6680
6681 The port list can be one to eight entries.
6682
6683 Example:
6684
6685 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
6686 priority=240 ports=80
6687
6688 Note: the service id must have been defined by a previous
6689 'wccp2_service dynamic <id>' entry.
6690DOC_END
6691
6692NAME: wccp2_weight
6693TYPE: int
6694LOC: Config.Wccp2.weight
6695DEFAULT: 10000
6696IFDEF: USE_WCCPv2
6697DOC_START
6698 Each cache server gets assigned a set of the destination
6699 hash proportional to their weight.
6700DOC_END
6701
6702NAME: wccp_address
6703TYPE: address
6704LOC: Config.Wccp.address
6705DEFAULT: 0.0.0.0
638402dd 6706DEFAULT_DOC: Address selected by the operating system.
8d6275c0 6707IFDEF: USE_WCCP
638402dd
AJ
6708DOC_START
6709 Use this option if you require WCCPv2 to use a specific
6710 interface address.
6711
6712 The default behavior is to not bind to any specific address.
6713DOC_END
df2eec10 6714
8d6275c0 6715NAME: wccp2_address
6716TYPE: address
6717LOC: Config.Wccp2.address
6718DEFAULT: 0.0.0.0
638402dd 6719DEFAULT_DOC: Address selected by the operating system.
8d6275c0 6720IFDEF: USE_WCCPv2
6721DOC_START
6722 Use this option if you require WCCP to use a specific
6723 interface address.
6724
6725 The default behavior is to not bind to any specific address.
6726DOC_END
6727
6728COMMENT_START
6729 PERSISTENT CONNECTION HANDLING
6730 -----------------------------------------------------------------------------
6731
6732 Also see "pconn_timeout" in the TIMEOUTS section
6733COMMENT_END
6734
6735NAME: client_persistent_connections
6736TYPE: onoff
6737LOC: Config.onoff.client_pconns
6738DEFAULT: on
638402dd
AJ
6739DOC_START
6740 Persistent connection support for clients.
6741 Squid uses persistent connections (when allowed). You can use
6742 this option to disable persistent connections with clients.
6743DOC_END
8d6275c0 6744
6745NAME: server_persistent_connections
6746TYPE: onoff
6747LOC: Config.onoff.server_pconns
6748DEFAULT: on
6749DOC_START
638402dd
AJ
6750 Persistent connection support for servers.
6751 Squid uses persistent connections (when allowed). You can use
6752 this option to disable persistent connections with servers.
8d6275c0 6753DOC_END
6754
6755NAME: persistent_connection_after_error
6756TYPE: onoff
6757LOC: Config.onoff.error_pconns
0fccfb7f 6758DEFAULT: on
8d6275c0 6759DOC_START
6760 With this directive the use of persistent connections after
6761 HTTP errors can be disabled. Useful if you have clients
6762 who fail to handle errors on persistent connections proper.
6763DOC_END
6764
6765NAME: detect_broken_pconn
6766TYPE: onoff
6767LOC: Config.onoff.detect_broken_server_pconns
6768DEFAULT: off
6769DOC_START
6770 Some servers have been found to incorrectly signal the use
6771 of HTTP/1.0 persistent connections even on replies not
6772 compatible, causing significant delays. This server problem
6773 has mostly been seen on redirects.
6774
6775 By enabling this directive Squid attempts to detect such
6776 broken replies and automatically assume the reply is finished
6777 after 10 seconds timeout.
6778DOC_END
6779
6780COMMENT_START
6781 CACHE DIGEST OPTIONS
6782 -----------------------------------------------------------------------------
6783COMMENT_END
6784
6785NAME: digest_generation
6786IFDEF: USE_CACHE_DIGESTS
6787TYPE: onoff
6788LOC: Config.onoff.digest_generation
6789DEFAULT: on
6790DOC_START
6791 This controls whether the server will generate a Cache Digest
6792 of its contents. By default, Cache Digest generation is
13e917b5 6793 enabled if Squid is compiled with --enable-cache-digests defined.
8d6275c0 6794DOC_END
6795
6796NAME: digest_bits_per_entry
6797IFDEF: USE_CACHE_DIGESTS
6798TYPE: int
6799LOC: Config.digest.bits_per_entry
6800DEFAULT: 5
6801DOC_START
6802 This is the number of bits of the server's Cache Digest which
6803 will be associated with the Digest entry for a given HTTP
6804 Method and URL (public key) combination. The default is 5.
6805DOC_END
6806
6807NAME: digest_rebuild_period
6808IFDEF: USE_CACHE_DIGESTS
6809COMMENT: (seconds)
6810TYPE: time_t
6811LOC: Config.digest.rebuild_period
6812DEFAULT: 1 hour
6813DOC_START
749ceff8 6814 This is the wait time between Cache Digest rebuilds.
8d6275c0 6815DOC_END
6816
6817NAME: digest_rewrite_period
6818COMMENT: (seconds)
6819IFDEF: USE_CACHE_DIGESTS
6820TYPE: time_t
6821LOC: Config.digest.rewrite_period
6822DEFAULT: 1 hour
6823DOC_START
749ceff8 6824 This is the wait time between Cache Digest writes to
8d6275c0 6825 disk.
6826DOC_END
6827
6828NAME: digest_swapout_chunk_size
6829COMMENT: (bytes)
6830TYPE: b_size_t
6831IFDEF: USE_CACHE_DIGESTS
6832LOC: Config.digest.swapout_chunk_size
6833DEFAULT: 4096 bytes
6834DOC_START
6835 This is the number of bytes of the Cache Digest to write to
6836 disk at a time. It defaults to 4096 bytes (4KB), the Squid
6837 default swap page.
6838DOC_END
6839
6840NAME: digest_rebuild_chunk_percentage
6841COMMENT: (percent, 0-100)
6842IFDEF: USE_CACHE_DIGESTS
6843TYPE: int
6844LOC: Config.digest.rebuild_chunk_percentage
6845DEFAULT: 10
6846DOC_START
6847 This is the percentage of the Cache Digest to be scanned at a
6848 time. By default it is set to 10% of the Cache Digest.
6849DOC_END
6850
1db9eacd 6851COMMENT_START
5473c134 6852 SNMP OPTIONS
1db9eacd 6853 -----------------------------------------------------------------------------
6854COMMENT_END
6855
5473c134 6856NAME: snmp_port
ae870270 6857TYPE: u_short
5473c134 6858LOC: Config.Port.snmp
87630341 6859DEFAULT: 0
638402dd 6860DEFAULT_DOC: SNMP disabled.
5473c134 6861IFDEF: SQUID_SNMP
8d6275c0 6862DOC_START
87630341 6863 The port number where Squid listens for SNMP requests. To enable
6864 SNMP support set this to a suitable port number. Port number
6865 3401 is often used for the Squid SNMP agent. By default it's
6866 set to "0" (disabled)
e0855596
AJ
6867
6868 Example:
6869 snmp_port 3401
8d6275c0 6870DOC_END
6871
5473c134 6872NAME: snmp_access
6873TYPE: acl_access
6874LOC: Config.accessList.snmp
638402dd
AJ
6875DEFAULT: none
6876DEFAULT_DOC: Deny, unless rules exist in squid.conf.
5473c134 6877IFDEF: SQUID_SNMP
8d6275c0 6878DOC_START
5473c134 6879 Allowing or denying access to the SNMP port.
8d6275c0 6880
5473c134 6881 All access to the agent is denied by default.
6882 usage:
8d6275c0 6883
5473c134 6884 snmp_access allow|deny [!]aclname ...
8d6275c0 6885
b3567eb5
FC
6886 This clause only supports fast acl types.
6887 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
638402dd 6888
5473c134 6889Example:
6890 snmp_access allow snmppublic localhost
6891 snmp_access deny all
cccac0a2 6892DOC_END
6893
5473c134 6894NAME: snmp_incoming_address
6895TYPE: address
6896LOC: Config.Addrs.snmp_incoming
0eb08770 6897DEFAULT: any_addr
638402dd 6898DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
5473c134 6899IFDEF: SQUID_SNMP
638402dd
AJ
6900DOC_START
6901 Just like 'udp_incoming_address', but for the SNMP port.
6902
6903 snmp_incoming_address is used for the SNMP socket receiving
6904 messages from SNMP agents.
6905
6906 The default snmp_incoming_address is to listen on all
6907 available network interfaces.
6908DOC_END
df2eec10 6909
5473c134 6910NAME: snmp_outgoing_address
6911TYPE: address
6912LOC: Config.Addrs.snmp_outgoing
0eb08770 6913DEFAULT: no_addr
638402dd 6914DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
5473c134 6915IFDEF: SQUID_SNMP
cccac0a2 6916DOC_START
638402dd 6917 Just like 'udp_outgoing_address', but for the SNMP port.
cccac0a2 6918
5473c134 6919 snmp_outgoing_address is used for SNMP packets returned to SNMP
6920 agents.
cccac0a2 6921
0eb08770
HN
6922 If snmp_outgoing_address is not set it will use the same socket
6923 as snmp_incoming_address. Only change this if you want to have
6924 SNMP replies sent using another address than where this Squid
6925 listens for SNMP queries.
cccac0a2 6926
5473c134 6927 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
638402dd 6928 the same value since they both use the same port.
cccac0a2 6929DOC_END
6930
5473c134 6931COMMENT_START
6932 ICP OPTIONS
6933 -----------------------------------------------------------------------------
6934COMMENT_END
6935
6936NAME: icp_port udp_port
ae870270 6937TYPE: u_short
5473c134 6938DEFAULT: 0
638402dd 6939DEFAULT_DOC: ICP disabled.
5473c134 6940LOC: Config.Port.icp
cccac0a2 6941DOC_START
5473c134 6942 The port number where Squid sends and receives ICP queries to
6943 and from neighbor caches. The standard UDP port for ICP is 3130.
e0855596
AJ
6944
6945 Example:
6946 icp_port @DEFAULT_ICP_PORT@
cccac0a2 6947DOC_END
6948
5473c134 6949NAME: htcp_port
6950IFDEF: USE_HTCP
ae870270 6951TYPE: u_short
87630341 6952DEFAULT: 0
638402dd 6953DEFAULT_DOC: HTCP disabled.
5473c134 6954LOC: Config.Port.htcp
cccac0a2 6955DOC_START
5473c134 6956 The port number where Squid sends and receives HTCP queries to
87630341 6957 and from neighbor caches. To turn it on you want to set it to
638402dd 6958 4827.
e0855596
AJ
6959
6960 Example:
6961 htcp_port 4827
cccac0a2 6962DOC_END
6963
6964NAME: log_icp_queries
6965COMMENT: on|off
6966TYPE: onoff
6967DEFAULT: on
6968LOC: Config.onoff.log_udp
6969DOC_START
6970 If set, ICP queries are logged to access.log. You may wish
6971 do disable this if your ICP load is VERY high to speed things
6972 up or to simplify log analysis.
6973DOC_END
6974
5473c134 6975NAME: udp_incoming_address
6976TYPE: address
6977LOC:Config.Addrs.udp_incoming
0eb08770 6978DEFAULT: any_addr
638402dd 6979DEFAULT_DOC: Accept packets from all machine interfaces.
8524d4b2 6980DOC_START
6981 udp_incoming_address is used for UDP packets received from other
6982 caches.
6983
6984 The default behavior is to not bind to any specific address.
6985
6986 Only change this if you want to have all UDP queries received on
6987 a specific interface/address.
6988
6989 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
6990 modules. Altering it will affect all of them in the same manner.
6991
6992 see also; udp_outgoing_address
6993
6994 NOTE, udp_incoming_address and udp_outgoing_address can not
6995 have the same value since they both use the same port.
6996DOC_END
cccac0a2 6997
5473c134 6998NAME: udp_outgoing_address
6999TYPE: address
7000LOC: Config.Addrs.udp_outgoing
0eb08770 7001DEFAULT: no_addr
638402dd 7002DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
cccac0a2 7003DOC_START
8524d4b2 7004 udp_outgoing_address is used for UDP packets sent out to other
5473c134 7005 caches.
cccac0a2 7006
5473c134 7007 The default behavior is to not bind to any specific address.
cccac0a2 7008
8524d4b2 7009 Instead it will use the same socket as udp_incoming_address.
7010 Only change this if you want to have UDP queries sent using another
7011 address than where this Squid listens for UDP queries from other
5473c134 7012 caches.
7013
8524d4b2 7014 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
7015 modules. Altering it will affect all of them in the same manner.
7016
7017 see also; udp_incoming_address
7018
5473c134 7019 NOTE, udp_incoming_address and udp_outgoing_address can not
8524d4b2 7020 have the same value since they both use the same port.
cccac0a2 7021DOC_END
7022
3d1e3e43 7023NAME: icp_hit_stale
7024COMMENT: on|off
7025TYPE: onoff
7026DEFAULT: off
7027LOC: Config.onoff.icp_hit_stale
7028DOC_START
7029 If you want to return ICP_HIT for stale cache objects, set this
7030 option to 'on'. If you have sibling relationships with caches
7031 in other administrative domains, this should be 'off'. If you only
7032 have sibling relationships with caches under your control,
7033 it is probably okay to set this to 'on'.
7034 If set to 'on', your siblings should use the option "allow-miss"
7035 on their cache_peer lines for connecting to you.
7036DOC_END
7037
5473c134 7038NAME: minimum_direct_hops
cccac0a2 7039TYPE: int
5473c134 7040DEFAULT: 4
7041LOC: Config.minDirectHops
cccac0a2 7042DOC_START
5473c134 7043 If using the ICMP pinging stuff, do direct fetches for sites
7044 which are no more than this many hops away.
cccac0a2 7045DOC_END
7046
5473c134 7047NAME: minimum_direct_rtt
638402dd 7048COMMENT: (msec)
5473c134 7049TYPE: int
7050DEFAULT: 400
7051LOC: Config.minDirectRtt
cccac0a2 7052DOC_START
5473c134 7053 If using the ICMP pinging stuff, do direct fetches for sites
7054 which are no more than this many rtt milliseconds away.
cccac0a2 7055DOC_END
7056
cccac0a2 7057NAME: netdb_low
7058TYPE: int
7059DEFAULT: 900
7060LOC: Config.Netdb.low
638402dd
AJ
7061DOC_START
7062 The low water mark for the ICMP measurement database.
7063
7064 Note: high watermark controlled by netdb_high directive.
7065
7066 These watermarks are counts, not percents. The defaults are
7067 (low) 900 and (high) 1000. When the high water mark is
7068 reached, database entries will be deleted until the low
7069 mark is reached.
7070DOC_END
cccac0a2 7071
7072NAME: netdb_high
7073TYPE: int
7074DEFAULT: 1000
7075LOC: Config.Netdb.high
7076DOC_START
638402dd
AJ
7077 The high water mark for the ICMP measurement database.
7078
7079 Note: low watermark controlled by netdb_low directive.
7080
7081 These watermarks are counts, not percents. The defaults are
7082 (low) 900 and (high) 1000. When the high water mark is
7083 reached, database entries will be deleted until the low
7084 mark is reached.
cccac0a2 7085DOC_END
7086
cccac0a2 7087NAME: netdb_ping_period
7088TYPE: time_t
7089LOC: Config.Netdb.period
7090DEFAULT: 5 minutes
7091DOC_START
7092 The minimum period for measuring a site. There will be at
7093 least this much delay between successive pings to the same
7094 network. The default is five minutes.
7095DOC_END
7096
cccac0a2 7097NAME: query_icmp
7098COMMENT: on|off
7099TYPE: onoff
7100DEFAULT: off
7101LOC: Config.onoff.query_icmp
7102DOC_START
7103 If you want to ask your peers to include ICMP data in their ICP
7104 replies, enable this option.
7105
7106 If your peer has configured Squid (during compilation) with
7f7db318 7107 '--enable-icmp' that peer will send ICMP pings to origin server
7108 sites of the URLs it receives. If you enable this option the
cccac0a2 7109 ICP replies from that peer will include the ICMP data (if available).
7110 Then, when choosing a parent cache, Squid will choose the parent with
7111 the minimal RTT to the origin server. When this happens, the
7112 hierarchy field of the access.log will be
7113 "CLOSEST_PARENT_MISS". This option is off by default.
7114DOC_END
7115
7116NAME: test_reachability
7117COMMENT: on|off
7118TYPE: onoff
7119DEFAULT: off
7120LOC: Config.onoff.test_reachability
7121DOC_START
7122 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
7123 instead of ICP_MISS if the target host is NOT in the ICMP
7124 database, or has a zero RTT.
7125DOC_END
7126
5473c134 7127NAME: icp_query_timeout
7128COMMENT: (msec)
7129DEFAULT: 0
638402dd 7130DEFAULT_DOC: Dynamic detection.
5473c134 7131TYPE: int
7132LOC: Config.Timeout.icp_query
4c3ef9b2 7133DOC_START
5473c134 7134 Normally Squid will automatically determine an optimal ICP
7135 query timeout value based on the round-trip-time of recent ICP
7136 queries. If you want to override the value determined by
7137 Squid, set this 'icp_query_timeout' to a non-zero value. This
7138 value is specified in MILLISECONDS, so, to use a 2-second
7139 timeout (the old default), you would write:
4c3ef9b2 7140
5473c134 7141 icp_query_timeout 2000
4c3ef9b2 7142DOC_END
7143
5473c134 7144NAME: maximum_icp_query_timeout
7145COMMENT: (msec)
7146DEFAULT: 2000
7147TYPE: int
7148LOC: Config.Timeout.icp_query_max
cccac0a2 7149DOC_START
5473c134 7150 Normally the ICP query timeout is determined dynamically. But
7151 sometimes it can lead to very large values (say 5 seconds).
7152 Use this option to put an upper limit on the dynamic timeout
7153 value. Do NOT use this option to always use a fixed (instead
7154 of a dynamic) timeout value. To set a fixed timeout see the
7155 'icp_query_timeout' directive.
cccac0a2 7156DOC_END
7157
5473c134 7158NAME: minimum_icp_query_timeout
7159COMMENT: (msec)
7160DEFAULT: 5
7161TYPE: int
7162LOC: Config.Timeout.icp_query_min
cccac0a2 7163DOC_START
5473c134 7164 Normally the ICP query timeout is determined dynamically. But
7165 sometimes it can lead to very small timeouts, even lower than
7166 the normal latency variance on your link due to traffic.
7167 Use this option to put an lower limit on the dynamic timeout
7168 value. Do NOT use this option to always use a fixed (instead
7169 of a dynamic) timeout value. To set a fixed timeout see the
7170 'icp_query_timeout' directive.
cccac0a2 7171DOC_END
7172
5473c134 7173NAME: background_ping_rate
7174COMMENT: time-units
7175TYPE: time_t
7176DEFAULT: 10 seconds
7177LOC: Config.backgroundPingRate
cccac0a2 7178DOC_START
5473c134 7179 Controls how often the ICP pings are sent to siblings that
7180 have background-ping set.
cccac0a2 7181DOC_END
7182
5473c134 7183COMMENT_START
7184 MULTICAST ICP OPTIONS
7185 -----------------------------------------------------------------------------
7186COMMENT_END
7187
7188NAME: mcast_groups
7189TYPE: wordlist
7190LOC: Config.mcast_group_list
8c01ada0 7191DEFAULT: none
7192DOC_START
5473c134 7193 This tag specifies a list of multicast groups which your server
7194 should join to receive multicasted ICP queries.
8c01ada0 7195
5473c134 7196 NOTE! Be very careful what you put here! Be sure you
7197 understand the difference between an ICP _query_ and an ICP
7198 _reply_. This option is to be set only if you want to RECEIVE
7199 multicast queries. Do NOT set this option to SEND multicast
7200 ICP (use cache_peer for that). ICP replies are always sent via
7201 unicast, so this option does not affect whether or not you will
7202 receive replies from multicast group members.
8c01ada0 7203
5473c134 7204 You must be very careful to NOT use a multicast address which
7205 is already in use by another group of caches.
8c01ada0 7206
5473c134 7207 If you are unsure about multicast, please read the Multicast
7208 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
8c01ada0 7209
5473c134 7210 Usage: mcast_groups 239.128.16.128 224.0.1.20
8c01ada0 7211
5473c134 7212 By default, Squid doesn't listen on any multicast groups.
7213DOC_END
8c01ada0 7214
5473c134 7215NAME: mcast_miss_addr
7216IFDEF: MULTICAST_MISS_STREAM
7217TYPE: address
7218LOC: Config.mcast_miss.addr
0eb08770 7219DEFAULT: no_addr
638402dd 7220DEFAULT_DOC: disabled.
5473c134 7221DOC_START
7222 If you enable this option, every "cache miss" URL will
7223 be sent out on the specified multicast address.
cccac0a2 7224
5473c134 7225 Do not enable this option unless you are are absolutely
7226 certain you understand what you are doing.
cccac0a2 7227DOC_END
7228
5473c134 7229NAME: mcast_miss_ttl
7230IFDEF: MULTICAST_MISS_STREAM
ae870270 7231TYPE: u_short
5473c134 7232LOC: Config.mcast_miss.ttl
7233DEFAULT: 16
cccac0a2 7234DOC_START
5473c134 7235 This is the time-to-live value for packets multicasted
7236 when multicasting off cache miss URLs is enabled. By
7237 default this is set to 'site scope', i.e. 16.
7238DOC_END
cccac0a2 7239
5473c134 7240NAME: mcast_miss_port
7241IFDEF: MULTICAST_MISS_STREAM
ae870270 7242TYPE: u_short
5473c134 7243LOC: Config.mcast_miss.port
7244DEFAULT: 3135
7245DOC_START
7246 This is the port number to be used in conjunction with
7247 'mcast_miss_addr'.
7248DOC_END
cccac0a2 7249
5473c134 7250NAME: mcast_miss_encode_key
7251IFDEF: MULTICAST_MISS_STREAM
7252TYPE: string
7253LOC: Config.mcast_miss.encode_key
7254DEFAULT: XXXXXXXXXXXXXXXX
7255DOC_START
7256 The URLs that are sent in the multicast miss stream are
7257 encrypted. This is the encryption key.
7258DOC_END
8c01ada0 7259
5473c134 7260NAME: mcast_icp_query_timeout
7261COMMENT: (msec)
7262DEFAULT: 2000
7263TYPE: int
7264LOC: Config.Timeout.mcast_icp_query
7265DOC_START
7266 For multicast peers, Squid regularly sends out ICP "probes" to
7267 count how many other peers are listening on the given multicast
7268 address. This value specifies how long Squid should wait to
7269 count all the replies. The default is 2000 msec, or 2
7270 seconds.
cccac0a2 7271DOC_END
7272
5473c134 7273COMMENT_START
7274 INTERNAL ICON OPTIONS
7275 -----------------------------------------------------------------------------
7276COMMENT_END
7277
cccac0a2 7278NAME: icon_directory
7279TYPE: string
7280LOC: Config.icons.directory
7281DEFAULT: @DEFAULT_ICON_DIR@
7282DOC_START
7283 Where the icons are stored. These are normally kept in
7284 @DEFAULT_ICON_DIR@
7285DOC_END
7286
f024c970 7287NAME: global_internal_static
7288TYPE: onoff
7289LOC: Config.onoff.global_internal_static
7290DEFAULT: on
7291DOC_START
7292 This directive controls is Squid should intercept all requests for
7293 /squid-internal-static/ no matter which host the URL is requesting
7294 (default on setting), or if nothing special should be done for
7295 such URLs (off setting). The purpose of this directive is to make
7296 icons etc work better in complex cache hierarchies where it may
7297 not always be possible for all corners in the cache mesh to reach
7298 the server generating a directory listing.
7299DOC_END
7300
5473c134 7301NAME: short_icon_urls
7302TYPE: onoff
7303LOC: Config.icons.use_short_names
7304DEFAULT: on
7305DOC_START
7306 If this is enabled Squid will use short URLs for icons.
7307 If disabled it will revert to the old behavior of including
7308 it's own name and port in the URL.
7309
7310 If you run a complex cache hierarchy with a mix of Squid and
7311 other proxies you may need to disable this directive.
7312DOC_END
7313
7314COMMENT_START
7315 ERROR PAGE OPTIONS
7316 -----------------------------------------------------------------------------
7317COMMENT_END
7318
7319NAME: error_directory
7320TYPE: string
7321LOC: Config.errorDirectory
43000484 7322DEFAULT: none
638402dd 7323DEFAULT_DOC: Send error pages in the clients preferred language
5473c134 7324DOC_START
7325 If you wish to create your own versions of the default
43000484
AJ
7326 error files to customize them to suit your company copy
7327 the error/template files to another directory and point
7328 this tag at them.
7329
7330 WARNING: This option will disable multi-language support
7331 on error pages if used.
5473c134 7332
7333 The squid developers are interested in making squid available in
7334 a wide variety of languages. If you are making translations for a
43000484 7335 language that Squid does not currently provide please consider
5473c134 7336 contributing your translation back to the project.
43000484
AJ
7337 http://wiki.squid-cache.org/Translations
7338
7339 The squid developers working on translations are happy to supply drop-in
7340 translated error files in exchange for any new language contributions.
7341DOC_END
7342
7343NAME: error_default_language
7344IFDEF: USE_ERR_LOCALES
7345TYPE: string
7346LOC: Config.errorDefaultLanguage
7347DEFAULT: none
638402dd 7348DEFAULT_DOC: Generate English language pages.
43000484
AJ
7349DOC_START
7350 Set the default language which squid will send error pages in
7351 if no existing translation matches the clients language
7352 preferences.
7353
7354 If unset (default) generic English will be used.
7355
7356 The squid developers are interested in making squid available in
7357 a wide variety of languages. If you are interested in making
7358 translations for any language see the squid wiki for details.
7359 http://wiki.squid-cache.org/Translations
5473c134 7360DOC_END
7361
c411820c
AJ
7362NAME: error_log_languages
7363IFDEF: USE_ERR_LOCALES
7364TYPE: onoff
7365LOC: Config.errorLogMissingLanguages
7366DEFAULT: on
7367DOC_START
7368 Log to cache.log what languages users are attempting to
7369 auto-negotiate for translations.
7370
7371 Successful negotiations are not logged. Only failures
7372 have meaning to indicate that Squid may need an upgrade
0c49f10e 7373 of its error page translations.
c411820c
AJ
7374DOC_END
7375
5b52cb6c
AJ
7376NAME: err_page_stylesheet
7377TYPE: string
7378LOC: Config.errorStylesheet
7379DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
7380DOC_START
7381 CSS Stylesheet to pattern the display of Squid default error pages.
7382
7383 For information on CSS see http://www.w3.org/Style/CSS/
7384DOC_END
7385
5473c134 7386NAME: err_html_text
7387TYPE: eol
7388LOC: Config.errHtmlText
7389DEFAULT: none
7390DOC_START
7391 HTML text to include in error messages. Make this a "mailto"
7392 URL to your admin address, or maybe just a link to your
7393 organizations Web page.
7394
7395 To include this in your error messages, you must rewrite
7396 the error template files (found in the "errors" directory).
7397 Wherever you want the 'err_html_text' line to appear,
7398 insert a %L tag in the error template file.
7399DOC_END
7400
7401NAME: email_err_data
7402COMMENT: on|off
7403TYPE: onoff
7404LOC: Config.onoff.emailErrData
7405DEFAULT: on
7406DOC_START
7407 If enabled, information about the occurred error will be
7408 included in the mailto links of the ERR pages (if %W is set)
7409 so that the email body contains the data.
7410 Syntax is <A HREF="mailto:%w%W">%w</A>
7411DOC_END
7412
7413NAME: deny_info
7414TYPE: denyinfo
7415LOC: Config.denyInfoList
7416DEFAULT: none
7417DOC_START
7418 Usage: deny_info err_page_name acl
7419 or deny_info http://... acl
43000484 7420 or deny_info TCP_RESET acl
5473c134 7421
7422 This can be used to return a ERR_ page for requests which
7423 do not pass the 'http_access' rules. Squid remembers the last
7424 acl it evaluated in http_access, and if a 'deny_info' line exists
7425 for that ACL Squid returns a corresponding error page.
7426
7427 The acl is typically the last acl on the http_access deny line which
7428 denied access. The exceptions to this rule are:
7429 - When Squid needs to request authentication credentials. It's then
7430 the first authentication related acl encountered
7431 - When none of the http_access lines matches. It's then the last
7432 acl processed on the last http_access line.
3af10ac0
AR
7433 - When the decision to deny access was made by an adaptation service,
7434 the acl name is the corresponding eCAP or ICAP service_name.
5473c134 7435
43000484
AJ
7436 NP: If providing your own custom error pages with error_directory
7437 you may also specify them by your custom file name:
7438 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
5473c134 7439
aed9a15b
AJ
7440 By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
7441 may be specified by prefixing the file name with the code and a colon.
7442 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
7443
5473c134 7444 Alternatively you can tell Squid to reset the TCP connection
7445 by specifying TCP_RESET.
15b02e9a
AJ
7446
7447 Or you can specify an error URL or URL pattern. The browsers will
aed9a15b
AJ
7448 get redirected to the specified URL after formatting tags have
7449 been replaced. Redirect will be done with 302 or 307 according to
7450 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
7451 the URL. e.g. 303:http://example.com/
15b02e9a
AJ
7452
7453 URL FORMAT TAGS:
7454 %a - username (if available. Password NOT included)
7455 %B - FTP path URL
7456 %e - Error number
7457 %E - Error description
7458 %h - Squid hostname
7459 %H - Request domain name
7460 %i - Client IP Address
7461 %M - Request Method
7462 %o - Message result from external ACL helper
7463 %p - Request Port number
7464 %P - Request Protocol name
7465 %R - Request URL path
7466 %T - Timestamp in RFC 1123 format
7467 %U - Full canonical URL from client
7468 (HTTPS URLs terminate with *)
7469 %u - Full canonical URL from client
7470 %w - Admin email from squid.conf
e4a8468d 7471 %x - Error name
15b02e9a
AJ
7472 %% - Literal percent (%) code
7473
5473c134 7474DOC_END
7475
7476COMMENT_START
7477 OPTIONS INFLUENCING REQUEST FORWARDING
7478 -----------------------------------------------------------------------------
7479COMMENT_END
7480
7481NAME: nonhierarchical_direct
e72a0ec0 7482TYPE: onoff
5473c134 7483LOC: Config.onoff.nonhierarchical_direct
e72a0ec0 7484DEFAULT: on
7485DOC_START
5473c134 7486 By default, Squid will send any non-hierarchical requests
7487 (matching hierarchy_stoplist or not cacheable request type) direct
7488 to origin servers.
e72a0ec0 7489
638402dd 7490 When this is set to "off", Squid will prefer to send these
5473c134 7491 requests to parents.
0b0cfcf2 7492
5473c134 7493 Note that in most configurations, by turning this off you will only
7494 add latency to these request without any improvement in global hit
7495 ratio.
0b0cfcf2 7496
638402dd
AJ
7497 This option only sets a preference. If the parent is unavailable a
7498 direct connection to the origin server may still be attempted. To
7499 completely prevent direct connections use never_direct.
8d6275c0 7500DOC_END
0b0cfcf2 7501
5473c134 7502NAME: prefer_direct
8d6275c0 7503TYPE: onoff
5473c134 7504LOC: Config.onoff.prefer_direct
8d6275c0 7505DEFAULT: off
7506DOC_START
5473c134 7507 Normally Squid tries to use parents for most requests. If you for some
7508 reason like it to first try going direct and only use a parent if
7509 going direct fails set this to on.
0b0cfcf2 7510
5473c134 7511 By combining nonhierarchical_direct off and prefer_direct on you
7512 can set up Squid to use a parent as a backup path if going direct
7513 fails.
7514
7515 Note: If you want Squid to use parents for all requests see
7516 the never_direct directive. prefer_direct only modifies how Squid
7517 acts on cacheable requests.
cccac0a2 7518DOC_END
7519
96598f93
AJ
7520NAME: cache_miss_revalidate
7521COMMENT: on|off
7522TYPE: onoff
7523DEFAULT: on
7524LOC: Config.onoff.cache_miss_revalidate
7525DOC_START
7526 Whether Squid on cache MISS will pass client revalidation requests
7527 to the server or tries to fetch new content for caching.
7528 This is useful while the cache is mostly empty to more quickly
7529 have the cache populated.
7530
7531 When set to 'on' (default), Squid will pass all client If-* headers
7532 to the server.
7533
7534 When set to 'off' and if the request is cacheable, Squid will
7535 remove the clients If-Modified-Since and If-None-Match headers from
7536 the request sent to the server.
7537DOC_END
7538
5473c134 7539NAME: always_direct
8d6275c0 7540TYPE: acl_access
5473c134 7541LOC: Config.accessList.AlwaysDirect
0b0cfcf2 7542DEFAULT: none
638402dd 7543DEFAULT_DOC: Prevent any cache_peer being used for this request.
0b0cfcf2 7544DOC_START
5473c134 7545 Usage: always_direct allow|deny [!]aclname ...
0b0cfcf2 7546
5473c134 7547 Here you can use ACL elements to specify requests which should
7548 ALWAYS be forwarded by Squid to the origin servers without using
7549 any peers. For example, to always directly forward requests for
7550 local servers ignoring any parents or siblings you may have use
7551 something like:
0b0cfcf2 7552
5473c134 7553 acl local-servers dstdomain my.domain.net
7554 always_direct allow local-servers
0b0cfcf2 7555
5473c134 7556 To always forward FTP requests directly, use
f16fbc82 7557
5473c134 7558 acl FTP proto FTP
7559 always_direct allow FTP
cccac0a2 7560
5473c134 7561 NOTE: There is a similar, but opposite option named
7562 'never_direct'. You need to be aware that "always_direct deny
7563 foo" is NOT the same thing as "never_direct allow foo". You
7564 may need to use a deny rule to exclude a more-specific case of
7565 some other rule. Example:
8d6275c0 7566
5473c134 7567 acl local-external dstdomain external.foo.net
7568 acl local-servers dstdomain .foo.net
7569 always_direct deny local-external
7570 always_direct allow local-servers
8d6275c0 7571
5473c134 7572 NOTE: If your goal is to make the client forward the request
7573 directly to the origin server bypassing Squid then this needs
7574 to be done in the client configuration. Squid configuration
7575 can only tell Squid how Squid should fetch the object.
8d6275c0 7576
5473c134 7577 NOTE: This directive is not related to caching. The replies
7578 is cached as usual even if you use always_direct. To not cache
b3567eb5 7579 the replies see the 'cache' directive.
5473c134 7580
b3567eb5
FC
7581 This clause supports both fast and slow acl types.
7582 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
cccac0a2 7583DOC_END
0976f8db 7584
5473c134 7585NAME: never_direct
7586TYPE: acl_access
7587LOC: Config.accessList.NeverDirect
7588DEFAULT: none
638402dd 7589DEFAULT_DOC: Allow DNS results to be used for this request.
8d6275c0 7590DOC_START
5473c134 7591 Usage: never_direct allow|deny [!]aclname ...
7592
7593 never_direct is the opposite of always_direct. Please read
7594 the description for always_direct if you have not already.
7595
7596 With 'never_direct' you can use ACL elements to specify
7597 requests which should NEVER be forwarded directly to origin
7598 servers. For example, to force the use of a proxy for all
7599 requests, except those in your local domain use something like:
7600
7601 acl local-servers dstdomain .foo.net
5473c134 7602 never_direct deny local-servers
7603 never_direct allow all
7604
7605 or if Squid is inside a firewall and there are local intranet
7606 servers inside the firewall use something like:
7607
7608 acl local-intranet dstdomain .foo.net
7609 acl local-external dstdomain external.foo.net
7610 always_direct deny local-external
7611 always_direct allow local-intranet
7612 never_direct allow all
7613
b3567eb5
FC
7614 This clause supports both fast and slow acl types.
7615 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8d6275c0 7616DOC_END
0976f8db 7617
5473c134 7618COMMENT_START
7619 ADVANCED NETWORKING OPTIONS
7620 -----------------------------------------------------------------------------
7621COMMENT_END
7622
65d448bc 7623NAME: incoming_udp_average incoming_icp_average
cccac0a2 7624TYPE: int
7625DEFAULT: 6
65d448bc
AJ
7626LOC: Config.comm_incoming.udp.average
7627DOC_START
7628 Heavy voodoo here. I can't even believe you are reading this.
7629 Are you crazy? Don't even think about adjusting these unless
7630 you understand the algorithms in comm_select.c first!
7631DOC_END
cccac0a2 7632
65d448bc 7633NAME: incoming_tcp_average incoming_http_average
cccac0a2 7634TYPE: int
7635DEFAULT: 4
65d448bc
AJ
7636LOC: Config.comm_incoming.tcp.average
7637DOC_START
7638 Heavy voodoo here. I can't even believe you are reading this.
7639 Are you crazy? Don't even think about adjusting these unless
7640 you understand the algorithms in comm_select.c first!
7641DOC_END
cccac0a2 7642
7643NAME: incoming_dns_average
7644TYPE: int
7645DEFAULT: 4
65d448bc
AJ
7646LOC: Config.comm_incoming.dns.average
7647DOC_START
7648 Heavy voodoo here. I can't even believe you are reading this.
7649 Are you crazy? Don't even think about adjusting these unless
7650 you understand the algorithms in comm_select.c first!
7651DOC_END
cccac0a2 7652
65d448bc 7653NAME: min_udp_poll_cnt min_icp_poll_cnt
cccac0a2 7654TYPE: int
7655DEFAULT: 8
65d448bc
AJ
7656LOC: Config.comm_incoming.udp.min_poll
7657DOC_START
7658 Heavy voodoo here. I can't even believe you are reading this.
7659 Are you crazy? Don't even think about adjusting these unless
7660 you understand the algorithms in comm_select.c first!
7661DOC_END
cccac0a2 7662
7663NAME: min_dns_poll_cnt
7664TYPE: int
7665DEFAULT: 8
65d448bc
AJ
7666LOC: Config.comm_incoming.dns.min_poll
7667DOC_START
7668 Heavy voodoo here. I can't even believe you are reading this.
7669 Are you crazy? Don't even think about adjusting these unless
7670 you understand the algorithms in comm_select.c first!
7671DOC_END
cccac0a2 7672
65d448bc 7673NAME: min_tcp_poll_cnt min_http_poll_cnt
cccac0a2 7674TYPE: int
7675DEFAULT: 8
65d448bc 7676LOC: Config.comm_incoming.tcp.min_poll
cccac0a2 7677DOC_START
5473c134 7678 Heavy voodoo here. I can't even believe you are reading this.
7679 Are you crazy? Don't even think about adjusting these unless
7680 you understand the algorithms in comm_select.c first!
7681DOC_END
7682
7683NAME: accept_filter
5473c134 7684TYPE: string
7685DEFAULT: none
7686LOC: Config.accept_filter
7687DOC_START
0b4d4be5 7688 FreeBSD:
7689
5473c134 7690 The name of an accept(2) filter to install on Squid's
7691 listen socket(s). This feature is perhaps specific to
7692 FreeBSD and requires support in the kernel.
7693
7694 The 'httpready' filter delays delivering new connections
2324cda2 7695 to Squid until a full HTTP request has been received.
0b4d4be5 7696 See the accf_http(9) man page for details.
7697
7698 The 'dataready' filter delays delivering new connections
7699 to Squid until there is some data to process.
7700 See the accf_dataready(9) man page for details.
7701
7702 Linux:
7703
7704 The 'data' filter delays delivering of new connections
7705 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
7706 You may optionally specify a number of seconds to wait by
7707 'data=N' where N is the number of seconds. Defaults to 30
7708 if not specified. See the tcp(7) man page for details.
5473c134 7709EXAMPLE:
0b4d4be5 7710# FreeBSD
5473c134 7711accept_filter httpready
0b4d4be5 7712# Linux
7713accept_filter data
5473c134 7714DOC_END
7715
ab2ecb0e
AJ
7716NAME: client_ip_max_connections
7717TYPE: int
7718LOC: Config.client_ip_max_connections
7719DEFAULT: -1
638402dd 7720DEFAULT_DOC: No limit.
ab2ecb0e
AJ
7721DOC_START
7722 Set an absolute limit on the number of connections a single
7723 client IP can use. Any more than this and Squid will begin to drop
7724 new connections from the client until it closes some links.
7725
7726 Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
7727 connections from the client. For finer control use the ACL access controls.
7728
7729 Requires client_db to be enabled (the default).
7730
7731 WARNING: This may noticably slow down traffic received via external proxies
7732 or NAT devices and cause them to rebound error messages back to their clients.
7733DOC_END
7734
5473c134 7735NAME: tcp_recv_bufsize
7736COMMENT: (bytes)
7737TYPE: b_size_t
7738DEFAULT: 0 bytes
638402dd 7739DEFAULT_DOC: Use operating system TCP defaults.
5473c134 7740LOC: Config.tcpRcvBufsz
7741DOC_START
7742 Size of receive buffer to set for TCP sockets. Probably just
638402dd
AJ
7743 as easy to change your kernel's default.
7744 Omit from squid.conf to use the default buffer size.
5473c134 7745DOC_END
7746
7747COMMENT_START
7748 ICAP OPTIONS
7749 -----------------------------------------------------------------------------
7750COMMENT_END
7751
7752NAME: icap_enable
7753TYPE: onoff
7754IFDEF: ICAP_CLIENT
7755COMMENT: on|off
26cc52cb 7756LOC: Adaptation::Icap::TheConfig.onoff
5473c134 7757DEFAULT: off
7758DOC_START
53e738c6 7759 If you want to enable the ICAP module support, set this to on.
5473c134 7760DOC_END
7761
7762NAME: icap_connect_timeout
7763TYPE: time_t
7764DEFAULT: none
26cc52cb 7765LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
5473c134 7766IFDEF: ICAP_CLIENT
7767DOC_START
7768 This parameter specifies how long to wait for the TCP connect to
7769 the requested ICAP server to complete before giving up and either
7770 terminating the HTTP transaction or bypassing the failure.
7771
7772 The default for optional services is peer_connect_timeout.
7773 The default for essential services is connect_timeout.
7774 If this option is explicitly set, its value applies to all services.
7775DOC_END
7776
7777NAME: icap_io_timeout
7778COMMENT: time-units
7779TYPE: time_t
7780DEFAULT: none
638402dd 7781DEFAULT_DOC: Use read_timeout.
26cc52cb 7782LOC: Adaptation::Icap::TheConfig.io_timeout_raw
5473c134 7783IFDEF: ICAP_CLIENT
7784DOC_START
7785 This parameter specifies how long to wait for an I/O activity on
7786 an established, active ICAP connection before giving up and
7787 either terminating the HTTP transaction or bypassing the
7788 failure.
5473c134 7789DOC_END
7790
7791NAME: icap_service_failure_limit
8277060a
CT
7792COMMENT: limit [in memory-depth time-units]
7793TYPE: icap_service_failure_limit
5473c134 7794IFDEF: ICAP_CLIENT
8277060a 7795LOC: Adaptation::Icap::TheConfig
5473c134 7796DEFAULT: 10
7797DOC_START
7798 The limit specifies the number of failures that Squid tolerates
7799 when establishing a new TCP connection with an ICAP service. If
7800 the number of failures exceeds the limit, the ICAP service is
7801 not used for new ICAP requests until it is time to refresh its
8277060a 7802 OPTIONS.
5473c134 7803
7804 A negative value disables the limit. Without the limit, an ICAP
7805 service will not be considered down due to connectivity failures
7806 between ICAP OPTIONS requests.
8277060a
CT
7807
7808 Squid forgets ICAP service failures older than the specified
7809 value of memory-depth. The memory fading algorithm
7810 is approximate because Squid does not remember individual
7811 errors but groups them instead, splitting the option
7812 value into ten time slots of equal length.
7813
7814 When memory-depth is 0 and by default this option has no
7815 effect on service failure expiration.
7816
7817 Squid always forgets failures when updating service settings
7818 using an ICAP OPTIONS transaction, regardless of this option
7819 setting.
7820
7821 For example,
7822 # suspend service usage after 10 failures in 5 seconds:
7823 icap_service_failure_limit 10 in 5 seconds
cccac0a2 7824DOC_END
7825
5473c134 7826NAME: icap_service_revival_delay
cccac0a2 7827TYPE: int
5473c134 7828IFDEF: ICAP_CLIENT
26cc52cb 7829LOC: Adaptation::Icap::TheConfig.service_revival_delay
5473c134 7830DEFAULT: 180
cccac0a2 7831DOC_START
5473c134 7832 The delay specifies the number of seconds to wait after an ICAP
7833 OPTIONS request failure before requesting the options again. The
7834 failed ICAP service is considered "down" until fresh OPTIONS are
7835 fetched.
cccac0a2 7836
5473c134 7837 The actual delay cannot be smaller than the hardcoded minimum
7838 delay of 30 seconds.
cccac0a2 7839DOC_END
7840
5473c134 7841NAME: icap_preview_enable
cccac0a2 7842TYPE: onoff
5473c134 7843IFDEF: ICAP_CLIENT
7844COMMENT: on|off
26cc52cb 7845LOC: Adaptation::Icap::TheConfig.preview_enable
ac7a62f9 7846DEFAULT: on
cccac0a2 7847DOC_START
ac7a62f9 7848 The ICAP Preview feature allows the ICAP server to handle the
7849 HTTP message by looking only at the beginning of the message body
7850 or even without receiving the body at all. In some environments,
7851 previews greatly speedup ICAP processing.
7852
7853 During an ICAP OPTIONS transaction, the server may tell Squid what
7854 HTTP messages should be previewed and how big the preview should be.
7855 Squid will not use Preview if the server did not request one.
7856
7857 To disable ICAP Preview for all ICAP services, regardless of
7858 individual ICAP server OPTIONS responses, set this option to "off".
7859Example:
7860icap_preview_enable off
cccac0a2 7861DOC_END
7862
5473c134 7863NAME: icap_preview_size
7864TYPE: int
7865IFDEF: ICAP_CLIENT
26cc52cb 7866LOC: Adaptation::Icap::TheConfig.preview_size
5473c134 7867DEFAULT: -1
638402dd 7868DEFAULT_DOC: No preview sent.
cccac0a2 7869DOC_START
53e738c6 7870 The default size of preview data to be sent to the ICAP server.
638402dd 7871 This value might be overwritten on a per server basis by OPTIONS requests.
cccac0a2 7872DOC_END
7873
83c51da9
CT
7874NAME: icap_206_enable
7875TYPE: onoff
7876IFDEF: ICAP_CLIENT
7877COMMENT: on|off
7878LOC: Adaptation::Icap::TheConfig.allow206_enable
7879DEFAULT: on
7880DOC_START
7881 206 (Partial Content) responses is an ICAP extension that allows the
7882 ICAP agents to optionally combine adapted and original HTTP message
7883 content. The decision to combine is postponed until the end of the
7884 ICAP response. Squid supports Partial Content extension by default.
7885
7886 Activation of the Partial Content extension is negotiated with each
7887 ICAP service during OPTIONS exchange. Most ICAP servers should handle
7888 negotation correctly even if they do not support the extension, but
7889 some might fail. To disable Partial Content support for all ICAP
7890 services and to avoid any negotiation, set this option to "off".
7891
7892 Example:
7893 icap_206_enable off
7894DOC_END
7895
5473c134 7896NAME: icap_default_options_ttl
7897TYPE: int
7898IFDEF: ICAP_CLIENT
26cc52cb 7899LOC: Adaptation::Icap::TheConfig.default_options_ttl
5473c134 7900DEFAULT: 60
cccac0a2 7901DOC_START
53e738c6 7902 The default TTL value for ICAP OPTIONS responses that don't have
5473c134 7903 an Options-TTL header.
cccac0a2 7904DOC_END
7905
5473c134 7906NAME: icap_persistent_connections
7907TYPE: onoff
7908IFDEF: ICAP_CLIENT
7909COMMENT: on|off
26cc52cb 7910LOC: Adaptation::Icap::TheConfig.reuse_connections
5473c134 7911DEFAULT: on
cccac0a2 7912DOC_START
5473c134 7913 Whether or not Squid should use persistent connections to
7914 an ICAP server.
cccac0a2 7915DOC_END
7916
22fff3bf 7917NAME: adaptation_send_client_ip icap_send_client_ip
5473c134 7918TYPE: onoff
22fff3bf 7919IFDEF: USE_ADAPTATION
5473c134 7920COMMENT: on|off
22fff3bf 7921LOC: Adaptation::Config::send_client_ip
5473c134 7922DEFAULT: off
cccac0a2 7923DOC_START
ea3ae478
AR
7924 If enabled, Squid shares HTTP client IP information with adaptation
7925 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
7926 For eCAP, Squid sets the libecap::metaClientIp transaction option.
7927
7928 See also: adaptation_uses_indirect_client
cccac0a2 7929DOC_END
7930
22fff3bf 7931NAME: adaptation_send_username icap_send_client_username
5473c134 7932TYPE: onoff
22fff3bf 7933IFDEF: USE_ADAPTATION
5473c134 7934COMMENT: on|off
22fff3bf 7935LOC: Adaptation::Config::send_username
5473c134 7936DEFAULT: off
cccac0a2 7937DOC_START
5473c134 7938 This sends authenticated HTTP client username (if available) to
22fff3bf
AR
7939 the adaptation service.
7940
7941 For ICAP, the username value is encoded based on the
5473c134 7942 icap_client_username_encode option and is sent using the header
7943 specified by the icap_client_username_header option.
cccac0a2 7944DOC_END
7945
5473c134 7946NAME: icap_client_username_header
cccac0a2 7947TYPE: string
5473c134 7948IFDEF: ICAP_CLIENT
26cc52cb 7949LOC: Adaptation::Icap::TheConfig.client_username_header
5473c134 7950DEFAULT: X-Client-Username
cccac0a2 7951DOC_START
db49f682 7952 ICAP request header name to use for adaptation_send_username.
cccac0a2 7953DOC_END
7954
5473c134 7955NAME: icap_client_username_encode
cccac0a2 7956TYPE: onoff
5473c134 7957IFDEF: ICAP_CLIENT
7958COMMENT: on|off
26cc52cb 7959LOC: Adaptation::Icap::TheConfig.client_username_encode
5473c134 7960DEFAULT: off
cccac0a2 7961DOC_START
5473c134 7962 Whether to base64 encode the authenticated client username.
cccac0a2 7963DOC_END
7964
5473c134 7965NAME: icap_service
7966TYPE: icap_service_type
7967IFDEF: ICAP_CLIENT
26cc52cb 7968LOC: Adaptation::Icap::TheConfig
5473c134 7969DEFAULT: none
cccac0a2 7970DOC_START
a22e6cd3 7971 Defines a single ICAP service using the following format:
cccac0a2 7972
c25c2836 7973 icap_service id vectoring_point uri [option ...]
7d90757b 7974
c25c2836
CT
7975 id: ID
7976 an opaque identifier or name which is used to direct traffic to
7977 this specific service. Must be unique among all adaptation
7978 services in squid.conf.
a22e6cd3
AR
7979
7980 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
f3db09e2 7981 This specifies at which point of transaction processing the
7982 ICAP service should be activated. *_postcache vectoring points
7983 are not yet supported.
a22e6cd3 7984
c25c2836 7985 uri: icap://servername:port/servicepath
a22e6cd3
AR
7986 ICAP server and service location.
7987
7988 ICAP does not allow a single service to handle both REQMOD and RESPMOD
7989 transactions. Squid does not enforce that requirement. You can specify
7990 services with the same service_url and different vectoring_points. You
7991 can even specify multiple identical services as long as their
7992 service_names differ.
7993
3caa16d2
AR
7994 To activate a service, use the adaptation_access directive. To group
7995 services, use adaptation_service_chain and adaptation_service_set.
a22e6cd3
AR
7996
7997 Service options are separated by white space. ICAP services support
7998 the following name=value options:
7999
8000 bypass=on|off|1|0
8001 If set to 'on' or '1', the ICAP service is treated as
8002 optional. If the service cannot be reached or malfunctions,
8003 Squid will try to ignore any errors and process the message as
8004 if the service was not enabled. No all ICAP errors can be
8005 bypassed. If set to 0, the ICAP service is treated as
8006 essential and all ICAP errors will result in an error page
8007 returned to the HTTP client.
8008
8009 Bypass is off by default: services are treated as essential.
8010
8011 routing=on|off|1|0
8012 If set to 'on' or '1', the ICAP service is allowed to
8013 dynamically change the current message adaptation plan by
8014 returning a chain of services to be used next. The services
8015 are specified using the X-Next-Services ICAP response header
8016 value, formatted as a comma-separated list of service names.
e2851fe7
AR
8017 Each named service should be configured in squid.conf. Other
8018 services are ignored. An empty X-Next-Services value results
8019 in an empty plan which ends the current adaptation.
8020
8021 Dynamic adaptation plan may cross or cover multiple supported
8022 vectoring points in their natural processing order.
a22e6cd3
AR
8023
8024 Routing is not allowed by default: the ICAP X-Next-Services
8025 response header is ignored.
8026
e6713f4e
AJ
8027 ipv6=on|off
8028 Only has effect on split-stack systems. The default on those systems
8029 is to use IPv4-only connections. When set to 'on' this option will
8030 make Squid use IPv6-only connections to contact this ICAP service.
8031
2dba5b8e
CT
8032 on-overload=block|bypass|wait|force
8033 If the service Max-Connections limit has been reached, do
8034 one of the following for each new ICAP transaction:
8035 * block: send an HTTP error response to the client
8036 * bypass: ignore the "over-connected" ICAP service
8037 * wait: wait (in a FIFO queue) for an ICAP connection slot
8038 * force: proceed, ignoring the Max-Connections limit
8039
8040 In SMP mode with N workers, each worker assumes the service
8041 connection limit is Max-Connections/N, even though not all
8042 workers may use a given service.
8043
8044 The default value is "bypass" if service is bypassable,
8045 otherwise it is set to "wait".
8046
8047
8048 max-conn=number
8049 Use the given number as the Max-Connections limit, regardless
8050 of the Max-Connections value given by the service, if any.
8051
a22e6cd3
AR
8052 Older icap_service format without optional named parameters is
8053 deprecated but supported for backward compatibility.
5473c134 8054
5473c134 8055Example:
c25c2836
CT
8056icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
8057icap_service svcLogger reqmod_precache icap://icap2.mydomain.net:1344/respmod routing=on
cccac0a2 8058DOC_END
8059
5473c134 8060NAME: icap_class
8061TYPE: icap_class_type
8062IFDEF: ICAP_CLIENT
21a26d31 8063LOC: none
5473c134 8064DEFAULT: none
cccac0a2 8065DOC_START
a22e6cd3 8066 This deprecated option was documented to define an ICAP service
62c7f90e
AR
8067 chain, even though it actually defined a set of similar, redundant
8068 services, and the chains were not supported.
5473c134 8069
62c7f90e 8070 To define a set of redundant services, please use the
a22e6cd3
AR
8071 adaptation_service_set directive. For service chains, use
8072 adaptation_service_chain.
cccac0a2 8073DOC_END
8074
5473c134 8075NAME: icap_access
8076TYPE: icap_access_type
8077IFDEF: ICAP_CLIENT
21a26d31 8078LOC: none
cccac0a2 8079DEFAULT: none
cccac0a2 8080DOC_START
a22e6cd3 8081 This option is deprecated. Please use adaptation_access, which
62c7f90e
AR
8082 has the same ICAP functionality, but comes with better
8083 documentation, and eCAP support.
cccac0a2 8084DOC_END
8085
57afc994
AR
8086COMMENT_START
8087 eCAP OPTIONS
8088 -----------------------------------------------------------------------------
8089COMMENT_END
8090
21a26d31
AR
8091NAME: ecap_enable
8092TYPE: onoff
8093IFDEF: USE_ECAP
8094COMMENT: on|off
574b508c 8095LOC: Adaptation::Ecap::TheConfig.onoff
21a26d31
AR
8096DEFAULT: off
8097DOC_START
8098 Controls whether eCAP support is enabled.
8099DOC_END
8100
8101NAME: ecap_service
8102TYPE: ecap_service_type
8103IFDEF: USE_ECAP
574b508c 8104LOC: Adaptation::Ecap::TheConfig
21a26d31
AR
8105DEFAULT: none
8106DOC_START
8107 Defines a single eCAP service
8108
c25c2836 8109 ecap_service id vectoring_point uri [option ...]
21a26d31 8110
c25c2836
CT
8111 id: ID
8112 an opaque identifier or name which is used to direct traffic to
8113 this specific service. Must be unique among all adaptation
8114 services in squid.conf.
8115
8116 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
21a26d31
AR
8117 This specifies at which point of transaction processing the
8118 eCAP service should be activated. *_postcache vectoring points
8119 are not yet supported.
c25c2836
CT
8120
8121 uri: ecap://vendor/service_name?custom&cgi=style&parameters=optional
8122 Squid uses the eCAP service URI to match this configuration
8123 line with one of the dynamically loaded services. Each loaded
8124 eCAP service must have a unique URI. Obtain the right URI from
8125 the service provider.
8126
3caa16d2
AR
8127 To activate a service, use the adaptation_access directive. To group
8128 services, use adaptation_service_chain and adaptation_service_set.
c25c2836
CT
8129
8130 Service options are separated by white space. eCAP services support
8131 the following name=value options:
8132
8133 bypass=on|off|1|0
8134 If set to 'on' or '1', the eCAP service is treated as optional.
8135 If the service cannot be reached or malfunctions, Squid will try
8136 to ignore any errors and process the message as if the service
21a26d31 8137 was not enabled. No all eCAP errors can be bypassed.
c25c2836
CT
8138 If set to 'off' or '0', the eCAP service is treated as essential
8139 and all eCAP errors will result in an error page returned to the
21a26d31 8140 HTTP client.
c25c2836
CT
8141
8142 Bypass is off by default: services are treated as essential.
8143
8144 routing=on|off|1|0
8145 If set to 'on' or '1', the eCAP service is allowed to
8146 dynamically change the current message adaptation plan by
8147 returning a chain of services to be used next.
8148
8149 Dynamic adaptation plan may cross or cover multiple supported
8150 vectoring points in their natural processing order.
8151
8152 Routing is not allowed by default.
8153
8154 Older ecap_service format without optional named parameters is
8155 deprecated but supported for backward compatibility.
8156
21a26d31
AR
8157
8158Example:
c25c2836
CT
8159ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
8160ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
21a26d31
AR
8161DOC_END
8162
57afc994
AR
8163NAME: loadable_modules
8164TYPE: wordlist
8165IFDEF: USE_LOADABLE_MODULES
8166LOC: Config.loadable_module_names
8167DEFAULT: none
8168DOC_START
8169 Instructs Squid to load the specified dynamic module(s) or activate
8170 preloaded module(s).
8171Example:
8172loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
8173DOC_END
8174
62c7f90e
AR
8175COMMENT_START
8176 MESSAGE ADAPTATION OPTIONS
8177 -----------------------------------------------------------------------------
8178COMMENT_END
8179
8180NAME: adaptation_service_set
8181TYPE: adaptation_service_set_type
8182IFDEF: USE_ADAPTATION
8183LOC: none
8184DEFAULT: none
8185DOC_START
8186
a22e6cd3
AR
8187 Configures an ordered set of similar, redundant services. This is
8188 useful when hot standby or backup adaptation servers are available.
8189
8190 adaptation_service_set set_name service_name1 service_name2 ...
8191
8192 The named services are used in the set declaration order. The first
8193 applicable adaptation service from the set is used first. The next
8194 applicable service is tried if and only if the transaction with the
8195 previous service fails and the message waiting to be adapted is still
8196 intact.
62c7f90e 8197
a22e6cd3
AR
8198 When adaptation starts, broken services are ignored as if they were
8199 not a part of the set. A broken service is a down optional service.
62c7f90e 8200
a22e6cd3
AR
8201 The services in a set must be attached to the same vectoring point
8202 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8203
8204 If all services in a set are optional then adaptation failures are
8205 bypassable. If all services in the set are essential, then a
8206 transaction failure with one service may still be retried using
8207 another service from the set, but when all services fail, the master
8208 transaction fails as well.
8209
8210 A set may contain a mix of optional and essential services, but that
8211 is likely to lead to surprising results because broken services become
8212 ignored (see above), making previously bypassable failures fatal.
8213 Technically, it is the bypassability of the last failed service that
8214 matters.
8215
8216 See also: adaptation_access adaptation_service_chain
62c7f90e
AR
8217
8218Example:
8219adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
8220adaptation service_set svcLogger loggerLocal loggerRemote
8221DOC_END
8222
a22e6cd3
AR
8223NAME: adaptation_service_chain
8224TYPE: adaptation_service_chain_type
8225IFDEF: USE_ADAPTATION
8226LOC: none
8227DEFAULT: none
8228DOC_START
8229
8230 Configures a list of complementary services that will be applied
8231 one-by-one, forming an adaptation chain or pipeline. This is useful
8232 when Squid must perform different adaptations on the same message.
8233
8234 adaptation_service_chain chain_name service_name1 svc_name2 ...
8235
8236 The named services are used in the chain declaration order. The first
8237 applicable adaptation service from the chain is used first. The next
8238 applicable service is applied to the successful adaptation results of
8239 the previous service in the chain.
8240
8241 When adaptation starts, broken services are ignored as if they were
8242 not a part of the chain. A broken service is a down optional service.
8243
8244 Request satisfaction terminates the adaptation chain because Squid
8245 does not currently allow declaration of RESPMOD services at the
8246 "reqmod_precache" vectoring point (see icap_service or ecap_service).
8247
8248 The services in a chain must be attached to the same vectoring point
8249 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8250
8251 A chain may contain a mix of optional and essential services. If an
8252 essential adaptation fails (or the failure cannot be bypassed for
8253 other reasons), the master transaction fails. Otherwise, the failure
8254 is bypassed as if the failed adaptation service was not in the chain.
8255
8256 See also: adaptation_access adaptation_service_set
8257
8258Example:
8259adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
8260DOC_END
8261
62c7f90e
AR
8262NAME: adaptation_access
8263TYPE: adaptation_access_type
8264IFDEF: USE_ADAPTATION
8265LOC: none
8266DEFAULT: none
638402dd 8267DEFAULT_DOC: Allow, unless rules exist in squid.conf.
62c7f90e
AR
8268DOC_START
8269 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
8270
8271 adaptation_access service_name allow|deny [!]aclname...
8272 adaptation_access set_name allow|deny [!]aclname...
8273
8274 At each supported vectoring point, the adaptation_access
8275 statements are processed in the order they appear in this
8276 configuration file. Statements pointing to the following services
8277 are ignored (i.e., skipped without checking their ACL):
8278
8279 - services serving different vectoring points
8280 - "broken-but-bypassable" services
8281 - "up" services configured to ignore such transactions
8282 (e.g., based on the ICAP Transfer-Ignore header).
8283
8284 When a set_name is used, all services in the set are checked
8285 using the same rules, to find the first applicable one. See
8286 adaptation_service_set for details.
8287
8288 If an access list is checked and there is a match, the
8289 processing stops: For an "allow" rule, the corresponding
8290 adaptation service is used for the transaction. For a "deny"
8291 rule, no adaptation service is activated.
8292
8293 It is currently not possible to apply more than one adaptation
8294 service at the same vectoring point to the same HTTP transaction.
8295
8296 See also: icap_service and ecap_service
8297
8298Example:
8299adaptation_access service_1 allow all
8300DOC_END
8301
a22e6cd3
AR
8302NAME: adaptation_service_iteration_limit
8303TYPE: int
8304IFDEF: USE_ADAPTATION
8305LOC: Adaptation::Config::service_iteration_limit
8306DEFAULT: 16
8307DOC_START
8308 Limits the number of iterations allowed when applying adaptation
8309 services to a message. If your longest adaptation set or chain
8310 may have more than 16 services, increase the limit beyond its
8311 default value of 16. If detecting infinite iteration loops sooner
8312 is critical, make the iteration limit match the actual number
8313 of services in your longest adaptation set or chain.
8314
8315 Infinite adaptation loops are most likely with routing services.
8316
8317 See also: icap_service routing=1
8318DOC_END
8319
3ff65596
AR
8320NAME: adaptation_masterx_shared_names
8321TYPE: string
8322IFDEF: USE_ADAPTATION
8323LOC: Adaptation::Config::masterx_shared_name
8324DEFAULT: none
8325DOC_START
8326 For each master transaction (i.e., the HTTP request and response
8327 sequence, including all related ICAP and eCAP exchanges), Squid
8328 maintains a table of metadata. The table entries are (name, value)
8329 pairs shared among eCAP and ICAP exchanges. The table is destroyed
8330 with the master transaction.
8331
8332 This option specifies the table entry names that Squid must accept
8333 from and forward to the adaptation transactions.
8334
8335 An ICAP REQMOD or RESPMOD transaction may set an entry in the
8336 shared table by returning an ICAP header field with a name
6666da11
AR
8337 specified in adaptation_masterx_shared_names.
8338
8339 An eCAP REQMOD or RESPMOD transaction may set an entry in the
8340 shared table by implementing the libecap::visitEachOption() API
8341 to provide an option with a name specified in
8342 adaptation_masterx_shared_names.
5038f9d8
AR
8343
8344 Squid will store and forward the set entry to subsequent adaptation
3ff65596
AR
8345 transactions within the same master transaction scope.
8346
8347 Only one shared entry name is supported at this time.
8348
8349Example:
8350# share authentication information among ICAP services
8351adaptation_masterx_shared_names X-Subscriber-ID
8352DOC_END
8353
71be37e0 8354NAME: adaptation_meta
d7f4a0b7 8355TYPE: note
71be37e0
CT
8356IFDEF: USE_ADAPTATION
8357LOC: Adaptation::Config::metaHeaders
8358DEFAULT: none
8359DOC_START
8360 This option allows Squid administrator to add custom ICAP request
8361 headers or eCAP options to Squid ICAP requests or eCAP transactions.
8362 Use it to pass custom authentication tokens and other
8363 transaction-state related meta information to an ICAP/eCAP service.
8364
8365 The addition of a meta header is ACL-driven:
8366 adaptation_meta name value [!]aclname ...
8367
8368 Processing for a given header name stops after the first ACL list match.
8369 Thus, it is impossible to add two headers with the same name. If no ACL
8370 lists match for a given header name, no such header is added. For
8371 example:
8372
8373 # do not debug transactions except for those that need debugging
8374 adaptation_meta X-Debug 1 needs_debugging
8375
8376 # log all transactions except for those that must remain secret
8377 adaptation_meta X-Log 1 !keep_secret
8378
8379 # mark transactions from users in the "G 1" group
8380 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
8381
8382 The "value" parameter may be a regular squid.conf token or a "double
8383 quoted string". Within the quoted string, use backslash (\) to escape
8384 any character, which is currently only useful for escaping backslashes
8385 and double quotes. For example,
8386 "this string has one backslash (\\) and two \"quotes\""
d7f4a0b7
CT
8387
8388 Used adaptation_meta header values may be logged via %note
8389 logformat code. If multiple adaptation_meta headers with the same name
8390 are used during master transaction lifetime, the header values are
8391 logged in the order they were used and duplicate values are ignored
8392 (only the first repeated value will be logged).
71be37e0
CT
8393DOC_END
8394
3ff65596
AR
8395NAME: icap_retry
8396TYPE: acl_access
8397IFDEF: ICAP_CLIENT
8398LOC: Adaptation::Icap::TheConfig.repeat
3ff65596
AR
8399DEFAULT_IF_NONE: deny all
8400DOC_START
8401 This ACL determines which retriable ICAP transactions are
8402 retried. Transactions that received a complete ICAP response
8403 and did not have to consume or produce HTTP bodies to receive
8404 that response are usually retriable.
8405
8406 icap_retry allow|deny [!]aclname ...
8407
8408 Squid automatically retries some ICAP I/O timeouts and errors
8409 due to persistent connection race conditions.
8410
8411 See also: icap_retry_limit
8412DOC_END
8413
8414NAME: icap_retry_limit
8415TYPE: int
8416IFDEF: ICAP_CLIENT
8417LOC: Adaptation::Icap::TheConfig.repeat_limit
8418DEFAULT: 0
638402dd 8419DEFAULT_DOC: No retries are allowed.
3ff65596 8420DOC_START
638402dd 8421 Limits the number of retries allowed.
3ff65596
AR
8422
8423 Communication errors due to persistent connection race
8424 conditions are unavoidable, automatically retried, and do not
8425 count against this limit.
8426
8427 See also: icap_retry
8428DOC_END
8429
8430
5473c134 8431COMMENT_START
8432 DNS OPTIONS
8433 -----------------------------------------------------------------------------
8434COMMENT_END
8435
8436NAME: check_hostnames
cccac0a2 8437TYPE: onoff
cccac0a2 8438DEFAULT: off
5473c134 8439LOC: Config.onoff.check_hostnames
cccac0a2 8440DOC_START
5473c134 8441 For security and stability reasons Squid can check
8442 hostnames for Internet standard RFC compliance. If you want
8443 Squid to perform these checks turn this directive on.
cccac0a2 8444DOC_END
8445
5473c134 8446NAME: allow_underscore
cccac0a2 8447TYPE: onoff
cccac0a2 8448DEFAULT: on
5473c134 8449LOC: Config.onoff.allow_underscore
cccac0a2 8450DOC_START
5473c134 8451 Underscore characters is not strictly allowed in Internet hostnames
8452 but nevertheless used by many sites. Set this to off if you want
8453 Squid to be strict about the standard.
8454 This check is performed only when check_hostnames is set to on.
cccac0a2 8455DOC_END
8456
5473c134 8457NAME: dns_retransmit_interval
fd0f51c4 8458TYPE: time_msec
5473c134 8459DEFAULT: 5 seconds
8460LOC: Config.Timeout.idns_retransmit
cccac0a2 8461DOC_START
5473c134 8462 Initial retransmit interval for DNS queries. The interval is
8463 doubled each time all configured DNS servers have been tried.
cccac0a2 8464DOC_END
8465
5473c134 8466NAME: dns_timeout
fd0f51c4 8467TYPE: time_msec
a541c34e 8468DEFAULT: 30 seconds
5473c134 8469LOC: Config.Timeout.idns_query
cccac0a2 8470DOC_START
5473c134 8471 DNS Query timeout. If no response is received to a DNS query
8472 within this time all DNS servers for the queried domain
8473 are assumed to be unavailable.
cccac0a2 8474DOC_END
8475
e210930b
AJ
8476NAME: dns_packet_max
8477TYPE: b_ssize_t
638402dd 8478DEFAULT_DOC: EDNS disabled
e210930b
AJ
8479DEFAULT: none
8480LOC: Config.dns.packet_max
e210930b
AJ
8481DOC_START
8482 Maximum number of bytes packet size to advertise via EDNS.
8483 Set to "none" to disable EDNS large packet support.
8484
8485 For legacy reasons DNS UDP replies will default to 512 bytes which
8486 is too small for many responses. EDNS provides a means for Squid to
8487 negotiate receiving larger responses back immediately without having
8488 to failover with repeat requests. Responses larger than this limit
8489 will retain the old behaviour of failover to TCP DNS.
8490
8491 Squid has no real fixed limit internally, but allowing packet sizes
8492 over 1500 bytes requires network jumbogram support and is usually not
8493 necessary.
8494
8495 WARNING: The RFC also indicates that some older resolvers will reply
8496 with failure of the whole request if the extension is added. Some
8497 resolvers have already been identified which will reply with mangled
8498 EDNS response on occasion. Usually in response to many-KB jumbogram
8499 sizes being advertised by Squid.
8500 Squid will currently treat these both as an unable-to-resolve domain
8501 even if it would be resolvable without EDNS.
8502DOC_END
8503
5473c134 8504NAME: dns_defnames
8505COMMENT: on|off
cccac0a2 8506TYPE: onoff
cccac0a2 8507DEFAULT: off
638402dd 8508DEFAULT_DOC: Search for single-label domain names is disabled.
5473c134 8509LOC: Config.onoff.res_defnames
cccac0a2 8510DOC_START
5473c134 8511 Normally the RES_DEFNAMES resolver option is disabled
8512 (see res_init(3)). This prevents caches in a hierarchy
8513 from interpreting single-component hostnames locally. To allow
8514 Squid to handle single-component names, enable this option.
cccac0a2 8515DOC_END
8516
bce61b00
AJ
8517NAME: dns_multicast_local
8518COMMENT: on|off
8519TYPE: onoff
8520DEFAULT: off
8521DEFAULT_DOC: Search for .local and .arpa names is disabled.
8522LOC: Config.onoff.dns_mdns
8523DOC_START
8524 When set to on, Squid sends multicast DNS lookups on the local
8525 network for domains ending in .local and .arpa.
8526 This enables local servers and devices to be contacted in an
8527 ad-hoc or zero-configuration network environment.
8528DOC_END
8529
5473c134 8530NAME: dns_nameservers
8531TYPE: wordlist
8532DEFAULT: none
638402dd 8533DEFAULT_DOC: Use operating system definitions
5473c134 8534LOC: Config.dns_nameservers
cccac0a2 8535DOC_START
5473c134 8536 Use this if you want to specify a list of DNS name servers
8537 (IP addresses) to use instead of those given in your
8538 /etc/resolv.conf file.
638402dd 8539
5473c134 8540 On Windows platforms, if no value is specified here or in
8541 the /etc/resolv.conf file, the list of DNS name servers are
8542 taken from the Windows registry, both static and dynamic DHCP
8543 configurations are supported.
cccac0a2 8544
5473c134 8545 Example: dns_nameservers 10.0.0.1 192.172.0.4
cccac0a2 8546DOC_END
8547
5473c134 8548NAME: hosts_file
cccac0a2 8549TYPE: string
5473c134 8550DEFAULT: @DEFAULT_HOSTS@
8551LOC: Config.etcHostsPath
cccac0a2 8552DOC_START
5473c134 8553 Location of the host-local IP name-address associations
8554 database. Most Operating Systems have such a file on different
8555 default locations:
8556 - Un*X & Linux: /etc/hosts
8557 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
8558 (%SystemRoot% value install default is c:\winnt)
8559 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
8560 (%SystemRoot% value install default is c:\windows)
8561 - Windows 9x/Me: %windir%\hosts
8562 (%windir% value is usually c:\windows)
8563 - Cygwin: /etc/hosts
cccac0a2 8564
5473c134 8565 The file contains newline-separated definitions, in the
8566 form ip_address_in_dotted_form name [name ...] names are
8567 whitespace-separated. Lines beginning with an hash (#)
8568 character are comments.
cccac0a2 8569
5473c134 8570 The file is checked at startup and upon configuration.
8571 If set to 'none', it won't be checked.
8572 If append_domain is used, that domain will be added to
8573 domain-local (i.e. not containing any dot character) host
8574 definitions.
cccac0a2 8575DOC_END
8576
5473c134 8577NAME: append_domain
8578TYPE: string
8579LOC: Config.appendDomain
8580DEFAULT: none
638402dd 8581DEFAULT_DOC: Use operating system definitions
6a2f3fcf 8582DOC_START
5473c134 8583 Appends local domain name to hostnames without any dots in
8584 them. append_domain must begin with a period.
8585
8586 Be warned there are now Internet names with no dots in
8587 them using only top-domain names, so setting this may
8588 cause some Internet sites to become unavailable.
8589
8590Example:
8591 append_domain .yourdomain.com
6a2f3fcf 8592DOC_END
8593
5473c134 8594NAME: ignore_unknown_nameservers
8595TYPE: onoff
8596LOC: Config.onoff.ignore_unknown_nameservers
df6fd596 8597DEFAULT: on
8598DOC_START
5473c134 8599 By default Squid checks that DNS responses are received
8600 from the same IP addresses they are sent to. If they
8601 don't match, Squid ignores the response and writes a warning
8602 message to cache.log. You can allow responses from unknown
8603 nameservers by setting this option to 'off'.
df6fd596 8604DOC_END
8605
5a0da9ec
AJ
8606NAME: dns_v4_first
8607TYPE: onoff
8608DEFAULT: off
8609LOC: Config.dns.v4_first
5a0da9ec
AJ
8610DOC_START
8611 With the IPv6 Internet being as fast or faster than IPv4 Internet
8612 for most networks Squid prefers to contact websites over IPv6.
8613
8614 This option reverses the order of preference to make Squid contact
8615 dual-stack websites over IPv4 first. Squid will still perform both
8616 IPv6 and IPv4 DNS lookups before connecting.
8617
8618 WARNING:
8619 This option will restrict the situations under which IPv6
8620 connectivity is used (and tested). Hiding network problems
8621 which would otherwise be detected and warned about.
8622DOC_END
8623
6bc15a4f 8624NAME: ipcache_size
8625COMMENT: (number of entries)
8626TYPE: int
8627DEFAULT: 1024
8628LOC: Config.ipcache.size
638402dd
AJ
8629DOC_START
8630 Maximum number of DNS IP cache entries.
8631DOC_END
6bc15a4f 8632
8633NAME: ipcache_low
8634COMMENT: (percent)
8635TYPE: int
8636DEFAULT: 90
8637LOC: Config.ipcache.low
8638DOC_NONE
8639
8640NAME: ipcache_high
8641COMMENT: (percent)
8642TYPE: int
8643DEFAULT: 95
8644LOC: Config.ipcache.high
8645DOC_START
8646 The size, low-, and high-water marks for the IP cache.
8647DOC_END
8648
8649NAME: fqdncache_size
8650COMMENT: (number of entries)
8651TYPE: int
8652DEFAULT: 1024
8653LOC: Config.fqdncache.size
8654DOC_START
8655 Maximum number of FQDN cache entries.
8656DOC_END
8657
a58ff010 8658COMMENT_START
5473c134 8659 MISCELLANEOUS
a58ff010 8660 -----------------------------------------------------------------------------
8661COMMENT_END
8662
2eceb328
CT
8663NAME: configuration_includes_quoted_values
8664COMMENT: on|off
bde7a8ce
CT
8665TYPE: configuration_includes_quoted_values
8666DEFAULT: off
2eceb328
CT
8667LOC: ConfigParser::RecognizeQuotedValues
8668DOC_START
8669 If set, Squid will recognize each "quoted string" after a configuration
8670 directive as a single parameter. The quotes are stripped before the
8671 parameter value is interpreted or used.
8672 See "Values with spaces, quotes, and other special characters"
8673 section for more details.
8674DOC_END
8675
5473c134 8676NAME: memory_pools
a58ff010 8677COMMENT: on|off
5473c134 8678TYPE: onoff
8679DEFAULT: on
8680LOC: Config.onoff.mem_pools
a58ff010 8681DOC_START
5473c134 8682 If set, Squid will keep pools of allocated (but unused) memory
8683 available for future use. If memory is a premium on your
8684 system and you believe your malloc library outperforms Squid
8685 routines, disable this.
a58ff010 8686DOC_END
8687
5473c134 8688NAME: memory_pools_limit
8689COMMENT: (bytes)
70be1349 8690TYPE: b_int64_t
5473c134 8691DEFAULT: 5 MB
8692LOC: Config.MemPools.limit
ec1245f8 8693DOC_START
5473c134 8694 Used only with memory_pools on:
8695 memory_pools_limit 50 MB
ec1245f8 8696
5473c134 8697 If set to a non-zero value, Squid will keep at most the specified
8698 limit of allocated (but unused) memory in memory pools. All free()
8699 requests that exceed this limit will be handled by your malloc
8700 library. Squid does not pre-allocate any memory, just safe-keeps
8701 objects that otherwise would be free()d. Thus, it is safe to set
8702 memory_pools_limit to a reasonably high value even if your
8703 configuration will use less memory.
ec1245f8 8704
89646bd7 8705 If set to none, Squid will keep all memory it can. That is, there
5473c134 8706 will be no limit on the total amount of memory used for safe-keeping.
ec1245f8 8707
5473c134 8708 To disable memory allocation optimization, do not set
70be1349 8709 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
5473c134 8710
8711 An overhead for maintaining memory pools is not taken into account
8712 when the limit is checked. This overhead is close to four bytes per
8713 object kept. However, pools may actually _save_ memory because of
8714 reduced memory thrashing in your malloc library.
ec1245f8 8715DOC_END
8716
5473c134 8717NAME: forwarded_for
67c06f0d
AJ
8718COMMENT: on|off|transparent|truncate|delete
8719TYPE: string
5473c134 8720DEFAULT: on
8721LOC: opt_forwarded_for
5f8252d2 8722DOC_START
67c06f0d
AJ
8723 If set to "on", Squid will append your client's IP address
8724 in the HTTP requests it forwards. By default it looks like:
5f8252d2 8725
5473c134 8726 X-Forwarded-For: 192.1.2.3
8727
67c06f0d 8728 If set to "off", it will appear as
5473c134 8729
8730 X-Forwarded-For: unknown
67c06f0d
AJ
8731
8732 If set to "transparent", Squid will not alter the
8733 X-Forwarded-For header in any way.
8734
8735 If set to "delete", Squid will delete the entire
8736 X-Forwarded-For header.
8737
8738 If set to "truncate", Squid will remove all existing
dd68402f 8739 X-Forwarded-For entries, and place the client IP as the sole entry.
5f8252d2 8740DOC_END
8741
5473c134 8742NAME: cachemgr_passwd
8743TYPE: cachemgrpasswd
8744DEFAULT: none
638402dd 8745DEFAULT_DOC: No password. Actions which require password are denied.
5473c134 8746LOC: Config.passwd_list
5f8252d2 8747DOC_START
5473c134 8748 Specify passwords for cachemgr operations.
5f8252d2 8749
5473c134 8750 Usage: cachemgr_passwd password action action ...
8751
8752 Some valid actions are (see cache manager menu for a full list):
8753 5min
8754 60min
8755 asndb
8756 authenticator
8757 cbdata
8758 client_list
8759 comm_incoming
8760 config *
8761 counters
8762 delay
8763 digest_stats
8764 dns
8765 events
8766 filedescriptors
8767 fqdncache
8768 histograms
8769 http_headers
8770 info
8771 io
8772 ipcache
8773 mem
8774 menu
8775 netdb
8776 non_peers
8777 objects
8778 offline_toggle *
8779 pconn
8780 peer_select
b360c477 8781 reconfigure *
5473c134 8782 redirector
8783 refresh
8784 server_list
8785 shutdown *
8786 store_digest
8787 storedir
8788 utilization
8789 via_headers
8790 vm_objects
8791
8792 * Indicates actions which will not be performed without a
8793 valid password, others can be performed if not listed here.
8794
8795 To disable an action, set the password to "disable".
8796 To allow performing an action without a password, set the
8797 password to "none".
8798
8799 Use the keyword "all" to set the same password for all actions.
8800
8801Example:
8802 cachemgr_passwd secret shutdown
8803 cachemgr_passwd lesssssssecret info stats/objects
8804 cachemgr_passwd disable all
5f8252d2 8805DOC_END
8806
5473c134 8807NAME: client_db
a58ff010 8808COMMENT: on|off
5473c134 8809TYPE: onoff
8810DEFAULT: on
8811LOC: Config.onoff.client_db
a58ff010 8812DOC_START
5473c134 8813 If you want to disable collecting per-client statistics,
8814 turn off client_db here.
a58ff010 8815DOC_END
8816
5473c134 8817NAME: refresh_all_ims
8818COMMENT: on|off
8819TYPE: onoff
8820DEFAULT: off
8821LOC: Config.onoff.refresh_all_ims
a58ff010 8822DOC_START
5473c134 8823 When you enable this option, squid will always check
8824 the origin server for an update when a client sends an
8825 If-Modified-Since request. Many browsers use IMS
8826 requests when the user requests a reload, and this
8827 ensures those clients receive the latest version.
a58ff010 8828
5473c134 8829 By default (off), squid may return a Not Modified response
8830 based on the age of the cached version.
78e8cfc4 8831DOC_END
8832
5473c134 8833NAME: reload_into_ims
626096be 8834IFDEF: USE_HTTP_VIOLATIONS
12b91c99 8835COMMENT: on|off
5473c134 8836TYPE: onoff
8837DEFAULT: off
8838LOC: Config.onoff.reload_into_ims
12b91c99 8839DOC_START
5473c134 8840 When you enable this option, client no-cache or ``reload''
8841 requests will be changed to If-Modified-Since requests.
8842 Doing this VIOLATES the HTTP standard. Enabling this
8843 feature could make you liable for problems which it
8844 causes.
8845
8846 see also refresh_pattern for a more selective approach.
12b91c99 8847DOC_END
8848
31ef19cd 8849NAME: connect_retries
5473c134 8850TYPE: int
31ef19cd
AJ
8851LOC: Config.connect_retries
8852DEFAULT: 0
638402dd 8853DEFAULT_DOC: Do not retry failed connections.
a58ff010 8854DOC_START
aed188fd
AJ
8855 This sets the maximum number of connection attempts made for each
8856 TCP connection. The connect_retries attempts must all still
8857 complete within the connection timeout period.
31ef19cd
AJ
8858
8859 The default is not to re-try if the first connection attempt fails.
8860 The (not recommended) maximum is 10 tries.
5473c134 8861
31ef19cd
AJ
8862 A warning message will be generated if it is set to a too-high
8863 value and the configured value will be over-ridden.
5473c134 8864
31ef19cd
AJ
8865 Note: These re-tries are in addition to forward_max_tries
8866 which limit how many different addresses may be tried to find
8867 a useful server.
a58ff010 8868DOC_END
8869
5473c134 8870NAME: retry_on_error
a58ff010 8871TYPE: onoff
5473c134 8872LOC: Config.retry.onerror
a58ff010 8873DEFAULT: off
8874DOC_START
aea8548b
AJ
8875 If set to ON Squid will automatically retry requests when
8876 receiving an error response with status 403 (Forbidden),
8877 500 (Internal Error), 501 or 503 (Service not available).
8878 Status 502 and 504 (Gateway errors) are always retried.
8879
8880 This is mainly useful if you are in a complex cache hierarchy to
8881 work around access control errors.
8882
8883 NOTE: This retry will attempt to find another working destination.
8884 Which is different from the server which just failed.
5f8252d2 8885DOC_END
8886
5473c134 8887NAME: as_whois_server
5f8252d2 8888TYPE: string
5473c134 8889LOC: Config.as_whois_server
8890DEFAULT: whois.ra.net
5f8252d2 8891DOC_START
5473c134 8892 WHOIS server to query for AS numbers. NOTE: AS numbers are
8893 queried only when Squid starts up, not for every request.
5f8252d2 8894DOC_END
8895
5473c134 8896NAME: offline_mode
5f8252d2 8897TYPE: onoff
5473c134 8898LOC: Config.onoff.offline
5f8252d2 8899DEFAULT: off
8900DOC_START
5473c134 8901 Enable this option and Squid will never try to validate cached
8902 objects.
a58ff010 8903DOC_END
8904
5473c134 8905NAME: uri_whitespace
8906TYPE: uri_whitespace
8907LOC: Config.uri_whitespace
8908DEFAULT: strip
a58ff010 8909DOC_START
5473c134 8910 What to do with requests that have whitespace characters in the
8911 URI. Options:
a58ff010 8912
5473c134 8913 strip: The whitespace characters are stripped out of the URL.
82806837
AJ
8914 This is the behavior recommended by RFC2396 and RFC3986
8915 for tolerant handling of generic URI.
8916 NOTE: This is one difference between generic URI and HTTP URLs.
8917
5473c134 8918 deny: The request is denied. The user receives an "Invalid
8919 Request" message.
82806837
AJ
8920 This is the behaviour recommended by RFC2616 for safe
8921 handling of HTTP request URL.
8922
5473c134 8923 allow: The request is allowed and the URI is not changed. The
8924 whitespace characters remain in the URI. Note the
8925 whitespace is passed to redirector processes if they
8926 are in use.
82806837
AJ
8927 Note this may be considered a violation of RFC2616
8928 request parsing where whitespace is prohibited in the
8929 URL field.
8930
5473c134 8931 encode: The request is allowed and the whitespace characters are
82806837
AJ
8932 encoded according to RFC1738.
8933
5473c134 8934 chop: The request is allowed and the URI is chopped at the
82806837
AJ
8935 first whitespace.
8936
8937
8938 NOTE the current Squid implementation of encode and chop violates
8939 RFC2616 by not using a 301 redirect after altering the URL.
5473c134 8940DOC_END
a58ff010 8941
5473c134 8942NAME: chroot
8943TYPE: string
8944LOC: Config.chroot_dir
a58ff010 8945DEFAULT: none
8946DOC_START
9f37c18a 8947 Specifies a directory where Squid should do a chroot() while
2d89f399
HN
8948 initializing. This also causes Squid to fully drop root
8949 privileges after initializing. This means, for example, if you
8950 use a HTTP port less than 1024 and try to reconfigure, you may
8951 get an error saying that Squid can not open the port.
5473c134 8952DOC_END
a58ff010 8953
5473c134 8954NAME: balance_on_multiple_ip
8955TYPE: onoff
8956LOC: Config.onoff.balance_on_multiple_ip
cc192b50 8957DEFAULT: off
5473c134 8958DOC_START
cc192b50 8959 Modern IP resolvers in squid sort lookup results by preferred access.
8960 By default squid will use these IP in order and only rotates to
8961 the next listed when the most preffered fails.
8962
5473c134 8963 Some load balancing servers based on round robin DNS have been
8964 found not to preserve user session state across requests
8965 to different IP addresses.
a58ff010 8966
cc192b50 8967 Enabling this directive Squid rotates IP's per request.
a58ff010 8968DOC_END
8969
5473c134 8970NAME: pipeline_prefetch
079a8480
AJ
8971TYPE: pipelinePrefetch
8972LOC: Config.pipeline_max_prefetch
8973DEFAULT: 0
8974DEFAULT_DOC: Do not pre-parse pipelined requests.
a58ff010 8975DOC_START
079a8480
AJ
8976 HTTP clients may send a pipeline of 1+N requests to Squid using a
8977 single connection, without waiting for Squid to respond to the first
8978 of those requests. This option limits the number of concurrent
8979 requests Squid will try to handle in parallel. If set to N, Squid
8980 will try to receive and process up to 1+N requests on the same
8981 connection concurrently.
a58ff010 8982
079a8480 8983 Defaults to 0 (off) for bandwidth management and access logging
5473c134 8984 reasons.
a0e23afd 8985
079a8480
AJ
8986 NOTE: pipelining requires persistent connections to clients.
8987
a0e23afd 8988 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
5473c134 8989DOC_END
a58ff010 8990
5473c134 8991NAME: high_response_time_warning
8992TYPE: int
8993COMMENT: (msec)
8994LOC: Config.warnings.high_rptm
8995DEFAULT: 0
638402dd 8996DEFAULT_DOC: disabled.
5473c134 8997DOC_START
8998 If the one-minute median response time exceeds this value,
8999 Squid prints a WARNING with debug level 0 to get the
9000 administrators attention. The value is in milliseconds.
a58ff010 9001DOC_END
9002
5473c134 9003NAME: high_page_fault_warning
9004TYPE: int
9005LOC: Config.warnings.high_pf
9006DEFAULT: 0
638402dd 9007DEFAULT_DOC: disabled.
cc9f92d4 9008DOC_START
5473c134 9009 If the one-minute average page fault rate exceeds this
9010 value, Squid prints a WARNING with debug level 0 to get
9011 the administrators attention. The value is in page faults
9012 per second.
9013DOC_END
cc9f92d4 9014
5473c134 9015NAME: high_memory_warning
9016TYPE: b_size_t
9017LOC: Config.warnings.high_memory
4bf2a476 9018IFDEF: HAVE_MSTATS && HAVE_GNUMALLOC_H
904971da 9019DEFAULT: 0 KB
638402dd 9020DEFAULT_DOC: disabled.
5473c134 9021DOC_START
4bf2a476
FC
9022 If the memory usage (as determined by gnumalloc, if available and used)
9023 exceeds this amount, Squid prints a WARNING with debug level 0 to get
5473c134 9024 the administrators attention.
9025DOC_END
4bf2a476 9026# TODO: link high_memory_warning to mempools?
cc9f92d4 9027
5473c134 9028NAME: sleep_after_fork
9029COMMENT: (microseconds)
9030TYPE: int
9031LOC: Config.sleep_after_fork
9032DEFAULT: 0
9033DOC_START
9034 When this is set to a non-zero value, the main Squid process
9035 sleeps the specified number of microseconds after a fork()
9036 system call. This sleep may help the situation where your
9037 system reports fork() failures due to lack of (virtual)
9038 memory. Note, however, if you have a lot of child
9039 processes, these sleep delays will add up and your
9040 Squid will not service requests for some amount of time
9041 until all the child processes have been started.
9042 On Windows value less then 1000 (1 milliseconds) are
9043 rounded to 1000.
cc9f92d4 9044DOC_END
9045
b6696974 9046NAME: windows_ipaddrchangemonitor
7aa9bb3e 9047IFDEF: _SQUID_WINDOWS_
b6696974
GS
9048COMMENT: on|off
9049TYPE: onoff
9050DEFAULT: on
9051LOC: Config.onoff.WIN32_IpAddrChangeMonitor
9052DOC_START
9053 On Windows Squid by default will monitor IP address changes and will
9054 reconfigure itself after any detected event. This is very useful for
9055 proxies connected to internet with dial-up interfaces.
9056 In some cases (a Proxy server acting as VPN gateway is one) it could be
9057 desiderable to disable this behaviour setting this to 'off'.
9058 Note: after changing this, Squid service must be restarted.
9059DOC_END
9060
a98c2da5
AJ
9061NAME: eui_lookup
9062TYPE: onoff
9063IFDEF: USE_SQUID_EUI
9064DEFAULT: on
9065LOC: Eui::TheConfig.euiLookup
9066DOC_START
9067 Whether to lookup the EUI or MAC address of a connected client.
9068DOC_END
9069
f3f0f563
AJ
9070NAME: max_filedescriptors max_filedesc
9071TYPE: int
9072DEFAULT: 0
638402dd 9073DEFAULT_DOC: Use operating system limits set by ulimit.
f3f0f563
AJ
9074LOC: Config.max_filedescriptors
9075DOC_START
638402dd
AJ
9076 Reduce the maximum number of filedescriptors supported below
9077 the usual operating system defaults.
f3f0f563 9078
638402dd 9079 Remove from squid.conf to inherit the current ulimit setting.
f3f0f563
AJ
9080
9081 Note: Changing this requires a restart of Squid. Also
638402dd 9082 not all I/O types supports large values (eg on Windows).
f3f0f563
AJ
9083DOC_END
9084
13aeac35 9085NAME: workers
007d775d 9086TYPE: int
13aeac35 9087LOC: Config.workers
007d775d 9088DEFAULT: 1
638402dd 9089DEFAULT_DOC: SMP support disabled.
007d775d 9090DOC_START
13aeac35 9091 Number of main Squid processes or "workers" to fork and maintain.
007d775d
AR
9092 0: "no daemon" mode, like running "squid -N ..."
9093 1: "no SMP" mode, start one main Squid process daemon (default)
13aeac35
AR
9094 N: start N main Squid process daemons (i.e., SMP mode)
9095
b87f6632
AR
9096 In SMP mode, each worker does nearly all what a single Squid daemon
9097 does (e.g., listen on http_port and forward HTTP requests).
007d775d
AR
9098DOC_END
9099
96c2bb61
AR
9100NAME: cpu_affinity_map
9101TYPE: CpuAffinityMap
9102LOC: Config.cpuAffinityMap
9103DEFAULT: none
638402dd 9104DEFAULT_DOC: Let operating system decide.
96c2bb61
AR
9105DOC_START
9106 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
9107
9108 Sets 1:1 mapping between Squid processes and CPU cores. For example,
9109
9110 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
9111
9112 affects processes 1 through 4 only and places them on the first
9113 four even cores, starting with core #1.
9114
9115 CPU cores are numbered starting from 1. Requires support for
9116 sched_getaffinity(2) and sched_setaffinity(2) system calls.
9117
9118 Multiple cpu_affinity_map options are merged.
9119
9120 See also: workers
9121DOC_END
9122
cccac0a2 9123EOF