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