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