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