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