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