]>
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 | 66 | |
a345387f AJ |
67 | Values with byte units |
68 | ||
a01a87d9 AJ |
69 | Squid accepts size units on some size related directives. All |
70 | such directives are documented with a default value displaying | |
71 | a unit. | |
a345387f AJ |
72 | |
73 | Units accepted by Squid are: | |
a01a87d9 AJ |
74 | bytes - byte |
75 | KB - Kilobyte (1024 bytes) | |
a345387f AJ |
76 | MB - Megabyte |
77 | GB - Gigabyte | |
d4a3e179 | 78 | |
2eceb328 CT |
79 | Values with spaces, quotes, and other special characters |
80 | ||
81 | Squid supports directive parameters with spaces, quotes, and other | |
82 | special characters. Surround such parameters with "double quotes". Use | |
83 | the configuration_includes_quoted_values directive to enable or | |
84 | disable that support. | |
85 | ||
86 | Squid supports reading configuration option parameters from external | |
87 | files using the syntax: | |
88 | parameters("/path/filename") | |
89 | For example: | |
90 | acl whitelist dstdomain parameters("/etc/squid/whitelist.txt") | |
d4a3e179 | 91 | |
5735d30b AR |
92 | Conditional configuration |
93 | ||
94 | If-statements can be used to make configuration directives | |
95 | depend on conditions: | |
96 | ||
97 | if <CONDITION> | |
98 | ... regular configuration directives ... | |
99 | [else | |
100 | ... regular configuration directives ...] | |
101 | endif | |
102 | ||
103 | The else part is optional. The keywords "if", "else", and "endif" | |
104 | must be typed on their own lines, as if they were regular | |
105 | configuration directives. | |
106 | ||
5945964d AJ |
107 | NOTE: An else-if condition is not supported. |
108 | ||
5735d30b AR |
109 | These individual conditions types are supported: |
110 | ||
111 | true | |
112 | Always evaluates to true. | |
113 | false | |
114 | Always evaluates to false. | |
115 | <integer> = <integer> | |
116 | Equality comparison of two integer numbers. | |
117 | ||
118 | ||
d4a3e179 AR |
119 | SMP-Related Macros |
120 | ||
121 | The following SMP-related preprocessor macros can be used. | |
122 | ||
123 | ${process_name} expands to the current Squid process "name" | |
124 | (e.g., squid1, squid2, or cache1). | |
125 | ||
126 | ${process_number} expands to the current Squid process | |
127 | identifier, which is an integer number (e.g., 1, 2, 3) unique | |
6fe8c876 AJ |
128 | across all Squid processes of the current service instance. |
129 | ||
130 | ${service_name} expands into the current Squid service instance | |
131 | name identifier which is provided by -n on the command line. | |
132 | ||
592a09dc | 133 | COMMENT_END |
134 | ||
25234ebd AJ |
135 | # options still not yet ported from 2.7 to 3.x |
136 | NAME: broken_vary_encoding | |
137 | TYPE: obsolete | |
138 | DOC_START | |
139 | This option is not yet supported by Squid-3. | |
140 | DOC_END | |
141 | ||
142 | NAME: cache_vary | |
143 | TYPE: obsolete | |
144 | DOC_START | |
145 | This option is not yet supported by Squid-3. | |
146 | DOC_END | |
147 | ||
25234ebd AJ |
148 | NAME: error_map |
149 | TYPE: obsolete | |
150 | DOC_START | |
151 | This option is not yet supported by Squid-3. | |
152 | DOC_END | |
153 | ||
154 | NAME: external_refresh_check | |
155 | TYPE: obsolete | |
156 | DOC_START | |
157 | This option is not yet supported by Squid-3. | |
158 | DOC_END | |
159 | ||
96598f93 | 160 | NAME: location_rewrite_program location_rewrite_access location_rewrite_children location_rewrite_concurrency |
25234ebd AJ |
161 | TYPE: obsolete |
162 | DOC_START | |
163 | This option is not yet supported by Squid-3. | |
164 | DOC_END | |
165 | ||
96598f93 | 166 | NAME: refresh_stale_hit |
25234ebd AJ |
167 | TYPE: obsolete |
168 | DOC_START | |
169 | This option is not yet supported by Squid-3. | |
170 | DOC_END | |
171 | ||
96598f93 AJ |
172 | # Options Removed in 3.3 |
173 | NAME: ignore_ims_on_miss | |
25234ebd AJ |
174 | TYPE: obsolete |
175 | DOC_START | |
96598f93 | 176 | Remove this line. The HTTP/1.1 feature is now fully supported by default. |
25234ebd AJ |
177 | DOC_END |
178 | ||
76f44481 AJ |
179 | # Options Removed in 3.2 |
180 | NAME: ignore_expect_100 | |
181 | TYPE: obsolete | |
182 | DOC_START | |
183 | Remove this line. The HTTP/1.1 feature is now fully supported by default. | |
184 | DOC_END | |
185 | ||
6e095b46 AJ |
186 | NAME: dns_v4_fallback |
187 | TYPE: obsolete | |
188 | DOC_START | |
4ded749e | 189 | Remove this line. Squid performs a 'Happy Eyeballs' algorithm, the 'fallback' algorithm is no longer relevant. |
6e095b46 AJ |
190 | DOC_END |
191 | ||
76f44481 AJ |
192 | NAME: ftp_list_width |
193 | TYPE: obsolete | |
194 | DOC_START | |
195 | Remove this line. Configure FTP page display using the CSS controls in errorpages.css instead. | |
196 | DOC_END | |
197 | ||
38493d67 AJ |
198 | NAME: maximum_single_addr_tries |
199 | TYPE: obsolete | |
200 | DOC_START | |
201 | Replaced by connect_retries. The behaviour has changed, please read the documentation before altering. | |
202 | DOC_END | |
203 | ||
4ded749e AJ |
204 | NAME: update_headers |
205 | TYPE: obsolete | |
206 | DOC_START | |
207 | Remove this line. The feature is supported by default in storage types where update is implemented. | |
208 | DOC_END | |
209 | ||
76f44481 AJ |
210 | NAME: url_rewrite_concurrency |
211 | TYPE: obsolete | |
212 | DOC_START | |
213 | Remove this line. Set the 'concurrency=' option of url_rewrite_children instead. | |
214 | DOC_END | |
215 | ||
216 | # Options Removed in 3.1 | |
217 | NAME: dns_testnames | |
218 | TYPE: obsolete | |
219 | DOC_START | |
220 | Remove this line. DNS is no longer tested on startup. | |
221 | DOC_END | |
222 | ||
223 | NAME: extension_methods | |
224 | TYPE: obsolete | |
225 | DOC_START | |
226 | Remove this line. All valid methods for HTTP are accepted by default. | |
227 | DOC_END | |
228 | ||
c72a2049 AJ |
229 | # 2.7 Options Removed/Replaced in 3.2 |
230 | NAME: zero_buffers | |
231 | TYPE: obsolete | |
232 | DOC_NONE | |
233 | ||
76f44481 AJ |
234 | # 2.7 Options Removed/Replaced in 3.1 |
235 | NAME: incoming_rate | |
236 | TYPE: obsolete | |
237 | DOC_NONE | |
238 | ||
239 | NAME: server_http11 | |
240 | TYPE: obsolete | |
241 | DOC_START | |
242 | Remove this line. HTTP/1.1 is supported by default. | |
243 | DOC_END | |
244 | ||
245 | NAME: upgrade_http0.9 | |
246 | TYPE: obsolete | |
247 | DOC_START | |
248 | Remove this line. ICY/1.0 streaming protocol is supported by default. | |
249 | DOC_END | |
250 | ||
251 | NAME: zph_local zph_mode zph_option zph_parent zph_sibling | |
252 | TYPE: obsolete | |
253 | DOC_START | |
254 | Alter these entries. Use the qos_flows directive instead. | |
255 | DOC_END | |
256 | ||
257 | # Options Removed in 3.0 | |
258 | NAME: header_access | |
259 | TYPE: obsolete | |
260 | DOC_START | |
261 | Since squid-3.0 replace with request_header_access or reply_header_access | |
262 | depending on whether you wish to match client requests or server replies. | |
263 | DOC_END | |
264 | ||
265 | NAME: httpd_accel_no_pmtu_disc | |
266 | TYPE: obsolete | |
267 | DOC_START | |
268 | Since squid-3.0 use the 'disable-pmtu-discovery' flag on http_port instead. | |
269 | DOC_END | |
270 | ||
3b31a711 AJ |
271 | NAME: wais_relay_host |
272 | TYPE: obsolete | |
273 | DOC_START | |
274 | Replace this line with 'cache_peer' configuration. | |
275 | DOC_END | |
276 | ||
277 | NAME: wais_relay_port | |
278 | TYPE: obsolete | |
279 | DOC_START | |
280 | Replace this line with 'cache_peer' configuration. | |
281 | DOC_END | |
282 | ||
5473c134 | 283 | COMMENT_START |
41bd17a4 | 284 | OPTIONS FOR AUTHENTICATION |
5473c134 | 285 | ----------------------------------------------------------------------------- |
286 | COMMENT_END | |
287 | ||
41bd17a4 | 288 | NAME: auth_param |
289 | TYPE: authparam | |
2f1431ea | 290 | IFDEF: USE_AUTH |
5817ee13 | 291 | LOC: Auth::TheConfig |
cccac0a2 | 292 | DEFAULT: none |
293 | DOC_START | |
41bd17a4 | 294 | This is used to define parameters for the various authentication |
295 | schemes supported by Squid. | |
cccac0a2 | 296 | |
41bd17a4 | 297 | format: auth_param scheme parameter [setting] |
cccac0a2 | 298 | |
41bd17a4 | 299 | The order in which authentication schemes are presented to the client is |
300 | dependent on the order the scheme first appears in config file. IE | |
301 | has a bug (it's not RFC 2617 compliant) in that it will use the basic | |
302 | scheme if basic is the first entry presented, even if more secure | |
303 | schemes are presented. For now use the order in the recommended | |
304 | settings section below. If other browsers have difficulties (don't | |
305 | recognize the schemes offered even if you are using basic) either | |
306 | put basic first, or disable the other schemes (by commenting out their | |
307 | program entry). | |
cccac0a2 | 308 | |
41bd17a4 | 309 | Once an authentication scheme is fully configured, it can only be |
310 | shutdown by shutting squid down and restarting. Changes can be made on | |
311 | the fly and activated with a reconfigure. I.E. You can change to a | |
312 | different helper, but not unconfigure the helper completely. | |
cccac0a2 | 313 | |
41bd17a4 | 314 | Please note that while this directive defines how Squid processes |
315 | authentication it does not automatically activate authentication. | |
316 | To use authentication you must in addition make use of ACLs based | |
317 | on login name in http_access (proxy_auth, proxy_auth_regex or | |
318 | external with %LOGIN used in the format tag). The browser will be | |
319 | challenged for authentication on the first such acl encountered | |
320 | in http_access processing and will also be re-challenged for new | |
321 | login credentials if the request is being denied by a proxy_auth | |
322 | type acl. | |
cccac0a2 | 323 | |
41bd17a4 | 324 | WARNING: authentication can't be used in a transparently intercepting |
325 | proxy as the client then thinks it is talking to an origin server and | |
326 | not the proxy. This is a limitation of bending the TCP/IP protocol to | |
327 | transparently intercepting port 80, not a limitation in Squid. | |
b3567eb5 FC |
328 | Ports flagged 'transparent', 'intercept', or 'tproxy' have |
329 | authentication disabled. | |
cccac0a2 | 330 | |
d4806c91 CT |
331 | === Parameters common to all schemes. === |
332 | ||
333 | "program" cmdline | |
334 | Specifies the command for the external authenticator. Such a program | |
335 | runs a loop that, on every iteration, reads a request line from | |
336 | the standard and responds with a scheme-specific answer. The loop | |
337 | stops when all input is exchausted (EOF). See scheme-specific | |
338 | "program" descriptions below for details. | |
339 | ||
340 | "key_extras" format | |
341 | Specifies a string to be append to request line format for the | |
342 | authentication helper. "Quoted" format values may contain spaces and | |
343 | logformat %macros. In theory, any logformat %macro can be used. | |
344 | In practice, a %macro expands as a dash (-) if the helper request is | |
345 | sent before the required macro information is available to Squid. | |
346 | By default, Squid uses request formats provided in scheme-specific | |
347 | examples below (search for %credentials). | |
b853db41 CT |
348 | The expanded key_extras value is added to the Squid credentials |
349 | cache and, hence, will affect authentication. It can be used to | |
350 | autenticate different users with identical user names (e.g., when user | |
351 | authentication depends on http_port). | |
352 | Avoid adding frequently changing information to key_extras. For | |
353 | example, if you add user source IP, and it changes frequently | |
354 | in your environment, then max_user_ip ACL is going to treat every | |
355 | user+IP combination as a unique "user", breaking the ACL and | |
356 | wasting a lot of memory on those user records. It will also force | |
357 | users to authenticate from scratch whenever their IP changes. | |
d4806c91 | 358 | |
41bd17a4 | 359 | === Parameters for the basic scheme follow. === |
cccac0a2 | 360 | |
41bd17a4 | 361 | "program" cmdline |
362 | Specify the command for the external authenticator. Such a program | |
ae06fcd7 AJ |
363 | reads a request line ("username password" by default) and replies |
364 | with one of three results: | |
5269ec0e AJ |
365 | |
366 | OK | |
367 | the user exists. | |
368 | ||
369 | ERR | |
370 | the user does not exist. | |
371 | ||
372 | BH | |
4ded749e | 373 | An internal error occurred in the helper, preventing |
5269ec0e AJ |
374 | a result being identified. |
375 | ||
376 | "ERR" and "BH" results may optionally be followed by message="..." | |
377 | containing a description available as %m in the returned error page. | |
378 | ||
b3567eb5 FC |
379 | If you use an authenticator, make sure you have 1 acl of type |
380 | proxy_auth. | |
cccac0a2 | 381 | |
41bd17a4 | 382 | By default, the basic authentication scheme is not used unless a |
383 | program is specified. | |
cccac0a2 | 384 | |
41bd17a4 | 385 | If you want to use the traditional NCSA proxy authentication, set |
386 | this line to something like | |
307b83b7 | 387 | |
f6c0fef2 | 388 | auth_param basic program @DEFAULT_PREFIX@/libexec/basic_ncsa_auth @DEFAULT_PREFIX@/etc/passwd |
9e7dbc51 | 389 | |
d2a89ac1 | 390 | "utf8" on|off |
4ded749e | 391 | HTTP uses iso-latin-1 as character set, while some authentication |
d2a89ac1 AJ |
392 | backends such as LDAP expects UTF-8. If this is set to on Squid will |
393 | translate the HTTP iso-latin-1 charset to UTF-8 before sending the | |
394 | username & password to the helper. | |
395 | ||
7353861b | 396 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] |
48d54e4d | 397 | The maximum number of authenticator processes to spawn. If you start too few |
41bd17a4 | 398 | Squid will have to wait for them to process a backlog of credential |
399 | verifications, slowing it down. When password verifications are | |
400 | done via a (slow) network you are likely to need lots of | |
401 | authenticator processes. | |
48d54e4d AJ |
402 | |
403 | The startup= and idle= options permit some skew in the exact amount | |
64d2327b AJ |
404 | run. A minimum of startup=N will begin during startup and reconfigure. |
405 | Squid will start more in groups of up to idle=N in an attempt to meet | |
48d54e4d AJ |
406 | traffic needs and to keep idle=N free above those traffic needs up to |
407 | the maximum. | |
408 | ||
7353861b HN |
409 | The concurrency= option sets the number of concurrent requests the |
410 | helper can process. The default of 0 is used for helpers who only | |
411 | supports one request at a time. Setting this to a number greater than | |
412 | 0 changes the protocol used to include a channel number first on the | |
413 | request/response line, allowing multiple requests to be sent to the | |
4ded749e | 414 | same helper in parallel without waiting for the response. |
41bd17a4 | 415 | Must not be set unless it's known the helper supports this. |
7353861b HN |
416 | |
417 | auth_param basic children 20 startup=0 idle=1 | |
0fdafae7 | 418 | |
41bd17a4 | 419 | "realm" realmstring |
420 | Specifies the realm name which is to be reported to the | |
421 | client for the basic proxy authentication scheme (part of | |
422 | the text the user will see when prompted their username and | |
423 | password). There is no default. | |
424 | auth_param basic realm Squid proxy-caching web server | |
d1b63fc8 | 425 | |
41bd17a4 | 426 | "credentialsttl" timetolive |
427 | Specifies how long squid assumes an externally validated | |
428 | username:password pair is valid for - in other words how | |
429 | often the helper program is called for that user. Set this | |
430 | low to force revalidation with short lived passwords. Note | |
431 | setting this high does not impact your susceptibility | |
432 | to replay attacks unless you are using an one-time password | |
433 | system (such as SecureID). If you are using such a system, | |
434 | you will be vulnerable to replay attacks unless you also | |
435 | use the max_user_ip ACL in an http_access rule. | |
cccac0a2 | 436 | |
41bd17a4 | 437 | "casesensitive" on|off |
438 | Specifies if usernames are case sensitive. Most user databases are | |
439 | case insensitive allowing the same username to be spelled using both | |
440 | lower and upper case letters, but some are case sensitive. This | |
441 | makes a big difference for user_max_ip ACL processing and similar. | |
442 | auth_param basic casesensitive off | |
cccac0a2 | 443 | |
41bd17a4 | 444 | === Parameters for the digest scheme follow === |
cccac0a2 | 445 | |
41bd17a4 | 446 | "program" cmdline |
d4806c91 CT |
447 | Specify the command for the external authenticator. Such a program |
448 | reads a request_format line ("username":"realm" by default) and | |
5269ec0e AJ |
449 | replies with one of three results: |
450 | ||
451 | OK ha1="..." | |
452 | the user exists. The ha1= key is mandatory and | |
453 | contains the appropriate H(A1) value, hex encoded. | |
454 | See rfc 2616 for the definition of H(A1). | |
455 | ||
456 | ERR | |
457 | the user does not exist. | |
458 | ||
459 | BH | |
4ded749e | 460 | An internal error occurred in the helper, preventing |
5269ec0e AJ |
461 | a result being identified. |
462 | ||
463 | "ERR" and "BH" results may optionally be followed by message="..." | |
464 | containing a description available as %m in the returned error page. | |
cccac0a2 | 465 | |
41bd17a4 | 466 | By default, the digest authentication scheme is not used unless a |
467 | program is specified. | |
b8c0c06d | 468 | |
41bd17a4 | 469 | If you want to use a digest authenticator, set this line to |
470 | something like | |
cccac0a2 | 471 | |
7ce93108 | 472 | auth_param digest program @DEFAULT_PREFIX@/bin/digest_pw_auth @DEFAULT_PREFIX@/etc/digpass |
cccac0a2 | 473 | |
d2a89ac1 | 474 | "utf8" on|off |
4ded749e | 475 | HTTP uses iso-latin-1 as character set, while some authentication |
d2a89ac1 AJ |
476 | backends such as LDAP expects UTF-8. If this is set to on Squid will |
477 | translate the HTTP iso-latin-1 charset to UTF-8 before sending the | |
478 | username & password to the helper. | |
479 | ||
7353861b | 480 | "children" numberofchildren [startup=N] [idle=N] [concurrency=N] |
48d54e4d | 481 | The maximum number of authenticator processes to spawn (default 5). |
41bd17a4 | 482 | If you start too few Squid will have to wait for them to |
483 | process a backlog of H(A1) calculations, slowing it down. | |
484 | When the H(A1) calculations are done via a (slow) network | |
485 | you are likely to need lots of authenticator processes. | |
48d54e4d AJ |
486 | |
487 | The startup= and idle= options permit some skew in the exact amount | |
64d2327b AJ |
488 | run. A minimum of startup=N will begin during startup and reconfigure. |
489 | Squid will start more in groups of up to idle=N in an attempt to meet | |
48d54e4d AJ |
490 | traffic needs and to keep idle=N free above those traffic needs up to |
491 | the maximum. | |
492 | ||
7353861b HN |
493 | The concurrency= option sets the number of concurrent requests the |
494 | helper can process. The default of 0 is used for helpers who only | |
495 | supports one request at a time. Setting this to a number greater than | |
496 | 0 changes the protocol used to include a channel number first on the | |
497 | request/response line, allowing multiple requests to be sent to the | |
4ded749e | 498 | same helper in parallel without waiting for the response. |
7353861b HN |
499 | Must not be set unless it's known the helper supports this. |
500 | ||
48d54e4d | 501 | auth_param digest children 20 startup=0 idle=1 |
cccac0a2 | 502 | |
41bd17a4 | 503 | "realm" realmstring |
504 | Specifies the realm name which is to be reported to the | |
505 | client for the digest proxy authentication scheme (part of | |
506 | the text the user will see when prompted their username and | |
507 | password). There is no default. | |
508 | auth_param digest realm Squid proxy-caching web server | |
cccac0a2 | 509 | |
41bd17a4 | 510 | "nonce_garbage_interval" timeinterval |
511 | Specifies the interval that nonces that have been issued | |
512 | to client_agent's are checked for validity. | |
cccac0a2 | 513 | |
41bd17a4 | 514 | "nonce_max_duration" timeinterval |
515 | Specifies the maximum length of time a given nonce will be | |
516 | valid for. | |
cccac0a2 | 517 | |
41bd17a4 | 518 | "nonce_max_count" number |
519 | Specifies the maximum number of times a given nonce can be | |
520 | used. | |
cccac0a2 | 521 | |
41bd17a4 | 522 | "nonce_strictness" on|off |
523 | Determines if squid requires strict increment-by-1 behavior | |
524 | for nonce counts, or just incrementing (off - for use when | |
4ded749e | 525 | user agents generate nonce counts that occasionally miss 1 |
41bd17a4 | 526 | (ie, 1,2,4,6)). Default off. |
cccac0a2 | 527 | |
41bd17a4 | 528 | "check_nonce_count" on|off |
529 | This directive if set to off can disable the nonce count check | |
530 | completely to work around buggy digest qop implementations in | |
531 | certain mainstream browser versions. Default on to check the | |
532 | nonce count to protect from authentication replay attacks. | |
cccac0a2 | 533 | |
41bd17a4 | 534 | "post_workaround" on|off |
535 | This is a workaround to certain buggy browsers who sends | |
536 | an incorrect request digest in POST requests when reusing | |
537 | the same nonce as acquired earlier on a GET request. | |
cccac0a2 | 538 | |
41bd17a4 | 539 | === NTLM scheme options follow === |
cccac0a2 | 540 | |
41bd17a4 | 541 | "program" cmdline |
542 | Specify the command for the external NTLM authenticator. | |
543 | Such a program reads exchanged NTLMSSP packets with | |
544 | the browser via Squid until authentication is completed. | |
545 | If you use an NTLM authenticator, make sure you have 1 acl | |
5269ec0e | 546 | of type proxy_auth. By default, the NTLM authenticator program |
41bd17a4 | 547 | is not used. |
cccac0a2 | 548 | |
e4752e21 | 549 | auth_param ntlm program /usr/bin/ntlm_auth |
cccac0a2 | 550 | |
48d54e4d AJ |
551 | "children" numberofchildren [startup=N] [idle=N] |
552 | The maximum number of authenticator processes to spawn (default 5). | |
41bd17a4 | 553 | If you start too few Squid will have to wait for them to |
554 | process a backlog of credential verifications, slowing it | |
555 | down. When credential verifications are done via a (slow) | |
556 | network you are likely to need lots of authenticator | |
557 | processes. | |
cccac0a2 | 558 | |
48d54e4d | 559 | The startup= and idle= options permit some skew in the exact amount |
64d2327b AJ |
560 | run. A minimum of startup=N will begin during startup and reconfigure. |
561 | Squid will start more in groups of up to idle=N in an attempt to meet | |
48d54e4d AJ |
562 | traffic needs and to keep idle=N free above those traffic needs up to |
563 | the maximum. | |
564 | ||
565 | auth_param ntlm children 20 startup=0 idle=1 | |
cccac0a2 | 566 | |
41bd17a4 | 567 | "keep_alive" on|off |
568 | If you experience problems with PUT/POST requests when using the | |
569 | Negotiate authentication scheme then you can try setting this to | |
570 | off. This will cause Squid to forcibly close the connection on | |
571 | the initial requests where the browser asks which schemes are | |
572 | supported by the proxy. | |
cccac0a2 | 573 | |
41bd17a4 | 574 | auth_param ntlm keep_alive on |
cccac0a2 | 575 | |
41bd17a4 | 576 | === Options for configuring the NEGOTIATE auth-scheme follow === |
cccac0a2 | 577 | |
41bd17a4 | 578 | "program" cmdline |
579 | Specify the command for the external Negotiate authenticator. | |
580 | This protocol is used in Microsoft Active-Directory enabled setups with | |
581 | the Microsoft Internet Explorer or Mozilla Firefox browsers. | |
582 | Its main purpose is to exchange credentials with the Squid proxy | |
583 | using the Kerberos mechanisms. | |
b3567eb5 FC |
584 | If you use a Negotiate authenticator, make sure you have at least |
585 | one acl of type proxy_auth active. By default, the negotiate | |
5269ec0e | 586 | authenticator program is not used. |
41bd17a4 | 587 | The only supported program for this role is the ntlm_auth |
588 | program distributed as part of Samba, version 4 or later. | |
cccac0a2 | 589 | |
e4752e21 | 590 | auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=gss-spnego |
cccac0a2 | 591 | |
48d54e4d AJ |
592 | "children" numberofchildren [startup=N] [idle=N] |
593 | The maximum number of authenticator processes to spawn (default 5). | |
41bd17a4 | 594 | If you start too few Squid will have to wait for them to |
595 | process a backlog of credential verifications, slowing it | |
4ded749e | 596 | down. When credential verifications are done via a (slow) |
41bd17a4 | 597 | network you are likely to need lots of authenticator |
598 | processes. | |
48d54e4d AJ |
599 | |
600 | The startup= and idle= options permit some skew in the exact amount | |
64d2327b AJ |
601 | run. A minimum of startup=N will begin during startup and reconfigure. |
602 | Squid will start more in groups of up to idle=N in an attempt to meet | |
48d54e4d AJ |
603 | traffic needs and to keep idle=N free above those traffic needs up to |
604 | the maximum. | |
605 | ||
606 | auth_param negotiate children 20 startup=0 idle=1 | |
d3803853 | 607 | |
41bd17a4 | 608 | "keep_alive" on|off |
609 | If you experience problems with PUT/POST requests when using the | |
610 | Negotiate authentication scheme then you can try setting this to | |
611 | off. This will cause Squid to forcibly close the connection on | |
612 | the initial requests where the browser asks which schemes are | |
613 | supported by the proxy. | |
527ee50d | 614 | |
41bd17a4 | 615 | auth_param negotiate keep_alive on |
e0855596 AJ |
616 | |
617 | Examples: | |
618 | ||
41bd17a4 | 619 | #Recommended minimum configuration per scheme: |
620 | #auth_param negotiate program <uncomment and complete this line to activate> | |
48d54e4d | 621 | #auth_param negotiate children 20 startup=0 idle=1 |
41bd17a4 | 622 | #auth_param negotiate keep_alive on |
e0855596 | 623 | # |
41bd17a4 | 624 | #auth_param ntlm program <uncomment and complete this line to activate> |
48d54e4d | 625 | #auth_param ntlm children 20 startup=0 idle=1 |
41bd17a4 | 626 | #auth_param ntlm keep_alive on |
e0855596 | 627 | # |
41bd17a4 | 628 | #auth_param digest program <uncomment and complete this line> |
48d54e4d | 629 | #auth_param digest children 20 startup=0 idle=1 |
41bd17a4 | 630 | #auth_param digest realm Squid proxy-caching web server |
631 | #auth_param digest nonce_garbage_interval 5 minutes | |
632 | #auth_param digest nonce_max_duration 30 minutes | |
633 | #auth_param digest nonce_max_count 50 | |
e0855596 | 634 | # |
41bd17a4 | 635 | #auth_param basic program <uncomment and complete this line> |
6f4d3ed6 | 636 | #auth_param basic children 5 startup=5 idle=1 |
41bd17a4 | 637 | #auth_param basic realm Squid proxy-caching web server |
638 | #auth_param basic credentialsttl 2 hours | |
41bd17a4 | 639 | DOC_END |
cccac0a2 | 640 | |
41bd17a4 | 641 | NAME: authenticate_cache_garbage_interval |
642 | TYPE: time_t | |
643 | DEFAULT: 1 hour | |
644 | LOC: Config.authenticateGCInterval | |
645 | DOC_START | |
646 | The time period between garbage collection across the username cache. | |
4ded749e | 647 | This is a trade-off between memory utilization (long intervals - say |
41bd17a4 | 648 | 2 days) and CPU (short intervals - say 1 minute). Only change if you |
649 | have good reason to. | |
650 | DOC_END | |
cccac0a2 | 651 | |
41bd17a4 | 652 | NAME: authenticate_ttl |
653 | TYPE: time_t | |
654 | DEFAULT: 1 hour | |
655 | LOC: Config.authenticateTTL | |
656 | DOC_START | |
657 | The time a user & their credentials stay in the logged in | |
658 | user cache since their last request. When the garbage | |
659 | interval passes, all user credentials that have passed their | |
660 | TTL are removed from memory. | |
661 | DOC_END | |
cccac0a2 | 662 | |
41bd17a4 | 663 | NAME: authenticate_ip_ttl |
664 | TYPE: time_t | |
665 | LOC: Config.authenticateIpTTL | |
c35dd848 | 666 | DEFAULT: 1 second |
41bd17a4 | 667 | DOC_START |
668 | If you use proxy authentication and the 'max_user_ip' ACL, | |
669 | this directive controls how long Squid remembers the IP | |
670 | addresses associated with each user. Use a small value | |
671 | (e.g., 60 seconds) if your users might change addresses | |
4ded749e | 672 | quickly, as is the case with dialup. You might be safe |
41bd17a4 | 673 | using a larger value (e.g., 2 hours) in a corporate LAN |
674 | environment with relatively static address assignments. | |
675 | DOC_END | |
cccac0a2 | 676 | |
3d1e3e43 | 677 | COMMENT_START |
678 | ACCESS CONTROLS | |
679 | ----------------------------------------------------------------------------- | |
680 | COMMENT_END | |
681 | ||
41bd17a4 | 682 | NAME: external_acl_type |
683 | TYPE: externalAclHelper | |
684 | LOC: Config.externalAclHelperList | |
cccac0a2 | 685 | DEFAULT: none |
cccac0a2 | 686 | DOC_START |
41bd17a4 | 687 | This option defines external acl classes using a helper program |
688 | to look up the status | |
cccac0a2 | 689 | |
41bd17a4 | 690 | external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..] |
cccac0a2 | 691 | |
41bd17a4 | 692 | Options: |
cccac0a2 | 693 | |
41bd17a4 | 694 | ttl=n TTL in seconds for cached results (defaults to 3600 |
695 | for 1 hour) | |
696 | negative_ttl=n | |
697 | TTL for cached negative lookups (default same | |
698 | as ttl) | |
48d54e4d AJ |
699 | children-max=n |
700 | Maximum number of acl helper processes spawned to service | |
701 | external acl lookups of this type. (default 20) | |
702 | children-startup=n | |
703 | Minimum number of acl helper processes to spawn during | |
704 | startup and reconfigure to service external acl lookups | |
705 | of this type. (default 0) | |
706 | children-idle=n | |
707 | Number of acl helper processes to keep ahead of traffic | |
708 | loads. Squid will spawn this many at once whenever load | |
709 | rises above the capabilities of existing processes. | |
710 | Up to the value of children-max. (default 1) | |
41bd17a4 | 711 | concurrency=n concurrency level per process. Only used with helpers |
712 | capable of processing more than one query at a time. | |
48d54e4d | 713 | cache=n limit the result cache size, default is unbounded. |
41bd17a4 | 714 | grace=n Percentage remaining of TTL where a refresh of a |
715 | cached entry should be initiated without needing to | |
48d54e4d | 716 | wait for a new reply. (default is for no grace period) |
41bd17a4 | 717 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers |
91e64de9 AJ |
718 | ipv4 / ipv6 IP protocol used to communicate with this helper. |
719 | The default is to auto-detect IPv6 and use it when available. | |
cccac0a2 | 720 | |
41bd17a4 | 721 | FORMAT specifications |
cccac0a2 | 722 | |
41bd17a4 | 723 | %LOGIN Authenticated user login name |
99e4ad67 JB |
724 | %EXT_USER Username from previous external acl |
725 | %EXT_LOG Log details from previous external acl | |
726 | %EXT_TAG Tag from previous external acl | |
41bd17a4 | 727 | %IDENT Ident user name |
728 | %SRC Client IP | |
729 | %SRCPORT Client source port | |
730 | %URI Requested URI | |
731 | %DST Requested host | |
4e3f4dc7 | 732 | %PROTO Requested URL scheme |
41bd17a4 | 733 | %PORT Requested port |
734 | %PATH Requested URL path | |
735 | %METHOD Request method | |
736 | %MYADDR Squid interface address | |
737 | %MYPORT Squid http_port number | |
738 | %PATH Requested URL-path (including query-string if any) | |
739 | %USER_CERT SSL User certificate in PEM format | |
740 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
741 | %USER_CERT_xx SSL User certificate subject attribute xx | |
742 | %USER_CA_xx SSL User certificate issuer attribute xx | |
cedca6e7 | 743 | %ssl::>sni SSL client SNI sent to Squid |
7b0ca1e8 | 744 | |
c68c9682 | 745 | %>{Header} HTTP request header "Header" |
7b0ca1e8 | 746 | %>{Hdr:member} |
c68c9682 | 747 | HTTP request header "Hdr" list member "member" |
7b0ca1e8 | 748 | %>{Hdr:;member} |
41bd17a4 | 749 | HTTP request header list member using ; as |
750 | list separator. ; can be any non-alphanumeric | |
751 | character. | |
cccac0a2 | 752 | |
c68c9682 | 753 | %<{Header} HTTP reply header "Header" |
7b0ca1e8 | 754 | %<{Hdr:member} |
c68c9682 | 755 | HTTP reply header "Hdr" list member "member" |
7b0ca1e8 AJ |
756 | %<{Hdr:;member} |
757 | HTTP reply header list member using ; as | |
758 | list separator. ; can be any non-alphanumeric | |
759 | character. | |
760 | ||
ec2d5242 HN |
761 | %ACL The name of the ACL being tested. |
762 | %DATA The ACL arguments. If not used then any arguments | |
763 | is automatically added at the end of the line | |
764 | sent to the helper. | |
765 | NOTE: this will encode the arguments as one token, | |
766 | whereas the default will pass each separately. | |
767 | ||
0db8942f AJ |
768 | %% The percent sign. Useful for helpers which need |
769 | an unchanging input format. | |
770 | ||
cccac0a2 | 771 | |
5269ec0e AJ |
772 | General request syntax: |
773 | ||
774 | [channel-ID] FORMAT-values [acl-values ...] | |
775 | ||
776 | ||
777 | FORMAT-values consists of transaction details expanded with | |
778 | whitespace separation per the config file FORMAT specification | |
779 | using the FORMAT macros listed above. | |
780 | ||
781 | acl-values consists of any string specified in the referencing | |
782 | config 'acl ... external' line. see the "acl external" directive. | |
783 | ||
784 | Request values sent to the helper are URL escaped to protect | |
785 | each value in requests against whitespaces. | |
786 | ||
787 | If using protocol=2.5 then the request sent to the helper is not | |
788 | URL escaped to protect against whitespace. | |
789 | ||
790 | NOTE: protocol=3.0 is deprecated as no longer necessary. | |
791 | ||
792 | When using the concurrency= option the protocol is changed by | |
793 | introducing a query channel tag in front of the request/response. | |
794 | The query channel tag is a number between 0 and concurrency-1. | |
795 | This value must be echoed back unchanged to Squid as the first part | |
796 | of the response relating to its request. | |
797 | ||
798 | ||
799 | The helper receives lines expanded per the above format specification | |
800 | and for each input line returns 1 line starting with OK/ERR/BH result | |
801 | code and optionally followed by additional keywords with more details. | |
802 | ||
cccac0a2 | 803 | |
41bd17a4 | 804 | General result syntax: |
cccac0a2 | 805 | |
5269ec0e AJ |
806 | [channel-ID] result keyword=value ... |
807 | ||
808 | Result consists of one of the codes: | |
809 | ||
810 | OK | |
811 | the ACL test produced a match. | |
812 | ||
813 | ERR | |
814 | the ACL test does not produce a match. | |
815 | ||
816 | BH | |
4ded749e | 817 | An internal error occurred in the helper, preventing |
5269ec0e AJ |
818 | a result being identified. |
819 | ||
820 | The meaning of 'a match' is determined by your squid.conf | |
821 | access control configuration. See the Squid wiki for details. | |
cccac0a2 | 822 | |
41bd17a4 | 823 | Defined keywords: |
cccac0a2 | 824 | |
41bd17a4 | 825 | user= The users name (login) |
5269ec0e | 826 | |
41bd17a4 | 827 | password= The users password (for login= cache_peer option) |
5269ec0e | 828 | |
05e52854 | 829 | message= Message describing the reason for this response. |
5269ec0e AJ |
830 | Available as %o in error pages. |
831 | Useful on (ERR and BH results). | |
832 | ||
05e52854 AJ |
833 | tag= Apply a tag to a request. Only sets a tag once, |
834 | does not alter existing tags. | |
5269ec0e | 835 | |
41bd17a4 | 836 | log= String to be logged in access.log. Available as |
5269ec0e | 837 | %ea in logformat specifications. |
934b03fc | 838 | |
05e52854 | 839 | Any keywords may be sent on any response whether OK, ERR or BH. |
6a566b9c | 840 | |
05e52854 AJ |
841 | All response keyword values need to be a single token with URL |
842 | escaping, or enclosed in double quotes (") and escaped using \ on | |
24eac830 AJ |
843 | any double quotes or \ characters within the value. The wrapping |
844 | double quotes are removed before the value is interpreted by Squid. | |
845 | \r and \n are also replace by CR and LF. | |
1e5562e3 | 846 | |
24eac830 AJ |
847 | Some example key values: |
848 | ||
5269ec0e | 849 | user=John%20Smith |
24eac830 AJ |
850 | user="John Smith" |
851 | user="J. \"Bob\" Smith" | |
cccac0a2 | 852 | DOC_END |
853 | ||
41bd17a4 | 854 | NAME: acl |
855 | TYPE: acl | |
856 | LOC: Config.aclList | |
cb4f4424 | 857 | IF USE_OPENSSL |
cf1c09f6 CT |
858 | DEFAULT: ssl::certHasExpired ssl_error X509_V_ERR_CERT_HAS_EXPIRED |
859 | DEFAULT: ssl::certNotYetValid ssl_error X509_V_ERR_CERT_NOT_YET_VALID | |
860 | DEFAULT: ssl::certDomainMismatch ssl_error SQUID_X509_V_ERR_DOMAIN_MISMATCH | |
861 | 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 | |
862 | DEFAULT: ssl::certSelfSigned ssl_error X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT | |
863 | ENDIF | |
1f5bd0a4 | 864 | DEFAULT: all src all |
b8a25eaa AJ |
865 | DEFAULT: manager url_regex -i ^cache_object:// +i ^https?://[^/]+/squid-internal-mgr/ |
866 | DEFAULT: localhost src 127.0.0.1/32 ::1 | |
867 | DEFAULT: to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 | |
868 | DEFAULT_DOC: ACLs all, manager, localhost, and to_localhost are predefined. | |
cccac0a2 | 869 | DOC_START |
41bd17a4 | 870 | Defining an Access List |
cccac0a2 | 871 | |
375eeb3b AJ |
872 | Every access list definition must begin with an aclname and acltype, |
873 | followed by either type-specific arguments or a quoted filename that | |
874 | they are read from. | |
cccac0a2 | 875 | |
375eeb3b AJ |
876 | acl aclname acltype argument ... |
877 | acl aclname acltype "file" ... | |
cccac0a2 | 878 | |
375eeb3b | 879 | When using "file", the file should contain one item per line. |
cccac0a2 | 880 | |
0f987978 CT |
881 | Some acl types supports options which changes their default behaviour. |
882 | The available options are: | |
883 | ||
884 | -i,+i By default, regular expressions are CASE-SENSITIVE. To make them | |
885 | case-insensitive, use the -i option. To return case-sensitive | |
886 | use the +i option between patterns, or make a new ACL line | |
887 | without -i. | |
888 | ||
889 | -n Disable lookups and address type conversions. If lookup or | |
890 | conversion is required because the parameter type (IP or | |
891 | domain name) does not match the message address type (domain | |
892 | name or IP), then the ACL would immediately declare a mismatch | |
893 | without any warnings or lookups. | |
894 | ||
895 | -- Used to stop processing all options, in the case the first acl | |
896 | value has '-' character as first character (for example the '-' | |
897 | is a valid domain name) | |
cccac0a2 | 898 | |
b3567eb5 FC |
899 | Some acl types require suspending the current request in order |
900 | to access some external data source. | |
901 | Those which do are marked with the tag [slow], those which | |
902 | don't are marked as [fast]. | |
903 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl | |
904 | for further information | |
e988aa40 AJ |
905 | |
906 | ***** ACL TYPES AVAILABLE ***** | |
907 | ||
1e40905d AJ |
908 | acl aclname src ip-address/mask ... # clients IP address [fast] |
909 | acl aclname src addr1-addr2/mask ... # range of addresses [fast] | |
0f987978 | 910 | acl aclname dst [-n] ip-address/mask ... # URL host's IP address [slow] |
1e40905d | 911 | acl aclname localip ip-address/mask ... # IP address the client connected to [fast] |
cccac0a2 | 912 | |
41bd17a4 | 913 | acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation) |
914 | # The arp ACL requires the special configure option --enable-arp-acl. | |
915 | # Furthermore, the ARP ACL code is not portable to all operating systems. | |
b3567eb5 FC |
916 | # It works on Linux, Solaris, Windows, FreeBSD, and some |
917 | # other *BSD variants. | |
918 | # [fast] | |
41bd17a4 | 919 | # |
920 | # NOTE: Squid can only determine the MAC address for clients that are on | |
b3567eb5 FC |
921 | # the same subnet. If the client is on a different subnet, |
922 | # then Squid cannot find out its MAC address. | |
923 | ||
924 | acl aclname srcdomain .foo.com ... | |
925 | # reverse lookup, from client IP [slow] | |
0f987978 | 926 | acl aclname dstdomain [-n] .foo.com ... |
e38c7724 | 927 | # Destination server from URL [fast] |
b3567eb5 FC |
928 | acl aclname srcdom_regex [-i] \.foo\.com ... |
929 | # regex matching client name [slow] | |
0f987978 | 930 | acl aclname dstdom_regex [-n] [-i] \.foo\.com ... |
e38c7724 | 931 | # regex matching server [fast] |
b3567eb5 | 932 | # |
41bd17a4 | 933 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP |
934 | # based URL is used and no match is found. The name "none" is used | |
935 | # if the reverse lookup fails. | |
9bc73deb | 936 | |
375eeb3b AJ |
937 | acl aclname src_as number ... |
938 | acl aclname dst_as number ... | |
b3567eb5 | 939 | # [fast] |
e988aa40 AJ |
940 | # Except for access control, AS numbers can be used for |
941 | # routing of requests to specific caches. Here's an | |
942 | # example for routing all requests for AS#1241 and only | |
943 | # those to mycache.mydomain.net: | |
944 | # acl asexample dst_as 1241 | |
945 | # cache_peer_access mycache.mydomain.net allow asexample | |
946 | # cache_peer_access mycache_mydomain.net deny all | |
7f7db318 | 947 | |
6db78a1a | 948 | acl aclname peername myPeer ... |
b3567eb5 | 949 | # [fast] |
6db78a1a AJ |
950 | # match against a named cache_peer entry |
951 | # set unique name= on cache_peer lines for reliable use. | |
952 | ||
375eeb3b | 953 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
b3567eb5 | 954 | # [fast] |
375eeb3b AJ |
955 | # day-abbrevs: |
956 | # S - Sunday | |
957 | # M - Monday | |
958 | # T - Tuesday | |
959 | # W - Wednesday | |
960 | # H - Thursday | |
961 | # F - Friday | |
962 | # A - Saturday | |
963 | # h1:m1 must be less than h2:m2 | |
964 | ||
b3567eb5 FC |
965 | acl aclname url_regex [-i] ^http:// ... |
966 | # regex matching on whole URL [fast] | |
9d35fe37 AJ |
967 | acl aclname urllogin [-i] [^a-zA-Z0-9] ... |
968 | # regex matching on URL login field | |
b3567eb5 FC |
969 | acl aclname urlpath_regex [-i] \.gif$ ... |
970 | # regex matching on URL path [fast] | |
e988aa40 | 971 | |
b3567eb5 FC |
972 | acl aclname port 80 70 21 0-1024... # destination TCP port [fast] |
973 | # ranges are alloed | |
1e40905d AJ |
974 | acl aclname localport 3128 ... # TCP port the client connected to [fast] |
975 | # NP: for interception mode this is usually '80' | |
976 | ||
b3567eb5 | 977 | acl aclname myportname 3128 ... # http(s)_port name [fast] |
e988aa40 | 978 | |
b3567eb5 FC |
979 | acl aclname proto HTTP FTP ... # request protocol [fast] |
980 | ||
981 | acl aclname method GET POST ... # HTTP request method [fast] | |
e988aa40 | 982 | |
b3567eb5 FC |
983 | acl aclname http_status 200 301 500- 400-403 ... |
984 | # status code in reply [fast] | |
e988aa40 | 985 | |
375eeb3b | 986 | acl aclname browser [-i] regexp ... |
b3567eb5 | 987 | # pattern match on User-Agent header (see also req_header below) [fast] |
e988aa40 | 988 | |
375eeb3b | 989 | acl aclname referer_regex [-i] regexp ... |
b3567eb5 | 990 | # pattern match on Referer header [fast] |
41bd17a4 | 991 | # Referer is highly unreliable, so use with care |
e988aa40 | 992 | |
375eeb3b | 993 | acl aclname ident username ... |
41bd17a4 | 994 | acl aclname ident_regex [-i] pattern ... |
b3567eb5 | 995 | # string match on ident output [slow] |
41bd17a4 | 996 | # use REQUIRED to accept any non-null ident. |
cf5cc17e | 997 | |
41bd17a4 | 998 | acl aclname proxy_auth [-i] username ... |
999 | acl aclname proxy_auth_regex [-i] pattern ... | |
b3567eb5 FC |
1000 | # perform http authentication challenge to the client and match against |
1001 | # supplied credentials [slow] | |
1002 | # | |
1003 | # takes a list of allowed usernames. | |
41bd17a4 | 1004 | # use REQUIRED to accept any valid username. |
1005 | # | |
b3567eb5 FC |
1006 | # Will use proxy authentication in forward-proxy scenarios, and plain |
1007 | # http authenticaiton in reverse-proxy scenarios | |
1008 | # | |
41bd17a4 | 1009 | # NOTE: when a Proxy-Authentication header is sent but it is not |
1010 | # needed during ACL checking the username is NOT logged | |
1011 | # in access.log. | |
1012 | # | |
1013 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
1014 | # to check username/password combinations (see | |
1015 | # auth_param directive). | |
1016 | # | |
e988aa40 AJ |
1017 | # NOTE: proxy_auth can't be used in a transparent/intercepting proxy |
1018 | # as the browser needs to be configured for using a proxy in order | |
41bd17a4 | 1019 | # to respond to proxy authentication. |
8e8d4f30 | 1020 | |
41bd17a4 | 1021 | acl aclname snmp_community string ... |
b3567eb5 | 1022 | # A community string to limit access to your SNMP Agent [fast] |
41bd17a4 | 1023 | # Example: |
1024 | # | |
1025 | # acl snmppublic snmp_community public | |
934b03fc | 1026 | |
41bd17a4 | 1027 | acl aclname maxconn number |
1028 | # This will be matched when the client's IP address has | |
55d0fae8 AJ |
1029 | # more than <number> TCP connections established. [fast] |
1030 | # NOTE: This only measures direct TCP links so X-Forwarded-For | |
1031 | # indirect clients are not counted. | |
1e5562e3 | 1032 | |
41bd17a4 | 1033 | acl aclname max_user_ip [-s] number |
1034 | # This will be matched when the user attempts to log in from more | |
1035 | # than <number> different ip addresses. The authenticate_ip_ttl | |
b3567eb5 | 1036 | # parameter controls the timeout on the ip entries. [fast] |
41bd17a4 | 1037 | # If -s is specified the limit is strict, denying browsing |
1038 | # from any further IP addresses until the ttl has expired. Without | |
1039 | # -s Squid will just annoy the user by "randomly" denying requests. | |
1040 | # (the counter is reset each time the limit is reached and a | |
1041 | # request is denied) | |
1042 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
1043 | # clients may appear to come from multiple addresses if they are | |
1044 | # going through proxy farms, so a limit of 1 may cause user problems. | |
cccac0a2 | 1045 | |
cb1b906f AJ |
1046 | acl aclname random probability |
1047 | # Pseudo-randomly match requests. Based on the probability given. | |
1048 | # Probability may be written as a decimal (0.333), fraction (1/3) | |
1049 | # or ratio of matches:non-matches (3:5). | |
1050 | ||
375eeb3b | 1051 | acl aclname req_mime_type [-i] mime-type ... |
41bd17a4 | 1052 | # regex match against the mime type of the request generated |
1053 | # by the client. Can be used to detect file upload or some | |
b3567eb5 | 1054 | # types HTTP tunneling requests [fast] |
41bd17a4 | 1055 | # NOTE: This does NOT match the reply. You cannot use this |
1056 | # to match the returned file type. | |
cccac0a2 | 1057 | |
41bd17a4 | 1058 | acl aclname req_header header-name [-i] any\.regex\.here |
1059 | # regex match against any of the known request headers. May be | |
1060 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1061 | # ACL [fast] |
cccac0a2 | 1062 | |
375eeb3b | 1063 | acl aclname rep_mime_type [-i] mime-type ... |
41bd17a4 | 1064 | # regex match against the mime type of the reply received by |
1065 | # squid. Can be used to detect file download or some | |
b3567eb5 | 1066 | # types HTTP tunneling requests. [fast] |
41bd17a4 | 1067 | # NOTE: This has no effect in http_access rules. It only has |
1068 | # effect in rules that affect the reply data stream such as | |
1069 | # http_reply_access. | |
cccac0a2 | 1070 | |
41bd17a4 | 1071 | acl aclname rep_header header-name [-i] any\.regex\.here |
1072 | # regex match against any of the known reply headers. May be | |
1073 | # thought of as a superset of "browser", "referer" and "mime-type" | |
b3567eb5 | 1074 | # ACLs [fast] |
cccac0a2 | 1075 | |
375eeb3b | 1076 | acl aclname external class_name [arguments...] |
41bd17a4 | 1077 | # external ACL lookup via a helper class defined by the |
b3567eb5 | 1078 | # external_acl_type directive [slow] |
cccac0a2 | 1079 | |
41bd17a4 | 1080 | acl aclname user_cert attribute values... |
1081 | # match against attributes in a user SSL certificate | |
b3567eb5 | 1082 | # attribute is one of DN/C/O/CN/L/ST [fast] |
cccac0a2 | 1083 | |
41bd17a4 | 1084 | acl aclname ca_cert attribute values... |
1085 | # match against attributes a users issuing CA SSL certificate | |
b3567eb5 | 1086 | # attribute is one of DN/C/O/CN/L/ST [fast] |
cccac0a2 | 1087 | |
41bd17a4 | 1088 | acl aclname ext_user username ... |
1089 | acl aclname ext_user_regex [-i] pattern ... | |
b3567eb5 | 1090 | # string match on username returned by external acl helper [slow] |
41bd17a4 | 1091 | # use REQUIRED to accept any non-null user name. |
b3567eb5 | 1092 | |
0ab50441 | 1093 | acl aclname tag tagvalue ... |
b3567eb5 | 1094 | # string match on tag returned by external acl helper [slow] |
cccac0a2 | 1095 | |
bbaf2685 AJ |
1096 | acl aclname hier_code codename ... |
1097 | # string match against squid hierarchy code(s); [fast] | |
1098 | # e.g., DIRECT, PARENT_HIT, NONE, etc. | |
1099 | # | |
1100 | # NOTE: This has no effect in http_access rules. It only has | |
1101 | # effect in rules that affect the reply data stream such as | |
1102 | # http_reply_access. | |
1103 | ||
39baccc8 CT |
1104 | acl aclname note name [value ...] |
1105 | # match transaction annotation [fast] | |
1106 | # Without values, matches any annotation with a given name. | |
1107 | # With value(s), matches any annotation with a given name that | |
1108 | # also has one of the given values. | |
1109 | # Names and values are compared using a string equality test. | |
1110 | # Annotation sources include note and adaptation_meta directives | |
1111 | # as well as helper and eCAP responses. | |
1112 | ||
c302ddb5 CT |
1113 | acl aclname adaptation_service service ... |
1114 | # Matches the name of any icap_service, ecap_service, | |
1115 | # adaptation_service_set, or adaptation_service_chain that Squid | |
1116 | # has used (or attempted to use) for the master transaction. | |
1117 | # This ACL must be defined after the corresponding adaptation | |
1118 | # service is named in squid.conf. This ACL is usable with | |
1119 | # adaptation_meta because it starts matching immediately after | |
1120 | # the service has been selected for adaptation. | |
1121 | ||
cb4f4424 | 1122 | IF USE_OPENSSL |
cf1c09f6 CT |
1123 | acl aclname ssl_error errorname |
1124 | # match against SSL certificate validation error [fast] | |
cf1c09f6 | 1125 | # |
7a957a93 AR |
1126 | # For valid error names see in @DEFAULT_ERROR_DIR@/templates/error-details.txt |
1127 | # template file. | |
cf1c09f6 | 1128 | # |
7a957a93 AR |
1129 | # The following can be used as shortcuts for certificate properties: |
1130 | # [ssl::]certHasExpired: the "not after" field is in the past | |
1131 | # [ssl::]certNotYetValid: the "not before" field is in the future | |
1132 | # [ssl::]certUntrusted: The certificate issuer is not to be trusted. | |
1133 | # [ssl::]certSelfSigned: The certificate is self signed. | |
1134 | # [ssl::]certDomainMismatch: The certificate CN domain does not | |
1135 | # match the name the name of the host we are connecting to. | |
1136 | # | |
1137 | # The ssl::certHasExpired, ssl::certNotYetValid, ssl::certDomainMismatch, | |
1138 | # ssl::certUntrusted, and ssl::certSelfSigned can also be used as | |
1139 | # predefined ACLs, just like the 'all' ACL. | |
1140 | # | |
1141 | # NOTE: The ssl_error ACL is only supported with sslproxy_cert_error, | |
1142 | # sslproxy_cert_sign, and sslproxy_cert_adapt options. | |
00352183 | 1143 | |
72b12f9e | 1144 | acl aclname server_cert_fingerprint [-sha1] fingerprint |
00352183 AR |
1145 | # match against server SSL certificate fingerprint [fast] |
1146 | # | |
1147 | # The fingerprint is the digest of the DER encoded version | |
1148 | # of the whole certificate. The user should use the form: XX:XX:... | |
1149 | # Optional argument specifies the digest algorithm to use. | |
1150 | # The SHA1 digest algorithm is the default and is currently | |
1151 | # the only algorithm supported (-sha1). | |
5d65362c | 1152 | |
652fcffd | 1153 | acl aclname at_step step |
8f165829 AR |
1154 | # match against the current step during ssl_bump evaluation [fast] |
1155 | # Never matches and should not be used outside the ssl_bump context. | |
1156 | # | |
1157 | # At each SslBump step, Squid evaluates ssl_bump directives to find | |
1158 | # the next bumping action (e.g., peek or splice). Valid SslBump step | |
1159 | # values and the corresponding ssl_bump evaluation moments are: | |
1160 | # SslBump1: After getting TCP-level and HTTP CONNECT info. | |
1161 | # SslBump2: After getting SSL Client Hello info. | |
1162 | # SslBump3: After getting SSL Server Hello info. | |
cf1c09f6 | 1163 | ENDIF |
6f58d7d7 AR |
1164 | acl aclname any-of acl1 acl2 ... |
1165 | # match any one of the acls [fast or slow] | |
1166 | # The first matching ACL stops further ACL evaluation. | |
1167 | # | |
1168 | # ACLs from multiple any-of lines with the same name are ORed. | |
1169 | # For example, A = (a1 or a2) or (a3 or a4) can be written as | |
1170 | # acl A any-of a1 a2 | |
1171 | # acl A any-of a3 a4 | |
1172 | # | |
1173 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1174 | # and slow otherwise. | |
1175 | ||
1176 | acl aclname all-of acl1 acl2 ... | |
1177 | # match all of the acls [fast or slow] | |
1178 | # The first mismatching ACL stops further ACL evaluation. | |
1179 | # | |
1180 | # ACLs from multiple all-of lines with the same name are ORed. | |
1181 | # For example, B = (b1 and b2) or (b3 and b4) can be written as | |
1182 | # acl B all-of b1 b2 | |
1183 | # acl B all-of b3 b4 | |
1184 | # | |
1185 | # This group ACL is fast if all evaluated ACLs in the group are fast | |
1186 | # and slow otherwise. | |
cf1c09f6 | 1187 | |
e0855596 AJ |
1188 | Examples: |
1189 | acl macaddress arp 09:00:2b:23:45:67 | |
1190 | acl myexample dst_as 1241 | |
1191 | acl password proxy_auth REQUIRED | |
1192 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
1193 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
cccac0a2 | 1194 | |
41bd17a4 | 1195 | NOCOMMENT_START |
e0855596 AJ |
1196 | # |
1197 | # Recommended minimum configuration: | |
1198 | # | |
e0855596 | 1199 | |
ee776778 | 1200 | # Example rule allowing access from your local networks. |
1201 | # Adapt to list your (internal) IP networks from where browsing | |
1202 | # should be allowed | |
1203 | acl localnet src 10.0.0.0/8 # RFC1918 possible internal network | |
1204 | acl localnet src 172.16.0.0/12 # RFC1918 possible internal network | |
1205 | acl localnet src 192.168.0.0/16 # RFC1918 possible internal network | |
055421ee AJ |
1206 | acl localnet src fc00::/7 # RFC 4193 local private network range |
1207 | acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines | |
e0855596 | 1208 | |
41bd17a4 | 1209 | acl SSL_ports port 443 |
1210 | acl Safe_ports port 80 # http | |
1211 | acl Safe_ports port 21 # ftp | |
1212 | acl Safe_ports port 443 # https | |
1213 | acl Safe_ports port 70 # gopher | |
1214 | acl Safe_ports port 210 # wais | |
1215 | acl Safe_ports port 1025-65535 # unregistered ports | |
1216 | acl Safe_ports port 280 # http-mgmt | |
1217 | acl Safe_ports port 488 # gss-http | |
1218 | acl Safe_ports port 591 # filemaker | |
1219 | acl Safe_ports port 777 # multiling http | |
1220 | acl CONNECT method CONNECT | |
1221 | NOCOMMENT_END | |
1222 | DOC_END | |
cccac0a2 | 1223 | |
3d674977 AJ |
1224 | NAME: follow_x_forwarded_for |
1225 | TYPE: acl_access | |
1226 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1227 | LOC: Config.accessList.followXFF | |
3d674977 | 1228 | DEFAULT_IF_NONE: deny all |
638402dd | 1229 | DEFAULT_DOC: X-Forwarded-For header will be ignored. |
3d674977 AJ |
1230 | DOC_START |
1231 | Allowing or Denying the X-Forwarded-For header to be followed to | |
1232 | find the original source of a request. | |
1233 | ||
1234 | Requests may pass through a chain of several other proxies | |
1235 | before reaching us. The X-Forwarded-For header will contain a | |
1236 | comma-separated list of the IP addresses in the chain, with the | |
1237 | rightmost address being the most recent. | |
1238 | ||
1239 | If a request reaches us from a source that is allowed by this | |
1240 | configuration item, then we consult the X-Forwarded-For header | |
1241 | to see where that host received the request from. If the | |
2bf4e8fa AJ |
1242 | X-Forwarded-For header contains multiple addresses, we continue |
1243 | backtracking until we reach an address for which we are not allowed | |
1244 | to follow the X-Forwarded-For header, or until we reach the first | |
1245 | address in the list. For the purpose of ACL used in the | |
1246 | follow_x_forwarded_for directive the src ACL type always matches | |
1247 | the address we are testing and srcdomain matches its rDNS. | |
3d674977 AJ |
1248 | |
1249 | The end result of this process is an IP address that we will | |
1250 | refer to as the indirect client address. This address may | |
57d76dd4 | 1251 | be treated as the client address for access control, ICAP, delay |
3d674977 | 1252 | pools and logging, depending on the acl_uses_indirect_client, |
96d64448 AJ |
1253 | icap_uses_indirect_client, delay_pool_uses_indirect_client, |
1254 | log_uses_indirect_client and tproxy_uses_indirect_client options. | |
3d674977 | 1255 | |
b3567eb5 FC |
1256 | This clause only supports fast acl types. |
1257 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1258 | ||
3d674977 AJ |
1259 | SECURITY CONSIDERATIONS: |
1260 | ||
1261 | Any host for which we follow the X-Forwarded-For header | |
1262 | can place incorrect information in the header, and Squid | |
1263 | will use the incorrect information as if it were the | |
1264 | source address of the request. This may enable remote | |
1265 | hosts to bypass any access control restrictions that are | |
1266 | based on the client's source addresses. | |
1267 | ||
1268 | For example: | |
1269 | ||
1270 | acl localhost src 127.0.0.1 | |
1271 | acl my_other_proxy srcdomain .proxy.example.com | |
1272 | follow_x_forwarded_for allow localhost | |
1273 | follow_x_forwarded_for allow my_other_proxy | |
1274 | DOC_END | |
1275 | ||
1276 | NAME: acl_uses_indirect_client | |
1277 | COMMENT: on|off | |
1278 | TYPE: onoff | |
1279 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1280 | DEFAULT: on | |
1281 | LOC: Config.onoff.acl_uses_indirect_client | |
1282 | DOC_START | |
1283 | Controls whether the indirect client address | |
1284 | (see follow_x_forwarded_for) is used instead of the | |
1285 | direct client address in acl matching. | |
55d0fae8 AJ |
1286 | |
1287 | NOTE: maxconn ACL considers direct TCP links and indirect | |
1288 | clients will always have zero. So no match. | |
3d674977 AJ |
1289 | DOC_END |
1290 | ||
1291 | NAME: delay_pool_uses_indirect_client | |
1292 | COMMENT: on|off | |
1293 | TYPE: onoff | |
9a0a18de | 1294 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_DELAY_POOLS |
3d674977 AJ |
1295 | DEFAULT: on |
1296 | LOC: Config.onoff.delay_pool_uses_indirect_client | |
1297 | DOC_START | |
1298 | Controls whether the indirect client address | |
1299 | (see follow_x_forwarded_for) is used instead of the | |
1300 | direct client address in delay pools. | |
1301 | DOC_END | |
1302 | ||
1303 | NAME: log_uses_indirect_client | |
1304 | COMMENT: on|off | |
1305 | TYPE: onoff | |
1306 | IFDEF: FOLLOW_X_FORWARDED_FOR | |
1307 | DEFAULT: on | |
1308 | LOC: Config.onoff.log_uses_indirect_client | |
1309 | DOC_START | |
1310 | Controls whether the indirect client address | |
1311 | (see follow_x_forwarded_for) is used instead of the | |
1312 | direct client address in the access log. | |
1313 | DOC_END | |
1314 | ||
96d64448 AJ |
1315 | NAME: tproxy_uses_indirect_client |
1316 | COMMENT: on|off | |
1317 | TYPE: onoff | |
1318 | IFDEF: FOLLOW_X_FORWARDED_FOR&&LINUX_NETFILTER | |
4d7ab5a2 | 1319 | DEFAULT: off |
96d64448 AJ |
1320 | LOC: Config.onoff.tproxy_uses_indirect_client |
1321 | DOC_START | |
1322 | Controls whether the indirect client address | |
1323 | (see follow_x_forwarded_for) is used instead of the | |
1324 | direct client address when spoofing the outgoing client. | |
4d7ab5a2 AJ |
1325 | |
1326 | This has no effect on requests arriving in non-tproxy | |
1327 | mode ports. | |
1328 | ||
1329 | SECURITY WARNING: Usage of this option is dangerous | |
1330 | and should not be used trivially. Correct configuration | |
b01a2238 | 1331 | of follow_x_forewarded_for with a limited set of trusted |
4d7ab5a2 | 1332 | sources is required to prevent abuse of your proxy. |
96d64448 AJ |
1333 | DOC_END |
1334 | ||
0d901ef4 SH |
1335 | NAME: spoof_client_ip |
1336 | TYPE: acl_access | |
1337 | LOC: Config.accessList.spoof_client_ip | |
1338 | DEFAULT: none | |
1339 | DEFAULT_DOC: Allow spoofing on all TPROXY traffic. | |
1340 | DOC_START | |
1341 | Control client IP address spoofing of TPROXY traffic based on | |
1342 | defined access lists. | |
1343 | ||
1344 | spoof_client_ip allow|deny [!]aclname ... | |
1345 | ||
1346 | If there are no "spoof_client_ip" lines present, the default | |
1347 | is to "allow" spoofing of any suitable request. | |
1348 | ||
1349 | Note that the cache_peer "no-tproxy" option overrides this ACL. | |
1350 | ||
1351 | This clause supports fast acl types. | |
1352 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1353 | DOC_END | |
1354 | ||
41bd17a4 | 1355 | NAME: http_access |
1356 | TYPE: acl_access | |
1357 | LOC: Config.accessList.http | |
41bd17a4 | 1358 | DEFAULT_IF_NONE: deny all |
638402dd | 1359 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. |
41bd17a4 | 1360 | DOC_START |
1361 | Allowing or Denying access based on defined access lists | |
cccac0a2 | 1362 | |
41bd17a4 | 1363 | Access to the HTTP port: |
1364 | http_access allow|deny [!]aclname ... | |
cccac0a2 | 1365 | |
41bd17a4 | 1366 | NOTE on default values: |
cccac0a2 | 1367 | |
41bd17a4 | 1368 | If there are no "access" lines present, the default is to deny |
1369 | the request. | |
cccac0a2 | 1370 | |
41bd17a4 | 1371 | If none of the "access" lines cause a match, the default is the |
1372 | opposite of the last line in the list. If the last line was | |
1373 | deny, the default is allow. Conversely, if the last line | |
1374 | is allow, the default will be deny. For these reasons, it is a | |
51ae86b2 HN |
1375 | good idea to have an "deny all" entry at the end of your access |
1376 | lists to avoid potential confusion. | |
cccac0a2 | 1377 | |
b3567eb5 FC |
1378 | This clause supports both fast and slow acl types. |
1379 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
1380 | ||
41bd17a4 | 1381 | NOCOMMENT_START |
e0855596 AJ |
1382 | |
1383 | # | |
1384 | # Recommended minimum Access Permission configuration: | |
41bd17a4 | 1385 | # |
e0855596 | 1386 | # Deny requests to certain unsafe ports |
41bd17a4 | 1387 | http_access deny !Safe_ports |
e0855596 AJ |
1388 | |
1389 | # Deny CONNECT to other than secure SSL ports | |
41bd17a4 | 1390 | http_access deny CONNECT !SSL_ports |
e0855596 | 1391 | |
baa3ea7e AJ |
1392 | # Only allow cachemgr access from localhost |
1393 | http_access allow localhost manager | |
1394 | http_access deny manager | |
1395 | ||
41bd17a4 | 1396 | # We strongly recommend the following be uncommented to protect innocent |
1397 | # web applications running on the proxy server who think the only | |
1398 | # one who can access services on "localhost" is a local user | |
1399 | #http_access deny to_localhost | |
e0855596 | 1400 | |
41bd17a4 | 1401 | # |
1402 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
e0855596 | 1403 | # |
c8f4eac4 | 1404 | |
ee776778 | 1405 | # Example rule allowing access from your local networks. |
1406 | # Adapt localnet in the ACL section to list your (internal) IP networks | |
1407 | # from where browsing should be allowed | |
1408 | http_access allow localnet | |
afb33856 | 1409 | http_access allow localhost |
7d90757b | 1410 | |
41bd17a4 | 1411 | # And finally deny all other access to this proxy |
1412 | http_access deny all | |
1413 | NOCOMMENT_END | |
1414 | DOC_END | |
7d90757b | 1415 | |
533493da AJ |
1416 | NAME: adapted_http_access http_access2 |
1417 | TYPE: acl_access | |
1418 | LOC: Config.accessList.adapted_http | |
1419 | DEFAULT: none | |
638402dd | 1420 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
533493da AJ |
1421 | DOC_START |
1422 | Allowing or Denying access based on defined access lists | |
1423 | ||
1424 | Essentially identical to http_access, but runs after redirectors | |
1425 | and ICAP/eCAP adaptation. Allowing access control based on their | |
1426 | output. | |
1427 | ||
1428 | If not set then only http_access is used. | |
1429 | DOC_END | |
1430 | ||
41bd17a4 | 1431 | NAME: http_reply_access |
1432 | TYPE: acl_access | |
1433 | LOC: Config.accessList.reply | |
1434 | DEFAULT: none | |
638402dd | 1435 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 1436 | DOC_START |
1437 | Allow replies to client requests. This is complementary to http_access. | |
cccac0a2 | 1438 | |
41bd17a4 | 1439 | http_reply_access allow|deny [!] aclname ... |
cccac0a2 | 1440 | |
41bd17a4 | 1441 | NOTE: if there are no access lines present, the default is to allow |
638402dd | 1442 | all replies. |
1a224843 | 1443 | |
41bd17a4 | 1444 | If none of the access lines cause a match the opposite of the |
1445 | last line will apply. Thus it is good practice to end the rules | |
1446 | with an "allow all" or "deny all" entry. | |
b3567eb5 FC |
1447 | |
1448 | This clause supports both fast and slow acl types. | |
1449 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
cccac0a2 | 1450 | DOC_END |
1451 | ||
41bd17a4 | 1452 | NAME: icp_access |
1453 | TYPE: acl_access | |
1454 | LOC: Config.accessList.icp | |
638402dd AJ |
1455 | DEFAULT: none |
1456 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 1457 | DOC_START |
41bd17a4 | 1458 | Allowing or Denying access to the ICP port based on defined |
1459 | access lists | |
5473c134 | 1460 | |
41bd17a4 | 1461 | icp_access allow|deny [!]aclname ... |
5473c134 | 1462 | |
638402dd AJ |
1463 | NOTE: The default if no icp_access lines are present is to |
1464 | deny all traffic. This default may cause problems with peers | |
1465 | using ICP. | |
41bd17a4 | 1466 | |
b3567eb5 FC |
1467 | This clause only supports fast acl types. |
1468 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1469 | |
1470 | # Allow ICP queries from local networks only | |
df2eec10 AJ |
1471 | #icp_access allow localnet |
1472 | #icp_access deny all | |
5473c134 | 1473 | DOC_END |
1474 | ||
41bd17a4 | 1475 | NAME: htcp_access |
1476 | IFDEF: USE_HTCP | |
1477 | TYPE: acl_access | |
1478 | LOC: Config.accessList.htcp | |
638402dd AJ |
1479 | DEFAULT: none |
1480 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 1481 | DOC_START |
41bd17a4 | 1482 | Allowing or Denying access to the HTCP port based on defined |
1483 | access lists | |
5473c134 | 1484 | |
41bd17a4 | 1485 | htcp_access allow|deny [!]aclname ... |
5473c134 | 1486 | |
638402dd AJ |
1487 | See also htcp_clr_access for details on access control for |
1488 | cache purge (CLR) HTCP messages. | |
5473c134 | 1489 | |
0b48417e | 1490 | NOTE: The default if no htcp_access lines are present is to |
1491 | deny all traffic. This default may cause problems with peers | |
18191440 | 1492 | using the htcp option. |
0b48417e | 1493 | |
b3567eb5 FC |
1494 | This clause only supports fast acl types. |
1495 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1496 | |
1497 | # Allow HTCP queries from local networks only | |
df2eec10 AJ |
1498 | #htcp_access allow localnet |
1499 | #htcp_access deny all | |
41bd17a4 | 1500 | DOC_END |
5473c134 | 1501 | |
41bd17a4 | 1502 | NAME: htcp_clr_access |
1503 | IFDEF: USE_HTCP | |
1504 | TYPE: acl_access | |
1505 | LOC: Config.accessList.htcp_clr | |
638402dd AJ |
1506 | DEFAULT: none |
1507 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
41bd17a4 | 1508 | DOC_START |
1509 | Allowing or Denying access to purge content using HTCP based | |
638402dd AJ |
1510 | on defined access lists. |
1511 | See htcp_access for details on general HTCP access control. | |
5473c134 | 1512 | |
41bd17a4 | 1513 | htcp_clr_access allow|deny [!]aclname ... |
5473c134 | 1514 | |
b3567eb5 FC |
1515 | This clause only supports fast acl types. |
1516 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
e0855596 AJ |
1517 | |
1518 | # Allow HTCP CLR requests from trusted peers | |
638402dd | 1519 | acl htcp_clr_peer src 192.0.2.2 2001:DB8::2 |
41bd17a4 | 1520 | htcp_clr_access allow htcp_clr_peer |
638402dd | 1521 | htcp_clr_access deny all |
5473c134 | 1522 | DOC_END |
1523 | ||
41bd17a4 | 1524 | NAME: miss_access |
1525 | TYPE: acl_access | |
1526 | LOC: Config.accessList.miss | |
b8a25eaa | 1527 | DEFAULT: none |
638402dd | 1528 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
5473c134 | 1529 | DOC_START |
0b4fb91a AJ |
1530 | Determins whether network access is permitted when satisfying a request. |
1531 | ||
1532 | For example; | |
1533 | to force your neighbors to use you as a sibling instead of | |
1534 | a parent. | |
5473c134 | 1535 | |
638402dd | 1536 | acl localclients src 192.0.2.0/24 2001:DB8::a:0/64 |
41bd17a4 | 1537 | miss_access deny !localclients |
638402dd | 1538 | miss_access allow all |
5473c134 | 1539 | |
0b4fb91a AJ |
1540 | This means only your local clients are allowed to fetch relayed/MISS |
1541 | replies from the network and all other clients can only fetch cached | |
1542 | objects (HITs). | |
1543 | ||
0b4fb91a AJ |
1544 | The default for this setting allows all clients who passed the |
1545 | http_access rules to relay via this proxy. | |
b3567eb5 FC |
1546 | |
1547 | This clause only supports fast acl types. | |
1548 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 1549 | DOC_END |
1550 | ||
1551 | NAME: ident_lookup_access | |
1552 | TYPE: acl_access | |
1553 | IFDEF: USE_IDENT | |
638402dd AJ |
1554 | DEFAULT: none |
1555 | DEFAULT_DOC: Unless rules exist in squid.conf, IDENT is not fetched. | |
4daaf3cb | 1556 | LOC: Ident::TheConfig.identLookup |
5473c134 | 1557 | DOC_START |
41bd17a4 | 1558 | A list of ACL elements which, if matched, cause an ident |
1559 | (RFC 931) lookup to be performed for this request. For | |
1560 | example, you might choose to always perform ident lookups | |
1561 | for your main multi-user Unix boxes, but not for your Macs | |
1562 | and PCs. By default, ident lookups are not performed for | |
1563 | any requests. | |
5473c134 | 1564 | |
41bd17a4 | 1565 | To enable ident lookups for specific client addresses, you |
1566 | can follow this example: | |
5473c134 | 1567 | |
4daaf3cb | 1568 | acl ident_aware_hosts src 198.168.1.0/24 |
41bd17a4 | 1569 | ident_lookup_access allow ident_aware_hosts |
1570 | ident_lookup_access deny all | |
5473c134 | 1571 | |
4daaf3cb | 1572 | Only src type ACL checks are fully supported. A srcdomain |
41bd17a4 | 1573 | ACL might work at times, but it will not always provide |
1574 | the correct result. | |
b3567eb5 FC |
1575 | |
1576 | This clause only supports fast acl types. | |
1577 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 1578 | DOC_END |
5473c134 | 1579 | |
5b0f5383 | 1580 | NAME: reply_body_max_size |
1581 | COMMENT: size [acl acl...] | |
1582 | TYPE: acl_b_size_t | |
1583 | DEFAULT: none | |
638402dd | 1584 | DEFAULT_DOC: No limit is applied. |
5b0f5383 | 1585 | LOC: Config.ReplyBodySize |
1586 | DOC_START | |
1587 | This option specifies the maximum size of a reply body. It can be | |
1588 | used to prevent users from downloading very large files, such as | |
1589 | MP3's and movies. When the reply headers are received, the | |
1590 | reply_body_max_size lines are processed, and the first line where | |
1591 | all (if any) listed ACLs are true is used as the maximum body size | |
1592 | for this reply. | |
1593 | ||
1594 | This size is checked twice. First when we get the reply headers, | |
1595 | we check the content-length value. If the content length value exists | |
1596 | and is larger than the allowed size, the request is denied and the | |
1597 | user receives an error message that says "the request or reply | |
1598 | is too large." If there is no content-length, and the reply | |
1599 | size exceeds this limit, the client's connection is just closed | |
1600 | and they will receive a partial reply. | |
1601 | ||
1602 | WARNING: downstream caches probably can not detect a partial reply | |
1603 | if there is no content-length header, so they will cache | |
1604 | partial responses and give them out as hits. You should NOT | |
1605 | use this option if you have downstream caches. | |
1606 | ||
1607 | WARNING: A maximum size smaller than the size of squid's error messages | |
1608 | will cause an infinite loop and crash squid. Ensure that the smallest | |
1609 | non-zero value you use is greater that the maximum header size plus | |
1610 | the size of your largest error page. | |
1611 | ||
1612 | If you set this parameter none (the default), there will be | |
1613 | no limit imposed. | |
3bc32f2f AJ |
1614 | |
1615 | Configuration Format is: | |
1616 | reply_body_max_size SIZE UNITS [acl ...] | |
1617 | ie. | |
1618 | reply_body_max_size 10 MB | |
1619 | ||
5b0f5383 | 1620 | DOC_END |
1621 | ||
1622 | COMMENT_START | |
1623 | NETWORK OPTIONS | |
1624 | ----------------------------------------------------------------------------- | |
1625 | COMMENT_END | |
1626 | ||
1627 | NAME: http_port ascii_port | |
65d448bc | 1628 | TYPE: PortCfg |
5b0f5383 | 1629 | DEFAULT: none |
1630 | LOC: Config.Sockaddr.http | |
1631 | DOC_START | |
c7b1dd5d AJ |
1632 | Usage: port [mode] [options] |
1633 | hostname:port [mode] [options] | |
1634 | 1.2.3.4:port [mode] [options] | |
5b0f5383 | 1635 | |
1636 | The socket addresses where Squid will listen for HTTP client | |
1637 | requests. You may specify multiple socket addresses. | |
1638 | There are three forms: port alone, hostname with port, and | |
1639 | IP address with port. If you specify a hostname or IP | |
1640 | address, Squid binds the socket to that specific | |
c7b1dd5d | 1641 | address. Most likely, you do not need to bind to a specific |
5b0f5383 | 1642 | address, so you can use the port number alone. |
1643 | ||
1644 | If you are running Squid in accelerator mode, you | |
1645 | probably want to listen on port 80 also, or instead. | |
1646 | ||
1647 | The -a command line option may be used to specify additional | |
1648 | port(s) where Squid listens for proxy request. Such ports will | |
1649 | be plain proxy ports with no options. | |
1650 | ||
1651 | You may specify multiple socket addresses on multiple lines. | |
1652 | ||
c7b1dd5d | 1653 | Modes: |
5b0f5383 | 1654 | |
e77bdb4e | 1655 | intercept Support for IP-Layer interception of |
5b0f5383 | 1656 | outgoing requests without browser settings. |
13b5cd0c | 1657 | NP: disables authentication and IPv6 on the port. |
5b0f5383 | 1658 | |
1659 | tproxy Support Linux TPROXY for spoofing outgoing | |
1660 | connections using the client IP address. | |
6f05d9c8 | 1661 | NP: disables authentication and maybe IPv6 on the port. |
5b0f5383 | 1662 | |
7f45065d | 1663 | accel Accelerator / reverse proxy mode |
5b0f5383 | 1664 | |
caf3666d | 1665 | ssl-bump For each CONNECT request allowed by ssl_bump ACLs, |
c7b1dd5d | 1666 | establish secure connection with the client and with |
caf3666d | 1667 | the server, decrypt HTTPS messages as they pass through |
c7b1dd5d AJ |
1668 | Squid, and treat them as unencrypted HTTP messages, |
1669 | becoming the man-in-the-middle. | |
1670 | ||
7a957a93 | 1671 | The ssl_bump option is required to fully enable |
caf3666d | 1672 | bumping of CONNECT requests. |
c7b1dd5d AJ |
1673 | |
1674 | Omitting the mode flag causes default forward proxy mode to be used. | |
1675 | ||
1676 | ||
1677 | Accelerator Mode Options: | |
1678 | ||
5b0f5383 | 1679 | defaultsite=domainname |
1680 | What to use for the Host: header if it is not present | |
1681 | in a request. Determines what site (not origin server) | |
1682 | accelerators should consider the default. | |
5b0f5383 | 1683 | |
cf673853 | 1684 | no-vhost Disable using HTTP/1.1 Host header for virtual domain support. |
5b0f5383 | 1685 | |
a9f60805 AJ |
1686 | protocol= Protocol to reconstruct accelerated and intercepted |
1687 | requests with. Defaults to HTTP/1.1 for http_port and | |
1688 | HTTPS/1.1 for https_port. | |
1689 | When an unsupported value is configured Squid will | |
1690 | produce a FATAL error. | |
1691 | Values: HTTP or HTTP/1.1, HTTPS or HTTPS/1.1 | |
5b0f5383 | 1692 | |
cf673853 AJ |
1693 | vport Virtual host port support. Using the http_port number |
1694 | instead of the port passed on Host: headers. | |
5b0f5383 | 1695 | |
cf673853 AJ |
1696 | vport=NN Virtual host port support. Using the specified port |
1697 | number instead of the port passed on Host: headers. | |
5b0f5383 | 1698 | |
7f45065d HN |
1699 | act-as-origin |
1700 | Act as if this Squid is the origin server. | |
1701 | This currently means generate new Date: and Expires: | |
1702 | headers on HIT instead of adding Age:. | |
5b0f5383 | 1703 | |
432bc83c HN |
1704 | ignore-cc Ignore request Cache-Control headers. |
1705 | ||
7f45065d | 1706 | WARNING: This option violates HTTP specifications if |
432bc83c HN |
1707 | used in non-accelerator setups. |
1708 | ||
7f45065d HN |
1709 | allow-direct Allow direct forwarding in accelerator mode. Normally |
1710 | accelerated requests are denied direct forwarding as if | |
1711 | never_direct was used. | |
1712 | ||
1713 | WARNING: this option opens accelerator mode to security | |
1714 | vulnerabilities usually only affecting in interception | |
1715 | mode. Make sure to protect forwarding with suitable | |
1716 | http_access rules when using this. | |
1717 | ||
c7b1dd5d AJ |
1718 | |
1719 | SSL Bump Mode Options: | |
859741ed AJ |
1720 | In addition to these options ssl-bump requires TLS/SSL options. |
1721 | ||
1722 | generate-host-certificates[=<on|off>] | |
1723 | Dynamically create SSL server certificates for the | |
1724 | destination hosts of bumped CONNECT requests.When | |
1725 | enabled, the cert and key options are used to sign | |
1726 | generated certificates. Otherwise generated | |
1727 | certificate will be selfsigned. | |
1728 | If there is a CA certificate lifetime of the generated | |
1729 | certificate equals lifetime of the CA certificate. If | |
1730 | generated certificate is selfsigned lifetime is three | |
1731 | years. | |
1732 | This option is enabled by default when ssl-bump is used. | |
1733 | See the ssl-bump option above for more information. | |
1734 | ||
1735 | dynamic_cert_mem_cache_size=SIZE | |
1736 | Approximate total RAM size spent on cached generated | |
1737 | certificates. If set to zero, caching is disabled. The | |
23bb0ebf | 1738 | default value is 4MB. |
859741ed AJ |
1739 | |
1740 | TLS / SSL Options: | |
c7b1dd5d AJ |
1741 | |
1742 | cert= Path to SSL certificate (PEM format). | |
1743 | ||
1744 | key= Path to SSL private key file (PEM format) | |
1745 | if not specified, the certificate file is | |
1746 | assumed to be a combined certificate and | |
1747 | key file. | |
1748 | ||
1749 | version= The version of SSL/TLS supported | |
1750 | 1 automatic (default) | |
1751 | 2 SSLv2 only | |
1752 | 3 SSLv3 only | |
3d96b0e8 AJ |
1753 | 4 TLSv1.0 only |
1754 | 5 TLSv1.1 only | |
1755 | 6 TLSv1.2 only | |
c7b1dd5d AJ |
1756 | |
1757 | cipher= Colon separated list of supported ciphers. | |
bebdc6fb AJ |
1758 | NOTE: some ciphers such as EDH ciphers depend on |
1759 | additional settings. If those settings are | |
1760 | omitted the ciphers may be silently ignored | |
1761 | by the OpenSSL library. | |
c7b1dd5d | 1762 | |
943c5f16 | 1763 | options= Various SSL implementation options. The most important |
c7b1dd5d | 1764 | being: |
3d96b0e8 AJ |
1765 | NO_SSLv2 Disallow the use of SSLv2 |
1766 | NO_SSLv3 Disallow the use of SSLv3 | |
1767 | NO_TLSv1 Disallow the use of TLSv1.0 | |
1768 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
1769 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
c7b1dd5d AJ |
1770 | SINGLE_DH_USE Always create a new key when using |
1771 | temporary/ephemeral DH key exchanges | |
943c5f16 HN |
1772 | ALL Enable various bug workarounds |
1773 | suggested as "harmless" by OpenSSL | |
1774 | Be warned that this reduces SSL/TLS | |
1775 | strength to some attacks. | |
bebdc6fb AJ |
1776 | See OpenSSL SSL_CTX_set_options documentation for a |
1777 | complete list of options. | |
c7b1dd5d AJ |
1778 | |
1779 | clientca= File containing the list of CAs to use when | |
1780 | requesting a client certificate. | |
1781 | ||
1782 | cafile= File containing additional CA certificates to | |
1783 | use when verifying client certificates. If unset | |
1784 | clientca will be used. | |
1785 | ||
1786 | capath= Directory containing additional CA certificates | |
1787 | and CRL lists to use when verifying client certificates. | |
1788 | ||
1789 | crlfile= File of additional CRL lists to use when verifying | |
1790 | the client certificate, in addition to CRLs stored in | |
1791 | the capath. Implies VERIFY_CRL flag below. | |
1792 | ||
1793 | dhparams= File containing DH parameters for temporary/ephemeral | |
bebdc6fb AJ |
1794 | DH key exchanges. See OpenSSL documentation for details |
1795 | on how to create this file. | |
1796 | WARNING: EDH ciphers will be silently disabled if this | |
1797 | option is not set. | |
c7b1dd5d AJ |
1798 | |
1799 | sslflags= Various flags modifying the use of SSL: | |
1800 | DELAYED_AUTH | |
1801 | Don't request client certificates | |
1802 | immediately, but wait until acl processing | |
1803 | requires a certificate (not yet implemented). | |
1804 | NO_DEFAULT_CA | |
1805 | Don't use the default CA lists built in | |
1806 | to OpenSSL. | |
1807 | NO_SESSION_REUSE | |
1808 | Don't allow for session reuse. Each connection | |
1809 | will result in a new SSL session. | |
1810 | VERIFY_CRL | |
1811 | Verify CRL lists when accepting client | |
1812 | certificates. | |
1813 | VERIFY_CRL_ALL | |
1814 | Verify CRL lists for all certificates in the | |
1815 | client certificate chain. | |
1816 | ||
1817 | sslcontext= SSL session ID context identifier. | |
1818 | ||
c7b1dd5d AJ |
1819 | Other Options: |
1820 | ||
6b185b50 AJ |
1821 | connection-auth[=on|off] |
1822 | use connection-auth=off to tell Squid to prevent | |
1823 | forwarding Microsoft connection oriented authentication | |
d67acb4e AJ |
1824 | (NTLM, Negotiate and Kerberos) |
1825 | ||
5b0f5383 | 1826 | disable-pmtu-discovery= |
1827 | Control Path-MTU discovery usage: | |
1828 | off lets OS decide on what to do (default). | |
1829 | transparent disable PMTU discovery when transparent | |
1830 | support is enabled. | |
1831 | always disable always PMTU discovery. | |
1832 | ||
1833 | In many setups of transparently intercepting proxies | |
1834 | Path-MTU discovery can not work on traffic towards the | |
1835 | clients. This is the case when the intercepting device | |
1836 | does not fully track connections and fails to forward | |
1837 | ICMP must fragment messages to the cache server. If you | |
1838 | have such setup and experience that certain clients | |
1839 | sporadically hang or never complete requests set | |
1840 | disable-pmtu-discovery option to 'transparent'. | |
1841 | ||
81b6e9a7 | 1842 | name= Specifies a internal name for the port. Defaults to |
1843 | the port specification (port or addr:port) | |
1844 | ||
68924b6d | 1845 | tcpkeepalive[=idle,interval,timeout] |
fb6c6dbe AJ |
1846 | Enable TCP keepalive probes of idle connections. |
1847 | In seconds; idle is the initial time before TCP starts | |
1848 | probing the connection, interval how often to probe, and | |
b2130d58 | 1849 | timeout the time before giving up. |
1850 | ||
5b0f5383 | 1851 | If you run Squid on a dual-homed machine with an internal |
1852 | and an external interface we recommend you to specify the | |
1853 | internal address:port in http_port. This way Squid will only be | |
1854 | visible on the internal address. | |
1855 | ||
1856 | NOCOMMENT_START | |
e0855596 | 1857 | |
5b0f5383 | 1858 | # Squid normally listens to port 3128 |
1859 | http_port @DEFAULT_HTTP_PORT@ | |
1860 | NOCOMMENT_END | |
1861 | DOC_END | |
1862 | ||
1863 | NAME: https_port | |
cb4f4424 | 1864 | IFDEF: USE_OPENSSL |
65d448bc | 1865 | TYPE: PortCfg |
5b0f5383 | 1866 | DEFAULT: none |
1867 | LOC: Config.Sockaddr.https | |
1868 | DOC_START | |
7f45065d | 1869 | Usage: [ip:]port cert=certificate.pem [key=key.pem] [mode] [options...] |
5b0f5383 | 1870 | |
859741ed AJ |
1871 | The socket address where Squid will listen for client requests made |
1872 | over TLS or SSL connections. Commonly referred to as HTTPS. | |
5b0f5383 | 1873 | |
859741ed AJ |
1874 | This is most useful for situations where you are running squid in |
1875 | accelerator mode and you want to do the SSL work at the accelerator level. | |
5b0f5383 | 1876 | |
1877 | You may specify multiple socket addresses on multiple lines, | |
1878 | each with their own SSL certificate and/or options. | |
1879 | ||
7f45065d | 1880 | Modes: |
5b0f5383 | 1881 | |
7f45065d | 1882 | accel Accelerator / reverse proxy mode |
5b0f5383 | 1883 | |
38450a50 CT |
1884 | intercept Support for IP-Layer interception of |
1885 | outgoing requests without browser settings. | |
1886 | NP: disables authentication and IPv6 on the port. | |
1887 | ||
379e8c1c AR |
1888 | tproxy Support Linux TPROXY for spoofing outgoing |
1889 | connections using the client IP address. | |
1890 | NP: disables authentication and maybe IPv6 on the port. | |
1891 | ||
caf3666d | 1892 | ssl-bump For each intercepted connection allowed by ssl_bump |
7a957a93 | 1893 | ACLs, establish a secure connection with the client and with |
caf3666d | 1894 | the server, decrypt HTTPS messages as they pass through |
379e8c1c AR |
1895 | Squid, and treat them as unencrypted HTTP messages, |
1896 | becoming the man-in-the-middle. | |
1897 | ||
caf3666d AR |
1898 | An "ssl_bump server-first" match is required to |
1899 | fully enable bumping of intercepted SSL connections. | |
379e8c1c | 1900 | |
38450a50 | 1901 | Requires tproxy or intercept. |
379e8c1c | 1902 | |
7f45065d | 1903 | Omitting the mode flag causes default forward proxy mode to be used. |
5b0f5383 | 1904 | |
5b0f5383 | 1905 | |
7f45065d HN |
1906 | See http_port for a list of generic options |
1907 | ||
1908 | ||
1909 | SSL Options: | |
5b0f5383 | 1910 | |
1911 | cert= Path to SSL certificate (PEM format). | |
1912 | ||
1913 | key= Path to SSL private key file (PEM format) | |
1914 | if not specified, the certificate file is | |
1915 | assumed to be a combined certificate and | |
1916 | key file. | |
1917 | ||
1918 | version= The version of SSL/TLS supported | |
1919 | 1 automatic (default) | |
1920 | 2 SSLv2 only | |
1921 | 3 SSLv3 only | |
1922 | 4 TLSv1 only | |
1923 | ||
1924 | cipher= Colon separated list of supported ciphers. | |
1925 | ||
1926 | options= Various SSL engine options. The most important | |
1927 | being: | |
1928 | NO_SSLv2 Disallow the use of SSLv2 | |
1929 | NO_SSLv3 Disallow the use of SSLv3 | |
1930 | NO_TLSv1 Disallow the use of TLSv1 | |
1931 | SINGLE_DH_USE Always create a new key when using | |
1932 | temporary/ephemeral DH key exchanges | |
1933 | See src/ssl_support.c or OpenSSL SSL_CTX_set_options | |
1934 | documentation for a complete list of options. | |
1935 | ||
1936 | clientca= File containing the list of CAs to use when | |
1937 | requesting a client certificate. | |
1938 | ||
1939 | cafile= File containing additional CA certificates to | |
1940 | use when verifying client certificates. If unset | |
1941 | clientca will be used. | |
1942 | ||
1943 | capath= Directory containing additional CA certificates | |
1944 | and CRL lists to use when verifying client certificates. | |
1945 | ||
1946 | crlfile= File of additional CRL lists to use when verifying | |
1947 | the client certificate, in addition to CRLs stored in | |
1948 | the capath. Implies VERIFY_CRL flag below. | |
1949 | ||
1950 | dhparams= File containing DH parameters for temporary/ephemeral | |
1951 | DH key exchanges. | |
1952 | ||
1953 | sslflags= Various flags modifying the use of SSL: | |
1954 | DELAYED_AUTH | |
1955 | Don't request client certificates | |
1956 | immediately, but wait until acl processing | |
1957 | requires a certificate (not yet implemented). | |
1958 | NO_DEFAULT_CA | |
1959 | Don't use the default CA lists built in | |
1960 | to OpenSSL. | |
1961 | NO_SESSION_REUSE | |
1962 | Don't allow for session reuse. Each connection | |
1963 | will result in a new SSL session. | |
1964 | VERIFY_CRL | |
1965 | Verify CRL lists when accepting client | |
1966 | certificates. | |
1967 | VERIFY_CRL_ALL | |
1968 | Verify CRL lists for all certificates in the | |
1969 | client certificate chain. | |
1970 | ||
1971 | sslcontext= SSL session ID context identifier. | |
1972 | ||
379e8c1c AR |
1973 | generate-host-certificates[=<on|off>] |
1974 | Dynamically create SSL server certificates for the | |
1975 | destination hosts of bumped SSL requests.When | |
1976 | enabled, the cert and key options are used to sign | |
1977 | generated certificates. Otherwise generated | |
1978 | certificate will be selfsigned. | |
1979 | If there is CA certificate life time of generated | |
1980 | certificate equals lifetime of CA certificate. If | |
1981 | generated certificate is selfsigned lifetime is three | |
1982 | years. | |
1983 | This option is enabled by default when SslBump is used. | |
1984 | See the sslBump option above for more information. | |
1985 | ||
1986 | dynamic_cert_mem_cache_size=SIZE | |
1987 | Approximate total RAM size spent on cached generated | |
1988 | certificates. If set to zero, caching is disabled. The | |
23bb0ebf | 1989 | default value is 4MB. |
379e8c1c | 1990 | |
859741ed | 1991 | See http_port for a list of available options. |
5b0f5383 | 1992 | DOC_END |
1993 | ||
41bd17a4 | 1994 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp |
1995 | TYPE: acl_tos | |
5473c134 | 1996 | DEFAULT: none |
425de4c8 | 1997 | LOC: Ip::Qos::TheConfig.tosToServer |
5473c134 | 1998 | DOC_START |
425de4c8 AJ |
1999 | Allows you to select a TOS/Diffserv value for packets outgoing |
2000 | on the server side, based on an ACL. | |
5473c134 | 2001 | |
41bd17a4 | 2002 | tcp_outgoing_tos ds-field [!]aclname ... |
cccac0a2 | 2003 | |
41bd17a4 | 2004 | Example where normal_service_net uses the TOS value 0x00 |
7def7206 | 2005 | and good_service_net uses 0x20 |
cccac0a2 | 2006 | |
864a62b5 AJ |
2007 | acl normal_service_net src 10.0.0.0/24 |
2008 | acl good_service_net src 10.0.1.0/24 | |
2c73de90 | 2009 | tcp_outgoing_tos 0x00 normal_service_net |
41bd17a4 | 2010 | tcp_outgoing_tos 0x20 good_service_net |
fa38076e | 2011 | |
41bd17a4 | 2012 | TOS/DSCP values really only have local significance - so you should |
575cb927 AJ |
2013 | know what you're specifying. For more information, see RFC2474, |
2014 | RFC2475, and RFC3260. | |
cccac0a2 | 2015 | |
41bd17a4 | 2016 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or |
2017 | "default" to use whatever default your host has. Note that in | |
864a62b5 AJ |
2018 | practice often only multiples of 4 is usable as the two rightmost bits |
2019 | have been redefined for use by ECN (RFC 3168 section 23.1). | |
cccac0a2 | 2020 | |
41bd17a4 | 2021 | Processing proceeds in the order specified, and stops at first fully |
2022 | matching line. | |
cccac0a2 | 2023 | DOC_END |
2024 | ||
41bd17a4 | 2025 | NAME: clientside_tos |
2026 | TYPE: acl_tos | |
cccac0a2 | 2027 | DEFAULT: none |
425de4c8 AJ |
2028 | LOC: Ip::Qos::TheConfig.tosToClient |
2029 | DOC_START | |
2030 | Allows you to select a TOS/Diffserv value for packets being transmitted | |
2031 | on the client-side, based on an ACL. | |
2032 | ||
2033 | clientside_tos ds-field [!]aclname ... | |
2034 | ||
2035 | Example where normal_service_net uses the TOS value 0x00 | |
2036 | and good_service_net uses 0x20 | |
2037 | ||
2038 | acl normal_service_net src 10.0.0.0/24 | |
2039 | acl good_service_net src 10.0.1.0/24 | |
2040 | clientside_tos 0x00 normal_service_net | |
2041 | clientside_tos 0x20 good_service_net | |
2042 | ||
2043 | Note: This feature is incompatible with qos_flows. Any TOS values set here | |
2044 | will be overwritten by TOS values in qos_flows. | |
2045 | DOC_END | |
2046 | ||
2047 | NAME: tcp_outgoing_mark | |
2048 | TYPE: acl_nfmark | |
11e8cfe3 | 2049 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2050 | DEFAULT: none |
2051 | LOC: Ip::Qos::TheConfig.nfmarkToServer | |
2052 | DOC_START | |
2053 | Allows you to apply a Netfilter mark value to outgoing packets | |
2054 | on the server side, based on an ACL. | |
2055 | ||
2056 | tcp_outgoing_mark mark-value [!]aclname ... | |
2057 | ||
2058 | Example where normal_service_net uses the mark value 0x00 | |
2059 | and good_service_net uses 0x20 | |
2060 | ||
2061 | acl normal_service_net src 10.0.0.0/24 | |
2062 | acl good_service_net src 10.0.1.0/24 | |
2063 | tcp_outgoing_mark 0x00 normal_service_net | |
2064 | tcp_outgoing_mark 0x20 good_service_net | |
2065 | DOC_END | |
2066 | ||
2067 | NAME: clientside_mark | |
2068 | TYPE: acl_nfmark | |
11e8cfe3 | 2069 | IFDEF: SO_MARK&&USE_LIBCAP |
425de4c8 AJ |
2070 | DEFAULT: none |
2071 | LOC: Ip::Qos::TheConfig.nfmarkToClient | |
cccac0a2 | 2072 | DOC_START |
425de4c8 AJ |
2073 | Allows you to apply a Netfilter mark value to packets being transmitted |
2074 | on the client-side, based on an ACL. | |
2075 | ||
2076 | clientside_mark mark-value [!]aclname ... | |
2077 | ||
2078 | Example where normal_service_net uses the mark value 0x00 | |
2079 | and good_service_net uses 0x20 | |
2080 | ||
2081 | acl normal_service_net src 10.0.0.0/24 | |
2082 | acl good_service_net src 10.0.1.0/24 | |
2083 | clientside_mark 0x00 normal_service_net | |
2084 | clientside_mark 0x20 good_service_net | |
2085 | ||
2086 | Note: This feature is incompatible with qos_flows. Any mark values set here | |
2087 | will be overwritten by mark values in qos_flows. | |
41bd17a4 | 2088 | DOC_END |
cccac0a2 | 2089 | |
575cb927 AJ |
2090 | NAME: qos_flows |
2091 | TYPE: QosConfig | |
425de4c8 | 2092 | IFDEF: USE_QOS_TOS |
575cb927 | 2093 | DEFAULT: none |
b7ac5457 | 2094 | LOC: Ip::Qos::TheConfig |
7172612f | 2095 | DOC_START |
575cb927 | 2096 | Allows you to select a TOS/DSCP value to mark outgoing |
196a7776 AB |
2097 | connections to the client, based on where the reply was sourced. |
2098 | For platforms using netfilter, allows you to set a netfilter mark | |
425de4c8 | 2099 | value instead of, or in addition to, a TOS value. |
7172612f | 2100 | |
196a7776 AB |
2101 | By default this functionality is disabled. To enable it with the default |
2102 | settings simply use "qos_flows mark" or "qos_flows tos". Default | |
2103 | settings will result in the netfilter mark or TOS value being copied | |
2104 | from the upstream connection to the client. Note that it is the connection | |
2105 | CONNMARK value not the packet MARK value that is copied. | |
2106 | ||
2107 | It is not currently possible to copy the mark or TOS value from the | |
2108 | client to the upstream connection request. | |
2109 | ||
575cb927 AJ |
2110 | TOS values really only have local significance - so you should |
2111 | know what you're specifying. For more information, see RFC2474, | |
2112 | RFC2475, and RFC3260. | |
7172612f | 2113 | |
425de4c8 AJ |
2114 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255. Note that |
2115 | in practice often only multiples of 4 is usable as the two rightmost bits | |
2116 | have been redefined for use by ECN (RFC 3168 section 23.1). | |
2117 | ||
2118 | Mark values can be any unsigned 32-bit integer value. | |
7172612f | 2119 | |
425de4c8 AJ |
2120 | This setting is configured by setting the following values: |
2121 | ||
2122 | tos|mark Whether to set TOS or netfilter mark values | |
575cb927 AJ |
2123 | |
2124 | local-hit=0xFF Value to mark local cache hits. | |
2125 | ||
2126 | sibling-hit=0xFF Value to mark hits from sibling peers. | |
2127 | ||
2128 | parent-hit=0xFF Value to mark hits from parent peers. | |
2129 | ||
a29d2a95 AB |
2130 | miss=0xFF[/mask] Value to mark cache misses. Takes precedence |
2131 | over the preserve-miss feature (see below), unless | |
2132 | mask is specified, in which case only the bits | |
2133 | specified in the mask are written. | |
575cb927 | 2134 | |
425de4c8 AJ |
2135 | The TOS variant of the following features are only possible on Linux |
2136 | and require your kernel to be patched with the TOS preserving ZPH | |
2137 | patch, available from http://zph.bratcheda.org | |
2138 | No patch is needed to preserve the netfilter mark, which will work | |
2139 | with all variants of netfilter. | |
575cb927 | 2140 | |
575cb927 | 2141 | disable-preserve-miss |
425de4c8 AJ |
2142 | This option disables the preservation of the TOS or netfilter |
2143 | mark. By default, the existing TOS or netfilter mark value of | |
2144 | the response coming from the remote server will be retained | |
2145 | and masked with miss-mark. | |
2146 | NOTE: in the case of a netfilter mark, the mark must be set on | |
2147 | the connection (using the CONNMARK target) not on the packet | |
2148 | (MARK target). | |
575cb927 AJ |
2149 | |
2150 | miss-mask=0xFF | |
425de4c8 AJ |
2151 | Allows you to mask certain bits in the TOS or mark value |
2152 | received from the remote server, before copying the value to | |
2153 | the TOS sent towards clients. | |
2154 | Default for tos: 0xFF (TOS from server is not changed). | |
2155 | Default for mark: 0xFFFFFFFF (mark from server is not changed). | |
2156 | ||
2157 | All of these features require the --enable-zph-qos compilation flag | |
2158 | (enabled by default). Netfilter marking also requires the | |
2159 | libnetfilter_conntrack libraries (--with-netfilter-conntrack) and | |
2160 | libcap 2.09+ (--with-libcap). | |
7172612f | 2161 | |
7172612f AJ |
2162 | DOC_END |
2163 | ||
41bd17a4 | 2164 | NAME: tcp_outgoing_address |
2165 | TYPE: acl_address | |
2166 | DEFAULT: none | |
638402dd | 2167 | DEFAULT_DOC: Address selection is performed by the operating system. |
41bd17a4 | 2168 | LOC: Config.accessList.outgoing_address |
2169 | DOC_START | |
2170 | Allows you to map requests to different outgoing IP addresses | |
2171 | based on the username or source address of the user making | |
2172 | the request. | |
7f7db318 | 2173 | |
41bd17a4 | 2174 | tcp_outgoing_address ipaddr [[!]aclname] ... |
c33aa074 | 2175 | |
2dd51400 AJ |
2176 | For example; |
2177 | Forwarding clients with dedicated IPs for certain subnets. | |
9197cd13 | 2178 | |
2dd51400 AJ |
2179 | acl normal_service_net src 10.0.0.0/24 |
2180 | acl good_service_net src 10.0.2.0/24 | |
2181 | ||
2182 | tcp_outgoing_address 2001:db8::c001 good_service_net | |
2183 | tcp_outgoing_address 10.1.0.2 good_service_net | |
2184 | ||
2185 | tcp_outgoing_address 2001:db8::beef normal_service_net | |
2186 | tcp_outgoing_address 10.1.0.1 normal_service_net | |
2187 | ||
2188 | tcp_outgoing_address 2001:db8::1 | |
2189 | tcp_outgoing_address 10.1.0.3 | |
9197cd13 | 2190 | |
41bd17a4 | 2191 | Processing proceeds in the order specified, and stops at first fully |
2192 | matching line. | |
cccac0a2 | 2193 | |
2dd51400 AJ |
2194 | Squid will add an implicit IP version test to each line. |
2195 | Requests going to IPv4 websites will use the outgoing 10.1.0.* addresses. | |
2196 | Requests going to IPv6 websites will use the outgoing 2001:db8:* addresses. | |
2197 | ||
2198 | ||
2199 | NOTE: The use of this directive using client dependent ACLs is | |
41bd17a4 | 2200 | incompatible with the use of server side persistent connections. To |
2201 | ensure correct results it is best to set server_persistent_connections | |
2202 | to off when using this directive in such configurations. | |
cc192b50 | 2203 | |
2dd51400 | 2204 | NOTE: The use of this directive to set a local IP on outgoing TCP links |
4ed968be | 2205 | is incompatible with using TPROXY to set client IP out outbound TCP links. |
2dd51400 AJ |
2206 | When needing to contact peers use the no-tproxy cache_peer option and the |
2207 | client_dst_passthru directive re-enable normal forwarding such as this. | |
cc192b50 | 2208 | |
cccac0a2 | 2209 | DOC_END |
6db78a1a | 2210 | |
90529125 AJ |
2211 | NAME: host_verify_strict |
2212 | TYPE: onoff | |
2213 | DEFAULT: off | |
2214 | LOC: Config.onoff.hostStrictVerify | |
2215 | DOC_START | |
d8821934 AR |
2216 | Regardless of this option setting, when dealing with intercepted |
2217 | traffic, Squid always verifies that the destination IP address matches | |
2962f8b8 | 2218 | the Host header domain or IP (called 'authority form URL'). |
d8821934 AR |
2219 | |
2220 | This enforcement is performed to satisfy a MUST-level requirement in | |
2221 | RFC 2616 section 14.23: "The Host field value MUST represent the naming | |
2222 | authority of the origin server or gateway given by the original URL". | |
2962f8b8 AJ |
2223 | |
2224 | When set to ON: | |
2225 | Squid always responds with an HTTP 409 (Conflict) error | |
2226 | page and logs a security warning if there is no match. | |
2227 | ||
2228 | Squid verifies that the destination IP address matches | |
2229 | the Host header for forward-proxy and reverse-proxy traffic | |
2230 | as well. For those traffic types, Squid also enables the | |
2231 | following checks, comparing the corresponding Host header | |
2232 | and Request-URI components: | |
2233 | ||
2234 | * The host names (domain or IP) must be identical, | |
2235 | but valueless or missing Host header disables all checks. | |
2236 | For the two host names to match, both must be either IP | |
2237 | or FQDN. | |
2238 | ||
2239 | * Port numbers must be identical, but if a port is missing | |
2240 | the scheme-default port is assumed. | |
2241 | ||
2242 | ||
2243 | When set to OFF (the default): | |
2244 | Squid allows suspicious requests to continue but logs a | |
2245 | security warning and blocks caching of the response. | |
2246 | ||
2247 | * Forward-proxy traffic is not checked at all. | |
2248 | ||
2249 | * Reverse-proxy traffic is not checked at all. | |
2250 | ||
2251 | * Intercepted traffic which passes verification is handled | |
32c32865 | 2252 | according to client_dst_passthru. |
2962f8b8 | 2253 | |
7177edfb AJ |
2254 | * Intercepted requests which fail verification are sent |
2255 | to the client original destination instead of DIRECT. | |
2256 | This overrides 'client_dst_passthru off'. | |
2962f8b8 AJ |
2257 | |
2258 | For now suspicious intercepted CONNECT requests are always | |
2259 | responded to with an HTTP 409 (Conflict) error page. | |
bfe4e2fe | 2260 | |
bfe4e2fe | 2261 | |
7177edfb | 2262 | SECURITY NOTE: |
bfe4e2fe AJ |
2263 | |
2264 | As described in CVE-2009-0801 when the Host: header alone is used | |
2265 | to determine the destination of a request it becomes trivial for | |
2266 | malicious scripts on remote websites to bypass browser same-origin | |
2267 | security policy and sandboxing protections. | |
2268 | ||
2269 | The cause of this is that such applets are allowed to perform their | |
2270 | own HTTP stack, in which case the same-origin policy of the browser | |
2271 | sandbox only verifies that the applet tries to contact the same IP | |
2272 | as from where it was loaded at the IP level. The Host: header may | |
2273 | be different from the connected IP and approved origin. | |
7177edfb AJ |
2274 | |
2275 | DOC_END | |
6b185b50 | 2276 | |
7177edfb AJ |
2277 | NAME: client_dst_passthru |
2278 | TYPE: onoff | |
2279 | DEFAULT: on | |
2280 | LOC: Config.onoff.client_dst_passthru | |
2281 | DOC_START | |
2282 | With NAT or TPROXY intercepted traffic Squid may pass the request | |
2283 | directly to the original client destination IP or seek a faster | |
2284 | source using the HTTP Host header. | |
2285 | ||
2286 | Using Host to locate alternative servers can provide faster | |
2287 | connectivity with a range of failure recovery options. | |
2288 | But can also lead to connectivity trouble when the client and | |
2289 | server are attempting stateful interactions unaware of the proxy. | |
2290 | ||
2291 | This option (on by default) prevents alternative DNS entries being | |
2292 | located to send intercepted traffic DIRECT to an origin server. | |
2293 | The clients original destination IP and port will be used instead. | |
2294 | ||
2295 | Regardless of this option setting, when dealing with intercepted | |
2296 | traffic Squid will verify the Host: header and any traffic which | |
2297 | fails Host verification will be treated as if this option were ON. | |
2298 | ||
2299 | see host_verify_strict for details on the verification process. | |
cccac0a2 | 2300 | DOC_END |
2301 | ||
41bd17a4 | 2302 | COMMENT_START |
2303 | SSL OPTIONS | |
2304 | ----------------------------------------------------------------------------- | |
2305 | COMMENT_END | |
2306 | ||
2307 | NAME: ssl_unclean_shutdown | |
cb4f4424 | 2308 | IFDEF: USE_OPENSSL |
cccac0a2 | 2309 | TYPE: onoff |
2310 | DEFAULT: off | |
41bd17a4 | 2311 | LOC: Config.SSL.unclean_shutdown |
cccac0a2 | 2312 | DOC_START |
41bd17a4 | 2313 | Some browsers (especially MSIE) bugs out on SSL shutdown |
2314 | messages. | |
cccac0a2 | 2315 | DOC_END |
2316 | ||
41bd17a4 | 2317 | NAME: ssl_engine |
cb4f4424 | 2318 | IFDEF: USE_OPENSSL |
cccac0a2 | 2319 | TYPE: string |
41bd17a4 | 2320 | LOC: Config.SSL.ssl_engine |
2321 | DEFAULT: none | |
cccac0a2 | 2322 | DOC_START |
41bd17a4 | 2323 | The OpenSSL engine to use. You will need to set this if you |
2324 | would like to use hardware SSL acceleration for example. | |
cccac0a2 | 2325 | DOC_END |
2326 | ||
41bd17a4 | 2327 | NAME: sslproxy_client_certificate |
cb4f4424 | 2328 | IFDEF: USE_OPENSSL |
cccac0a2 | 2329 | DEFAULT: none |
41bd17a4 | 2330 | LOC: Config.ssl_client.cert |
2331 | TYPE: string | |
cccac0a2 | 2332 | DOC_START |
41bd17a4 | 2333 | Client SSL Certificate to use when proxying https:// URLs |
cccac0a2 | 2334 | DOC_END |
2335 | ||
41bd17a4 | 2336 | NAME: sslproxy_client_key |
cb4f4424 | 2337 | IFDEF: USE_OPENSSL |
cccac0a2 | 2338 | DEFAULT: none |
41bd17a4 | 2339 | LOC: Config.ssl_client.key |
2340 | TYPE: string | |
cccac0a2 | 2341 | DOC_START |
41bd17a4 | 2342 | Client SSL Key to use when proxying https:// URLs |
cccac0a2 | 2343 | DOC_END |
2344 | ||
41bd17a4 | 2345 | NAME: sslproxy_version |
cb4f4424 | 2346 | IFDEF: USE_OPENSSL |
41bd17a4 | 2347 | DEFAULT: 1 |
638402dd | 2348 | DEFAULT_DOC: automatic SSL/TLS version negotiation |
41bd17a4 | 2349 | LOC: Config.ssl_client.version |
2350 | TYPE: int | |
cccac0a2 | 2351 | DOC_START |
41bd17a4 | 2352 | SSL version level to use when proxying https:// URLs |
3d96b0e8 AJ |
2353 | |
2354 | The versions of SSL/TLS supported: | |
2355 | ||
2356 | 1 automatic (default) | |
2357 | 2 SSLv2 only | |
2358 | 3 SSLv3 only | |
2359 | 4 TLSv1.0 only | |
2360 | 5 TLSv1.1 only | |
2361 | 6 TLSv1.2 only | |
cccac0a2 | 2362 | DOC_END |
2363 | ||
41bd17a4 | 2364 | NAME: sslproxy_options |
cb4f4424 | 2365 | IFDEF: USE_OPENSSL |
41bd17a4 | 2366 | DEFAULT: none |
2367 | LOC: Config.ssl_client.options | |
2368 | TYPE: string | |
cccac0a2 | 2369 | DOC_START |
943c5f16 | 2370 | SSL implementation options to use when proxying https:// URLs |
ab202e4c AJ |
2371 | |
2372 | The most important being: | |
2373 | ||
3d96b0e8 AJ |
2374 | NO_SSLv2 Disallow the use of SSLv2 |
2375 | NO_SSLv3 Disallow the use of SSLv3 | |
2376 | NO_TLSv1 Disallow the use of TLSv1.0 | |
2377 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
2378 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
943c5f16 HN |
2379 | SINGLE_DH_USE |
2380 | Always create a new key when using temporary/ephemeral | |
2381 | DH key exchanges | |
2382 | SSL_OP_NO_TICKET | |
2383 | Disable use of RFC5077 session tickets. Some servers | |
2384 | may have problems understanding the TLS extension due | |
2385 | to ambiguous specification in RFC4507. | |
2386 | ALL Enable various bug workarounds suggested as "harmless" | |
2387 | by OpenSSL. Be warned that this may reduce SSL/TLS | |
2388 | strength to some attacks. | |
ab202e4c | 2389 | |
ab202e4c AJ |
2390 | See the OpenSSL SSL_CTX_set_options documentation for a |
2391 | complete list of possible options. | |
cccac0a2 | 2392 | DOC_END |
2393 | ||
41bd17a4 | 2394 | NAME: sslproxy_cipher |
cb4f4424 | 2395 | IFDEF: USE_OPENSSL |
41bd17a4 | 2396 | DEFAULT: none |
2397 | LOC: Config.ssl_client.cipher | |
2398 | TYPE: string | |
cccac0a2 | 2399 | DOC_START |
41bd17a4 | 2400 | SSL cipher list to use when proxying https:// URLs |
ab202e4c AJ |
2401 | |
2402 | Colon separated list of supported ciphers. | |
cccac0a2 | 2403 | DOC_END |
2404 | ||
41bd17a4 | 2405 | NAME: sslproxy_cafile |
cb4f4424 | 2406 | IFDEF: USE_OPENSSL |
41bd17a4 | 2407 | DEFAULT: none |
2408 | LOC: Config.ssl_client.cafile | |
2409 | TYPE: string | |
cccac0a2 | 2410 | DOC_START |
41bd17a4 | 2411 | file containing CA certificates to use when verifying server |
2412 | certificates while proxying https:// URLs | |
cccac0a2 | 2413 | DOC_END |
0976f8db | 2414 | |
41bd17a4 | 2415 | NAME: sslproxy_capath |
cb4f4424 | 2416 | IFDEF: USE_OPENSSL |
5473c134 | 2417 | DEFAULT: none |
41bd17a4 | 2418 | LOC: Config.ssl_client.capath |
2419 | TYPE: string | |
5473c134 | 2420 | DOC_START |
41bd17a4 | 2421 | directory containing CA certificates to use when verifying |
2422 | server certificates while proxying https:// URLs | |
5473c134 | 2423 | DOC_END |
2424 | ||
10a69fc0 | 2425 | NAME: sslproxy_session_ttl |
cb4f4424 | 2426 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
2427 | DEFAULT: 300 |
2428 | LOC: Config.SSL.session_ttl | |
2429 | TYPE: int | |
2430 | DOC_START | |
2431 | Sets the timeout value for SSL sessions | |
2432 | DOC_END | |
2433 | ||
2434 | NAME: sslproxy_session_cache_size | |
cb4f4424 | 2435 | IFDEF: USE_OPENSSL |
10a69fc0 CT |
2436 | DEFAULT: 2 MB |
2437 | LOC: Config.SSL.sessionCacheSize | |
2438 | TYPE: b_size_t | |
2439 | DOC_START | |
2440 | Sets the cache size to use for ssl session | |
2441 | DOC_END | |
2442 | ||
4c9da963 | 2443 | NAME: ssl_bump |
cb4f4424 | 2444 | IFDEF: USE_OPENSSL |
caf3666d | 2445 | TYPE: sslproxy_ssl_bump |
4c9da963 | 2446 | LOC: Config.accessList.ssl_bump |
8f165829 | 2447 | DEFAULT_DOC: Become a TCP tunnel without decrypting proxied traffic. |
4c9da963 | 2448 | DEFAULT: none |
2449 | DOC_START | |
caf3666d AR |
2450 | This option is consulted when a CONNECT request is received on |
2451 | an http_port (or a new connection is intercepted at an | |
2452 | https_port), provided that port was configured with an ssl-bump | |
2453 | flag. The subsequent data on the connection is either treated as | |
2454 | HTTPS and decrypted OR tunneled at TCP level without decryption, | |
8f165829 AR |
2455 | depending on the first matching bumping "action". |
2456 | ||
2457 | ssl_bump <action> [!]acl ... | |
caf3666d | 2458 | |
8f165829 | 2459 | The following bumping actions are currently supported: |
caf3666d | 2460 | |
5d65362c | 2461 | splice |
8f165829 AR |
2462 | Become a TCP tunnel without decrypting proxied traffic. |
2463 | This is the default action. | |
5d65362c CT |
2464 | |
2465 | bump | |
2466 | Establish a secure connection with the server and, using a | |
2467 | mimicked server certificate, with the client. | |
2468 | ||
2469 | peek | |
8f165829 AR |
2470 | Receive client (step SslBump1) or server (step SslBump2) |
2471 | certificate while preserving the possibility of splicing the | |
2472 | connection. Peeking at the server certificate (during step 2) | |
2473 | usually precludes bumping of the connection at step 3. | |
5d65362c CT |
2474 | |
2475 | stare | |
8f165829 AR |
2476 | Receive client (step SslBump1) or server (step SslBump2) |
2477 | certificate while preserving the possibility of bumping the | |
2478 | connection. Staring at the server certificate (during step 2) | |
2479 | usually precludes splicing of the connection at step 3. | |
5d65362c CT |
2480 | |
2481 | terminate | |
2482 | Close client and server connections. | |
2483 | ||
8f165829 | 2484 | Backward compatibility actions available at step SslBump1: |
caf3666d AR |
2485 | |
2486 | client-first | |
8f165829 AR |
2487 | Bump the connection. Establish a secure connection with the |
2488 | client first, then connect to the server. This old mode does | |
2489 | not allow Squid to mimic server SSL certificate and does not | |
2490 | work with intercepted SSL connections. | |
caf3666d AR |
2491 | |
2492 | server-first | |
8f165829 AR |
2493 | Bump the connection. Establish a secure connection with the |
2494 | server first, then establish a secure connection with the | |
2495 | client, using a mimicked server certificate. Works with both | |
2496 | CONNECT requests and intercepted SSL connections, but does | |
2497 | not allow to make decisions based on SSL handshake info. | |
2498 | ||
2499 | peek-and-splice | |
2500 | Decide whether to bump or splice the connection based on | |
d620ae0e | 2501 | client-to-squid and server-to-squid SSL hello messages. |
8f165829 | 2502 | XXX: Remove. |
d620ae0e | 2503 | |
caf3666d | 2504 | none |
8f165829 | 2505 | Same as the "splice" action. |
caf3666d | 2506 | |
8f165829 AR |
2507 | All ssl_bump rules are evaluated at each of the supported bumping |
2508 | steps. Rules with actions that are impossible at the current step are | |
2509 | ignored. The first matching ssl_bump action wins and is applied at the | |
2510 | end of the current step. If no rules match, the splice action is used. | |
652fcffd | 2511 | See the at_step ACL for a list of the supported SslBump steps. |
4c9da963 | 2512 | |
e0c0d54c | 2513 | This clause supports both fast and slow acl types. |
b3567eb5 | 2514 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. |
e0855596 | 2515 | |
652fcffd | 2516 | See also: http_port ssl-bump, https_port ssl-bump, and acl at_step. |
caf3666d | 2517 | |
e0855596 | 2518 | |
caf3666d | 2519 | # Example: Bump all requests except those originating from |
638402dd | 2520 | # localhost or those going to example.com. |
e0855596 | 2521 | |
e0855596 | 2522 | acl broken_sites dstdomain .example.com |
8f165829 AR |
2523 | ssl_bump splice localhost |
2524 | ssl_bump splice broken_sites | |
2525 | ssl_bump bump all | |
4c9da963 | 2526 | DOC_END |
2527 | ||
41bd17a4 | 2528 | NAME: sslproxy_flags |
cb4f4424 | 2529 | IFDEF: USE_OPENSSL |
41bd17a4 | 2530 | DEFAULT: none |
2531 | LOC: Config.ssl_client.flags | |
2532 | TYPE: string | |
5473c134 | 2533 | DOC_START |
41bd17a4 | 2534 | Various flags modifying the use of SSL while proxying https:// URLs: |
4c9da963 | 2535 | DONT_VERIFY_PEER Accept certificates that fail verification. |
2536 | For refined control, see sslproxy_cert_error. | |
41bd17a4 | 2537 | NO_DEFAULT_CA Don't use the default CA list built in |
2538 | to OpenSSL. | |
5473c134 | 2539 | DOC_END |
2540 | ||
4c9da963 | 2541 | NAME: sslproxy_cert_error |
cb4f4424 | 2542 | IFDEF: USE_OPENSSL |
4c9da963 | 2543 | DEFAULT: none |
638402dd | 2544 | DEFAULT_DOC: Server certificate errors terminate the transaction. |
4c9da963 | 2545 | LOC: Config.ssl_client.cert_error |
2546 | TYPE: acl_access | |
2547 | DOC_START | |
2548 | Use this ACL to bypass server certificate validation errors. | |
2549 | ||
2550 | For example, the following lines will bypass all validation errors | |
3b8f558c | 2551 | when talking to servers for example.com. All other |
4c9da963 | 2552 | validation errors will result in ERR_SECURE_CONNECT_FAIL error. |
2553 | ||
a87bfd3b AR |
2554 | acl BrokenButTrustedServers dstdomain example.com |
2555 | sslproxy_cert_error allow BrokenButTrustedServers | |
4c9da963 | 2556 | sslproxy_cert_error deny all |
2557 | ||
b3567eb5 FC |
2558 | This clause only supports fast acl types. |
2559 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
2560 | Using slow acl types may result in server crashes | |
4c9da963 | 2561 | |
2562 | Without this option, all server certificate validation errors | |
638402dd | 2563 | terminate the transaction to protect Squid and the client. |
4c9da963 | 2564 | |
0ad3ff51 CT |
2565 | SQUID_X509_V_ERR_INFINITE_VALIDATION error cannot be bypassed |
2566 | but should not happen unless your OpenSSL library is buggy. | |
2567 | ||
638402dd AJ |
2568 | SECURITY WARNING: |
2569 | Bypassing validation errors is dangerous because an | |
2570 | error usually implies that the server cannot be trusted | |
2571 | and the connection may be insecure. | |
4c9da963 | 2572 | |
638402dd | 2573 | See also: sslproxy_flags and DONT_VERIFY_PEER. |
4c9da963 | 2574 | DOC_END |
2575 | ||
aebe6888 | 2576 | NAME: sslproxy_cert_sign |
cb4f4424 | 2577 | IFDEF: USE_OPENSSL |
aebe6888 | 2578 | DEFAULT: none |
10d914f6 CT |
2579 | POSTSCRIPTUM: signUntrusted ssl::certUntrusted |
2580 | POSTSCRIPTUM: signSelf ssl::certSelfSigned | |
2581 | POSTSCRIPTUM: signTrusted all | |
aebe6888 CT |
2582 | TYPE: sslproxy_cert_sign |
2583 | LOC: Config.ssl_client.cert_sign | |
2584 | DOC_START | |
2585 | ||
69742b76 | 2586 | sslproxy_cert_sign <signing algorithm> acl ... |
aebe6888 | 2587 | |
69742b76 | 2588 | The following certificate signing algorithms are supported: |
638402dd | 2589 | |
aebe6888 | 2590 | signTrusted |
69742b76 AR |
2591 | Sign using the configured CA certificate which is usually |
2592 | placed in and trusted by end-user browsers. This is the | |
2593 | default for trusted origin server certificates. | |
638402dd | 2594 | |
aebe6888 | 2595 | signUntrusted |
69742b76 AR |
2596 | Sign to guarantee an X509_V_ERR_CERT_UNTRUSTED browser error. |
2597 | This is the default for untrusted origin server certificates | |
2598 | that are not self-signed (see ssl::certUntrusted). | |
638402dd | 2599 | |
aebe6888 | 2600 | signSelf |
69742b76 | 2601 | Sign using a self-signed certificate with the right CN to |
aebe6888 | 2602 | generate a X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT error in the |
69742b76 AR |
2603 | browser. This is the default for self-signed origin server |
2604 | certificates (see ssl::certSelfSigned). | |
aebe6888 | 2605 | |
cf1c09f6 CT |
2606 | This clause only supports fast acl types. |
2607 | ||
69742b76 AR |
2608 | When sslproxy_cert_sign acl(s) match, Squid uses the corresponding |
2609 | signing algorithm to generate the certificate and ignores all | |
2610 | subsequent sslproxy_cert_sign options (the first match wins). If no | |
2611 | acl(s) match, the default signing algorithm is determined by errors | |
2612 | detected when obtaining and validating the origin server certificate. | |
cf1c09f6 | 2613 | |
4b0d23b7 CT |
2614 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
2615 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
2616 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
2617 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
2618 | the domain mismatch at certificate generation time when | |
2619 | bump-server-first is used. | |
aebe6888 CT |
2620 | DOC_END |
2621 | ||
638402dd | 2622 | NAME: sslproxy_cert_adapt |
cb4f4424 | 2623 | IFDEF: USE_OPENSSL |
fb2178bb CT |
2624 | DEFAULT: none |
2625 | TYPE: sslproxy_cert_adapt | |
2626 | LOC: Config.ssl_client.cert_adapt | |
2627 | DOC_START | |
2628 | ||
2629 | sslproxy_cert_adapt <adaptation algorithm> acl ... | |
2630 | ||
69742b76 | 2631 | The following certificate adaptation algorithms are supported: |
638402dd | 2632 | |
fb2178bb | 2633 | setValidAfter |
69742b76 AR |
2634 | Sets the "Not After" property to the "Not After" property of |
2635 | the CA certificate used to sign generated certificates. | |
638402dd | 2636 | |
fb2178bb | 2637 | setValidBefore |
69742b76 AR |
2638 | Sets the "Not Before" property to the "Not Before" property of |
2639 | the CA certificate used to sign generated certificates. | |
638402dd | 2640 | |
69742b76 AR |
2641 | setCommonName or setCommonName{CN} |
2642 | Sets Subject.CN property to the host name specified as a | |
2643 | CN parameter or, if no explicit CN parameter was specified, | |
2644 | extracted from the CONNECT request. It is a misconfiguration | |
2645 | to use setCommonName without an explicit parameter for | |
2646 | intercepted or tproxied SSL connections. | |
fb2178bb | 2647 | |
cf1c09f6 CT |
2648 | This clause only supports fast acl types. |
2649 | ||
69742b76 AR |
2650 | Squid first groups sslproxy_cert_adapt options by adaptation algorithm. |
2651 | Within a group, when sslproxy_cert_adapt acl(s) match, Squid uses the | |
2652 | corresponding adaptation algorithm to generate the certificate and | |
2653 | ignores all subsequent sslproxy_cert_adapt options in that algorithm's | |
2654 | group (i.e., the first match wins within each algorithm group). If no | |
2655 | acl(s) match, the default mimicking action takes place. | |
cf1c09f6 | 2656 | |
4b0d23b7 CT |
2657 | WARNING: SQUID_X509_V_ERR_DOMAIN_MISMATCH and ssl:certDomainMismatch can |
2658 | be used with sslproxy_cert_adapt, but if and only if Squid is bumping a | |
2659 | CONNECT request that carries a domain name. In all other cases (CONNECT | |
2660 | to an IP address or an intercepted SSL connection), Squid cannot detect | |
2661 | the domain mismatch at certificate generation time when | |
2662 | bump-server-first is used. | |
fb2178bb CT |
2663 | DOC_END |
2664 | ||
41bd17a4 | 2665 | NAME: sslpassword_program |
cb4f4424 | 2666 | IFDEF: USE_OPENSSL |
41bd17a4 | 2667 | DEFAULT: none |
2668 | LOC: Config.Program.ssl_password | |
2669 | TYPE: string | |
5473c134 | 2670 | DOC_START |
41bd17a4 | 2671 | Specify a program used for entering SSL key passphrases |
2672 | when using encrypted SSL certificate keys. If not specified | |
2673 | keys must either be unencrypted, or Squid started with the -N | |
2674 | option to allow it to query interactively for the passphrase. | |
7acb9ddd HN |
2675 | |
2676 | The key file name is given as argument to the program allowing | |
2677 | selection of the right password if you have multiple encrypted | |
2678 | keys. | |
5473c134 | 2679 | DOC_END |
2680 | ||
95d2589c CT |
2681 | COMMENT_START |
2682 | OPTIONS RELATING TO EXTERNAL SSL_CRTD | |
2683 | ----------------------------------------------------------------------------- | |
2684 | COMMENT_END | |
2685 | ||
2686 | NAME: sslcrtd_program | |
2687 | TYPE: eol | |
2688 | IFDEF: USE_SSL_CRTD | |
2689 | DEFAULT: @DEFAULT_SSL_CRTD@ -s @DEFAULT_SSL_DB_DIR@ -M 4MB | |
2690 | LOC: Ssl::TheConfig.ssl_crtd | |
2691 | DOC_START | |
2692 | Specify the location and options of the executable for ssl_crtd process. | |
2693 | @DEFAULT_SSL_CRTD@ program requires -s and -M parameters | |
2694 | For more information use: | |
2695 | @DEFAULT_SSL_CRTD@ -h | |
2696 | DOC_END | |
2697 | ||
2698 | NAME: sslcrtd_children | |
2699 | TYPE: HelperChildConfig | |
2700 | IFDEF: USE_SSL_CRTD | |
2701 | DEFAULT: 32 startup=5 idle=1 | |
2702 | LOC: Ssl::TheConfig.ssl_crtdChildren | |
2703 | DOC_START | |
2704 | The maximum number of processes spawn to service ssl server. | |
2705 | The maximum this may be safely set to is 32. | |
2706 | ||
2707 | The startup= and idle= options allow some measure of skew in your | |
2708 | tuning. | |
2709 | ||
2710 | startup=N | |
2711 | ||
2712 | Sets the minimum number of processes to spawn when Squid | |
2713 | starts or reconfigures. When set to zero the first request will | |
2714 | cause spawning of the first child process to handle it. | |
2715 | ||
2716 | Starting too few children temporary slows Squid under load while it | |
2717 | tries to spawn enough additional processes to cope with traffic. | |
2718 | ||
2719 | idle=N | |
2720 | ||
2721 | Sets a minimum of how many processes Squid is to try and keep available | |
2722 | at all times. When traffic begins to rise above what the existing | |
2723 | processes can handle this many more will be spawned up to the maximum | |
2724 | configured. A minimum setting of 1 is required. | |
2725 | ||
2726 | You must have at least one ssl_crtd process. | |
2727 | DOC_END | |
2728 | ||
2cef0ca6 AR |
2729 | NAME: sslcrtvalidator_program |
2730 | TYPE: eol | |
cb4f4424 | 2731 | IFDEF: USE_OPENSSL |
2cef0ca6 AR |
2732 | DEFAULT: none |
2733 | LOC: Ssl::TheConfig.ssl_crt_validator | |
2734 | DOC_START | |
2735 | Specify the location and options of the executable for ssl_crt_validator | |
638402dd AJ |
2736 | process. |
2737 | ||
2738 | Usage: sslcrtvalidator_program [ttl=n] [cache=n] path ... | |
14798e73 CT |
2739 | |
2740 | Options: | |
638402dd | 2741 | ttl=n TTL in seconds for cached results. The default is 60 secs |
14798e73 | 2742 | cache=n limit the result cache size. The default value is 2048 |
2cef0ca6 AR |
2743 | DOC_END |
2744 | ||
2745 | NAME: sslcrtvalidator_children | |
2746 | TYPE: HelperChildConfig | |
cb4f4424 | 2747 | IFDEF: USE_OPENSSL |
413bb969 | 2748 | DEFAULT: 32 startup=5 idle=1 concurrency=1 |
2cef0ca6 AR |
2749 | LOC: Ssl::TheConfig.ssl_crt_validator_Children |
2750 | DOC_START | |
638402dd | 2751 | The maximum number of processes spawn to service SSL server. |
2cef0ca6 AR |
2752 | The maximum this may be safely set to is 32. |
2753 | ||
2754 | The startup= and idle= options allow some measure of skew in your | |
2755 | tuning. | |
2756 | ||
2757 | startup=N | |
2758 | ||
2759 | Sets the minimum number of processes to spawn when Squid | |
2760 | starts or reconfigures. When set to zero the first request will | |
2761 | cause spawning of the first child process to handle it. | |
2762 | ||
2763 | Starting too few children temporary slows Squid under load while it | |
2764 | tries to spawn enough additional processes to cope with traffic. | |
2765 | ||
2766 | idle=N | |
2767 | ||
2768 | Sets a minimum of how many processes Squid is to try and keep available | |
2769 | at all times. When traffic begins to rise above what the existing | |
2770 | processes can handle this many more will be spawned up to the maximum | |
2771 | configured. A minimum setting of 1 is required. | |
4a77bb4e CT |
2772 | |
2773 | concurrency= | |
2774 | ||
2775 | The number of requests each certificate validator helper can handle in | |
dffc462a CT |
2776 | parallel. A value of 0 indicates the certficate validator does not |
2777 | support concurrency. Defaults to 1. | |
4a77bb4e CT |
2778 | |
2779 | When this directive is set to a value >= 1 then the protocol | |
2780 | used to communicate with the helper is modified to include | |
2781 | a request ID in front of the request/response. The request | |
2782 | ID from the request must be echoed back with the response | |
2783 | to that request. | |
2cef0ca6 AR |
2784 | |
2785 | You must have at least one ssl_crt_validator process. | |
2786 | DOC_END | |
2787 | ||
cccac0a2 | 2788 | COMMENT_START |
41bd17a4 | 2789 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM |
cccac0a2 | 2790 | ----------------------------------------------------------------------------- |
2791 | COMMENT_END | |
2792 | ||
41bd17a4 | 2793 | NAME: cache_peer |
2794 | TYPE: peer | |
2795 | DEFAULT: none | |
2796 | LOC: Config.peers | |
cccac0a2 | 2797 | DOC_START |
41bd17a4 | 2798 | To specify other caches in a hierarchy, use the format: |
2b94f655 | 2799 | |
41bd17a4 | 2800 | cache_peer hostname type http-port icp-port [options] |
2b94f655 | 2801 | |
41bd17a4 | 2802 | For example, |
2b94f655 | 2803 | |
41bd17a4 | 2804 | # proxy icp |
2805 | # hostname type port port options | |
2806 | # -------------------- -------- ----- ----- ----------- | |
2b94f655 | 2807 | cache_peer parent.foo.net parent 3128 3130 default |
41bd17a4 | 2808 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only |
2809 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
2e9993e1 | 2810 | cache_peer example.com parent 80 0 default |
2b94f655 AJ |
2811 | cache_peer cdn.example.com sibling 3128 0 |
2812 | ||
2813 | type: either 'parent', 'sibling', or 'multicast'. | |
2814 | ||
2815 | proxy-port: The port number where the peer accept HTTP requests. | |
2816 | For other Squid proxies this is usually 3128 | |
2817 | For web servers this is usually 80 | |
2818 | ||
2819 | icp-port: Used for querying neighbor caches about objects. | |
2820 | Set to 0 if the peer does not support ICP or HTCP. | |
2821 | See ICP and HTCP options below for additional details. | |
2822 | ||
2823 | ||
2824 | ==== ICP OPTIONS ==== | |
2825 | ||
2826 | You MUST also set icp_port and icp_access explicitly when using these options. | |
2827 | The defaults will prevent peer traffic using ICP. | |
2828 | ||
2829 | ||
2830 | no-query Disable ICP queries to this neighbor. | |
2831 | ||
2832 | multicast-responder | |
2833 | Indicates the named peer is a member of a multicast group. | |
2834 | ICP queries will not be sent directly to the peer, but ICP | |
2835 | replies will be accepted from it. | |
2836 | ||
2837 | closest-only Indicates that, for ICP_OP_MISS replies, we'll only forward | |
2838 | CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes. | |
2839 | ||
2840 | background-ping | |
2841 | To only send ICP queries to this neighbor infrequently. | |
2842 | This is used to keep the neighbor round trip time updated | |
2843 | and is usually used in conjunction with weighted-round-robin. | |
2844 | ||
2845 | ||
2846 | ==== HTCP OPTIONS ==== | |
2847 | ||
2848 | You MUST also set htcp_port and htcp_access explicitly when using these options. | |
2849 | The defaults will prevent peer traffic using HTCP. | |
2850 | ||
2851 | ||
2852 | htcp Send HTCP, instead of ICP, queries to the neighbor. | |
2853 | You probably also want to set the "icp-port" to 4827 | |
18191440 AJ |
2854 | instead of 3130. This directive accepts a comma separated |
2855 | list of options described below. | |
2b94f655 | 2856 | |
18191440 | 2857 | htcp=oldsquid Send HTCP to old Squid versions (2.5 or earlier). |
2b94f655 | 2858 | |
18191440 | 2859 | htcp=no-clr Send HTCP to the neighbor but without |
2b94f655 | 2860 | sending any CLR requests. This cannot be used with |
18191440 | 2861 | only-clr. |
2b94f655 | 2862 | |
18191440 AJ |
2863 | htcp=only-clr Send HTCP to the neighbor but ONLY CLR requests. |
2864 | This cannot be used with no-clr. | |
2b94f655 | 2865 | |
18191440 | 2866 | htcp=no-purge-clr |
2b94f655 AJ |
2867 | Send HTCP to the neighbor including CLRs but only when |
2868 | they do not result from PURGE requests. | |
2869 | ||
18191440 | 2870 | htcp=forward-clr |
2b94f655 AJ |
2871 | Forward any HTCP CLR requests this proxy receives to the peer. |
2872 | ||
2873 | ||
2874 | ==== PEER SELECTION METHODS ==== | |
2875 | ||
2876 | The default peer selection method is ICP, with the first responding peer | |
2877 | being used as source. These options can be used for better load balancing. | |
2878 | ||
2879 | ||
2880 | default This is a parent cache which can be used as a "last-resort" | |
2881 | if a peer cannot be located by any of the peer-selection methods. | |
2882 | If specified more than once, only the first is used. | |
2883 | ||
2884 | round-robin Load-Balance parents which should be used in a round-robin | |
2885 | fashion in the absence of any ICP queries. | |
2886 | weight=N can be used to add bias. | |
2887 | ||
2888 | weighted-round-robin | |
2889 | Load-Balance parents which should be used in a round-robin | |
2890 | fashion with the frequency of each parent being based on the | |
2891 | round trip time. Closer parents are used more often. | |
2892 | Usually used for background-ping parents. | |
2893 | weight=N can be used to add bias. | |
2894 | ||
2895 | carp Load-Balance parents which should be used as a CARP array. | |
2896 | The requests will be distributed among the parents based on the | |
2897 | CARP load balancing hash function based on their weight. | |
2898 | ||
2899 | userhash Load-balance parents based on the client proxy_auth or ident username. | |
2900 | ||
2901 | sourcehash Load-balance parents based on the client source IP. | |
8a368316 AJ |
2902 | |
2903 | multicast-siblings | |
2904 | To be used only for cache peers of type "multicast". | |
2905 | ALL members of this multicast group have "sibling" | |
2e9993e1 | 2906 | relationship with it, not "parent". This is to a multicast |
8a368316 AJ |
2907 | group when the requested object would be fetched only from |
2908 | a "parent" cache, anyway. It's useful, e.g., when | |
2909 | configuring a pool of redundant Squid proxies, being | |
2910 | members of the same multicast group. | |
2b94f655 AJ |
2911 | |
2912 | ||
2913 | ==== PEER SELECTION OPTIONS ==== | |
2914 | ||
2915 | weight=N use to affect the selection of a peer during any weighted | |
2916 | peer-selection mechanisms. | |
2917 | The weight must be an integer; default is 1, | |
2918 | larger weights are favored more. | |
2919 | This option does not affect parent selection if a peering | |
2920 | protocol is not in use. | |
2921 | ||
2922 | basetime=N Specify a base amount to be subtracted from round trip | |
2923 | times of parents. | |
2924 | It is subtracted before division by weight in calculating | |
2925 | which parent to fectch from. If the rtt is less than the | |
2926 | base time the rtt is set to a minimal value. | |
2927 | ||
3c72389f AJ |
2928 | ttl=N Specify a TTL to use when sending multicast ICP queries |
2929 | to this address. | |
2b94f655 AJ |
2930 | Only useful when sending to a multicast group. |
2931 | Because we don't accept ICP replies from random | |
2932 | hosts, you must configure other group members as | |
2933 | peers with the 'multicast-responder' option. | |
2934 | ||
2935 | no-delay To prevent access to this neighbor from influencing the | |
2936 | delay pools. | |
2937 | ||
2938 | digest-url=URL Tell Squid to fetch the cache digest (if digests are | |
2939 | enabled) for this host from the specified URL rather | |
2940 | than the Squid default location. | |
2941 | ||
2942 | ||
de03b596 FC |
2943 | ==== CARP OPTIONS ==== |
2944 | ||
2945 | carp-key=key-specification | |
2946 | use a different key than the full URL to hash against the peer. | |
2947 | the key-specification is a comma-separated list of the keywords | |
2948 | scheme, host, port, path, params | |
2949 | Order is not important. | |
2950 | ||
2b94f655 AJ |
2951 | ==== ACCELERATOR / REVERSE-PROXY OPTIONS ==== |
2952 | ||
2953 | originserver Causes this parent to be contacted as an origin server. | |
2954 | Meant to be used in accelerator setups when the peer | |
2955 | is a web server. | |
2956 | ||
2957 | forceddomain=name | |
2958 | Set the Host header of requests forwarded to this peer. | |
2959 | Useful in accelerator setups where the server (peer) | |
2960 | expects a certain domain name but clients may request | |
2961 | others. ie example.com or www.example.com | |
2962 | ||
2963 | no-digest Disable request of cache digests. | |
2964 | ||
2965 | no-netdb-exchange | |
2966 | Disables requesting ICMP RTT database (NetDB). | |
2967 | ||
2968 | ||
2969 | ==== AUTHENTICATION OPTIONS ==== | |
2970 | ||
2971 | login=user:password | |
2972 | If this is a personal/workgroup proxy and your parent | |
2973 | requires proxy authentication. | |
2974 | ||
2975 | Note: The string can include URL escapes (i.e. %20 for | |
2976 | spaces). This also means % must be written as %%. | |
2977 | ||
11e4c5e5 AJ |
2978 | login=PASSTHRU |
2979 | Send login details received from client to this peer. | |
2980 | Both Proxy- and WWW-Authorization headers are passed | |
2981 | without alteration to the peer. | |
2982 | Authentication is not required by Squid for this to work. | |
2983 | ||
2984 | Note: This will pass any form of authentication but | |
2985 | only Basic auth will work through a proxy unless the | |
2986 | connection-auth options are also used. | |
ee0b94f4 | 2987 | |
2b94f655 AJ |
2988 | login=PASS Send login details received from client to this peer. |
2989 | Authentication is not required by this option. | |
11e4c5e5 | 2990 | |
2b94f655 AJ |
2991 | If there are no client-provided authentication headers |
2992 | to pass on, but username and password are available | |
ee0b94f4 HN |
2993 | from an external ACL user= and password= result tags |
2994 | they may be sent instead. | |
2b94f655 AJ |
2995 | |
2996 | Note: To combine this with proxy_auth both proxies must | |
2997 | share the same user database as HTTP only allows for | |
2998 | a single login (one for proxy, one for origin server). | |
2999 | Also be warned this will expose your users proxy | |
3000 | password to the peer. USE WITH CAUTION | |
3001 | ||
3002 | login=*:password | |
3003 | Send the username to the upstream cache, but with a | |
3004 | fixed password. This is meant to be used when the peer | |
3005 | is in another administrative domain, but it is still | |
3006 | needed to identify each user. | |
3007 | The star can optionally be followed by some extra | |
3008 | information which is added to the username. This can | |
3009 | be used to identify this proxy to the peer, similar to | |
3010 | the login=username:password option above. | |
3011 | ||
9ca29d23 AJ |
3012 | login=NEGOTIATE |
3013 | If this is a personal/workgroup proxy and your parent | |
3014 | requires a secure proxy authentication. | |
3015 | The first principal from the default keytab or defined by | |
3016 | the environment variable KRB5_KTNAME will be used. | |
3017 | ||
63f03f79 PL |
3018 | WARNING: The connection may transmit requests from multiple |
3019 | clients. Negotiate often assumes end-to-end authentication | |
3020 | and a single-client. Which is not strictly true here. | |
3021 | ||
9ca29d23 AJ |
3022 | login=NEGOTIATE:principal_name |
3023 | If this is a personal/workgroup proxy and your parent | |
3024 | requires a secure proxy authentication. | |
3025 | The principal principal_name from the default keytab or | |
3026 | defined by the environment variable KRB5_KTNAME will be | |
3027 | used. | |
3028 | ||
63f03f79 PL |
3029 | WARNING: The connection may transmit requests from multiple |
3030 | clients. Negotiate often assumes end-to-end authentication | |
3031 | and a single-client. Which is not strictly true here. | |
3032 | ||
2b94f655 AJ |
3033 | connection-auth=on|off |
3034 | Tell Squid that this peer does or not support Microsoft | |
3035 | connection oriented authentication, and any such | |
3036 | challenges received from there should be ignored. | |
3037 | Default is auto to automatically determine the status | |
3038 | of the peer. | |
3039 | ||
3040 | ||
3041 | ==== SSL / HTTPS / TLS OPTIONS ==== | |
3042 | ||
3043 | ssl Encrypt connections to this peer with SSL/TLS. | |
3044 | ||
3045 | sslcert=/path/to/ssl/certificate | |
3046 | A client SSL certificate to use when connecting to | |
3047 | this peer. | |
3048 | ||
3049 | sslkey=/path/to/ssl/key | |
3050 | The private SSL key corresponding to sslcert above. | |
3051 | If 'sslkey' is not specified 'sslcert' is assumed to | |
3052 | reference a combined file containing both the | |
3053 | certificate and the key. | |
3054 | ||
3d96b0e8 | 3055 | sslversion=1|2|3|4|5|6 |
2b94f655 AJ |
3056 | The SSL version to use when connecting to this peer |
3057 | 1 = automatic (default) | |
3058 | 2 = SSL v2 only | |
3059 | 3 = SSL v3 only | |
3d96b0e8 AJ |
3060 | 4 = TLS v1.0 only |
3061 | 5 = TLS v1.1 only | |
3062 | 6 = TLS v1.2 only | |
2b94f655 AJ |
3063 | |
3064 | sslcipher=... The list of valid SSL ciphers to use when connecting | |
3065 | to this peer. | |
3066 | ||
943c5f16 HN |
3067 | ssloptions=... Specify various SSL implementation options: |
3068 | ||
3d96b0e8 AJ |
3069 | NO_SSLv2 Disallow the use of SSLv2 |
3070 | NO_SSLv3 Disallow the use of SSLv3 | |
3071 | NO_TLSv1 Disallow the use of TLSv1.0 | |
3072 | NO_TLSv1_1 Disallow the use of TLSv1.1 | |
3073 | NO_TLSv1_2 Disallow the use of TLSv1.2 | |
943c5f16 HN |
3074 | SINGLE_DH_USE |
3075 | Always create a new key when using | |
3076 | temporary/ephemeral DH key exchanges | |
3077 | ALL Enable various bug workarounds | |
3078 | suggested as "harmless" by OpenSSL | |
3079 | Be warned that this reduces SSL/TLS | |
3080 | strength to some attacks. | |
3081 | ||
3082 | See the OpenSSL SSL_CTX_set_options documentation for a | |
3083 | more complete list. | |
2b94f655 AJ |
3084 | |
3085 | sslcafile=... A file containing additional CA certificates to use | |
3086 | when verifying the peer certificate. | |
3087 | ||
3088 | sslcapath=... A directory containing additional CA certificates to | |
3089 | use when verifying the peer certificate. | |
3090 | ||
3091 | sslcrlfile=... A certificate revocation list file to use when | |
3092 | verifying the peer certificate. | |
3093 | ||
3094 | sslflags=... Specify various flags modifying the SSL implementation: | |
3095 | ||
41bd17a4 | 3096 | DONT_VERIFY_PEER |
3097 | Accept certificates even if they fail to | |
3098 | verify. | |
3099 | NO_DEFAULT_CA | |
3100 | Don't use the default CA list built in | |
3101 | to OpenSSL. | |
3102 | DONT_VERIFY_DOMAIN | |
3103 | Don't verify the peer certificate | |
3104 | matches the server name | |
2b94f655 AJ |
3105 | |
3106 | ssldomain= The peer name as advertised in it's certificate. | |
3107 | Used for verifying the correctness of the received peer | |
3108 | certificate. If not specified the peer hostname will be | |
3109 | used. | |
3110 | ||
3111 | front-end-https | |
3112 | Enable the "Front-End-Https: On" header needed when | |
3113 | using Squid as a SSL frontend in front of Microsoft OWA. | |
3114 | See MS KB document Q307347 for details on this header. | |
3115 | If set to auto the header will only be added if the | |
3116 | request is forwarded as a https:// URL. | |
3117 | ||
3118 | ||
3119 | ==== GENERAL OPTIONS ==== | |
3120 | ||
3121 | connect-timeout=N | |
3122 | A peer-specific connect timeout. | |
3123 | Also see the peer_connect_timeout directive. | |
3124 | ||
3125 | connect-fail-limit=N | |
3126 | How many times connecting to a peer must fail before | |
e8dca475 CT |
3127 | it is marked as down. Standby connection failures |
3128 | count towards this limit. Default is 10. | |
2b94f655 AJ |
3129 | |
3130 | allow-miss Disable Squid's use of only-if-cached when forwarding | |
3131 | requests to siblings. This is primarily useful when | |
3132 | icp_hit_stale is used by the sibling. To extensive use | |
3133 | of this option may result in forwarding loops, and you | |
3134 | should avoid having two-way peerings with this option. | |
3135 | For example to deny peer usage on requests from peer | |
3136 | by denying cache_peer_access if the source is a peer. | |
3137 | ||
e8dca475 CT |
3138 | max-conn=N Limit the number of concurrent connections the Squid |
3139 | may open to this peer, including already opened idle | |
3140 | and standby connections. There is no peer-specific | |
3141 | connection limit by default. | |
3142 | ||
3143 | A peer exceeding the limit is not used for new | |
3144 | requests unless a standby connection is available. | |
3145 | ||
3146 | max-conn currently works poorly with idle persistent | |
3147 | connections: When a peer reaches its max-conn limit, | |
3148 | and there are idle persistent connections to the peer, | |
3149 | the peer may not be selected because the limiting code | |
3150 | does not know whether Squid can reuse those idle | |
3151 | connections. | |
3152 | ||
3153 | standby=N Maintain a pool of N "hot standby" connections to an | |
3154 | UP peer, available for requests when no idle | |
3155 | persistent connection is available (or safe) to use. | |
3156 | By default and with zero N, no such pool is maintained. | |
3157 | N must not exceed the max-conn limit (if any). | |
3158 | ||
3159 | At start or after reconfiguration, Squid opens new TCP | |
3160 | standby connections until there are N connections | |
3161 | available and then replenishes the standby pool as | |
3162 | opened connections are used up for requests. A used | |
3163 | connection never goes back to the standby pool, but | |
3164 | may go to the regular idle persistent connection pool | |
3165 | shared by all peers and origin servers. | |
3166 | ||
3167 | Squid never opens multiple new standby connections | |
3168 | concurrently. This one-at-a-time approach minimizes | |
3169 | flooding-like effect on peers. Furthermore, just a few | |
3170 | standby connections should be sufficient in most cases | |
3171 | to supply most new requests with a ready-to-use | |
3172 | connection. | |
3173 | ||
3174 | Standby connections obey server_idle_pconn_timeout. | |
3175 | For the feature to work as intended, the peer must be | |
3176 | configured to accept and keep them open longer than | |
3177 | the idle timeout at the connecting Squid, to minimize | |
3178 | race conditions typical to idle used persistent | |
3179 | connections. Default request_timeout and | |
3180 | server_idle_pconn_timeout values ensure such a | |
3181 | configuration. | |
2b94f655 AJ |
3182 | |
3183 | name=xxx Unique name for the peer. | |
3184 | Required if you have multiple peers on the same host | |
3185 | but different ports. | |
3186 | This name can be used in cache_peer_access and similar | |
3187 | directives to dentify the peer. | |
3188 | Can be used by outgoing access controls through the | |
3189 | peername ACL type. | |
3190 | ||
b0758e04 AJ |
3191 | no-tproxy Do not use the client-spoof TPROXY support when forwarding |
3192 | requests to this peer. Use normal address selection instead. | |
0d901ef4 | 3193 | This overrides the spoof_client_ip ACL. |
b0758e04 | 3194 | |
2b94f655 AJ |
3195 | proxy-only objects fetched from the peer will not be stored locally. |
3196 | ||
41bd17a4 | 3197 | DOC_END |
cccac0a2 | 3198 | |
41bd17a4 | 3199 | NAME: cache_peer_domain cache_host_domain |
3200 | TYPE: hostdomain | |
3201 | DEFAULT: none | |
3202 | LOC: none | |
3203 | DOC_START | |
3204 | Use to limit the domains for which a neighbor cache will be | |
638402dd | 3205 | queried. |
cccac0a2 | 3206 | |
638402dd AJ |
3207 | Usage: |
3208 | cache_peer_domain cache-host domain [domain ...] | |
3209 | cache_peer_domain cache-host !domain | |
cccac0a2 | 3210 | |
41bd17a4 | 3211 | For example, specifying |
cccac0a2 | 3212 | |
41bd17a4 | 3213 | cache_peer_domain parent.foo.net .edu |
cccac0a2 | 3214 | |
41bd17a4 | 3215 | has the effect such that UDP query packets are sent to |
3216 | 'bigserver' only when the requested object exists on a | |
3217 | server in the .edu domain. Prefixing the domainname | |
3218 | with '!' means the cache will be queried for objects | |
3219 | NOT in that domain. | |
cccac0a2 | 3220 | |
41bd17a4 | 3221 | NOTE: * Any number of domains may be given for a cache-host, |
3222 | either on the same or separate lines. | |
3223 | * When multiple domains are given for a particular | |
3224 | cache-host, the first matched domain is applied. | |
3225 | * Cache hosts with no domain restrictions are queried | |
3226 | for all requests. | |
3227 | * There are no defaults. | |
3228 | * There is also a 'cache_peer_access' tag in the ACL | |
3229 | section. | |
3230 | DOC_END | |
dd9b1776 | 3231 | |
41bd17a4 | 3232 | NAME: cache_peer_access |
3233 | TYPE: peer_access | |
3234 | DEFAULT: none | |
3235 | LOC: none | |
3236 | DOC_START | |
3237 | Similar to 'cache_peer_domain' but provides more flexibility by | |
3238 | using ACL elements. | |
cccac0a2 | 3239 | |
638402dd AJ |
3240 | Usage: |
3241 | cache_peer_access cache-host allow|deny [!]aclname ... | |
dd9b1776 | 3242 | |
41bd17a4 | 3243 | The syntax is identical to 'http_access' and the other lists of |
3244 | ACL elements. See the comments for 'http_access' below, or | |
e314b7b9 | 3245 | the Squid FAQ (http://wiki.squid-cache.org/SquidFaq/SquidAcl). |
41bd17a4 | 3246 | DOC_END |
dd9b1776 | 3247 | |
41bd17a4 | 3248 | NAME: neighbor_type_domain |
3249 | TYPE: hostdomaintype | |
3250 | DEFAULT: none | |
638402dd | 3251 | DEFAULT_DOC: The peer type from cache_peer directive is used for all requests to that peer. |
41bd17a4 | 3252 | LOC: none |
3253 | DOC_START | |
638402dd AJ |
3254 | Modify the cache_peer neighbor type when passing requests |
3255 | about specific domains to the peer. | |
cccac0a2 | 3256 | |
638402dd AJ |
3257 | Usage: |
3258 | neighbor_type_domain neighbor parent|sibling domain domain ... | |
6bf4f823 | 3259 | |
638402dd AJ |
3260 | For example: |
3261 | cache_peer foo.example.com parent 3128 3130 | |
3262 | neighbor_type_domain foo.example.com sibling .au .de | |
6bf4f823 | 3263 | |
638402dd AJ |
3264 | The above configuration treats all requests to foo.example.com as a |
3265 | parent proxy unless the request is for a .au or .de ccTLD domain name. | |
41bd17a4 | 3266 | DOC_END |
6bf4f823 | 3267 | |
41bd17a4 | 3268 | NAME: dead_peer_timeout |
3269 | COMMENT: (seconds) | |
3270 | DEFAULT: 10 seconds | |
3271 | TYPE: time_t | |
3272 | LOC: Config.Timeout.deadPeer | |
3273 | DOC_START | |
3274 | This controls how long Squid waits to declare a peer cache | |
3275 | as "dead." If there are no ICP replies received in this | |
3276 | amount of time, Squid will declare the peer dead and not | |
3277 | expect to receive any further ICP replies. However, it | |
3278 | continues to send ICP queries, and will mark the peer as | |
3279 | alive upon receipt of the first subsequent ICP reply. | |
699acd19 | 3280 | |
41bd17a4 | 3281 | This timeout also affects when Squid expects to receive ICP |
3282 | replies from peers. If more than 'dead_peer' seconds have | |
3283 | passed since the last ICP reply was received, Squid will not | |
3284 | expect to receive an ICP reply on the next query. Thus, if | |
3285 | your time between requests is greater than this timeout, you | |
3286 | will see a lot of requests sent DIRECT to origin servers | |
3287 | instead of to your parents. | |
3288 | DOC_END | |
cccac0a2 | 3289 | |
437823b4 | 3290 | NAME: forward_max_tries |
6c367206 | 3291 | DEFAULT: 25 |
437823b4 AJ |
3292 | TYPE: int |
3293 | LOC: Config.forward_max_tries | |
3294 | DOC_START | |
3295 | Controls how many different forward paths Squid will try | |
3296 | before giving up. See also forward_timeout. | |
31ef19cd AJ |
3297 | |
3298 | NOTE: connect_retries (default: none) can make each of these | |
3299 | possible forwarding paths be tried multiple times. | |
437823b4 AJ |
3300 | DOC_END |
3301 | ||
41bd17a4 | 3302 | NAME: hierarchy_stoplist |
3303 | TYPE: wordlist | |
3304 | DEFAULT: none | |
3305 | LOC: Config.hierarchy_stoplist | |
3306 | DOC_START | |
3307 | A list of words which, if found in a URL, cause the object to | |
3308 | be handled directly by this cache. In other words, use this | |
3309 | to not query neighbor caches for certain objects. You may | |
3310 | list this option multiple times. | |
e0855596 | 3311 | |
3387b5a4 AJ |
3312 | Example: |
3313 | hierarchy_stoplist cgi-bin ? | |
3314 | ||
3315 | Note: never_direct overrides this option. | |
6b698a21 | 3316 | DOC_END |
0976f8db | 3317 | |
41bd17a4 | 3318 | COMMENT_START |
3319 | MEMORY CACHE OPTIONS | |
3320 | ----------------------------------------------------------------------------- | |
3321 | COMMENT_END | |
3322 | ||
3323 | NAME: cache_mem | |
3324 | COMMENT: (bytes) | |
3325 | TYPE: b_size_t | |
df2eec10 | 3326 | DEFAULT: 256 MB |
41bd17a4 | 3327 | LOC: Config.memMaxSize |
6b698a21 | 3328 | DOC_START |
41bd17a4 | 3329 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. |
3330 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
3331 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
3332 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
3333 | ||
3334 | 'cache_mem' specifies the ideal amount of memory to be used | |
3335 | for: | |
3336 | * In-Transit objects | |
3337 | * Hot Objects | |
3338 | * Negative-Cached objects | |
3339 | ||
3340 | Data for these objects are stored in 4 KB blocks. This | |
3341 | parameter specifies the ideal upper limit on the total size of | |
3342 | 4 KB blocks allocated. In-Transit objects take the highest | |
3343 | priority. | |
3344 | ||
3345 | In-transit objects have priority over the others. When | |
3346 | additional space is needed for incoming data, negative-cached | |
3347 | and hot objects will be released. In other words, the | |
3348 | negative-cached and hot objects will fill up any unused space | |
3349 | not needed for in-transit objects. | |
3350 | ||
3351 | If circumstances require, this limit will be exceeded. | |
3352 | Specifically, if your incoming request rate requires more than | |
3353 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
3354 | exceed this limit to satisfy the new requests. When the load | |
3355 | decreases, blocks will be freed until the high-water mark is | |
3356 | reached. Thereafter, blocks will be used to store hot | |
3357 | objects. | |
29f35ca5 AR |
3358 | |
3359 | If shared memory caching is enabled, Squid does not use the shared | |
3360 | cache space for in-transit objects, but they still consume as much | |
3361 | local memory as they need. For more details about the shared memory | |
3362 | cache, see memory_cache_shared. | |
6b698a21 | 3363 | DOC_END |
0976f8db | 3364 | |
41bd17a4 | 3365 | NAME: maximum_object_size_in_memory |
3366 | COMMENT: (bytes) | |
3367 | TYPE: b_size_t | |
df2eec10 | 3368 | DEFAULT: 512 KB |
41bd17a4 | 3369 | LOC: Config.Store.maxInMemObjSize |
6b698a21 | 3370 | DOC_START |
41bd17a4 | 3371 | Objects greater than this size will not be attempted to kept in |
3372 | the memory cache. This should be set high enough to keep objects | |
3373 | accessed frequently in memory to improve performance whilst low | |
3374 | enough to keep larger objects from hoarding cache_mem. | |
6b698a21 | 3375 | DOC_END |
0976f8db | 3376 | |
57af1e3f AR |
3377 | NAME: memory_cache_shared |
3378 | COMMENT: on|off | |
3379 | TYPE: YesNoNone | |
3380 | LOC: Config.memShared | |
3381 | DEFAULT: none | |
70f856bc | 3382 | DEFAULT_DOC: "on" where supported if doing memory caching with multiple SMP workers. |
57af1e3f AR |
3383 | DOC_START |
3384 | Controls whether the memory cache is shared among SMP workers. | |
3385 | ||
70f856bc AR |
3386 | The shared memory cache is meant to occupy cache_mem bytes and replace |
3387 | the non-shared memory cache, although some entities may still be | |
3388 | cached locally by workers for now (e.g., internal and in-transit | |
3389 | objects may be served from a local memory cache even if shared memory | |
3390 | caching is enabled). | |
3391 | ||
65b81b27 | 3392 | By default, the memory cache is shared if and only if all of the |
70f856bc AR |
3393 | following conditions are satisfied: Squid runs in SMP mode with |
3394 | multiple workers, cache_mem is positive, and Squid environment | |
3395 | supports required IPC primitives (e.g., POSIX shared memory segments | |
3396 | and GCC-style atomic operations). | |
3397 | ||
3398 | To avoid blocking locks, shared memory uses opportunistic algorithms | |
3399 | that do not guarantee that every cachable entity that could have been | |
3400 | shared among SMP workers will actually be shared. | |
3401 | ||
3402 | Currently, entities exceeding 32KB in size cannot be shared. | |
57af1e3f AR |
3403 | DOC_END |
3404 | ||
ea21d497 HN |
3405 | NAME: memory_cache_mode |
3406 | TYPE: memcachemode | |
3407 | LOC: Config | |
3408 | DEFAULT: always | |
638402dd | 3409 | DEFAULT_DOC: Keep the most recently fetched objects in memory |
ff4b33f4 | 3410 | DOC_START |
ea21d497 | 3411 | Controls which objects to keep in the memory cache (cache_mem) |
ff4b33f4 | 3412 | |
ea21d497 HN |
3413 | always Keep most recently fetched objects in memory (default) |
3414 | ||
3415 | disk Only disk cache hits are kept in memory, which means | |
3416 | an object must first be cached on disk and then hit | |
3417 | a second time before cached in memory. | |
3418 | ||
3419 | network Only objects fetched from network is kept in memory | |
ff4b33f4 HN |
3420 | DOC_END |
3421 | ||
41bd17a4 | 3422 | NAME: memory_replacement_policy |
3423 | TYPE: removalpolicy | |
3424 | LOC: Config.memPolicy | |
3425 | DEFAULT: lru | |
6b698a21 | 3426 | DOC_START |
41bd17a4 | 3427 | The memory replacement policy parameter determines which |
3428 | objects are purged from memory when memory space is needed. | |
7f7db318 | 3429 | |
638402dd | 3430 | See cache_replacement_policy for details on algorithms. |
41bd17a4 | 3431 | DOC_END |
6b698a21 | 3432 | |
41bd17a4 | 3433 | COMMENT_START |
3434 | DISK CACHE OPTIONS | |
3435 | ----------------------------------------------------------------------------- | |
3436 | COMMENT_END | |
6b698a21 | 3437 | |
41bd17a4 | 3438 | NAME: cache_replacement_policy |
3439 | TYPE: removalpolicy | |
3440 | LOC: Config.replPolicy | |
3441 | DEFAULT: lru | |
3442 | DOC_START | |
3443 | The cache replacement policy parameter determines which | |
3444 | objects are evicted (replaced) when disk space is needed. | |
6b698a21 | 3445 | |
41bd17a4 | 3446 | lru : Squid's original list based LRU policy |
3447 | heap GDSF : Greedy-Dual Size Frequency | |
3448 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
3449 | heap LRU : LRU policy implemented using a heap | |
6b698a21 | 3450 | |
638402dd | 3451 | Applies to any cache_dir lines listed below this directive. |
7f7db318 | 3452 | |
41bd17a4 | 3453 | The LRU policies keeps recently referenced objects. |
0976f8db | 3454 | |
41bd17a4 | 3455 | The heap GDSF policy optimizes object hit rate by keeping smaller |
3456 | popular objects in cache so it has a better chance of getting a | |
3457 | hit. It achieves a lower byte hit rate than LFUDA though since | |
3458 | it evicts larger (possibly popular) objects. | |
0976f8db | 3459 | |
41bd17a4 | 3460 | The heap LFUDA policy keeps popular objects in cache regardless of |
3461 | their size and thus optimizes byte hit rate at the expense of | |
3462 | hit rate since one large, popular object will prevent many | |
3463 | smaller, slightly less popular objects from being cached. | |
0976f8db | 3464 | |
41bd17a4 | 3465 | Both policies utilize a dynamic aging mechanism that prevents |
3466 | cache pollution that can otherwise occur with frequency-based | |
3467 | replacement policies. | |
7d90757b | 3468 | |
41bd17a4 | 3469 | NOTE: if using the LFUDA replacement policy you should increase |
b51ec8c8 | 3470 | the value of maximum_object_size above its default of 4 MB to |
41bd17a4 | 3471 | to maximize the potential byte hit rate improvement of LFUDA. |
dc1af3cf | 3472 | |
41bd17a4 | 3473 | For more information about the GDSF and LFUDA cache replacement |
3474 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
3475 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
6b698a21 | 3476 | DOC_END |
0976f8db | 3477 | |
a345387f AJ |
3478 | NAME: minimum_object_size |
3479 | COMMENT: (bytes) | |
3480 | TYPE: b_int64_t | |
3481 | DEFAULT: 0 KB | |
3482 | DEFAULT_DOC: no limit | |
3483 | LOC: Config.Store.minObjectSize | |
3484 | DOC_START | |
3485 | Objects smaller than this size will NOT be saved on disk. The | |
3486 | value is specified in bytes, and the default is 0 KB, which | |
3487 | means all responses can be stored. | |
3488 | DOC_END | |
3489 | ||
3490 | NAME: maximum_object_size | |
3491 | COMMENT: (bytes) | |
3492 | TYPE: b_int64_t | |
3493 | DEFAULT: 4 MB | |
3494 | LOC: Config.Store.maxObjectSize | |
3495 | DOC_START | |
499f852c | 3496 | Set the default value for max-size parameter on any cache_dir. |
a345387f AJ |
3497 | The value is specified in bytes, and the default is 4 MB. |
3498 | ||
3499 | If you wish to get a high BYTES hit ratio, you should probably | |
3500 | increase this (one 32 MB object hit counts for 3200 10KB | |
3501 | hits). | |
3502 | ||
3503 | If you wish to increase hit ratio more than you want to | |
3504 | save bandwidth you should leave this low. | |
3505 | ||
3506 | NOTE: if using the LFUDA replacement policy you should increase | |
3507 | this value to maximize the byte hit rate improvement of LFUDA! | |
3508 | See cache_replacement_policy for a discussion of this policy. | |
3509 | DOC_END | |
3510 | ||
41bd17a4 | 3511 | NAME: cache_dir |
3512 | TYPE: cachedir | |
3513 | DEFAULT: none | |
638402dd | 3514 | DEFAULT_DOC: No disk cache. Store cache ojects only in memory. |
41bd17a4 | 3515 | LOC: Config.cacheSwap |
6b698a21 | 3516 | DOC_START |
638402dd AJ |
3517 | Format: |
3518 | cache_dir Type Directory-Name Fs-specific-data [options] | |
0976f8db | 3519 | |
41bd17a4 | 3520 | You can specify multiple cache_dir lines to spread the |
3521 | cache among different disk partitions. | |
0976f8db | 3522 | |
41bd17a4 | 3523 | Type specifies the kind of storage system to use. Only "ufs" |
3524 | is built by default. To enable any of the other storage systems | |
3525 | see the --enable-storeio configure option. | |
0976f8db | 3526 | |
41bd17a4 | 3527 | 'Directory' is a top-level directory where cache swap |
3528 | files will be stored. If you want to use an entire disk | |
3529 | for caching, this can be the mount-point directory. | |
3530 | The directory must exist and be writable by the Squid | |
3531 | process. Squid will NOT create this directory for you. | |
0976f8db | 3532 | |
acf69d74 AJ |
3533 | In SMP configurations, cache_dir must not precede the workers option |
3534 | and should use configuration macros or conditionals to give each | |
3535 | worker interested in disk caching a dedicated cache directory. | |
3536 | ||
638402dd AJ |
3537 | |
3538 | ==== The ufs store type ==== | |
0976f8db | 3539 | |
41bd17a4 | 3540 | "ufs" is the old well-known Squid storage format that has always |
3541 | been there. | |
0976f8db | 3542 | |
638402dd AJ |
3543 | Usage: |
3544 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
0976f8db | 3545 | |
41bd17a4 | 3546 | 'Mbytes' is the amount of disk space (MB) to use under this |
3547 | directory. The default is 100 MB. Change this to suit your | |
3548 | configuration. Do NOT put the size of your disk drive here. | |
3549 | Instead, if you want Squid to use the entire disk drive, | |
3550 | subtract 20% and use that value. | |
0976f8db | 3551 | |
56fba4d0 | 3552 | 'L1' is the number of first-level subdirectories which |
41bd17a4 | 3553 | will be created under the 'Directory'. The default is 16. |
0976f8db | 3554 | |
56fba4d0 | 3555 | 'L2' is the number of second-level subdirectories which |
41bd17a4 | 3556 | will be created under each first-level directory. The default |
3557 | is 256. | |
0976f8db | 3558 | |
638402dd AJ |
3559 | |
3560 | ==== The aufs store type ==== | |
7f7db318 | 3561 | |
41bd17a4 | 3562 | "aufs" uses the same storage format as "ufs", utilizing |
3563 | POSIX-threads to avoid blocking the main Squid process on | |
3564 | disk-I/O. This was formerly known in Squid as async-io. | |
38f9c547 | 3565 | |
638402dd AJ |
3566 | Usage: |
3567 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
38f9c547 | 3568 | |
41bd17a4 | 3569 | see argument descriptions under ufs above |
38f9c547 | 3570 | |
638402dd AJ |
3571 | |
3572 | ==== The diskd store type ==== | |
38f9c547 | 3573 | |
41bd17a4 | 3574 | "diskd" uses the same storage format as "ufs", utilizing a |
3575 | separate process to avoid blocking the main Squid process on | |
3576 | disk-I/O. | |
4c3ef9b2 | 3577 | |
638402dd AJ |
3578 | Usage: |
3579 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
0976f8db | 3580 | |
41bd17a4 | 3581 | see argument descriptions under ufs above |
0976f8db | 3582 | |
41bd17a4 | 3583 | Q1 specifies the number of unacknowledged I/O requests when Squid |
3584 | stops opening new files. If this many messages are in the queues, | |
3585 | Squid won't open new files. Default is 64 | |
0976f8db | 3586 | |
41bd17a4 | 3587 | Q2 specifies the number of unacknowledged messages when Squid |
3588 | starts blocking. If this many messages are in the queues, | |
3589 | Squid blocks until it receives some replies. Default is 72 | |
0976f8db | 3590 | |
41bd17a4 | 3591 | When Q1 < Q2 (the default), the cache directory is optimized |
3592 | for lower response time at the expense of a decrease in hit | |
3593 | ratio. If Q1 > Q2, the cache directory is optimized for | |
3594 | higher hit ratio at the expense of an increase in response | |
3595 | time. | |
0976f8db | 3596 | |
e2851fe7 | 3597 | |
638402dd AJ |
3598 | ==== The rock store type ==== |
3599 | ||
3600 | Usage: | |
e51ce7da | 3601 | cache_dir rock Directory-Name Mbytes [options] |
e2851fe7 | 3602 | |
2e55f083 | 3603 | The Rock Store type is a database-style storage. All cached |
e51ce7da AR |
3604 | entries are stored in a "database" file, using fixed-size slots. |
3605 | A single entry occupies one or more slots. | |
e2851fe7 | 3606 | |
3e1dfe3d AR |
3607 | If possible, Squid using Rock Store creates a dedicated kid |
3608 | process called "disker" to avoid blocking Squid worker(s) on disk | |
3609 | I/O. One disker kid is created for each rock cache_dir. Diskers | |
3610 | are created only when Squid, running in daemon mode, has support | |
3611 | for the IpcIo disk I/O module. | |
e2851fe7 | 3612 | |
43ebbac3 AR |
3613 | swap-timeout=msec: Squid will not start writing a miss to or |
3614 | reading a hit from disk if it estimates that the swap operation | |
3615 | will take more than the specified number of milliseconds. By | |
3616 | default and when set to zero, disables the disk I/O time limit | |
3617 | enforcement. Ignored when using blocking I/O module because | |
3618 | blocking synchronous I/O does not allow Squid to estimate the | |
3619 | expected swap wait time. | |
3620 | ||
df881a0f | 3621 | max-swap-rate=swaps/sec: Artificially limits disk access using |
1e614370 | 3622 | the specified I/O rate limit. Swap out requests that |
df881a0f | 3623 | would cause the average I/O rate to exceed the limit are |
1e614370 DK |
3624 | delayed. Individual swap in requests (i.e., hits or reads) are |
3625 | not delayed, but they do contribute to measured swap rate and | |
3626 | since they are placed in the same FIFO queue as swap out | |
3627 | requests, they may wait longer if max-swap-rate is smaller. | |
3628 | This is necessary on file systems that buffer "too | |
df881a0f AR |
3629 | many" writes and then start blocking Squid and other processes |
3630 | while committing those writes to disk. Usually used together | |
3631 | with swap-timeout to avoid excessive delays and queue overflows | |
3632 | when disk demand exceeds available disk "bandwidth". By default | |
3633 | and when set to zero, disables the disk I/O rate limit | |
3634 | enforcement. Currently supported by IpcIo module only. | |
3635 | ||
e51ce7da AR |
3636 | slot-size=bytes: The size of a database "record" used for |
3637 | storing cached responses. A cached response occupies at least | |
3638 | one slot and all database I/O is done using individual slots so | |
3639 | increasing this parameter leads to more disk space waste while | |
3640 | decreasing it leads to more disk I/O overheads. Should be a | |
3641 | multiple of your operating system I/O page size. Defaults to | |
3642 | 16KBytes. A housekeeping header is stored with each slot and | |
3643 | smaller slot-sizes will be rejected. The header is smaller than | |
3644 | 100 bytes. | |
df881a0f | 3645 | |
0976f8db | 3646 | |
638402dd | 3647 | ==== COMMON OPTIONS ==== |
db263d62 | 3648 | |
638402dd | 3649 | no-store no new objects should be stored to this cache_dir. |
0976f8db | 3650 | |
638402dd AJ |
3651 | min-size=n the minimum object size in bytes this cache_dir |
3652 | will accept. It's used to restrict a cache_dir | |
3653 | to only store large objects (e.g. AUFS) while | |
3654 | other stores are optimized for smaller objects | |
73656056 | 3655 | (e.g. Rock). |
638402dd | 3656 | Defaults to 0. |
0976f8db | 3657 | |
638402dd AJ |
3658 | max-size=n the maximum object size in bytes this cache_dir |
3659 | supports. | |
499f852c A |
3660 | The value in maximum_object_size directive sets |
3661 | the default unless more specific details are | |
3662 | available (ie a small store capacity). | |
0976f8db | 3663 | |
41bd17a4 | 3664 | Note: To make optimal use of the max-size limits you should order |
638402dd | 3665 | the cache_dir lines with the smallest max-size value first. |
0976f8db | 3666 | |
bebc043b | 3667 | NOCOMMENT_START |
e0855596 AJ |
3668 | |
3669 | # Uncomment and adjust the following to add a disk cache directory. | |
3670 | #cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
bebc043b | 3671 | NOCOMMENT_END |
6b698a21 | 3672 | DOC_END |
0976f8db | 3673 | |
41bd17a4 | 3674 | NAME: store_dir_select_algorithm |
3675 | TYPE: string | |
3676 | LOC: Config.store_dir_select_algorithm | |
3677 | DEFAULT: least-load | |
6b698a21 | 3678 | DOC_START |
638402dd AJ |
3679 | How Squid selects which cache_dir to use when the response |
3680 | object will fit into more than one. | |
3681 | ||
3682 | Regardless of which algorithm is used the cache_dir min-size | |
3683 | and max-size parameters are obeyed. As such they can affect | |
3684 | the selection algorithm by limiting the set of considered | |
3685 | cache_dir. | |
3686 | ||
3687 | Algorithms: | |
3688 | ||
3689 | least-load | |
3690 | ||
3691 | This algorithm is suited to caches with similar cache_dir | |
3692 | sizes and disk speeds. | |
3693 | ||
3694 | The disk with the least I/O pending is selected. | |
3695 | When there are multiple disks with the same I/O load ranking | |
3696 | the cache_dir with most available capacity is selected. | |
3697 | ||
3698 | When a mix of cache_dir sizes are configured the faster disks | |
3699 | have a naturally lower I/O loading and larger disks have more | |
3700 | capacity. So space used to store objects and data throughput | |
3701 | may be very unbalanced towards larger disks. | |
3702 | ||
3703 | ||
3704 | round-robin | |
3705 | ||
3706 | This algorithm is suited to caches with unequal cache_dir | |
3707 | disk sizes. | |
3708 | ||
3709 | Each cache_dir is selected in a rotation. The next suitable | |
3710 | cache_dir is used. | |
3711 | ||
3712 | Available cache_dir capacity is only considered in relation | |
3713 | to whether the object will fit and meets the min-size and | |
3714 | max-size parameters. | |
3715 | ||
3716 | Disk I/O loading is only considered to prevent overload on slow | |
3717 | disks. This algorithm does not spread objects by size, so any | |
3718 | I/O loading per-disk may appear very unbalanced and volatile. | |
3719 | ||
6b698a21 | 3720 | DOC_END |
0976f8db | 3721 | |
41bd17a4 | 3722 | NAME: max_open_disk_fds |
3723 | TYPE: int | |
3724 | LOC: Config.max_open_disk_fds | |
3725 | DEFAULT: 0 | |
638402dd | 3726 | DEFAULT_DOC: no limit |
6b698a21 | 3727 | DOC_START |
41bd17a4 | 3728 | To avoid having disk as the I/O bottleneck Squid can optionally |
3729 | bypass the on-disk cache if more than this amount of disk file | |
3730 | descriptors are open. | |
3731 | ||
3732 | A value of 0 indicates no limit. | |
6b698a21 | 3733 | DOC_END |
0976f8db | 3734 | |
41bd17a4 | 3735 | NAME: cache_swap_low |
3736 | COMMENT: (percent, 0-100) | |
5473c134 | 3737 | TYPE: int |
41bd17a4 | 3738 | DEFAULT: 90 |
3739 | LOC: Config.Swap.lowWaterMark | |
638402dd AJ |
3740 | DOC_START |
3741 | The low-water mark for cache object replacement. | |
3742 | Replacement begins when the swap (disk) usage is above the | |
3743 | low-water mark and attempts to maintain utilization near the | |
3744 | low-water mark. As swap utilization gets close to high-water | |
3745 | mark object eviction becomes more aggressive. If utilization is | |
3746 | close to the low-water mark less replacement is done each time. | |
3747 | ||
3748 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
3749 | hundreds of MB. If this is the case you may wish to set these | |
3750 | numbers closer together. | |
3751 | ||
3752 | See also cache_swap_high | |
3753 | DOC_END | |
41bd17a4 | 3754 | |
3755 | NAME: cache_swap_high | |
3756 | COMMENT: (percent, 0-100) | |
3757 | TYPE: int | |
3758 | DEFAULT: 95 | |
3759 | LOC: Config.Swap.highWaterMark | |
6b698a21 | 3760 | DOC_START |
638402dd | 3761 | The high-water mark for cache object replacement. |
41bd17a4 | 3762 | Replacement begins when the swap (disk) usage is above the |
3763 | low-water mark and attempts to maintain utilization near the | |
3764 | low-water mark. As swap utilization gets close to high-water | |
3765 | mark object eviction becomes more aggressive. If utilization is | |
3766 | close to the low-water mark less replacement is done each time. | |
3767 | ||
3768 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
3769 | hundreds of MB. If this is the case you may wish to set these | |
3770 | numbers closer together. | |
638402dd AJ |
3771 | |
3772 | See also cache_swap_low | |
6b698a21 | 3773 | DOC_END |
0976f8db | 3774 | |
5473c134 | 3775 | COMMENT_START |
41bd17a4 | 3776 | LOGFILE OPTIONS |
5473c134 | 3777 | ----------------------------------------------------------------------------- |
3778 | COMMENT_END | |
0976f8db | 3779 | |
41bd17a4 | 3780 | NAME: logformat |
3781 | TYPE: logformat | |
20efa1c2 | 3782 | LOC: Log::TheConfig |
5473c134 | 3783 | DEFAULT: none |
638402dd | 3784 | DEFAULT_DOC: The format definitions squid, common, combined, referrer, useragent are built in. |
6b698a21 | 3785 | DOC_START |
41bd17a4 | 3786 | Usage: |
0976f8db | 3787 | |
41bd17a4 | 3788 | logformat <name> <format specification> |
0976f8db | 3789 | |
41bd17a4 | 3790 | Defines an access log format. |
6b698a21 | 3791 | |
41bd17a4 | 3792 | The <format specification> is a string with embedded % format codes |
5473c134 | 3793 | |
41bd17a4 | 3794 | % format codes all follow the same basic structure where all but |
3795 | the formatcode is optional. Output strings are automatically escaped | |
3796 | as required according to their context and the output format | |
3797 | modifiers are usually not needed, but can be specified if an explicit | |
3798 | output format is desired. | |
6b698a21 | 3799 | |
41bd17a4 | 3800 | % ["|[|'|#] [-] [[0]width] [{argument}] formatcode |
0976f8db | 3801 | |
41bd17a4 | 3802 | " output in quoted string format |
3803 | [ output in squid text log format as used by log_mime_hdrs | |
3804 | # output in URL quoted format | |
3805 | ' output as-is | |
5473c134 | 3806 | |
41bd17a4 | 3807 | - left aligned |
c32c6db7 AR |
3808 | |
3809 | width minimum and/or maximum field width: | |
3810 | [width_min][.width_max] | |
e2851fe7 AR |
3811 | When minimum starts with 0, the field is zero-padded. |
3812 | String values exceeding maximum width are truncated. | |
c32c6db7 | 3813 | |
41bd17a4 | 3814 | {arg} argument such as header name etc |
5473c134 | 3815 | |
41bd17a4 | 3816 | Format codes: |
5473c134 | 3817 | |
3ff65596 | 3818 | % a literal % character |
f4b68e1a AJ |
3819 | sn Unique sequence number per log line entry |
3820 | err_code The ID of an error response served by Squid or | |
3821 | a similar internal error identifier. | |
3822 | err_detail Additional err_code-dependent error information. | |
c7bcf010 | 3823 | note The annotation specified by the argument. Also |
d7f4a0b7 CT |
3824 | logs the adaptation meta headers set by the |
3825 | adaptation_meta configuration parameter. | |
c7bcf010 CT |
3826 | If no argument given all annotations logged. |
3827 | The argument may include a separator to use with | |
3828 | annotation values: | |
3829 | name[:separator] | |
3830 | By default, multiple note values are separated with "," | |
3831 | and multiple notes are separated with "\r\n". | |
3832 | When logging named notes with %{name}note, the | |
3833 | explicitly configured separator is used between note | |
3834 | values. When logging all notes with %note, the | |
3835 | explicitly configured separator is used between | |
3836 | individual notes. There is currently no way to | |
3837 | specify both value and notes separators when logging | |
3838 | all notes with %note. | |
f4b68e1a AJ |
3839 | |
3840 | Connection related format codes: | |
3841 | ||
41bd17a4 | 3842 | >a Client source IP address |
3843 | >A Client FQDN | |
3844 | >p Client source port | |
8652f8e7 AJ |
3845 | >eui Client source EUI (MAC address, EUI-48 or EUI-64 identifier) |
3846 | >la Local IP address the client connected to | |
3847 | >lp Local port number the client connected to | |
f123f5e9 CT |
3848 | >qos Client connection TOS/DSCP value set by Squid |
3849 | >nfmark Client connection netfilter mark set by Squid | |
8652f8e7 | 3850 | |
28417506 CT |
3851 | la Local listening IP address the client connection was connected to. |
3852 | lp Local listening port number the client connection was connected to. | |
3853 | ||
8652f8e7 AJ |
3854 | <a Server IP address of the last server or peer connection |
3855 | <A Server FQDN or peer name | |
3856 | <p Server port number of the last server or peer connection | |
c3a082ae | 3857 | <la Local IP address of the last server or peer connection |
152e24b3 | 3858 | <lp Local port number of the last server or peer connection |
f123f5e9 CT |
3859 | <qos Server connection TOS/DSCP value set by Squid |
3860 | <nfmark Server connection netfilter mark set by Squid | |
f4b68e1a AJ |
3861 | |
3862 | Time related format codes: | |
3863 | ||
41bd17a4 | 3864 | ts Seconds since epoch |
3865 | tu subsecond time (milliseconds) | |
3866 | tl Local time. Optional strftime format argument | |
3ff65596 | 3867 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 3868 | tg GMT time. Optional strftime format argument |
3ff65596 | 3869 | default %d/%b/%Y:%H:%M:%S %z |
41bd17a4 | 3870 | tr Response time (milliseconds) |
3ff65596 | 3871 | dt Total time spent making DNS lookups (milliseconds) |
af0ded40 CT |
3872 | tS Approximate master transaction start time in |
3873 | <full seconds since epoch>.<fractional seconds> format. | |
3874 | Currently, Squid considers the master transaction | |
3875 | started when a complete HTTP request header initiating | |
3876 | the transaction is received from the client. This is | |
3877 | the same value that Squid uses to calculate transaction | |
3878 | response time when logging %tr to access.log. Currently, | |
3879 | Squid uses millisecond resolution for %tS values, | |
3880 | similar to the default access.log "current time" field | |
3881 | (%ts.%03tu). | |
3ff65596 | 3882 | |
8652f8e7 AJ |
3883 | Access Control related format codes: |
3884 | ||
3885 | et Tag returned by external acl | |
3886 | ea Log string returned by external acl | |
3887 | un User name (any available) | |
3888 | ul User name from authentication | |
3889 | ue User name from external acl helper | |
3890 | ui User name from ident | |
3891 | us User name from SSL | |
d4806c91 CT |
3892 | credentials Client credentials. The exact meaning depends on |
3893 | the authentication scheme: For Basic authentication, | |
3894 | it is the password; for Digest, the realm sent by the | |
3895 | client; for NTLM and Negotiate, the client challenge | |
3896 | or client credentials prefixed with "YR " or "KK ". | |
8652f8e7 AJ |
3897 | |
3898 | HTTP related format codes: | |
3ff65596 | 3899 | |
d6df21d2 AJ |
3900 | REQUEST |
3901 | ||
3ff65596 | 3902 | [http::]rm Request method (GET/POST etc) |
f025622f AJ |
3903 | [http::]>rm Request method from client |
3904 | [http::]<rm Request method sent to server or peer | |
3905 | [http::]ru Request URL from client (historic, filtered for logging) | |
3906 | [http::]>ru Request URL from client | |
3907 | [http::]<ru Request URL sent to server or peer | |
5aca9cf2 AJ |
3908 | [http::]>rs Request URL scheme from client |
3909 | [http::]<rs Request URL scheme sent to server or peer | |
fa450988 | 3910 | [http::]>rd Request URL domain from client |
5aca9cf2 AJ |
3911 | [http::]>rd Request URL domain sent to server or peer |
3912 | [http::]>rP Request URL port from client | |
3913 | [http::]<rP Request URL port sent to server or peer | |
3914 | [http::]rp Request URL path excluding hostname | |
3915 | [http::]>rp Request URL path excluding hostname from client | |
3916 | [http::]<rp Request URL path excluding hostname sent to server or peer | |
3ff65596 | 3917 | [http::]rv Request protocol version |
f025622f AJ |
3918 | [http::]>rv Request protocol version from client |
3919 | [http::]<rv Request protocol version sent to server or peer | |
d6df21d2 | 3920 | |
5aca9cf2 | 3921 | [http::]>h Original received request header. |
19483c50 AR |
3922 | Usually differs from the request header sent by |
3923 | Squid, although most fields are often preserved. | |
3924 | Accepts optional header field name/value filter | |
3925 | argument using name[:[separator]element] format. | |
3926 | [http::]>ha Received request header after adaptation and | |
3927 | redirection (pre-cache REQMOD vectoring point). | |
3928 | Usually differs from the request header sent by | |
3929 | Squid, although most fields are often preserved. | |
6fca33e0 | 3930 | Optional header name argument as for >h |
d6df21d2 AJ |
3931 | |
3932 | ||
3933 | RESPONSE | |
3934 | ||
3935 | [http::]<Hs HTTP status code received from the next hop | |
3936 | [http::]>Hs HTTP status code sent to the client | |
3937 | ||
3ff65596 AR |
3938 | [http::]<h Reply header. Optional header name argument |
3939 | as for >h | |
d6df21d2 AJ |
3940 | |
3941 | [http::]mt MIME content type | |
3942 | ||
3943 | ||
3944 | SIZE COUNTERS | |
3945 | ||
3946 | [http::]st Total size of request + reply traffic with client | |
3947 | [http::]>st Total size of request received from client. | |
3948 | Excluding chunked encoding bytes. | |
3949 | [http::]<st Total size of reply sent to client (after adaptation) | |
3950 | ||
3951 | [http::]>sh Size of request headers received from client | |
3952 | [http::]<sh Size of reply headers sent to client (after adaptation) | |
3953 | ||
3ff65596 AR |
3954 | [http::]<sH Reply high offset sent |
3955 | [http::]<sS Upstream object size | |
d6df21d2 | 3956 | |
bae917ac CT |
3957 | [http::]<bs Number of HTTP-equivalent message body bytes |
3958 | received from the next hop, excluding chunked | |
3959 | transfer encoding and control messages. | |
3960 | Generated FTP/Gopher listings are treated as | |
3961 | received bodies. | |
d6df21d2 AJ |
3962 | |
3963 | ||
3964 | TIMING | |
3965 | ||
3ff65596 AR |
3966 | [http::]<pt Peer response time in milliseconds. The timer starts |
3967 | when the last request byte is sent to the next hop | |
3968 | and stops when the last response byte is received. | |
3969 | [http::]<tt Total server-side time in milliseconds. The timer | |
3970 | starts with the first connect request (or write I/O) | |
3971 | sent to the first selected peer. The timer stops | |
3972 | with the last I/O with the last peer. | |
3973 | ||
8652f8e7 AJ |
3974 | Squid handling related format codes: |
3975 | ||
3976 | Ss Squid request status (TCP_MISS etc) | |
3977 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
3978 | ||
08097970 AR |
3979 | SSL-related format codes: |
3980 | ||
3981 | ssl::bump_mode SslBump decision for the transaction: | |
3982 | ||
3983 | For CONNECT requests that initiated bumping of | |
3984 | a connection and for any request received on | |
3985 | an already bumped connection, Squid logs the | |
3986 | corresponding SslBump mode ("server-first" or | |
3987 | "client-first"). See the ssl_bump option for | |
3988 | more information about these modes. | |
3989 | ||
3990 | A "none" token is logged for requests that | |
3991 | triggered "ssl_bump" ACL evaluation matching | |
3992 | either a "none" rule or no rules at all. | |
3993 | ||
3994 | In all other cases, a single dash ("-") is | |
3995 | logged. | |
3996 | ||
cedca6e7 CT |
3997 | ssl::>sni SSL client SNI sent to Squid. Available only |
3998 | after the peek, stare, or splice SSL bumping | |
3999 | actions. | |
4000 | ||
5038f9d8 | 4001 | If ICAP is enabled, the following code becomes available (as |
3ff65596 AR |
4002 | well as ICAP log codes documented with the icap_log option): |
4003 | ||
4004 | icap::tt Total ICAP processing time for the HTTP | |
4005 | transaction. The timer ticks when ICAP | |
4006 | ACLs are checked and when ICAP | |
4007 | transaction is in progress. | |
4008 | ||
5038f9d8 | 4009 | If adaptation is enabled the following three codes become available: |
3ff65596 | 4010 | |
5038f9d8 AR |
4011 | adapt::<last_h The header of the last ICAP response or |
4012 | meta-information from the last eCAP | |
4013 | transaction related to the HTTP transaction. | |
4014 | Like <h, accepts an optional header name | |
4015 | argument. | |
3ff65596 AR |
4016 | |
4017 | adapt::sum_trs Summed adaptation transaction response | |
4018 | times recorded as a comma-separated list in | |
4019 | the order of transaction start time. Each time | |
4020 | value is recorded as an integer number, | |
4021 | representing response time of one or more | |
4022 | adaptation (ICAP or eCAP) transaction in | |
4023 | milliseconds. When a failed transaction is | |
4024 | being retried or repeated, its time is not | |
4025 | logged individually but added to the | |
4026 | replacement (next) transaction. See also: | |
4027 | adapt::all_trs. | |
4028 | ||
4029 | adapt::all_trs All adaptation transaction response times. | |
4030 | Same as adaptation_strs but response times of | |
4031 | individual transactions are never added | |
4032 | together. Instead, all transaction response | |
4033 | times are recorded individually. | |
4034 | ||
4035 | You can prefix adapt::*_trs format codes with adaptation | |
4036 | service name in curly braces to record response time(s) specific | |
4037 | to that service. For example: %{my_service}adapt::sum_trs | |
5473c134 | 4038 | |
f4698e0b CT |
4039 | If SSL is enabled, the following formating codes become available: |
4040 | ||
4041 | %ssl::>cert_subject The Subject field of the received client | |
4042 | SSL certificate or a dash ('-') if Squid has | |
4043 | received an invalid/malformed certificate or | |
4044 | no certificate at all. Consider encoding the | |
4045 | logged value because Subject often has spaces. | |
4046 | ||
4047 | %ssl::>cert_issuer The Issuer field of the received client | |
4048 | SSL certificate or a dash ('-') if Squid has | |
4049 | received an invalid/malformed certificate or | |
4050 | no certificate at all. Consider encoding the | |
4051 | logged value because Issuer often has spaces. | |
4052 | ||
7d9acc3c AJ |
4053 | The default formats available (which do not need re-defining) are: |
4054 | ||
bd85ea1f AJ |
4055 | logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt |
4056 | logformat common %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh | |
4057 | logformat combined %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
20efa1c2 AJ |
4058 | logformat referrer %ts.%03tu %>a %{Referer}>h %ru |
4059 | logformat useragent %>a [%tl] "%{User-Agent}>h" | |
4060 | ||
8652f8e7 AJ |
4061 | NOTE: When the log_mime_hdrs directive is set to ON. |
4062 | The squid, common and combined formats have a safely encoded copy | |
4063 | of the mime headers appended to each line within a pair of brackets. | |
4064 | ||
4065 | NOTE: The common and combined formats are not quite true to the Apache definition. | |
4066 | The logs from Squid contain an extra status and hierarchy code appended. | |
20efa1c2 | 4067 | |
5473c134 | 4068 | DOC_END |
4069 | ||
41bd17a4 | 4070 | NAME: access_log cache_access_log |
4071 | TYPE: access_log | |
4072 | LOC: Config.Log.accesslogs | |
82b7abe3 | 4073 | DEFAULT_IF_NONE: daemon:@DEFAULT_ACCESS_LOG@ squid |
5473c134 | 4074 | DOC_START |
fb0c2f17 NH |
4075 | Configures whether and how Squid logs HTTP and ICP transactions. |
4076 | If access logging is enabled, a single line is logged for every | |
4077 | matching HTTP or ICP request. The recommended directive formats are: | |
4078 | ||
4079 | access_log <module>:<place> [option ...] [acl acl ...] | |
4080 | access_log none [acl acl ...] | |
4081 | ||
4082 | The following directive format is accepted but may be deprecated: | |
82b7abe3 | 4083 | access_log <module>:<place> [<logformat name> [acl acl ...]] |
fb0c2f17 NH |
4084 | |
4085 | In most cases, the first ACL name must not contain the '=' character | |
4086 | and should not be equal to an existing logformat name. You can always | |
4087 | start with an 'all' ACL to work around those restrictions. | |
82b7abe3 AJ |
4088 | |
4089 | Will log to the specified module:place using the specified format (which | |
41bd17a4 | 4090 | must be defined in a logformat directive) those entries which match |
4091 | ALL the acl's specified (which must be defined in acl clauses). | |
82b7abe3 AJ |
4092 | If no acl is specified, all requests will be logged to this destination. |
4093 | ||
fb0c2f17 NH |
4094 | ===== Available options for the recommended directive format ===== |
4095 | ||
4096 | logformat=name Names log line format (either built-in or | |
4097 | defined by a logformat directive). Defaults | |
4098 | to 'squid'. | |
4099 | ||
4100 | buffer-size=64KB Defines approximate buffering limit for log | |
4101 | records (see buffered_logs). Squid should not | |
4102 | keep more than the specified size and, hence, | |
4103 | should flush records before the buffer becomes | |
4104 | full to avoid overflows under normal | |
4105 | conditions (the exact flushing algorithm is | |
4106 | module-dependent though). The on-error option | |
4107 | controls overflow handling. | |
4108 | ||
4109 | on-error=die|drop Defines action on unrecoverable errors. The | |
4110 | 'drop' action ignores (i.e., does not log) | |
4111 | affected log records. The default 'die' action | |
4112 | kills the affected worker. The drop action | |
4113 | support has not been tested for modules other | |
4114 | than tcp. | |
4115 | ||
82b7abe3 AJ |
4116 | ===== Modules Currently available ===== |
4117 | ||
bb7a1781 | 4118 | none Do not log any requests matching these ACL. |
82b7abe3 AJ |
4119 | Do not specify Place or logformat name. |
4120 | ||
4121 | stdio Write each log line to disk immediately at the completion of | |
4122 | each request. | |
4123 | Place: the filename and path to be written. | |
4124 | ||
4125 | daemon Very similar to stdio. But instead of writing to disk the log | |
4126 | line is passed to a daemon helper for asychronous handling instead. | |
4127 | Place: varies depending on the daemon. | |
4128 | ||
4129 | log_file_daemon Place: the file name and path to be written. | |
4130 | ||
4131 | syslog To log each request via syslog facility. | |
4132 | Place: The syslog facility and priority level for these entries. | |
4133 | Place Format: facility.priority | |
5473c134 | 4134 | |
82b7abe3 AJ |
4135 | where facility could be any of: |
4136 | authpriv, daemon, local0 ... local7 or user. | |
5473c134 | 4137 | |
82b7abe3 AJ |
4138 | And priority could be any of: |
4139 | err, warning, notice, info, debug. | |
4140 | ||
4141 | udp To send each log line as text data to a UDP receiver. | |
4142 | Place: The destination host name or IP and port. | |
f4fc8610 | 4143 | Place Format: //host:port |
df2eec10 | 4144 | |
2bf4e8fa | 4145 | tcp To send each log line as text data to a TCP receiver. |
fb0c2f17 | 4146 | Lines may be accumulated before sending (see buffered_logs). |
2bf4e8fa | 4147 | Place: The destination host name or IP and port. |
f4fc8610 | 4148 | Place Format: //host:port |
df2eec10 AJ |
4149 | |
4150 | Default: | |
82b7abe3 | 4151 | access_log daemon:@DEFAULT_ACCESS_LOG@ squid |
41bd17a4 | 4152 | DOC_END |
5473c134 | 4153 | |
3ff65596 AR |
4154 | NAME: icap_log |
4155 | TYPE: access_log | |
4156 | IFDEF: ICAP_CLIENT | |
4157 | LOC: Config.Log.icaplogs | |
4158 | DEFAULT: none | |
4159 | DOC_START | |
4160 | ICAP log files record ICAP transaction summaries, one line per | |
4161 | transaction. | |
4162 | ||
4163 | The icap_log option format is: | |
4164 | icap_log <filepath> [<logformat name> [acl acl ...]] | |
4165 | icap_log none [acl acl ...]] | |
4166 | ||
4167 | Please see access_log option documentation for details. The two | |
4168 | kinds of logs share the overall configuration approach and many | |
4169 | features. | |
4170 | ||
4171 | ICAP processing of a single HTTP message or transaction may | |
4172 | require multiple ICAP transactions. In such cases, multiple | |
4173 | ICAP transaction log lines will correspond to a single access | |
4174 | log line. | |
4175 | ||
4176 | ICAP log uses logformat codes that make sense for an ICAP | |
4177 | transaction. Header-related codes are applied to the HTTP header | |
4178 | embedded in an ICAP server response, with the following caveats: | |
4179 | For REQMOD, there is no HTTP response header unless the ICAP | |
4180 | server performed request satisfaction. For RESPMOD, the HTTP | |
4181 | request header is the header sent to the ICAP server. For | |
4182 | OPTIONS, there are no HTTP headers. | |
4183 | ||
4184 | The following format codes are also available for ICAP logs: | |
4185 | ||
4186 | icap::<A ICAP server IP address. Similar to <A. | |
4187 | ||
4188 | icap::<service_name ICAP service name from the icap_service | |
4189 | option in Squid configuration file. | |
4190 | ||
4191 | icap::ru ICAP Request-URI. Similar to ru. | |
4192 | ||
4193 | icap::rm ICAP request method (REQMOD, RESPMOD, or | |
4194 | OPTIONS). Similar to existing rm. | |
4195 | ||
4196 | icap::>st Bytes sent to the ICAP server (TCP payload | |
4197 | only; i.e., what Squid writes to the socket). | |
4198 | ||
4199 | icap::<st Bytes received from the ICAP server (TCP | |
4200 | payload only; i.e., what Squid reads from | |
4201 | the socket). | |
4202 | ||
bae917ac CT |
4203 | icap::<bs Number of message body bytes received from the |
4204 | ICAP server. ICAP message body, if any, usually | |
4205 | includes encapsulated HTTP message headers and | |
4206 | possibly encapsulated HTTP message body. The | |
4207 | HTTP body part is dechunked before its size is | |
4208 | computed. | |
4209 | ||
3ff65596 AR |
4210 | icap::tr Transaction response time (in |
4211 | milliseconds). The timer starts when | |
4212 | the ICAP transaction is created and | |
4213 | stops when the transaction is completed. | |
4214 | Similar to tr. | |
4215 | ||
4216 | icap::tio Transaction I/O time (in milliseconds). The | |
4217 | timer starts when the first ICAP request | |
4218 | byte is scheduled for sending. The timers | |
4219 | stops when the last byte of the ICAP response | |
4220 | is received. | |
4221 | ||
4222 | icap::to Transaction outcome: ICAP_ERR* for all | |
4223 | transaction errors, ICAP_OPT for OPTION | |
4224 | transactions, ICAP_ECHO for 204 | |
4225 | responses, ICAP_MOD for message | |
4226 | modification, and ICAP_SAT for request | |
4227 | satisfaction. Similar to Ss. | |
4228 | ||
4229 | icap::Hs ICAP response status code. Similar to Hs. | |
4230 | ||
4231 | icap::>h ICAP request header(s). Similar to >h. | |
4232 | ||
4233 | icap::<h ICAP response header(s). Similar to <h. | |
4234 | ||
4235 | The default ICAP log format, which can be used without an explicit | |
4236 | definition, is called icap_squid: | |
4237 | ||
4238 | logformat icap_squid %ts.%03tu %6icap::tr %>a %icap::to/%03icap::Hs %icap::<size %icap::rm %icap::ru% %un -/%icap::<A - | |
4239 | ||
5038f9d8 | 4240 | See also: logformat, log_icap, and %adapt::<last_h |
3ff65596 AR |
4241 | DOC_END |
4242 | ||
82b7abe3 AJ |
4243 | NAME: logfile_daemon |
4244 | TYPE: string | |
4245 | DEFAULT: @DEFAULT_LOGFILED@ | |
4246 | LOC: Log::TheConfig.logfile_daemon | |
4247 | DOC_START | |
4248 | Specify the path to the logfile-writing daemon. This daemon is | |
4249 | used to write the access and store logs, if configured. | |
14b24caf HN |
4250 | |
4251 | Squid sends a number of commands to the log daemon: | |
4252 | L<data>\n - logfile data | |
4253 | R\n - rotate file | |
4254 | T\n - truncate file | |
dd68402f | 4255 | O\n - reopen file |
14b24caf HN |
4256 | F\n - flush file |
4257 | r<n>\n - set rotate count to <n> | |
4258 | b<n>\n - 1 = buffer output, 0 = don't buffer output | |
4259 | ||
4260 | No responses is expected. | |
82b7abe3 AJ |
4261 | DOC_END |
4262 | ||
5b0f5383 | 4263 | NAME: log_access |
8ebad780 | 4264 | TYPE: obsolete |
5b0f5383 | 4265 | DOC_START |
8ebad780 | 4266 | Remove this line. Use acls with access_log directives to control access logging |
5b0f5383 | 4267 | DOC_END |
4268 | ||
3ff65596 | 4269 | NAME: log_icap |
8ebad780 CT |
4270 | TYPE: obsolete |
4271 | DOC_START | |
4272 | Remove this line. Use acls with icap_log directives to control icap logging | |
4273 | DOC_END | |
4274 | ||
4275 | NAME: stats_collection | |
3ff65596 | 4276 | TYPE: acl_access |
8ebad780 | 4277 | LOC: Config.accessList.stats_collection |
3ff65596 | 4278 | DEFAULT: none |
638402dd | 4279 | DEFAULT_DOC: Allow logging for all transactions. |
5b0f5383 | 4280 | COMMENT: allow|deny acl acl... |
3ff65596 | 4281 | DOC_START |
8ebad780 CT |
4282 | This options allows you to control which requests gets accounted |
4283 | in performance counters. | |
b3567eb5 FC |
4284 | |
4285 | This clause only supports fast acl types. | |
4286 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
3ff65596 AR |
4287 | DOC_END |
4288 | ||
41bd17a4 | 4289 | NAME: cache_store_log |
4290 | TYPE: string | |
df2eec10 | 4291 | DEFAULT: none |
41bd17a4 | 4292 | LOC: Config.Log.store |
4293 | DOC_START | |
4294 | Logs the activities of the storage manager. Shows which | |
4295 | objects are ejected from the cache, and which objects are | |
6d1dfcfc | 4296 | saved and for how long. |
df2eec10 | 4297 | There are not really utilities to analyze this data, so you can safely |
6d1dfcfc AJ |
4298 | disable it (the default). |
4299 | ||
4300 | Store log uses modular logging outputs. See access_log for the list | |
4301 | of modules supported. | |
4302 | ||
e0855596 | 4303 | Example: |
6d1dfcfc AJ |
4304 | cache_store_log stdio:@DEFAULT_STORE_LOG@ |
4305 | cache_store_log daemon:@DEFAULT_STORE_LOG@ | |
5473c134 | 4306 | DOC_END |
4307 | ||
41bd17a4 | 4308 | NAME: cache_swap_state cache_swap_log |
4309 | TYPE: string | |
4310 | LOC: Config.Log.swap | |
5473c134 | 4311 | DEFAULT: none |
638402dd | 4312 | DEFAULT_DOC: Store the journal inside its cache_dir |
5473c134 | 4313 | DOC_START |
41bd17a4 | 4314 | Location for the cache "swap.state" file. This index file holds |
4315 | the metadata of objects saved on disk. It is used to rebuild | |
4316 | the cache during startup. Normally this file resides in each | |
4317 | 'cache_dir' directory, but you may specify an alternate | |
4318 | pathname here. Note you must give a full filename, not just | |
4319 | a directory. Since this is the index for the whole object | |
4320 | list you CANNOT periodically rotate it! | |
5473c134 | 4321 | |
41bd17a4 | 4322 | If %s can be used in the file name it will be replaced with a |
4323 | a representation of the cache_dir name where each / is replaced | |
4324 | with '.'. This is needed to allow adding/removing cache_dir | |
4325 | lines when cache_swap_log is being used. | |
5473c134 | 4326 | |
41bd17a4 | 4327 | If have more than one 'cache_dir', and %s is not used in the name |
4328 | these swap logs will have names such as: | |
5473c134 | 4329 | |
41bd17a4 | 4330 | cache_swap_log.00 |
4331 | cache_swap_log.01 | |
4332 | cache_swap_log.02 | |
5473c134 | 4333 | |
41bd17a4 | 4334 | The numbered extension (which is added automatically) |
4335 | corresponds to the order of the 'cache_dir' lines in this | |
4336 | configuration file. If you change the order of the 'cache_dir' | |
4337 | lines in this file, these index files will NOT correspond to | |
4338 | the correct 'cache_dir' entry (unless you manually rename | |
4339 | them). We recommend you do NOT use this option. It is | |
4340 | better to keep these index files in each 'cache_dir' directory. | |
5473c134 | 4341 | DOC_END |
4342 | ||
41bd17a4 | 4343 | NAME: logfile_rotate |
4344 | TYPE: int | |
4345 | DEFAULT: 10 | |
4346 | LOC: Config.Log.rotateNumber | |
5473c134 | 4347 | DOC_START |
41bd17a4 | 4348 | Specifies the number of logfile rotations to make when you |
4349 | type 'squid -k rotate'. The default is 10, which will rotate | |
4350 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
4351 | disable the file name rotation, but the logfiles are still closed | |
4352 | and re-opened. This will enable you to rename the logfiles | |
4353 | yourself just before sending the rotate signal. | |
5473c134 | 4354 | |
41bd17a4 | 4355 | Note, the 'squid -k rotate' command normally sends a USR1 |
4356 | signal to the running squid process. In certain situations | |
4357 | (e.g. on Linux with Async I/O), USR1 is used for other | |
4358 | purposes, so -k rotate uses another signal. It is best to get | |
4359 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
4360 | <pid>'. | |
62493678 | 4361 | |
638402dd AJ |
4362 | Note, from Squid-3.1 this option is only a default for cache.log, |
4363 | that log can be rotated separately by using debug_options. | |
41bd17a4 | 4364 | DOC_END |
5473c134 | 4365 | |
41bd17a4 | 4366 | NAME: emulate_httpd_log |
20efa1c2 | 4367 | TYPE: obsolete |
41bd17a4 | 4368 | DOC_START |
20efa1c2 | 4369 | Replace this with an access_log directive using the format 'common' or 'combined'. |
5473c134 | 4370 | DOC_END |
4371 | ||
41bd17a4 | 4372 | NAME: log_ip_on_direct |
8652f8e7 | 4373 | TYPE: obsolete |
5473c134 | 4374 | DOC_START |
8652f8e7 | 4375 | Remove this option from your config. To log server or peer names use %<A in the log format. |
41bd17a4 | 4376 | DOC_END |
5473c134 | 4377 | |
41bd17a4 | 4378 | NAME: mime_table |
4379 | TYPE: string | |
4380 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
4381 | LOC: Config.mimeTablePathname | |
4382 | DOC_START | |
638402dd AJ |
4383 | Path to Squid's icon configuration file. |
4384 | ||
4385 | You shouldn't need to change this, but the default file contains | |
4386 | examples and formatting information if you do. | |
5473c134 | 4387 | DOC_END |
4388 | ||
41bd17a4 | 4389 | NAME: log_mime_hdrs |
4390 | COMMENT: on|off | |
4391 | TYPE: onoff | |
4392 | LOC: Config.onoff.log_mime_hdrs | |
4393 | DEFAULT: off | |
4394 | DOC_START | |
4395 | The Cache can record both the request and the response MIME | |
4396 | headers for each HTTP transaction. The headers are encoded | |
4397 | safely and will appear as two bracketed fields at the end of | |
4398 | the access log (for either the native or httpd-emulated log | |
4399 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
4400 | DOC_END | |
5473c134 | 4401 | |
41bd17a4 | 4402 | NAME: useragent_log |
20efa1c2 | 4403 | TYPE: obsolete |
5473c134 | 4404 | DOC_START |
20efa1c2 | 4405 | Replace this with an access_log directive using the format 'useragent'. |
5473c134 | 4406 | DOC_END |
4407 | ||
41bd17a4 | 4408 | NAME: referer_log referrer_log |
20efa1c2 | 4409 | TYPE: obsolete |
5473c134 | 4410 | DOC_START |
20efa1c2 | 4411 | Replace this with an access_log directive using the format 'referrer'. |
5473c134 | 4412 | DOC_END |
4413 | ||
41bd17a4 | 4414 | NAME: pid_filename |
4415 | TYPE: string | |
4416 | DEFAULT: @DEFAULT_PID_FILE@ | |
4417 | LOC: Config.pidFilename | |
5473c134 | 4418 | DOC_START |
41bd17a4 | 4419 | A filename to write the process-id to. To disable, enter "none". |
5473c134 | 4420 | DOC_END |
4421 | ||
41bd17a4 | 4422 | NAME: log_fqdn |
c581e96b | 4423 | TYPE: obsolete |
5473c134 | 4424 | DOC_START |
c581e96b | 4425 | Remove this option from your config. To log FQDN use %>A in the log format. |
5473c134 | 4426 | DOC_END |
4427 | ||
41bd17a4 | 4428 | NAME: client_netmask |
4429 | TYPE: address | |
4430 | LOC: Config.Addrs.client_netmask | |
0eb08770 | 4431 | DEFAULT: no_addr |
638402dd | 4432 | DEFAULT_DOC: Log full client IP address |
5473c134 | 4433 | DOC_START |
41bd17a4 | 4434 | A netmask for client addresses in logfiles and cachemgr output. |
4435 | Change this to protect the privacy of your cache clients. | |
4436 | A netmask of 255.255.255.0 will log all IP's in that range with | |
4437 | the last digit set to '0'. | |
5473c134 | 4438 | DOC_END |
4439 | ||
41bd17a4 | 4440 | NAME: forward_log |
20efa1c2 | 4441 | TYPE: obsolete |
5473c134 | 4442 | DOC_START |
20efa1c2 | 4443 | Use a regular access.log with ACL limiting it to MISS events. |
5473c134 | 4444 | DOC_END |
4445 | ||
41bd17a4 | 4446 | NAME: strip_query_terms |
5473c134 | 4447 | TYPE: onoff |
41bd17a4 | 4448 | LOC: Config.onoff.strip_query_terms |
5473c134 | 4449 | DEFAULT: on |
4450 | DOC_START | |
41bd17a4 | 4451 | By default, Squid strips query terms from requested URLs before |
638402dd AJ |
4452 | logging. This protects your user's privacy and reduces log size. |
4453 | ||
4454 | When investigating HIT/MISS or other caching behaviour you | |
4455 | will need to disable this to see the full URL used by Squid. | |
5473c134 | 4456 | DOC_END |
4457 | ||
41bd17a4 | 4458 | NAME: buffered_logs |
4459 | COMMENT: on|off | |
4460 | TYPE: onoff | |
4461 | DEFAULT: off | |
4462 | LOC: Config.onoff.buffered_logs | |
5473c134 | 4463 | DOC_START |
638402dd AJ |
4464 | Whether to write/send access_log records ASAP or accumulate them and |
4465 | then write/send them in larger chunks. Buffering may improve | |
4466 | performance because it decreases the number of I/Os. However, | |
4467 | buffering increases the delay before log records become available to | |
4468 | the final recipient (e.g., a disk file or logging daemon) and, | |
4469 | hence, increases the risk of log records loss. | |
4470 | ||
4471 | Note that even when buffered_logs are off, Squid may have to buffer | |
4472 | records if it cannot write/send them immediately due to pending I/Os | |
4473 | (e.g., the I/O writing the previous log record) or connectivity loss. | |
4474 | ||
fb0c2f17 | 4475 | Currently honored by 'daemon' and 'tcp' access_log modules only. |
6b698a21 | 4476 | DOC_END |
0976f8db | 4477 | |
2b753521 | 4478 | NAME: netdb_filename |
4479 | TYPE: string | |
221faecb | 4480 | DEFAULT: stdio:@DEFAULT_NETDB_FILE@ |
2b753521 | 4481 | LOC: Config.netdbFilename |
fb6a61d1 | 4482 | IFDEF: USE_ICMP |
2b753521 | 4483 | DOC_START |
638402dd AJ |
4484 | Where Squid stores it's netdb journal. |
4485 | When enabled this journal preserves netdb state between restarts. | |
4486 | ||
2b753521 | 4487 | To disable, enter "none". |
4488 | DOC_END | |
4489 | ||
62493678 AJ |
4490 | COMMENT_START |
4491 | OPTIONS FOR TROUBLESHOOTING | |
4492 | ----------------------------------------------------------------------------- | |
4493 | COMMENT_END | |
4494 | ||
4495 | NAME: cache_log | |
4496 | TYPE: string | |
62493678 AJ |
4497 | DEFAULT_IF_NONE: @DEFAULT_CACHE_LOG@ |
4498 | LOC: Debug::cache_log | |
4499 | DOC_START | |
638402dd AJ |
4500 | Squid administrative logging file. |
4501 | ||
4502 | This is where general information about Squid behavior goes. You can | |
4503 | increase the amount of data logged to this file and how often it is | |
4504 | rotated with "debug_options" | |
62493678 AJ |
4505 | DOC_END |
4506 | ||
4507 | NAME: debug_options | |
4508 | TYPE: eol | |
47df1aa7 | 4509 | DEFAULT: ALL,1 |
638402dd | 4510 | DEFAULT_DOC: Log all critical and important messages. |
62493678 AJ |
4511 | LOC: Debug::debugOptions |
4512 | DOC_START | |
4513 | Logging options are set as section,level where each source file | |
4514 | is assigned a unique section. Lower levels result in less | |
4515 | output, Full debugging (level 9) can result in a very large | |
4516 | log file, so be careful. | |
4517 | ||
4518 | The magic word "ALL" sets debugging levels for all sections. | |
638402dd | 4519 | The default is to run with "ALL,1" to record important warnings. |
62493678 | 4520 | |
47df1aa7 AJ |
4521 | The rotate=N option can be used to keep more or less of these logs |
4522 | than would otherwise be kept by logfile_rotate. | |
62493678 AJ |
4523 | For most uses a single log should be enough to monitor current |
4524 | events affecting Squid. | |
4525 | DOC_END | |
4526 | ||
4527 | NAME: coredump_dir | |
4528 | TYPE: string | |
4529 | LOC: Config.coredump_dir | |
62493678 | 4530 | DEFAULT_IF_NONE: none |
638402dd | 4531 | DEFAULT_DOC: Use the directory from where Squid was started. |
62493678 AJ |
4532 | DOC_START |
4533 | By default Squid leaves core files in the directory from where | |
4534 | it was started. If you set 'coredump_dir' to a directory | |
4535 | that exists, Squid will chdir() to that directory at startup | |
4536 | and coredump files will be left there. | |
4537 | ||
4538 | NOCOMMENT_START | |
e0855596 | 4539 | |
62493678 AJ |
4540 | # Leave coredumps in the first cache dir |
4541 | coredump_dir @DEFAULT_SWAP_DIR@ | |
4542 | NOCOMMENT_END | |
4543 | DOC_END | |
4544 | ||
4545 | ||
41bd17a4 | 4546 | COMMENT_START |
4547 | OPTIONS FOR FTP GATEWAYING | |
4548 | ----------------------------------------------------------------------------- | |
4549 | COMMENT_END | |
4550 | ||
4551 | NAME: ftp_user | |
4552 | TYPE: string | |
4553 | DEFAULT: Squid@ | |
4554 | LOC: Config.Ftp.anon_user | |
6b698a21 | 4555 | DOC_START |
41bd17a4 | 4556 | If you want the anonymous login password to be more informative |
638402dd | 4557 | (and enable the use of picky FTP servers), set this to something |
41bd17a4 | 4558 | reasonable for your domain, like wwwuser@somewhere.net |
7f7db318 | 4559 | |
41bd17a4 | 4560 | The reason why this is domainless by default is the |
4561 | request can be made on the behalf of a user in any domain, | |
4562 | depending on how the cache is used. | |
638402dd | 4563 | Some FTP server also validate the email address is valid |
41bd17a4 | 4564 | (for example perl.com). |
6b698a21 | 4565 | DOC_END |
0976f8db | 4566 | |
41bd17a4 | 4567 | NAME: ftp_passive |
4568 | TYPE: onoff | |
4569 | DEFAULT: on | |
4570 | LOC: Config.Ftp.passive | |
6b698a21 | 4571 | DOC_START |
41bd17a4 | 4572 | If your firewall does not allow Squid to use passive |
4573 | connections, turn off this option. | |
a689bd4e | 4574 | |
4575 | Use of ftp_epsv_all option requires this to be ON. | |
4576 | DOC_END | |
4577 | ||
4578 | NAME: ftp_epsv_all | |
4579 | TYPE: onoff | |
4580 | DEFAULT: off | |
4581 | LOC: Config.Ftp.epsv_all | |
4582 | DOC_START | |
4583 | FTP Protocol extensions permit the use of a special "EPSV ALL" command. | |
4584 | ||
4585 | NATs may be able to put the connection on a "fast path" through the | |
4586 | translator, as the EPRT command will never be used and therefore, | |
4587 | translation of the data portion of the segments will never be needed. | |
4588 | ||
b3567eb5 FC |
4589 | When a client only expects to do two-way FTP transfers this may be |
4590 | useful. | |
a689bd4e | 4591 | If squid finds that it must do a three-way FTP transfer after issuing |
4592 | an EPSV ALL command, the FTP session will fail. | |
4593 | ||
4594 | If you have any doubts about this option do not use it. | |
4595 | Squid will nicely attempt all other connection methods. | |
4596 | ||
51ee534d AJ |
4597 | Requires ftp_passive to be ON (default) for any effect. |
4598 | DOC_END | |
4599 | ||
4600 | NAME: ftp_epsv | |
ddf5aa2b CT |
4601 | TYPE: ftp_epsv |
4602 | DEFAULT: none | |
4603 | LOC: Config.accessList.ftp_epsv | |
51ee534d AJ |
4604 | DOC_START |
4605 | FTP Protocol extensions permit the use of a special "EPSV" command. | |
4606 | ||
4607 | NATs may be able to put the connection on a "fast path" through the | |
b3567eb5 FC |
4608 | translator using EPSV, as the EPRT command will never be used |
4609 | and therefore, translation of the data portion of the segments | |
4610 | will never be needed. | |
51ee534d | 4611 | |
ddf5aa2b CT |
4612 | EPSV is often required to interoperate with FTP servers on IPv6 |
4613 | networks. On the other hand, it may break some IPv4 servers. | |
4614 | ||
4615 | By default, EPSV may try EPSV with any FTP server. To fine tune | |
4616 | that decision, you may restrict EPSV to certain clients or servers | |
4617 | using ACLs: | |
4618 | ||
4619 | ftp_epsv allow|deny al1 acl2 ... | |
51ee534d | 4620 | |
ddf5aa2b | 4621 | WARNING: Disabling EPSV may cause problems with external NAT and IPv6. |
51ee534d | 4622 | |
ddf5aa2b | 4623 | Only fast ACLs are supported. |
51ee534d | 4624 | Requires ftp_passive to be ON (default) for any effect. |
41bd17a4 | 4625 | DOC_END |
9e7dbc51 | 4626 | |
63ee5443 AJ |
4627 | NAME: ftp_eprt |
4628 | TYPE: onoff | |
4629 | DEFAULT: on | |
4630 | LOC: Config.Ftp.eprt | |
4631 | DOC_START | |
4632 | FTP Protocol extensions permit the use of a special "EPRT" command. | |
4633 | ||
4634 | This extension provides a protocol neutral alternative to the | |
4635 | IPv4-only PORT command. When supported it enables active FTP data | |
4636 | channels over IPv6 and efficient NAT handling. | |
4637 | ||
4638 | Turning this OFF will prevent EPRT being attempted and will skip | |
4639 | straight to using PORT for IPv4 servers. | |
4640 | ||
4641 | Some devices are known to not handle this extension correctly and | |
4642 | may result in crashes. Devices which suport EPRT enough to fail | |
4643 | cleanly will result in Squid attempting PORT anyway. This directive | |
4644 | should only be disabled when EPRT results in device failures. | |
4645 | ||
4646 | WARNING: Doing so will convert Squid back to the old behavior with all | |
4647 | the related problems with external NAT devices/layers and IPv4-only FTP. | |
4648 | DOC_END | |
4649 | ||
41bd17a4 | 4650 | NAME: ftp_sanitycheck |
4651 | TYPE: onoff | |
4652 | DEFAULT: on | |
4653 | LOC: Config.Ftp.sanitycheck | |
4654 | DOC_START | |
4655 | For security and data integrity reasons Squid by default performs | |
4656 | sanity checks of the addresses of FTP data connections ensure the | |
4657 | data connection is to the requested server. If you need to allow | |
4658 | FTP connections to servers using another IP address for the data | |
4659 | connection turn this off. | |
4660 | DOC_END | |
9e7dbc51 | 4661 | |
41bd17a4 | 4662 | NAME: ftp_telnet_protocol |
4663 | TYPE: onoff | |
4664 | DEFAULT: on | |
4665 | LOC: Config.Ftp.telnet | |
4666 | DOC_START | |
4667 | The FTP protocol is officially defined to use the telnet protocol | |
4668 | as transport channel for the control connection. However, many | |
4669 | implementations are broken and does not respect this aspect of | |
4670 | the FTP protocol. | |
4671 | ||
4672 | If you have trouble accessing files with ASCII code 255 in the | |
4673 | path or similar problems involving this ASCII code you can | |
4674 | try setting this directive to off. If that helps, report to the | |
4675 | operator of the FTP server in question that their FTP server | |
4676 | is broken and does not follow the FTP standard. | |
4677 | DOC_END | |
4678 | ||
4679 | COMMENT_START | |
4680 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
4681 | ----------------------------------------------------------------------------- | |
4682 | COMMENT_END | |
4683 | ||
4684 | NAME: diskd_program | |
4685 | TYPE: string | |
4686 | DEFAULT: @DEFAULT_DISKD@ | |
4687 | LOC: Config.Program.diskd | |
4688 | DOC_START | |
4689 | Specify the location of the diskd executable. | |
4690 | Note this is only useful if you have compiled in | |
4691 | diskd as one of the store io modules. | |
4692 | DOC_END | |
4693 | ||
4694 | NAME: unlinkd_program | |
4695 | IFDEF: USE_UNLINKD | |
4696 | TYPE: string | |
4697 | DEFAULT: @DEFAULT_UNLINKD@ | |
4698 | LOC: Config.Program.unlinkd | |
4699 | DOC_START | |
4700 | Specify the location of the executable for file deletion process. | |
4701 | DOC_END | |
4702 | ||
4703 | NAME: pinger_program | |
4704 | TYPE: string | |
4705 | DEFAULT: @DEFAULT_PINGER@ | |
cc192b50 | 4706 | LOC: Config.pinger.program |
41bd17a4 | 4707 | IFDEF: USE_ICMP |
4708 | DOC_START | |
4709 | Specify the location of the executable for the pinger process. | |
4710 | DOC_END | |
4711 | ||
cc192b50 | 4712 | NAME: pinger_enable |
4713 | TYPE: onoff | |
4714 | DEFAULT: on | |
4715 | LOC: Config.pinger.enable | |
4716 | IFDEF: USE_ICMP | |
4717 | DOC_START | |
4718 | Control whether the pinger is active at run-time. | |
b3567eb5 FC |
4719 | Enables turning ICMP pinger on and off with a simple |
4720 | squid -k reconfigure. | |
cc192b50 | 4721 | DOC_END |
4722 | ||
4723 | ||
41bd17a4 | 4724 | COMMENT_START |
4725 | OPTIONS FOR URL REWRITING | |
4726 | ----------------------------------------------------------------------------- | |
4727 | COMMENT_END | |
4728 | ||
4729 | NAME: url_rewrite_program redirect_program | |
4730 | TYPE: wordlist | |
4731 | LOC: Config.Program.redirect | |
4732 | DEFAULT: none | |
4733 | DOC_START | |
2c7aad89 | 4734 | Specify the location of the executable URL rewriter to use. |
41bd17a4 | 4735 | Since they can perform almost any function there isn't one included. |
4736 | ||
2c7aad89 | 4737 | For each requested URL, the rewriter will receive on line with the format |
41bd17a4 | 4738 | |
b11724bb | 4739 | [channel-ID <SP>] URL [<SP> extras]<NL> |
5269ec0e | 4740 | |
c71adec1 | 4741 | |
5269ec0e AJ |
4742 | After processing the request the helper must reply using the following format: |
4743 | ||
24eac830 | 4744 | [channel-ID <SP>] result [<SP> kv-pairs] |
5269ec0e AJ |
4745 | |
4746 | The result code can be: | |
4747 | ||
4748 | OK status=30N url="..." | |
4749 | Redirect the URL to the one supplied in 'url='. | |
4750 | 'status=' is optional and contains the status code to send | |
4751 | the client in Squids HTTP response. It must be one of the | |
4752 | HTTP redirect status codes: 301, 302, 303, 307, 308. | |
4753 | When no status is given Squid will use 302. | |
c71adec1 | 4754 | |
5269ec0e AJ |
4755 | OK rewrite-url="..." |
4756 | Rewrite the URL to the one supplied in 'rewrite-url='. | |
4757 | The new URL is fetched directly by Squid and returned to | |
4758 | the client as the response to its request. | |
4759 | ||
c2cbbb02 AJ |
4760 | OK |
4761 | When neither of url= and rewrite-url= are sent Squid does | |
4762 | not change the URL. | |
4763 | ||
5269ec0e AJ |
4764 | ERR |
4765 | Do not change the URL. | |
4766 | ||
4767 | BH | |
4ded749e | 4768 | An internal error occurred in the helper, preventing |
c2cbbb02 AJ |
4769 | a result being identified. The 'message=' key name is |
4770 | reserved for delivering a log message. | |
5269ec0e AJ |
4771 | |
4772 | ||
4773 | In the future, the interface protocol will be extended with | |
24eac830 | 4774 | key=value pairs ("kv-pairs" shown above). Helper programs |
c71adec1 | 4775 | should be prepared to receive and possibly ignore additional |
4776 | whitespace-separated tokens on each input line. | |
41bd17a4 | 4777 | |
5269ec0e AJ |
4778 | When using the concurrency= option the protocol is changed by |
4779 | introducing a query channel tag in front of the request/response. | |
4780 | The query channel tag is a number between 0 and concurrency-1. | |
4781 | This value must be echoed back unchanged to Squid as the first part | |
4782 | of the response relating to its request. | |
4783 | ||
4784 | WARNING: URL re-writing ability should be avoided whenever possible. | |
4785 | Use the URL redirect form of response instead. | |
41bd17a4 | 4786 | |
5269ec0e AJ |
4787 | Re-write creates a difference in the state held by the client |
4788 | and server. Possibly causing confusion when the server response | |
4789 | contains snippets of its view state. Embeded URLs, response | |
4790 | and content Location headers, etc. are not re-written by this | |
4791 | interface. | |
41bd17a4 | 4792 | |
4793 | By default, a URL rewriter is not used. | |
4794 | DOC_END | |
4795 | ||
4796 | NAME: url_rewrite_children redirect_children | |
48d54e4d | 4797 | TYPE: HelperChildConfig |
5b708d95 | 4798 | DEFAULT: 20 startup=0 idle=1 concurrency=0 |
41bd17a4 | 4799 | LOC: Config.redirectChildren |
4800 | DOC_START | |
48d54e4d AJ |
4801 | The maximum number of redirector processes to spawn. If you limit |
4802 | it too few Squid will have to wait for them to process a backlog of | |
4803 | URLs, slowing it down. If you allow too many they will use RAM | |
4804 | and other system resources noticably. | |
4805 | ||
4806 | The startup= and idle= options allow some measure of skew in your | |
4807 | tuning. | |
4808 | ||
4809 | startup= | |
4810 | ||
4811 | Sets a minimum of how many processes are to be spawned when Squid | |
4812 | starts or reconfigures. When set to zero the first request will | |
4813 | cause spawning of the first child process to handle it. | |
4814 | ||
4815 | Starting too few will cause an initial slowdown in traffic as Squid | |
4816 | attempts to simultaneously spawn enough processes to cope. | |
4817 | ||
4818 | idle= | |
4819 | ||
4820 | Sets a minimum of how many processes Squid is to try and keep available | |
4821 | at all times. When traffic begins to rise above what the existing | |
4822 | processes can handle this many more will be spawned up to the maximum | |
4823 | configured. A minimum setting of 1 is required. | |
4824 | ||
4825 | concurrency= | |
41bd17a4 | 4826 | |
41bd17a4 | 4827 | The number of requests each redirector helper can handle in |
4828 | parallel. Defaults to 0 which indicates the redirector | |
4829 | is a old-style single threaded redirector. | |
6a171502 AJ |
4830 | |
4831 | When this directive is set to a value >= 1 then the protocol | |
4832 | used to communicate with the helper is modified to include | |
9bef05b1 AJ |
4833 | an ID in front of the request/response. The ID from the request |
4834 | must be echoed back with the response to that request. | |
41bd17a4 | 4835 | DOC_END |
4836 | ||
4837 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
4838 | TYPE: onoff | |
4839 | DEFAULT: on | |
4840 | LOC: Config.onoff.redir_rewrites_host | |
4841 | DOC_START | |
3ce33807 AJ |
4842 | To preserve same-origin security policies in browsers and |
4843 | prevent Host: header forgery by redirectors Squid rewrites | |
4844 | any Host: header in redirected requests. | |
4845 | ||
4846 | If you are running an accelerator this may not be a wanted | |
4847 | effect of a redirector. This directive enables you disable | |
4848 | Host: alteration in reverse-proxy traffic. | |
4849 | ||
41bd17a4 | 4850 | WARNING: Entries are cached on the result of the URL rewriting |
4851 | process, so be careful if you have domain-virtual hosts. | |
3ce33807 AJ |
4852 | |
4853 | WARNING: Squid and other software verifies the URL and Host | |
4854 | are matching, so be careful not to relay through other proxies | |
4855 | or inspecting firewalls with this disabled. | |
41bd17a4 | 4856 | DOC_END |
4857 | ||
4858 | NAME: url_rewrite_access redirector_access | |
4859 | TYPE: acl_access | |
4860 | DEFAULT: none | |
638402dd | 4861 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
41bd17a4 | 4862 | LOC: Config.accessList.redirector |
4863 | DOC_START | |
4864 | If defined, this access list specifies which requests are | |
638402dd | 4865 | sent to the redirector processes. |
b3567eb5 FC |
4866 | |
4867 | This clause supports both fast and slow acl types. | |
4868 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 4869 | DOC_END |
4870 | ||
4871 | NAME: url_rewrite_bypass redirector_bypass | |
4872 | TYPE: onoff | |
4873 | LOC: Config.onoff.redirector_bypass | |
4874 | DEFAULT: off | |
4875 | DOC_START | |
4876 | When this is 'on', a request will not go through the | |
638402dd | 4877 | redirector if all the helpers are busy. If this is 'off' |
41bd17a4 | 4878 | and the redirector queue grows too large, Squid will exit |
4879 | with a FATAL error and ask you to increase the number of | |
4880 | redirectors. You should only enable this if the redirectors | |
4881 | are not critical to your caching system. If you use | |
4882 | redirectors for access control, and you enable this option, | |
4883 | users may have access to pages they should not | |
4884 | be allowed to request. | |
4885 | DOC_END | |
4886 | ||
fe7966ec | 4887 | NAME: url_rewrite_extras |
b11724bb CT |
4888 | TYPE: TokenOrQuotedString |
4889 | LOC: Config.redirector_extras | |
4890 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
cc192b50 | 4891 | DOC_START |
b11724bb CT |
4892 | Specifies a string to be append to request line format for the |
4893 | rewriter helper. "Quoted" format values may contain spaces and | |
4894 | logformat %macros. In theory, any logformat %macro can be used. | |
4895 | In practice, a %macro expands as a dash (-) if the helper request is | |
4896 | sent before the required macro information is available to Squid. | |
cc192b50 | 4897 | DOC_END |
4898 | ||
41bd17a4 | 4899 | COMMENT_START |
a8a0b1c2 | 4900 | OPTIONS FOR STORE ID |
41bd17a4 | 4901 | ----------------------------------------------------------------------------- |
4902 | COMMENT_END | |
4903 | ||
a8a0b1c2 | 4904 | NAME: store_id_program storeurl_rewrite_program |
41bd17a4 | 4905 | TYPE: wordlist |
a8a0b1c2 | 4906 | LOC: Config.Program.store_id |
41bd17a4 | 4907 | DEFAULT: none |
4908 | DOC_START | |
a8a0b1c2 | 4909 | Specify the location of the executable StoreID helper to use. |
41bd17a4 | 4910 | Since they can perform almost any function there isn't one included. |
4911 | ||
a8a0b1c2 | 4912 | For each requested URL, the helper will receive one line with the format |
41bd17a4 | 4913 | |
b11724bb | 4914 | [channel-ID <SP>] URL [<SP> extras]<NL> |
5269ec0e | 4915 | |
c71adec1 | 4916 | |
5269ec0e AJ |
4917 | After processing the request the helper must reply using the following format: |
4918 | ||
24eac830 | 4919 | [channel-ID <SP>] result [<SP> kv-pairs] |
5269ec0e AJ |
4920 | |
4921 | The result code can be: | |
4922 | ||
a8a0b1c2 EC |
4923 | OK store-id="..." |
4924 | Use the StoreID supplied in 'store-id='. | |
5269ec0e AJ |
4925 | |
4926 | ERR | |
a8a0b1c2 | 4927 | The default is to use HTTP request URL as the store ID. |
5269ec0e AJ |
4928 | |
4929 | BH | |
4930 | An internal error occured in the helper, preventing | |
4931 | a result being identified. | |
4932 | ||
4933 | ||
b11724bb CT |
4934 | Helper programs should be prepared to receive and possibly ignore |
4935 | additional whitespace-separated tokens on each input line. | |
41bd17a4 | 4936 | |
5269ec0e AJ |
4937 | When using the concurrency= option the protocol is changed by |
4938 | introducing a query channel tag in front of the request/response. | |
4939 | The query channel tag is a number between 0 and concurrency-1. | |
4940 | This value must be echoed back unchanged to Squid as the first part | |
4941 | of the response relating to its request. | |
4942 | ||
a8a0b1c2 EC |
4943 | NOTE: when using StoreID refresh_pattern will apply to the StoreID |
4944 | returned from the helper and not the URL. | |
41bd17a4 | 4945 | |
a8a0b1c2 EC |
4946 | WARNING: Wrong StoreID value returned by a careless helper may result |
4947 | in the wrong cached response returned to the user. | |
41bd17a4 | 4948 | |
a8a0b1c2 | 4949 | By default, a StoreID helper is not used. |
41bd17a4 | 4950 | DOC_END |
4951 | ||
fe7966ec | 4952 | NAME: store_id_extras |
b11724bb CT |
4953 | TYPE: TokenOrQuotedString |
4954 | LOC: Config.storeId_extras | |
4955 | DEFAULT: "%>a/%>A %un %>rm myip=%la myport=%lp" | |
4956 | DOC_START | |
4957 | Specifies a string to be append to request line format for the | |
4958 | StoreId helper. "Quoted" format values may contain spaces and | |
4959 | logformat %macros. In theory, any logformat %macro can be used. | |
4960 | In practice, a %macro expands as a dash (-) if the helper request is | |
4961 | sent before the required macro information is available to Squid. | |
4962 | DOC_END | |
4963 | ||
a8a0b1c2 | 4964 | NAME: store_id_children storeurl_rewrite_children |
48d54e4d | 4965 | TYPE: HelperChildConfig |
5b708d95 | 4966 | DEFAULT: 20 startup=0 idle=1 concurrency=0 |
a8a0b1c2 | 4967 | LOC: Config.storeIdChildren |
41bd17a4 | 4968 | DOC_START |
a8a0b1c2 | 4969 | The maximum number of StoreID helper processes to spawn. If you limit |
48d54e4d | 4970 | it too few Squid will have to wait for them to process a backlog of |
a8a0b1c2 | 4971 | requests, slowing it down. If you allow too many they will use RAM |
48d54e4d AJ |
4972 | and other system resources noticably. |
4973 | ||
4974 | The startup= and idle= options allow some measure of skew in your | |
4975 | tuning. | |
4976 | ||
4977 | startup= | |
4978 | ||
4979 | Sets a minimum of how many processes are to be spawned when Squid | |
4980 | starts or reconfigures. When set to zero the first request will | |
4981 | cause spawning of the first child process to handle it. | |
4982 | ||
4983 | Starting too few will cause an initial slowdown in traffic as Squid | |
4984 | attempts to simultaneously spawn enough processes to cope. | |
4985 | ||
4986 | idle= | |
4987 | ||
4988 | Sets a minimum of how many processes Squid is to try and keep available | |
4989 | at all times. When traffic begins to rise above what the existing | |
4990 | processes can handle this many more will be spawned up to the maximum | |
4991 | configured. A minimum setting of 1 is required. | |
4992 | ||
4993 | concurrency= | |
41bd17a4 | 4994 | |
a8a0b1c2 EC |
4995 | The number of requests each storeID helper can handle in |
4996 | parallel. Defaults to 0 which indicates the helper | |
4997 | is a old-style single threaded program. | |
6a171502 AJ |
4998 | |
4999 | When this directive is set to a value >= 1 then the protocol | |
5000 | used to communicate with the helper is modified to include | |
9bef05b1 AJ |
5001 | an ID in front of the request/response. The ID from the request |
5002 | must be echoed back with the response to that request. | |
41bd17a4 | 5003 | DOC_END |
5004 | ||
a8a0b1c2 | 5005 | NAME: store_id_access storeurl_rewrite_access |
41bd17a4 | 5006 | TYPE: acl_access |
5007 | DEFAULT: none | |
638402dd | 5008 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
a8a0b1c2 | 5009 | LOC: Config.accessList.store_id |
41bd17a4 | 5010 | DOC_START |
5011 | If defined, this access list specifies which requests are | |
a8a0b1c2 | 5012 | sent to the StoreID processes. By default all requests |
41bd17a4 | 5013 | are sent. |
b3567eb5 FC |
5014 | |
5015 | This clause supports both fast and slow acl types. | |
5016 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 5017 | DOC_END |
5018 | ||
a8a0b1c2 | 5019 | NAME: store_id_bypass storeurl_rewrite_bypass |
41bd17a4 | 5020 | TYPE: onoff |
a8a0b1c2 EC |
5021 | LOC: Config.onoff.store_id_bypass |
5022 | DEFAULT: on | |
41bd17a4 | 5023 | DOC_START |
5024 | When this is 'on', a request will not go through the | |
a8a0b1c2 EC |
5025 | helper if all helpers are busy. If this is 'off' |
5026 | and the helper queue grows too large, Squid will exit | |
41bd17a4 | 5027 | with a FATAL error and ask you to increase the number of |
a8a0b1c2 | 5028 | helpers. You should only enable this if the helperss |
41bd17a4 | 5029 | are not critical to your caching system. If you use |
a8a0b1c2 EC |
5030 | helpers for critical caching components, and you enable this |
5031 | option, users may not get objects from cache. | |
41bd17a4 | 5032 | DOC_END |
5033 | ||
5034 | COMMENT_START | |
5035 | OPTIONS FOR TUNING THE CACHE | |
5036 | ----------------------------------------------------------------------------- | |
5037 | COMMENT_END | |
5038 | ||
f04b37d8 | 5039 | NAME: cache no_cache |
5040 | TYPE: acl_access | |
5041 | DEFAULT: none | |
70706149 | 5042 | DEFAULT_DOC: By default, this directive is unused and has no effect. |
f04b37d8 | 5043 | LOC: Config.accessList.noCache |
41bd17a4 | 5044 | DOC_START |
70706149 AR |
5045 | Requests denied by this directive will not be served from the cache |
5046 | and their responses will not be stored in the cache. This directive | |
5047 | has no effect on other transactions and on already cached responses. | |
b3567eb5 FC |
5048 | |
5049 | This clause supports both fast and slow acl types. | |
5050 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
70706149 AR |
5051 | |
5052 | This and the two other similar caching directives listed below are | |
5053 | checked at different transaction processing stages, have different | |
5054 | access to response information, affect different cache operations, | |
5055 | and differ in slow ACLs support: | |
5056 | ||
5057 | * cache: Checked before Squid makes a hit/miss determination. | |
5058 | No access to reply information! | |
5059 | Denies both serving a hit and storing a miss. | |
5060 | Supports both fast and slow ACLs. | |
5061 | * send_hit: Checked after a hit was detected. | |
5062 | Has access to reply (hit) information. | |
5063 | Denies serving a hit only. | |
5064 | Supports fast ACLs only. | |
5065 | * store_miss: Checked before storing a cachable miss. | |
5066 | Has access to reply (miss) information. | |
5067 | Denies storing a miss only. | |
5068 | Supports fast ACLs only. | |
5069 | ||
5070 | If you are not sure which of the three directives to use, apply the | |
5071 | following decision logic: | |
5072 | ||
5073 | * If your ACL(s) are of slow type _and_ need response info, redesign. | |
5074 | Squid does not support that particular combination at this time. | |
5075 | Otherwise: | |
5076 | * If your directive ACL(s) are of slow type, use "cache"; and/or | |
5077 | * if your directive ACL(s) need no response info, use "cache". | |
5078 | Otherwise: | |
5079 | * If you do not want the response cached, use store_miss; and/or | |
5080 | * if you do not want a hit on a cached response, use send_hit. | |
5081 | DOC_END | |
5082 | ||
5083 | NAME: send_hit | |
5084 | TYPE: acl_access | |
5085 | DEFAULT: none | |
5086 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
5087 | LOC: Config.accessList.sendHit | |
5088 | DOC_START | |
5089 | Responses denied by this directive will not be served from the cache | |
5090 | (but may still be cached, see store_miss). This directive has no | |
5091 | effect on the responses it allows and on the cached objects. | |
5092 | ||
5093 | Please see the "cache" directive for a summary of differences among | |
5094 | store_miss, send_hit, and cache directives. | |
5095 | ||
5096 | Unlike the "cache" directive, send_hit only supports fast acl | |
5097 | types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5098 | ||
5099 | For example: | |
5100 | ||
5101 | # apply custom Store ID mapping to some URLs | |
5102 | acl MapMe dstdomain .c.example.com | |
5103 | store_id_program ... | |
5104 | store_id_access allow MapMe | |
5105 | ||
5106 | # but prevent caching of special responses | |
5107 | # such as 302 redirects that cause StoreID loops | |
5108 | acl Ordinary http_status 200-299 | |
5109 | store_miss deny MapMe !Ordinary | |
5110 | ||
5111 | # and do not serve any previously stored special responses | |
5112 | # from the cache (in case they were already cached before | |
5113 | # the above store_miss rule was in effect). | |
5114 | send_hit deny MapMe !Ordinary | |
5115 | DOC_END | |
5116 | ||
5117 | NAME: store_miss | |
5118 | TYPE: acl_access | |
5119 | DEFAULT: none | |
5120 | DEFAULT_DOC: By default, this directive is unused and has no effect. | |
5121 | LOC: Config.accessList.storeMiss | |
5122 | DOC_START | |
5123 | Responses denied by this directive will not be cached (but may still | |
5124 | be served from the cache, see send_hit). This directive has no | |
5125 | effect on the responses it allows and on the already cached responses. | |
5126 | ||
5127 | Please see the "cache" directive for a summary of differences among | |
5128 | store_miss, send_hit, and cache directives. See the | |
5129 | send_hit directive for a usage example. | |
5130 | ||
5131 | Unlike the "cache" directive, store_miss only supports fast acl | |
5132 | types. See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
41bd17a4 | 5133 | DOC_END |
5134 | ||
570d3f75 AJ |
5135 | NAME: max_stale |
5136 | COMMENT: time-units | |
5137 | TYPE: time_t | |
5138 | LOC: Config.maxStale | |
5139 | DEFAULT: 1 week | |
5140 | DOC_START | |
5141 | This option puts an upper limit on how stale content Squid | |
5142 | will serve from the cache if cache validation fails. | |
5143 | Can be overriden by the refresh_pattern max-stale option. | |
5144 | DOC_END | |
5145 | ||
41bd17a4 | 5146 | NAME: refresh_pattern |
5147 | TYPE: refreshpattern | |
5148 | LOC: Config.Refresh | |
5149 | DEFAULT: none | |
5150 | DOC_START | |
5151 | usage: refresh_pattern [-i] regex min percent max [options] | |
9e7dbc51 | 5152 | |
6b698a21 | 5153 | By default, regular expressions are CASE-SENSITIVE. To make |
5154 | them case-insensitive, use the -i option. | |
9e7dbc51 | 5155 | |
41bd17a4 | 5156 | 'Min' is the time (in minutes) an object without an explicit |
5157 | expiry time should be considered fresh. The recommended | |
5158 | value is 0, any higher values may cause dynamic applications | |
5159 | to be erroneously cached unless the application designer | |
5160 | has taken the appropriate actions. | |
9e7dbc51 | 5161 | |
41bd17a4 | 5162 | 'Percent' is a percentage of the objects age (time since last |
5163 | modification age) an object without explicit expiry time | |
5164 | will be considered fresh. | |
5b807763 | 5165 | |
41bd17a4 | 5166 | 'Max' is an upper limit on how long objects without an explicit |
5167 | expiry time will be considered fresh. | |
9e7dbc51 | 5168 | |
41bd17a4 | 5169 | options: override-expire |
5170 | override-lastmod | |
5171 | reload-into-ims | |
5172 | ignore-reload | |
41bd17a4 | 5173 | ignore-no-store |
4ca08219 | 5174 | ignore-must-revalidate |
41bd17a4 | 5175 | ignore-private |
5176 | ignore-auth | |
570d3f75 | 5177 | max-stale=NN |
41bd17a4 | 5178 | refresh-ims |
3d8b6ba4 | 5179 | store-stale |
a0ec9f68 | 5180 | |
41bd17a4 | 5181 | override-expire enforces min age even if the server |
9b2ad080 HN |
5182 | sent an explicit expiry time (e.g., with the |
5183 | Expires: header or Cache-Control: max-age). Doing this | |
5184 | VIOLATES the HTTP standard. Enabling this feature | |
5185 | could make you liable for problems which it causes. | |
6468fe10 | 5186 | |
04925576 AJ |
5187 | Note: override-expire does not enforce staleness - it only extends |
5188 | freshness / min. If the server returns a Expires time which | |
5189 | is longer than your max time, Squid will still consider | |
5190 | the object fresh for that period of time. | |
5191 | ||
41bd17a4 | 5192 | override-lastmod enforces min age even on objects |
5193 | that were modified recently. | |
934b03fc | 5194 | |
46017fdd CT |
5195 | reload-into-ims changes a client no-cache or ``reload'' |
5196 | request for a cached entry into a conditional request using | |
5197 | If-Modified-Since and/or If-None-Match headers, provided the | |
5198 | cached entry has a Last-Modified and/or a strong ETag header. | |
5199 | Doing this VIOLATES the HTTP standard. Enabling this feature | |
5200 | could make you liable for problems which it causes. | |
dba79ac5 | 5201 | |
41bd17a4 | 5202 | ignore-reload ignores a client no-cache or ``reload'' |
5203 | header. Doing this VIOLATES the HTTP standard. Enabling | |
5204 | this feature could make you liable for problems which | |
5205 | it causes. | |
9bc73deb | 5206 | |
41bd17a4 | 5207 | ignore-no-store ignores any ``Cache-control: no-store'' |
5208 | headers received from a server. Doing this VIOLATES | |
5209 | the HTTP standard. Enabling this feature could make you | |
5210 | liable for problems which it causes. | |
5211 | ||
4ca08219 AJ |
5212 | ignore-must-revalidate ignores any ``Cache-Control: must-revalidate`` |
5213 | headers received from a server. Doing this VIOLATES | |
5214 | the HTTP standard. Enabling this feature could make you | |
5215 | liable for problems which it causes. | |
5216 | ||
41bd17a4 | 5217 | ignore-private ignores any ``Cache-control: private'' |
5218 | headers received from a server. Doing this VIOLATES | |
5219 | the HTTP standard. Enabling this feature could make you | |
5220 | liable for problems which it causes. | |
5221 | ||
5222 | ignore-auth caches responses to requests with authorization, | |
5223 | as if the originserver had sent ``Cache-control: public'' | |
5224 | in the response header. Doing this VIOLATES the HTTP standard. | |
5225 | Enabling this feature could make you liable for problems which | |
5226 | it causes. | |
5227 | ||
5228 | refresh-ims causes squid to contact the origin server | |
5229 | when a client issues an If-Modified-Since request. This | |
5230 | ensures that the client will receive an updated version | |
5231 | if one is available. | |
5232 | ||
3d8b6ba4 AJ |
5233 | store-stale stores responses even if they don't have explicit |
5234 | freshness or a validator (i.e., Last-Modified or an ETag) | |
5235 | present, or if they're already stale. By default, Squid will | |
5236 | not cache such responses because they usually can't be | |
5237 | reused. Note that such responses will be stale by default. | |
5238 | ||
570d3f75 AJ |
5239 | max-stale=NN provide a maximum staleness factor. Squid won't |
5240 | serve objects more stale than this even if it failed to | |
5241 | validate the object. Default: use the max_stale global limit. | |
5242 | ||
41bd17a4 | 5243 | Basically a cached object is: |
5244 | ||
5245 | FRESH if expires < now, else STALE | |
5246 | STALE if age > max | |
5247 | FRESH if lm-factor < percent, else STALE | |
5248 | FRESH if age < min | |
5249 | else STALE | |
5250 | ||
5251 | The refresh_pattern lines are checked in the order listed here. | |
5252 | The first entry which matches is used. If none of the entries | |
5253 | match the default will be used. | |
5254 | ||
5255 | Note, you must uncomment all the default lines if you want | |
5256 | to change one. The default setting is only active if none is | |
5257 | used. | |
5258 | ||
41bd17a4 | 5259 | NOCOMMENT_START |
e0855596 | 5260 | |
638402dd | 5261 | # |
e0855596 | 5262 | # Add any of your own refresh_pattern entries above these. |
638402dd | 5263 | # |
41bd17a4 | 5264 | refresh_pattern ^ftp: 1440 20% 10080 |
5265 | refresh_pattern ^gopher: 1440 0% 1440 | |
89db45fa | 5266 | refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 |
41bd17a4 | 5267 | refresh_pattern . 0 20% 4320 |
5268 | NOCOMMENT_END | |
5269 | DOC_END | |
5270 | ||
5271 | NAME: quick_abort_min | |
5272 | COMMENT: (KB) | |
5273 | TYPE: kb_int64_t | |
5274 | DEFAULT: 16 KB | |
5275 | LOC: Config.quickAbort.min | |
5276 | DOC_NONE | |
5277 | ||
5278 | NAME: quick_abort_max | |
5279 | COMMENT: (KB) | |
5280 | TYPE: kb_int64_t | |
5281 | DEFAULT: 16 KB | |
5282 | LOC: Config.quickAbort.max | |
5283 | DOC_NONE | |
5284 | ||
5285 | NAME: quick_abort_pct | |
5286 | COMMENT: (percent) | |
5287 | TYPE: int | |
5288 | DEFAULT: 95 | |
5289 | LOC: Config.quickAbort.pct | |
5290 | DOC_START | |
5291 | The cache by default continues downloading aborted requests | |
5292 | which are almost completed (less than 16 KB remaining). This | |
5293 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
5294 | caches. Impatient users may tie up file descriptors and | |
5295 | bandwidth by repeatedly requesting and immediately aborting | |
5296 | downloads. | |
5297 | ||
5298 | When the user aborts a request, Squid will check the | |
5299 | quick_abort values to the amount of data transfered until | |
5300 | then. | |
5301 | ||
5302 | If the transfer has less than 'quick_abort_min' KB remaining, | |
5303 | it will finish the retrieval. | |
5304 | ||
5305 | If the transfer has more than 'quick_abort_max' KB remaining, | |
5306 | it will abort the retrieval. | |
5307 | ||
5308 | If more than 'quick_abort_pct' of the transfer has completed, | |
5309 | it will finish the retrieval. | |
5310 | ||
5311 | If you do not want any retrieval to continue after the client | |
5312 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
5313 | to '0 KB'. | |
5314 | ||
5315 | If you want retrievals to always continue if they are being | |
5316 | cached set 'quick_abort_min' to '-1 KB'. | |
5317 | DOC_END | |
60d096f4 | 5318 | |
41bd17a4 | 5319 | NAME: read_ahead_gap |
5320 | COMMENT: buffer-size | |
5321 | TYPE: b_int64_t | |
5322 | LOC: Config.readAheadGap | |
5323 | DEFAULT: 16 KB | |
5324 | DOC_START | |
5325 | The amount of data the cache will buffer ahead of what has been | |
5326 | sent to the client when retrieving an object from another server. | |
5327 | DOC_END | |
53e738c6 | 5328 | |
41bd17a4 | 5329 | NAME: negative_ttl |
626096be | 5330 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 5331 | COMMENT: time-units |
5332 | TYPE: time_t | |
5333 | LOC: Config.negativeTtl | |
ac9cc053 | 5334 | DEFAULT: 0 seconds |
41bd17a4 | 5335 | DOC_START |
ac9cc053 AJ |
5336 | Set the Default Time-to-Live (TTL) for failed requests. |
5337 | Certain types of failures (such as "connection refused" and | |
5338 | "404 Not Found") are able to be negatively-cached for a short time. | |
5339 | Modern web servers should provide Expires: header, however if they | |
5340 | do not this can provide a minimum TTL. | |
5341 | The default is not to cache errors with unknown expiry details. | |
5342 | ||
5343 | Note that this is different from negative caching of DNS lookups. | |
39956c7c AJ |
5344 | |
5345 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
5346 | this feature could make you liable for problems which it | |
5347 | causes. | |
41bd17a4 | 5348 | DOC_END |
53e738c6 | 5349 | |
41bd17a4 | 5350 | NAME: positive_dns_ttl |
5351 | COMMENT: time-units | |
5352 | TYPE: time_t | |
5353 | LOC: Config.positiveDnsTtl | |
5354 | DEFAULT: 6 hours | |
5355 | DOC_START | |
5356 | Upper limit on how long Squid will cache positive DNS responses. | |
5357 | Default is 6 hours (360 minutes). This directive must be set | |
5358 | larger than negative_dns_ttl. | |
5359 | DOC_END | |
c4ab8329 | 5360 | |
41bd17a4 | 5361 | NAME: negative_dns_ttl |
5362 | COMMENT: time-units | |
5363 | TYPE: time_t | |
5364 | LOC: Config.negativeDnsTtl | |
5365 | DEFAULT: 1 minutes | |
5366 | DOC_START | |
5367 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
5368 | This also sets the lower cache limit on positive lookups. | |
5369 | Minimum value is 1 second, and it is not recommendable to go | |
5370 | much below 10 seconds. | |
5371 | DOC_END | |
7df0bfd7 | 5372 | |
41bd17a4 | 5373 | NAME: range_offset_limit |
11e3fa1c AJ |
5374 | COMMENT: size [acl acl...] |
5375 | TYPE: acl_b_size_t | |
41bd17a4 | 5376 | LOC: Config.rangeOffsetLimit |
11e3fa1c | 5377 | DEFAULT: none |
41bd17a4 | 5378 | DOC_START |
11e3fa1c AJ |
5379 | usage: (size) [units] [[!]aclname] |
5380 | ||
5381 | Sets an upper limit on how far (number of bytes) into the file | |
5382 | a Range request may be to cause Squid to prefetch the whole file. | |
5383 | If beyond this limit, Squid forwards the Range request as it is and | |
5384 | the result is NOT cached. | |
5385 | ||
41bd17a4 | 5386 | This is to stop a far ahead range request (lets say start at 17MB) |
5387 | from making Squid fetch the whole object up to that point before | |
5388 | sending anything to the client. | |
11e3fa1c AJ |
5389 | |
5390 | Multiple range_offset_limit lines may be specified, and they will | |
5391 | be searched from top to bottom on each request until a match is found. | |
5392 | The first match found will be used. If no line matches a request, the | |
5393 | default limit of 0 bytes will be used. | |
5394 | ||
5395 | 'size' is the limit specified as a number of units. | |
5396 | ||
5397 | 'units' specifies whether to use bytes, KB, MB, etc. | |
5398 | If no units are specified bytes are assumed. | |
5399 | ||
5400 | A size of 0 causes Squid to never fetch more than the | |
ab275c7b | 5401 | client requested. (default) |
11e3fa1c AJ |
5402 | |
5403 | A size of 'none' causes Squid to always fetch the object from the | |
41bd17a4 | 5404 | beginning so it may cache the result. (2.0 style) |
11e3fa1c AJ |
5405 | |
5406 | 'aclname' is the name of a defined ACL. | |
5407 | ||
5408 | NP: Using 'none' as the byte value here will override any quick_abort settings | |
5409 | that may otherwise apply to the range request. The range request will | |
ab275c7b AJ |
5410 | be fully fetched from start to finish regardless of the client |
5411 | actions. This affects bandwidth usage. | |
41bd17a4 | 5412 | DOC_END |
d95b862f | 5413 | |
41bd17a4 | 5414 | NAME: minimum_expiry_time |
5415 | COMMENT: (seconds) | |
5416 | TYPE: time_t | |
5417 | LOC: Config.minimum_expiry_time | |
5418 | DEFAULT: 60 seconds | |
5419 | DOC_START | |
5420 | The minimum caching time according to (Expires - Date) | |
638402dd AJ |
5421 | headers Squid honors if the object can't be revalidated. |
5422 | The default is 60 seconds. | |
5423 | ||
5424 | In reverse proxy environments it might be desirable to honor | |
5425 | shorter object lifetimes. It is most likely better to make | |
5426 | your server return a meaningful Last-Modified header however. | |
5427 | ||
5428 | In ESI environments where page fragments often have short | |
5429 | lifetimes, this will often be best set to 0. | |
41bd17a4 | 5430 | DOC_END |
c68e9c6b | 5431 | |
41bd17a4 | 5432 | NAME: store_avg_object_size |
58d5c5dd DK |
5433 | COMMENT: (bytes) |
5434 | TYPE: b_int64_t | |
41bd17a4 | 5435 | DEFAULT: 13 KB |
5436 | LOC: Config.Store.avgObjectSize | |
5437 | DOC_START | |
5438 | Average object size, used to estimate number of objects your | |
5439 | cache can hold. The default is 13 KB. | |
638402dd AJ |
5440 | |
5441 | This is used to pre-seed the cache index memory allocation to | |
5442 | reduce expensive reallocate operations while handling clients | |
5443 | traffic. Too-large values may result in memory allocation during | |
5444 | peak traffic, too-small values will result in wasted memory. | |
5445 | ||
5446 | Check the cache manager 'info' report metrics for the real | |
5447 | object sizes seen by your Squid before tuning this. | |
cccac0a2 | 5448 | DOC_END |
5449 | ||
41bd17a4 | 5450 | NAME: store_objects_per_bucket |
5451 | TYPE: int | |
5452 | DEFAULT: 20 | |
5453 | LOC: Config.Store.objectsPerBucket | |
5454 | DOC_START | |
5455 | Target number of objects per bucket in the store hash table. | |
5456 | Lowering this value increases the total number of buckets and | |
5457 | also the storage maintenance rate. The default is 20. | |
5458 | DOC_END | |
5459 | ||
5460 | COMMENT_START | |
5461 | HTTP OPTIONS | |
5462 | ----------------------------------------------------------------------------- | |
5463 | COMMENT_END | |
5464 | ||
f04b37d8 | 5465 | NAME: request_header_max_size |
5466 | COMMENT: (KB) | |
5467 | TYPE: b_size_t | |
df2eec10 | 5468 | DEFAULT: 64 KB |
f04b37d8 | 5469 | LOC: Config.maxRequestHeaderSize |
5470 | DOC_START | |
5471 | This specifies the maximum size for HTTP headers in a request. | |
5472 | Request headers are usually relatively small (about 512 bytes). | |
5473 | Placing a limit on the request header size will catch certain | |
5474 | bugs (for example with persistent connections) and possibly | |
5475 | buffer-overflow or denial-of-service attacks. | |
5476 | DOC_END | |
5477 | ||
5478 | NAME: reply_header_max_size | |
5479 | COMMENT: (KB) | |
5480 | TYPE: b_size_t | |
df2eec10 | 5481 | DEFAULT: 64 KB |
f04b37d8 | 5482 | LOC: Config.maxReplyHeaderSize |
5483 | DOC_START | |
5484 | This specifies the maximum size for HTTP headers in a reply. | |
5485 | Reply headers are usually relatively small (about 512 bytes). | |
5486 | Placing a limit on the reply header size will catch certain | |
5487 | bugs (for example with persistent connections) and possibly | |
5488 | buffer-overflow or denial-of-service attacks. | |
5489 | DOC_END | |
5490 | ||
5491 | NAME: request_body_max_size | |
5492 | COMMENT: (bytes) | |
5493 | TYPE: b_int64_t | |
5494 | DEFAULT: 0 KB | |
638402dd | 5495 | DEFAULT_DOC: No limit. |
f04b37d8 | 5496 | LOC: Config.maxRequestBodySize |
5497 | DOC_START | |
5498 | This specifies the maximum size for an HTTP request body. | |
5499 | In other words, the maximum size of a PUT/POST request. | |
5500 | A user who attempts to send a request with a body larger | |
5501 | than this limit receives an "Invalid Request" error message. | |
5502 | If you set this parameter to a zero (the default), there will | |
5503 | be no limit imposed. | |
638402dd AJ |
5504 | |
5505 | See also client_request_buffer_max_size for an alternative | |
5506 | limitation on client uploads which can be configured. | |
f04b37d8 | 5507 | DOC_END |
5508 | ||
1368d115 CT |
5509 | NAME: client_request_buffer_max_size |
5510 | COMMENT: (bytes) | |
5511 | TYPE: b_size_t | |
5512 | DEFAULT: 512 KB | |
5513 | LOC: Config.maxRequestBufferSize | |
5514 | DOC_START | |
5515 | This specifies the maximum buffer size of a client request. | |
5516 | It prevents squid eating too much memory when somebody uploads | |
5517 | a large file. | |
5518 | DOC_END | |
5519 | ||
3ff65596 AR |
5520 | NAME: chunked_request_body_max_size |
5521 | COMMENT: (bytes) | |
5522 | TYPE: b_int64_t | |
5523 | DEFAULT: 64 KB | |
5524 | LOC: Config.maxChunkedRequestBodySize | |
5525 | DOC_START | |
5526 | A broken or confused HTTP/1.1 client may send a chunked HTTP | |
5527 | request to Squid. Squid does not have full support for that | |
5528 | feature yet. To cope with such requests, Squid buffers the | |
5529 | entire request and then dechunks request body to create a | |
5530 | plain HTTP/1.0 request with a known content length. The plain | |
5531 | request is then used by the rest of Squid code as usual. | |
5532 | ||
5533 | The option value specifies the maximum size of the buffer used | |
5534 | to hold the request before the conversion. If the chunked | |
5535 | request size exceeds the specified limit, the conversion | |
5536 | fails, and the client receives an "unsupported request" error, | |
5537 | as if dechunking was disabled. | |
5538 | ||
5539 | Dechunking is enabled by default. To disable conversion of | |
5540 | chunked requests, set the maximum to zero. | |
5541 | ||
5542 | Request dechunking feature and this option in particular are a | |
5543 | temporary hack. When chunking requests and responses are fully | |
5544 | supported, there will be no need to buffer a chunked request. | |
5545 | DOC_END | |
5546 | ||
41bd17a4 | 5547 | NAME: broken_posts |
626096be | 5548 | IFDEF: USE_HTTP_VIOLATIONS |
cccac0a2 | 5549 | TYPE: acl_access |
cccac0a2 | 5550 | DEFAULT: none |
638402dd | 5551 | DEFAULT_DOC: Obey RFC 2616. |
41bd17a4 | 5552 | LOC: Config.accessList.brokenPosts |
cccac0a2 | 5553 | DOC_START |
41bd17a4 | 5554 | A list of ACL elements which, if matched, causes Squid to send |
5555 | an extra CRLF pair after the body of a PUT/POST request. | |
cccac0a2 | 5556 | |
41bd17a4 | 5557 | Some HTTP servers has broken implementations of PUT/POST, |
5558 | and rely on an extra CRLF pair sent by some WWW clients. | |
cccac0a2 | 5559 | |
41bd17a4 | 5560 | Quote from RFC2616 section 4.1 on this matter: |
cccac0a2 | 5561 | |
41bd17a4 | 5562 | Note: certain buggy HTTP/1.0 client implementations generate an |
5563 | extra CRLF's after a POST request. To restate what is explicitly | |
5564 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
5565 | a request with an extra CRLF. | |
cccac0a2 | 5566 | |
b3567eb5 FC |
5567 | This clause only supports fast acl types. |
5568 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
5569 | ||
41bd17a4 | 5570 | Example: |
5571 | acl buggy_server url_regex ^http://.... | |
5572 | broken_posts allow buggy_server | |
5573 | DOC_END | |
cccac0a2 | 5574 | |
22fff3bf | 5575 | NAME: adaptation_uses_indirect_client icap_uses_indirect_client |
57d76dd4 AJ |
5576 | COMMENT: on|off |
5577 | TYPE: onoff | |
22fff3bf | 5578 | IFDEF: FOLLOW_X_FORWARDED_FOR&&USE_ADAPTATION |
57d76dd4 | 5579 | DEFAULT: on |
22fff3bf | 5580 | LOC: Adaptation::Config::use_indirect_client |
57d76dd4 | 5581 | DOC_START |
ea3ae478 AR |
5582 | Controls whether the indirect client IP address (instead of the direct |
5583 | client IP address) is passed to adaptation services. | |
5584 | ||
5585 | See also: follow_x_forwarded_for adaptation_send_client_ip | |
57d76dd4 AJ |
5586 | DOC_END |
5587 | ||
41bd17a4 | 5588 | NAME: via |
626096be | 5589 | IFDEF: USE_HTTP_VIOLATIONS |
41bd17a4 | 5590 | COMMENT: on|off |
5591 | TYPE: onoff | |
5592 | DEFAULT: on | |
5593 | LOC: Config.onoff.via | |
5594 | DOC_START | |
5595 | If set (default), Squid will include a Via header in requests and | |
5596 | replies as required by RFC2616. | |
5597 | DOC_END | |
4cc6eb12 | 5598 | |
41bd17a4 | 5599 | NAME: ie_refresh |
5600 | COMMENT: on|off | |
5601 | TYPE: onoff | |
5602 | LOC: Config.onoff.ie_refresh | |
5603 | DEFAULT: off | |
5604 | DOC_START | |
5605 | Microsoft Internet Explorer up until version 5.5 Service | |
5606 | Pack 1 has an issue with transparent proxies, wherein it | |
5607 | is impossible to force a refresh. Turning this on provides | |
5608 | a partial fix to the problem, by causing all IMS-REFRESH | |
5609 | requests from older IE versions to check the origin server | |
5610 | for fresh content. This reduces hit ratio by some amount | |
5611 | (~10% in my experience), but allows users to actually get | |
5612 | fresh content when they want it. Note because Squid | |
5613 | cannot tell if the user is using 5.5 or 5.5SP1, the behavior | |
5614 | of 5.5 is unchanged from old versions of Squid (i.e. a | |
5615 | forced refresh is impossible). Newer versions of IE will, | |
5616 | hopefully, continue to have the new behavior and will be | |
5617 | handled based on that assumption. This option defaults to | |
5618 | the old Squid behavior, which is better for hit ratios but | |
5619 | worse for clients using IE, if they need to be able to | |
5620 | force fresh content. | |
5621 | DOC_END | |
b9d7fe3e | 5622 | |
41bd17a4 | 5623 | NAME: vary_ignore_expire |
5624 | COMMENT: on|off | |
5625 | TYPE: onoff | |
5626 | LOC: Config.onoff.vary_ignore_expire | |
5627 | DEFAULT: off | |
5628 | DOC_START | |
5629 | Many HTTP servers supporting Vary gives such objects | |
5630 | immediate expiry time with no cache-control header | |
5631 | when requested by a HTTP/1.0 client. This option | |
5632 | enables Squid to ignore such expiry times until | |
5633 | HTTP/1.1 is fully implemented. | |
7e73cd78 AJ |
5634 | |
5635 | WARNING: If turned on this may eventually cause some | |
5636 | varying objects not intended for caching to get cached. | |
cccac0a2 | 5637 | DOC_END |
c4ab8329 | 5638 | |
41bd17a4 | 5639 | NAME: request_entities |
5640 | TYPE: onoff | |
5641 | LOC: Config.onoff.request_entities | |
5642 | DEFAULT: off | |
5643 | DOC_START | |
5644 | Squid defaults to deny GET and HEAD requests with request entities, | |
5645 | as the meaning of such requests are undefined in the HTTP standard | |
5646 | even if not explicitly forbidden. | |
0976f8db | 5647 | |
41bd17a4 | 5648 | Set this directive to on if you have clients which insists |
5649 | on sending request entities in GET or HEAD requests. But be warned | |
5650 | that there is server software (both proxies and web servers) which | |
5651 | can fail to properly process this kind of request which may make you | |
5652 | vulnerable to cache pollution attacks if enabled. | |
cccac0a2 | 5653 | DOC_END |
6b53c392 | 5654 | |
41bd17a4 | 5655 | NAME: request_header_access |
626096be | 5656 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 5657 | TYPE: http_header_access |
41bd17a4 | 5658 | LOC: Config.request_header_access |
cccac0a2 | 5659 | DEFAULT: none |
638402dd | 5660 | DEFAULT_DOC: No limits. |
cccac0a2 | 5661 | DOC_START |
41bd17a4 | 5662 | Usage: request_header_access header_name allow|deny [!]aclname ... |
0976f8db | 5663 | |
41bd17a4 | 5664 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
5665 | this feature could make you liable for problems which it | |
5666 | causes. | |
0976f8db | 5667 | |
41bd17a4 | 5668 | This option replaces the old 'anonymize_headers' and the |
5669 | older 'http_anonymizer' option with something that is much | |
3b07476b CT |
5670 | more configurable. A list of ACLs for each header name allows |
5671 | removal of specific header fields under specific conditions. | |
5672 | ||
5673 | This option only applies to outgoing HTTP request headers (i.e., | |
5674 | headers sent by Squid to the next HTTP hop such as a cache peer | |
5675 | or an origin server). The option has no effect during cache hit | |
5676 | detection. The equivalent adaptation vectoring point in ICAP | |
5677 | terminology is post-cache REQMOD. | |
5678 | ||
5679 | The option is applied to individual outgoing request header | |
5680 | fields. For each request header field F, Squid uses the first | |
5681 | qualifying sets of request_header_access rules: | |
5682 | ||
5683 | 1. Rules with header_name equal to F's name. | |
5684 | 2. Rules with header_name 'Other', provided F's name is not | |
5685 | on the hard-coded list of commonly used HTTP header names. | |
5686 | 3. Rules with header_name 'All'. | |
5687 | ||
5688 | Within that qualifying rule set, rule ACLs are checked as usual. | |
5689 | If ACLs of an "allow" rule match, the header field is allowed to | |
5690 | go through as is. If ACLs of a "deny" rule match, the header is | |
5691 | removed and request_header_replace is then checked to identify | |
5692 | if the removed header has a replacement. If no rules within the | |
5693 | set have matching ACLs, the header field is left as is. | |
5401aa8d | 5694 | |
41bd17a4 | 5695 | For example, to achieve the same behavior as the old |
5696 | 'http_anonymizer standard' option, you should use: | |
5401aa8d | 5697 | |
41bd17a4 | 5698 | request_header_access From deny all |
5699 | request_header_access Referer deny all | |
41bd17a4 | 5700 | request_header_access User-Agent deny all |
5401aa8d | 5701 | |
41bd17a4 | 5702 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
5703 | you should use: | |
5401aa8d | 5704 | |
41bd17a4 | 5705 | request_header_access Authorization allow all |
41bd17a4 | 5706 | request_header_access Proxy-Authorization allow all |
41bd17a4 | 5707 | request_header_access Cache-Control allow all |
41bd17a4 | 5708 | request_header_access Content-Length allow all |
5709 | request_header_access Content-Type allow all | |
5710 | request_header_access Date allow all | |
41bd17a4 | 5711 | request_header_access Host allow all |
5712 | request_header_access If-Modified-Since allow all | |
41bd17a4 | 5713 | request_header_access Pragma allow all |
5714 | request_header_access Accept allow all | |
5715 | request_header_access Accept-Charset allow all | |
5716 | request_header_access Accept-Encoding allow all | |
5717 | request_header_access Accept-Language allow all | |
41bd17a4 | 5718 | request_header_access Connection allow all |
41bd17a4 | 5719 | request_header_access All deny all |
5401aa8d | 5720 | |
638402dd | 5721 | HTTP reply headers are controlled with the reply_header_access directive. |
5401aa8d | 5722 | |
638402dd | 5723 | By default, all headers are allowed (no anonymizing is performed). |
5401aa8d | 5724 | DOC_END |
5725 | ||
41bd17a4 | 5726 | NAME: reply_header_access |
626096be | 5727 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 5728 | TYPE: http_header_access |
41bd17a4 | 5729 | LOC: Config.reply_header_access |
cccac0a2 | 5730 | DEFAULT: none |
638402dd | 5731 | DEFAULT_DOC: No limits. |
cccac0a2 | 5732 | DOC_START |
41bd17a4 | 5733 | Usage: reply_header_access header_name allow|deny [!]aclname ... |
934b03fc | 5734 | |
41bd17a4 | 5735 | WARNING: Doing this VIOLATES the HTTP standard. Enabling |
5736 | this feature could make you liable for problems which it | |
5737 | causes. | |
934b03fc | 5738 | |
41bd17a4 | 5739 | This option only applies to reply headers, i.e., from the |
5740 | server to the client. | |
934b03fc | 5741 | |
41bd17a4 | 5742 | This is the same as request_header_access, but in the other |
3b07476b CT |
5743 | direction. Please see request_header_access for detailed |
5744 | documentation. | |
cccac0a2 | 5745 | |
41bd17a4 | 5746 | For example, to achieve the same behavior as the old |
5747 | 'http_anonymizer standard' option, you should use: | |
cccac0a2 | 5748 | |
41bd17a4 | 5749 | reply_header_access Server deny all |
41bd17a4 | 5750 | reply_header_access WWW-Authenticate deny all |
5751 | reply_header_access Link deny all | |
cccac0a2 | 5752 | |
41bd17a4 | 5753 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
5754 | you should use: | |
cccac0a2 | 5755 | |
41bd17a4 | 5756 | reply_header_access Allow allow all |
41bd17a4 | 5757 | reply_header_access WWW-Authenticate allow all |
41bd17a4 | 5758 | reply_header_access Proxy-Authenticate allow all |
5759 | reply_header_access Cache-Control allow all | |
5760 | reply_header_access Content-Encoding allow all | |
5761 | reply_header_access Content-Length allow all | |
5762 | reply_header_access Content-Type allow all | |
5763 | reply_header_access Date allow all | |
5764 | reply_header_access Expires allow all | |
41bd17a4 | 5765 | reply_header_access Last-Modified allow all |
5766 | reply_header_access Location allow all | |
5767 | reply_header_access Pragma allow all | |
41bd17a4 | 5768 | reply_header_access Content-Language allow all |
41bd17a4 | 5769 | reply_header_access Retry-After allow all |
5770 | reply_header_access Title allow all | |
638402dd | 5771 | reply_header_access Content-Disposition allow all |
41bd17a4 | 5772 | reply_header_access Connection allow all |
41bd17a4 | 5773 | reply_header_access All deny all |
cccac0a2 | 5774 | |
638402dd | 5775 | HTTP request headers are controlled with the request_header_access directive. |
cccac0a2 | 5776 | |
41bd17a4 | 5777 | By default, all headers are allowed (no anonymizing is |
5778 | performed). | |
cccac0a2 | 5779 | DOC_END |
5780 | ||
75e4f2ea | 5781 | NAME: request_header_replace header_replace |
626096be | 5782 | IFDEF: USE_HTTP_VIOLATIONS |
3b07476b | 5783 | TYPE: http_header_replace |
41bd17a4 | 5784 | LOC: Config.request_header_access |
cccac0a2 | 5785 | DEFAULT: none |
41bd17a4 | 5786 | DOC_START |
75e4f2ea MB |
5787 | Usage: request_header_replace header_name message |
5788 | Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
cccac0a2 | 5789 | |
41bd17a4 | 5790 | This option allows you to change the contents of headers |
75e4f2ea | 5791 | denied with request_header_access above, by replacing them |
638402dd | 5792 | with some fixed string. |
cccac0a2 | 5793 | |
41bd17a4 | 5794 | This only applies to request headers, not reply headers. |
cccac0a2 | 5795 | |
41bd17a4 | 5796 | By default, headers are removed if denied. |
5797 | DOC_END | |
cccac0a2 | 5798 | |
75e4f2ea MB |
5799 | NAME: reply_header_replace |
5800 | IFDEF: USE_HTTP_VIOLATIONS | |
3b07476b | 5801 | TYPE: http_header_replace |
75e4f2ea MB |
5802 | LOC: Config.reply_header_access |
5803 | DEFAULT: none | |
5804 | DOC_START | |
5805 | Usage: reply_header_replace header_name message | |
5806 | Example: reply_header_replace Server Foo/1.0 | |
5807 | ||
5808 | This option allows you to change the contents of headers | |
5809 | denied with reply_header_access above, by replacing them | |
5810 | with some fixed string. | |
5811 | ||
5812 | This only applies to reply headers, not request headers. | |
5813 | ||
5814 | By default, headers are removed if denied. | |
5815 | DOC_END | |
5816 | ||
f4698e0b CT |
5817 | NAME: request_header_add |
5818 | TYPE: HeaderWithAclList | |
5819 | LOC: Config.request_header_add | |
5820 | DEFAULT: none | |
5821 | DOC_START | |
5822 | Usage: request_header_add field-name field-value acl1 [acl2] ... | |
5823 | Example: request_header_add X-Client-CA "CA=%ssl::>cert_issuer" all | |
5824 | ||
5825 | This option adds header fields to outgoing HTTP requests (i.e., | |
5826 | request headers sent by Squid to the next HTTP hop such as a | |
5827 | cache peer or an origin server). The option has no effect during | |
5828 | cache hit detection. The equivalent adaptation vectoring point | |
5829 | in ICAP terminology is post-cache REQMOD. | |
5830 | ||
5831 | Field-name is a token specifying an HTTP header name. If a | |
5832 | standard HTTP header name is used, Squid does not check whether | |
5833 | the new header conflicts with any existing headers or violates | |
5834 | HTTP rules. If the request to be modified already contains a | |
5835 | field with the same name, the old field is preserved but the | |
5836 | header field values are not merged. | |
5837 | ||
5838 | Field-value is either a token or a quoted string. If quoted | |
5839 | string format is used, then the surrounding quotes are removed | |
5840 | while escape sequences and %macros are processed. | |
5841 | ||
5842 | In theory, all of the logformat codes can be used as %macros. | |
5843 | However, unlike logging (which happens at the very end of | |
5844 | transaction lifetime), the transaction may not yet have enough | |
5845 | information to expand a macro when the new header value is needed. | |
5846 | And some information may already be available to Squid but not yet | |
5847 | committed where the macro expansion code can access it (report | |
5848 | such instances!). The macro will be expanded into a single dash | |
5849 | ('-') in such cases. Not all macros have been tested. | |
5850 | ||
5851 | One or more Squid ACLs may be specified to restrict header | |
5852 | injection to matching requests. As always in squid.conf, all | |
5853 | ACLs in an option ACL list must be satisfied for the insertion | |
5854 | to happen. The request_header_add option supports fast ACLs | |
5855 | only. | |
5856 | DOC_END | |
5857 | ||
d7f4a0b7 CT |
5858 | NAME: note |
5859 | TYPE: note | |
5860 | LOC: Config.notes | |
5861 | DEFAULT: none | |
5862 | DOC_START | |
5863 | This option used to log custom information about the master | |
5864 | transaction. For example, an admin may configure Squid to log | |
5865 | which "user group" the transaction belongs to, where "user group" | |
5866 | will be determined based on a set of ACLs and not [just] | |
5867 | authentication information. | |
5868 | Values of key/value pairs can be logged using %{key}note macros: | |
5869 | ||
5870 | note key value acl ... | |
5871 | logformat myFormat ... %{key}note ... | |
5872 | DOC_END | |
5873 | ||
41bd17a4 | 5874 | NAME: relaxed_header_parser |
5875 | COMMENT: on|off|warn | |
5876 | TYPE: tristate | |
5877 | LOC: Config.onoff.relaxed_header_parser | |
5878 | DEFAULT: on | |
5879 | DOC_START | |
5880 | In the default "on" setting Squid accepts certain forms | |
5881 | of non-compliant HTTP messages where it is unambiguous | |
5882 | what the sending application intended even if the message | |
5883 | is not correctly formatted. The messages is then normalized | |
5884 | to the correct form when forwarded by Squid. | |
cccac0a2 | 5885 | |
41bd17a4 | 5886 | If set to "warn" then a warning will be emitted in cache.log |
5887 | each time such HTTP error is encountered. | |
cccac0a2 | 5888 | |
41bd17a4 | 5889 | If set to "off" then such HTTP errors will cause the request |
5890 | or response to be rejected. | |
5891 | DOC_END | |
7d90757b | 5892 | |
55eae904 AR |
5893 | NAME: collapsed_forwarding |
5894 | COMMENT: (on|off) | |
5895 | TYPE: onoff | |
5896 | LOC: Config.onoff.collapsed_forwarding | |
5897 | DEFAULT: off | |
5898 | DOC_START | |
5899 | This option controls whether Squid is allowed to merge multiple | |
5900 | potentially cachable requests for the same URI before Squid knows | |
5901 | whether the response is going to be cachable. | |
5902 | ||
5903 | This feature is disabled by default: Enabling collapsed forwarding | |
5904 | needlessly delays forwarding requests that look cachable (when they are | |
5905 | collapsed) but then need to be forwarded individually anyway because | |
5906 | they end up being for uncachable content. However, in some cases, such | |
5907 | as accelleration of highly cachable content with periodic or groupped | |
5908 | expiration times, the gains from collapsing [large volumes of | |
5909 | simultenous refresh requests] outweigh losses from such delays. | |
5910 | DOC_END | |
5911 | ||
41bd17a4 | 5912 | COMMENT_START |
5913 | TIMEOUTS | |
5914 | ----------------------------------------------------------------------------- | |
5915 | COMMENT_END | |
5916 | ||
5917 | NAME: forward_timeout | |
5918 | COMMENT: time-units | |
5919 | TYPE: time_t | |
5920 | LOC: Config.Timeout.forward | |
5921 | DEFAULT: 4 minutes | |
5922 | DOC_START | |
5923 | This parameter specifies how long Squid should at most attempt in | |
5924 | finding a forwarding path for the request before giving up. | |
cccac0a2 | 5925 | DOC_END |
5926 | ||
41bd17a4 | 5927 | NAME: connect_timeout |
5928 | COMMENT: time-units | |
5929 | TYPE: time_t | |
5930 | LOC: Config.Timeout.connect | |
5931 | DEFAULT: 1 minute | |
057f5854 | 5932 | DOC_START |
41bd17a4 | 5933 | This parameter specifies how long to wait for the TCP connect to |
5934 | the requested server or peer to complete before Squid should | |
5935 | attempt to find another path where to forward the request. | |
057f5854 | 5936 | DOC_END |
5937 | ||
41bd17a4 | 5938 | NAME: peer_connect_timeout |
5939 | COMMENT: time-units | |
5940 | TYPE: time_t | |
5941 | LOC: Config.Timeout.peer_connect | |
5942 | DEFAULT: 30 seconds | |
cccac0a2 | 5943 | DOC_START |
41bd17a4 | 5944 | This parameter specifies how long to wait for a pending TCP |
5945 | connection to a peer cache. The default is 30 seconds. You | |
5946 | may also set different timeout values for individual neighbors | |
5947 | with the 'connect-timeout' option on a 'cache_peer' line. | |
5948 | DOC_END | |
7f7db318 | 5949 | |
41bd17a4 | 5950 | NAME: read_timeout |
5951 | COMMENT: time-units | |
5952 | TYPE: time_t | |
5953 | LOC: Config.Timeout.read | |
5954 | DEFAULT: 15 minutes | |
5955 | DOC_START | |
5956 | The read_timeout is applied on server-side connections. After | |
5957 | each successful read(), the timeout will be extended by this | |
5958 | amount. If no data is read again after this amount of time, | |
5959 | the request is aborted and logged with ERR_READ_TIMEOUT. The | |
5960 | default is 15 minutes. | |
5961 | DOC_END | |
cccac0a2 | 5962 | |
5ef5e5cc AJ |
5963 | NAME: write_timeout |
5964 | COMMENT: time-units | |
5965 | TYPE: time_t | |
5966 | LOC: Config.Timeout.write | |
5967 | DEFAULT: 15 minutes | |
5968 | DOC_START | |
5969 | This timeout is tracked for all connections that have data | |
5970 | available for writing and are waiting for the socket to become | |
5971 | ready. After each successful write, the timeout is extended by | |
5972 | the configured amount. If Squid has data to write but the | |
5973 | connection is not ready for the configured duration, the | |
5974 | transaction associated with the connection is terminated. The | |
5975 | default is 15 minutes. | |
5976 | DOC_END | |
5977 | ||
41bd17a4 | 5978 | NAME: request_timeout |
5979 | TYPE: time_t | |
5980 | LOC: Config.Timeout.request | |
5981 | DEFAULT: 5 minutes | |
5982 | DOC_START | |
6b2a2108 | 5983 | How long to wait for complete HTTP request headers after initial |
41bd17a4 | 5984 | connection establishment. |
5985 | DOC_END | |
cccac0a2 | 5986 | |
97b32442 | 5987 | NAME: client_idle_pconn_timeout persistent_request_timeout |
41bd17a4 | 5988 | TYPE: time_t |
97b32442 | 5989 | LOC: Config.Timeout.clientIdlePconn |
41bd17a4 | 5990 | DEFAULT: 2 minutes |
5991 | DOC_START | |
5992 | How long to wait for the next HTTP request on a persistent | |
97b32442 | 5993 | client connection after the previous request completes. |
41bd17a4 | 5994 | DOC_END |
cccac0a2 | 5995 | |
41bd17a4 | 5996 | NAME: client_lifetime |
5997 | COMMENT: time-units | |
5998 | TYPE: time_t | |
5999 | LOC: Config.Timeout.lifetime | |
6000 | DEFAULT: 1 day | |
6001 | DOC_START | |
6002 | The maximum amount of time a client (browser) is allowed to | |
6003 | remain connected to the cache process. This protects the Cache | |
6004 | from having a lot of sockets (and hence file descriptors) tied up | |
6005 | in a CLOSE_WAIT state from remote clients that go away without | |
6006 | properly shutting down (either because of a network failure or | |
6007 | because of a poor client implementation). The default is one | |
6008 | day, 1440 minutes. | |
7d90757b | 6009 | |
41bd17a4 | 6010 | NOTE: The default value is intended to be much larger than any |
6011 | client would ever need to be connected to your cache. You | |
6012 | should probably change client_lifetime only as a last resort. | |
6013 | If you seem to have many client connections tying up | |
6014 | filedescriptors, we recommend first tuning the read_timeout, | |
6015 | request_timeout, persistent_request_timeout and quick_abort values. | |
cccac0a2 | 6016 | DOC_END |
6017 | ||
41bd17a4 | 6018 | NAME: half_closed_clients |
6019 | TYPE: onoff | |
6020 | LOC: Config.onoff.half_closed_clients | |
0c2f5c4f | 6021 | DEFAULT: off |
4eb368f9 | 6022 | DOC_START |
41bd17a4 | 6023 | Some clients may shutdown the sending side of their TCP |
6024 | connections, while leaving their receiving sides open. Sometimes, | |
6025 | Squid can not tell the difference between a half-closed and a | |
0c2f5c4f AJ |
6026 | fully-closed TCP connection. |
6027 | ||
6028 | By default, Squid will immediately close client connections when | |
6029 | read(2) returns "no more data to read." | |
6030 | ||
abdf1651 | 6031 | Change this option to 'on' and Squid will keep open connections |
0c2f5c4f AJ |
6032 | until a read(2) or write(2) on the socket returns an error. |
6033 | This may show some benefits for reverse proxies. But if not | |
6034 | it is recommended to leave OFF. | |
4eb368f9 | 6035 | DOC_END |
6036 | ||
97b32442 | 6037 | NAME: server_idle_pconn_timeout pconn_timeout |
41bd17a4 | 6038 | TYPE: time_t |
97b32442 | 6039 | LOC: Config.Timeout.serverIdlePconn |
41bd17a4 | 6040 | DEFAULT: 1 minute |
cccac0a2 | 6041 | DOC_START |
41bd17a4 | 6042 | Timeout for idle persistent connections to servers and other |
6043 | proxies. | |
6044 | DOC_END | |
cccac0a2 | 6045 | |
41bd17a4 | 6046 | NAME: ident_timeout |
6047 | TYPE: time_t | |
6048 | IFDEF: USE_IDENT | |
4daaf3cb | 6049 | LOC: Ident::TheConfig.timeout |
41bd17a4 | 6050 | DEFAULT: 10 seconds |
6051 | DOC_START | |
6052 | Maximum time to wait for IDENT lookups to complete. | |
cccac0a2 | 6053 | |
41bd17a4 | 6054 | If this is too high, and you enabled IDENT lookups from untrusted |
6055 | users, you might be susceptible to denial-of-service by having | |
6056 | many ident requests going at once. | |
cccac0a2 | 6057 | DOC_END |
6058 | ||
41bd17a4 | 6059 | NAME: shutdown_lifetime |
6060 | COMMENT: time-units | |
6061 | TYPE: time_t | |
6062 | LOC: Config.shutdownLifetime | |
6063 | DEFAULT: 30 seconds | |
cccac0a2 | 6064 | DOC_START |
41bd17a4 | 6065 | When SIGTERM or SIGHUP is received, the cache is put into |
6066 | "shutdown pending" mode until all active sockets are closed. | |
6067 | This value is the lifetime to set for all open descriptors | |
6068 | during shutdown mode. Any active clients after this many | |
6069 | seconds will receive a 'timeout' message. | |
cccac0a2 | 6070 | DOC_END |
0976f8db | 6071 | |
cccac0a2 | 6072 | COMMENT_START |
6073 | ADMINISTRATIVE PARAMETERS | |
6074 | ----------------------------------------------------------------------------- | |
6075 | COMMENT_END | |
6076 | ||
6077 | NAME: cache_mgr | |
6078 | TYPE: string | |
6079 | DEFAULT: webmaster | |
6080 | LOC: Config.adminEmail | |
6081 | DOC_START | |
6082 | Email-address of local cache manager who will receive | |
638402dd | 6083 | mail if the cache dies. The default is "webmaster". |
cccac0a2 | 6084 | DOC_END |
6085 | ||
abacf776 | 6086 | NAME: mail_from |
6087 | TYPE: string | |
6088 | DEFAULT: none | |
6089 | LOC: Config.EmailFrom | |
6090 | DOC_START | |
6091 | From: email-address for mail sent when the cache dies. | |
638402dd AJ |
6092 | The default is to use 'squid@unique_hostname'. |
6093 | ||
6094 | See also: unique_hostname directive. | |
abacf776 | 6095 | DOC_END |
6096 | ||
d084bf20 | 6097 | NAME: mail_program |
6098 | TYPE: eol | |
6099 | DEFAULT: mail | |
6100 | LOC: Config.EmailProgram | |
6101 | DOC_START | |
6102 | Email program used to send mail if the cache dies. | |
846a5e31 | 6103 | The default is "mail". The specified program must comply |
d084bf20 | 6104 | with the standard Unix mail syntax: |
846a5e31 | 6105 | mail-program recipient < mailfile |
6106 | ||
d084bf20 | 6107 | Optional command line options can be specified. |
6108 | DOC_END | |
6109 | ||
cccac0a2 | 6110 | NAME: cache_effective_user |
6111 | TYPE: string | |
5483d916 | 6112 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ |
cccac0a2 | 6113 | LOC: Config.effectiveUser |
e3d74828 | 6114 | DOC_START |
6115 | If you start Squid as root, it will change its effective/real | |
6116 | UID/GID to the user specified below. The default is to change | |
5483d916 | 6117 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. |
64e288bd | 6118 | see also; cache_effective_group |
e3d74828 | 6119 | DOC_END |
6120 | ||
cccac0a2 | 6121 | NAME: cache_effective_group |
6122 | TYPE: string | |
6123 | DEFAULT: none | |
638402dd | 6124 | DEFAULT_DOC: Use system group memberships of the cache_effective_user account |
cccac0a2 | 6125 | LOC: Config.effectiveGroup |
6126 | DOC_START | |
64e288bd | 6127 | Squid sets the GID to the effective user's default group ID |
6128 | (taken from the password file) and supplementary group list | |
6129 | from the groups membership. | |
6130 | ||
e3d74828 | 6131 | If you want Squid to run with a specific GID regardless of |
6132 | the group memberships of the effective user then set this | |
6133 | to the group (or GID) you want Squid to run as. When set | |
64e288bd | 6134 | all other group privileges of the effective user are ignored |
e3d74828 | 6135 | and only this GID is effective. If Squid is not started as |
64e288bd | 6136 | root the user starting Squid MUST be member of the specified |
e3d74828 | 6137 | group. |
64e288bd | 6138 | |
6139 | This option is not recommended by the Squid Team. | |
6140 | Our preference is for administrators to configure a secure | |
6141 | user account for squid with UID/GID matching system policies. | |
cccac0a2 | 6142 | DOC_END |
6143 | ||
d3caee79 | 6144 | NAME: httpd_suppress_version_string |
6145 | COMMENT: on|off | |
6146 | TYPE: onoff | |
6147 | DEFAULT: off | |
6148 | LOC: Config.onoff.httpd_suppress_version_string | |
6149 | DOC_START | |
6150 | Suppress Squid version string info in HTTP headers and HTML error pages. | |
6151 | DOC_END | |
6152 | ||
cccac0a2 | 6153 | NAME: visible_hostname |
6154 | TYPE: string | |
6155 | LOC: Config.visibleHostname | |
6156 | DEFAULT: none | |
638402dd | 6157 | DEFAULT_DOC: Automatically detect the system host name |
cccac0a2 | 6158 | DOC_START |
6159 | If you want to present a special hostname in error messages, etc, | |
7f7db318 | 6160 | define this. Otherwise, the return value of gethostname() |
cccac0a2 | 6161 | will be used. If you have multiple caches in a cluster and |
6162 | get errors about IP-forwarding you must set them to have individual | |
6163 | names with this setting. | |
6164 | DOC_END | |
6165 | ||
cccac0a2 | 6166 | NAME: unique_hostname |
6167 | TYPE: string | |
6168 | LOC: Config.uniqueHostname | |
6169 | DEFAULT: none | |
638402dd | 6170 | DEFAULT_DOC: Copy the value from visible_hostname |
cccac0a2 | 6171 | DOC_START |
6172 | If you want to have multiple machines with the same | |
7f7db318 | 6173 | 'visible_hostname' you must give each machine a different |
6174 | 'unique_hostname' so forwarding loops can be detected. | |
cccac0a2 | 6175 | DOC_END |
6176 | ||
cccac0a2 | 6177 | NAME: hostname_aliases |
6178 | TYPE: wordlist | |
6179 | LOC: Config.hostnameAliases | |
6180 | DEFAULT: none | |
6181 | DOC_START | |
7f7db318 | 6182 | A list of other DNS names your cache has. |
cccac0a2 | 6183 | DOC_END |
0976f8db | 6184 | |
c642c141 AJ |
6185 | NAME: umask |
6186 | TYPE: int | |
6187 | LOC: Config.umask | |
6188 | DEFAULT: 027 | |
6189 | DOC_START | |
6190 | Minimum umask which should be enforced while the proxy | |
6191 | is running, in addition to the umask set at startup. | |
6192 | ||
6193 | For a traditional octal representation of umasks, start | |
6194 | your value with 0. | |
6195 | DOC_END | |
6196 | ||
cccac0a2 | 6197 | COMMENT_START |
6198 | OPTIONS FOR THE CACHE REGISTRATION SERVICE | |
6199 | ----------------------------------------------------------------------------- | |
6200 | ||
6201 | This section contains parameters for the (optional) cache | |
6202 | announcement service. This service is provided to help | |
6203 | cache administrators locate one another in order to join or | |
6204 | create cache hierarchies. | |
6205 | ||
6206 | An 'announcement' message is sent (via UDP) to the registration | |
6207 | service by Squid. By default, the announcement message is NOT | |
6208 | SENT unless you enable it with 'announce_period' below. | |
6209 | ||
6210 | The announcement message includes your hostname, plus the | |
6211 | following information from this configuration file: | |
6212 | ||
6213 | http_port | |
6214 | icp_port | |
6215 | cache_mgr | |
6216 | ||
6217 | All current information is processed regularly and made | |
6218 | available on the Web at http://www.ircache.net/Cache/Tracker/. | |
6219 | COMMENT_END | |
6220 | ||
6221 | NAME: announce_period | |
6222 | TYPE: time_t | |
6223 | LOC: Config.Announce.period | |
6224 | DEFAULT: 0 | |
638402dd | 6225 | DEFAULT_DOC: Announcement messages disabled. |
cccac0a2 | 6226 | DOC_START |
638402dd | 6227 | This is how frequently to send cache announcements. |
cccac0a2 | 6228 | |
e0855596 | 6229 | To enable announcing your cache, just set an announce period. |
cccac0a2 | 6230 | |
e0855596 AJ |
6231 | Example: |
6232 | announce_period 1 day | |
cccac0a2 | 6233 | DOC_END |
6234 | ||
cccac0a2 | 6235 | NAME: announce_host |
6236 | TYPE: string | |
6237 | DEFAULT: tracker.ircache.net | |
6238 | LOC: Config.Announce.host | |
638402dd AJ |
6239 | DOC_START |
6240 | Set the hostname where announce registration messages will be sent. | |
6241 | ||
6242 | See also announce_port and announce_file | |
6243 | DOC_END | |
cccac0a2 | 6244 | |
6245 | NAME: announce_file | |
6246 | TYPE: string | |
6247 | DEFAULT: none | |
6248 | LOC: Config.Announce.file | |
638402dd AJ |
6249 | DOC_START |
6250 | The contents of this file will be included in the announce | |
6251 | registration messages. | |
6252 | DOC_END | |
cccac0a2 | 6253 | |
6254 | NAME: announce_port | |
ae870270 | 6255 | TYPE: u_short |
cccac0a2 | 6256 | DEFAULT: 3131 |
6257 | LOC: Config.Announce.port | |
6258 | DOC_START | |
638402dd | 6259 | Set the port where announce registration messages will be sent. |
cccac0a2 | 6260 | |
638402dd | 6261 | See also announce_host and announce_file |
cccac0a2 | 6262 | DOC_END |
6263 | ||
8d6275c0 | 6264 | COMMENT_START |
6265 | HTTPD-ACCELERATOR OPTIONS | |
6266 | ----------------------------------------------------------------------------- | |
6267 | COMMENT_END | |
6268 | ||
cccac0a2 | 6269 | NAME: httpd_accel_surrogate_id |
cccac0a2 | 6270 | TYPE: string |
b2b40d8c | 6271 | DEFAULT: none |
638402dd | 6272 | DEFAULT_DOC: visible_hostname is used if no specific ID is set. |
cccac0a2 | 6273 | LOC: Config.Accel.surrogate_id |
cccac0a2 | 6274 | DOC_START |
6275 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
6276 | need an identification token to allow control targeting. Because | |
6277 | a farm of surrogates may all perform the same tasks, they may share | |
6278 | an identification token. | |
6279 | DOC_END | |
6280 | ||
6281 | NAME: http_accel_surrogate_remote | |
cccac0a2 | 6282 | COMMENT: on|off |
6283 | TYPE: onoff | |
6284 | DEFAULT: off | |
6285 | LOC: Config.onoff.surrogate_is_remote | |
6286 | DOC_START | |
638402dd AJ |
6287 | Remote surrogates (such as those in a CDN) honour the header |
6288 | "Surrogate-Control: no-store-remote". | |
6289 | ||
cccac0a2 | 6290 | Set this to on to have squid behave as a remote surrogate. |
6291 | DOC_END | |
6292 | ||
6293 | NAME: esi_parser | |
f41735ea | 6294 | IFDEF: USE_SQUID_ESI |
964b44c3 | 6295 | COMMENT: libxml2|expat|custom |
cccac0a2 | 6296 | TYPE: string |
6297 | LOC: ESIParser::Type | |
6298 | DEFAULT: custom | |
6299 | DOC_START | |
6300 | ESI markup is not strictly XML compatible. The custom ESI parser | |
6301 | will give higher performance, but cannot handle non ASCII character | |
6302 | encodings. | |
6303 | DOC_END | |
0976f8db | 6304 | |
9edd9041 | 6305 | COMMENT_START |
8d6275c0 | 6306 | DELAY POOL PARAMETERS |
9edd9041 | 6307 | ----------------------------------------------------------------------------- |
6308 | COMMENT_END | |
6309 | ||
6310 | NAME: delay_pools | |
6311 | TYPE: delay_pool_count | |
6312 | DEFAULT: 0 | |
9a0a18de | 6313 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6314 | LOC: Config.Delay |
6315 | DOC_START | |
6316 | This represents the number of delay pools to be used. For example, | |
6317 | if you have one class 2 delay pool and one class 3 delays pool, you | |
6318 | have a total of 2 delay pools. | |
638402dd AJ |
6319 | |
6320 | See also delay_parameters, delay_class, delay_access for pool | |
6321 | configuration details. | |
9edd9041 | 6322 | DOC_END |
6323 | ||
6324 | NAME: delay_class | |
6325 | TYPE: delay_pool_class | |
6326 | DEFAULT: none | |
9a0a18de | 6327 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6328 | LOC: Config.Delay |
6329 | DOC_START | |
6330 | This defines the class of each delay pool. There must be exactly one | |
6331 | delay_class line for each delay pool. For example, to define two | |
6332 | delay pools, one of class 2 and one of class 3, the settings above | |
6333 | and here would be: | |
6334 | ||
b1fb3348 AJ |
6335 | Example: |
6336 | delay_pools 4 # 4 delay pools | |
6337 | delay_class 1 2 # pool 1 is a class 2 pool | |
6338 | delay_class 2 3 # pool 2 is a class 3 pool | |
6339 | delay_class 3 4 # pool 3 is a class 4 pool | |
6340 | delay_class 4 5 # pool 4 is a class 5 pool | |
9edd9041 | 6341 | |
6342 | The delay pool classes are: | |
6343 | ||
6344 | class 1 Everything is limited by a single aggregate | |
6345 | bucket. | |
6346 | ||
6347 | class 2 Everything is limited by a single aggregate | |
6348 | bucket as well as an "individual" bucket chosen | |
b1fb3348 | 6349 | from bits 25 through 32 of the IPv4 address. |
9edd9041 | 6350 | |
6351 | class 3 Everything is limited by a single aggregate | |
6352 | bucket as well as a "network" bucket chosen | |
6353 | from bits 17 through 24 of the IP address and a | |
6354 | "individual" bucket chosen from bits 17 through | |
b1fb3348 | 6355 | 32 of the IPv4 address. |
9edd9041 | 6356 | |
6357 | class 4 Everything in a class 3 delay pool, with an | |
6358 | additional limit on a per user basis. This | |
6359 | only takes effect if the username is established | |
6360 | in advance - by forcing authentication in your | |
6361 | http_access rules. | |
6362 | ||
6363 | class 5 Requests are grouped according their tag (see | |
6364 | external_acl's tag= reply). | |
6365 | ||
0b68481a AJ |
6366 | |
6367 | Each pool also requires a delay_parameters directive to configure the pool size | |
6368 | and speed limits used whenever the pool is applied to a request. Along with | |
6369 | a set of delay_access directives to determine when it is used. | |
6370 | ||
9edd9041 | 6371 | NOTE: If an IP address is a.b.c.d |
6372 | -> bits 25 through 32 are "d" | |
6373 | -> bits 17 through 24 are "c" | |
6374 | -> bits 17 through 32 are "c * 256 + d" | |
b1fb3348 AJ |
6375 | |
6376 | NOTE-2: Due to the use of bitmasks in class 2,3,4 pools they only apply to | |
6377 | IPv4 traffic. Class 1 and 5 pools may be used with IPv6 traffic. | |
638402dd AJ |
6378 | |
6379 | This clause only supports fast acl types. | |
6380 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6381 | ||
6382 | See also delay_parameters and delay_access. | |
9edd9041 | 6383 | DOC_END |
6384 | ||
6385 | NAME: delay_access | |
6386 | TYPE: delay_pool_access | |
6387 | DEFAULT: none | |
638402dd | 6388 | DEFAULT_DOC: Deny using the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 6389 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6390 | LOC: Config.Delay |
6391 | DOC_START | |
6392 | This is used to determine which delay pool a request falls into. | |
6393 | ||
6394 | delay_access is sorted per pool and the matching starts with pool 1, | |
6395 | then pool 2, ..., and finally pool N. The first delay pool where the | |
6396 | request is allowed is selected for the request. If it does not allow | |
6397 | the request to any pool then the request is not delayed (default). | |
6398 | ||
6399 | For example, if you want some_big_clients in delay | |
6400 | pool 1 and lotsa_little_clients in delay pool 2: | |
6401 | ||
638402dd AJ |
6402 | delay_access 1 allow some_big_clients |
6403 | delay_access 1 deny all | |
6404 | delay_access 2 allow lotsa_little_clients | |
6405 | delay_access 2 deny all | |
6406 | delay_access 3 allow authenticated_clients | |
6407 | ||
6408 | See also delay_parameters and delay_class. | |
6409 | ||
9edd9041 | 6410 | DOC_END |
6411 | ||
6412 | NAME: delay_parameters | |
6413 | TYPE: delay_pool_rates | |
6414 | DEFAULT: none | |
9a0a18de | 6415 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6416 | LOC: Config.Delay |
6417 | DOC_START | |
6418 | This defines the parameters for a delay pool. Each delay pool has | |
6419 | a number of "buckets" associated with it, as explained in the | |
0b68481a | 6420 | description of delay_class. |
9edd9041 | 6421 | |
0b68481a AJ |
6422 | For a class 1 delay pool, the syntax is: |
6423 | delay_pools pool 1 | |
6424 | delay_parameters pool aggregate | |
9edd9041 | 6425 | |
6426 | For a class 2 delay pool: | |
0b68481a AJ |
6427 | delay_pools pool 2 |
6428 | delay_parameters pool aggregate individual | |
9edd9041 | 6429 | |
6430 | For a class 3 delay pool: | |
0b68481a AJ |
6431 | delay_pools pool 3 |
6432 | delay_parameters pool aggregate network individual | |
9edd9041 | 6433 | |
6434 | For a class 4 delay pool: | |
0b68481a AJ |
6435 | delay_pools pool 4 |
6436 | delay_parameters pool aggregate network individual user | |
9edd9041 | 6437 | |
6438 | For a class 5 delay pool: | |
0b68481a AJ |
6439 | delay_pools pool 5 |
6440 | delay_parameters pool tagrate | |
9edd9041 | 6441 | |
0b68481a | 6442 | The option variables are: |
9edd9041 | 6443 | |
6444 | pool a pool number - ie, a number between 1 and the | |
6445 | number specified in delay_pools as used in | |
6446 | delay_class lines. | |
6447 | ||
fdb47ac6 | 6448 | aggregate the speed limit parameters for the aggregate bucket |
9edd9041 | 6449 | (class 1, 2, 3). |
6450 | ||
fdb47ac6 | 6451 | individual the speed limit parameters for the individual |
9edd9041 | 6452 | buckets (class 2, 3). |
6453 | ||
fdb47ac6 | 6454 | network the speed limit parameters for the network buckets |
9edd9041 | 6455 | (class 3). |
6456 | ||
fdb47ac6 | 6457 | user the speed limit parameters for the user buckets |
9edd9041 | 6458 | (class 4). |
6459 | ||
fdb47ac6 | 6460 | tagrate the speed limit parameters for the tag buckets |
9edd9041 | 6461 | (class 5). |
6462 | ||
6463 | A pair of delay parameters is written restore/maximum, where restore is | |
6464 | the number of bytes (not bits - modem and network speeds are usually | |
6465 | quoted in bits) per second placed into the bucket, and maximum is the | |
6466 | maximum number of bytes which can be in the bucket at any time. | |
6467 | ||
0b68481a AJ |
6468 | There must be one delay_parameters line for each delay pool. |
6469 | ||
6470 | ||
9edd9041 | 6471 | For example, if delay pool number 1 is a class 2 delay pool as in the |
0b68481a | 6472 | above example, and is being used to strictly limit each host to 64Kbit/sec |
9edd9041 | 6473 | (plus overheads), with no overall limit, the line is: |
6474 | ||
0b68481a AJ |
6475 | delay_parameters 1 -1/-1 8000/8000 |
6476 | ||
6477 | Note that 8 x 8000 KByte/sec -> 64Kbit/sec. | |
9edd9041 | 6478 | |
6479 | Note that the figure -1 is used to represent "unlimited". | |
6480 | ||
0b68481a | 6481 | |
9edd9041 | 6482 | And, if delay pool number 2 is a class 3 delay pool as in the above |
0b68481a AJ |
6483 | example, and you want to limit it to a total of 256Kbit/sec (strict limit) |
6484 | with each 8-bit network permitted 64Kbit/sec (strict limit) and each | |
6485 | individual host permitted 4800bit/sec with a bucket maximum size of 64Kbits | |
9edd9041 | 6486 | to permit a decent web page to be downloaded at a decent speed |
6487 | (if the network is not being limited due to overuse) but slow down | |
6488 | large downloads more significantly: | |
6489 | ||
0b68481a AJ |
6490 | delay_parameters 2 32000/32000 8000/8000 600/8000 |
6491 | ||
6492 | Note that 8 x 32000 KByte/sec -> 256Kbit/sec. | |
6493 | 8 x 8000 KByte/sec -> 64Kbit/sec. | |
6494 | 8 x 600 Byte/sec -> 4800bit/sec. | |
9edd9041 | 6495 | |
9edd9041 | 6496 | |
6497 | Finally, for a class 4 delay pool as in the example - each user will | |
0b68481a | 6498 | be limited to 128Kbits/sec no matter how many workstations they are logged into.: |
9edd9041 | 6499 | |
0b68481a | 6500 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 |
638402dd AJ |
6501 | |
6502 | ||
6503 | See also delay_class and delay_access. | |
6504 | ||
9edd9041 | 6505 | DOC_END |
6506 | ||
6507 | NAME: delay_initial_bucket_level | |
6508 | COMMENT: (percent, 0-100) | |
ae870270 | 6509 | TYPE: u_short |
9edd9041 | 6510 | DEFAULT: 50 |
9a0a18de | 6511 | IFDEF: USE_DELAY_POOLS |
9edd9041 | 6512 | LOC: Config.Delay.initial |
6513 | DOC_START | |
6514 | The initial bucket percentage is used to determine how much is put | |
6515 | in each bucket when squid starts, is reconfigured, or first notices | |
6516 | a host accessing it (in class 2 and class 3, individual hosts and | |
6517 | networks only have buckets associated with them once they have been | |
6518 | "seen" by squid). | |
6519 | DOC_END | |
6520 | ||
b4cd430a CT |
6521 | COMMENT_START |
6522 | CLIENT DELAY POOL PARAMETERS | |
6523 | ----------------------------------------------------------------------------- | |
6524 | COMMENT_END | |
6525 | ||
6526 | NAME: client_delay_pools | |
6527 | TYPE: client_delay_pool_count | |
6528 | DEFAULT: 0 | |
9a0a18de | 6529 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
6530 | LOC: Config.ClientDelay |
6531 | DOC_START | |
6532 | This option specifies the number of client delay pools used. It must | |
6533 | preceed other client_delay_* options. | |
6534 | ||
638402dd AJ |
6535 | Example: |
6536 | client_delay_pools 2 | |
6537 | ||
6538 | See also client_delay_parameters and client_delay_access. | |
b4cd430a CT |
6539 | DOC_END |
6540 | ||
6541 | NAME: client_delay_initial_bucket_level | |
6542 | COMMENT: (percent, 0-no_limit) | |
ae870270 | 6543 | TYPE: u_short |
b4cd430a | 6544 | DEFAULT: 50 |
9a0a18de | 6545 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
6546 | LOC: Config.ClientDelay.initial |
6547 | DOC_START | |
6548 | This option determines the initial bucket size as a percentage of | |
6549 | max_bucket_size from client_delay_parameters. Buckets are created | |
6550 | at the time of the "first" connection from the matching IP. Idle | |
6551 | buckets are periodically deleted up. | |
6552 | ||
6553 | You can specify more than 100 percent but note that such "oversized" | |
6554 | buckets are not refilled until their size goes down to max_bucket_size | |
6555 | from client_delay_parameters. | |
6556 | ||
638402dd AJ |
6557 | Example: |
6558 | client_delay_initial_bucket_level 50 | |
b4cd430a CT |
6559 | DOC_END |
6560 | ||
6561 | NAME: client_delay_parameters | |
6562 | TYPE: client_delay_pool_rates | |
6563 | DEFAULT: none | |
9a0a18de | 6564 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
6565 | LOC: Config.ClientDelay |
6566 | DOC_START | |
6567 | ||
6568 | This option configures client-side bandwidth limits using the | |
6569 | following format: | |
6570 | ||
6571 | client_delay_parameters pool speed_limit max_bucket_size | |
6572 | ||
6573 | pool is an integer ID used for client_delay_access matching. | |
6574 | ||
6575 | speed_limit is bytes added to the bucket per second. | |
6576 | ||
6577 | max_bucket_size is the maximum size of a bucket, enforced after any | |
6578 | speed_limit additions. | |
6579 | ||
6580 | Please see the delay_parameters option for more information and | |
6581 | examples. | |
6582 | ||
638402dd AJ |
6583 | Example: |
6584 | client_delay_parameters 1 1024 2048 | |
6585 | client_delay_parameters 2 51200 16384 | |
6586 | ||
6587 | See also client_delay_access. | |
6588 | ||
b4cd430a CT |
6589 | DOC_END |
6590 | ||
6591 | NAME: client_delay_access | |
6592 | TYPE: client_delay_pool_access | |
6593 | DEFAULT: none | |
638402dd | 6594 | DEFAULT_DOC: Deny use of the pool, unless allow rules exist in squid.conf for the pool. |
9a0a18de | 6595 | IFDEF: USE_DELAY_POOLS |
b4cd430a CT |
6596 | LOC: Config.ClientDelay |
6597 | DOC_START | |
b4cd430a CT |
6598 | This option determines the client-side delay pool for the |
6599 | request: | |
6600 | ||
6601 | client_delay_access pool_ID allow|deny acl_name | |
6602 | ||
6603 | All client_delay_access options are checked in their pool ID | |
6604 | order, starting with pool 1. The first checked pool with allowed | |
6605 | request is selected for the request. If no ACL matches or there | |
6606 | are no client_delay_access options, the request bandwidth is not | |
6607 | limited. | |
6608 | ||
6609 | The ACL-selected pool is then used to find the | |
6610 | client_delay_parameters for the request. Client-side pools are | |
6611 | not used to aggregate clients. Clients are always aggregated | |
6612 | based on their source IP addresses (one bucket per source IP). | |
6613 | ||
638402dd AJ |
6614 | This clause only supports fast acl types. |
6615 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
6616 | Additionally, only the client TCP connection details are available. | |
6617 | ACLs testing HTTP properties will not work. | |
6618 | ||
b4cd430a CT |
6619 | Please see delay_access for more examples. |
6620 | ||
638402dd AJ |
6621 | Example: |
6622 | client_delay_access 1 allow low_rate_network | |
6623 | client_delay_access 2 allow vips_network | |
6624 | ||
6625 | ||
6626 | See also client_delay_parameters and client_delay_pools. | |
b4cd430a CT |
6627 | DOC_END |
6628 | ||
cccac0a2 | 6629 | COMMENT_START |
8d6275c0 | 6630 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS |
cccac0a2 | 6631 | ----------------------------------------------------------------------------- |
6632 | COMMENT_END | |
6633 | ||
8d6275c0 | 6634 | NAME: wccp_router |
6635 | TYPE: address | |
6636 | LOC: Config.Wccp.router | |
0eb08770 | 6637 | DEFAULT: any_addr |
638402dd | 6638 | DEFAULT_DOC: WCCP disabled. |
8d6275c0 | 6639 | IFDEF: USE_WCCP |
e313ab0a AJ |
6640 | DOC_START |
6641 | Use this option to define your WCCP ``home'' router for | |
6642 | Squid. | |
6643 | ||
6644 | wccp_router supports a single WCCP(v1) router | |
6645 | ||
6646 | wccp2_router supports multiple WCCPv2 routers | |
6647 | ||
6648 | only one of the two may be used at the same time and defines | |
6649 | which version of WCCP to use. | |
6650 | DOC_END | |
df2eec10 | 6651 | |
8d6275c0 | 6652 | NAME: wccp2_router |
9fb4efad | 6653 | TYPE: IpAddress_list |
8d6275c0 | 6654 | LOC: Config.Wccp2.router |
cccac0a2 | 6655 | DEFAULT: none |
638402dd | 6656 | DEFAULT_DOC: WCCPv2 disabled. |
8d6275c0 | 6657 | IFDEF: USE_WCCPv2 |
cccac0a2 | 6658 | DOC_START |
8d6275c0 | 6659 | Use this option to define your WCCP ``home'' router for |
6660 | Squid. | |
cccac0a2 | 6661 | |
8d6275c0 | 6662 | wccp_router supports a single WCCP(v1) router |
cccac0a2 | 6663 | |
8d6275c0 | 6664 | wccp2_router supports multiple WCCPv2 routers |
cccac0a2 | 6665 | |
8d6275c0 | 6666 | only one of the two may be used at the same time and defines |
6667 | which version of WCCP to use. | |
6668 | DOC_END | |
6669 | ||
6670 | NAME: wccp_version | |
cccac0a2 | 6671 | TYPE: int |
8d6275c0 | 6672 | LOC: Config.Wccp.version |
6673 | DEFAULT: 4 | |
6674 | IFDEF: USE_WCCP | |
cccac0a2 | 6675 | DOC_START |
8d6275c0 | 6676 | This directive is only relevant if you need to set up WCCP(v1) |
6677 | to some very old and end-of-life Cisco routers. In all other | |
6678 | setups it must be left unset or at the default setting. | |
6679 | It defines an internal version in the WCCP(v1) protocol, | |
6680 | with version 4 being the officially documented protocol. | |
cccac0a2 | 6681 | |
8d6275c0 | 6682 | According to some users, Cisco IOS 11.2 and earlier only |
6683 | support WCCP version 3. If you're using that or an earlier | |
6684 | version of IOS, you may need to change this value to 3, otherwise | |
6685 | do not specify this parameter. | |
cccac0a2 | 6686 | DOC_END |
6687 | ||
8d6275c0 | 6688 | NAME: wccp2_rebuild_wait |
6689 | TYPE: onoff | |
6690 | LOC: Config.Wccp2.rebuildwait | |
6691 | DEFAULT: on | |
6692 | IFDEF: USE_WCCPv2 | |
6693 | DOC_START | |
6694 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
6695 | before sending the first wccp2 HereIAm packet | |
6696 | DOC_END | |
cccac0a2 | 6697 | |
8d6275c0 | 6698 | NAME: wccp2_forwarding_method |
e313ab0a | 6699 | TYPE: wccp2_method |
8d6275c0 | 6700 | LOC: Config.Wccp2.forwarding_method |
451c4786 | 6701 | DEFAULT: gre |
8d6275c0 | 6702 | IFDEF: USE_WCCPv2 |
cccac0a2 | 6703 | DOC_START |
699acd19 | 6704 | WCCP2 allows the setting of forwarding methods between the |
8d6275c0 | 6705 | router/switch and the cache. Valid values are as follows: |
cccac0a2 | 6706 | |
451c4786 AJ |
6707 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
6708 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 6709 | |
8d6275c0 | 6710 | Currently (as of IOS 12.4) cisco routers only support GRE. |
6711 | Cisco switches only support the L2 redirect assignment method. | |
cccac0a2 | 6712 | DOC_END |
6713 | ||
8d6275c0 | 6714 | NAME: wccp2_return_method |
e313ab0a | 6715 | TYPE: wccp2_method |
8d6275c0 | 6716 | LOC: Config.Wccp2.return_method |
451c4786 | 6717 | DEFAULT: gre |
8d6275c0 | 6718 | IFDEF: USE_WCCPv2 |
cccac0a2 | 6719 | DOC_START |
699acd19 | 6720 | WCCP2 allows the setting of return methods between the |
8d6275c0 | 6721 | router/switch and the cache for packets that the cache |
6722 | decides not to handle. Valid values are as follows: | |
cccac0a2 | 6723 | |
451c4786 AJ |
6724 | gre - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) |
6725 | l2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
cccac0a2 | 6726 | |
8d6275c0 | 6727 | Currently (as of IOS 12.4) cisco routers only support GRE. |
6728 | Cisco switches only support the L2 redirect assignment. | |
cccac0a2 | 6729 | |
699acd19 | 6730 | If the "ip wccp redirect exclude in" command has been |
8d6275c0 | 6731 | enabled on the cache interface, then it is still safe for |
6732 | the proxy server to use a l2 redirect method even if this | |
6733 | option is set to GRE. | |
cccac0a2 | 6734 | DOC_END |
6735 | ||
8d6275c0 | 6736 | NAME: wccp2_assignment_method |
451c4786 | 6737 | TYPE: wccp2_amethod |
8d6275c0 | 6738 | LOC: Config.Wccp2.assignment_method |
451c4786 | 6739 | DEFAULT: hash |
8d6275c0 | 6740 | IFDEF: USE_WCCPv2 |
cccac0a2 | 6741 | DOC_START |
8d6275c0 | 6742 | WCCP2 allows the setting of methods to assign the WCCP hash |
6743 | Valid values are as follows: | |
cccac0a2 | 6744 | |
451c4786 | 6745 | hash - Hash assignment |
bb7a1781 | 6746 | mask - Mask assignment |
cccac0a2 | 6747 | |
8d6275c0 | 6748 | As a general rule, cisco routers support the hash assignment method |
6749 | and cisco switches support the mask assignment method. | |
6750 | DOC_END | |
cccac0a2 | 6751 | |
8d6275c0 | 6752 | NAME: wccp2_service |
6753 | TYPE: wccp2_service | |
6754 | LOC: Config.Wccp2.info | |
8d6275c0 | 6755 | DEFAULT_IF_NONE: standard 0 |
638402dd | 6756 | DEFAULT_DOC: Use the 'web-cache' standard service. |
8d6275c0 | 6757 | IFDEF: USE_WCCPv2 |
6758 | DOC_START | |
6759 | WCCP2 allows for multiple traffic services. There are two | |
6760 | types: "standard" and "dynamic". The standard type defines | |
6761 | one service id - http (id 0). The dynamic service ids can be from | |
6762 | 51 to 255 inclusive. In order to use a dynamic service id | |
6763 | one must define the type of traffic to be redirected; this is done | |
6764 | using the wccp2_service_info option. | |
6765 | ||
6766 | The "standard" type does not require a wccp2_service_info option, | |
6767 | just specifying the service id will suffice. | |
6768 | ||
6769 | MD5 service authentication can be enabled by adding | |
6770 | "password=<password>" to the end of this service declaration. | |
6771 | ||
6772 | Examples: | |
6773 | ||
6774 | wccp2_service standard 0 # for the 'web-cache' standard service | |
6775 | wccp2_service dynamic 80 # a dynamic service type which will be | |
6776 | # fleshed out with subsequent options. | |
6777 | wccp2_service standard 0 password=foo | |
8d6275c0 | 6778 | DOC_END |
6779 | ||
6780 | NAME: wccp2_service_info | |
6781 | TYPE: wccp2_service_info | |
6782 | LOC: Config.Wccp2.info | |
6783 | DEFAULT: none | |
6784 | IFDEF: USE_WCCPv2 | |
6785 | DOC_START | |
6786 | Dynamic WCCPv2 services require further information to define the | |
6787 | traffic you wish to have diverted. | |
6788 | ||
6789 | The format is: | |
6790 | ||
6791 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
6792 | priority=<priority> ports=<port>,<port>.. | |
6793 | ||
6794 | The relevant WCCPv2 flags: | |
6795 | + src_ip_hash, dst_ip_hash | |
005fe566 | 6796 | + source_port_hash, dst_port_hash |
8d6275c0 | 6797 | + src_ip_alt_hash, dst_ip_alt_hash |
6798 | + src_port_alt_hash, dst_port_alt_hash | |
6799 | + ports_source | |
6800 | ||
6801 | The port list can be one to eight entries. | |
6802 | ||
6803 | Example: | |
6804 | ||
6805 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
6806 | priority=240 ports=80 | |
6807 | ||
6808 | Note: the service id must have been defined by a previous | |
6809 | 'wccp2_service dynamic <id>' entry. | |
6810 | DOC_END | |
6811 | ||
6812 | NAME: wccp2_weight | |
6813 | TYPE: int | |
6814 | LOC: Config.Wccp2.weight | |
6815 | DEFAULT: 10000 | |
6816 | IFDEF: USE_WCCPv2 | |
6817 | DOC_START | |
6818 | Each cache server gets assigned a set of the destination | |
6819 | hash proportional to their weight. | |
6820 | DOC_END | |
6821 | ||
6822 | NAME: wccp_address | |
6823 | TYPE: address | |
6824 | LOC: Config.Wccp.address | |
6825 | DEFAULT: 0.0.0.0 | |
638402dd | 6826 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 6827 | IFDEF: USE_WCCP |
638402dd AJ |
6828 | DOC_START |
6829 | Use this option if you require WCCPv2 to use a specific | |
6830 | interface address. | |
6831 | ||
6832 | The default behavior is to not bind to any specific address. | |
6833 | DOC_END | |
df2eec10 | 6834 | |
8d6275c0 | 6835 | NAME: wccp2_address |
6836 | TYPE: address | |
6837 | LOC: Config.Wccp2.address | |
6838 | DEFAULT: 0.0.0.0 | |
638402dd | 6839 | DEFAULT_DOC: Address selected by the operating system. |
8d6275c0 | 6840 | IFDEF: USE_WCCPv2 |
6841 | DOC_START | |
6842 | Use this option if you require WCCP to use a specific | |
6843 | interface address. | |
6844 | ||
6845 | The default behavior is to not bind to any specific address. | |
6846 | DOC_END | |
6847 | ||
6848 | COMMENT_START | |
6849 | PERSISTENT CONNECTION HANDLING | |
6850 | ----------------------------------------------------------------------------- | |
6851 | ||
6852 | Also see "pconn_timeout" in the TIMEOUTS section | |
6853 | COMMENT_END | |
6854 | ||
6855 | NAME: client_persistent_connections | |
6856 | TYPE: onoff | |
6857 | LOC: Config.onoff.client_pconns | |
6858 | DEFAULT: on | |
638402dd AJ |
6859 | DOC_START |
6860 | Persistent connection support for clients. | |
6861 | Squid uses persistent connections (when allowed). You can use | |
6862 | this option to disable persistent connections with clients. | |
6863 | DOC_END | |
8d6275c0 | 6864 | |
6865 | NAME: server_persistent_connections | |
6866 | TYPE: onoff | |
6867 | LOC: Config.onoff.server_pconns | |
6868 | DEFAULT: on | |
6869 | DOC_START | |
638402dd AJ |
6870 | Persistent connection support for servers. |
6871 | Squid uses persistent connections (when allowed). You can use | |
6872 | this option to disable persistent connections with servers. | |
8d6275c0 | 6873 | DOC_END |
6874 | ||
6875 | NAME: persistent_connection_after_error | |
6876 | TYPE: onoff | |
6877 | LOC: Config.onoff.error_pconns | |
0fccfb7f | 6878 | DEFAULT: on |
8d6275c0 | 6879 | DOC_START |
6880 | With this directive the use of persistent connections after | |
6881 | HTTP errors can be disabled. Useful if you have clients | |
6882 | who fail to handle errors on persistent connections proper. | |
6883 | DOC_END | |
6884 | ||
6885 | NAME: detect_broken_pconn | |
6886 | TYPE: onoff | |
6887 | LOC: Config.onoff.detect_broken_server_pconns | |
6888 | DEFAULT: off | |
6889 | DOC_START | |
6890 | Some servers have been found to incorrectly signal the use | |
6891 | of HTTP/1.0 persistent connections even on replies not | |
6892 | compatible, causing significant delays. This server problem | |
6893 | has mostly been seen on redirects. | |
6894 | ||
6895 | By enabling this directive Squid attempts to detect such | |
6896 | broken replies and automatically assume the reply is finished | |
6897 | after 10 seconds timeout. | |
6898 | DOC_END | |
6899 | ||
6900 | COMMENT_START | |
6901 | CACHE DIGEST OPTIONS | |
6902 | ----------------------------------------------------------------------------- | |
6903 | COMMENT_END | |
6904 | ||
6905 | NAME: digest_generation | |
6906 | IFDEF: USE_CACHE_DIGESTS | |
6907 | TYPE: onoff | |
6908 | LOC: Config.onoff.digest_generation | |
6909 | DEFAULT: on | |
6910 | DOC_START | |
6911 | This controls whether the server will generate a Cache Digest | |
6912 | of its contents. By default, Cache Digest generation is | |
13e917b5 | 6913 | enabled if Squid is compiled with --enable-cache-digests defined. |
8d6275c0 | 6914 | DOC_END |
6915 | ||
6916 | NAME: digest_bits_per_entry | |
6917 | IFDEF: USE_CACHE_DIGESTS | |
6918 | TYPE: int | |
6919 | LOC: Config.digest.bits_per_entry | |
6920 | DEFAULT: 5 | |
6921 | DOC_START | |
6922 | This is the number of bits of the server's Cache Digest which | |
6923 | will be associated with the Digest entry for a given HTTP | |
6924 | Method and URL (public key) combination. The default is 5. | |
6925 | DOC_END | |
6926 | ||
6927 | NAME: digest_rebuild_period | |
6928 | IFDEF: USE_CACHE_DIGESTS | |
6929 | COMMENT: (seconds) | |
6930 | TYPE: time_t | |
6931 | LOC: Config.digest.rebuild_period | |
6932 | DEFAULT: 1 hour | |
6933 | DOC_START | |
749ceff8 | 6934 | This is the wait time between Cache Digest rebuilds. |
8d6275c0 | 6935 | DOC_END |
6936 | ||
6937 | NAME: digest_rewrite_period | |
6938 | COMMENT: (seconds) | |
6939 | IFDEF: USE_CACHE_DIGESTS | |
6940 | TYPE: time_t | |
6941 | LOC: Config.digest.rewrite_period | |
6942 | DEFAULT: 1 hour | |
6943 | DOC_START | |
749ceff8 | 6944 | This is the wait time between Cache Digest writes to |
8d6275c0 | 6945 | disk. |
6946 | DOC_END | |
6947 | ||
6948 | NAME: digest_swapout_chunk_size | |
6949 | COMMENT: (bytes) | |
6950 | TYPE: b_size_t | |
6951 | IFDEF: USE_CACHE_DIGESTS | |
6952 | LOC: Config.digest.swapout_chunk_size | |
6953 | DEFAULT: 4096 bytes | |
6954 | DOC_START | |
6955 | This is the number of bytes of the Cache Digest to write to | |
6956 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
6957 | default swap page. | |
6958 | DOC_END | |
6959 | ||
6960 | NAME: digest_rebuild_chunk_percentage | |
6961 | COMMENT: (percent, 0-100) | |
6962 | IFDEF: USE_CACHE_DIGESTS | |
6963 | TYPE: int | |
6964 | LOC: Config.digest.rebuild_chunk_percentage | |
6965 | DEFAULT: 10 | |
6966 | DOC_START | |
6967 | This is the percentage of the Cache Digest to be scanned at a | |
6968 | time. By default it is set to 10% of the Cache Digest. | |
6969 | DOC_END | |
6970 | ||
1db9eacd | 6971 | COMMENT_START |
5473c134 | 6972 | SNMP OPTIONS |
1db9eacd | 6973 | ----------------------------------------------------------------------------- |
6974 | COMMENT_END | |
6975 | ||
5473c134 | 6976 | NAME: snmp_port |
ae870270 | 6977 | TYPE: u_short |
5473c134 | 6978 | LOC: Config.Port.snmp |
87630341 | 6979 | DEFAULT: 0 |
638402dd | 6980 | DEFAULT_DOC: SNMP disabled. |
5473c134 | 6981 | IFDEF: SQUID_SNMP |
8d6275c0 | 6982 | DOC_START |
87630341 | 6983 | The port number where Squid listens for SNMP requests. To enable |
6984 | SNMP support set this to a suitable port number. Port number | |
6985 | 3401 is often used for the Squid SNMP agent. By default it's | |
6986 | set to "0" (disabled) | |
e0855596 AJ |
6987 | |
6988 | Example: | |
6989 | snmp_port 3401 | |
8d6275c0 | 6990 | DOC_END |
6991 | ||
5473c134 | 6992 | NAME: snmp_access |
6993 | TYPE: acl_access | |
6994 | LOC: Config.accessList.snmp | |
638402dd AJ |
6995 | DEFAULT: none |
6996 | DEFAULT_DOC: Deny, unless rules exist in squid.conf. | |
5473c134 | 6997 | IFDEF: SQUID_SNMP |
8d6275c0 | 6998 | DOC_START |
5473c134 | 6999 | Allowing or denying access to the SNMP port. |
8d6275c0 | 7000 | |
5473c134 | 7001 | All access to the agent is denied by default. |
7002 | usage: | |
8d6275c0 | 7003 | |
5473c134 | 7004 | snmp_access allow|deny [!]aclname ... |
8d6275c0 | 7005 | |
b3567eb5 FC |
7006 | This clause only supports fast acl types. |
7007 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
638402dd | 7008 | |
5473c134 | 7009 | Example: |
7010 | snmp_access allow snmppublic localhost | |
7011 | snmp_access deny all | |
cccac0a2 | 7012 | DOC_END |
7013 | ||
5473c134 | 7014 | NAME: snmp_incoming_address |
7015 | TYPE: address | |
7016 | LOC: Config.Addrs.snmp_incoming | |
0eb08770 | 7017 | DEFAULT: any_addr |
638402dd | 7018 | DEFAULT_DOC: Accept SNMP packets from all machine interfaces. |
5473c134 | 7019 | IFDEF: SQUID_SNMP |
638402dd AJ |
7020 | DOC_START |
7021 | Just like 'udp_incoming_address', but for the SNMP port. | |
7022 | ||
7023 | snmp_incoming_address is used for the SNMP socket receiving | |
7024 | messages from SNMP agents. | |
7025 | ||
7026 | The default snmp_incoming_address is to listen on all | |
7027 | available network interfaces. | |
7028 | DOC_END | |
df2eec10 | 7029 | |
5473c134 | 7030 | NAME: snmp_outgoing_address |
7031 | TYPE: address | |
7032 | LOC: Config.Addrs.snmp_outgoing | |
0eb08770 | 7033 | DEFAULT: no_addr |
638402dd | 7034 | DEFAULT_DOC: Use snmp_incoming_address or an address selected by the operating system. |
5473c134 | 7035 | IFDEF: SQUID_SNMP |
cccac0a2 | 7036 | DOC_START |
638402dd | 7037 | Just like 'udp_outgoing_address', but for the SNMP port. |
cccac0a2 | 7038 | |
5473c134 | 7039 | snmp_outgoing_address is used for SNMP packets returned to SNMP |
7040 | agents. | |
cccac0a2 | 7041 | |
0eb08770 HN |
7042 | If snmp_outgoing_address is not set it will use the same socket |
7043 | as snmp_incoming_address. Only change this if you want to have | |
7044 | SNMP replies sent using another address than where this Squid | |
7045 | listens for SNMP queries. | |
cccac0a2 | 7046 | |
5473c134 | 7047 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have |
638402dd | 7048 | the same value since they both use the same port. |
cccac0a2 | 7049 | DOC_END |
7050 | ||
5473c134 | 7051 | COMMENT_START |
7052 | ICP OPTIONS | |
7053 | ----------------------------------------------------------------------------- | |
7054 | COMMENT_END | |
7055 | ||
7056 | NAME: icp_port udp_port | |
ae870270 | 7057 | TYPE: u_short |
5473c134 | 7058 | DEFAULT: 0 |
638402dd | 7059 | DEFAULT_DOC: ICP disabled. |
5473c134 | 7060 | LOC: Config.Port.icp |
cccac0a2 | 7061 | DOC_START |
5473c134 | 7062 | The port number where Squid sends and receives ICP queries to |
7063 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
e0855596 AJ |
7064 | |
7065 | Example: | |
7066 | icp_port @DEFAULT_ICP_PORT@ | |
cccac0a2 | 7067 | DOC_END |
7068 | ||
5473c134 | 7069 | NAME: htcp_port |
7070 | IFDEF: USE_HTCP | |
ae870270 | 7071 | TYPE: u_short |
87630341 | 7072 | DEFAULT: 0 |
638402dd | 7073 | DEFAULT_DOC: HTCP disabled. |
5473c134 | 7074 | LOC: Config.Port.htcp |
cccac0a2 | 7075 | DOC_START |
5473c134 | 7076 | The port number where Squid sends and receives HTCP queries to |
87630341 | 7077 | and from neighbor caches. To turn it on you want to set it to |
638402dd | 7078 | 4827. |
e0855596 AJ |
7079 | |
7080 | Example: | |
7081 | htcp_port 4827 | |
cccac0a2 | 7082 | DOC_END |
7083 | ||
7084 | NAME: log_icp_queries | |
7085 | COMMENT: on|off | |
7086 | TYPE: onoff | |
7087 | DEFAULT: on | |
7088 | LOC: Config.onoff.log_udp | |
7089 | DOC_START | |
7090 | If set, ICP queries are logged to access.log. You may wish | |
7091 | do disable this if your ICP load is VERY high to speed things | |
7092 | up or to simplify log analysis. | |
7093 | DOC_END | |
7094 | ||
5473c134 | 7095 | NAME: udp_incoming_address |
7096 | TYPE: address | |
7097 | LOC:Config.Addrs.udp_incoming | |
0eb08770 | 7098 | DEFAULT: any_addr |
638402dd | 7099 | DEFAULT_DOC: Accept packets from all machine interfaces. |
8524d4b2 | 7100 | DOC_START |
7101 | udp_incoming_address is used for UDP packets received from other | |
7102 | caches. | |
7103 | ||
7104 | The default behavior is to not bind to any specific address. | |
7105 | ||
7106 | Only change this if you want to have all UDP queries received on | |
7107 | a specific interface/address. | |
7108 | ||
7109 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
7110 | modules. Altering it will affect all of them in the same manner. | |
7111 | ||
7112 | see also; udp_outgoing_address | |
7113 | ||
7114 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
7115 | have the same value since they both use the same port. | |
7116 | DOC_END | |
cccac0a2 | 7117 | |
5473c134 | 7118 | NAME: udp_outgoing_address |
7119 | TYPE: address | |
7120 | LOC: Config.Addrs.udp_outgoing | |
0eb08770 | 7121 | DEFAULT: no_addr |
638402dd | 7122 | DEFAULT_DOC: Use udp_incoming_address or an address selected by the operating system. |
cccac0a2 | 7123 | DOC_START |
8524d4b2 | 7124 | udp_outgoing_address is used for UDP packets sent out to other |
5473c134 | 7125 | caches. |
cccac0a2 | 7126 | |
5473c134 | 7127 | The default behavior is to not bind to any specific address. |
cccac0a2 | 7128 | |
8524d4b2 | 7129 | Instead it will use the same socket as udp_incoming_address. |
7130 | Only change this if you want to have UDP queries sent using another | |
7131 | address than where this Squid listens for UDP queries from other | |
5473c134 | 7132 | caches. |
7133 | ||
8524d4b2 | 7134 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS |
7135 | modules. Altering it will affect all of them in the same manner. | |
7136 | ||
7137 | see also; udp_incoming_address | |
7138 | ||
5473c134 | 7139 | NOTE, udp_incoming_address and udp_outgoing_address can not |
8524d4b2 | 7140 | have the same value since they both use the same port. |
cccac0a2 | 7141 | DOC_END |
7142 | ||
3d1e3e43 | 7143 | NAME: icp_hit_stale |
7144 | COMMENT: on|off | |
7145 | TYPE: onoff | |
7146 | DEFAULT: off | |
7147 | LOC: Config.onoff.icp_hit_stale | |
7148 | DOC_START | |
7149 | If you want to return ICP_HIT for stale cache objects, set this | |
7150 | option to 'on'. If you have sibling relationships with caches | |
7151 | in other administrative domains, this should be 'off'. If you only | |
7152 | have sibling relationships with caches under your control, | |
7153 | it is probably okay to set this to 'on'. | |
7154 | If set to 'on', your siblings should use the option "allow-miss" | |
7155 | on their cache_peer lines for connecting to you. | |
7156 | DOC_END | |
7157 | ||
5473c134 | 7158 | NAME: minimum_direct_hops |
cccac0a2 | 7159 | TYPE: int |
5473c134 | 7160 | DEFAULT: 4 |
7161 | LOC: Config.minDirectHops | |
cccac0a2 | 7162 | DOC_START |
5473c134 | 7163 | If using the ICMP pinging stuff, do direct fetches for sites |
7164 | which are no more than this many hops away. | |
cccac0a2 | 7165 | DOC_END |
7166 | ||
5473c134 | 7167 | NAME: minimum_direct_rtt |
638402dd | 7168 | COMMENT: (msec) |
5473c134 | 7169 | TYPE: int |
7170 | DEFAULT: 400 | |
7171 | LOC: Config.minDirectRtt | |
cccac0a2 | 7172 | DOC_START |
5473c134 | 7173 | If using the ICMP pinging stuff, do direct fetches for sites |
7174 | which are no more than this many rtt milliseconds away. | |
cccac0a2 | 7175 | DOC_END |
7176 | ||
cccac0a2 | 7177 | NAME: netdb_low |
7178 | TYPE: int | |
7179 | DEFAULT: 900 | |
7180 | LOC: Config.Netdb.low | |
638402dd AJ |
7181 | DOC_START |
7182 | The low water mark for the ICMP measurement database. | |
7183 | ||
7184 | Note: high watermark controlled by netdb_high directive. | |
7185 | ||
7186 | These watermarks are counts, not percents. The defaults are | |
7187 | (low) 900 and (high) 1000. When the high water mark is | |
7188 | reached, database entries will be deleted until the low | |
7189 | mark is reached. | |
7190 | DOC_END | |
cccac0a2 | 7191 | |
7192 | NAME: netdb_high | |
7193 | TYPE: int | |
7194 | DEFAULT: 1000 | |
7195 | LOC: Config.Netdb.high | |
7196 | DOC_START | |
638402dd AJ |
7197 | The high water mark for the ICMP measurement database. |
7198 | ||
7199 | Note: low watermark controlled by netdb_low directive. | |
7200 | ||
7201 | These watermarks are counts, not percents. The defaults are | |
7202 | (low) 900 and (high) 1000. When the high water mark is | |
7203 | reached, database entries will be deleted until the low | |
7204 | mark is reached. | |
cccac0a2 | 7205 | DOC_END |
7206 | ||
cccac0a2 | 7207 | NAME: netdb_ping_period |
7208 | TYPE: time_t | |
7209 | LOC: Config.Netdb.period | |
7210 | DEFAULT: 5 minutes | |
7211 | DOC_START | |
7212 | The minimum period for measuring a site. There will be at | |
7213 | least this much delay between successive pings to the same | |
7214 | network. The default is five minutes. | |
7215 | DOC_END | |
7216 | ||
cccac0a2 | 7217 | NAME: query_icmp |
7218 | COMMENT: on|off | |
7219 | TYPE: onoff | |
7220 | DEFAULT: off | |
7221 | LOC: Config.onoff.query_icmp | |
7222 | DOC_START | |
7223 | If you want to ask your peers to include ICMP data in their ICP | |
7224 | replies, enable this option. | |
7225 | ||
7226 | If your peer has configured Squid (during compilation) with | |
7f7db318 | 7227 | '--enable-icmp' that peer will send ICMP pings to origin server |
7228 | sites of the URLs it receives. If you enable this option the | |
cccac0a2 | 7229 | ICP replies from that peer will include the ICMP data (if available). |
7230 | Then, when choosing a parent cache, Squid will choose the parent with | |
7231 | the minimal RTT to the origin server. When this happens, the | |
7232 | hierarchy field of the access.log will be | |
7233 | "CLOSEST_PARENT_MISS". This option is off by default. | |
7234 | DOC_END | |
7235 | ||
7236 | NAME: test_reachability | |
7237 | COMMENT: on|off | |
7238 | TYPE: onoff | |
7239 | DEFAULT: off | |
7240 | LOC: Config.onoff.test_reachability | |
7241 | DOC_START | |
7242 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
7243 | instead of ICP_MISS if the target host is NOT in the ICMP | |
7244 | database, or has a zero RTT. | |
7245 | DOC_END | |
7246 | ||
5473c134 | 7247 | NAME: icp_query_timeout |
7248 | COMMENT: (msec) | |
7249 | DEFAULT: 0 | |
638402dd | 7250 | DEFAULT_DOC: Dynamic detection. |
5473c134 | 7251 | TYPE: int |
7252 | LOC: Config.Timeout.icp_query | |
4c3ef9b2 | 7253 | DOC_START |
5473c134 | 7254 | Normally Squid will automatically determine an optimal ICP |
7255 | query timeout value based on the round-trip-time of recent ICP | |
7256 | queries. If you want to override the value determined by | |
7257 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
7258 | value is specified in MILLISECONDS, so, to use a 2-second | |
7259 | timeout (the old default), you would write: | |
4c3ef9b2 | 7260 | |
5473c134 | 7261 | icp_query_timeout 2000 |
4c3ef9b2 | 7262 | DOC_END |
7263 | ||
5473c134 | 7264 | NAME: maximum_icp_query_timeout |
7265 | COMMENT: (msec) | |
7266 | DEFAULT: 2000 | |
7267 | TYPE: int | |
7268 | LOC: Config.Timeout.icp_query_max | |
cccac0a2 | 7269 | DOC_START |
5473c134 | 7270 | Normally the ICP query timeout is determined dynamically. But |
7271 | sometimes it can lead to very large values (say 5 seconds). | |
7272 | Use this option to put an upper limit on the dynamic timeout | |
7273 | value. Do NOT use this option to always use a fixed (instead | |
7274 | of a dynamic) timeout value. To set a fixed timeout see the | |
7275 | 'icp_query_timeout' directive. | |
cccac0a2 | 7276 | DOC_END |
7277 | ||
5473c134 | 7278 | NAME: minimum_icp_query_timeout |
7279 | COMMENT: (msec) | |
7280 | DEFAULT: 5 | |
7281 | TYPE: int | |
7282 | LOC: Config.Timeout.icp_query_min | |
cccac0a2 | 7283 | DOC_START |
5473c134 | 7284 | Normally the ICP query timeout is determined dynamically. But |
7285 | sometimes it can lead to very small timeouts, even lower than | |
7286 | the normal latency variance on your link due to traffic. | |
7287 | Use this option to put an lower limit on the dynamic timeout | |
7288 | value. Do NOT use this option to always use a fixed (instead | |
7289 | of a dynamic) timeout value. To set a fixed timeout see the | |
7290 | 'icp_query_timeout' directive. | |
cccac0a2 | 7291 | DOC_END |
7292 | ||
5473c134 | 7293 | NAME: background_ping_rate |
7294 | COMMENT: time-units | |
7295 | TYPE: time_t | |
7296 | DEFAULT: 10 seconds | |
7297 | LOC: Config.backgroundPingRate | |
cccac0a2 | 7298 | DOC_START |
5473c134 | 7299 | Controls how often the ICP pings are sent to siblings that |
7300 | have background-ping set. | |
cccac0a2 | 7301 | DOC_END |
7302 | ||
5473c134 | 7303 | COMMENT_START |
7304 | MULTICAST ICP OPTIONS | |
7305 | ----------------------------------------------------------------------------- | |
7306 | COMMENT_END | |
7307 | ||
7308 | NAME: mcast_groups | |
7309 | TYPE: wordlist | |
7310 | LOC: Config.mcast_group_list | |
8c01ada0 | 7311 | DEFAULT: none |
7312 | DOC_START | |
5473c134 | 7313 | This tag specifies a list of multicast groups which your server |
7314 | should join to receive multicasted ICP queries. | |
8c01ada0 | 7315 | |
5473c134 | 7316 | NOTE! Be very careful what you put here! Be sure you |
7317 | understand the difference between an ICP _query_ and an ICP | |
7318 | _reply_. This option is to be set only if you want to RECEIVE | |
7319 | multicast queries. Do NOT set this option to SEND multicast | |
7320 | ICP (use cache_peer for that). ICP replies are always sent via | |
7321 | unicast, so this option does not affect whether or not you will | |
7322 | receive replies from multicast group members. | |
8c01ada0 | 7323 | |
5473c134 | 7324 | You must be very careful to NOT use a multicast address which |
7325 | is already in use by another group of caches. | |
8c01ada0 | 7326 | |
5473c134 | 7327 | If you are unsure about multicast, please read the Multicast |
7328 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
8c01ada0 | 7329 | |
5473c134 | 7330 | Usage: mcast_groups 239.128.16.128 224.0.1.20 |
8c01ada0 | 7331 | |
5473c134 | 7332 | By default, Squid doesn't listen on any multicast groups. |
7333 | DOC_END | |
8c01ada0 | 7334 | |
5473c134 | 7335 | NAME: mcast_miss_addr |
7336 | IFDEF: MULTICAST_MISS_STREAM | |
7337 | TYPE: address | |
7338 | LOC: Config.mcast_miss.addr | |
0eb08770 | 7339 | DEFAULT: no_addr |
638402dd | 7340 | DEFAULT_DOC: disabled. |
5473c134 | 7341 | DOC_START |
7342 | If you enable this option, every "cache miss" URL will | |
7343 | be sent out on the specified multicast address. | |
cccac0a2 | 7344 | |
5473c134 | 7345 | Do not enable this option unless you are are absolutely |
7346 | certain you understand what you are doing. | |
cccac0a2 | 7347 | DOC_END |
7348 | ||
5473c134 | 7349 | NAME: mcast_miss_ttl |
7350 | IFDEF: MULTICAST_MISS_STREAM | |
ae870270 | 7351 | TYPE: u_short |
5473c134 | 7352 | LOC: Config.mcast_miss.ttl |
7353 | DEFAULT: 16 | |
cccac0a2 | 7354 | DOC_START |
5473c134 | 7355 | This is the time-to-live value for packets multicasted |
7356 | when multicasting off cache miss URLs is enabled. By | |
7357 | default this is set to 'site scope', i.e. 16. | |
7358 | DOC_END | |
cccac0a2 | 7359 | |
5473c134 | 7360 | NAME: mcast_miss_port |
7361 | IFDEF: MULTICAST_MISS_STREAM | |
ae870270 | 7362 | TYPE: u_short |
5473c134 | 7363 | LOC: Config.mcast_miss.port |
7364 | DEFAULT: 3135 | |
7365 | DOC_START | |
7366 | This is the port number to be used in conjunction with | |
7367 | 'mcast_miss_addr'. | |
7368 | DOC_END | |
cccac0a2 | 7369 | |
5473c134 | 7370 | NAME: mcast_miss_encode_key |
7371 | IFDEF: MULTICAST_MISS_STREAM | |
7372 | TYPE: string | |
7373 | LOC: Config.mcast_miss.encode_key | |
7374 | DEFAULT: XXXXXXXXXXXXXXXX | |
7375 | DOC_START | |
7376 | The URLs that are sent in the multicast miss stream are | |
7377 | encrypted. This is the encryption key. | |
7378 | DOC_END | |
8c01ada0 | 7379 | |
5473c134 | 7380 | NAME: mcast_icp_query_timeout |
7381 | COMMENT: (msec) | |
7382 | DEFAULT: 2000 | |
7383 | TYPE: int | |
7384 | LOC: Config.Timeout.mcast_icp_query | |
7385 | DOC_START | |
7386 | For multicast peers, Squid regularly sends out ICP "probes" to | |
7387 | count how many other peers are listening on the given multicast | |
7388 | address. This value specifies how long Squid should wait to | |
7389 | count all the replies. The default is 2000 msec, or 2 | |
7390 | seconds. | |
cccac0a2 | 7391 | DOC_END |
7392 | ||
5473c134 | 7393 | COMMENT_START |
7394 | INTERNAL ICON OPTIONS | |
7395 | ----------------------------------------------------------------------------- | |
7396 | COMMENT_END | |
7397 | ||
cccac0a2 | 7398 | NAME: icon_directory |
7399 | TYPE: string | |
7400 | LOC: Config.icons.directory | |
7401 | DEFAULT: @DEFAULT_ICON_DIR@ | |
7402 | DOC_START | |
7403 | Where the icons are stored. These are normally kept in | |
7404 | @DEFAULT_ICON_DIR@ | |
7405 | DOC_END | |
7406 | ||
f024c970 | 7407 | NAME: global_internal_static |
7408 | TYPE: onoff | |
7409 | LOC: Config.onoff.global_internal_static | |
7410 | DEFAULT: on | |
7411 | DOC_START | |
7412 | This directive controls is Squid should intercept all requests for | |
7413 | /squid-internal-static/ no matter which host the URL is requesting | |
7414 | (default on setting), or if nothing special should be done for | |
7415 | such URLs (off setting). The purpose of this directive is to make | |
7416 | icons etc work better in complex cache hierarchies where it may | |
7417 | not always be possible for all corners in the cache mesh to reach | |
7418 | the server generating a directory listing. | |
7419 | DOC_END | |
7420 | ||
5473c134 | 7421 | NAME: short_icon_urls |
7422 | TYPE: onoff | |
7423 | LOC: Config.icons.use_short_names | |
7424 | DEFAULT: on | |
7425 | DOC_START | |
7426 | If this is enabled Squid will use short URLs for icons. | |
7427 | If disabled it will revert to the old behavior of including | |
7428 | it's own name and port in the URL. | |
7429 | ||
7430 | If you run a complex cache hierarchy with a mix of Squid and | |
7431 | other proxies you may need to disable this directive. | |
7432 | DOC_END | |
7433 | ||
7434 | COMMENT_START | |
7435 | ERROR PAGE OPTIONS | |
7436 | ----------------------------------------------------------------------------- | |
7437 | COMMENT_END | |
7438 | ||
7439 | NAME: error_directory | |
7440 | TYPE: string | |
7441 | LOC: Config.errorDirectory | |
43000484 | 7442 | DEFAULT: none |
638402dd | 7443 | DEFAULT_DOC: Send error pages in the clients preferred language |
5473c134 | 7444 | DOC_START |
7445 | If you wish to create your own versions of the default | |
43000484 AJ |
7446 | error files to customize them to suit your company copy |
7447 | the error/template files to another directory and point | |
7448 | this tag at them. | |
7449 | ||
7450 | WARNING: This option will disable multi-language support | |
7451 | on error pages if used. | |
5473c134 | 7452 | |
7453 | The squid developers are interested in making squid available in | |
7454 | a wide variety of languages. If you are making translations for a | |
43000484 | 7455 | language that Squid does not currently provide please consider |
5473c134 | 7456 | contributing your translation back to the project. |
43000484 AJ |
7457 | http://wiki.squid-cache.org/Translations |
7458 | ||
7459 | The squid developers working on translations are happy to supply drop-in | |
7460 | translated error files in exchange for any new language contributions. | |
7461 | DOC_END | |
7462 | ||
7463 | NAME: error_default_language | |
7464 | IFDEF: USE_ERR_LOCALES | |
7465 | TYPE: string | |
7466 | LOC: Config.errorDefaultLanguage | |
7467 | DEFAULT: none | |
638402dd | 7468 | DEFAULT_DOC: Generate English language pages. |
43000484 AJ |
7469 | DOC_START |
7470 | Set the default language which squid will send error pages in | |
7471 | if no existing translation matches the clients language | |
7472 | preferences. | |
7473 | ||
7474 | If unset (default) generic English will be used. | |
7475 | ||
7476 | The squid developers are interested in making squid available in | |
7477 | a wide variety of languages. If you are interested in making | |
7478 | translations for any language see the squid wiki for details. | |
7479 | http://wiki.squid-cache.org/Translations | |
5473c134 | 7480 | DOC_END |
7481 | ||
c411820c AJ |
7482 | NAME: error_log_languages |
7483 | IFDEF: USE_ERR_LOCALES | |
7484 | TYPE: onoff | |
7485 | LOC: Config.errorLogMissingLanguages | |
7486 | DEFAULT: on | |
7487 | DOC_START | |
7488 | Log to cache.log what languages users are attempting to | |
7489 | auto-negotiate for translations. | |
7490 | ||
7491 | Successful negotiations are not logged. Only failures | |
7492 | have meaning to indicate that Squid may need an upgrade | |
0c49f10e | 7493 | of its error page translations. |
c411820c AJ |
7494 | DOC_END |
7495 | ||
5b52cb6c AJ |
7496 | NAME: err_page_stylesheet |
7497 | TYPE: string | |
7498 | LOC: Config.errorStylesheet | |
7499 | DEFAULT: @DEFAULT_CONFIG_DIR@/errorpage.css | |
7500 | DOC_START | |
7501 | CSS Stylesheet to pattern the display of Squid default error pages. | |
7502 | ||
7503 | For information on CSS see http://www.w3.org/Style/CSS/ | |
7504 | DOC_END | |
7505 | ||
5473c134 | 7506 | NAME: err_html_text |
7507 | TYPE: eol | |
7508 | LOC: Config.errHtmlText | |
7509 | DEFAULT: none | |
7510 | DOC_START | |
7511 | HTML text to include in error messages. Make this a "mailto" | |
7512 | URL to your admin address, or maybe just a link to your | |
7513 | organizations Web page. | |
7514 | ||
7515 | To include this in your error messages, you must rewrite | |
7516 | the error template files (found in the "errors" directory). | |
7517 | Wherever you want the 'err_html_text' line to appear, | |
7518 | insert a %L tag in the error template file. | |
7519 | DOC_END | |
7520 | ||
7521 | NAME: email_err_data | |
7522 | COMMENT: on|off | |
7523 | TYPE: onoff | |
7524 | LOC: Config.onoff.emailErrData | |
7525 | DEFAULT: on | |
7526 | DOC_START | |
7527 | If enabled, information about the occurred error will be | |
7528 | included in the mailto links of the ERR pages (if %W is set) | |
7529 | so that the email body contains the data. | |
7530 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
7531 | DOC_END | |
7532 | ||
7533 | NAME: deny_info | |
7534 | TYPE: denyinfo | |
7535 | LOC: Config.denyInfoList | |
7536 | DEFAULT: none | |
7537 | DOC_START | |
7538 | Usage: deny_info err_page_name acl | |
7539 | or deny_info http://... acl | |
43000484 | 7540 | or deny_info TCP_RESET acl |
5473c134 | 7541 | |
7542 | This can be used to return a ERR_ page for requests which | |
7543 | do not pass the 'http_access' rules. Squid remembers the last | |
7544 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
7545 | for that ACL Squid returns a corresponding error page. | |
7546 | ||
7547 | The acl is typically the last acl on the http_access deny line which | |
7548 | denied access. The exceptions to this rule are: | |
7549 | - When Squid needs to request authentication credentials. It's then | |
7550 | the first authentication related acl encountered | |
7551 | - When none of the http_access lines matches. It's then the last | |
7552 | acl processed on the last http_access line. | |
3af10ac0 AR |
7553 | - When the decision to deny access was made by an adaptation service, |
7554 | the acl name is the corresponding eCAP or ICAP service_name. | |
5473c134 | 7555 | |
43000484 AJ |
7556 | NP: If providing your own custom error pages with error_directory |
7557 | you may also specify them by your custom file name: | |
7558 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
5473c134 | 7559 | |
aed9a15b AJ |
7560 | By defaut Squid will send "403 Forbidden". A different 4xx or 5xx |
7561 | may be specified by prefixing the file name with the code and a colon. | |
7562 | e.g. 404:ERR_CUSTOM_ACCESS_DENIED | |
7563 | ||
5473c134 | 7564 | Alternatively you can tell Squid to reset the TCP connection |
7565 | by specifying TCP_RESET. | |
15b02e9a AJ |
7566 | |
7567 | Or you can specify an error URL or URL pattern. The browsers will | |
aed9a15b AJ |
7568 | get redirected to the specified URL after formatting tags have |
7569 | been replaced. Redirect will be done with 302 or 307 according to | |
7570 | HTTP/1.1 specs. A different 3xx code may be specified by prefixing | |
7571 | the URL. e.g. 303:http://example.com/ | |
15b02e9a AJ |
7572 | |
7573 | URL FORMAT TAGS: | |
7574 | %a - username (if available. Password NOT included) | |
7575 | %B - FTP path URL | |
7576 | %e - Error number | |
7577 | %E - Error description | |
7578 | %h - Squid hostname | |
7579 | %H - Request domain name | |
7580 | %i - Client IP Address | |
7581 | %M - Request Method | |
7582 | %o - Message result from external ACL helper | |
7583 | %p - Request Port number | |
7584 | %P - Request Protocol name | |
7585 | %R - Request URL path | |
7586 | %T - Timestamp in RFC 1123 format | |
7587 | %U - Full canonical URL from client | |
7588 | (HTTPS URLs terminate with *) | |
7589 | %u - Full canonical URL from client | |
7590 | %w - Admin email from squid.conf | |
e4a8468d | 7591 | %x - Error name |
15b02e9a AJ |
7592 | %% - Literal percent (%) code |
7593 | ||
5473c134 | 7594 | DOC_END |
7595 | ||
7596 | COMMENT_START | |
7597 | OPTIONS INFLUENCING REQUEST FORWARDING | |
7598 | ----------------------------------------------------------------------------- | |
7599 | COMMENT_END | |
7600 | ||
7601 | NAME: nonhierarchical_direct | |
e72a0ec0 | 7602 | TYPE: onoff |
5473c134 | 7603 | LOC: Config.onoff.nonhierarchical_direct |
e72a0ec0 | 7604 | DEFAULT: on |
7605 | DOC_START | |
5473c134 | 7606 | By default, Squid will send any non-hierarchical requests |
7607 | (matching hierarchy_stoplist or not cacheable request type) direct | |
7608 | to origin servers. | |
e72a0ec0 | 7609 | |
638402dd | 7610 | When this is set to "off", Squid will prefer to send these |
5473c134 | 7611 | requests to parents. |
0b0cfcf2 | 7612 | |
5473c134 | 7613 | Note that in most configurations, by turning this off you will only |
7614 | add latency to these request without any improvement in global hit | |
7615 | ratio. | |
0b0cfcf2 | 7616 | |
638402dd AJ |
7617 | This option only sets a preference. If the parent is unavailable a |
7618 | direct connection to the origin server may still be attempted. To | |
7619 | completely prevent direct connections use never_direct. | |
8d6275c0 | 7620 | DOC_END |
0b0cfcf2 | 7621 | |
5473c134 | 7622 | NAME: prefer_direct |
8d6275c0 | 7623 | TYPE: onoff |
5473c134 | 7624 | LOC: Config.onoff.prefer_direct |
8d6275c0 | 7625 | DEFAULT: off |
7626 | DOC_START | |
5473c134 | 7627 | Normally Squid tries to use parents for most requests. If you for some |
7628 | reason like it to first try going direct and only use a parent if | |
7629 | going direct fails set this to on. | |
0b0cfcf2 | 7630 | |
5473c134 | 7631 | By combining nonhierarchical_direct off and prefer_direct on you |
7632 | can set up Squid to use a parent as a backup path if going direct | |
7633 | fails. | |
7634 | ||
7635 | Note: If you want Squid to use parents for all requests see | |
7636 | the never_direct directive. prefer_direct only modifies how Squid | |
7637 | acts on cacheable requests. | |
cccac0a2 | 7638 | DOC_END |
7639 | ||
96598f93 AJ |
7640 | NAME: cache_miss_revalidate |
7641 | COMMENT: on|off | |
7642 | TYPE: onoff | |
7643 | DEFAULT: on | |
7644 | LOC: Config.onoff.cache_miss_revalidate | |
7645 | DOC_START | |
7646 | Whether Squid on cache MISS will pass client revalidation requests | |
7647 | to the server or tries to fetch new content for caching. | |
7648 | This is useful while the cache is mostly empty to more quickly | |
7649 | have the cache populated. | |
7650 | ||
7651 | When set to 'on' (default), Squid will pass all client If-* headers | |
7652 | to the server. | |
7653 | ||
7654 | When set to 'off' and if the request is cacheable, Squid will | |
7655 | remove the clients If-Modified-Since and If-None-Match headers from | |
7656 | the request sent to the server. | |
7657 | DOC_END | |
7658 | ||
5473c134 | 7659 | NAME: always_direct |
8d6275c0 | 7660 | TYPE: acl_access |
5473c134 | 7661 | LOC: Config.accessList.AlwaysDirect |
0b0cfcf2 | 7662 | DEFAULT: none |
638402dd | 7663 | DEFAULT_DOC: Prevent any cache_peer being used for this request. |
0b0cfcf2 | 7664 | DOC_START |
5473c134 | 7665 | Usage: always_direct allow|deny [!]aclname ... |
0b0cfcf2 | 7666 | |
5473c134 | 7667 | Here you can use ACL elements to specify requests which should |
7668 | ALWAYS be forwarded by Squid to the origin servers without using | |
7669 | any peers. For example, to always directly forward requests for | |
7670 | local servers ignoring any parents or siblings you may have use | |
7671 | something like: | |
0b0cfcf2 | 7672 | |
5473c134 | 7673 | acl local-servers dstdomain my.domain.net |
7674 | always_direct allow local-servers | |
0b0cfcf2 | 7675 | |
5473c134 | 7676 | To always forward FTP requests directly, use |
f16fbc82 | 7677 | |
5473c134 | 7678 | acl FTP proto FTP |
7679 | always_direct allow FTP | |
cccac0a2 | 7680 | |
5473c134 | 7681 | NOTE: There is a similar, but opposite option named |
7682 | 'never_direct'. You need to be aware that "always_direct deny | |
7683 | foo" is NOT the same thing as "never_direct allow foo". You | |
7684 | may need to use a deny rule to exclude a more-specific case of | |
7685 | some other rule. Example: | |
8d6275c0 | 7686 | |
5473c134 | 7687 | acl local-external dstdomain external.foo.net |
7688 | acl local-servers dstdomain .foo.net | |
7689 | always_direct deny local-external | |
7690 | always_direct allow local-servers | |
8d6275c0 | 7691 | |
5473c134 | 7692 | NOTE: If your goal is to make the client forward the request |
7693 | directly to the origin server bypassing Squid then this needs | |
7694 | to be done in the client configuration. Squid configuration | |
7695 | can only tell Squid how Squid should fetch the object. | |
8d6275c0 | 7696 | |
5473c134 | 7697 | NOTE: This directive is not related to caching. The replies |
7698 | is cached as usual even if you use always_direct. To not cache | |
b3567eb5 | 7699 | the replies see the 'cache' directive. |
5473c134 | 7700 | |
b3567eb5 FC |
7701 | This clause supports both fast and slow acl types. |
7702 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
cccac0a2 | 7703 | DOC_END |
0976f8db | 7704 | |
5473c134 | 7705 | NAME: never_direct |
7706 | TYPE: acl_access | |
7707 | LOC: Config.accessList.NeverDirect | |
7708 | DEFAULT: none | |
638402dd | 7709 | DEFAULT_DOC: Allow DNS results to be used for this request. |
8d6275c0 | 7710 | DOC_START |
5473c134 | 7711 | Usage: never_direct allow|deny [!]aclname ... |
7712 | ||
7713 | never_direct is the opposite of always_direct. Please read | |
7714 | the description for always_direct if you have not already. | |
7715 | ||
7716 | With 'never_direct' you can use ACL elements to specify | |
7717 | requests which should NEVER be forwarded directly to origin | |
7718 | servers. For example, to force the use of a proxy for all | |
7719 | requests, except those in your local domain use something like: | |
7720 | ||
7721 | acl local-servers dstdomain .foo.net | |
5473c134 | 7722 | never_direct deny local-servers |
7723 | never_direct allow all | |
7724 | ||
7725 | or if Squid is inside a firewall and there are local intranet | |
7726 | servers inside the firewall use something like: | |
7727 | ||
7728 | acl local-intranet dstdomain .foo.net | |
7729 | acl local-external dstdomain external.foo.net | |
7730 | always_direct deny local-external | |
7731 | always_direct allow local-intranet | |
7732 | never_direct allow all | |
7733 | ||
b3567eb5 FC |
7734 | This clause supports both fast and slow acl types. |
7735 | See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details. | |
8d6275c0 | 7736 | DOC_END |
0976f8db | 7737 | |
5473c134 | 7738 | COMMENT_START |
7739 | ADVANCED NETWORKING OPTIONS | |
7740 | ----------------------------------------------------------------------------- | |
7741 | COMMENT_END | |
7742 | ||
65d448bc | 7743 | NAME: incoming_udp_average incoming_icp_average |
cccac0a2 | 7744 | TYPE: int |
7745 | DEFAULT: 6 | |
65d448bc AJ |
7746 | LOC: Config.comm_incoming.udp.average |
7747 | DOC_START | |
7748 | Heavy voodoo here. I can't even believe you are reading this. | |
7749 | Are you crazy? Don't even think about adjusting these unless | |
7750 | you understand the algorithms in comm_select.c first! | |
7751 | DOC_END | |
cccac0a2 | 7752 | |
65d448bc | 7753 | NAME: incoming_tcp_average incoming_http_average |
cccac0a2 | 7754 | TYPE: int |
7755 | DEFAULT: 4 | |
65d448bc AJ |
7756 | LOC: Config.comm_incoming.tcp.average |
7757 | DOC_START | |
7758 | Heavy voodoo here. I can't even believe you are reading this. | |
7759 | Are you crazy? Don't even think about adjusting these unless | |
7760 | you understand the algorithms in comm_select.c first! | |
7761 | DOC_END | |
cccac0a2 | 7762 | |
7763 | NAME: incoming_dns_average | |
7764 | TYPE: int | |
7765 | DEFAULT: 4 | |
65d448bc AJ |
7766 | LOC: Config.comm_incoming.dns.average |
7767 | DOC_START | |
7768 | Heavy voodoo here. I can't even believe you are reading this. | |
7769 | Are you crazy? Don't even think about adjusting these unless | |
7770 | you understand the algorithms in comm_select.c first! | |
7771 | DOC_END | |
cccac0a2 | 7772 | |
65d448bc | 7773 | NAME: min_udp_poll_cnt min_icp_poll_cnt |
cccac0a2 | 7774 | TYPE: int |
7775 | DEFAULT: 8 | |
65d448bc AJ |
7776 | LOC: Config.comm_incoming.udp.min_poll |
7777 | DOC_START | |
7778 | Heavy voodoo here. I can't even believe you are reading this. | |
7779 | Are you crazy? Don't even think about adjusting these unless | |
7780 | you understand the algorithms in comm_select.c first! | |
7781 | DOC_END | |
cccac0a2 | 7782 | |
7783 | NAME: min_dns_poll_cnt | |
7784 | TYPE: int | |
7785 | DEFAULT: 8 | |
65d448bc AJ |
7786 | LOC: Config.comm_incoming.dns.min_poll |
7787 | DOC_START | |
7788 | Heavy voodoo here. I can't even believe you are reading this. | |
7789 | Are you crazy? Don't even think about adjusting these unless | |
7790 | you understand the algorithms in comm_select.c first! | |
7791 | DOC_END | |
cccac0a2 | 7792 | |
65d448bc | 7793 | NAME: min_tcp_poll_cnt min_http_poll_cnt |
cccac0a2 | 7794 | TYPE: int |
7795 | DEFAULT: 8 | |
65d448bc | 7796 | LOC: Config.comm_incoming.tcp.min_poll |
cccac0a2 | 7797 | DOC_START |
5473c134 | 7798 | Heavy voodoo here. I can't even believe you are reading this. |
7799 | Are you crazy? Don't even think about adjusting these unless | |
7800 | you understand the algorithms in comm_select.c first! | |
7801 | DOC_END | |
7802 | ||
7803 | NAME: accept_filter | |
5473c134 | 7804 | TYPE: string |
7805 | DEFAULT: none | |
7806 | LOC: Config.accept_filter | |
7807 | DOC_START | |
0b4d4be5 | 7808 | FreeBSD: |
7809 | ||
5473c134 | 7810 | The name of an accept(2) filter to install on Squid's |
7811 | listen socket(s). This feature is perhaps specific to | |
7812 | FreeBSD and requires support in the kernel. | |
7813 | ||
7814 | The 'httpready' filter delays delivering new connections | |
2324cda2 | 7815 | to Squid until a full HTTP request has been received. |
0b4d4be5 | 7816 | See the accf_http(9) man page for details. |
7817 | ||
7818 | The 'dataready' filter delays delivering new connections | |
7819 | to Squid until there is some data to process. | |
7820 | See the accf_dataready(9) man page for details. | |
7821 | ||
7822 | Linux: | |
7823 | ||
7824 | The 'data' filter delays delivering of new connections | |
7825 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
7826 | You may optionally specify a number of seconds to wait by | |
7827 | 'data=N' where N is the number of seconds. Defaults to 30 | |
7828 | if not specified. See the tcp(7) man page for details. | |
5473c134 | 7829 | EXAMPLE: |
0b4d4be5 | 7830 | # FreeBSD |
5473c134 | 7831 | accept_filter httpready |
0b4d4be5 | 7832 | # Linux |
7833 | accept_filter data | |
5473c134 | 7834 | DOC_END |
7835 | ||
ab2ecb0e AJ |
7836 | NAME: client_ip_max_connections |
7837 | TYPE: int | |
7838 | LOC: Config.client_ip_max_connections | |
7839 | DEFAULT: -1 | |
638402dd | 7840 | DEFAULT_DOC: No limit. |
ab2ecb0e AJ |
7841 | DOC_START |
7842 | Set an absolute limit on the number of connections a single | |
7843 | client IP can use. Any more than this and Squid will begin to drop | |
7844 | new connections from the client until it closes some links. | |
7845 | ||
7846 | Note that this is a global limit. It affects all HTTP, HTCP, Gopher and FTP | |
7847 | connections from the client. For finer control use the ACL access controls. | |
7848 | ||
7849 | Requires client_db to be enabled (the default). | |
7850 | ||
7851 | WARNING: This may noticably slow down traffic received via external proxies | |
7852 | or NAT devices and cause them to rebound error messages back to their clients. | |
7853 | DOC_END | |
7854 | ||
5473c134 | 7855 | NAME: tcp_recv_bufsize |
7856 | COMMENT: (bytes) | |
7857 | TYPE: b_size_t | |
7858 | DEFAULT: 0 bytes | |
638402dd | 7859 | DEFAULT_DOC: Use operating system TCP defaults. |
5473c134 | 7860 | LOC: Config.tcpRcvBufsz |
7861 | DOC_START | |
7862 | Size of receive buffer to set for TCP sockets. Probably just | |
638402dd AJ |
7863 | as easy to change your kernel's default. |
7864 | Omit from squid.conf to use the default buffer size. | |
5473c134 | 7865 | DOC_END |
7866 | ||
7867 | COMMENT_START | |
7868 | ICAP OPTIONS | |
7869 | ----------------------------------------------------------------------------- | |
7870 | COMMENT_END | |
7871 | ||
7872 | NAME: icap_enable | |
7873 | TYPE: onoff | |
7874 | IFDEF: ICAP_CLIENT | |
7875 | COMMENT: on|off | |
26cc52cb | 7876 | LOC: Adaptation::Icap::TheConfig.onoff |
5473c134 | 7877 | DEFAULT: off |
7878 | DOC_START | |
53e738c6 | 7879 | If you want to enable the ICAP module support, set this to on. |
5473c134 | 7880 | DOC_END |
7881 | ||
7882 | NAME: icap_connect_timeout | |
7883 | TYPE: time_t | |
7884 | DEFAULT: none | |
26cc52cb | 7885 | LOC: Adaptation::Icap::TheConfig.connect_timeout_raw |
5473c134 | 7886 | IFDEF: ICAP_CLIENT |
7887 | DOC_START | |
7888 | This parameter specifies how long to wait for the TCP connect to | |
7889 | the requested ICAP server to complete before giving up and either | |
7890 | terminating the HTTP transaction or bypassing the failure. | |
7891 | ||
7892 | The default for optional services is peer_connect_timeout. | |
7893 | The default for essential services is connect_timeout. | |
7894 | If this option is explicitly set, its value applies to all services. | |
7895 | DOC_END | |
7896 | ||
7897 | NAME: icap_io_timeout | |
7898 | COMMENT: time-units | |
7899 | TYPE: time_t | |
7900 | DEFAULT: none | |
638402dd | 7901 | DEFAULT_DOC: Use read_timeout. |
26cc52cb | 7902 | LOC: Adaptation::Icap::TheConfig.io_timeout_raw |
5473c134 | 7903 | IFDEF: ICAP_CLIENT |
7904 | DOC_START | |
7905 | This parameter specifies how long to wait for an I/O activity on | |
7906 | an established, active ICAP connection before giving up and | |
7907 | either terminating the HTTP transaction or bypassing the | |
7908 | failure. | |
5473c134 | 7909 | DOC_END |
7910 | ||
7911 | NAME: icap_service_failure_limit | |
8277060a CT |
7912 | COMMENT: limit [in memory-depth time-units] |
7913 | TYPE: icap_service_failure_limit | |
5473c134 | 7914 | IFDEF: ICAP_CLIENT |
8277060a | 7915 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 7916 | DEFAULT: 10 |
7917 | DOC_START | |
7918 | The limit specifies the number of failures that Squid tolerates | |
7919 | when establishing a new TCP connection with an ICAP service. If | |
7920 | the number of failures exceeds the limit, the ICAP service is | |
7921 | not used for new ICAP requests until it is time to refresh its | |
8277060a | 7922 | OPTIONS. |
5473c134 | 7923 | |
7924 | A negative value disables the limit. Without the limit, an ICAP | |
7925 | service will not be considered down due to connectivity failures | |
7926 | between ICAP OPTIONS requests. | |
8277060a CT |
7927 | |
7928 | Squid forgets ICAP service failures older than the specified | |
7929 | value of memory-depth. The memory fading algorithm | |
7930 | is approximate because Squid does not remember individual | |
7931 | errors but groups them instead, splitting the option | |
7932 | value into ten time slots of equal length. | |
7933 | ||
7934 | When memory-depth is 0 and by default this option has no | |
7935 | effect on service failure expiration. | |
7936 | ||
7937 | Squid always forgets failures when updating service settings | |
7938 | using an ICAP OPTIONS transaction, regardless of this option | |
7939 | setting. | |
7940 | ||
7941 | For example, | |
7942 | # suspend service usage after 10 failures in 5 seconds: | |
7943 | icap_service_failure_limit 10 in 5 seconds | |
cccac0a2 | 7944 | DOC_END |
7945 | ||
5473c134 | 7946 | NAME: icap_service_revival_delay |
cccac0a2 | 7947 | TYPE: int |
5473c134 | 7948 | IFDEF: ICAP_CLIENT |
26cc52cb | 7949 | LOC: Adaptation::Icap::TheConfig.service_revival_delay |
5473c134 | 7950 | DEFAULT: 180 |
cccac0a2 | 7951 | DOC_START |
5473c134 | 7952 | The delay specifies the number of seconds to wait after an ICAP |
7953 | OPTIONS request failure before requesting the options again. The | |
7954 | failed ICAP service is considered "down" until fresh OPTIONS are | |
7955 | fetched. | |
cccac0a2 | 7956 | |
5473c134 | 7957 | The actual delay cannot be smaller than the hardcoded minimum |
7958 | delay of 30 seconds. | |
cccac0a2 | 7959 | DOC_END |
7960 | ||
5473c134 | 7961 | NAME: icap_preview_enable |
cccac0a2 | 7962 | TYPE: onoff |
5473c134 | 7963 | IFDEF: ICAP_CLIENT |
7964 | COMMENT: on|off | |
26cc52cb | 7965 | LOC: Adaptation::Icap::TheConfig.preview_enable |
ac7a62f9 | 7966 | DEFAULT: on |
cccac0a2 | 7967 | DOC_START |
ac7a62f9 | 7968 | The ICAP Preview feature allows the ICAP server to handle the |
7969 | HTTP message by looking only at the beginning of the message body | |
7970 | or even without receiving the body at all. In some environments, | |
7971 | previews greatly speedup ICAP processing. | |
7972 | ||
7973 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
7974 | HTTP messages should be previewed and how big the preview should be. | |
7975 | Squid will not use Preview if the server did not request one. | |
7976 | ||
7977 | To disable ICAP Preview for all ICAP services, regardless of | |
7978 | individual ICAP server OPTIONS responses, set this option to "off". | |
7979 | Example: | |
7980 | icap_preview_enable off | |
cccac0a2 | 7981 | DOC_END |
7982 | ||
5473c134 | 7983 | NAME: icap_preview_size |
7984 | TYPE: int | |
7985 | IFDEF: ICAP_CLIENT | |
26cc52cb | 7986 | LOC: Adaptation::Icap::TheConfig.preview_size |
5473c134 | 7987 | DEFAULT: -1 |
638402dd | 7988 | DEFAULT_DOC: No preview sent. |
cccac0a2 | 7989 | DOC_START |
53e738c6 | 7990 | The default size of preview data to be sent to the ICAP server. |
638402dd | 7991 | This value might be overwritten on a per server basis by OPTIONS requests. |
cccac0a2 | 7992 | DOC_END |
7993 | ||
83c51da9 CT |
7994 | NAME: icap_206_enable |
7995 | TYPE: onoff | |
7996 | IFDEF: ICAP_CLIENT | |
7997 | COMMENT: on|off | |
7998 | LOC: Adaptation::Icap::TheConfig.allow206_enable | |
7999 | DEFAULT: on | |
8000 | DOC_START | |
8001 | 206 (Partial Content) responses is an ICAP extension that allows the | |
8002 | ICAP agents to optionally combine adapted and original HTTP message | |
8003 | content. The decision to combine is postponed until the end of the | |
8004 | ICAP response. Squid supports Partial Content extension by default. | |
8005 | ||
8006 | Activation of the Partial Content extension is negotiated with each | |
8007 | ICAP service during OPTIONS exchange. Most ICAP servers should handle | |
8008 | negotation correctly even if they do not support the extension, but | |
8009 | some might fail. To disable Partial Content support for all ICAP | |
8010 | services and to avoid any negotiation, set this option to "off". | |
8011 | ||
8012 | Example: | |
8013 | icap_206_enable off | |
8014 | DOC_END | |
8015 | ||
5473c134 | 8016 | NAME: icap_default_options_ttl |
8017 | TYPE: int | |
8018 | IFDEF: ICAP_CLIENT | |
26cc52cb | 8019 | LOC: Adaptation::Icap::TheConfig.default_options_ttl |
5473c134 | 8020 | DEFAULT: 60 |
cccac0a2 | 8021 | DOC_START |
53e738c6 | 8022 | The default TTL value for ICAP OPTIONS responses that don't have |
5473c134 | 8023 | an Options-TTL header. |
cccac0a2 | 8024 | DOC_END |
8025 | ||
5473c134 | 8026 | NAME: icap_persistent_connections |
8027 | TYPE: onoff | |
8028 | IFDEF: ICAP_CLIENT | |
8029 | COMMENT: on|off | |
26cc52cb | 8030 | LOC: Adaptation::Icap::TheConfig.reuse_connections |
5473c134 | 8031 | DEFAULT: on |
cccac0a2 | 8032 | DOC_START |
5473c134 | 8033 | Whether or not Squid should use persistent connections to |
8034 | an ICAP server. | |
cccac0a2 | 8035 | DOC_END |
8036 | ||
22fff3bf | 8037 | NAME: adaptation_send_client_ip icap_send_client_ip |
5473c134 | 8038 | TYPE: onoff |
22fff3bf | 8039 | IFDEF: USE_ADAPTATION |
5473c134 | 8040 | COMMENT: on|off |
22fff3bf | 8041 | LOC: Adaptation::Config::send_client_ip |
5473c134 | 8042 | DEFAULT: off |
cccac0a2 | 8043 | DOC_START |
ea3ae478 AR |
8044 | If enabled, Squid shares HTTP client IP information with adaptation |
8045 | services. For ICAP, Squid adds the X-Client-IP header to ICAP requests. | |
8046 | For eCAP, Squid sets the libecap::metaClientIp transaction option. | |
8047 | ||
8048 | See also: adaptation_uses_indirect_client | |
cccac0a2 | 8049 | DOC_END |
8050 | ||
22fff3bf | 8051 | NAME: adaptation_send_username icap_send_client_username |
5473c134 | 8052 | TYPE: onoff |
22fff3bf | 8053 | IFDEF: USE_ADAPTATION |
5473c134 | 8054 | COMMENT: on|off |
22fff3bf | 8055 | LOC: Adaptation::Config::send_username |
5473c134 | 8056 | DEFAULT: off |
cccac0a2 | 8057 | DOC_START |
5473c134 | 8058 | This sends authenticated HTTP client username (if available) to |
22fff3bf AR |
8059 | the adaptation service. |
8060 | ||
8061 | For ICAP, the username value is encoded based on the | |
5473c134 | 8062 | icap_client_username_encode option and is sent using the header |
8063 | specified by the icap_client_username_header option. | |
cccac0a2 | 8064 | DOC_END |
8065 | ||
5473c134 | 8066 | NAME: icap_client_username_header |
cccac0a2 | 8067 | TYPE: string |
5473c134 | 8068 | IFDEF: ICAP_CLIENT |
26cc52cb | 8069 | LOC: Adaptation::Icap::TheConfig.client_username_header |
5473c134 | 8070 | DEFAULT: X-Client-Username |
cccac0a2 | 8071 | DOC_START |
db49f682 | 8072 | ICAP request header name to use for adaptation_send_username. |
cccac0a2 | 8073 | DOC_END |
8074 | ||
5473c134 | 8075 | NAME: icap_client_username_encode |
cccac0a2 | 8076 | TYPE: onoff |
5473c134 | 8077 | IFDEF: ICAP_CLIENT |
8078 | COMMENT: on|off | |
26cc52cb | 8079 | LOC: Adaptation::Icap::TheConfig.client_username_encode |
5473c134 | 8080 | DEFAULT: off |
cccac0a2 | 8081 | DOC_START |
5473c134 | 8082 | Whether to base64 encode the authenticated client username. |
cccac0a2 | 8083 | DOC_END |
8084 | ||
5473c134 | 8085 | NAME: icap_service |
8086 | TYPE: icap_service_type | |
8087 | IFDEF: ICAP_CLIENT | |
26cc52cb | 8088 | LOC: Adaptation::Icap::TheConfig |
5473c134 | 8089 | DEFAULT: none |
cccac0a2 | 8090 | DOC_START |
a22e6cd3 | 8091 | Defines a single ICAP service using the following format: |
cccac0a2 | 8092 | |
c25c2836 | 8093 | icap_service id vectoring_point uri [option ...] |
7d90757b | 8094 | |
c25c2836 CT |
8095 | id: ID |
8096 | an opaque identifier or name which is used to direct traffic to | |
8097 | this specific service. Must be unique among all adaptation | |
8098 | services in squid.conf. | |
a22e6cd3 AR |
8099 | |
8100 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
f3db09e2 | 8101 | This specifies at which point of transaction processing the |
8102 | ICAP service should be activated. *_postcache vectoring points | |
8103 | are not yet supported. | |
a22e6cd3 | 8104 | |
c25c2836 | 8105 | uri: icap://servername:port/servicepath |
a22e6cd3 AR |
8106 | ICAP server and service location. |
8107 | ||
8108 | ICAP does not allow a single service to handle both REQMOD and RESPMOD | |
8109 | transactions. Squid does not enforce that requirement. You can specify | |
8110 | services with the same service_url and different vectoring_points. You | |
8111 | can even specify multiple identical services as long as their | |
8112 | service_names differ. | |
8113 | ||
3caa16d2 AR |
8114 | To activate a service, use the adaptation_access directive. To group |
8115 | services, use adaptation_service_chain and adaptation_service_set. | |
a22e6cd3 AR |
8116 | |
8117 | Service options are separated by white space. ICAP services support | |
8118 | the following name=value options: | |
8119 | ||
8120 | bypass=on|off|1|0 | |
8121 | If set to 'on' or '1', the ICAP service is treated as | |
8122 | optional. If the service cannot be reached or malfunctions, | |
8123 | Squid will try to ignore any errors and process the message as | |
8124 | if the service was not enabled. No all ICAP errors can be | |
8125 | bypassed. If set to 0, the ICAP service is treated as | |
8126 | essential and all ICAP errors will result in an error page | |
8127 | returned to the HTTP client. | |
8128 | ||
8129 | Bypass is off by default: services are treated as essential. | |
8130 | ||
8131 | routing=on|off|1|0 | |
8132 | If set to 'on' or '1', the ICAP service is allowed to | |
8133 | dynamically change the current message adaptation plan by | |
8134 | returning a chain of services to be used next. The services | |
8135 | are specified using the X-Next-Services ICAP response header | |
8136 | value, formatted as a comma-separated list of service names. | |
e2851fe7 AR |
8137 | Each named service should be configured in squid.conf. Other |
8138 | services are ignored. An empty X-Next-Services value results | |
8139 | in an empty plan which ends the current adaptation. | |
8140 | ||
8141 | Dynamic adaptation plan may cross or cover multiple supported | |
8142 | vectoring points in their natural processing order. | |
a22e6cd3 AR |
8143 | |
8144 | Routing is not allowed by default: the ICAP X-Next-Services | |
8145 | response header is ignored. | |
8146 | ||
e6713f4e AJ |
8147 | ipv6=on|off |
8148 | Only has effect on split-stack systems. The default on those systems | |
8149 | is to use IPv4-only connections. When set to 'on' this option will | |
8150 | make Squid use IPv6-only connections to contact this ICAP service. | |
8151 | ||
2dba5b8e CT |
8152 | on-overload=block|bypass|wait|force |
8153 | If the service Max-Connections limit has been reached, do | |
8154 | one of the following for each new ICAP transaction: | |
8155 | * block: send an HTTP error response to the client | |
8156 | * bypass: ignore the "over-connected" ICAP service | |
8157 | * wait: wait (in a FIFO queue) for an ICAP connection slot | |
8158 | * force: proceed, ignoring the Max-Connections limit | |
8159 | ||
8160 | In SMP mode with N workers, each worker assumes the service | |
8161 | connection limit is Max-Connections/N, even though not all | |
8162 | workers may use a given service. | |
8163 | ||
8164 | The default value is "bypass" if service is bypassable, | |
8165 | otherwise it is set to "wait". | |
8166 | ||
8167 | ||
8168 | max-conn=number | |
8169 | Use the given number as the Max-Connections limit, regardless | |
8170 | of the Max-Connections value given by the service, if any. | |
8171 | ||
a22e6cd3 AR |
8172 | Older icap_service format without optional named parameters is |
8173 | deprecated but supported for backward compatibility. | |
5473c134 | 8174 | |
5473c134 | 8175 | Example: |
c25c2836 CT |
8176 | icap_service svcBlocker reqmod_precache icap://icap1.mydomain.net:1344/reqmod bypass=0 |
8177 | icap_service svcLogger reqmod_precache icap://icap2.mydomain.net:1344/respmod routing=on | |
cccac0a2 | 8178 | DOC_END |
8179 | ||
5473c134 | 8180 | NAME: icap_class |
8181 | TYPE: icap_class_type | |
8182 | IFDEF: ICAP_CLIENT | |
21a26d31 | 8183 | LOC: none |
5473c134 | 8184 | DEFAULT: none |
cccac0a2 | 8185 | DOC_START |
a22e6cd3 | 8186 | This deprecated option was documented to define an ICAP service |
62c7f90e AR |
8187 | chain, even though it actually defined a set of similar, redundant |
8188 | services, and the chains were not supported. | |
5473c134 | 8189 | |
62c7f90e | 8190 | To define a set of redundant services, please use the |
a22e6cd3 AR |
8191 | adaptation_service_set directive. For service chains, use |
8192 | adaptation_service_chain. | |
cccac0a2 | 8193 | DOC_END |
8194 | ||
5473c134 | 8195 | NAME: icap_access |
8196 | TYPE: icap_access_type | |
8197 | IFDEF: ICAP_CLIENT | |
21a26d31 | 8198 | LOC: none |
cccac0a2 | 8199 | DEFAULT: none |
cccac0a2 | 8200 | DOC_START |
a22e6cd3 | 8201 | This option is deprecated. Please use adaptation_access, which |
62c7f90e AR |
8202 | has the same ICAP functionality, but comes with better |
8203 | documentation, and eCAP support. | |
cccac0a2 | 8204 | DOC_END |
8205 | ||
57afc994 AR |
8206 | COMMENT_START |
8207 | eCAP OPTIONS | |
8208 | ----------------------------------------------------------------------------- | |
8209 | COMMENT_END | |
8210 | ||
21a26d31 AR |
8211 | NAME: ecap_enable |
8212 | TYPE: onoff | |
8213 | IFDEF: USE_ECAP | |
8214 | COMMENT: on|off | |
574b508c | 8215 | LOC: Adaptation::Ecap::TheConfig.onoff |
21a26d31 AR |
8216 | DEFAULT: off |
8217 | DOC_START | |
8218 | Controls whether eCAP support is enabled. | |
8219 | DOC_END | |
8220 | ||
8221 | NAME: ecap_service | |
8222 | TYPE: ecap_service_type | |
8223 | IFDEF: USE_ECAP | |
574b508c | 8224 | LOC: Adaptation::Ecap::TheConfig |
21a26d31 AR |
8225 | DEFAULT: none |
8226 | DOC_START | |
8227 | Defines a single eCAP service | |
8228 | ||
c25c2836 | 8229 | ecap_service id vectoring_point uri [option ...] |
21a26d31 | 8230 | |
c25c2836 CT |
8231 | id: ID |
8232 | an opaque identifier or name which is used to direct traffic to | |
8233 | this specific service. Must be unique among all adaptation | |
8234 | services in squid.conf. | |
8235 | ||
8236 | vectoring_point: reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
21a26d31 AR |
8237 | This specifies at which point of transaction processing the |
8238 | eCAP service should be activated. *_postcache vectoring points | |
8239 | are not yet supported. | |
c25c2836 CT |
8240 | |
8241 | uri: ecap://vendor/service_name?custom&cgi=style¶meters=optional | |
8242 | Squid uses the eCAP service URI to match this configuration | |
8243 | line with one of the dynamically loaded services. Each loaded | |
8244 | eCAP service must have a unique URI. Obtain the right URI from | |
8245 | the service provider. | |
8246 | ||
3caa16d2 AR |
8247 | To activate a service, use the adaptation_access directive. To group |
8248 | services, use adaptation_service_chain and adaptation_service_set. | |
c25c2836 CT |
8249 | |
8250 | Service options are separated by white space. eCAP services support | |
8251 | the following name=value options: | |
8252 | ||
8253 | bypass=on|off|1|0 | |
8254 | If set to 'on' or '1', the eCAP service is treated as optional. | |
8255 | If the service cannot be reached or malfunctions, Squid will try | |
8256 | to ignore any errors and process the message as if the service | |
21a26d31 | 8257 | was not enabled. No all eCAP errors can be bypassed. |
c25c2836 CT |
8258 | If set to 'off' or '0', the eCAP service is treated as essential |
8259 | and all eCAP errors will result in an error page returned to the | |
21a26d31 | 8260 | HTTP client. |
c25c2836 CT |
8261 | |
8262 | Bypass is off by default: services are treated as essential. | |
8263 | ||
8264 | routing=on|off|1|0 | |
8265 | If set to 'on' or '1', the eCAP service is allowed to | |
8266 | dynamically change the current message adaptation plan by | |
8267 | returning a chain of services to be used next. | |
8268 | ||
8269 | Dynamic adaptation plan may cross or cover multiple supported | |
8270 | vectoring points in their natural processing order. | |
8271 | ||
8272 | Routing is not allowed by default. | |
8273 | ||
8274 | Older ecap_service format without optional named parameters is | |
8275 | deprecated but supported for backward compatibility. | |
8276 | ||
21a26d31 AR |
8277 | |
8278 | Example: | |
c25c2836 CT |
8279 | ecap_service s1 reqmod_precache ecap://filters.R.us/leakDetector?on_error=block bypass=off |
8280 | ecap_service s2 respmod_precache ecap://filters.R.us/virusFilter config=/etc/vf.cfg bypass=on | |
21a26d31 AR |
8281 | DOC_END |
8282 | ||
57afc994 AR |
8283 | NAME: loadable_modules |
8284 | TYPE: wordlist | |
8285 | IFDEF: USE_LOADABLE_MODULES | |
8286 | LOC: Config.loadable_module_names | |
8287 | DEFAULT: none | |
8288 | DOC_START | |
8289 | Instructs Squid to load the specified dynamic module(s) or activate | |
8290 | preloaded module(s). | |
8291 | Example: | |
8292 | loadable_modules @DEFAULT_PREFIX@/lib/MinimalAdapter.so | |
8293 | DOC_END | |
8294 | ||
62c7f90e AR |
8295 | COMMENT_START |
8296 | MESSAGE ADAPTATION OPTIONS | |
8297 | ----------------------------------------------------------------------------- | |
8298 | COMMENT_END | |
8299 | ||
8300 | NAME: adaptation_service_set | |
8301 | TYPE: adaptation_service_set_type | |
8302 | IFDEF: USE_ADAPTATION | |
8303 | LOC: none | |
8304 | DEFAULT: none | |
8305 | DOC_START | |
8306 | ||
a22e6cd3 AR |
8307 | Configures an ordered set of similar, redundant services. This is |
8308 | useful when hot standby or backup adaptation servers are available. | |
8309 | ||
8310 | adaptation_service_set set_name service_name1 service_name2 ... | |
8311 | ||
8312 | The named services are used in the set declaration order. The first | |
8313 | applicable adaptation service from the set is used first. The next | |
8314 | applicable service is tried if and only if the transaction with the | |
8315 | previous service fails and the message waiting to be adapted is still | |
8316 | intact. | |
62c7f90e | 8317 | |
a22e6cd3 AR |
8318 | When adaptation starts, broken services are ignored as if they were |
8319 | not a part of the set. A broken service is a down optional service. | |
62c7f90e | 8320 | |
a22e6cd3 AR |
8321 | The services in a set must be attached to the same vectoring point |
8322 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
8323 | ||
8324 | If all services in a set are optional then adaptation failures are | |
8325 | bypassable. If all services in the set are essential, then a | |
8326 | transaction failure with one service may still be retried using | |
8327 | another service from the set, but when all services fail, the master | |
8328 | transaction fails as well. | |
8329 | ||
8330 | A set may contain a mix of optional and essential services, but that | |
8331 | is likely to lead to surprising results because broken services become | |
8332 | ignored (see above), making previously bypassable failures fatal. | |
8333 | Technically, it is the bypassability of the last failed service that | |
8334 | matters. | |
8335 | ||
8336 | See also: adaptation_access adaptation_service_chain | |
62c7f90e AR |
8337 | |
8338 | Example: | |
8339 | adaptation_service_set svcBlocker urlFilterPrimary urlFilterBackup | |
8340 | adaptation service_set svcLogger loggerLocal loggerRemote | |
8341 | DOC_END | |
8342 | ||
a22e6cd3 AR |
8343 | NAME: adaptation_service_chain |
8344 | TYPE: adaptation_service_chain_type | |
8345 | IFDEF: USE_ADAPTATION | |
8346 | LOC: none | |
8347 | DEFAULT: none | |
8348 | DOC_START | |
8349 | ||
8350 | Configures a list of complementary services that will be applied | |
8351 | one-by-one, forming an adaptation chain or pipeline. This is useful | |
8352 | when Squid must perform different adaptations on the same message. | |
8353 | ||
8354 | adaptation_service_chain chain_name service_name1 svc_name2 ... | |
8355 | ||
8356 | The named services are used in the chain declaration order. The first | |
8357 | applicable adaptation service from the chain is used first. The next | |
8358 | applicable service is applied to the successful adaptation results of | |
8359 | the previous service in the chain. | |
8360 | ||
8361 | When adaptation starts, broken services are ignored as if they were | |
8362 | not a part of the chain. A broken service is a down optional service. | |
8363 | ||
8364 | Request satisfaction terminates the adaptation chain because Squid | |
8365 | does not currently allow declaration of RESPMOD services at the | |
8366 | "reqmod_precache" vectoring point (see icap_service or ecap_service). | |
8367 | ||
8368 | The services in a chain must be attached to the same vectoring point | |
8369 | (e.g., pre-cache) and use the same adaptation method (e.g., REQMOD). | |
8370 | ||
8371 | A chain may contain a mix of optional and essential services. If an | |
8372 | essential adaptation fails (or the failure cannot be bypassed for | |
8373 | other reasons), the master transaction fails. Otherwise, the failure | |
8374 | is bypassed as if the failed adaptation service was not in the chain. | |
8375 | ||
8376 | See also: adaptation_access adaptation_service_set | |
8377 | ||
8378 | Example: | |
8379 | adaptation_service_chain svcRequest requestLogger urlFilter leakDetector | |
8380 | DOC_END | |
8381 | ||
62c7f90e AR |
8382 | NAME: adaptation_access |
8383 | TYPE: adaptation_access_type | |
8384 | IFDEF: USE_ADAPTATION | |
8385 | LOC: none | |
8386 | DEFAULT: none | |
638402dd | 8387 | DEFAULT_DOC: Allow, unless rules exist in squid.conf. |
62c7f90e AR |
8388 | DOC_START |
8389 | Sends an HTTP transaction to an ICAP or eCAP adaptation service. | |
8390 | ||
8391 | adaptation_access service_name allow|deny [!]aclname... | |
8392 | adaptation_access set_name allow|deny [!]aclname... | |
8393 | ||
8394 | At each supported vectoring point, the adaptation_access | |
8395 | statements are processed in the order they appear in this | |
8396 | configuration file. Statements pointing to the following services | |
8397 | are ignored (i.e., skipped without checking their ACL): | |
8398 | ||
8399 | - services serving different vectoring points | |
8400 | - "broken-but-bypassable" services | |
8401 | - "up" services configured to ignore such transactions | |
8402 | (e.g., based on the ICAP Transfer-Ignore header). | |
8403 | ||
8404 | When a set_name is used, all services in the set are checked | |
8405 | using the same rules, to find the first applicable one. See | |
8406 | adaptation_service_set for details. | |
8407 | ||
8408 | If an access list is checked and there is a match, the | |
8409 | processing stops: For an "allow" rule, the corresponding | |
8410 | adaptation service is used for the transaction. For a "deny" | |
8411 | rule, no adaptation service is activated. | |
8412 | ||
8413 | It is currently not possible to apply more than one adaptation | |
8414 | service at the same vectoring point to the same HTTP transaction. | |
8415 | ||
8416 | See also: icap_service and ecap_service | |
8417 | ||
8418 | Example: | |
8419 | adaptation_access service_1 allow all | |
8420 | DOC_END | |
8421 | ||
a22e6cd3 AR |
8422 | NAME: adaptation_service_iteration_limit |
8423 | TYPE: int | |
8424 | IFDEF: USE_ADAPTATION | |
8425 | LOC: Adaptation::Config::service_iteration_limit | |
8426 | DEFAULT: 16 | |
8427 | DOC_START | |
8428 | Limits the number of iterations allowed when applying adaptation | |
8429 | services to a message. If your longest adaptation set or chain | |
8430 | may have more than 16 services, increase the limit beyond its | |
8431 | default value of 16. If detecting infinite iteration loops sooner | |
8432 | is critical, make the iteration limit match the actual number | |
8433 | of services in your longest adaptation set or chain. | |
8434 | ||
8435 | Infinite adaptation loops are most likely with routing services. | |
8436 | ||
8437 | See also: icap_service routing=1 | |
8438 | DOC_END | |
8439 | ||
3ff65596 AR |
8440 | NAME: adaptation_masterx_shared_names |
8441 | TYPE: string | |
8442 | IFDEF: USE_ADAPTATION | |
8443 | LOC: Adaptation::Config::masterx_shared_name | |
8444 | DEFAULT: none | |
8445 | DOC_START | |
8446 | For each master transaction (i.e., the HTTP request and response | |
8447 | sequence, including all related ICAP and eCAP exchanges), Squid | |
8448 | maintains a table of metadata. The table entries are (name, value) | |
8449 | pairs shared among eCAP and ICAP exchanges. The table is destroyed | |
8450 | with the master transaction. | |
8451 | ||
8452 | This option specifies the table entry names that Squid must accept | |
8453 | from and forward to the adaptation transactions. | |
8454 | ||
8455 | An ICAP REQMOD or RESPMOD transaction may set an entry in the | |
8456 | shared table by returning an ICAP header field with a name | |
6666da11 AR |
8457 | specified in adaptation_masterx_shared_names. |
8458 | ||
8459 | An eCAP REQMOD or RESPMOD transaction may set an entry in the | |
8460 | shared table by implementing the libecap::visitEachOption() API | |
8461 | to provide an option with a name specified in | |
8462 | adaptation_masterx_shared_names. | |
5038f9d8 AR |
8463 | |
8464 | Squid will store and forward the set entry to subsequent adaptation | |
3ff65596 AR |
8465 | transactions within the same master transaction scope. |
8466 | ||
8467 | Only one shared entry name is supported at this time. | |
8468 | ||
8469 | Example: | |
8470 | # share authentication information among ICAP services | |
8471 | adaptation_masterx_shared_names X-Subscriber-ID | |
8472 | DOC_END | |
8473 | ||
71be37e0 | 8474 | NAME: adaptation_meta |
d7f4a0b7 | 8475 | TYPE: note |
71be37e0 CT |
8476 | IFDEF: USE_ADAPTATION |
8477 | LOC: Adaptation::Config::metaHeaders | |
8478 | DEFAULT: none | |
8479 | DOC_START | |
8480 | This option allows Squid administrator to add custom ICAP request | |
8481 | headers or eCAP options to Squid ICAP requests or eCAP transactions. | |
8482 | Use it to pass custom authentication tokens and other | |
8483 | transaction-state related meta information to an ICAP/eCAP service. | |
8484 | ||
8485 | The addition of a meta header is ACL-driven: | |
8486 | adaptation_meta name value [!]aclname ... | |
8487 | ||
8488 | Processing for a given header name stops after the first ACL list match. | |
8489 | Thus, it is impossible to add two headers with the same name. If no ACL | |
8490 | lists match for a given header name, no such header is added. For | |
8491 | example: | |
8492 | ||
8493 | # do not debug transactions except for those that need debugging | |
8494 | adaptation_meta X-Debug 1 needs_debugging | |
8495 | ||
8496 | # log all transactions except for those that must remain secret | |
8497 | adaptation_meta X-Log 1 !keep_secret | |
8498 | ||
8499 | # mark transactions from users in the "G 1" group | |
8500 | adaptation_meta X-Authenticated-Groups "G 1" authed_as_G1 | |
8501 | ||
8502 | The "value" parameter may be a regular squid.conf token or a "double | |
8503 | quoted string". Within the quoted string, use backslash (\) to escape | |
8504 | any character, which is currently only useful for escaping backslashes | |
8505 | and double quotes. For example, | |
8506 | "this string has one backslash (\\) and two \"quotes\"" | |
d7f4a0b7 CT |
8507 | |
8508 | Used adaptation_meta header values may be logged via %note | |
8509 | logformat code. If multiple adaptation_meta headers with the same name | |
8510 | are used during master transaction lifetime, the header values are | |
8511 | logged in the order they were used and duplicate values are ignored | |
8512 | (only the first repeated value will be logged). | |
71be37e0 CT |
8513 | DOC_END |
8514 | ||
3ff65596 AR |
8515 | NAME: icap_retry |
8516 | TYPE: acl_access | |
8517 | IFDEF: ICAP_CLIENT | |
8518 | LOC: Adaptation::Icap::TheConfig.repeat | |
3ff65596 AR |
8519 | DEFAULT_IF_NONE: deny all |
8520 | DOC_START | |
8521 | This ACL determines which retriable ICAP transactions are | |
8522 | retried. Transactions that received a complete ICAP response | |
8523 | and did not have to consume or produce HTTP bodies to receive | |
8524 | that response are usually retriable. | |
8525 | ||
8526 | icap_retry allow|deny [!]aclname ... | |
8527 | ||
8528 | Squid automatically retries some ICAP I/O timeouts and errors | |
8529 | due to persistent connection race conditions. | |
8530 | ||
8531 | See also: icap_retry_limit | |
8532 | DOC_END | |
8533 | ||
8534 | NAME: icap_retry_limit | |
8535 | TYPE: int | |
8536 | IFDEF: ICAP_CLIENT | |
8537 | LOC: Adaptation::Icap::TheConfig.repeat_limit | |
8538 | DEFAULT: 0 | |
638402dd | 8539 | DEFAULT_DOC: No retries are allowed. |
3ff65596 | 8540 | DOC_START |
638402dd | 8541 | Limits the number of retries allowed. |
3ff65596 AR |
8542 | |
8543 | Communication errors due to persistent connection race | |
8544 | conditions are unavoidable, automatically retried, and do not | |
8545 | count against this limit. | |
8546 | ||
8547 | See also: icap_retry | |
8548 | DOC_END | |
8549 | ||
8550 | ||
5473c134 | 8551 | COMMENT_START |
8552 | DNS OPTIONS | |
8553 | ----------------------------------------------------------------------------- | |
8554 | COMMENT_END | |
8555 | ||
8556 | NAME: check_hostnames | |
cccac0a2 | 8557 | TYPE: onoff |
cccac0a2 | 8558 | DEFAULT: off |
5473c134 | 8559 | LOC: Config.onoff.check_hostnames |
cccac0a2 | 8560 | DOC_START |
5473c134 | 8561 | For security and stability reasons Squid can check |
8562 | hostnames for Internet standard RFC compliance. If you want | |
8563 | Squid to perform these checks turn this directive on. | |
cccac0a2 | 8564 | DOC_END |
8565 | ||
5473c134 | 8566 | NAME: allow_underscore |
cccac0a2 | 8567 | TYPE: onoff |
cccac0a2 | 8568 | DEFAULT: on |
5473c134 | 8569 | LOC: Config.onoff.allow_underscore |
cccac0a2 | 8570 | DOC_START |
5473c134 | 8571 | Underscore characters is not strictly allowed in Internet hostnames |
8572 | but nevertheless used by many sites. Set this to off if you want | |
8573 | Squid to be strict about the standard. | |
8574 | This check is performed only when check_hostnames is set to on. | |
cccac0a2 | 8575 | DOC_END |
8576 | ||
5473c134 | 8577 | NAME: dns_retransmit_interval |
fd0f51c4 | 8578 | TYPE: time_msec |
5473c134 | 8579 | DEFAULT: 5 seconds |
8580 | LOC: Config.Timeout.idns_retransmit | |
cccac0a2 | 8581 | DOC_START |
5473c134 | 8582 | Initial retransmit interval for DNS queries. The interval is |
8583 | doubled each time all configured DNS servers have been tried. | |
cccac0a2 | 8584 | DOC_END |
8585 | ||
5473c134 | 8586 | NAME: dns_timeout |
fd0f51c4 | 8587 | TYPE: time_msec |
a541c34e | 8588 | DEFAULT: 30 seconds |
5473c134 | 8589 | LOC: Config.Timeout.idns_query |
cccac0a2 | 8590 | DOC_START |
5473c134 | 8591 | DNS Query timeout. If no response is received to a DNS query |
8592 | within this time all DNS servers for the queried domain | |
8593 | are assumed to be unavailable. | |
cccac0a2 | 8594 | DOC_END |
8595 | ||
e210930b AJ |
8596 | NAME: dns_packet_max |
8597 | TYPE: b_ssize_t | |
638402dd | 8598 | DEFAULT_DOC: EDNS disabled |
e210930b AJ |
8599 | DEFAULT: none |
8600 | LOC: Config.dns.packet_max | |
e210930b AJ |
8601 | DOC_START |
8602 | Maximum number of bytes packet size to advertise via EDNS. | |
8603 | Set to "none" to disable EDNS large packet support. | |
8604 | ||
8605 | For legacy reasons DNS UDP replies will default to 512 bytes which | |
8606 | is too small for many responses. EDNS provides a means for Squid to | |
8607 | negotiate receiving larger responses back immediately without having | |
8608 | to failover with repeat requests. Responses larger than this limit | |
8609 | will retain the old behaviour of failover to TCP DNS. | |
8610 | ||
8611 | Squid has no real fixed limit internally, but allowing packet sizes | |
8612 | over 1500 bytes requires network jumbogram support and is usually not | |
8613 | necessary. | |
8614 | ||
8615 | WARNING: The RFC also indicates that some older resolvers will reply | |
8616 | with failure of the whole request if the extension is added. Some | |
8617 | resolvers have already been identified which will reply with mangled | |
8618 | EDNS response on occasion. Usually in response to many-KB jumbogram | |
8619 | sizes being advertised by Squid. | |
8620 | Squid will currently treat these both as an unable-to-resolve domain | |
8621 | even if it would be resolvable without EDNS. | |
8622 | DOC_END | |
8623 | ||
5473c134 | 8624 | NAME: dns_defnames |
8625 | COMMENT: on|off | |
cccac0a2 | 8626 | TYPE: onoff |
cccac0a2 | 8627 | DEFAULT: off |
638402dd | 8628 | DEFAULT_DOC: Search for single-label domain names is disabled. |
5473c134 | 8629 | LOC: Config.onoff.res_defnames |
cccac0a2 | 8630 | DOC_START |
5473c134 | 8631 | Normally the RES_DEFNAMES resolver option is disabled |
8632 | (see res_init(3)). This prevents caches in a hierarchy | |
8633 | from interpreting single-component hostnames locally. To allow | |
8634 | Squid to handle single-component names, enable this option. | |
cccac0a2 | 8635 | DOC_END |
8636 | ||
bce61b00 AJ |
8637 | NAME: dns_multicast_local |
8638 | COMMENT: on|off | |
8639 | TYPE: onoff | |
8640 | DEFAULT: off | |
8641 | DEFAULT_DOC: Search for .local and .arpa names is disabled. | |
8642 | LOC: Config.onoff.dns_mdns | |
8643 | DOC_START | |
8644 | When set to on, Squid sends multicast DNS lookups on the local | |
8645 | network for domains ending in .local and .arpa. | |
8646 | This enables local servers and devices to be contacted in an | |
8647 | ad-hoc or zero-configuration network environment. | |
8648 | DOC_END | |
8649 | ||
5473c134 | 8650 | NAME: dns_nameservers |
8651 | TYPE: wordlist | |
8652 | DEFAULT: none | |
638402dd | 8653 | DEFAULT_DOC: Use operating system definitions |
5473c134 | 8654 | LOC: Config.dns_nameservers |
cccac0a2 | 8655 | DOC_START |
5473c134 | 8656 | Use this if you want to specify a list of DNS name servers |
8657 | (IP addresses) to use instead of those given in your | |
8658 | /etc/resolv.conf file. | |
638402dd | 8659 | |
5473c134 | 8660 | On Windows platforms, if no value is specified here or in |
8661 | the /etc/resolv.conf file, the list of DNS name servers are | |
8662 | taken from the Windows registry, both static and dynamic DHCP | |
8663 | configurations are supported. | |
cccac0a2 | 8664 | |
5473c134 | 8665 | Example: dns_nameservers 10.0.0.1 192.172.0.4 |
cccac0a2 | 8666 | DOC_END |
8667 | ||
5473c134 | 8668 | NAME: hosts_file |
cccac0a2 | 8669 | TYPE: string |
5473c134 | 8670 | DEFAULT: @DEFAULT_HOSTS@ |
8671 | LOC: Config.etcHostsPath | |
cccac0a2 | 8672 | DOC_START |
5473c134 | 8673 | Location of the host-local IP name-address associations |
8674 | database. Most Operating Systems have such a file on different | |
8675 | default locations: | |
8676 | - Un*X & Linux: /etc/hosts | |
8677 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
8678 | (%SystemRoot% value install default is c:\winnt) | |
8679 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
8680 | (%SystemRoot% value install default is c:\windows) | |
8681 | - Windows 9x/Me: %windir%\hosts | |
8682 | (%windir% value is usually c:\windows) | |
8683 | - Cygwin: /etc/hosts | |
cccac0a2 | 8684 | |
5473c134 | 8685 | The file contains newline-separated definitions, in the |
8686 | form ip_address_in_dotted_form name [name ...] names are | |
8687 | whitespace-separated. Lines beginning with an hash (#) | |
8688 | character are comments. | |
cccac0a2 | 8689 | |
5473c134 | 8690 | The file is checked at startup and upon configuration. |
8691 | If set to 'none', it won't be checked. | |
8692 | If append_domain is used, that domain will be added to | |
8693 | domain-local (i.e. not containing any dot character) host | |
8694 | definitions. | |
cccac0a2 | 8695 | DOC_END |
8696 | ||
5473c134 | 8697 | NAME: append_domain |
8698 | TYPE: string | |
8699 | LOC: Config.appendDomain | |
8700 | DEFAULT: none | |
638402dd | 8701 | DEFAULT_DOC: Use operating system definitions |
6a2f3fcf | 8702 | DOC_START |
5473c134 | 8703 | Appends local domain name to hostnames without any dots in |
8704 | them. append_domain must begin with a period. | |
8705 | ||
8706 | Be warned there are now Internet names with no dots in | |
8707 | them using only top-domain names, so setting this may | |
8708 | cause some Internet sites to become unavailable. | |
8709 | ||
8710 | Example: | |
8711 | append_domain .yourdomain.com | |
6a2f3fcf | 8712 | DOC_END |
8713 | ||
5473c134 | 8714 | NAME: ignore_unknown_nameservers |
8715 | TYPE: onoff | |
8716 | LOC: Config.onoff.ignore_unknown_nameservers | |
df6fd596 | 8717 | DEFAULT: on |
8718 | DOC_START | |
5473c134 | 8719 | By default Squid checks that DNS responses are received |
8720 | from the same IP addresses they are sent to. If they | |
8721 | don't match, Squid ignores the response and writes a warning | |
8722 | message to cache.log. You can allow responses from unknown | |
8723 | nameservers by setting this option to 'off'. | |
df6fd596 | 8724 | DOC_END |
8725 | ||
5a0da9ec AJ |
8726 | NAME: dns_v4_first |
8727 | TYPE: onoff | |
8728 | DEFAULT: off | |
8729 | LOC: Config.dns.v4_first | |
5a0da9ec AJ |
8730 | DOC_START |
8731 | With the IPv6 Internet being as fast or faster than IPv4 Internet | |
8732 | for most networks Squid prefers to contact websites over IPv6. | |
8733 | ||
8734 | This option reverses the order of preference to make Squid contact | |
8735 | dual-stack websites over IPv4 first. Squid will still perform both | |
8736 | IPv6 and IPv4 DNS lookups before connecting. | |
8737 | ||
8738 | WARNING: | |
8739 | This option will restrict the situations under which IPv6 | |
8740 | connectivity is used (and tested). Hiding network problems | |
8741 | which would otherwise be detected and warned about. | |
8742 | DOC_END | |
8743 | ||
6bc15a4f | 8744 | NAME: ipcache_size |
8745 | COMMENT: (number of entries) | |
8746 | TYPE: int | |
8747 | DEFAULT: 1024 | |
8748 | LOC: Config.ipcache.size | |
638402dd AJ |
8749 | DOC_START |
8750 | Maximum number of DNS IP cache entries. | |
8751 | DOC_END | |
6bc15a4f | 8752 | |
8753 | NAME: ipcache_low | |
8754 | COMMENT: (percent) | |
8755 | TYPE: int | |
8756 | DEFAULT: 90 | |
8757 | LOC: Config.ipcache.low | |
8758 | DOC_NONE | |
8759 | ||
8760 | NAME: ipcache_high | |
8761 | COMMENT: (percent) | |
8762 | TYPE: int | |
8763 | DEFAULT: 95 | |
8764 | LOC: Config.ipcache.high | |
8765 | DOC_START | |
8766 | The size, low-, and high-water marks for the IP cache. | |
8767 | DOC_END | |
8768 | ||
8769 | NAME: fqdncache_size | |
8770 | COMMENT: (number of entries) | |
8771 | TYPE: int | |
8772 | DEFAULT: 1024 | |
8773 | LOC: Config.fqdncache.size | |
8774 | DOC_START | |
8775 | Maximum number of FQDN cache entries. | |
8776 | DOC_END | |
8777 | ||
a58ff010 | 8778 | COMMENT_START |
5473c134 | 8779 | MISCELLANEOUS |
a58ff010 | 8780 | ----------------------------------------------------------------------------- |
8781 | COMMENT_END | |
8782 | ||
2eceb328 CT |
8783 | NAME: configuration_includes_quoted_values |
8784 | COMMENT: on|off | |
bde7a8ce CT |
8785 | TYPE: configuration_includes_quoted_values |
8786 | DEFAULT: off | |
2eceb328 CT |
8787 | LOC: ConfigParser::RecognizeQuotedValues |
8788 | DOC_START | |
8789 | If set, Squid will recognize each "quoted string" after a configuration | |
8790 | directive as a single parameter. The quotes are stripped before the | |
8791 | parameter value is interpreted or used. | |
8792 | See "Values with spaces, quotes, and other special characters" | |
8793 | section for more details. | |
8794 | DOC_END | |
8795 | ||
5473c134 | 8796 | NAME: memory_pools |
a58ff010 | 8797 | COMMENT: on|off |
5473c134 | 8798 | TYPE: onoff |
8799 | DEFAULT: on | |
8800 | LOC: Config.onoff.mem_pools | |
a58ff010 | 8801 | DOC_START |
5473c134 | 8802 | If set, Squid will keep pools of allocated (but unused) memory |
8803 | available for future use. If memory is a premium on your | |
8804 | system and you believe your malloc library outperforms Squid | |
8805 | routines, disable this. | |
a58ff010 | 8806 | DOC_END |
8807 | ||
5473c134 | 8808 | NAME: memory_pools_limit |
8809 | COMMENT: (bytes) | |
70be1349 | 8810 | TYPE: b_int64_t |
5473c134 | 8811 | DEFAULT: 5 MB |
8812 | LOC: Config.MemPools.limit | |
ec1245f8 | 8813 | DOC_START |
5473c134 | 8814 | Used only with memory_pools on: |
8815 | memory_pools_limit 50 MB | |
ec1245f8 | 8816 | |
5473c134 | 8817 | If set to a non-zero value, Squid will keep at most the specified |
8818 | limit of allocated (but unused) memory in memory pools. All free() | |
8819 | requests that exceed this limit will be handled by your malloc | |
8820 | library. Squid does not pre-allocate any memory, just safe-keeps | |
8821 | objects that otherwise would be free()d. Thus, it is safe to set | |
8822 | memory_pools_limit to a reasonably high value even if your | |
8823 | configuration will use less memory. | |
ec1245f8 | 8824 | |
89646bd7 | 8825 | If set to none, Squid will keep all memory it can. That is, there |
5473c134 | 8826 | will be no limit on the total amount of memory used for safe-keeping. |
ec1245f8 | 8827 | |
5473c134 | 8828 | To disable memory allocation optimization, do not set |
70be1349 | 8829 | memory_pools_limit to 0 or none. Set memory_pools to "off" instead. |
5473c134 | 8830 | |
8831 | An overhead for maintaining memory pools is not taken into account | |
8832 | when the limit is checked. This overhead is close to four bytes per | |
8833 | object kept. However, pools may actually _save_ memory because of | |
8834 | reduced memory thrashing in your malloc library. | |
ec1245f8 | 8835 | DOC_END |
8836 | ||
5473c134 | 8837 | NAME: forwarded_for |
67c06f0d AJ |
8838 | COMMENT: on|off|transparent|truncate|delete |
8839 | TYPE: string | |
5473c134 | 8840 | DEFAULT: on |
8841 | LOC: opt_forwarded_for | |
5f8252d2 | 8842 | DOC_START |
67c06f0d AJ |
8843 | If set to "on", Squid will append your client's IP address |
8844 | in the HTTP requests it forwards. By default it looks like: | |
5f8252d2 | 8845 | |
5473c134 | 8846 | X-Forwarded-For: 192.1.2.3 |
8847 | ||
67c06f0d | 8848 | If set to "off", it will appear as |
5473c134 | 8849 | |
8850 | X-Forwarded-For: unknown | |
67c06f0d AJ |
8851 | |
8852 | If set to "transparent", Squid will not alter the | |
8853 | X-Forwarded-For header in any way. | |
8854 | ||
8855 | If set to "delete", Squid will delete the entire | |
8856 | X-Forwarded-For header. | |
8857 | ||
8858 | If set to "truncate", Squid will remove all existing | |
dd68402f | 8859 | X-Forwarded-For entries, and place the client IP as the sole entry. |
5f8252d2 | 8860 | DOC_END |
8861 | ||
5473c134 | 8862 | NAME: cachemgr_passwd |
8863 | TYPE: cachemgrpasswd | |
8864 | DEFAULT: none | |
638402dd | 8865 | DEFAULT_DOC: No password. Actions which require password are denied. |
5473c134 | 8866 | LOC: Config.passwd_list |
5f8252d2 | 8867 | DOC_START |
5473c134 | 8868 | Specify passwords for cachemgr operations. |
5f8252d2 | 8869 | |
5473c134 | 8870 | Usage: cachemgr_passwd password action action ... |
8871 | ||
8872 | Some valid actions are (see cache manager menu for a full list): | |
8873 | 5min | |
8874 | 60min | |
8875 | asndb | |
8876 | authenticator | |
8877 | cbdata | |
8878 | client_list | |
8879 | comm_incoming | |
8880 | config * | |
8881 | counters | |
8882 | delay | |
8883 | digest_stats | |
8884 | dns | |
8885 | events | |
8886 | filedescriptors | |
8887 | fqdncache | |
8888 | histograms | |
8889 | http_headers | |
8890 | info | |
8891 | io | |
8892 | ipcache | |
8893 | mem | |
8894 | menu | |
8895 | netdb | |
8896 | non_peers | |
8897 | objects | |
8898 | offline_toggle * | |
8899 | pconn | |
8900 | peer_select | |
b360c477 | 8901 | reconfigure * |
5473c134 | 8902 | redirector |
8903 | refresh | |
8904 | server_list | |
8905 | shutdown * | |
8906 | store_digest | |
8907 | storedir | |
8908 | utilization | |
8909 | via_headers | |
8910 | vm_objects | |
8911 | ||
8912 | * Indicates actions which will not be performed without a | |
8913 | valid password, others can be performed if not listed here. | |
8914 | ||
8915 | To disable an action, set the password to "disable". | |
8916 | To allow performing an action without a password, set the | |
8917 | password to "none". | |
8918 | ||
8919 | Use the keyword "all" to set the same password for all actions. | |
8920 | ||
8921 | Example: | |
8922 | cachemgr_passwd secret shutdown | |
8923 | cachemgr_passwd lesssssssecret info stats/objects | |
8924 | cachemgr_passwd disable all | |
5f8252d2 | 8925 | DOC_END |
8926 | ||
5473c134 | 8927 | NAME: client_db |
a58ff010 | 8928 | COMMENT: on|off |
5473c134 | 8929 | TYPE: onoff |
8930 | DEFAULT: on | |
8931 | LOC: Config.onoff.client_db | |
a58ff010 | 8932 | DOC_START |
5473c134 | 8933 | If you want to disable collecting per-client statistics, |
8934 | turn off client_db here. | |
a58ff010 | 8935 | DOC_END |
8936 | ||
5473c134 | 8937 | NAME: refresh_all_ims |
8938 | COMMENT: on|off | |
8939 | TYPE: onoff | |
8940 | DEFAULT: off | |
8941 | LOC: Config.onoff.refresh_all_ims | |
a58ff010 | 8942 | DOC_START |
5473c134 | 8943 | When you enable this option, squid will always check |
8944 | the origin server for an update when a client sends an | |
8945 | If-Modified-Since request. Many browsers use IMS | |
8946 | requests when the user requests a reload, and this | |
8947 | ensures those clients receive the latest version. | |
a58ff010 | 8948 | |
5473c134 | 8949 | By default (off), squid may return a Not Modified response |
8950 | based on the age of the cached version. | |
78e8cfc4 | 8951 | DOC_END |
8952 | ||
5473c134 | 8953 | NAME: reload_into_ims |
626096be | 8954 | IFDEF: USE_HTTP_VIOLATIONS |
12b91c99 | 8955 | COMMENT: on|off |
5473c134 | 8956 | TYPE: onoff |
8957 | DEFAULT: off | |
8958 | LOC: Config.onoff.reload_into_ims | |
12b91c99 | 8959 | DOC_START |
5473c134 | 8960 | When you enable this option, client no-cache or ``reload'' |
8961 | requests will be changed to If-Modified-Since requests. | |
8962 | Doing this VIOLATES the HTTP standard. Enabling this | |
8963 | feature could make you liable for problems which it | |
8964 | causes. | |
8965 | ||
8966 | see also refresh_pattern for a more selective approach. | |
12b91c99 | 8967 | DOC_END |
8968 | ||
31ef19cd | 8969 | NAME: connect_retries |
5473c134 | 8970 | TYPE: int |
31ef19cd AJ |
8971 | LOC: Config.connect_retries |
8972 | DEFAULT: 0 | |
638402dd | 8973 | DEFAULT_DOC: Do not retry failed connections. |
a58ff010 | 8974 | DOC_START |
aed188fd AJ |
8975 | This sets the maximum number of connection attempts made for each |
8976 | TCP connection. The connect_retries attempts must all still | |
8977 | complete within the connection timeout period. | |
31ef19cd AJ |
8978 | |
8979 | The default is not to re-try if the first connection attempt fails. | |
8980 | The (not recommended) maximum is 10 tries. | |
5473c134 | 8981 | |
31ef19cd AJ |
8982 | A warning message will be generated if it is set to a too-high |
8983 | value and the configured value will be over-ridden. | |
5473c134 | 8984 | |
31ef19cd AJ |
8985 | Note: These re-tries are in addition to forward_max_tries |
8986 | which limit how many different addresses may be tried to find | |
8987 | a useful server. | |
a58ff010 | 8988 | DOC_END |
8989 | ||
5473c134 | 8990 | NAME: retry_on_error |
a58ff010 | 8991 | TYPE: onoff |
5473c134 | 8992 | LOC: Config.retry.onerror |
a58ff010 | 8993 | DEFAULT: off |
8994 | DOC_START | |
aea8548b AJ |
8995 | If set to ON Squid will automatically retry requests when |
8996 | receiving an error response with status 403 (Forbidden), | |
8997 | 500 (Internal Error), 501 or 503 (Service not available). | |
8998 | Status 502 and 504 (Gateway errors) are always retried. | |
8999 | ||
9000 | This is mainly useful if you are in a complex cache hierarchy to | |
9001 | work around access control errors. | |
9002 | ||
9003 | NOTE: This retry will attempt to find another working destination. | |
9004 | Which is different from the server which just failed. | |
5f8252d2 | 9005 | DOC_END |
9006 | ||
5473c134 | 9007 | NAME: as_whois_server |
5f8252d2 | 9008 | TYPE: string |
5473c134 | 9009 | LOC: Config.as_whois_server |
9010 | DEFAULT: whois.ra.net | |
5f8252d2 | 9011 | DOC_START |
5473c134 | 9012 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
9013 | queried only when Squid starts up, not for every request. | |
5f8252d2 | 9014 | DOC_END |
9015 | ||
5473c134 | 9016 | NAME: offline_mode |
5f8252d2 | 9017 | TYPE: onoff |
5473c134 | 9018 | LOC: Config.onoff.offline |
5f8252d2 | 9019 | DEFAULT: off |
9020 | DOC_START | |
5473c134 | 9021 | Enable this option and Squid will never try to validate cached |
9022 | objects. | |
a58ff010 | 9023 | DOC_END |
9024 | ||
5473c134 | 9025 | NAME: uri_whitespace |
9026 | TYPE: uri_whitespace | |
9027 | LOC: Config.uri_whitespace | |
9028 | DEFAULT: strip | |
a58ff010 | 9029 | DOC_START |
5473c134 | 9030 | What to do with requests that have whitespace characters in the |
9031 | URI. Options: | |
a58ff010 | 9032 | |
5473c134 | 9033 | strip: The whitespace characters are stripped out of the URL. |
82806837 AJ |
9034 | This is the behavior recommended by RFC2396 and RFC3986 |
9035 | for tolerant handling of generic URI. | |
9036 | NOTE: This is one difference between generic URI and HTTP URLs. | |
9037 | ||
5473c134 | 9038 | deny: The request is denied. The user receives an "Invalid |
9039 | Request" message. | |
82806837 AJ |
9040 | This is the behaviour recommended by RFC2616 for safe |
9041 | handling of HTTP request URL. | |
9042 | ||
5473c134 | 9043 | allow: The request is allowed and the URI is not changed. The |
9044 | whitespace characters remain in the URI. Note the | |
9045 | whitespace is passed to redirector processes if they | |
9046 | are in use. | |
82806837 AJ |
9047 | Note this may be considered a violation of RFC2616 |
9048 | request parsing where whitespace is prohibited in the | |
9049 | URL field. | |
9050 | ||
5473c134 | 9051 | encode: The request is allowed and the whitespace characters are |
82806837 AJ |
9052 | encoded according to RFC1738. |
9053 | ||
5473c134 | 9054 | chop: The request is allowed and the URI is chopped at the |
82806837 AJ |
9055 | first whitespace. |
9056 | ||
9057 | ||
9058 | NOTE the current Squid implementation of encode and chop violates | |
9059 | RFC2616 by not using a 301 redirect after altering the URL. | |
5473c134 | 9060 | DOC_END |
a58ff010 | 9061 | |
5473c134 | 9062 | NAME: chroot |
9063 | TYPE: string | |
9064 | LOC: Config.chroot_dir | |
a58ff010 | 9065 | DEFAULT: none |
9066 | DOC_START | |
9f37c18a | 9067 | Specifies a directory where Squid should do a chroot() while |
2d89f399 HN |
9068 | initializing. This also causes Squid to fully drop root |
9069 | privileges after initializing. This means, for example, if you | |
9070 | use a HTTP port less than 1024 and try to reconfigure, you may | |
9071 | get an error saying that Squid can not open the port. | |
5473c134 | 9072 | DOC_END |
a58ff010 | 9073 | |
5473c134 | 9074 | NAME: balance_on_multiple_ip |
9075 | TYPE: onoff | |
9076 | LOC: Config.onoff.balance_on_multiple_ip | |
cc192b50 | 9077 | DEFAULT: off |
5473c134 | 9078 | DOC_START |
cc192b50 | 9079 | Modern IP resolvers in squid sort lookup results by preferred access. |
9080 | By default squid will use these IP in order and only rotates to | |
9081 | the next listed when the most preffered fails. | |
9082 | ||
5473c134 | 9083 | Some load balancing servers based on round robin DNS have been |
9084 | found not to preserve user session state across requests | |
9085 | to different IP addresses. | |
a58ff010 | 9086 | |
cc192b50 | 9087 | Enabling this directive Squid rotates IP's per request. |
a58ff010 | 9088 | DOC_END |
9089 | ||
5473c134 | 9090 | NAME: pipeline_prefetch |
079a8480 AJ |
9091 | TYPE: pipelinePrefetch |
9092 | LOC: Config.pipeline_max_prefetch | |
9093 | DEFAULT: 0 | |
9094 | DEFAULT_DOC: Do not pre-parse pipelined requests. | |
a58ff010 | 9095 | DOC_START |
079a8480 AJ |
9096 | HTTP clients may send a pipeline of 1+N requests to Squid using a |
9097 | single connection, without waiting for Squid to respond to the first | |
9098 | of those requests. This option limits the number of concurrent | |
9099 | requests Squid will try to handle in parallel. If set to N, Squid | |
9100 | will try to receive and process up to 1+N requests on the same | |
9101 | connection concurrently. | |
a58ff010 | 9102 | |
079a8480 | 9103 | Defaults to 0 (off) for bandwidth management and access logging |
5473c134 | 9104 | reasons. |
a0e23afd | 9105 | |
079a8480 AJ |
9106 | NOTE: pipelining requires persistent connections to clients. |
9107 | ||
a0e23afd | 9108 | WARNING: pipelining breaks NTLM and Negotiate/Kerberos authentication. |
5473c134 | 9109 | DOC_END |
a58ff010 | 9110 | |
5473c134 | 9111 | NAME: high_response_time_warning |
9112 | TYPE: int | |
9113 | COMMENT: (msec) | |
9114 | LOC: Config.warnings.high_rptm | |
9115 | DEFAULT: 0 | |
638402dd | 9116 | DEFAULT_DOC: disabled. |
5473c134 | 9117 | DOC_START |
9118 | If the one-minute median response time exceeds this value, | |
9119 | Squid prints a WARNING with debug level 0 to get the | |
9120 | administrators attention. The value is in milliseconds. | |
a58ff010 | 9121 | DOC_END |
9122 | ||
5473c134 | 9123 | NAME: high_page_fault_warning |
9124 | TYPE: int | |
9125 | LOC: Config.warnings.high_pf | |
9126 | DEFAULT: 0 | |
638402dd | 9127 | DEFAULT_DOC: disabled. |
cc9f92d4 | 9128 | DOC_START |
5473c134 | 9129 | If the one-minute average page fault rate exceeds this |
9130 | value, Squid prints a WARNING with debug level 0 to get | |
9131 | the administrators attention. The value is in page faults | |
9132 | per second. | |
9133 | DOC_END | |
cc9f92d4 | 9134 | |
5473c134 | 9135 | NAME: high_memory_warning |
9136 | TYPE: b_size_t | |
9137 | LOC: Config.warnings.high_memory | |
f2228f3b | 9138 | IFDEF: HAVE_MSTATS&&HAVE_GNUMALLOC_H |
904971da | 9139 | DEFAULT: 0 KB |
638402dd | 9140 | DEFAULT_DOC: disabled. |
5473c134 | 9141 | DOC_START |
4bf2a476 FC |
9142 | If the memory usage (as determined by gnumalloc, if available and used) |
9143 | exceeds this amount, Squid prints a WARNING with debug level 0 to get | |
5473c134 | 9144 | the administrators attention. |
9145 | DOC_END | |
4bf2a476 | 9146 | # TODO: link high_memory_warning to mempools? |
cc9f92d4 | 9147 | |
5473c134 | 9148 | NAME: sleep_after_fork |
9149 | COMMENT: (microseconds) | |
9150 | TYPE: int | |
9151 | LOC: Config.sleep_after_fork | |
9152 | DEFAULT: 0 | |
9153 | DOC_START | |
9154 | When this is set to a non-zero value, the main Squid process | |
9155 | sleeps the specified number of microseconds after a fork() | |
9156 | system call. This sleep may help the situation where your | |
9157 | system reports fork() failures due to lack of (virtual) | |
9158 | memory. Note, however, if you have a lot of child | |
9159 | processes, these sleep delays will add up and your | |
9160 | Squid will not service requests for some amount of time | |
9161 | until all the child processes have been started. | |
9162 | On Windows value less then 1000 (1 milliseconds) are | |
9163 | rounded to 1000. | |
cc9f92d4 | 9164 | DOC_END |
9165 | ||
b6696974 | 9166 | NAME: windows_ipaddrchangemonitor |
7aa9bb3e | 9167 | IFDEF: _SQUID_WINDOWS_ |
b6696974 GS |
9168 | COMMENT: on|off |
9169 | TYPE: onoff | |
9170 | DEFAULT: on | |
9171 | LOC: Config.onoff.WIN32_IpAddrChangeMonitor | |
9172 | DOC_START | |
9173 | On Windows Squid by default will monitor IP address changes and will | |
9174 | reconfigure itself after any detected event. This is very useful for | |
9175 | proxies connected to internet with dial-up interfaces. | |
9176 | In some cases (a Proxy server acting as VPN gateway is one) it could be | |
9177 | desiderable to disable this behaviour setting this to 'off'. | |
9178 | Note: after changing this, Squid service must be restarted. | |
9179 | DOC_END | |
9180 | ||
a98c2da5 AJ |
9181 | NAME: eui_lookup |
9182 | TYPE: onoff | |
9183 | IFDEF: USE_SQUID_EUI | |
9184 | DEFAULT: on | |
9185 | LOC: Eui::TheConfig.euiLookup | |
9186 | DOC_START | |
9187 | Whether to lookup the EUI or MAC address of a connected client. | |
9188 | DOC_END | |
9189 | ||
f3f0f563 AJ |
9190 | NAME: max_filedescriptors max_filedesc |
9191 | TYPE: int | |
9192 | DEFAULT: 0 | |
638402dd | 9193 | DEFAULT_DOC: Use operating system limits set by ulimit. |
f3f0f563 AJ |
9194 | LOC: Config.max_filedescriptors |
9195 | DOC_START | |
638402dd AJ |
9196 | Reduce the maximum number of filedescriptors supported below |
9197 | the usual operating system defaults. | |
f3f0f563 | 9198 | |
638402dd | 9199 | Remove from squid.conf to inherit the current ulimit setting. |
f3f0f563 AJ |
9200 | |
9201 | Note: Changing this requires a restart of Squid. Also | |
638402dd | 9202 | not all I/O types supports large values (eg on Windows). |
f3f0f563 AJ |
9203 | DOC_END |
9204 | ||
13aeac35 | 9205 | NAME: workers |
007d775d | 9206 | TYPE: int |
13aeac35 | 9207 | LOC: Config.workers |
007d775d | 9208 | DEFAULT: 1 |
638402dd | 9209 | DEFAULT_DOC: SMP support disabled. |
007d775d | 9210 | DOC_START |
13aeac35 | 9211 | Number of main Squid processes or "workers" to fork and maintain. |
007d775d AR |
9212 | 0: "no daemon" mode, like running "squid -N ..." |
9213 | 1: "no SMP" mode, start one main Squid process daemon (default) | |
13aeac35 AR |
9214 | N: start N main Squid process daemons (i.e., SMP mode) |
9215 | ||
b87f6632 AR |
9216 | In SMP mode, each worker does nearly all what a single Squid daemon |
9217 | does (e.g., listen on http_port and forward HTTP requests). | |
007d775d AR |
9218 | DOC_END |
9219 | ||
96c2bb61 AR |
9220 | NAME: cpu_affinity_map |
9221 | TYPE: CpuAffinityMap | |
9222 | LOC: Config.cpuAffinityMap | |
9223 | DEFAULT: none | |
638402dd | 9224 | DEFAULT_DOC: Let operating system decide. |
96c2bb61 AR |
9225 | DOC_START |
9226 | Usage: cpu_affinity_map process_numbers=P1,P2,... cores=C1,C2,... | |
9227 | ||
9228 | Sets 1:1 mapping between Squid processes and CPU cores. For example, | |
9229 | ||
9230 | cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7 | |
9231 | ||
9232 | affects processes 1 through 4 only and places them on the first | |
9233 | four even cores, starting with core #1. | |
9234 | ||
9235 | CPU cores are numbered starting from 1. Requires support for | |
9236 | sched_getaffinity(2) and sched_setaffinity(2) system calls. | |
9237 | ||
9238 | Multiple cpu_affinity_map options are merged. | |
9239 | ||
9240 | See also: workers | |
9241 | DOC_END | |
9242 | ||
cccac0a2 | 9243 | EOF |