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