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