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