]> git.ipfire.org Git - thirdparty/squid.git/blame - src/cf.data.pre
SBuf: convert HttpMethod internals
[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
ddf5aa2b
CT
4489TYPE: ftp_epsv
4490DEFAULT: none
4491LOC: Config.accessList.ftp_epsv
51ee534d
AJ
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 4499
ddf5aa2b
CT
4500 EPSV is often required to interoperate with FTP servers on IPv6
4501 networks. On the other hand, it may break some IPv4 servers.
4502
4503 By default, EPSV may try EPSV with any FTP server. To fine tune
4504 that decision, you may restrict EPSV to certain clients or servers
4505 using ACLs:
4506
4507 ftp_epsv allow|deny al1 acl2 ...
4508
4509 WARNING: Disabling EPSV may cause problems with external NAT and IPv6.
51ee534d 4510
ddf5aa2b 4511 Only fast ACLs are supported.
51ee534d 4512 Requires ftp_passive to be ON (default) for any effect.
41bd17a4 4513DOC_END
9e7dbc51 4514
63ee5443
AJ
4515NAME: ftp_eprt
4516TYPE: onoff
4517DEFAULT: on
4518LOC: Config.Ftp.eprt
4519DOC_START
4520 FTP Protocol extensions permit the use of a special "EPRT" command.
4521
4522 This extension provides a protocol neutral alternative to the
4523 IPv4-only PORT command. When supported it enables active FTP data
4524 channels over IPv6 and efficient NAT handling.
4525
4526 Turning this OFF will prevent EPRT being attempted and will skip
4527 straight to using PORT for IPv4 servers.
4528
4529 Some devices are known to not handle this extension correctly and
4530 may result in crashes. Devices which suport EPRT enough to fail
4531 cleanly will result in Squid attempting PORT anyway. This directive
4532 should only be disabled when EPRT results in device failures.
4533
4534 WARNING: Doing so will convert Squid back to the old behavior with all
4535 the related problems with external NAT devices/layers and IPv4-only FTP.
4536DOC_END
4537
41bd17a4 4538NAME: ftp_sanitycheck
4539TYPE: onoff
4540DEFAULT: on
4541LOC: Config.Ftp.sanitycheck
4542DOC_START
4543 For security and data integrity reasons Squid by default performs
4544 sanity checks of the addresses of FTP data connections ensure the
4545 data connection is to the requested server. If you need to allow
4546 FTP connections to servers using another IP address for the data
4547 connection turn this off.
4548DOC_END
9e7dbc51 4549
41bd17a4 4550NAME: ftp_telnet_protocol
4551TYPE: onoff
4552DEFAULT: on
4553LOC: Config.Ftp.telnet
4554DOC_START
4555 The FTP protocol is officially defined to use the telnet protocol
4556 as transport channel for the control connection. However, many
4557 implementations are broken and does not respect this aspect of
4558 the FTP protocol.
4559
4560 If you have trouble accessing files with ASCII code 255 in the
4561 path or similar problems involving this ASCII code you can
4562 try setting this directive to off. If that helps, report to the
4563 operator of the FTP server in question that their FTP server
4564 is broken and does not follow the FTP standard.
4565DOC_END
4566
4567COMMENT_START
4568 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
4569 -----------------------------------------------------------------------------
4570COMMENT_END
4571
4572NAME: diskd_program
4573TYPE: string
4574DEFAULT: @DEFAULT_DISKD@
4575LOC: Config.Program.diskd
4576DOC_START
4577 Specify the location of the diskd executable.
4578 Note this is only useful if you have compiled in
4579 diskd as one of the store io modules.
4580DOC_END
4581
4582NAME: unlinkd_program
4583IFDEF: USE_UNLINKD
4584TYPE: string
4585DEFAULT: @DEFAULT_UNLINKD@
4586LOC: Config.Program.unlinkd
4587DOC_START
4588 Specify the location of the executable for file deletion process.
4589DOC_END
4590
4591NAME: pinger_program
4592TYPE: string
4593DEFAULT: @DEFAULT_PINGER@
cc192b50 4594LOC: Config.pinger.program
41bd17a4 4595IFDEF: USE_ICMP
4596DOC_START
4597 Specify the location of the executable for the pinger process.
4598DOC_END
4599
cc192b50 4600NAME: pinger_enable
4601TYPE: onoff
4602DEFAULT: on
4603LOC: Config.pinger.enable
4604IFDEF: USE_ICMP
4605DOC_START
4606 Control whether the pinger is active at run-time.
b3567eb5
FC
4607 Enables turning ICMP pinger on and off with a simple
4608 squid -k reconfigure.
cc192b50 4609DOC_END
4610
4611
41bd17a4 4612COMMENT_START
4613 OPTIONS FOR URL REWRITING
4614 -----------------------------------------------------------------------------
4615COMMENT_END
4616
4617NAME: url_rewrite_program redirect_program
4618TYPE: wordlist
4619LOC: Config.Program.redirect
4620DEFAULT: none
4621DOC_START
2c7aad89 4622 Specify the location of the executable URL rewriter to use.
41bd17a4 4623 Since they can perform almost any function there isn't one included.
4624
2c7aad89 4625 For each requested URL, the rewriter will receive on line with the format
41bd17a4 4626
b11724bb 4627 [channel-ID <SP>] URL [<SP> extras]<NL>
5269ec0e 4628
c71adec1 4629
5269ec0e
AJ
4630 After processing the request the helper must reply using the following format:
4631
24eac830 4632 [channel-ID <SP>] result [<SP> kv-pairs]
5269ec0e
AJ
4633
4634 The result code can be:
4635
4636 OK status=30N url="..."
4637 Redirect the URL to the one supplied in 'url='.
4638 'status=' is optional and contains the status code to send
4639 the client in Squids HTTP response. It must be one of the
4640 HTTP redirect status codes: 301, 302, 303, 307, 308.
4641 When no status is given Squid will use 302.
c71adec1 4642
5269ec0e
AJ
4643 OK rewrite-url="..."
4644 Rewrite the URL to the one supplied in 'rewrite-url='.
4645 The new URL is fetched directly by Squid and returned to
4646 the client as the response to its request.
4647
c2cbbb02
AJ
4648 OK
4649 When neither of url= and rewrite-url= are sent Squid does
4650 not change the URL.
4651
5269ec0e
AJ
4652 ERR
4653 Do not change the URL.
4654
4655 BH
4ded749e 4656 An internal error occurred in the helper, preventing
c2cbbb02
AJ
4657 a result being identified. The 'message=' key name is
4658 reserved for delivering a log message.
5269ec0e
AJ
4659
4660
4661 In the future, the interface protocol will be extended with
24eac830 4662 key=value pairs ("kv-pairs" shown above). Helper programs
c71adec1 4663 should be prepared to receive and possibly ignore additional
4664 whitespace-separated tokens on each input line.
41bd17a4 4665
5269ec0e
AJ
4666 When using the concurrency= option the protocol is changed by
4667 introducing a query channel tag in front of the request/response.
4668 The query channel tag is a number between 0 and concurrency-1.
4669 This value must be echoed back unchanged to Squid as the first part
4670 of the response relating to its request.
4671
4672 WARNING: URL re-writing ability should be avoided whenever possible.
4673 Use the URL redirect form of response instead.
41bd17a4 4674
5269ec0e
AJ
4675 Re-write creates a difference in the state held by the client
4676 and server. Possibly causing confusion when the server response
4677 contains snippets of its view state. Embeded URLs, response
4678 and content Location headers, etc. are not re-written by this
4679 interface.
41bd17a4 4680
4681 By default, a URL rewriter is not used.
4682DOC_END
4683
4684NAME: url_rewrite_children redirect_children
48d54e4d 4685TYPE: HelperChildConfig
5b708d95 4686DEFAULT: 20 startup=0 idle=1 concurrency=0
41bd17a4 4687LOC: Config.redirectChildren
4688DOC_START
48d54e4d
AJ
4689 The maximum number of redirector processes to spawn. If you limit
4690 it too few Squid will have to wait for them to process a backlog of
4691 URLs, slowing it down. If you allow too many they will use RAM
4692 and other system resources noticably.
4693
4694 The startup= and idle= options allow some measure of skew in your
4695 tuning.
4696
4697 startup=
4698
4699 Sets a minimum of how many processes are to be spawned when Squid
4700 starts or reconfigures. When set to zero the first request will
4701 cause spawning of the first child process to handle it.
4702
4703 Starting too few will cause an initial slowdown in traffic as Squid
4704 attempts to simultaneously spawn enough processes to cope.
4705
4706 idle=
4707
4708 Sets a minimum of how many processes Squid is to try and keep available
4709 at all times. When traffic begins to rise above what the existing
4710 processes can handle this many more will be spawned up to the maximum
4711 configured. A minimum setting of 1 is required.
4712
4713 concurrency=
41bd17a4 4714
41bd17a4 4715 The number of requests each redirector helper can handle in
4716 parallel. Defaults to 0 which indicates the redirector
4717 is a old-style single threaded redirector.
6a171502
AJ
4718
4719 When this directive is set to a value >= 1 then the protocol
4720 used to communicate with the helper is modified to include
9bef05b1
AJ
4721 an ID in front of the request/response. The ID from the request
4722 must be echoed back with the response to that request.
41bd17a4 4723DOC_END
4724
4725NAME: url_rewrite_host_header redirect_rewrites_host_header
4726TYPE: onoff
4727DEFAULT: on
4728LOC: Config.onoff.redir_rewrites_host
4729DOC_START
3ce33807
AJ
4730 To preserve same-origin security policies in browsers and
4731 prevent Host: header forgery by redirectors Squid rewrites
4732 any Host: header in redirected requests.
4733
4734 If you are running an accelerator this may not be a wanted
4735 effect of a redirector. This directive enables you disable
4736 Host: alteration in reverse-proxy traffic.
4737
41bd17a4 4738 WARNING: Entries are cached on the result of the URL rewriting
4739 process, so be careful if you have domain-virtual hosts.
3ce33807
AJ
4740
4741 WARNING: Squid and other software verifies the URL and Host
4742 are matching, so be careful not to relay through other proxies
4743 or inspecting firewalls with this disabled.
41bd17a4 4744DOC_END
4745
4746NAME: url_rewrite_access redirector_access
4747TYPE: acl_access
4748DEFAULT: none
638402dd 4749DEFAULT_DOC: Allow, unless rules exist in squid.conf.
41bd17a4 4750LOC: Config.accessList.redirector
4751DOC_START
4752 If defined, this access list specifies which requests are
638402dd 4753 sent to the redirector processes.
b3567eb5
FC
4754
4755 This clause supports both fast and slow acl types.
4756 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 4757DOC_END
4758
4759NAME: url_rewrite_bypass redirector_bypass
4760TYPE: onoff
4761LOC: Config.onoff.redirector_bypass
4762DEFAULT: off
4763DOC_START
4764 When this is 'on', a request will not go through the
638402dd 4765 redirector if all the helpers are busy. If this is 'off'
41bd17a4 4766 and the redirector queue grows too large, Squid will exit
4767 with a FATAL error and ask you to increase the number of
4768 redirectors. You should only enable this if the redirectors
4769 are not critical to your caching system. If you use
4770 redirectors for access control, and you enable this option,
4771 users may have access to pages they should not
4772 be allowed to request.
4773DOC_END
4774
fe7966ec 4775NAME: url_rewrite_extras
b11724bb
CT
4776TYPE: TokenOrQuotedString
4777LOC: Config.redirector_extras
4778DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
4779DOC_START
4780 Specifies a string to be append to request line format for the
4781 rewriter helper. "Quoted" format values may contain spaces and
4782 logformat %macros. In theory, any logformat %macro can be used.
4783 In practice, a %macro expands as a dash (-) if the helper request is
4784 sent before the required macro information is available to Squid.
4785DOC_END
4786
a8a0b1c2
EC
4787COMMENT_START
4788 OPTIONS FOR STORE ID
4789 -----------------------------------------------------------------------------
4790COMMENT_END
4791
4792NAME: store_id_program storeurl_rewrite_program
4793TYPE: wordlist
4794LOC: Config.Program.store_id
4795DEFAULT: none
4796DOC_START
4797 Specify the location of the executable StoreID helper to use.
4798 Since they can perform almost any function there isn't one included.
4799
4800 For each requested URL, the helper will receive one line with the format
4801
b11724bb 4802 [channel-ID <SP>] URL [<SP> extras]<NL>
a8a0b1c2
EC
4803
4804
4805 After processing the request the helper must reply using the following format:
4806
4807 [channel-ID <SP>] result [<SP> kv-pairs]
4808
4809 The result code can be:
4810
4811 OK store-id="..."
4812 Use the StoreID supplied in 'store-id='.
4813
4814 ERR
4815 The default is to use HTTP request URL as the store ID.
4816
4817 BH
4818 An internal error occured in the helper, preventing
4819 a result being identified.
4820
4821
b11724bb
CT
4822 Helper programs should be prepared to receive and possibly ignore
4823 additional whitespace-separated tokens on each input line.
a8a0b1c2
EC
4824
4825 When using the concurrency= option the protocol is changed by
4826 introducing a query channel tag in front of the request/response.
4827 The query channel tag is a number between 0 and concurrency-1.
4828 This value must be echoed back unchanged to Squid as the first part
4829 of the response relating to its request.
4830
4831 NOTE: when using StoreID refresh_pattern will apply to the StoreID
4832 returned from the helper and not the URL.
4833
4834 WARNING: Wrong StoreID value returned by a careless helper may result
4835 in the wrong cached response returned to the user.
4836
4837 By default, a StoreID helper is not used.
4838DOC_END
4839
fe7966ec 4840NAME: store_id_extras
b11724bb
CT
4841TYPE: TokenOrQuotedString
4842LOC: Config.storeId_extras
4843DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp"
4844DOC_START
4845 Specifies a string to be append to request line format for the
4846 StoreId helper. "Quoted" format values may contain spaces and
4847 logformat %macros. In theory, any logformat %macro can be used.
4848 In practice, a %macro expands as a dash (-) if the helper request is
4849 sent before the required macro information is available to Squid.
4850DOC_END
4851
a8a0b1c2
EC
4852NAME: store_id_children storeurl_rewrite_children
4853TYPE: HelperChildConfig
4854DEFAULT: 20 startup=0 idle=1 concurrency=0
4855LOC: Config.storeIdChildren
4856DOC_START
4857 The maximum number of StoreID helper processes to spawn. If you limit
4858 it too few Squid will have to wait for them to process a backlog of
4859 requests, slowing it down. If you allow too many they will use RAM
4860 and other system resources noticably.
4861
4862 The startup= and idle= options allow some measure of skew in your
4863 tuning.
4864
4865 startup=
4866
4867 Sets a minimum of how many processes are to be spawned when Squid
4868 starts or reconfigures. When set to zero the first request will
4869 cause spawning of the first child process to handle it.
4870
4871 Starting too few will cause an initial slowdown in traffic as Squid
4872 attempts to simultaneously spawn enough processes to cope.
4873
4874 idle=
4875
4876 Sets a minimum of how many processes Squid is to try and keep available
4877 at all times. When traffic begins to rise above what the existing
4878 processes can handle this many more will be spawned up to the maximum
4879 configured. A minimum setting of 1 is required.
4880
4881 concurrency=
4882
4883 The number of requests each storeID helper can handle in
4884 parallel. Defaults to 0 which indicates the helper
4885 is a old-style single threaded program.
4886
4887 When this directive is set to a value >= 1 then the protocol
4888 used to communicate with the helper is modified to include
4889 an ID in front of the request/response. The ID from the request
4890 must be echoed back with the response to that request.
4891DOC_END
4892
4893NAME: store_id_access storeurl_rewrite_access
4894TYPE: acl_access
4895DEFAULT: none
638402dd 4896DEFAULT_DOC: Allow, unless rules exist in squid.conf.
a8a0b1c2
EC
4897LOC: Config.accessList.store_id
4898DOC_START
4899 If defined, this access list specifies which requests are
4900 sent to the StoreID processes. By default all requests
4901 are sent.
4902
4903 This clause supports both fast and slow acl types.
4904 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4905DOC_END
4906
4907NAME: store_id_bypass storeurl_rewrite_bypass
4908TYPE: onoff
4909LOC: Config.onoff.store_id_bypass
4910DEFAULT: on
4911DOC_START
4912 When this is 'on', a request will not go through the
4913 helper if all helpers are busy. If this is 'off'
4914 and the helper queue grows too large, Squid will exit
4915 with a FATAL error and ask you to increase the number of
4916 helpers. You should only enable this if the helperss
4917 are not critical to your caching system. If you use
4918 helpers for critical caching components, and you enable this
4919 option, users may not get objects from cache.
4920DOC_END
4921
41bd17a4 4922COMMENT_START
4923 OPTIONS FOR TUNING THE CACHE
4924 -----------------------------------------------------------------------------
4925COMMENT_END
4926
f04b37d8 4927NAME: cache no_cache
4928TYPE: acl_access
4929DEFAULT: none
70706149 4930DEFAULT_DOC: By default, this directive is unused and has no effect.
f04b37d8 4931LOC: Config.accessList.noCache
41bd17a4 4932DOC_START
70706149
AR
4933 Requests denied by this directive will not be served from the cache
4934 and their responses will not be stored in the cache. This directive
4935 has no effect on other transactions and on already cached responses.
f04b37d8 4936
b3567eb5
FC
4937 This clause supports both fast and slow acl types.
4938 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
70706149
AR
4939
4940 This and the two other similar caching directives listed below are
4941 checked at different transaction processing stages, have different
4942 access to response information, affect different cache operations,
4943 and differ in slow ACLs support:
4944
4945 * cache: Checked before Squid makes a hit/miss determination.
4946 No access to reply information!
4947 Denies both serving a hit and storing a miss.
4948 Supports both fast and slow ACLs.
4949 * send_hit: Checked after a hit was detected.
4950 Has access to reply (hit) information.
4951 Denies serving a hit only.
4952 Supports fast ACLs only.
4953 * store_miss: Checked before storing a cachable miss.
4954 Has access to reply (miss) information.
4955 Denies storing a miss only.
4956 Supports fast ACLs only.
4957
4958 If you are not sure which of the three directives to use, apply the
4959 following decision logic:
4960
4961 * If your ACL(s) are of slow type _and_ need response info, redesign.
4962 Squid does not support that particular combination at this time.
4963 Otherwise:
4964 * If your directive ACL(s) are of slow type, use "cache"; and/or
4965 * if your directive ACL(s) need no response info, use "cache".
4966 Otherwise:
4967 * If you do not want the response cached, use store_miss; and/or
4968 * if you do not want a hit on a cached response, use send_hit.
4969DOC_END
4970
4971NAME: send_hit
4972TYPE: acl_access
4973DEFAULT: none
4974DEFAULT_DOC: By default, this directive is unused and has no effect.
4975LOC: Config.accessList.sendHit
4976DOC_START
4977 Responses denied by this directive will not be served from the cache
4978 (but may still be cached, see store_miss). This directive has no
4979 effect on the responses it allows and on the cached objects.
4980
4981 Please see the "cache" directive for a summary of differences among
4982 store_miss, send_hit, and cache directives.
4983
4984 Unlike the "cache" directive, send_hit only supports fast acl
4985 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
4986
4987 For example:
4988
4989 # apply custom Store ID mapping to some URLs
4990 acl MapMe dstdomain .c.example.com
4991 store_id_program ...
4992 store_id_access allow MapMe
4993
4994 # but prevent caching of special responses
4995 # such as 302 redirects that cause StoreID loops
4996 acl Ordinary http_status 200-299
4997 store_miss deny MapMe !Ordinary
4998
4999 # and do not serve any previously stored special responses
5000 # from the cache (in case they were already cached before
5001 # the above store_miss rule was in effect).
5002 send_hit deny MapMe !Ordinary
5003DOC_END
5004
5005NAME: store_miss
5006TYPE: acl_access
5007DEFAULT: none
5008DEFAULT_DOC: By default, this directive is unused and has no effect.
5009LOC: Config.accessList.storeMiss
5010DOC_START
5011 Responses denied by this directive will not be cached (but may still
5012 be served from the cache, see send_hit). This directive has no
5013 effect on the responses it allows and on the already cached responses.
5014
5015 Please see the "cache" directive for a summary of differences among
5016 store_miss, send_hit, and cache directives. See the
5017 send_hit directive for a usage example.
5018
5019 Unlike the "cache" directive, store_miss only supports fast acl
5020 types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
41bd17a4 5021DOC_END
5022
570d3f75
AJ
5023NAME: max_stale
5024COMMENT: time-units
5025TYPE: time_t
5026LOC: Config.maxStale
5027DEFAULT: 1 week
5028DOC_START
5029 This option puts an upper limit on how stale content Squid
5030 will serve from the cache if cache validation fails.
5031 Can be overriden by the refresh_pattern max-stale option.
5032DOC_END
5033
41bd17a4 5034NAME: refresh_pattern
5035TYPE: refreshpattern
5036LOC: Config.Refresh
5037DEFAULT: none
5038DOC_START
5039 usage: refresh_pattern [-i] regex min percent max [options]
9e7dbc51 5040
6b698a21 5041 By default, regular expressions are CASE-SENSITIVE. To make
5042 them case-insensitive, use the -i option.
9e7dbc51 5043
41bd17a4 5044 'Min' is the time (in minutes) an object without an explicit
5045 expiry time should be considered fresh. The recommended
5046 value is 0, any higher values may cause dynamic applications
5047 to be erroneously cached unless the application designer
5048 has taken the appropriate actions.
9e7dbc51 5049
41bd17a4 5050 'Percent' is a percentage of the objects age (time since last
5051 modification age) an object without explicit expiry time
5052 will be considered fresh.
5b807763 5053
41bd17a4 5054 'Max' is an upper limit on how long objects without an explicit
5055 expiry time will be considered fresh.
9e7dbc51 5056
41bd17a4 5057 options: override-expire
5058 override-lastmod
5059 reload-into-ims
5060 ignore-reload
41bd17a4 5061 ignore-no-store
4ca08219 5062 ignore-must-revalidate
41bd17a4 5063 ignore-private
5064 ignore-auth
570d3f75 5065 max-stale=NN
41bd17a4 5066 refresh-ims
3d8b6ba4 5067 store-stale
a0ec9f68 5068
41bd17a4 5069 override-expire enforces min age even if the server
9b2ad080
HN
5070 sent an explicit expiry time (e.g., with the
5071 Expires: header or Cache-Control: max-age). Doing this
5072 VIOLATES the HTTP standard. Enabling this feature
5073 could make you liable for problems which it causes.
6468fe10 5074
04925576
AJ
5075 Note: override-expire does not enforce staleness - it only extends
5076 freshness / min. If the server returns a Expires time which
5077 is longer than your max time, Squid will still consider
5078 the object fresh for that period of time.
5079
41bd17a4 5080 override-lastmod enforces min age even on objects
5081 that were modified recently.
934b03fc 5082
46017fdd
CT
5083 reload-into-ims changes a client no-cache or ``reload''
5084 request for a cached entry into a conditional request using
5085 If-Modified-Since and/or If-None-Match headers, provided the
5086 cached entry has a Last-Modified and/or a strong ETag header.
5087 Doing this VIOLATES the HTTP standard. Enabling this feature
5088 could make you liable for problems which it causes.
dba79ac5 5089
41bd17a4 5090 ignore-reload ignores a client no-cache or ``reload''
5091 header. Doing this VIOLATES the HTTP standard. Enabling
5092 this feature could make you liable for problems which
5093 it causes.
9bc73deb 5094
41bd17a4 5095 ignore-no-store ignores any ``Cache-control: no-store''
5096 headers received from a server. Doing this VIOLATES
5097 the HTTP standard. Enabling this feature could make you
5098 liable for problems which it causes.
5099
4ca08219
AJ
5100 ignore-must-revalidate ignores any ``Cache-Control: must-revalidate``
5101 headers received from a server. Doing this VIOLATES
5102 the HTTP standard. Enabling this feature could make you
5103 liable for problems which it causes.
5104
41bd17a4 5105 ignore-private ignores any ``Cache-control: private''
5106 headers received from a server. Doing this VIOLATES
5107 the HTTP standard. Enabling this feature could make you
5108 liable for problems which it causes.
5109
5110 ignore-auth caches responses to requests with authorization,
5111 as if the originserver had sent ``Cache-control: public''
5112 in the response header. Doing this VIOLATES the HTTP standard.
5113 Enabling this feature could make you liable for problems which
5114 it causes.
5115
5116 refresh-ims causes squid to contact the origin server
5117 when a client issues an If-Modified-Since request. This
5118 ensures that the client will receive an updated version
5119 if one is available.
5120
3d8b6ba4
AJ
5121 store-stale stores responses even if they don't have explicit
5122 freshness or a validator (i.e., Last-Modified or an ETag)
5123 present, or if they're already stale. By default, Squid will
5124 not cache such responses because they usually can't be
5125 reused. Note that such responses will be stale by default.
5126
570d3f75
AJ
5127 max-stale=NN provide a maximum staleness factor. Squid won't
5128 serve objects more stale than this even if it failed to
5129 validate the object. Default: use the max_stale global limit.
5130
41bd17a4 5131 Basically a cached object is:
5132
5133 FRESH if expires < now, else STALE
5134 STALE if age > max
5135 FRESH if lm-factor < percent, else STALE
5136 FRESH if age < min
5137 else STALE
5138
5139 The refresh_pattern lines are checked in the order listed here.
5140 The first entry which matches is used. If none of the entries
5141 match the default will be used.
5142
5143 Note, you must uncomment all the default lines if you want
5144 to change one. The default setting is only active if none is
5145 used.
5146
41bd17a4 5147NOCOMMENT_START
e0855596 5148
638402dd 5149#
e0855596 5150# Add any of your own refresh_pattern entries above these.
638402dd 5151#
41bd17a4 5152refresh_pattern ^ftp: 1440 20% 10080
5153refresh_pattern ^gopher: 1440 0% 1440
89db45fa 5154refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
41bd17a4 5155refresh_pattern . 0 20% 4320
5156NOCOMMENT_END
5157DOC_END
5158
5159NAME: quick_abort_min
5160COMMENT: (KB)
5161TYPE: kb_int64_t
5162DEFAULT: 16 KB
5163LOC: Config.quickAbort.min
5164DOC_NONE
5165
5166NAME: quick_abort_max
5167COMMENT: (KB)
5168TYPE: kb_int64_t
5169DEFAULT: 16 KB
5170LOC: Config.quickAbort.max
5171DOC_NONE
5172
5173NAME: quick_abort_pct
5174COMMENT: (percent)
5175TYPE: int
5176DEFAULT: 95
5177LOC: Config.quickAbort.pct
5178DOC_START
5179 The cache by default continues downloading aborted requests
5180 which are almost completed (less than 16 KB remaining). This
5181 may be undesirable on slow (e.g. SLIP) links and/or very busy
5182 caches. Impatient users may tie up file descriptors and
5183 bandwidth by repeatedly requesting and immediately aborting
5184 downloads.
5185
5186 When the user aborts a request, Squid will check the
5187 quick_abort values to the amount of data transfered until
5188 then.
5189
5190 If the transfer has less than 'quick_abort_min' KB remaining,
5191 it will finish the retrieval.
5192
5193 If the transfer has more than 'quick_abort_max' KB remaining,
5194 it will abort the retrieval.
5195
5196 If more than 'quick_abort_pct' of the transfer has completed,
5197 it will finish the retrieval.
5198
5199 If you do not want any retrieval to continue after the client
5200 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
5201 to '0 KB'.
5202
5203 If you want retrievals to always continue if they are being
5204 cached set 'quick_abort_min' to '-1 KB'.
5205DOC_END
60d096f4 5206
41bd17a4 5207NAME: read_ahead_gap
5208COMMENT: buffer-size
5209TYPE: b_int64_t
5210LOC: Config.readAheadGap
5211DEFAULT: 16 KB
5212DOC_START
5213 The amount of data the cache will buffer ahead of what has been
5214 sent to the client when retrieving an object from another server.
5215DOC_END
53e738c6 5216
41bd17a4 5217NAME: negative_ttl
626096be 5218IFDEF: USE_HTTP_VIOLATIONS
41bd17a4 5219COMMENT: time-units
5220TYPE: time_t
5221LOC: Config.negativeTtl
ac9cc053 5222DEFAULT: 0 seconds
41bd17a4 5223DOC_START
ac9cc053
AJ
5224 Set the Default Time-to-Live (TTL) for failed requests.
5225 Certain types of failures (such as "connection refused" and
5226 "404 Not Found") are able to be negatively-cached for a short time.
5227 Modern web servers should provide Expires: header, however if they
5228 do not this can provide a minimum TTL.
5229 The default is not to cache errors with unknown expiry details.
5230
5231 Note that this is different from negative caching of DNS lookups.
39956c7c
AJ
5232
5233 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5234 this feature could make you liable for problems which it
5235 causes.
41bd17a4 5236DOC_END
53e738c6 5237
41bd17a4 5238NAME: positive_dns_ttl
5239COMMENT: time-units
5240TYPE: time_t
5241LOC: Config.positiveDnsTtl
5242DEFAULT: 6 hours
5243DOC_START
5244 Upper limit on how long Squid will cache positive DNS responses.
5245 Default is 6 hours (360 minutes). This directive must be set
5246 larger than negative_dns_ttl.
5247DOC_END
c4ab8329 5248
41bd17a4 5249NAME: negative_dns_ttl
5250COMMENT: time-units
5251TYPE: time_t
5252LOC: Config.negativeDnsTtl
5253DEFAULT: 1 minutes
5254DOC_START
5255 Time-to-Live (TTL) for negative caching of failed DNS lookups.
5256 This also sets the lower cache limit on positive lookups.
5257 Minimum value is 1 second, and it is not recommendable to go
5258 much below 10 seconds.
5259DOC_END
7df0bfd7 5260
41bd17a4 5261NAME: range_offset_limit
11e3fa1c
AJ
5262COMMENT: size [acl acl...]
5263TYPE: acl_b_size_t
41bd17a4 5264LOC: Config.rangeOffsetLimit
11e3fa1c 5265DEFAULT: none
41bd17a4 5266DOC_START
11e3fa1c
AJ
5267 usage: (size) [units] [[!]aclname]
5268
5269 Sets an upper limit on how far (number of bytes) into the file
5270 a Range request may be to cause Squid to prefetch the whole file.
5271 If beyond this limit, Squid forwards the Range request as it is and
5272 the result is NOT cached.
5273
41bd17a4 5274 This is to stop a far ahead range request (lets say start at 17MB)
5275 from making Squid fetch the whole object up to that point before
5276 sending anything to the client.
11e3fa1c
AJ
5277
5278 Multiple range_offset_limit lines may be specified, and they will
5279 be searched from top to bottom on each request until a match is found.
5280 The first match found will be used. If no line matches a request, the
5281 default limit of 0 bytes will be used.
5282
5283 'size' is the limit specified as a number of units.
5284
5285 'units' specifies whether to use bytes, KB, MB, etc.
5286 If no units are specified bytes are assumed.
5287
5288 A size of 0 causes Squid to never fetch more than the
ab275c7b 5289 client requested. (default)
11e3fa1c
AJ
5290
5291 A size of 'none' causes Squid to always fetch the object from the
41bd17a4 5292 beginning so it may cache the result. (2.0 style)
11e3fa1c
AJ
5293
5294 'aclname' is the name of a defined ACL.
5295
5296 NP: Using 'none' as the byte value here will override any quick_abort settings
5297 that may otherwise apply to the range request. The range request will
ab275c7b
AJ
5298 be fully fetched from start to finish regardless of the client
5299 actions. This affects bandwidth usage.
41bd17a4 5300DOC_END
d95b862f 5301
41bd17a4 5302NAME: minimum_expiry_time
5303COMMENT: (seconds)
5304TYPE: time_t
5305LOC: Config.minimum_expiry_time
5306DEFAULT: 60 seconds
5307DOC_START
5308 The minimum caching time according to (Expires - Date)
638402dd
AJ
5309 headers Squid honors if the object can't be revalidated.
5310 The default is 60 seconds.
5311
5312 In reverse proxy environments it might be desirable to honor
5313 shorter object lifetimes. It is most likely better to make
5314 your server return a meaningful Last-Modified header however.
5315
5316 In ESI environments where page fragments often have short
5317 lifetimes, this will often be best set to 0.
41bd17a4 5318DOC_END
c68e9c6b 5319
41bd17a4 5320NAME: store_avg_object_size
58d5c5dd
DK
5321COMMENT: (bytes)
5322TYPE: b_int64_t
41bd17a4 5323DEFAULT: 13 KB
5324LOC: Config.Store.avgObjectSize
5325DOC_START
5326 Average object size, used to estimate number of objects your
5327 cache can hold. The default is 13 KB.
638402dd
AJ
5328
5329 This is used to pre-seed the cache index memory allocation to
5330 reduce expensive reallocate operations while handling clients
5331 traffic. Too-large values may result in memory allocation during
5332 peak traffic, too-small values will result in wasted memory.
5333
5334 Check the cache manager 'info' report metrics for the real
5335 object sizes seen by your Squid before tuning this.
cccac0a2 5336DOC_END
5337
41bd17a4 5338NAME: store_objects_per_bucket
5339TYPE: int
5340DEFAULT: 20
5341LOC: Config.Store.objectsPerBucket
5342DOC_START
5343 Target number of objects per bucket in the store hash table.
5344 Lowering this value increases the total number of buckets and
5345 also the storage maintenance rate. The default is 20.
5346DOC_END
5347
5348COMMENT_START
5349 HTTP OPTIONS
5350 -----------------------------------------------------------------------------
5351COMMENT_END
5352
f04b37d8 5353NAME: request_header_max_size
5354COMMENT: (KB)
5355TYPE: b_size_t
df2eec10 5356DEFAULT: 64 KB
f04b37d8 5357LOC: Config.maxRequestHeaderSize
5358DOC_START
5359 This specifies the maximum size for HTTP headers in a request.
5360 Request headers are usually relatively small (about 512 bytes).
5361 Placing a limit on the request header size will catch certain
5362 bugs (for example with persistent connections) and possibly
5363 buffer-overflow or denial-of-service attacks.
5364DOC_END
5365
5366NAME: reply_header_max_size
5367COMMENT: (KB)
5368TYPE: b_size_t
df2eec10 5369DEFAULT: 64 KB
f04b37d8 5370LOC: Config.maxReplyHeaderSize
5371DOC_START
5372 This specifies the maximum size for HTTP headers in a reply.
5373 Reply headers are usually relatively small (about 512 bytes).
5374 Placing a limit on the reply header size will catch certain
5375 bugs (for example with persistent connections) and possibly
5376 buffer-overflow or denial-of-service attacks.
5377DOC_END
5378
5379NAME: request_body_max_size
5380COMMENT: (bytes)
5381TYPE: b_int64_t
5382DEFAULT: 0 KB
638402dd 5383DEFAULT_DOC: No limit.
f04b37d8 5384LOC: Config.maxRequestBodySize
5385DOC_START
5386 This specifies the maximum size for an HTTP request body.
5387 In other words, the maximum size of a PUT/POST request.
5388 A user who attempts to send a request with a body larger
5389 than this limit receives an "Invalid Request" error message.
5390 If you set this parameter to a zero (the default), there will
5391 be no limit imposed.
638402dd
AJ
5392
5393 See also client_request_buffer_max_size for an alternative
5394 limitation on client uploads which can be configured.
f04b37d8 5395DOC_END
5396
1368d115
CT
5397NAME: client_request_buffer_max_size
5398COMMENT: (bytes)
5399TYPE: b_size_t
5400DEFAULT: 512 KB
5401LOC: Config.maxRequestBufferSize
5402DOC_START
5403 This specifies the maximum buffer size of a client request.
5404 It prevents squid eating too much memory when somebody uploads
5405 a large file.
5406DOC_END
5407
3ff65596
AR
5408NAME: chunked_request_body_max_size
5409COMMENT: (bytes)
5410TYPE: b_int64_t
5411DEFAULT: 64 KB
5412LOC: Config.maxChunkedRequestBodySize
5413DOC_START
5414 A broken or confused HTTP/1.1 client may send a chunked HTTP
5415 request to Squid. Squid does not have full support for that
5416 feature yet. To cope with such requests, Squid buffers the
5417 entire request and then dechunks request body to create a
5418 plain HTTP/1.0 request with a known content length. The plain
5419 request is then used by the rest of Squid code as usual.
5420
5421 The option value specifies the maximum size of the buffer used
5422 to hold the request before the conversion. If the chunked
5423 request size exceeds the specified limit, the conversion
5424 fails, and the client receives an "unsupported request" error,
5425 as if dechunking was disabled.
5426
5427 Dechunking is enabled by default. To disable conversion of
5428 chunked requests, set the maximum to zero.
5429
5430 Request dechunking feature and this option in particular are a
5431 temporary hack. When chunking requests and responses are fully
5432 supported, there will be no need to buffer a chunked request.
5433DOC_END
5434
41bd17a4 5435NAME: broken_posts
626096be 5436IFDEF: USE_HTTP_VIOLATIONS
cccac0a2 5437TYPE: acl_access
cccac0a2 5438DEFAULT: none
638402dd 5439DEFAULT_DOC: Obey RFC 2616.
41bd17a4 5440LOC: Config.accessList.brokenPosts
cccac0a2 5441DOC_START
41bd17a4 5442 A list of ACL elements which, if matched, causes Squid to send
5443 an extra CRLF pair after the body of a PUT/POST request.
cccac0a2 5444
41bd17a4 5445 Some HTTP servers has broken implementations of PUT/POST,
5446 and rely on an extra CRLF pair sent by some WWW clients.
cccac0a2 5447
41bd17a4 5448 Quote from RFC2616 section 4.1 on this matter:
cccac0a2 5449
41bd17a4 5450 Note: certain buggy HTTP/1.0 client implementations generate an
5451 extra CRLF's after a POST request. To restate what is explicitly
5452 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
5453 a request with an extra CRLF.
cccac0a2 5454
b3567eb5
FC
5455 This clause only supports fast acl types.
5456 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
5457
41bd17a4 5458Example:
5459 acl buggy_server url_regex ^http://....
5460 broken_posts allow buggy_server
5461DOC_END
cccac0a2 5462
22fff3bf 5463NAME: adaptation_uses_indirect_client icap_uses_indirect_client
57d76dd4
AJ
5464COMMENT: on|off
5465TYPE: onoff
22fff3bf 5466IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION
57d76dd4 5467DEFAULT: on
22fff3bf 5468LOC: Adaptation::Config::use_indirect_client
57d76dd4 5469DOC_START
ea3ae478
AR
5470 Controls whether the indirect client IP address (instead of the direct
5471 client IP address) is passed to adaptation services.
5472
5473 See also: follow_x_forwarded_for adaptation_send_client_ip
57d76dd4
AJ
5474DOC_END
5475
41bd17a4 5476NAME: via
626096be 5477IFDEF: USE_HTTP_VIOLATIONS
41bd17a4 5478COMMENT: on|off
5479TYPE: onoff
5480DEFAULT: on
5481LOC: Config.onoff.via
5482DOC_START
5483 If set (default), Squid will include a Via header in requests and
5484 replies as required by RFC2616.
5485DOC_END
4cc6eb12 5486
41bd17a4 5487NAME: ie_refresh
5488COMMENT: on|off
5489TYPE: onoff
5490LOC: Config.onoff.ie_refresh
5491DEFAULT: off
5492DOC_START
5493 Microsoft Internet Explorer up until version 5.5 Service
5494 Pack 1 has an issue with transparent proxies, wherein it
5495 is impossible to force a refresh. Turning this on provides
5496 a partial fix to the problem, by causing all IMS-REFRESH
5497 requests from older IE versions to check the origin server
5498 for fresh content. This reduces hit ratio by some amount
5499 (~10% in my experience), but allows users to actually get
5500 fresh content when they want it. Note because Squid
5501 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
5502 of 5.5 is unchanged from old versions of Squid (i.e. a
5503 forced refresh is impossible). Newer versions of IE will,
5504 hopefully, continue to have the new behavior and will be
5505 handled based on that assumption. This option defaults to
5506 the old Squid behavior, which is better for hit ratios but
5507 worse for clients using IE, if they need to be able to
5508 force fresh content.
5509DOC_END
b9d7fe3e 5510
41bd17a4 5511NAME: vary_ignore_expire
5512COMMENT: on|off
5513TYPE: onoff
5514LOC: Config.onoff.vary_ignore_expire
5515DEFAULT: off
5516DOC_START
5517 Many HTTP servers supporting Vary gives such objects
5518 immediate expiry time with no cache-control header
5519 when requested by a HTTP/1.0 client. This option
5520 enables Squid to ignore such expiry times until
5521 HTTP/1.1 is fully implemented.
7e73cd78
AJ
5522
5523 WARNING: If turned on this may eventually cause some
5524 varying objects not intended for caching to get cached.
cccac0a2 5525DOC_END
c4ab8329 5526
41bd17a4 5527NAME: request_entities
5528TYPE: onoff
5529LOC: Config.onoff.request_entities
5530DEFAULT: off
5531DOC_START
5532 Squid defaults to deny GET and HEAD requests with request entities,
5533 as the meaning of such requests are undefined in the HTTP standard
5534 even if not explicitly forbidden.
0976f8db 5535
41bd17a4 5536 Set this directive to on if you have clients which insists
5537 on sending request entities in GET or HEAD requests. But be warned
5538 that there is server software (both proxies and web servers) which
5539 can fail to properly process this kind of request which may make you
5540 vulnerable to cache pollution attacks if enabled.
cccac0a2 5541DOC_END
6b53c392 5542
41bd17a4 5543NAME: request_header_access
626096be 5544IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5545TYPE: http_header_access
41bd17a4 5546LOC: Config.request_header_access
cccac0a2 5547DEFAULT: none
638402dd 5548DEFAULT_DOC: No limits.
cccac0a2 5549DOC_START
41bd17a4 5550 Usage: request_header_access header_name allow|deny [!]aclname ...
0976f8db 5551
41bd17a4 5552 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5553 this feature could make you liable for problems which it
5554 causes.
0976f8db 5555
41bd17a4 5556 This option replaces the old 'anonymize_headers' and the
5557 older 'http_anonymizer' option with something that is much
3b07476b
CT
5558 more configurable. A list of ACLs for each header name allows
5559 removal of specific header fields under specific conditions.
5560
5561 This option only applies to outgoing HTTP request headers (i.e.,
5562 headers sent by Squid to the next HTTP hop such as a cache peer
5563 or an origin server). The option has no effect during cache hit
5564 detection. The equivalent adaptation vectoring point in ICAP
5565 terminology is post-cache REQMOD.
5566
5567 The option is applied to individual outgoing request header
5568 fields. For each request header field F, Squid uses the first
5569 qualifying sets of request_header_access rules:
5570
5571 1. Rules with header_name equal to F's name.
5572 2. Rules with header_name 'Other', provided F's name is not
5573 on the hard-coded list of commonly used HTTP header names.
5574 3. Rules with header_name 'All'.
5575
5576 Within that qualifying rule set, rule ACLs are checked as usual.
5577 If ACLs of an "allow" rule match, the header field is allowed to
5578 go through as is. If ACLs of a "deny" rule match, the header is
5579 removed and request_header_replace is then checked to identify
5580 if the removed header has a replacement. If no rules within the
5581 set have matching ACLs, the header field is left as is.
5401aa8d 5582
41bd17a4 5583 For example, to achieve the same behavior as the old
5584 'http_anonymizer standard' option, you should use:
5401aa8d 5585
41bd17a4 5586 request_header_access From deny all
5587 request_header_access Referer deny all
41bd17a4 5588 request_header_access User-Agent deny all
5401aa8d 5589
41bd17a4 5590 Or, to reproduce the old 'http_anonymizer paranoid' feature
5591 you should use:
5401aa8d 5592
41bd17a4 5593 request_header_access Authorization allow all
41bd17a4 5594 request_header_access Proxy-Authorization allow all
41bd17a4 5595 request_header_access Cache-Control allow all
41bd17a4 5596 request_header_access Content-Length allow all
5597 request_header_access Content-Type allow all
5598 request_header_access Date allow all
41bd17a4 5599 request_header_access Host allow all
5600 request_header_access If-Modified-Since allow all
41bd17a4 5601 request_header_access Pragma allow all
5602 request_header_access Accept allow all
5603 request_header_access Accept-Charset allow all
5604 request_header_access Accept-Encoding allow all
5605 request_header_access Accept-Language allow all
41bd17a4 5606 request_header_access Connection allow all
41bd17a4 5607 request_header_access All deny all
5401aa8d 5608
638402dd 5609 HTTP reply headers are controlled with the reply_header_access directive.
5401aa8d 5610
638402dd 5611 By default, all headers are allowed (no anonymizing is performed).
5401aa8d 5612DOC_END
5613
41bd17a4 5614NAME: reply_header_access
626096be 5615IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5616TYPE: http_header_access
41bd17a4 5617LOC: Config.reply_header_access
cccac0a2 5618DEFAULT: none
638402dd 5619DEFAULT_DOC: No limits.
cccac0a2 5620DOC_START
41bd17a4 5621 Usage: reply_header_access header_name allow|deny [!]aclname ...
934b03fc 5622
41bd17a4 5623 WARNING: Doing this VIOLATES the HTTP standard. Enabling
5624 this feature could make you liable for problems which it
5625 causes.
934b03fc 5626
41bd17a4 5627 This option only applies to reply headers, i.e., from the
5628 server to the client.
934b03fc 5629
41bd17a4 5630 This is the same as request_header_access, but in the other
3b07476b
CT
5631 direction. Please see request_header_access for detailed
5632 documentation.
cccac0a2 5633
41bd17a4 5634 For example, to achieve the same behavior as the old
5635 'http_anonymizer standard' option, you should use:
cccac0a2 5636
41bd17a4 5637 reply_header_access Server deny all
41bd17a4 5638 reply_header_access WWW-Authenticate deny all
5639 reply_header_access Link deny all
cccac0a2 5640
41bd17a4 5641 Or, to reproduce the old 'http_anonymizer paranoid' feature
5642 you should use:
cccac0a2 5643
41bd17a4 5644 reply_header_access Allow allow all
41bd17a4 5645 reply_header_access WWW-Authenticate allow all
41bd17a4 5646 reply_header_access Proxy-Authenticate allow all
5647 reply_header_access Cache-Control allow all
5648 reply_header_access Content-Encoding allow all
5649 reply_header_access Content-Length allow all
5650 reply_header_access Content-Type allow all
5651 reply_header_access Date allow all
5652 reply_header_access Expires allow all
41bd17a4 5653 reply_header_access Last-Modified allow all
5654 reply_header_access Location allow all
5655 reply_header_access Pragma allow all
41bd17a4 5656 reply_header_access Content-Language allow all
41bd17a4 5657 reply_header_access Retry-After allow all
5658 reply_header_access Title allow all
638402dd 5659 reply_header_access Content-Disposition allow all
41bd17a4 5660 reply_header_access Connection allow all
41bd17a4 5661 reply_header_access All deny all
cccac0a2 5662
638402dd 5663 HTTP request headers are controlled with the request_header_access directive.
cccac0a2 5664
41bd17a4 5665 By default, all headers are allowed (no anonymizing is
5666 performed).
cccac0a2 5667DOC_END
5668
75e4f2ea 5669NAME: request_header_replace header_replace
626096be 5670IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5671TYPE: http_header_replace
41bd17a4 5672LOC: Config.request_header_access
cccac0a2 5673DEFAULT: none
41bd17a4 5674DOC_START
75e4f2ea
MB
5675 Usage: request_header_replace header_name message
5676 Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
cccac0a2 5677
41bd17a4 5678 This option allows you to change the contents of headers
75e4f2ea 5679 denied with request_header_access above, by replacing them
638402dd 5680 with some fixed string.
cccac0a2 5681
41bd17a4 5682 This only applies to request headers, not reply headers.
cccac0a2 5683
41bd17a4 5684 By default, headers are removed if denied.
5685DOC_END
cccac0a2 5686
75e4f2ea
MB
5687NAME: reply_header_replace
5688IFDEF: USE_HTTP_VIOLATIONS
3b07476b 5689TYPE: http_header_replace
75e4f2ea
MB
5690LOC: Config.reply_header_access
5691DEFAULT: none
5692DOC_START
5693 Usage: reply_header_replace header_name message
5694 Example: reply_header_replace Server Foo/1.0
5695
5696 This option allows you to change the contents of headers
5697 denied with reply_header_access above, by replacing them
5698 with some fixed string.
5699
5700 This only applies to reply headers, not request headers.
5701
5702 By default, headers are removed if denied.
5703DOC_END
5704
f4698e0b
CT
5705NAME: request_header_add
5706TYPE: HeaderWithAclList
5707LOC: Config.request_header_add
5708DEFAULT: none
5709DOC_START
5710 Usage: request_header_add field-name field-value acl1 [acl2] ...
5711 Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all
5712
5713 This option adds header fields to outgoing HTTP requests (i.e.,
5714 request headers sent by Squid to the next HTTP hop such as a
5715 cache peer or an origin server). The option has no effect during
5716 cache hit detection. The equivalent adaptation vectoring point
5717 in ICAP terminology is post-cache REQMOD.
5718
5719 Field-name is a token specifying an HTTP header name. If a
5720 standard HTTP header name is used, Squid does not check whether
5721 the new header conflicts with any existing headers or violates
5722 HTTP rules. If the request to be modified already contains a
5723 field with the same name, the old field is preserved but the
5724 header field values are not merged.
5725
5726 Field-value is either a token or a quoted string. If quoted
5727 string format is used, then the surrounding quotes are removed
5728 while escape sequences and %macros are processed.
5729
5730 In theory, all of the logformat codes can be used as %macros.
5731 However, unlike logging (which happens at the very end of
5732 transaction lifetime), the transaction may not yet have enough
5733 information to expand a macro when the new header value is needed.
5734 And some information may already be available to Squid but not yet
5735 committed where the macro expansion code can access it (report
5736 such instances!). The macro will be expanded into a single dash
5737 ('-') in such cases. Not all macros have been tested.
5738
5739 One or more Squid ACLs may be specified to restrict header
5740 injection to matching requests. As always in squid.conf, all
5741 ACLs in an option ACL list must be satisfied for the insertion
5742 to happen. The request_header_add option supports fast ACLs
5743 only.
5744DOC_END
5745
d7f4a0b7
CT
5746NAME: note
5747TYPE: note
5748LOC: Config.notes
5749DEFAULT: none
5750DOC_START
5751 This option used to log custom information about the master
5752 transaction. For example, an admin may configure Squid to log
5753 which "user group" the transaction belongs to, where "user group"
5754 will be determined based on a set of ACLs and not [just]
5755 authentication information.
5756 Values of key/value pairs can be logged using %{key}note macros:
5757
5758 note key value acl ...
5759 logformat myFormat ... %{key}note ...
5760DOC_END
5761
41bd17a4 5762NAME: relaxed_header_parser
5763COMMENT: on|off|warn
5764TYPE: tristate
5765LOC: Config.onoff.relaxed_header_parser
5766DEFAULT: on
5767DOC_START
5768 In the default "on" setting Squid accepts certain forms
5769 of non-compliant HTTP messages where it is unambiguous
5770 what the sending application intended even if the message
5771 is not correctly formatted. The messages is then normalized
5772 to the correct form when forwarded by Squid.
cccac0a2 5773
41bd17a4 5774 If set to "warn" then a warning will be emitted in cache.log
5775 each time such HTTP error is encountered.
cccac0a2 5776
41bd17a4 5777 If set to "off" then such HTTP errors will cause the request
5778 or response to be rejected.
5779DOC_END
7d90757b 5780
55eae904
AR
5781NAME: collapsed_forwarding
5782COMMENT: (on|off)
5783TYPE: onoff
5784LOC: Config.onoff.collapsed_forwarding
5785DEFAULT: off
5786DOC_START
5787 This option controls whether Squid is allowed to merge multiple
5788 potentially cachable requests for the same URI before Squid knows
5789 whether the response is going to be cachable.
5790
5791 This feature is disabled by default: Enabling collapsed forwarding
5792 needlessly delays forwarding requests that look cachable (when they are
5793 collapsed) but then need to be forwarded individually anyway because
5794 they end up being for uncachable content. However, in some cases, such
5795 as accelleration of highly cachable content with periodic or groupped
5796 expiration times, the gains from collapsing [large volumes of
5797 simultenous refresh requests] outweigh losses from such delays.
5798DOC_END
5799
41bd17a4 5800COMMENT_START
5801 TIMEOUTS
5802 -----------------------------------------------------------------------------
5803COMMENT_END
5804
5805NAME: forward_timeout
5806COMMENT: time-units
5807TYPE: time_t
5808LOC: Config.Timeout.forward
5809DEFAULT: 4 minutes
5810DOC_START
5811 This parameter specifies how long Squid should at most attempt in
5812 finding a forwarding path for the request before giving up.
cccac0a2 5813DOC_END
5814
41bd17a4 5815NAME: connect_timeout
5816COMMENT: time-units
5817TYPE: time_t
5818LOC: Config.Timeout.connect
5819DEFAULT: 1 minute
057f5854 5820DOC_START
41bd17a4 5821 This parameter specifies how long to wait for the TCP connect to
5822 the requested server or peer to complete before Squid should
5823 attempt to find another path where to forward the request.
057f5854 5824DOC_END
5825
41bd17a4 5826NAME: peer_connect_timeout
5827COMMENT: time-units
5828TYPE: time_t
5829LOC: Config.Timeout.peer_connect
5830DEFAULT: 30 seconds
cccac0a2 5831DOC_START
41bd17a4 5832 This parameter specifies how long to wait for a pending TCP
5833 connection to a peer cache. The default is 30 seconds. You
5834 may also set different timeout values for individual neighbors
5835 with the 'connect-timeout' option on a 'cache_peer' line.
5836DOC_END
7f7db318 5837
41bd17a4 5838NAME: read_timeout
5839COMMENT: time-units
5840TYPE: time_t
5841LOC: Config.Timeout.read
5842DEFAULT: 15 minutes
5843DOC_START
5844 The read_timeout is applied on server-side connections. After
5845 each successful read(), the timeout will be extended by this
5846 amount. If no data is read again after this amount of time,
5847 the request is aborted and logged with ERR_READ_TIMEOUT. The
5848 default is 15 minutes.
5849DOC_END
cccac0a2 5850
5ef5e5cc
AJ
5851NAME: write_timeout
5852COMMENT: time-units
5853TYPE: time_t
5854LOC: Config.Timeout.write
5855DEFAULT: 15 minutes
5856DOC_START
5857 This timeout is tracked for all connections that have data
5858 available for writing and are waiting for the socket to become
5859 ready. After each successful write, the timeout is extended by
5860 the configured amount. If Squid has data to write but the
5861 connection is not ready for the configured duration, the
5862 transaction associated with the connection is terminated. The
5863 default is 15 minutes.
5864DOC_END
5865
41bd17a4 5866NAME: request_timeout
5867TYPE: time_t
5868LOC: Config.Timeout.request
5869DEFAULT: 5 minutes
5870DOC_START
6b2a2108 5871 How long to wait for complete HTTP request headers after initial
41bd17a4 5872 connection establishment.
5873DOC_END
cccac0a2 5874
97b32442 5875NAME: client_idle_pconn_timeout persistent_request_timeout
41bd17a4 5876TYPE: time_t
97b32442 5877LOC: Config.Timeout.clientIdlePconn
41bd17a4 5878DEFAULT: 2 minutes
5879DOC_START
5880 How long to wait for the next HTTP request on a persistent
97b32442 5881 client connection after the previous request completes.
41bd17a4 5882DOC_END
cccac0a2 5883
41bd17a4 5884NAME: client_lifetime
5885COMMENT: time-units
5886TYPE: time_t
5887LOC: Config.Timeout.lifetime
5888DEFAULT: 1 day
5889DOC_START
5890 The maximum amount of time a client (browser) is allowed to
5891 remain connected to the cache process. This protects the Cache
5892 from having a lot of sockets (and hence file descriptors) tied up
5893 in a CLOSE_WAIT state from remote clients that go away without
5894 properly shutting down (either because of a network failure or
5895 because of a poor client implementation). The default is one
5896 day, 1440 minutes.
7d90757b 5897
41bd17a4 5898 NOTE: The default value is intended to be much larger than any
5899 client would ever need to be connected to your cache. You
5900 should probably change client_lifetime only as a last resort.
5901 If you seem to have many client connections tying up
5902 filedescriptors, we recommend first tuning the read_timeout,
5903 request_timeout, persistent_request_timeout and quick_abort values.
cccac0a2 5904DOC_END
5905
41bd17a4 5906NAME: half_closed_clients
5907TYPE: onoff
5908LOC: Config.onoff.half_closed_clients
0c2f5c4f 5909DEFAULT: off
4eb368f9 5910DOC_START
41bd17a4 5911 Some clients may shutdown the sending side of their TCP
5912 connections, while leaving their receiving sides open. Sometimes,
5913 Squid can not tell the difference between a half-closed and a
0c2f5c4f
AJ
5914 fully-closed TCP connection.
5915
5916 By default, Squid will immediately close client connections when
5917 read(2) returns "no more data to read."
5918
abdf1651 5919 Change this option to 'on' and Squid will keep open connections
0c2f5c4f
AJ
5920 until a read(2) or write(2) on the socket returns an error.
5921 This may show some benefits for reverse proxies. But if not
5922 it is recommended to leave OFF.
4eb368f9 5923DOC_END
5924
97b32442 5925NAME: server_idle_pconn_timeout pconn_timeout
41bd17a4 5926TYPE: time_t
97b32442 5927LOC: Config.Timeout.serverIdlePconn
41bd17a4 5928DEFAULT: 1 minute
cccac0a2 5929DOC_START
41bd17a4 5930 Timeout for idle persistent connections to servers and other
5931 proxies.
5932DOC_END
cccac0a2 5933
41bd17a4 5934NAME: ident_timeout
5935TYPE: time_t
5936IFDEF: USE_IDENT
4daaf3cb 5937LOC: Ident::TheConfig.timeout
41bd17a4 5938DEFAULT: 10 seconds
5939DOC_START
5940 Maximum time to wait for IDENT lookups to complete.
cccac0a2 5941
41bd17a4 5942 If this is too high, and you enabled IDENT lookups from untrusted
5943 users, you might be susceptible to denial-of-service by having
5944 many ident requests going at once.
cccac0a2 5945DOC_END
5946
41bd17a4 5947NAME: shutdown_lifetime
5948COMMENT: time-units
5949TYPE: time_t
5950LOC: Config.shutdownLifetime
5951DEFAULT: 30 seconds
cccac0a2 5952DOC_START
41bd17a4 5953 When SIGTERM or SIGHUP is received, the cache is put into
5954 "shutdown pending" mode until all active sockets are closed.
5955 This value is the lifetime to set for all open descriptors
5956 during shutdown mode. Any active clients after this many
5957 seconds will receive a 'timeout' message.
cccac0a2 5958DOC_END
0976f8db 5959
cccac0a2 5960COMMENT_START
5961 ADMINISTRATIVE PARAMETERS
5962 -----------------------------------------------------------------------------
5963COMMENT_END
5964
5965NAME: cache_mgr
5966TYPE: string
5967DEFAULT: webmaster
5968LOC: Config.adminEmail
5969DOC_START
5970 Email-address of local cache manager who will receive
638402dd 5971 mail if the cache dies. The default is "webmaster".
cccac0a2 5972DOC_END
5973
abacf776 5974NAME: mail_from
5975TYPE: string
5976DEFAULT: none
5977LOC: Config.EmailFrom
5978DOC_START
5979 From: email-address for mail sent when the cache dies.
638402dd
AJ
5980 The default is to use 'squid@unique_hostname'.
5981
5982 See also: unique_hostname directive.
abacf776 5983DOC_END
5984
d084bf20 5985NAME: mail_program
5986TYPE: eol
5987DEFAULT: mail
5988LOC: Config.EmailProgram
5989DOC_START
5990 Email program used to send mail if the cache dies.
846a5e31 5991 The default is "mail". The specified program must comply
d084bf20 5992 with the standard Unix mail syntax:
846a5e31 5993 mail-program recipient < mailfile
5994
d084bf20 5995 Optional command line options can be specified.
5996DOC_END
5997
cccac0a2 5998NAME: cache_effective_user
5999TYPE: string
5483d916 6000DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
cccac0a2 6001LOC: Config.effectiveUser
e3d74828 6002DOC_START
6003 If you start Squid as root, it will change its effective/real
6004 UID/GID to the user specified below. The default is to change
5483d916 6005 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
64e288bd 6006 see also; cache_effective_group
e3d74828 6007DOC_END
6008
cccac0a2 6009NAME: cache_effective_group
6010TYPE: string
6011DEFAULT: none
638402dd 6012DEFAULT_DOC: Use system group memberships of the cache_effective_user account
cccac0a2 6013LOC: Config.effectiveGroup
6014DOC_START
64e288bd 6015 Squid sets the GID to the effective user's default group ID
6016 (taken from the password file) and supplementary group list
6017 from the groups membership.
6018
e3d74828 6019 If you want Squid to run with a specific GID regardless of
6020 the group memberships of the effective user then set this
6021 to the group (or GID) you want Squid to run as. When set
64e288bd 6022 all other group privileges of the effective user are ignored
e3d74828 6023 and only this GID is effective. If Squid is not started as
64e288bd 6024 root the user starting Squid MUST be member of the specified
e3d74828 6025 group.
64e288bd 6026
6027 This option is not recommended by the Squid Team.
6028 Our preference is for administrators to configure a secure
6029 user account for squid with UID/GID matching system policies.
cccac0a2 6030DOC_END
6031
d3caee79 6032NAME: httpd_suppress_version_string
6033COMMENT: on|off
6034TYPE: onoff
6035DEFAULT: off
6036LOC: Config.onoff.httpd_suppress_version_string
6037DOC_START
6038 Suppress Squid version string info in HTTP headers and HTML error pages.
6039DOC_END
6040
cccac0a2 6041NAME: visible_hostname
6042TYPE: string
6043LOC: Config.visibleHostname
6044DEFAULT: none
638402dd 6045DEFAULT_DOC: Automatically detect the system host name
cccac0a2 6046DOC_START
6047 If you want to present a special hostname in error messages, etc,
7f7db318 6048 define this. Otherwise, the return value of gethostname()
cccac0a2 6049 will be used. If you have multiple caches in a cluster and
6050 get errors about IP-forwarding you must set them to have individual
6051 names with this setting.
6052DOC_END
6053
cccac0a2 6054NAME: unique_hostname
6055TYPE: string
6056LOC: Config.uniqueHostname
6057DEFAULT: none
638402dd 6058DEFAULT_DOC: Copy the value from visible_hostname
cccac0a2 6059DOC_START
6060 If you want to have multiple machines with the same
7f7db318 6061 'visible_hostname' you must give each machine a different
6062 'unique_hostname' so forwarding loops can be detected.
cccac0a2 6063DOC_END
6064
cccac0a2 6065NAME: hostname_aliases
6066TYPE: wordlist
6067LOC: Config.hostnameAliases
6068DEFAULT: none
6069DOC_START
7f7db318 6070 A list of other DNS names your cache has.
cccac0a2 6071DOC_END
0976f8db 6072
c642c141
AJ
6073NAME: umask
6074TYPE: int
6075LOC: Config.umask
6076DEFAULT: 027
6077DOC_START
6078 Minimum umask which should be enforced while the proxy
6079 is running, in addition to the umask set at startup.
6080
6081 For a traditional octal representation of umasks, start
6082 your value with 0.
6083DOC_END
6084
cccac0a2 6085COMMENT_START
6086 OPTIONS FOR THE CACHE REGISTRATION SERVICE
6087 -----------------------------------------------------------------------------
6088
6089 This section contains parameters for the (optional) cache
6090 announcement service. This service is provided to help
6091 cache administrators locate one another in order to join or
6092 create cache hierarchies.
6093
6094 An 'announcement' message is sent (via UDP) to the registration
6095 service by Squid. By default, the announcement message is NOT
6096 SENT unless you enable it with 'announce_period' below.
6097
6098 The announcement message includes your hostname, plus the
6099 following information from this configuration file:
6100
6101 http_port
6102 icp_port
6103 cache_mgr
6104
6105 All current information is processed regularly and made
6106 available on the Web at http://www.ircache.net/Cache/Tracker/.
6107COMMENT_END
6108
6109NAME: announce_period
6110TYPE: time_t
6111LOC: Config.Announce.period
6112DEFAULT: 0
638402dd 6113DEFAULT_DOC: Announcement messages disabled.
cccac0a2 6114DOC_START
638402dd 6115 This is how frequently to send cache announcements.
cccac0a2 6116
e0855596 6117 To enable announcing your cache, just set an announce period.
cccac0a2 6118
e0855596
AJ
6119 Example:
6120 announce_period 1 day
cccac0a2 6121DOC_END
6122
cccac0a2 6123NAME: announce_host
6124TYPE: string
6125DEFAULT: tracker.ircache.net
6126LOC: Config.Announce.host
638402dd
AJ
6127DOC_START
6128 Set the hostname where announce registration messages will be sent.
6129
6130 See also announce_port and announce_file
6131DOC_END
cccac0a2 6132
6133NAME: announce_file
6134TYPE: string
6135DEFAULT: none
6136LOC: Config.Announce.file
638402dd
AJ
6137DOC_START
6138 The contents of this file will be included in the announce
6139 registration messages.
6140DOC_END
cccac0a2 6141
6142NAME: announce_port
ae870270 6143TYPE: u_short
cccac0a2 6144DEFAULT: 3131
6145LOC: Config.Announce.port
6146DOC_START
638402dd 6147 Set the port where announce registration messages will be sent.
cccac0a2 6148
638402dd 6149 See also announce_host and announce_file
cccac0a2 6150DOC_END
6151
8d6275c0 6152COMMENT_START
6153 HTTPD-ACCELERATOR OPTIONS
6154 -----------------------------------------------------------------------------
6155COMMENT_END
6156
cccac0a2 6157NAME: httpd_accel_surrogate_id
cccac0a2 6158TYPE: string
b2b40d8c 6159DEFAULT: none
638402dd 6160DEFAULT_DOC: visible_hostname is used if no specific ID is set.
cccac0a2 6161LOC: Config.Accel.surrogate_id
cccac0a2 6162DOC_START
6163 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
6164 need an identification token to allow control targeting. Because
6165 a farm of surrogates may all perform the same tasks, they may share
6166 an identification token.
6167DOC_END
6168
6169NAME: http_accel_surrogate_remote
cccac0a2 6170COMMENT: on|off
6171TYPE: onoff
6172DEFAULT: off
6173LOC: Config.onoff.surrogate_is_remote
6174DOC_START
638402dd
AJ
6175 Remote surrogates (such as those in a CDN) honour the header
6176 "Surrogate-Control: no-store-remote".
6177
cccac0a2 6178 Set this to on to have squid behave as a remote surrogate.
6179DOC_END
6180
6181NAME: esi_parser
f41735ea 6182IFDEF: USE_SQUID_ESI
964b44c3 6183COMMENT: libxml2|expat|custom
cccac0a2 6184TYPE: string
6185LOC: ESIParser::Type
6186DEFAULT: custom
6187DOC_START
6188 ESI markup is not strictly XML compatible. The custom ESI parser
6189 will give higher performance, but cannot handle non ASCII character
6190 encodings.
6191DOC_END
0976f8db 6192
9edd9041 6193COMMENT_START
8d6275c0 6194 DELAY POOL PARAMETERS
9edd9041 6195 -----------------------------------------------------------------------------
6196COMMENT_END
6197
6198NAME: delay_pools
6199TYPE: delay_pool_count
6200DEFAULT: 0
9a0a18de 6201IFDEF: USE_DELAY_POOLS
9edd9041 6202LOC: Config.Delay
6203DOC_START
6204 This represents the number of delay pools to be used. For example,
6205 if you have one class 2 delay pool and one class 3 delays pool, you
6206 have a total of 2 delay pools.
638402dd
AJ
6207
6208 See also delay_parameters, delay_class, delay_access for pool
6209 configuration details.
9edd9041 6210DOC_END
6211
6212NAME: delay_class
6213TYPE: delay_pool_class
6214DEFAULT: none
9a0a18de 6215IFDEF: USE_DELAY_POOLS
9edd9041 6216LOC: Config.Delay
6217DOC_START
6218 This defines the class of each delay pool. There must be exactly one
6219 delay_class line for each delay pool. For example, to define two
6220 delay pools, one of class 2 and one of class 3, the settings above
6221 and here would be:
6222
b1fb3348
AJ
6223 Example:
6224 delay_pools 4 # 4 delay pools
6225 delay_class 1 2 # pool 1 is a class 2 pool
6226 delay_class 2 3 # pool 2 is a class 3 pool
6227 delay_class 3 4 # pool 3 is a class 4 pool
6228 delay_class 4 5 # pool 4 is a class 5 pool
9edd9041 6229
6230 The delay pool classes are:
6231
6232 class 1 Everything is limited by a single aggregate
6233 bucket.
6234
6235 class 2 Everything is limited by a single aggregate
6236 bucket as well as an "individual" bucket chosen
b1fb3348 6237 from bits 25 through 32 of the IPv4 address.
9edd9041 6238
6239 class 3 Everything is limited by a single aggregate
6240 bucket as well as a "network" bucket chosen
6241 from bits 17 through 24 of the IP address and a
6242 "individual" bucket chosen from bits 17 through
b1fb3348 6243 32 of the IPv4 address.
9edd9041 6244
6245 class 4 Everything in a class 3 delay pool, with an
6246 additional limit on a per user basis. This
6247 only takes effect if the username is established
6248 in advance - by forcing authentication in your
6249 http_access rules.
6250
6251 class 5 Requests are grouped according their tag (see
6252 external_acl's tag= reply).
6253
0b68481a
AJ
6254
6255 Each pool also requires a delay_parameters directive to configure the pool size
6256 and speed limits used whenever the pool is applied to a request. Along with
6257 a set of delay_access directives to determine when it is used.
6258
9edd9041 6259 NOTE: If an IP address is a.b.c.d
6260 -> bits 25 through 32 are "d"
6261 -> bits 17 through 24 are "c"
6262 -> bits 17 through 32 are "c * 256 + d"
b1fb3348
AJ
6263
6264 NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to
6265 IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic.
638402dd
AJ
6266
6267 This clause only supports fast acl types.
6268 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6269
6270 See also delay_parameters and delay_access.
9edd9041 6271DOC_END
6272
6273NAME: delay_access
6274TYPE: delay_pool_access
6275DEFAULT: none
638402dd 6276DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool.
9a0a18de 6277IFDEF: USE_DELAY_POOLS
9edd9041 6278LOC: Config.Delay
6279DOC_START
6280 This is used to determine which delay pool a request falls into.
6281
6282 delay_access is sorted per pool and the matching starts with pool 1,
6283 then pool 2, ..., and finally pool N. The first delay pool where the
6284 request is allowed is selected for the request. If it does not allow
6285 the request to any pool then the request is not delayed (default).
6286
6287 For example, if you want some_big_clients in delay
6288 pool 1 and lotsa_little_clients in delay pool 2:
6289
638402dd
AJ
6290 delay_access 1 allow some_big_clients
6291 delay_access 1 deny all
6292 delay_access 2 allow lotsa_little_clients
6293 delay_access 2 deny all
6294 delay_access 3 allow authenticated_clients
6295
6296 See also delay_parameters and delay_class.
6297
9edd9041 6298DOC_END
6299
6300NAME: delay_parameters
6301TYPE: delay_pool_rates
6302DEFAULT: none
9a0a18de 6303IFDEF: USE_DELAY_POOLS
9edd9041 6304LOC: Config.Delay
6305DOC_START
6306 This defines the parameters for a delay pool. Each delay pool has
6307 a number of "buckets" associated with it, as explained in the
0b68481a 6308 description of delay_class.
9edd9041 6309
0b68481a
AJ
6310 For a class 1 delay pool, the syntax is:
6311 delay_pools pool 1
6312 delay_parameters pool aggregate
9edd9041 6313
6314 For a class 2 delay pool:
0b68481a
AJ
6315 delay_pools pool 2
6316 delay_parameters pool aggregate individual
9edd9041 6317
6318 For a class 3 delay pool:
0b68481a
AJ
6319 delay_pools pool 3
6320 delay_parameters pool aggregate network individual
9edd9041 6321
6322 For a class 4 delay pool:
0b68481a
AJ
6323 delay_pools pool 4
6324 delay_parameters pool aggregate network individual user
9edd9041 6325
6326 For a class 5 delay pool:
0b68481a
AJ
6327 delay_pools pool 5
6328 delay_parameters pool tagrate
9edd9041 6329
0b68481a 6330 The option variables are:
9edd9041 6331
6332 pool a pool number - ie, a number between 1 and the
6333 number specified in delay_pools as used in
6334 delay_class lines.
6335
fdb47ac6 6336 aggregate the speed limit parameters for the aggregate bucket
9edd9041 6337 (class 1, 2, 3).
6338
fdb47ac6 6339 individual the speed limit parameters for the individual
9edd9041 6340 buckets (class 2, 3).
6341
fdb47ac6 6342 network the speed limit parameters for the network buckets
9edd9041 6343 (class 3).
6344
fdb47ac6 6345 user the speed limit parameters for the user buckets
9edd9041 6346 (class 4).
6347
fdb47ac6 6348 tagrate the speed limit parameters for the tag buckets
9edd9041 6349 (class 5).
6350
6351 A pair of delay parameters is written restore/maximum, where restore is
6352 the number of bytes (not bits - modem and network speeds are usually
6353 quoted in bits) per second placed into the bucket, and maximum is the
6354 maximum number of bytes which can be in the bucket at any time.
6355
0b68481a
AJ
6356 There must be one delay_parameters line for each delay pool.
6357
6358
9edd9041 6359 For example, if delay pool number 1 is a class 2 delay pool as in the
0b68481a 6360 above example, and is being used to strictly limit each host to 64Kbit/sec
9edd9041 6361 (plus overheads), with no overall limit, the line is:
6362
0b68481a
AJ
6363 delay_parameters 1 -1/-1 8000/8000
6364
6365 Note that 8 x 8000 KByte/sec -> 64Kbit/sec.
9edd9041 6366
6367 Note that the figure -1 is used to represent "unlimited".
6368
0b68481a 6369
9edd9041 6370 And, if delay pool number 2 is a class 3 delay pool as in the above
0b68481a
AJ
6371 example, and you want to limit it to a total of 256Kbit/sec (strict limit)
6372 with each 8-bit network permitted 64Kbit/sec (strict limit) and each
6373 individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits
9edd9041 6374 to permit a decent web page to be downloaded at a decent speed
6375 (if the network is not being limited due to overuse) but slow down
6376 large downloads more significantly:
6377
0b68481a
AJ
6378 delay_parameters 2 32000/32000 8000/8000 600/8000
6379
6380 Note that 8 x 32000 KByte/sec -> 256Kbit/sec.
6381 8 x 8000 KByte/sec -> 64Kbit/sec.
6382 8 x 600 Byte/sec -> 4800bit/sec.
9edd9041 6383
9edd9041 6384
6385 Finally, for a class 4 delay pool as in the example - each user will
0b68481a 6386 be limited to 128Kbits/sec no matter how many workstations they are logged into.:
9edd9041 6387
0b68481a 6388 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
638402dd
AJ
6389
6390
6391 See also delay_class and delay_access.
6392
9edd9041 6393DOC_END
6394
6395NAME: delay_initial_bucket_level
6396COMMENT: (percent, 0-100)
ae870270 6397TYPE: u_short
9edd9041 6398DEFAULT: 50
9a0a18de 6399IFDEF: USE_DELAY_POOLS
9edd9041 6400LOC: Config.Delay.initial
6401DOC_START
6402 The initial bucket percentage is used to determine how much is put
6403 in each bucket when squid starts, is reconfigured, or first notices
6404 a host accessing it (in class 2 and class 3, individual hosts and
6405 networks only have buckets associated with them once they have been
6406 "seen" by squid).
6407DOC_END
6408
b4cd430a
CT
6409COMMENT_START
6410 CLIENT DELAY POOL PARAMETERS
6411 -----------------------------------------------------------------------------
6412COMMENT_END
6413
6414NAME: client_delay_pools
6415TYPE: client_delay_pool_count
6416DEFAULT: 0
9a0a18de 6417IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6418LOC: Config.ClientDelay
6419DOC_START
6420 This option specifies the number of client delay pools used. It must
6421 preceed other client_delay_* options.
6422
638402dd
AJ
6423 Example:
6424 client_delay_pools 2
6425
6426 See also client_delay_parameters and client_delay_access.
b4cd430a
CT
6427DOC_END
6428
6429NAME: client_delay_initial_bucket_level
6430COMMENT: (percent, 0-no_limit)
ae870270 6431TYPE: u_short
b4cd430a 6432DEFAULT: 50
9a0a18de 6433IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6434LOC: Config.ClientDelay.initial
6435DOC_START
6436 This option determines the initial bucket size as a percentage of
6437 max_bucket_size from client_delay_parameters. Buckets are created
6438 at the time of the "first" connection from the matching IP. Idle
6439 buckets are periodically deleted up.
6440
6441 You can specify more than 100 percent but note that such "oversized"
6442 buckets are not refilled until their size goes down to max_bucket_size
6443 from client_delay_parameters.
6444
638402dd
AJ
6445 Example:
6446 client_delay_initial_bucket_level 50
b4cd430a
CT
6447DOC_END
6448
6449NAME: client_delay_parameters
6450TYPE: client_delay_pool_rates
6451DEFAULT: none
9a0a18de 6452IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6453LOC: Config.ClientDelay
6454DOC_START
6455
6456 This option configures client-side bandwidth limits using the
6457 following format:
6458
6459 client_delay_parameters pool speed_limit max_bucket_size
6460
6461 pool is an integer ID used for client_delay_access matching.
6462
6463 speed_limit is bytes added to the bucket per second.
6464
6465 max_bucket_size is the maximum size of a bucket, enforced after any
6466 speed_limit additions.
6467
6468 Please see the delay_parameters option for more information and
6469 examples.
6470
638402dd
AJ
6471 Example:
6472 client_delay_parameters 1 1024 2048
6473 client_delay_parameters 2 51200 16384
6474
6475 See also client_delay_access.
6476
b4cd430a
CT
6477DOC_END
6478
6479NAME: client_delay_access
6480TYPE: client_delay_pool_access
6481DEFAULT: none
638402dd 6482DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool.
9a0a18de 6483IFDEF: USE_DELAY_POOLS
b4cd430a
CT
6484LOC: Config.ClientDelay
6485DOC_START
b4cd430a
CT
6486 This option determines the client-side delay pool for the
6487 request:
6488
6489 client_delay_access pool_ID allow|deny acl_name
6490
6491 All client_delay_access options are checked in their pool ID
6492 order, starting with pool 1. The first checked pool with allowed
6493 request is selected for the request. If no ACL matches or there
6494 are no client_delay_access options, the request bandwidth is not
6495 limited.
6496
6497 The ACL-selected pool is then used to find the
6498 client_delay_parameters for the request. Client-side pools are
6499 not used to aggregate clients. Clients are always aggregated
6500 based on their source IP addresses (one bucket per source IP).
6501
638402dd
AJ
6502 This clause only supports fast acl types.
6503 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
6504 Additionally, only the client TCP connection details are available.
6505 ACLs testing HTTP properties will not work.
6506
b4cd430a
CT
6507 Please see delay_access for more examples.
6508
638402dd
AJ
6509 Example:
6510 client_delay_access 1 allow low_rate_network
6511 client_delay_access 2 allow vips_network
6512
6513
6514 See also client_delay_parameters and client_delay_pools.
b4cd430a
CT
6515DOC_END
6516
cccac0a2 6517COMMENT_START
8d6275c0 6518 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
cccac0a2 6519 -----------------------------------------------------------------------------
6520COMMENT_END
6521
8d6275c0 6522NAME: wccp_router
6523TYPE: address
6524LOC: Config.Wccp.router
0eb08770 6525DEFAULT: any_addr
638402dd 6526DEFAULT_DOC: WCCP disabled.
8d6275c0 6527IFDEF: USE_WCCP
e313ab0a
AJ
6528DOC_START
6529 Use this option to define your WCCP ``home'' router for
6530 Squid.
6531
6532 wccp_router supports a single WCCP(v1) router
6533
6534 wccp2_router supports multiple WCCPv2 routers
6535
6536 only one of the two may be used at the same time and defines
6537 which version of WCCP to use.
6538DOC_END
df2eec10 6539
8d6275c0 6540NAME: wccp2_router
9fb4efad 6541TYPE: IpAddress_list
8d6275c0 6542LOC: Config.Wccp2.router
cccac0a2 6543DEFAULT: none
638402dd 6544DEFAULT_DOC: WCCPv2 disabled.
8d6275c0 6545IFDEF: USE_WCCPv2
cccac0a2 6546DOC_START
8d6275c0 6547 Use this option to define your WCCP ``home'' router for
6548 Squid.
cccac0a2 6549
8d6275c0 6550 wccp_router supports a single WCCP(v1) router
cccac0a2 6551
8d6275c0 6552 wccp2_router supports multiple WCCPv2 routers
cccac0a2 6553
8d6275c0 6554 only one of the two may be used at the same time and defines
6555 which version of WCCP to use.
6556DOC_END
6557
6558NAME: wccp_version
cccac0a2 6559TYPE: int
8d6275c0 6560LOC: Config.Wccp.version
6561DEFAULT: 4
6562IFDEF: USE_WCCP
cccac0a2 6563DOC_START
8d6275c0 6564 This directive is only relevant if you need to set up WCCP(v1)
6565 to some very old and end-of-life Cisco routers. In all other
6566 setups it must be left unset or at the default setting.
6567 It defines an internal version in the WCCP(v1) protocol,
6568 with version 4 being the officially documented protocol.
cccac0a2 6569
8d6275c0 6570 According to some users, Cisco IOS 11.2 and earlier only
6571 support WCCP version 3. If you're using that or an earlier
6572 version of IOS, you may need to change this value to 3, otherwise
6573 do not specify this parameter.
cccac0a2 6574DOC_END
6575
8d6275c0 6576NAME: wccp2_rebuild_wait
6577TYPE: onoff
6578LOC: Config.Wccp2.rebuildwait
6579DEFAULT: on
6580IFDEF: USE_WCCPv2
6581DOC_START
6582 If this is enabled Squid will wait for the cache dir rebuild to finish
6583 before sending the first wccp2 HereIAm packet
6584DOC_END
cccac0a2 6585
8d6275c0 6586NAME: wccp2_forwarding_method
e313ab0a 6587TYPE: wccp2_method
8d6275c0 6588LOC: Config.Wccp2.forwarding_method
451c4786 6589DEFAULT: gre
8d6275c0 6590IFDEF: USE_WCCPv2
cccac0a2 6591DOC_START
699acd19 6592 WCCP2 allows the setting of forwarding methods between the
8d6275c0 6593 router/switch and the cache. Valid values are as follows:
cccac0a2 6594
451c4786
AJ
6595 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6596 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 6597
8d6275c0 6598 Currently (as of IOS 12.4) cisco routers only support GRE.
6599 Cisco switches only support the L2 redirect assignment method.
cccac0a2 6600DOC_END
6601
8d6275c0 6602NAME: wccp2_return_method
e313ab0a 6603TYPE: wccp2_method
8d6275c0 6604LOC: Config.Wccp2.return_method
451c4786 6605DEFAULT: gre
8d6275c0 6606IFDEF: USE_WCCPv2
cccac0a2 6607DOC_START
699acd19 6608 WCCP2 allows the setting of return methods between the
8d6275c0 6609 router/switch and the cache for packets that the cache
6610 decides not to handle. Valid values are as follows:
cccac0a2 6611
451c4786
AJ
6612 gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
6613 l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
cccac0a2 6614
8d6275c0 6615 Currently (as of IOS 12.4) cisco routers only support GRE.
6616 Cisco switches only support the L2 redirect assignment.
cccac0a2 6617
699acd19 6618 If the "ip wccp redirect exclude in" command has been
8d6275c0 6619 enabled on the cache interface, then it is still safe for
6620 the proxy server to use a l2 redirect method even if this
6621 option is set to GRE.
cccac0a2 6622DOC_END
6623
8d6275c0 6624NAME: wccp2_assignment_method
451c4786 6625TYPE: wccp2_amethod
8d6275c0 6626LOC: Config.Wccp2.assignment_method
451c4786 6627DEFAULT: hash
8d6275c0 6628IFDEF: USE_WCCPv2
cccac0a2 6629DOC_START
8d6275c0 6630 WCCP2 allows the setting of methods to assign the WCCP hash
6631 Valid values are as follows:
cccac0a2 6632
451c4786 6633 hash - Hash assignment
bb7a1781 6634 mask - Mask assignment
cccac0a2 6635
8d6275c0 6636 As a general rule, cisco routers support the hash assignment method
6637 and cisco switches support the mask assignment method.
6638DOC_END
cccac0a2 6639
8d6275c0 6640NAME: wccp2_service
6641TYPE: wccp2_service
6642LOC: Config.Wccp2.info
8d6275c0 6643DEFAULT_IF_NONE: standard 0
638402dd 6644DEFAULT_DOC: Use the 'web-cache' standard service.
8d6275c0 6645IFDEF: USE_WCCPv2
6646DOC_START
6647 WCCP2 allows for multiple traffic services. There are two
6648 types: "standard" and "dynamic". The standard type defines
6649 one service id - http (id 0). The dynamic service ids can be from
6650 51 to 255 inclusive. In order to use a dynamic service id
6651 one must define the type of traffic to be redirected; this is done
6652 using the wccp2_service_info option.
6653
6654 The "standard" type does not require a wccp2_service_info option,
6655 just specifying the service id will suffice.
6656
6657 MD5 service authentication can be enabled by adding
6658 "password=<password>" to the end of this service declaration.
6659
6660 Examples:
6661
6662 wccp2_service standard 0 # for the 'web-cache' standard service
6663 wccp2_service dynamic 80 # a dynamic service type which will be
6664 # fleshed out with subsequent options.
6665 wccp2_service standard 0 password=foo
8d6275c0 6666DOC_END
6667
6668NAME: wccp2_service_info
6669TYPE: wccp2_service_info
6670LOC: Config.Wccp2.info
6671DEFAULT: none
6672IFDEF: USE_WCCPv2
6673DOC_START
6674 Dynamic WCCPv2 services require further information to define the
6675 traffic you wish to have diverted.
6676
6677 The format is:
6678
6679 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
6680 priority=<priority> ports=<port>,<port>..
6681
6682 The relevant WCCPv2 flags:
6683 + src_ip_hash, dst_ip_hash
005fe566 6684 + source_port_hash, dst_port_hash
8d6275c0 6685 + src_ip_alt_hash, dst_ip_alt_hash
6686 + src_port_alt_hash, dst_port_alt_hash
6687 + ports_source
6688
6689 The port list can be one to eight entries.
6690
6691 Example:
6692
6693 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
6694 priority=240 ports=80
6695
6696 Note: the service id must have been defined by a previous
6697 'wccp2_service dynamic <id>' entry.
6698DOC_END
6699
6700NAME: wccp2_weight
6701TYPE: int
6702LOC: Config.Wccp2.weight
6703DEFAULT: 10000
6704IFDEF: USE_WCCPv2
6705DOC_START
6706 Each cache server gets assigned a set of the destination
6707 hash proportional to their weight.
6708DOC_END
6709
6710NAME: wccp_address
6711TYPE: address
6712LOC: Config.Wccp.address
6713DEFAULT: 0.0.0.0
638402dd 6714DEFAULT_DOC: Address selected by the operating system.
8d6275c0 6715IFDEF: USE_WCCP
638402dd
AJ
6716DOC_START
6717 Use this option if you require WCCPv2 to use a specific
6718 interface address.
6719
6720 The default behavior is to not bind to any specific address.
6721DOC_END
df2eec10 6722
8d6275c0 6723NAME: wccp2_address
6724TYPE: address
6725LOC: Config.Wccp2.address
6726DEFAULT: 0.0.0.0
638402dd 6727DEFAULT_DOC: Address selected by the operating system.
8d6275c0 6728IFDEF: USE_WCCPv2
6729DOC_START
6730 Use this option if you require WCCP to use a specific
6731 interface address.
6732
6733 The default behavior is to not bind to any specific address.
6734DOC_END
6735
6736COMMENT_START
6737 PERSISTENT CONNECTION HANDLING
6738 -----------------------------------------------------------------------------
6739
6740 Also see "pconn_timeout" in the TIMEOUTS section
6741COMMENT_END
6742
6743NAME: client_persistent_connections
6744TYPE: onoff
6745LOC: Config.onoff.client_pconns
6746DEFAULT: on
638402dd
AJ
6747DOC_START
6748 Persistent connection support for clients.
6749 Squid uses persistent connections (when allowed). You can use
6750 this option to disable persistent connections with clients.
6751DOC_END
8d6275c0 6752
6753NAME: server_persistent_connections
6754TYPE: onoff
6755LOC: Config.onoff.server_pconns
6756DEFAULT: on
6757DOC_START
638402dd
AJ
6758 Persistent connection support for servers.
6759 Squid uses persistent connections (when allowed). You can use
6760 this option to disable persistent connections with servers.
8d6275c0 6761DOC_END
6762
6763NAME: persistent_connection_after_error
6764TYPE: onoff
6765LOC: Config.onoff.error_pconns
0fccfb7f 6766DEFAULT: on
8d6275c0 6767DOC_START
6768 With this directive the use of persistent connections after
6769 HTTP errors can be disabled. Useful if you have clients
6770 who fail to handle errors on persistent connections proper.
6771DOC_END
6772
6773NAME: detect_broken_pconn
6774TYPE: onoff
6775LOC: Config.onoff.detect_broken_server_pconns
6776DEFAULT: off
6777DOC_START
6778 Some servers have been found to incorrectly signal the use
6779 of HTTP/1.0 persistent connections even on replies not
6780 compatible, causing significant delays. This server problem
6781 has mostly been seen on redirects.
6782
6783 By enabling this directive Squid attempts to detect such
6784 broken replies and automatically assume the reply is finished
6785 after 10 seconds timeout.
6786DOC_END
6787
6788COMMENT_START
6789 CACHE DIGEST OPTIONS
6790 -----------------------------------------------------------------------------
6791COMMENT_END
6792
6793NAME: digest_generation
6794IFDEF: USE_CACHE_DIGESTS
6795TYPE: onoff
6796LOC: Config.onoff.digest_generation
6797DEFAULT: on
6798DOC_START
6799 This controls whether the server will generate a Cache Digest
6800 of its contents. By default, Cache Digest generation is
13e917b5 6801 enabled if Squid is compiled with --enable-cache-digests defined.
8d6275c0 6802DOC_END
6803
6804NAME: digest_bits_per_entry
6805IFDEF: USE_CACHE_DIGESTS
6806TYPE: int
6807LOC: Config.digest.bits_per_entry
6808DEFAULT: 5
6809DOC_START
6810 This is the number of bits of the server's Cache Digest which
6811 will be associated with the Digest entry for a given HTTP
6812 Method and URL (public key) combination. The default is 5.
6813DOC_END
6814
6815NAME: digest_rebuild_period
6816IFDEF: USE_CACHE_DIGESTS
6817COMMENT: (seconds)
6818TYPE: time_t
6819LOC: Config.digest.rebuild_period
6820DEFAULT: 1 hour
6821DOC_START
749ceff8 6822 This is the wait time between Cache Digest rebuilds.
8d6275c0 6823DOC_END
6824
6825NAME: digest_rewrite_period
6826COMMENT: (seconds)
6827IFDEF: USE_CACHE_DIGESTS
6828TYPE: time_t
6829LOC: Config.digest.rewrite_period
6830DEFAULT: 1 hour
6831DOC_START
749ceff8 6832 This is the wait time between Cache Digest writes to
8d6275c0 6833 disk.
6834DOC_END
6835
6836NAME: digest_swapout_chunk_size
6837COMMENT: (bytes)
6838TYPE: b_size_t
6839IFDEF: USE_CACHE_DIGESTS
6840LOC: Config.digest.swapout_chunk_size
6841DEFAULT: 4096 bytes
6842DOC_START
6843 This is the number of bytes of the Cache Digest to write to
6844 disk at a time. It defaults to 4096 bytes (4KB), the Squid
6845 default swap page.
6846DOC_END
6847
6848NAME: digest_rebuild_chunk_percentage
6849COMMENT: (percent, 0-100)
6850IFDEF: USE_CACHE_DIGESTS
6851TYPE: int
6852LOC: Config.digest.rebuild_chunk_percentage
6853DEFAULT: 10
6854DOC_START
6855 This is the percentage of the Cache Digest to be scanned at a
6856 time. By default it is set to 10% of the Cache Digest.
6857DOC_END
6858
1db9eacd 6859COMMENT_START
5473c134 6860 SNMP OPTIONS
1db9eacd 6861 -----------------------------------------------------------------------------
6862COMMENT_END
6863
5473c134 6864NAME: snmp_port
ae870270 6865TYPE: u_short
5473c134 6866LOC: Config.Port.snmp
87630341 6867DEFAULT: 0
638402dd 6868DEFAULT_DOC: SNMP disabled.
5473c134 6869IFDEF: SQUID_SNMP
8d6275c0 6870DOC_START
87630341 6871 The port number where Squid listens for SNMP requests. To enable
6872 SNMP support set this to a suitable port number. Port number
6873 3401 is often used for the Squid SNMP agent. By default it's
6874 set to "0" (disabled)
e0855596
AJ
6875
6876 Example:
6877 snmp_port 3401
8d6275c0 6878DOC_END
6879
5473c134 6880NAME: snmp_access
6881TYPE: acl_access
6882LOC: Config.accessList.snmp
638402dd
AJ
6883DEFAULT: none
6884DEFAULT_DOC: Deny, unless rules exist in squid.conf.
5473c134 6885IFDEF: SQUID_SNMP
8d6275c0 6886DOC_START
5473c134 6887 Allowing or denying access to the SNMP port.
8d6275c0 6888
5473c134 6889 All access to the agent is denied by default.
6890 usage:
8d6275c0 6891
5473c134 6892 snmp_access allow|deny [!]aclname ...
8d6275c0 6893
b3567eb5
FC
6894 This clause only supports fast acl types.
6895 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
638402dd 6896
5473c134 6897Example:
6898 snmp_access allow snmppublic localhost
6899 snmp_access deny all
cccac0a2 6900DOC_END
6901
5473c134 6902NAME: snmp_incoming_address
6903TYPE: address
6904LOC: Config.Addrs.snmp_incoming
0eb08770 6905DEFAULT: any_addr
638402dd 6906DEFAULT_DOC: Accept SNMP packets from all machine interfaces.
5473c134 6907IFDEF: SQUID_SNMP
638402dd
AJ
6908DOC_START
6909 Just like 'udp_incoming_address', but for the SNMP port.
6910
6911 snmp_incoming_address is used for the SNMP socket receiving
6912 messages from SNMP agents.
6913
6914 The default snmp_incoming_address is to listen on all
6915 available network interfaces.
6916DOC_END
df2eec10 6917
5473c134 6918NAME: snmp_outgoing_address
6919TYPE: address
6920LOC: Config.Addrs.snmp_outgoing
0eb08770 6921DEFAULT: no_addr
638402dd 6922DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system.
5473c134 6923IFDEF: SQUID_SNMP
cccac0a2 6924DOC_START
638402dd 6925 Just like 'udp_outgoing_address', but for the SNMP port.
cccac0a2 6926
5473c134 6927 snmp_outgoing_address is used for SNMP packets returned to SNMP
6928 agents.
cccac0a2 6929
0eb08770
HN
6930 If snmp_outgoing_address is not set it will use the same socket
6931 as snmp_incoming_address. Only change this if you want to have
6932 SNMP replies sent using another address than where this Squid
6933 listens for SNMP queries.
cccac0a2 6934
5473c134 6935 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
638402dd 6936 the same value since they both use the same port.
cccac0a2 6937DOC_END
6938
5473c134 6939COMMENT_START
6940 ICP OPTIONS
6941 -----------------------------------------------------------------------------
6942COMMENT_END
6943
6944NAME: icp_port udp_port
ae870270 6945TYPE: u_short
5473c134 6946DEFAULT: 0
638402dd 6947DEFAULT_DOC: ICP disabled.
5473c134 6948LOC: Config.Port.icp
cccac0a2 6949DOC_START
5473c134 6950 The port number where Squid sends and receives ICP queries to
6951 and from neighbor caches. The standard UDP port for ICP is 3130.
e0855596
AJ
6952
6953 Example:
6954 icp_port @DEFAULT_ICP_PORT@
cccac0a2 6955DOC_END
6956
5473c134 6957NAME: htcp_port
6958IFDEF: USE_HTCP
ae870270 6959TYPE: u_short
87630341 6960DEFAULT: 0
638402dd 6961DEFAULT_DOC: HTCP disabled.
5473c134 6962LOC: Config.Port.htcp
cccac0a2 6963DOC_START
5473c134 6964 The port number where Squid sends and receives HTCP queries to
87630341 6965 and from neighbor caches. To turn it on you want to set it to
638402dd 6966 4827.
e0855596
AJ
6967
6968 Example:
6969 htcp_port 4827
cccac0a2 6970DOC_END
6971
6972NAME: log_icp_queries
6973COMMENT: on|off
6974TYPE: onoff
6975DEFAULT: on
6976LOC: Config.onoff.log_udp
6977DOC_START
6978 If set, ICP queries are logged to access.log. You may wish
6979 do disable this if your ICP load is VERY high to speed things
6980 up or to simplify log analysis.
6981DOC_END
6982
5473c134 6983NAME: udp_incoming_address
6984TYPE: address
6985LOC:Config.Addrs.udp_incoming
0eb08770 6986DEFAULT: any_addr
638402dd 6987DEFAULT_DOC: Accept packets from all machine interfaces.
8524d4b2 6988DOC_START
6989 udp_incoming_address is used for UDP packets received from other
6990 caches.
6991
6992 The default behavior is to not bind to any specific address.
6993
6994 Only change this if you want to have all UDP queries received on
6995 a specific interface/address.
6996
6997 NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
6998 modules. Altering it will affect all of them in the same manner.
6999
7000 see also; udp_outgoing_address
7001
7002 NOTE, udp_incoming_address and udp_outgoing_address can not
7003 have the same value since they both use the same port.
7004DOC_END
cccac0a2 7005
5473c134 7006NAME: udp_outgoing_address
7007TYPE: address
7008LOC: Config.Addrs.udp_outgoing
0eb08770 7009DEFAULT: no_addr
638402dd 7010DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system.
cccac0a2 7011DOC_START
8524d4b2 7012 udp_outgoing_address is used for UDP packets sent out to other
5473c134 7013 caches.
cccac0a2 7014
5473c134 7015 The default behavior is to not bind to any specific address.
cccac0a2 7016
8524d4b2 7017 Instead it will use the same socket as udp_incoming_address.
7018 Only change this if you want to have UDP queries sent using another
7019 address than where this Squid listens for UDP queries from other
5473c134 7020 caches.
7021
8524d4b2 7022 NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
7023 modules. Altering it will affect all of them in the same manner.
7024
7025 see also; udp_incoming_address
7026
5473c134 7027 NOTE, udp_incoming_address and udp_outgoing_address can not
8524d4b2 7028 have the same value since they both use the same port.
cccac0a2 7029DOC_END
7030
3d1e3e43 7031NAME: icp_hit_stale
7032COMMENT: on|off
7033TYPE: onoff
7034DEFAULT: off
7035LOC: Config.onoff.icp_hit_stale
7036DOC_START
7037 If you want to return ICP_HIT for stale cache objects, set this
7038 option to 'on'. If you have sibling relationships with caches
7039 in other administrative domains, this should be 'off'. If you only
7040 have sibling relationships with caches under your control,
7041 it is probably okay to set this to 'on'.
7042 If set to 'on', your siblings should use the option "allow-miss"
7043 on their cache_peer lines for connecting to you.
7044DOC_END
7045
5473c134 7046NAME: minimum_direct_hops
cccac0a2 7047TYPE: int
5473c134 7048DEFAULT: 4
7049LOC: Config.minDirectHops
cccac0a2 7050DOC_START
5473c134 7051 If using the ICMP pinging stuff, do direct fetches for sites
7052 which are no more than this many hops away.
cccac0a2 7053DOC_END
7054
5473c134 7055NAME: minimum_direct_rtt
638402dd 7056COMMENT: (msec)
5473c134 7057TYPE: int
7058DEFAULT: 400
7059LOC: Config.minDirectRtt
cccac0a2 7060DOC_START
5473c134 7061 If using the ICMP pinging stuff, do direct fetches for sites
7062 which are no more than this many rtt milliseconds away.
cccac0a2 7063DOC_END
7064
cccac0a2 7065NAME: netdb_low
7066TYPE: int
7067DEFAULT: 900
7068LOC: Config.Netdb.low
638402dd
AJ
7069DOC_START
7070 The low water mark for the ICMP measurement database.
7071
7072 Note: high watermark controlled by netdb_high directive.
7073
7074 These watermarks are counts, not percents. The defaults are
7075 (low) 900 and (high) 1000. When the high water mark is
7076 reached, database entries will be deleted until the low
7077 mark is reached.
7078DOC_END
cccac0a2 7079
7080NAME: netdb_high
7081TYPE: int
7082DEFAULT: 1000
7083LOC: Config.Netdb.high
7084DOC_START
638402dd
AJ
7085 The high water mark for the ICMP measurement database.
7086
7087 Note: low watermark controlled by netdb_low directive.
7088
7089 These watermarks are counts, not percents. The defaults are
7090 (low) 900 and (high) 1000. When the high water mark is
7091 reached, database entries will be deleted until the low
7092 mark is reached.
cccac0a2 7093DOC_END
7094
cccac0a2 7095NAME: netdb_ping_period
7096TYPE: time_t
7097LOC: Config.Netdb.period
7098DEFAULT: 5 minutes
7099DOC_START
7100 The minimum period for measuring a site. There will be at
7101 least this much delay between successive pings to the same
7102 network. The default is five minutes.
7103DOC_END
7104
cccac0a2 7105NAME: query_icmp
7106COMMENT: on|off
7107TYPE: onoff
7108DEFAULT: off
7109LOC: Config.onoff.query_icmp
7110DOC_START
7111 If you want to ask your peers to include ICMP data in their ICP
7112 replies, enable this option.
7113
7114 If your peer has configured Squid (during compilation) with
7f7db318 7115 '--enable-icmp' that peer will send ICMP pings to origin server
7116 sites of the URLs it receives. If you enable this option the
cccac0a2 7117 ICP replies from that peer will include the ICMP data (if available).
7118 Then, when choosing a parent cache, Squid will choose the parent with
7119 the minimal RTT to the origin server. When this happens, the
7120 hierarchy field of the access.log will be
7121 "CLOSEST_PARENT_MISS". This option is off by default.
7122DOC_END
7123
7124NAME: test_reachability
7125COMMENT: on|off
7126TYPE: onoff
7127DEFAULT: off
7128LOC: Config.onoff.test_reachability
7129DOC_START
7130 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
7131 instead of ICP_MISS if the target host is NOT in the ICMP
7132 database, or has a zero RTT.
7133DOC_END
7134
5473c134 7135NAME: icp_query_timeout
7136COMMENT: (msec)
7137DEFAULT: 0
638402dd 7138DEFAULT_DOC: Dynamic detection.
5473c134 7139TYPE: int
7140LOC: Config.Timeout.icp_query
4c3ef9b2 7141DOC_START
5473c134 7142 Normally Squid will automatically determine an optimal ICP
7143 query timeout value based on the round-trip-time of recent ICP
7144 queries. If you want to override the value determined by
7145 Squid, set this 'icp_query_timeout' to a non-zero value. This
7146 value is specified in MILLISECONDS, so, to use a 2-second
7147 timeout (the old default), you would write:
4c3ef9b2 7148
5473c134 7149 icp_query_timeout 2000
4c3ef9b2 7150DOC_END
7151
5473c134 7152NAME: maximum_icp_query_timeout
7153COMMENT: (msec)
7154DEFAULT: 2000
7155TYPE: int
7156LOC: Config.Timeout.icp_query_max
cccac0a2 7157DOC_START
5473c134 7158 Normally the ICP query timeout is determined dynamically. But
7159 sometimes it can lead to very large values (say 5 seconds).
7160 Use this option to put an upper limit on the dynamic timeout
7161 value. Do NOT use this option to always use a fixed (instead
7162 of a dynamic) timeout value. To set a fixed timeout see the
7163 'icp_query_timeout' directive.
cccac0a2 7164DOC_END
7165
5473c134 7166NAME: minimum_icp_query_timeout
7167COMMENT: (msec)
7168DEFAULT: 5
7169TYPE: int
7170LOC: Config.Timeout.icp_query_min
cccac0a2 7171DOC_START
5473c134 7172 Normally the ICP query timeout is determined dynamically. But
7173 sometimes it can lead to very small timeouts, even lower than
7174 the normal latency variance on your link due to traffic.
7175 Use this option to put an lower limit on the dynamic timeout
7176 value. Do NOT use this option to always use a fixed (instead
7177 of a dynamic) timeout value. To set a fixed timeout see the
7178 'icp_query_timeout' directive.
cccac0a2 7179DOC_END
7180
5473c134 7181NAME: background_ping_rate
7182COMMENT: time-units
7183TYPE: time_t
7184DEFAULT: 10 seconds
7185LOC: Config.backgroundPingRate
cccac0a2 7186DOC_START
5473c134 7187 Controls how often the ICP pings are sent to siblings that
7188 have background-ping set.
cccac0a2 7189DOC_END
7190
5473c134 7191COMMENT_START
7192 MULTICAST ICP OPTIONS
7193 -----------------------------------------------------------------------------
7194COMMENT_END
7195
7196NAME: mcast_groups
7197TYPE: wordlist
7198LOC: Config.mcast_group_list
8c01ada0 7199DEFAULT: none
7200DOC_START
5473c134 7201 This tag specifies a list of multicast groups which your server
7202 should join to receive multicasted ICP queries.
8c01ada0 7203
5473c134 7204 NOTE! Be very careful what you put here! Be sure you
7205 understand the difference between an ICP _query_ and an ICP
7206 _reply_. This option is to be set only if you want to RECEIVE
7207 multicast queries. Do NOT set this option to SEND multicast
7208 ICP (use cache_peer for that). ICP replies are always sent via
7209 unicast, so this option does not affect whether or not you will
7210 receive replies from multicast group members.
8c01ada0 7211
5473c134 7212 You must be very careful to NOT use a multicast address which
7213 is already in use by another group of caches.
8c01ada0 7214
5473c134 7215 If you are unsure about multicast, please read the Multicast
7216 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
8c01ada0 7217
5473c134 7218 Usage: mcast_groups 239.128.16.128 224.0.1.20
8c01ada0 7219
5473c134 7220 By default, Squid doesn't listen on any multicast groups.
7221DOC_END
8c01ada0 7222
5473c134 7223NAME: mcast_miss_addr
7224IFDEF: MULTICAST_MISS_STREAM
7225TYPE: address
7226LOC: Config.mcast_miss.addr
0eb08770 7227DEFAULT: no_addr
638402dd 7228DEFAULT_DOC: disabled.
5473c134 7229DOC_START
7230 If you enable this option, every "cache miss" URL will
7231 be sent out on the specified multicast address.
cccac0a2 7232
5473c134 7233 Do not enable this option unless you are are absolutely
7234 certain you understand what you are doing.
cccac0a2 7235DOC_END
7236
5473c134 7237NAME: mcast_miss_ttl
7238IFDEF: MULTICAST_MISS_STREAM
ae870270 7239TYPE: u_short
5473c134 7240LOC: Config.mcast_miss.ttl
7241DEFAULT: 16
cccac0a2 7242DOC_START
5473c134 7243 This is the time-to-live value for packets multicasted
7244 when multicasting off cache miss URLs is enabled. By
7245 default this is set to 'site scope', i.e. 16.
7246DOC_END
cccac0a2 7247
5473c134 7248NAME: mcast_miss_port
7249IFDEF: MULTICAST_MISS_STREAM
ae870270 7250TYPE: u_short
5473c134 7251LOC: Config.mcast_miss.port
7252DEFAULT: 3135
7253DOC_START
7254 This is the port number to be used in conjunction with
7255 'mcast_miss_addr'.
7256DOC_END
cccac0a2 7257
5473c134 7258NAME: mcast_miss_encode_key
7259IFDEF: MULTICAST_MISS_STREAM
7260TYPE: string
7261LOC: Config.mcast_miss.encode_key
7262DEFAULT: XXXXXXXXXXXXXXXX
7263DOC_START
7264 The URLs that are sent in the multicast miss stream are
7265 encrypted. This is the encryption key.
7266DOC_END
8c01ada0 7267
5473c134 7268NAME: mcast_icp_query_timeout
7269COMMENT: (msec)
7270DEFAULT: 2000
7271TYPE: int
7272LOC: Config.Timeout.mcast_icp_query
7273DOC_START
7274 For multicast peers, Squid regularly sends out ICP "probes" to
7275 count how many other peers are listening on the given multicast
7276 address. This value specifies how long Squid should wait to
7277 count all the replies. The default is 2000 msec, or 2
7278 seconds.
cccac0a2 7279DOC_END
7280
5473c134 7281COMMENT_START
7282 INTERNAL ICON OPTIONS
7283 -----------------------------------------------------------------------------
7284COMMENT_END
7285
cccac0a2 7286NAME: icon_directory
7287TYPE: string
7288LOC: Config.icons.directory
7289DEFAULT: @DEFAULT_ICON_DIR@
7290DOC_START
7291 Where the icons are stored. These are normally kept in
7292 @DEFAULT_ICON_DIR@
7293DOC_END
7294
f024c970 7295NAME: global_internal_static
7296TYPE: onoff
7297LOC: Config.onoff.global_internal_static
7298DEFAULT: on
7299DOC_START
7300 This directive controls is Squid should intercept all requests for
7301 /squid-internal-static/ no matter which host the URL is requesting
7302 (default on setting), or if nothing special should be done for
7303 such URLs (off setting). The purpose of this directive is to make
7304 icons etc work better in complex cache hierarchies where it may
7305 not always be possible for all corners in the cache mesh to reach
7306 the server generating a directory listing.
7307DOC_END
7308
5473c134 7309NAME: short_icon_urls
7310TYPE: onoff
7311LOC: Config.icons.use_short_names
7312DEFAULT: on
7313DOC_START
7314 If this is enabled Squid will use short URLs for icons.
7315 If disabled it will revert to the old behavior of including
7316 it's own name and port in the URL.
7317
7318 If you run a complex cache hierarchy with a mix of Squid and
7319 other proxies you may need to disable this directive.
7320DOC_END
7321
7322COMMENT_START
7323 ERROR PAGE OPTIONS
7324 -----------------------------------------------------------------------------
7325COMMENT_END
7326
7327NAME: error_directory
7328TYPE: string
7329LOC: Config.errorDirectory
43000484 7330DEFAULT: none
638402dd 7331DEFAULT_DOC: Send error pages in the clients preferred language
5473c134 7332DOC_START
7333 If you wish to create your own versions of the default
43000484
AJ
7334 error files to customize them to suit your company copy
7335 the error/template files to another directory and point
7336 this tag at them.
7337
7338 WARNING: This option will disable multi-language support
7339 on error pages if used.
5473c134 7340
7341 The squid developers are interested in making squid available in
7342 a wide variety of languages. If you are making translations for a
43000484 7343 language that Squid does not currently provide please consider
5473c134 7344 contributing your translation back to the project.
43000484
AJ
7345 http://wiki.squid-cache.org/Translations
7346
7347 The squid developers working on translations are happy to supply drop-in
7348 translated error files in exchange for any new language contributions.
7349DOC_END
7350
7351NAME: error_default_language
7352IFDEF: USE_ERR_LOCALES
7353TYPE: string
7354LOC: Config.errorDefaultLanguage
7355DEFAULT: none
638402dd 7356DEFAULT_DOC: Generate English language pages.
43000484
AJ
7357DOC_START
7358 Set the default language which squid will send error pages in
7359 if no existing translation matches the clients language
7360 preferences.
7361
7362 If unset (default) generic English will be used.
7363
7364 The squid developers are interested in making squid available in
7365 a wide variety of languages. If you are interested in making
7366 translations for any language see the squid wiki for details.
7367 http://wiki.squid-cache.org/Translations
5473c134 7368DOC_END
7369
c411820c
AJ
7370NAME: error_log_languages
7371IFDEF: USE_ERR_LOCALES
7372TYPE: onoff
7373LOC: Config.errorLogMissingLanguages
7374DEFAULT: on
7375DOC_START
7376 Log to cache.log what languages users are attempting to
7377 auto-negotiate for translations.
7378
7379 Successful negotiations are not logged. Only failures
7380 have meaning to indicate that Squid may need an upgrade
0c49f10e 7381 of its error page translations.
c411820c
AJ
7382DOC_END
7383
5b52cb6c
AJ
7384NAME: err_page_stylesheet
7385TYPE: string
7386LOC: Config.errorStylesheet
7387DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css
7388DOC_START
7389 CSS Stylesheet to pattern the display of Squid default error pages.
7390
7391 For information on CSS see http://www.w3.org/Style/CSS/
7392DOC_END
7393
5473c134 7394NAME: err_html_text
7395TYPE: eol
7396LOC: Config.errHtmlText
7397DEFAULT: none
7398DOC_START
7399 HTML text to include in error messages. Make this a "mailto"
7400 URL to your admin address, or maybe just a link to your
7401 organizations Web page.
7402
7403 To include this in your error messages, you must rewrite
7404 the error template files (found in the "errors" directory).
7405 Wherever you want the 'err_html_text' line to appear,
7406 insert a %L tag in the error template file.
7407DOC_END
7408
7409NAME: email_err_data
7410COMMENT: on|off
7411TYPE: onoff
7412LOC: Config.onoff.emailErrData
7413DEFAULT: on
7414DOC_START
7415 If enabled, information about the occurred error will be
7416 included in the mailto links of the ERR pages (if %W is set)
7417 so that the email body contains the data.
7418 Syntax is <A HREF="mailto:%w%W">%w</A>
7419DOC_END
7420
7421NAME: deny_info
7422TYPE: denyinfo
7423LOC: Config.denyInfoList
7424DEFAULT: none
7425DOC_START
7426 Usage: deny_info err_page_name acl
7427 or deny_info http://... acl
43000484 7428 or deny_info TCP_RESET acl
5473c134 7429
7430 This can be used to return a ERR_ page for requests which
7431 do not pass the 'http_access' rules. Squid remembers the last
7432 acl it evaluated in http_access, and if a 'deny_info' line exists
7433 for that ACL Squid returns a corresponding error page.
7434
7435 The acl is typically the last acl on the http_access deny line which
7436 denied access. The exceptions to this rule are:
7437 - When Squid needs to request authentication credentials. It's then
7438 the first authentication related acl encountered
7439 - When none of the http_access lines matches. It's then the last
7440 acl processed on the last http_access line.
3af10ac0
AR
7441 - When the decision to deny access was made by an adaptation service,
7442 the acl name is the corresponding eCAP or ICAP service_name.
5473c134 7443
43000484
AJ
7444 NP: If providing your own custom error pages with error_directory
7445 you may also specify them by your custom file name:
7446 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
5473c134 7447
aed9a15b
AJ
7448 By defaut Squid will send "403 Forbidden". A different 4xx or 5xx
7449 may be specified by prefixing the file name with the code and a colon.
7450 e.g. 404:ERR_CUSTOM_ACCESS_DENIED
7451
5473c134 7452 Alternatively you can tell Squid to reset the TCP connection
7453 by specifying TCP_RESET.
15b02e9a
AJ
7454
7455 Or you can specify an error URL or URL pattern. The browsers will
aed9a15b
AJ
7456 get redirected to the specified URL after formatting tags have
7457 been replaced. Redirect will be done with 302 or 307 according to
7458 HTTP/1.1 specs. A different 3xx code may be specified by prefixing
7459 the URL. e.g. 303:http://example.com/
15b02e9a
AJ
7460
7461 URL FORMAT TAGS:
7462 %a - username (if available. Password NOT included)
7463 %B - FTP path URL
7464 %e - Error number
7465 %E - Error description
7466 %h - Squid hostname
7467 %H - Request domain name
7468 %i - Client IP Address
7469 %M - Request Method
7470 %o - Message result from external ACL helper
7471 %p - Request Port number
7472 %P - Request Protocol name
7473 %R - Request URL path
7474 %T - Timestamp in RFC 1123 format
7475 %U - Full canonical URL from client
7476 (HTTPS URLs terminate with *)
7477 %u - Full canonical URL from client
7478 %w - Admin email from squid.conf
e4a8468d 7479 %x - Error name
15b02e9a
AJ
7480 %% - Literal percent (%) code
7481
5473c134 7482DOC_END
7483
7484COMMENT_START
7485 OPTIONS INFLUENCING REQUEST FORWARDING
7486 -----------------------------------------------------------------------------
7487COMMENT_END
7488
7489NAME: nonhierarchical_direct
e72a0ec0 7490TYPE: onoff
5473c134 7491LOC: Config.onoff.nonhierarchical_direct
e72a0ec0 7492DEFAULT: on
7493DOC_START
5473c134 7494 By default, Squid will send any non-hierarchical requests
7495 (matching hierarchy_stoplist or not cacheable request type) direct
7496 to origin servers.
e72a0ec0 7497
638402dd 7498 When this is set to "off", Squid will prefer to send these
5473c134 7499 requests to parents.
0b0cfcf2 7500
5473c134 7501 Note that in most configurations, by turning this off you will only
7502 add latency to these request without any improvement in global hit
7503 ratio.
0b0cfcf2 7504
638402dd
AJ
7505 This option only sets a preference. If the parent is unavailable a
7506 direct connection to the origin server may still be attempted. To
7507 completely prevent direct connections use never_direct.
8d6275c0 7508DOC_END
0b0cfcf2 7509
5473c134 7510NAME: prefer_direct
8d6275c0 7511TYPE: onoff
5473c134 7512LOC: Config.onoff.prefer_direct
8d6275c0 7513DEFAULT: off
7514DOC_START
5473c134 7515 Normally Squid tries to use parents for most requests. If you for some
7516 reason like it to first try going direct and only use a parent if
7517 going direct fails set this to on.
0b0cfcf2 7518
5473c134 7519 By combining nonhierarchical_direct off and prefer_direct on you
7520 can set up Squid to use a parent as a backup path if going direct
7521 fails.
7522
7523 Note: If you want Squid to use parents for all requests see
7524 the never_direct directive. prefer_direct only modifies how Squid
7525 acts on cacheable requests.
cccac0a2 7526DOC_END
7527
96598f93
AJ
7528NAME: cache_miss_revalidate
7529COMMENT: on|off
7530TYPE: onoff
7531DEFAULT: on
7532LOC: Config.onoff.cache_miss_revalidate
7533DOC_START
7534 Whether Squid on cache MISS will pass client revalidation requests
7535 to the server or tries to fetch new content for caching.
7536 This is useful while the cache is mostly empty to more quickly
7537 have the cache populated.
7538
7539 When set to 'on' (default), Squid will pass all client If-* headers
7540 to the server.
7541
7542 When set to 'off' and if the request is cacheable, Squid will
7543 remove the clients If-Modified-Since and If-None-Match headers from
7544 the request sent to the server.
7545DOC_END
7546
5473c134 7547NAME: always_direct
8d6275c0 7548TYPE: acl_access
5473c134 7549LOC: Config.accessList.AlwaysDirect
0b0cfcf2 7550DEFAULT: none
638402dd 7551DEFAULT_DOC: Prevent any cache_peer being used for this request.
0b0cfcf2 7552DOC_START
5473c134 7553 Usage: always_direct allow|deny [!]aclname ...
0b0cfcf2 7554
5473c134 7555 Here you can use ACL elements to specify requests which should
7556 ALWAYS be forwarded by Squid to the origin servers without using
7557 any peers. For example, to always directly forward requests for
7558 local servers ignoring any parents or siblings you may have use
7559 something like:
0b0cfcf2 7560
5473c134 7561 acl local-servers dstdomain my.domain.net
7562 always_direct allow local-servers
0b0cfcf2 7563
5473c134 7564 To always forward FTP requests directly, use
f16fbc82 7565
5473c134 7566 acl FTP proto FTP
7567 always_direct allow FTP
cccac0a2 7568
5473c134 7569 NOTE: There is a similar, but opposite option named
7570 'never_direct'. You need to be aware that "always_direct deny
7571 foo" is NOT the same thing as "never_direct allow foo". You
7572 may need to use a deny rule to exclude a more-specific case of
7573 some other rule. Example:
8d6275c0 7574
5473c134 7575 acl local-external dstdomain external.foo.net
7576 acl local-servers dstdomain .foo.net
7577 always_direct deny local-external
7578 always_direct allow local-servers
8d6275c0 7579
5473c134 7580 NOTE: If your goal is to make the client forward the request
7581 directly to the origin server bypassing Squid then this needs
7582 to be done in the client configuration. Squid configuration
7583 can only tell Squid how Squid should fetch the object.
8d6275c0 7584
5473c134 7585 NOTE: This directive is not related to caching. The replies
7586 is cached as usual even if you use always_direct. To not cache
b3567eb5 7587 the replies see the 'cache' directive.
5473c134 7588
b3567eb5
FC
7589 This clause supports both fast and slow acl types.
7590 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
cccac0a2 7591DOC_END
0976f8db 7592
5473c134 7593NAME: never_direct
7594TYPE: acl_access
7595LOC: Config.accessList.NeverDirect
7596DEFAULT: none
638402dd 7597DEFAULT_DOC: Allow DNS results to be used for this request.
8d6275c0 7598DOC_START
5473c134 7599 Usage: never_direct allow|deny [!]aclname ...
7600
7601 never_direct is the opposite of always_direct. Please read
7602 the description for always_direct if you have not already.
7603
7604 With 'never_direct' you can use ACL elements to specify
7605 requests which should NEVER be forwarded directly to origin
7606 servers. For example, to force the use of a proxy for all
7607 requests, except those in your local domain use something like:
7608
7609 acl local-servers dstdomain .foo.net
5473c134 7610 never_direct deny local-servers
7611 never_direct allow all
7612
7613 or if Squid is inside a firewall and there are local intranet
7614 servers inside the firewall use something like:
7615
7616 acl local-intranet dstdomain .foo.net
7617 acl local-external dstdomain external.foo.net
7618 always_direct deny local-external
7619 always_direct allow local-intranet
7620 never_direct allow all
7621
b3567eb5
FC
7622 This clause supports both fast and slow acl types.
7623 See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
8d6275c0 7624DOC_END
0976f8db 7625
5473c134 7626COMMENT_START
7627 ADVANCED NETWORKING OPTIONS
7628 -----------------------------------------------------------------------------
7629COMMENT_END
7630
65d448bc 7631NAME: incoming_udp_average incoming_icp_average
cccac0a2 7632TYPE: int
7633DEFAULT: 6
65d448bc
AJ
7634LOC: Config.comm_incoming.udp.average
7635DOC_START
7636 Heavy voodoo here. I can't even believe you are reading this.
7637 Are you crazy? Don't even think about adjusting these unless
7638 you understand the algorithms in comm_select.c first!
7639DOC_END
cccac0a2 7640
65d448bc 7641NAME: incoming_tcp_average incoming_http_average
cccac0a2 7642TYPE: int
7643DEFAULT: 4
65d448bc
AJ
7644LOC: Config.comm_incoming.tcp.average
7645DOC_START
7646 Heavy voodoo here. I can't even believe you are reading this.
7647 Are you crazy? Don't even think about adjusting these unless
7648 you understand the algorithms in comm_select.c first!
7649DOC_END
cccac0a2 7650
7651NAME: incoming_dns_average
7652TYPE: int
7653DEFAULT: 4
65d448bc
AJ
7654LOC: Config.comm_incoming.dns.average
7655DOC_START
7656 Heavy voodoo here. I can't even believe you are reading this.
7657 Are you crazy? Don't even think about adjusting these unless
7658 you understand the algorithms in comm_select.c first!
7659DOC_END
cccac0a2 7660
65d448bc 7661NAME: min_udp_poll_cnt min_icp_poll_cnt
cccac0a2 7662TYPE: int
7663DEFAULT: 8
65d448bc
AJ
7664LOC: Config.comm_incoming.udp.min_poll
7665DOC_START
7666 Heavy voodoo here. I can't even believe you are reading this.
7667 Are you crazy? Don't even think about adjusting these unless
7668 you understand the algorithms in comm_select.c first!
7669DOC_END
cccac0a2 7670
7671NAME: min_dns_poll_cnt
7672TYPE: int
7673DEFAULT: 8
65d448bc
AJ
7674LOC: Config.comm_incoming.dns.min_poll
7675DOC_START
7676 Heavy voodoo here. I can't even believe you are reading this.
7677 Are you crazy? Don't even think about adjusting these unless
7678 you understand the algorithms in comm_select.c first!
7679DOC_END
cccac0a2 7680
65d448bc 7681NAME: min_tcp_poll_cnt min_http_poll_cnt
cccac0a2 7682TYPE: int
7683DEFAULT: 8
65d448bc 7684LOC: Config.comm_incoming.tcp.min_poll
cccac0a2 7685DOC_START
5473c134 7686 Heavy voodoo here. I can't even believe you are reading this.
7687 Are you crazy? Don't even think about adjusting these unless
7688 you understand the algorithms in comm_select.c first!
7689DOC_END
7690
7691NAME: accept_filter
5473c134 7692TYPE: string
7693DEFAULT: none
7694LOC: Config.accept_filter
7695DOC_START
0b4d4be5 7696 FreeBSD:
7697
5473c134 7698 The name of an accept(2) filter to install on Squid's
7699 listen socket(s). This feature is perhaps specific to
7700 FreeBSD and requires support in the kernel.
7701
7702 The 'httpready' filter delays delivering new connections
2324cda2 7703 to Squid until a full HTTP request has been received.
0b4d4be5 7704 See the accf_http(9) man page for details.
7705
7706 The 'dataready' filter delays delivering new connections
7707 to Squid until there is some data to process.
7708 See the accf_dataready(9) man page for details.
7709
7710 Linux:
7711
7712 The 'data' filter delays delivering of new connections
7713 to Squid until there is some data to process by TCP_ACCEPT_DEFER.
7714 You may optionally specify a number of seconds to wait by
7715 'data=N' where N is the number of seconds. Defaults to 30
7716 if not specified. See the tcp(7) man page for details.
5473c134 7717EXAMPLE:
0b4d4be5 7718# FreeBSD
5473c134 7719accept_filter httpready
0b4d4be5 7720# Linux
7721accept_filter data
5473c134 7722DOC_END
7723
ab2ecb0e
AJ
7724NAME: client_ip_max_connections
7725TYPE: int
7726LOC: Config.client_ip_max_connections
7727DEFAULT: -1
638402dd 7728DEFAULT_DOC: No limit.
ab2ecb0e
AJ
7729DOC_START
7730 Set an absolute limit on the number of connections a single
7731 client IP can use. Any more than this and Squid will begin to drop
7732 new connections from the client until it closes some links.
7733
7734 Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP
7735 connections from the client. For finer control use the ACL access controls.
7736
7737 Requires client_db to be enabled (the default).
7738
7739 WARNING: This may noticably slow down traffic received via external proxies
7740 or NAT devices and cause them to rebound error messages back to their clients.
7741DOC_END
7742
5473c134 7743NAME: tcp_recv_bufsize
7744COMMENT: (bytes)
7745TYPE: b_size_t
7746DEFAULT: 0 bytes
638402dd 7747DEFAULT_DOC: Use operating system TCP defaults.
5473c134 7748LOC: Config.tcpRcvBufsz
7749DOC_START
7750 Size of receive buffer to set for TCP sockets. Probably just
638402dd
AJ
7751 as easy to change your kernel's default.
7752 Omit from squid.conf to use the default buffer size.
5473c134 7753DOC_END
7754
7755COMMENT_START
7756 ICAP OPTIONS
7757 -----------------------------------------------------------------------------
7758COMMENT_END
7759
7760NAME: icap_enable
7761TYPE: onoff
7762IFDEF: ICAP_CLIENT
7763COMMENT: on|off
26cc52cb 7764LOC: Adaptation::Icap::TheConfig.onoff
5473c134 7765DEFAULT: off
7766DOC_START
53e738c6 7767 If you want to enable the ICAP module support, set this to on.
5473c134 7768DOC_END
7769
7770NAME: icap_connect_timeout
7771TYPE: time_t
7772DEFAULT: none
26cc52cb 7773LOC: Adaptation::Icap::TheConfig.connect_timeout_raw
5473c134 7774IFDEF: ICAP_CLIENT
7775DOC_START
7776 This parameter specifies how long to wait for the TCP connect to
7777 the requested ICAP server to complete before giving up and either
7778 terminating the HTTP transaction or bypassing the failure.
7779
7780 The default for optional services is peer_connect_timeout.
7781 The default for essential services is connect_timeout.
7782 If this option is explicitly set, its value applies to all services.
7783DOC_END
7784
7785NAME: icap_io_timeout
7786COMMENT: time-units
7787TYPE: time_t
7788DEFAULT: none
638402dd 7789DEFAULT_DOC: Use read_timeout.
26cc52cb 7790LOC: Adaptation::Icap::TheConfig.io_timeout_raw
5473c134 7791IFDEF: ICAP_CLIENT
7792DOC_START
7793 This parameter specifies how long to wait for an I/O activity on
7794 an established, active ICAP connection before giving up and
7795 either terminating the HTTP transaction or bypassing the
7796 failure.
5473c134 7797DOC_END
7798
7799NAME: icap_service_failure_limit
8277060a
CT
7800COMMENT: limit [in memory-depth time-units]
7801TYPE: icap_service_failure_limit
5473c134 7802IFDEF: ICAP_CLIENT
8277060a 7803LOC: Adaptation::Icap::TheConfig
5473c134 7804DEFAULT: 10
7805DOC_START
7806 The limit specifies the number of failures that Squid tolerates
7807 when establishing a new TCP connection with an ICAP service. If
7808 the number of failures exceeds the limit, the ICAP service is
7809 not used for new ICAP requests until it is time to refresh its
8277060a 7810 OPTIONS.
5473c134 7811
7812 A negative value disables the limit. Without the limit, an ICAP
7813 service will not be considered down due to connectivity failures
7814 between ICAP OPTIONS requests.
8277060a
CT
7815
7816 Squid forgets ICAP service failures older than the specified
7817 value of memory-depth. The memory fading algorithm
7818 is approximate because Squid does not remember individual
7819 errors but groups them instead, splitting the option
7820 value into ten time slots of equal length.
7821
7822 When memory-depth is 0 and by default this option has no
7823 effect on service failure expiration.
7824
7825 Squid always forgets failures when updating service settings
7826 using an ICAP OPTIONS transaction, regardless of this option
7827 setting.
7828
7829 For example,
7830 # suspend service usage after 10 failures in 5 seconds:
7831 icap_service_failure_limit 10 in 5 seconds
cccac0a2 7832DOC_END
7833
5473c134 7834NAME: icap_service_revival_delay
cccac0a2 7835TYPE: int
5473c134 7836IFDEF: ICAP_CLIENT
26cc52cb 7837LOC: Adaptation::Icap::TheConfig.service_revival_delay
5473c134 7838DEFAULT: 180
cccac0a2 7839DOC_START
5473c134 7840 The delay specifies the number of seconds to wait after an ICAP
7841 OPTIONS request failure before requesting the options again. The
7842 failed ICAP service is considered "down" until fresh OPTIONS are
7843 fetched.
cccac0a2 7844
5473c134 7845 The actual delay cannot be smaller than the hardcoded minimum
7846 delay of 30 seconds.
cccac0a2 7847DOC_END
7848
5473c134 7849NAME: icap_preview_enable
cccac0a2 7850TYPE: onoff
5473c134 7851IFDEF: ICAP_CLIENT
7852COMMENT: on|off
26cc52cb 7853LOC: Adaptation::Icap::TheConfig.preview_enable
ac7a62f9 7854DEFAULT: on
cccac0a2 7855DOC_START
ac7a62f9 7856 The ICAP Preview feature allows the ICAP server to handle the
7857 HTTP message by looking only at the beginning of the message body
7858 or even without receiving the body at all. In some environments,
7859 previews greatly speedup ICAP processing.
7860
7861 During an ICAP OPTIONS transaction, the server may tell Squid what
7862 HTTP messages should be previewed and how big the preview should be.
7863 Squid will not use Preview if the server did not request one.
7864
7865 To disable ICAP Preview for all ICAP services, regardless of
7866 individual ICAP server OPTIONS responses, set this option to "off".
7867Example:
7868icap_preview_enable off
cccac0a2 7869DOC_END
7870
5473c134 7871NAME: icap_preview_size
7872TYPE: int
7873IFDEF: ICAP_CLIENT
26cc52cb 7874LOC: Adaptation::Icap::TheConfig.preview_size
5473c134 7875DEFAULT: -1
638402dd 7876DEFAULT_DOC: No preview sent.
cccac0a2 7877DOC_START
53e738c6 7878 The default size of preview data to be sent to the ICAP server.
638402dd 7879 This value might be overwritten on a per server basis by OPTIONS requests.
cccac0a2 7880DOC_END
7881
83c51da9
CT
7882NAME: icap_206_enable
7883TYPE: onoff
7884IFDEF: ICAP_CLIENT
7885COMMENT: on|off
7886LOC: Adaptation::Icap::TheConfig.allow206_enable
7887DEFAULT: on
7888DOC_START
7889 206 (Partial Content) responses is an ICAP extension that allows the
7890 ICAP agents to optionally combine adapted and original HTTP message
7891 content. The decision to combine is postponed until the end of the
7892 ICAP response. Squid supports Partial Content extension by default.
7893
7894 Activation of the Partial Content extension is negotiated with each
7895 ICAP service during OPTIONS exchange. Most ICAP servers should handle
7896 negotation correctly even if they do not support the extension, but
7897 some might fail. To disable Partial Content support for all ICAP
7898 services and to avoid any negotiation, set this option to "off".
7899
7900 Example:
7901 icap_206_enable off
7902DOC_END
7903
5473c134 7904NAME: icap_default_options_ttl
7905TYPE: int
7906IFDEF: ICAP_CLIENT
26cc52cb 7907LOC: Adaptation::Icap::TheConfig.default_options_ttl
5473c134 7908DEFAULT: 60
cccac0a2 7909DOC_START
53e738c6 7910 The default TTL value for ICAP OPTIONS responses that don't have
5473c134 7911 an Options-TTL header.
cccac0a2 7912DOC_END
7913
5473c134 7914NAME: icap_persistent_connections
7915TYPE: onoff
7916IFDEF: ICAP_CLIENT
7917COMMENT: on|off
26cc52cb 7918LOC: Adaptation::Icap::TheConfig.reuse_connections
5473c134 7919DEFAULT: on
cccac0a2 7920DOC_START
5473c134 7921 Whether or not Squid should use persistent connections to
7922 an ICAP server.
cccac0a2 7923DOC_END
7924
22fff3bf 7925NAME: adaptation_send_client_ip icap_send_client_ip
5473c134 7926TYPE: onoff
22fff3bf 7927IFDEF: USE_ADAPTATION
5473c134 7928COMMENT: on|off
22fff3bf 7929LOC: Adaptation::Config::send_client_ip
5473c134 7930DEFAULT: off
cccac0a2 7931DOC_START
ea3ae478
AR
7932 If enabled, Squid shares HTTP client IP information with adaptation
7933 services. For ICAP, Squid adds the X-Client-IP header to ICAP requests.
7934 For eCAP, Squid sets the libecap::metaClientIp transaction option.
7935
7936 See also: adaptation_uses_indirect_client
cccac0a2 7937DOC_END
7938
22fff3bf 7939NAME: adaptation_send_username icap_send_client_username
5473c134 7940TYPE: onoff
22fff3bf 7941IFDEF: USE_ADAPTATION
5473c134 7942COMMENT: on|off
22fff3bf 7943LOC: Adaptation::Config::send_username
5473c134 7944DEFAULT: off
cccac0a2 7945DOC_START
5473c134 7946 This sends authenticated HTTP client username (if available) to
22fff3bf
AR
7947 the adaptation service.
7948
7949 For ICAP, the username value is encoded based on the
5473c134 7950 icap_client_username_encode option and is sent using the header
7951 specified by the icap_client_username_header option.
cccac0a2 7952DOC_END
7953
5473c134 7954NAME: icap_client_username_header
cccac0a2 7955TYPE: string
5473c134 7956IFDEF: ICAP_CLIENT
26cc52cb 7957LOC: Adaptation::Icap::TheConfig.client_username_header
5473c134 7958DEFAULT: X-Client-Username
cccac0a2 7959DOC_START
db49f682 7960 ICAP request header name to use for adaptation_send_username.
cccac0a2 7961DOC_END
7962
5473c134 7963NAME: icap_client_username_encode
cccac0a2 7964TYPE: onoff
5473c134 7965IFDEF: ICAP_CLIENT
7966COMMENT: on|off
26cc52cb 7967LOC: Adaptation::Icap::TheConfig.client_username_encode
5473c134 7968DEFAULT: off
cccac0a2 7969DOC_START
5473c134 7970 Whether to base64 encode the authenticated client username.
cccac0a2 7971DOC_END
7972
5473c134 7973NAME: icap_service
7974TYPE: icap_service_type
7975IFDEF: ICAP_CLIENT
26cc52cb 7976LOC: Adaptation::Icap::TheConfig
5473c134 7977DEFAULT: none
cccac0a2 7978DOC_START
a22e6cd3 7979 Defines a single ICAP service using the following format:
cccac0a2 7980
c25c2836 7981 icap_service id vectoring_point uri [option ...]
7d90757b 7982
c25c2836
CT
7983 id: ID
7984 an opaque identifier or name which is used to direct traffic to
7985 this specific service. Must be unique among all adaptation
7986 services in squid.conf.
a22e6cd3
AR
7987
7988 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
f3db09e2 7989 This specifies at which point of transaction processing the
7990 ICAP service should be activated. *_postcache vectoring points
7991 are not yet supported.
a22e6cd3 7992
c25c2836 7993 uri: icap://servername:port/servicepath
a22e6cd3
AR
7994 ICAP server and service location.
7995
7996 ICAP does not allow a single service to handle both REQMOD and RESPMOD
7997 transactions. Squid does not enforce that requirement. You can specify
7998 services with the same service_url and different vectoring_points. You
7999 can even specify multiple identical services as long as their
8000 service_names differ.
8001
3caa16d2
AR
8002 To activate a service, use the adaptation_access directive. To group
8003 services, use adaptation_service_chain and adaptation_service_set.
a22e6cd3
AR
8004
8005 Service options are separated by white space. ICAP services support
8006 the following name=value options:
8007
8008 bypass=on|off|1|0
8009 If set to 'on' or '1', the ICAP service is treated as
8010 optional. If the service cannot be reached or malfunctions,
8011 Squid will try to ignore any errors and process the message as
8012 if the service was not enabled. No all ICAP errors can be
8013 bypassed. If set to 0, the ICAP service is treated as
8014 essential and all ICAP errors will result in an error page
8015 returned to the HTTP client.
8016
8017 Bypass is off by default: services are treated as essential.
8018
8019 routing=on|off|1|0
8020 If set to 'on' or '1', the ICAP service is allowed to
8021 dynamically change the current message adaptation plan by
8022 returning a chain of services to be used next. The services
8023 are specified using the X-Next-Services ICAP response header
8024 value, formatted as a comma-separated list of service names.
e2851fe7
AR
8025 Each named service should be configured in squid.conf. Other
8026 services are ignored. An empty X-Next-Services value results
8027 in an empty plan which ends the current adaptation.
8028
8029 Dynamic adaptation plan may cross or cover multiple supported
8030 vectoring points in their natural processing order.
a22e6cd3
AR
8031
8032 Routing is not allowed by default: the ICAP X-Next-Services
8033 response header is ignored.
8034
e6713f4e
AJ
8035 ipv6=on|off
8036 Only has effect on split-stack systems. The default on those systems
8037 is to use IPv4-only connections. When set to 'on' this option will
8038 make Squid use IPv6-only connections to contact this ICAP service.
8039
2dba5b8e
CT
8040 on-overload=block|bypass|wait|force
8041 If the service Max-Connections limit has been reached, do
8042 one of the following for each new ICAP transaction:
8043 * block: send an HTTP error response to the client
8044 * bypass: ignore the "over-connected" ICAP service
8045 * wait: wait (in a FIFO queue) for an ICAP connection slot
8046 * force: proceed, ignoring the Max-Connections limit
8047
8048 In SMP mode with N workers, each worker assumes the service
8049 connection limit is Max-Connections/N, even though not all
8050 workers may use a given service.
8051
8052 The default value is "bypass" if service is bypassable,
8053 otherwise it is set to "wait".
8054
8055
8056 max-conn=number
8057 Use the given number as the Max-Connections limit, regardless
8058 of the Max-Connections value given by the service, if any.
8059
a22e6cd3
AR
8060 Older icap_service format without optional named parameters is
8061 deprecated but supported for backward compatibility.
5473c134 8062
5473c134 8063Example:
c25c2836
CT
8064icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0
8065icap_service svcLogger reqmod_precache icap://icap2.mydomain.net:1344/respmod routing=on
cccac0a2 8066DOC_END
8067
5473c134 8068NAME: icap_class
8069TYPE: icap_class_type
8070IFDEF: ICAP_CLIENT
21a26d31 8071LOC: none
5473c134 8072DEFAULT: none
cccac0a2 8073DOC_START
a22e6cd3 8074 This deprecated option was documented to define an ICAP service
62c7f90e
AR
8075 chain, even though it actually defined a set of similar, redundant
8076 services, and the chains were not supported.
5473c134 8077
62c7f90e 8078 To define a set of redundant services, please use the
a22e6cd3
AR
8079 adaptation_service_set directive. For service chains, use
8080 adaptation_service_chain.
cccac0a2 8081DOC_END
8082
5473c134 8083NAME: icap_access
8084TYPE: icap_access_type
8085IFDEF: ICAP_CLIENT
21a26d31 8086LOC: none
cccac0a2 8087DEFAULT: none
cccac0a2 8088DOC_START
a22e6cd3 8089 This option is deprecated. Please use adaptation_access, which
62c7f90e
AR
8090 has the same ICAP functionality, but comes with better
8091 documentation, and eCAP support.
cccac0a2 8092DOC_END
8093
57afc994
AR
8094COMMENT_START
8095 eCAP OPTIONS
8096 -----------------------------------------------------------------------------
8097COMMENT_END
8098
21a26d31
AR
8099NAME: ecap_enable
8100TYPE: onoff
8101IFDEF: USE_ECAP
8102COMMENT: on|off
574b508c 8103LOC: Adaptation::Ecap::TheConfig.onoff
21a26d31
AR
8104DEFAULT: off
8105DOC_START
8106 Controls whether eCAP support is enabled.
8107DOC_END
8108
8109NAME: ecap_service
8110TYPE: ecap_service_type
8111IFDEF: USE_ECAP
574b508c 8112LOC: Adaptation::Ecap::TheConfig
21a26d31
AR
8113DEFAULT: none
8114DOC_START
8115 Defines a single eCAP service
8116
c25c2836 8117 ecap_service id vectoring_point uri [option ...]
21a26d31 8118
c25c2836
CT
8119 id: ID
8120 an opaque identifier or name which is used to direct traffic to
8121 this specific service. Must be unique among all adaptation
8122 services in squid.conf.
8123
8124 vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
21a26d31
AR
8125 This specifies at which point of transaction processing the
8126 eCAP service should be activated. *_postcache vectoring points
8127 are not yet supported.
c25c2836
CT
8128
8129 uri: ecap://vendor/service_name?custom&cgi=style&parameters=optional
8130 Squid uses the eCAP service URI to match this configuration
8131 line with one of the dynamically loaded services. Each loaded
8132 eCAP service must have a unique URI. Obtain the right URI from
8133 the service provider.
8134
3caa16d2
AR
8135 To activate a service, use the adaptation_access directive. To group
8136 services, use adaptation_service_chain and adaptation_service_set.
c25c2836
CT
8137
8138 Service options are separated by white space. eCAP services support
8139 the following name=value options:
8140
8141 bypass=on|off|1|0
8142 If set to 'on' or '1', the eCAP service is treated as optional.
8143 If the service cannot be reached or malfunctions, Squid will try
8144 to ignore any errors and process the message as if the service
21a26d31 8145 was not enabled. No all eCAP errors can be bypassed.
c25c2836
CT
8146 If set to 'off' or '0', the eCAP service is treated as essential
8147 and all eCAP errors will result in an error page returned to the
21a26d31 8148 HTTP client.
c25c2836
CT
8149
8150 Bypass is off by default: services are treated as essential.
8151
8152 routing=on|off|1|0
8153 If set to 'on' or '1', the eCAP service is allowed to
8154 dynamically change the current message adaptation plan by
8155 returning a chain of services to be used next.
8156
8157 Dynamic adaptation plan may cross or cover multiple supported
8158 vectoring points in their natural processing order.
8159
8160 Routing is not allowed by default.
8161
8162 Older ecap_service format without optional named parameters is
8163 deprecated but supported for backward compatibility.
8164
21a26d31
AR
8165
8166Example:
c25c2836
CT
8167ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off
8168ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on
21a26d31
AR
8169DOC_END
8170
57afc994
AR
8171NAME: loadable_modules
8172TYPE: wordlist
8173IFDEF: USE_LOADABLE_MODULES
8174LOC: Config.loadable_module_names
8175DEFAULT: none
8176DOC_START
8177 Instructs Squid to load the specified dynamic module(s) or activate
8178 preloaded module(s).
8179Example:
8180loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so
8181DOC_END
8182
62c7f90e
AR
8183COMMENT_START
8184 MESSAGE ADAPTATION OPTIONS
8185 -----------------------------------------------------------------------------
8186COMMENT_END
8187
8188NAME: adaptation_service_set
8189TYPE: adaptation_service_set_type
8190IFDEF: USE_ADAPTATION
8191LOC: none
8192DEFAULT: none
8193DOC_START
8194
a22e6cd3
AR
8195 Configures an ordered set of similar, redundant services. This is
8196 useful when hot standby or backup adaptation servers are available.
8197
8198 adaptation_service_set set_name service_name1 service_name2 ...
8199
8200 The named services are used in the set declaration order. The first
8201 applicable adaptation service from the set is used first. The next
8202 applicable service is tried if and only if the transaction with the
8203 previous service fails and the message waiting to be adapted is still
8204 intact.
62c7f90e 8205
a22e6cd3
AR
8206 When adaptation starts, broken services are ignored as if they were
8207 not a part of the set. A broken service is a down optional service.
62c7f90e 8208
a22e6cd3
AR
8209 The services in a set must be attached to the same vectoring point
8210 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8211
8212 If all services in a set are optional then adaptation failures are
8213 bypassable. If all services in the set are essential, then a
8214 transaction failure with one service may still be retried using
8215 another service from the set, but when all services fail, the master
8216 transaction fails as well.
8217
8218 A set may contain a mix of optional and essential services, but that
8219 is likely to lead to surprising results because broken services become
8220 ignored (see above), making previously bypassable failures fatal.
8221 Technically, it is the bypassability of the last failed service that
8222 matters.
8223
8224 See also: adaptation_access adaptation_service_chain
62c7f90e
AR
8225
8226Example:
8227adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup
8228adaptation service_set svcLogger loggerLocal loggerRemote
8229DOC_END
8230
a22e6cd3
AR
8231NAME: adaptation_service_chain
8232TYPE: adaptation_service_chain_type
8233IFDEF: USE_ADAPTATION
8234LOC: none
8235DEFAULT: none
8236DOC_START
8237
8238 Configures a list of complementary services that will be applied
8239 one-by-one, forming an adaptation chain or pipeline. This is useful
8240 when Squid must perform different adaptations on the same message.
8241
8242 adaptation_service_chain chain_name service_name1 svc_name2 ...
8243
8244 The named services are used in the chain declaration order. The first
8245 applicable adaptation service from the chain is used first. The next
8246 applicable service is applied to the successful adaptation results of
8247 the previous service in the chain.
8248
8249 When adaptation starts, broken services are ignored as if they were
8250 not a part of the chain. A broken service is a down optional service.
8251
8252 Request satisfaction terminates the adaptation chain because Squid
8253 does not currently allow declaration of RESPMOD services at the
8254 "reqmod_precache" vectoring point (see icap_service or ecap_service).
8255
8256 The services in a chain must be attached to the same vectoring point
8257 (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD).
8258
8259 A chain may contain a mix of optional and essential services. If an
8260 essential adaptation fails (or the failure cannot be bypassed for
8261 other reasons), the master transaction fails. Otherwise, the failure
8262 is bypassed as if the failed adaptation service was not in the chain.
8263
8264 See also: adaptation_access adaptation_service_set
8265
8266Example:
8267adaptation_service_chain svcRequest requestLogger urlFilter leakDetector
8268DOC_END
8269
62c7f90e
AR
8270NAME: adaptation_access
8271TYPE: adaptation_access_type
8272IFDEF: USE_ADAPTATION
8273LOC: none
8274DEFAULT: none
638402dd 8275DEFAULT_DOC: Allow, unless rules exist in squid.conf.
62c7f90e
AR
8276DOC_START
8277 Sends an HTTP transaction to an ICAP or eCAP adaptation service.
8278
8279 adaptation_access service_name allow|deny [!]aclname...
8280 adaptation_access set_name allow|deny [!]aclname...
8281
8282 At each supported vectoring point, the adaptation_access
8283 statements are processed in the order they appear in this
8284 configuration file. Statements pointing to the following services
8285 are ignored (i.e., skipped without checking their ACL):
8286
8287 - services serving different vectoring points
8288 - "broken-but-bypassable" services
8289 - "up" services configured to ignore such transactions
8290 (e.g., based on the ICAP Transfer-Ignore header).
8291
8292 When a set_name is used, all services in the set are checked
8293 using the same rules, to find the first applicable one. See
8294 adaptation_service_set for details.
8295
8296 If an access list is checked and there is a match, the
8297 processing stops: For an "allow" rule, the corresponding
8298 adaptation service is used for the transaction. For a "deny"
8299 rule, no adaptation service is activated.
8300
8301 It is currently not possible to apply more than one adaptation
8302 service at the same vectoring point to the same HTTP transaction.
8303
8304 See also: icap_service and ecap_service
8305
8306Example:
8307adaptation_access service_1 allow all
8308DOC_END
8309
a22e6cd3
AR
8310NAME: adaptation_service_iteration_limit
8311TYPE: int
8312IFDEF: USE_ADAPTATION
8313LOC: Adaptation::Config::service_iteration_limit
8314DEFAULT: 16
8315DOC_START
8316 Limits the number of iterations allowed when applying adaptation
8317 services to a message. If your longest adaptation set or chain
8318 may have more than 16 services, increase the limit beyond its
8319 default value of 16. If detecting infinite iteration loops sooner
8320 is critical, make the iteration limit match the actual number
8321 of services in your longest adaptation set or chain.
8322
8323 Infinite adaptation loops are most likely with routing services.
8324
8325 See also: icap_service routing=1
8326DOC_END
8327
3ff65596
AR
8328NAME: adaptation_masterx_shared_names
8329TYPE: string
8330IFDEF: USE_ADAPTATION
8331LOC: Adaptation::Config::masterx_shared_name
8332DEFAULT: none
8333DOC_START
8334 For each master transaction (i.e., the HTTP request and response
8335 sequence, including all related ICAP and eCAP exchanges), Squid
8336 maintains a table of metadata. The table entries are (name, value)
8337 pairs shared among eCAP and ICAP exchanges. The table is destroyed
8338 with the master transaction.
8339
8340 This option specifies the table entry names that Squid must accept
8341 from and forward to the adaptation transactions.
8342
8343 An ICAP REQMOD or RESPMOD transaction may set an entry in the
8344 shared table by returning an ICAP header field with a name
6666da11
AR
8345 specified in adaptation_masterx_shared_names.
8346
8347 An eCAP REQMOD or RESPMOD transaction may set an entry in the
8348 shared table by implementing the libecap::visitEachOption() API
8349 to provide an option with a name specified in
8350 adaptation_masterx_shared_names.
5038f9d8
AR
8351
8352 Squid will store and forward the set entry to subsequent adaptation
3ff65596
AR
8353 transactions within the same master transaction scope.
8354
8355 Only one shared entry name is supported at this time.
8356
8357Example:
8358# share authentication information among ICAP services
8359adaptation_masterx_shared_names X-Subscriber-ID
8360DOC_END
8361
71be37e0 8362NAME: adaptation_meta
d7f4a0b7 8363TYPE: note
71be37e0
CT
8364IFDEF: USE_ADAPTATION
8365LOC: Adaptation::Config::metaHeaders
8366DEFAULT: none
8367DOC_START
8368 This option allows Squid administrator to add custom ICAP request
8369 headers or eCAP options to Squid ICAP requests or eCAP transactions.
8370 Use it to pass custom authentication tokens and other
8371 transaction-state related meta information to an ICAP/eCAP service.
8372
8373 The addition of a meta header is ACL-driven:
8374 adaptation_meta name value [!]aclname ...
8375
8376 Processing for a given header name stops after the first ACL list match.
8377 Thus, it is impossible to add two headers with the same name. If no ACL
8378 lists match for a given header name, no such header is added. For
8379 example:
8380
8381 # do not debug transactions except for those that need debugging
8382 adaptation_meta X-Debug 1 needs_debugging
8383
8384 # log all transactions except for those that must remain secret
8385 adaptation_meta X-Log 1 !keep_secret
8386
8387 # mark transactions from users in the "G 1" group
8388 adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1
8389
8390 The "value" parameter may be a regular squid.conf token or a "double
8391 quoted string". Within the quoted string, use backslash (\) to escape
8392 any character, which is currently only useful for escaping backslashes
8393 and double quotes. For example,
8394 "this string has one backslash (\\) and two \"quotes\""
d7f4a0b7
CT
8395
8396 Used adaptation_meta header values may be logged via %note
8397 logformat code. If multiple adaptation_meta headers with the same name
8398 are used during master transaction lifetime, the header values are
8399 logged in the order they were used and duplicate values are ignored
8400 (only the first repeated value will be logged).
71be37e0
CT
8401DOC_END
8402
3ff65596
AR
8403NAME: icap_retry
8404TYPE: acl_access
8405IFDEF: ICAP_CLIENT
8406LOC: Adaptation::Icap::TheConfig.repeat
3ff65596
AR
8407DEFAULT_IF_NONE: deny all
8408DOC_START
8409 This ACL determines which retriable ICAP transactions are
8410 retried. Transactions that received a complete ICAP response
8411 and did not have to consume or produce HTTP bodies to receive
8412 that response are usually retriable.
8413
8414 icap_retry allow|deny [!]aclname ...
8415
8416 Squid automatically retries some ICAP I/O timeouts and errors
8417 due to persistent connection race conditions.
8418
8419 See also: icap_retry_limit
8420DOC_END
8421
8422NAME: icap_retry_limit
8423TYPE: int
8424IFDEF: ICAP_CLIENT
8425LOC: Adaptation::Icap::TheConfig.repeat_limit
8426DEFAULT: 0
638402dd 8427DEFAULT_DOC: No retries are allowed.
3ff65596 8428DOC_START
638402dd 8429 Limits the number of retries allowed.
3ff65596
AR
8430
8431 Communication errors due to persistent connection race
8432 conditions are unavoidable, automatically retried, and do not
8433 count against this limit.
8434
8435 See also: icap_retry
8436DOC_END
8437
8438
5473c134 8439COMMENT_START
8440 DNS OPTIONS
8441 -----------------------------------------------------------------------------
8442COMMENT_END
8443
8444NAME: check_hostnames
cccac0a2 8445TYPE: onoff
cccac0a2 8446DEFAULT: off
5473c134 8447LOC: Config.onoff.check_hostnames
cccac0a2 8448DOC_START
5473c134 8449 For security and stability reasons Squid can check
8450 hostnames for Internet standard RFC compliance. If you want
8451 Squid to perform these checks turn this directive on.
cccac0a2 8452DOC_END
8453
5473c134 8454NAME: allow_underscore
cccac0a2 8455TYPE: onoff
cccac0a2 8456DEFAULT: on
5473c134 8457LOC: Config.onoff.allow_underscore
cccac0a2 8458DOC_START
5473c134 8459 Underscore characters is not strictly allowed in Internet hostnames
8460 but nevertheless used by many sites. Set this to off if you want
8461 Squid to be strict about the standard.
8462 This check is performed only when check_hostnames is set to on.
cccac0a2 8463DOC_END
8464
5473c134 8465NAME: dns_retransmit_interval
fd0f51c4 8466TYPE: time_msec
5473c134 8467DEFAULT: 5 seconds
8468LOC: Config.Timeout.idns_retransmit
cccac0a2 8469DOC_START
5473c134 8470 Initial retransmit interval for DNS queries. The interval is
8471 doubled each time all configured DNS servers have been tried.
cccac0a2 8472DOC_END
8473
5473c134 8474NAME: dns_timeout
fd0f51c4 8475TYPE: time_msec
a541c34e 8476DEFAULT: 30 seconds
5473c134 8477LOC: Config.Timeout.idns_query
cccac0a2 8478DOC_START
5473c134 8479 DNS Query timeout. If no response is received to a DNS query
8480 within this time all DNS servers for the queried domain
8481 are assumed to be unavailable.
cccac0a2 8482DOC_END
8483
e210930b
AJ
8484NAME: dns_packet_max
8485TYPE: b_ssize_t
638402dd 8486DEFAULT_DOC: EDNS disabled
e210930b
AJ
8487DEFAULT: none
8488LOC: Config.dns.packet_max
e210930b
AJ
8489DOC_START
8490 Maximum number of bytes packet size to advertise via EDNS.
8491 Set to "none" to disable EDNS large packet support.
8492
8493 For legacy reasons DNS UDP replies will default to 512 bytes which
8494 is too small for many responses. EDNS provides a means for Squid to
8495 negotiate receiving larger responses back immediately without having
8496 to failover with repeat requests. Responses larger than this limit
8497 will retain the old behaviour of failover to TCP DNS.
8498
8499 Squid has no real fixed limit internally, but allowing packet sizes
8500 over 1500 bytes requires network jumbogram support and is usually not
8501 necessary.
8502
8503 WARNING: The RFC also indicates that some older resolvers will reply
8504 with failure of the whole request if the extension is added. Some
8505 resolvers have already been identified which will reply with mangled
8506 EDNS response on occasion. Usually in response to many-KB jumbogram
8507 sizes being advertised by Squid.
8508 Squid will currently treat these both as an unable-to-resolve domain
8509 even if it would be resolvable without EDNS.
8510DOC_END
8511
5473c134 8512NAME: dns_defnames
8513COMMENT: on|off
cccac0a2 8514TYPE: onoff
cccac0a2 8515DEFAULT: off
638402dd 8516DEFAULT_DOC: Search for single-label domain names is disabled.
5473c134 8517LOC: Config.onoff.res_defnames
cccac0a2 8518DOC_START
5473c134 8519 Normally the RES_DEFNAMES resolver option is disabled
8520 (see res_init(3)). This prevents caches in a hierarchy
8521 from interpreting single-component hostnames locally. To allow
8522 Squid to handle single-component names, enable this option.
cccac0a2 8523DOC_END
8524
bce61b00
AJ
8525NAME: dns_multicast_local
8526COMMENT: on|off
8527TYPE: onoff
8528DEFAULT: off
8529DEFAULT_DOC: Search for .local and .arpa names is disabled.
8530LOC: Config.onoff.dns_mdns
8531DOC_START
8532 When set to on, Squid sends multicast DNS lookups on the local
8533 network for domains ending in .local and .arpa.
8534 This enables local servers and devices to be contacted in an
8535 ad-hoc or zero-configuration network environment.
8536DOC_END
8537
5473c134 8538NAME: dns_nameservers
8539TYPE: wordlist
8540DEFAULT: none
638402dd 8541DEFAULT_DOC: Use operating system definitions
5473c134 8542LOC: Config.dns_nameservers
cccac0a2 8543DOC_START
5473c134 8544 Use this if you want to specify a list of DNS name servers
8545 (IP addresses) to use instead of those given in your
8546 /etc/resolv.conf file.
638402dd 8547
5473c134 8548 On Windows platforms, if no value is specified here or in
8549 the /etc/resolv.conf file, the list of DNS name servers are
8550 taken from the Windows registry, both static and dynamic DHCP
8551 configurations are supported.
cccac0a2 8552
5473c134 8553 Example: dns_nameservers 10.0.0.1 192.172.0.4
cccac0a2 8554DOC_END
8555
5473c134 8556NAME: hosts_file
cccac0a2 8557TYPE: string
5473c134 8558DEFAULT: @DEFAULT_HOSTS@
8559LOC: Config.etcHostsPath
cccac0a2 8560DOC_START
5473c134 8561 Location of the host-local IP name-address associations
8562 database. Most Operating Systems have such a file on different
8563 default locations:
8564 - Un*X & Linux: /etc/hosts
8565 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
8566 (%SystemRoot% value install default is c:\winnt)
8567 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
8568 (%SystemRoot% value install default is c:\windows)
8569 - Windows 9x/Me: %windir%\hosts
8570 (%windir% value is usually c:\windows)
8571 - Cygwin: /etc/hosts
cccac0a2 8572
5473c134 8573 The file contains newline-separated definitions, in the
8574 form ip_address_in_dotted_form name [name ...] names are
8575 whitespace-separated. Lines beginning with an hash (#)
8576 character are comments.
cccac0a2 8577
5473c134 8578 The file is checked at startup and upon configuration.
8579 If set to 'none', it won't be checked.
8580 If append_domain is used, that domain will be added to
8581 domain-local (i.e. not containing any dot character) host
8582 definitions.
cccac0a2 8583DOC_END
8584
5473c134 8585NAME: append_domain
8586TYPE: string
8587LOC: Config.appendDomain
8588DEFAULT: none
638402dd 8589DEFAULT_DOC: Use operating system definitions
6a2f3fcf 8590DOC_START
5473c134 8591 Appends local domain name to hostnames without any dots in
8592 them. append_domain must begin with a period.
8593
8594 Be warned there are now Internet names with no dots in
8595 them using only top-domain names, so setting this may
8596 cause some Internet sites to become unavailable.
8597
8598Example:
8599 append_domain .yourdomain.com
6a2f3fcf 8600DOC_END
8601
5473c134 8602NAME: ignore_unknown_nameservers
8603TYPE: onoff
8604LOC: Config.onoff.ignore_unknown_nameservers
df6fd596 8605DEFAULT: on
8606DOC_START
5473c134 8607 By default Squid checks that DNS responses are received
8608 from the same IP addresses they are sent to. If they
8609 don't match, Squid ignores the response and writes a warning
8610 message to cache.log. You can allow responses from unknown
8611 nameservers by setting this option to 'off'.
df6fd596 8612DOC_END
8613
5a0da9ec
AJ
8614NAME: dns_v4_first
8615TYPE: onoff
8616DEFAULT: off
8617LOC: Config.dns.v4_first
5a0da9ec
AJ
8618DOC_START
8619 With the IPv6 Internet being as fast or faster than IPv4 Internet
8620 for most networks Squid prefers to contact websites over IPv6.
8621
8622 This option reverses the order of preference to make Squid contact
8623 dual-stack websites over IPv4 first. Squid will still perform both
8624 IPv6 and IPv4 DNS lookups before connecting.
8625
8626 WARNING:
8627 This option will restrict the situations under which IPv6
8628 connectivity is used (and tested). Hiding network problems
8629 which would otherwise be detected and warned about.
8630DOC_END
8631
6bc15a4f 8632NAME: ipcache_size
8633COMMENT: (number of entries)
8634TYPE: int
8635DEFAULT: 1024
8636LOC: Config.ipcache.size
638402dd
AJ
8637DOC_START
8638 Maximum number of DNS IP cache entries.
8639DOC_END
6bc15a4f 8640
8641NAME: ipcache_low
8642COMMENT: (percent)
8643TYPE: int
8644DEFAULT: 90
8645LOC: Config.ipcache.low
8646DOC_NONE
8647
8648NAME: ipcache_high
8649COMMENT: (percent)
8650TYPE: int
8651DEFAULT: 95
8652LOC: Config.ipcache.high
8653DOC_START
8654 The size, low-, and high-water marks for the IP cache.
8655DOC_END
8656
8657NAME: fqdncache_size
8658COMMENT: (number of entries)
8659TYPE: int
8660DEFAULT: 1024
8661LOC: Config.fqdncache.size
8662DOC_START
8663 Maximum number of FQDN cache entries.
8664DOC_END
8665
a58ff010 8666COMMENT_START
5473c134 8667 MISCELLANEOUS
a58ff010 8668 -----------------------------------------------------------------------------
8669COMMENT_END
8670
2eceb328
CT
8671NAME: configuration_includes_quoted_values
8672COMMENT: on|off
bde7a8ce
CT
8673TYPE: configuration_includes_quoted_values
8674DEFAULT: off
2eceb328
CT
8675LOC: ConfigParser::RecognizeQuotedValues
8676DOC_START
8677 If set, Squid will recognize each "quoted string" after a configuration
8678 directive as a single parameter. The quotes are stripped before the
8679 parameter value is interpreted or used.
8680 See "Values with spaces, quotes, and other special characters"
8681 section for more details.
8682DOC_END
8683
5473c134 8684NAME: memory_pools
a58ff010 8685COMMENT: on|off
5473c134 8686TYPE: onoff
8687DEFAULT: on
8688LOC: Config.onoff.mem_pools
a58ff010 8689DOC_START
5473c134 8690 If set, Squid will keep pools of allocated (but unused) memory
8691 available for future use. If memory is a premium on your
8692 system and you believe your malloc library outperforms Squid
8693 routines, disable this.
a58ff010 8694DOC_END
8695
5473c134 8696NAME: memory_pools_limit
8697COMMENT: (bytes)
70be1349 8698TYPE: b_int64_t
5473c134 8699DEFAULT: 5 MB
8700LOC: Config.MemPools.limit
ec1245f8 8701DOC_START
5473c134 8702 Used only with memory_pools on:
8703 memory_pools_limit 50 MB
ec1245f8 8704
5473c134 8705 If set to a non-zero value, Squid will keep at most the specified
8706 limit of allocated (but unused) memory in memory pools. All free()
8707 requests that exceed this limit will be handled by your malloc
8708 library. Squid does not pre-allocate any memory, just safe-keeps
8709 objects that otherwise would be free()d. Thus, it is safe to set
8710 memory_pools_limit to a reasonably high value even if your
8711 configuration will use less memory.
ec1245f8 8712
89646bd7 8713 If set to none, Squid will keep all memory it can. That is, there
5473c134 8714 will be no limit on the total amount of memory used for safe-keeping.
ec1245f8 8715
5473c134 8716 To disable memory allocation optimization, do not set
70be1349 8717 memory_pools_limit to 0 or none. Set memory_pools to "off" instead.
5473c134 8718
8719 An overhead for maintaining memory pools is not taken into account
8720 when the limit is checked. This overhead is close to four bytes per
8721 object kept. However, pools may actually _save_ memory because of
8722 reduced memory thrashing in your malloc library.
ec1245f8 8723DOC_END
8724
5473c134 8725NAME: forwarded_for
67c06f0d
AJ
8726COMMENT: on|off|transparent|truncate|delete
8727TYPE: string
5473c134 8728DEFAULT: on
8729LOC: opt_forwarded_for
5f8252d2 8730DOC_START
67c06f0d
AJ
8731 If set to "on", Squid will append your client's IP address
8732 in the HTTP requests it forwards. By default it looks like:
5f8252d2 8733
5473c134 8734 X-Forwarded-For: 192.1.2.3
8735
67c06f0d 8736 If set to "off", it will appear as
5473c134 8737
8738 X-Forwarded-For: unknown
67c06f0d
AJ
8739
8740 If set to "transparent", Squid will not alter the
8741 X-Forwarded-For header in any way.
8742
8743 If set to "delete", Squid will delete the entire
8744 X-Forwarded-For header.
8745
8746 If set to "truncate", Squid will remove all existing
dd68402f 8747 X-Forwarded-For entries, and place the client IP as the sole entry.
5f8252d2 8748DOC_END
8749
5473c134 8750NAME: cachemgr_passwd
8751TYPE: cachemgrpasswd
8752DEFAULT: none
638402dd 8753DEFAULT_DOC: No password. Actions which require password are denied.
5473c134 8754LOC: Config.passwd_list
5f8252d2 8755DOC_START
5473c134 8756 Specify passwords for cachemgr operations.
5f8252d2 8757
5473c134 8758 Usage: cachemgr_passwd password action action ...
8759
8760 Some valid actions are (see cache manager menu for a full list):
8761 5min
8762 60min
8763 asndb
8764 authenticator
8765 cbdata
8766 client_list
8767 comm_incoming
8768 config *
8769 counters
8770 delay
8771 digest_stats
8772 dns
8773 events
8774 filedescriptors
8775 fqdncache
8776 histograms
8777 http_headers
8778 info
8779 io
8780 ipcache
8781 mem
8782 menu
8783 netdb
8784 non_peers
8785 objects
8786 offline_toggle *
8787 pconn
8788 peer_select
b360c477 8789 reconfigure *
5473c134 8790 redirector
8791 refresh
8792 server_list
8793 shutdown *
8794 store_digest
8795 storedir
8796 utilization
8797 via_headers
8798 vm_objects
8799
8800 * Indicates actions which will not be performed without a
8801 valid password, others can be performed if not listed here.
8802
8803 To disable an action, set the password to "disable".
8804 To allow performing an action without a password, set the
8805 password to "none".
8806
8807 Use the keyword "all" to set the same password for all actions.
8808
8809Example:
8810 cachemgr_passwd secret shutdown
8811 cachemgr_passwd lesssssssecret info stats/objects
8812 cachemgr_passwd disable all
5f8252d2 8813DOC_END
8814
5473c134 8815NAME: client_db
a58ff010 8816COMMENT: on|off
5473c134 8817TYPE: onoff
8818DEFAULT: on
8819LOC: Config.onoff.client_db
a58ff010 8820DOC_START
5473c134 8821 If you want to disable collecting per-client statistics,
8822 turn off client_db here.
a58ff010 8823DOC_END
8824
5473c134 8825NAME: refresh_all_ims
8826COMMENT: on|off
8827TYPE: onoff
8828DEFAULT: off
8829LOC: Config.onoff.refresh_all_ims
a58ff010 8830DOC_START
5473c134 8831 When you enable this option, squid will always check
8832 the origin server for an update when a client sends an
8833 If-Modified-Since request. Many browsers use IMS
8834 requests when the user requests a reload, and this
8835 ensures those clients receive the latest version.
a58ff010 8836
5473c134 8837 By default (off), squid may return a Not Modified response
8838 based on the age of the cached version.
78e8cfc4 8839DOC_END
8840
5473c134 8841NAME: reload_into_ims
626096be 8842IFDEF: USE_HTTP_VIOLATIONS
12b91c99 8843COMMENT: on|off
5473c134 8844TYPE: onoff
8845DEFAULT: off
8846LOC: Config.onoff.reload_into_ims
12b91c99 8847DOC_START
5473c134 8848 When you enable this option, client no-cache or ``reload''
8849 requests will be changed to If-Modified-Since requests.
8850 Doing this VIOLATES the HTTP standard. Enabling this
8851 feature could make you liable for problems which it
8852 causes.
8853
8854 see also refresh_pattern for a more selective approach.
12b91c99 8855DOC_END
8856
31ef19cd 8857NAME: connect_retries
5473c134 8858TYPE: int
31ef19cd
AJ
8859LOC: Config.connect_retries
8860DEFAULT: 0
638402dd 8861DEFAULT_DOC: Do not retry failed connections.
a58ff010 8862DOC_START
aed188fd
AJ
8863 This sets the maximum number of connection attempts made for each
8864 TCP connection. The connect_retries attempts must all still
8865 complete within the connection timeout period.
31ef19cd
AJ
8866
8867 The default is not to re-try if the first connection attempt fails.
8868 The (not recommended) maximum is 10 tries.
5473c134 8869
31ef19cd
AJ
8870 A warning message will be generated if it is set to a too-high
8871 value and the configured value will be over-ridden.
5473c134 8872
31ef19cd
AJ
8873 Note: These re-tries are in addition to forward_max_tries
8874 which limit how many different addresses may be tried to find
8875 a useful server.
a58ff010 8876DOC_END
8877
5473c134 8878NAME: retry_on_error
a58ff010 8879TYPE: onoff
5473c134 8880LOC: Config.retry.onerror
a58ff010 8881DEFAULT: off
8882DOC_START
aea8548b
AJ
8883 If set to ON Squid will automatically retry requests when
8884 receiving an error response with status 403 (Forbidden),
8885 500 (Internal Error), 501 or 503 (Service not available).
8886 Status 502 and 504 (Gateway errors) are always retried.
8887
8888 This is mainly useful if you are in a complex cache hierarchy to
8889 work around access control errors.
8890
8891 NOTE: This retry will attempt to find another working destination.
8892 Which is different from the server which just failed.
5f8252d2 8893DOC_END
8894
5473c134 8895NAME: as_whois_server
5f8252d2 8896TYPE: string
5473c134 8897LOC: Config.as_whois_server
8898DEFAULT: whois.ra.net
5f8252d2 8899DOC_START
5473c134 8900 WHOIS server to query for AS numbers. NOTE: AS numbers are
8901 queried only when Squid starts up, not for every request.
5f8252d2 8902DOC_END
8903
5473c134 8904NAME: offline_mode
5f8252d2 8905TYPE: onoff
5473c134 8906LOC: Config.onoff.offline
5f8252d2 8907DEFAULT: off
8908DOC_START
5473c134 8909 Enable this option and Squid will never try to validate cached
8910 objects.
a58ff010 8911DOC_END
8912
5473c134 8913NAME: uri_whitespace
8914TYPE: uri_whitespace
8915LOC: Config.uri_whitespace
8916DEFAULT: strip
a58ff010 8917DOC_START
5473c134 8918 What to do with requests that have whitespace characters in the
8919 URI. Options:
a58ff010 8920
5473c134 8921 strip: The whitespace characters are stripped out of the URL.
82806837
AJ
8922 This is the behavior recommended by RFC2396 and RFC3986
8923 for tolerant handling of generic URI.
8924 NOTE: This is one difference between generic URI and HTTP URLs.
8925
5473c134 8926 deny: The request is denied. The user receives an "Invalid
8927 Request" message.
82806837
AJ
8928 This is the behaviour recommended by RFC2616 for safe
8929 handling of HTTP request URL.
8930
5473c134 8931 allow: The request is allowed and the URI is not changed. The
8932 whitespace characters remain in the URI. Note the
8933 whitespace is passed to redirector processes if they
8934 are in use.
82806837
AJ
8935 Note this may be considered a violation of RFC2616
8936 request parsing where whitespace is prohibited in the
8937 URL field.
8938
5473c134 8939 encode: The request is allowed and the whitespace characters are
82806837
AJ
8940 encoded according to RFC1738.
8941
5473c134 8942 chop: The request is allowed and the URI is chopped at the
82806837
AJ
8943 first whitespace.
8944
8945
8946 NOTE the current Squid implementation of encode and chop violates
8947 RFC2616 by not using a 301 redirect after altering the URL.
5473c134 8948DOC_END
a58ff010 8949
5473c134 8950NAME: chroot
8951TYPE: string
8952LOC: Config.chroot_dir
a58ff010 8953DEFAULT: none
8954DOC_START
9f37c18a 8955 Specifies a directory where Squid should do a chroot() while
2d89f399
HN
8956 initializing. This also causes Squid to fully drop root
8957 privileges after initializing. This means, for example, if you
8958 use a HTTP port less than 1024 and try to reconfigure, you may
8959 get an error saying that Squid can not open the port.
5473c134 8960DOC_END
a58ff010 8961
5473c134 8962NAME: balance_on_multiple_ip
8963TYPE: onoff
8964LOC: Config.onoff.balance_on_multiple_ip
cc192b50 8965DEFAULT: off
5473c134 8966DOC_START
cc192b50 8967 Modern IP resolvers in squid sort lookup results by preferred access.
8968 By default squid will use these IP in order and only rotates to
8969 the next listed when the most preffered fails.
8970
5473c134 8971 Some load balancing servers based on round robin DNS have been
8972 found not to preserve user session state across requests
8973 to different IP addresses.
a58ff010 8974
cc192b50 8975 Enabling this directive Squid rotates IP's per request.
a58ff010 8976DOC_END
8977
5473c134 8978NAME: pipeline_prefetch
079a8480
AJ
8979TYPE: pipelinePrefetch
8980LOC: Config.pipeline_max_prefetch
8981DEFAULT: 0
8982DEFAULT_DOC: Do not pre-parse pipelined requests.
a58ff010 8983DOC_START
079a8480
AJ
8984 HTTP clients may send a pipeline of 1+N requests to Squid using a
8985 single connection, without waiting for Squid to respond to the first
8986 of those requests. This option limits the number of concurrent
8987 requests Squid will try to handle in parallel. If set to N, Squid
8988 will try to receive and process up to 1+N requests on the same
8989 connection concurrently.
a58ff010 8990
079a8480 8991 Defaults to 0 (off) for bandwidth management and access logging
5473c134 8992 reasons.
a0e23afd 8993
079a8480
AJ
8994 NOTE: pipelining requires persistent connections to clients.
8995
a0e23afd 8996 WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication.
5473c134 8997DOC_END
a58ff010 8998
5473c134 8999NAME: high_response_time_warning
9000TYPE: int
9001COMMENT: (msec)
9002LOC: Config.warnings.high_rptm
9003DEFAULT: 0
638402dd 9004DEFAULT_DOC: disabled.
5473c134 9005DOC_START
9006 If the one-minute median response time exceeds this value,
9007 Squid prints a WARNING with debug level 0 to get the
9008 administrators attention. The value is in milliseconds.
a58ff010 9009DOC_END
9010
5473c134 9011NAME: high_page_fault_warning
9012TYPE: int
9013LOC: Config.warnings.high_pf
9014DEFAULT: 0
638402dd 9015DEFAULT_DOC: disabled.
cc9f92d4 9016DOC_START
5473c134 9017 If the one-minute average page fault rate exceeds this
9018 value, Squid prints a WARNING with debug level 0 to get
9019 the administrators attention. The value is in page faults
9020 per second.
9021DOC_END
cc9f92d4 9022
5473c134 9023NAME: high_memory_warning
9024TYPE: b_size_t
9025LOC: Config.warnings.high_memory
4bf2a476 9026IFDEF: HAVE_MSTATS && HAVE_GNUMALLOC_H
904971da 9027DEFAULT: 0 KB
638402dd 9028DEFAULT_DOC: disabled.
5473c134 9029DOC_START
4bf2a476
FC
9030 If the memory usage (as determined by gnumalloc, if available and used)
9031 exceeds this amount, Squid prints a WARNING with debug level 0 to get
5473c134 9032 the administrators attention.
9033DOC_END
4bf2a476 9034# TODO: link high_memory_warning to mempools?
cc9f92d4 9035
5473c134 9036NAME: sleep_after_fork
9037COMMENT: (microseconds)
9038TYPE: int
9039LOC: Config.sleep_after_fork
9040DEFAULT: 0
9041DOC_START
9042 When this is set to a non-zero value, the main Squid process
9043 sleeps the specified number of microseconds after a fork()
9044 system call. This sleep may help the situation where your
9045 system reports fork() failures due to lack of (virtual)
9046 memory. Note, however, if you have a lot of child
9047 processes, these sleep delays will add up and your
9048 Squid will not service requests for some amount of time
9049 until all the child processes have been started.
9050 On Windows value less then 1000 (1 milliseconds) are
9051 rounded to 1000.
cc9f92d4 9052DOC_END
9053
b6696974 9054NAME: windows_ipaddrchangemonitor
7aa9bb3e 9055IFDEF: _SQUID_WINDOWS_
b6696974
GS
9056COMMENT: on|off
9057TYPE: onoff
9058DEFAULT: on
9059LOC: Config.onoff.WIN32_IpAddrChangeMonitor
9060DOC_START
9061 On Windows Squid by default will monitor IP address changes and will
9062 reconfigure itself after any detected event. This is very useful for
9063 proxies connected to internet with dial-up interfaces.
9064 In some cases (a Proxy server acting as VPN gateway is one) it could be
9065 desiderable to disable this behaviour setting this to 'off'.
9066 Note: after changing this, Squid service must be restarted.
9067DOC_END
9068
a98c2da5
AJ
9069NAME: eui_lookup
9070TYPE: onoff
9071IFDEF: USE_SQUID_EUI
9072DEFAULT: on
9073LOC: Eui::TheConfig.euiLookup
9074DOC_START
9075 Whether to lookup the EUI or MAC address of a connected client.
9076DOC_END
9077
f3f0f563
AJ
9078NAME: max_filedescriptors max_filedesc
9079TYPE: int
9080DEFAULT: 0
638402dd 9081DEFAULT_DOC: Use operating system limits set by ulimit.
f3f0f563
AJ
9082LOC: Config.max_filedescriptors
9083DOC_START
638402dd
AJ
9084 Reduce the maximum number of filedescriptors supported below
9085 the usual operating system defaults.
f3f0f563 9086
638402dd 9087 Remove from squid.conf to inherit the current ulimit setting.
f3f0f563
AJ
9088
9089 Note: Changing this requires a restart of Squid. Also
638402dd 9090 not all I/O types supports large values (eg on Windows).
f3f0f563
AJ
9091DOC_END
9092
13aeac35 9093NAME: workers
007d775d 9094TYPE: int
13aeac35 9095LOC: Config.workers
007d775d 9096DEFAULT: 1
638402dd 9097DEFAULT_DOC: SMP support disabled.
007d775d 9098DOC_START
13aeac35 9099 Number of main Squid processes or "workers" to fork and maintain.
007d775d
AR
9100 0: "no daemon" mode, like running "squid -N ..."
9101 1: "no SMP" mode, start one main Squid process daemon (default)
13aeac35
AR
9102 N: start N main Squid process daemons (i.e., SMP mode)
9103
b87f6632
AR
9104 In SMP mode, each worker does nearly all what a single Squid daemon
9105 does (e.g., listen on http_port and forward HTTP requests).
007d775d
AR
9106DOC_END
9107
96c2bb61
AR
9108NAME: cpu_affinity_map
9109TYPE: CpuAffinityMap
9110LOC: Config.cpuAffinityMap
9111DEFAULT: none
638402dd 9112DEFAULT_DOC: Let operating system decide.
96c2bb61
AR
9113DOC_START
9114 Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,...
9115
9116 Sets 1:1 mapping between Squid processes and CPU cores. For example,
9117
9118 cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
9119
9120 affects processes 1 through 4 only and places them on the first
9121 four even cores, starting with core #1.
9122
9123 CPU cores are numbered starting from 1. Requires support for
9124 sched_getaffinity(2) and sched_setaffinity(2) system calls.
9125
9126 Multiple cpu_affinity_map options are merged.
9127
9128 See also: workers
9129DOC_END
9130
cccac0a2 9131EOF