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