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