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