]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | # | |
3 | # $Id: cf.data.pre,v 1.485 2007/10/31 10:34:36 amosjeffries Exp $ | |
4 | # | |
5 | # SQUID Web Proxy Cache http://www.squid-cache.org/ | |
6 | # ---------------------------------------------------------- | |
7 | # | |
8 | # Squid is the result of efforts by numerous individuals from | |
9 | # the Internet community; see the CONTRIBUTORS file for full | |
10 | # details. Many organizations have provided support for Squid's | |
11 | # development; see the SPONSORS file for full details. Squid is | |
12 | # Copyrighted (C) 2000 by the Regents of the University of | |
13 | # California; see the COPYRIGHT file for full details. Squid | |
14 | # incorporates software developed and/or copyrighted by other | |
15 | # sources; see the CREDITS file for full details. | |
16 | # | |
17 | # This program is free software; you can redistribute it and/or modify | |
18 | # it under the terms of the GNU General Public License as published by | |
19 | # the Free Software Foundation; either version 2 of the License, or | |
20 | # (at your option) any later version. | |
21 | # | |
22 | # This program is distributed in the hope that it will be useful, | |
23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | # GNU General Public License for more details. | |
26 | # | |
27 | # You should have received a copy of the GNU General Public License | |
28 | # along with this program; if not, write to the Free Software | |
29 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. | |
30 | # | |
31 | ||
32 | COMMENT_START | |
33 | WELCOME TO SQUID @VERSION@ | |
34 | ---------------------------- | |
35 | ||
36 | This is the default Squid configuration file. You may wish | |
37 | to look at the Squid home page (http://www.squid-cache.org/) | |
38 | for the FAQ and other documentation. | |
39 | ||
40 | The default Squid config file shows what the defaults for | |
41 | various options happen to be. If you don't need to change the | |
42 | default, you shouldn't uncomment the line. Doing so may cause | |
43 | run-time problems. In some cases "none" refers to no default | |
44 | setting at all, while in other cases it refers to a valid | |
45 | option - the comments for that keyword indicate if this is the | |
46 | case. | |
47 | ||
48 | COMMENT_END | |
49 | ||
50 | COMMENT_START | |
51 | OPTIONS FOR AUTHENTICATION | |
52 | ----------------------------------------------------------------------------- | |
53 | COMMENT_END | |
54 | ||
55 | NAME: auth_param | |
56 | TYPE: authparam | |
57 | LOC: Config.authConfiguration | |
58 | DEFAULT: none | |
59 | DOC_START | |
60 | This is used to define parameters for the various authentication | |
61 | schemes supported by Squid. | |
62 | ||
63 | format: auth_param scheme parameter [setting] | |
64 | ||
65 | The order in which authentication schemes are presented to the client is | |
66 | dependent on the order the scheme first appears in config file. IE | |
67 | has a bug (it's not RFC 2617 compliant) in that it will use the basic | |
68 | scheme if basic is the first entry presented, even if more secure | |
69 | schemes are presented. For now use the order in the recommended | |
70 | settings section below. If other browsers have difficulties (don't | |
71 | recognize the schemes offered even if you are using basic) either | |
72 | put basic first, or disable the other schemes (by commenting out their | |
73 | program entry). | |
74 | ||
75 | Once an authentication scheme is fully configured, it can only be | |
76 | shutdown by shutting squid down and restarting. Changes can be made on | |
77 | the fly and activated with a reconfigure. I.E. You can change to a | |
78 | different helper, but not unconfigure the helper completely. | |
79 | ||
80 | Please note that while this directive defines how Squid processes | |
81 | authentication it does not automatically activate authentication. | |
82 | To use authentication you must in addition make use of ACLs based | |
83 | on login name in http_access (proxy_auth, proxy_auth_regex or | |
84 | external with %LOGIN used in the format tag). The browser will be | |
85 | challenged for authentication on the first such acl encountered | |
86 | in http_access processing and will also be re-challenged for new | |
87 | login credentials if the request is being denied by a proxy_auth | |
88 | type acl. | |
89 | ||
90 | WARNING: authentication can't be used in a transparently intercepting | |
91 | proxy as the client then thinks it is talking to an origin server and | |
92 | not the proxy. This is a limitation of bending the TCP/IP protocol to | |
93 | transparently intercepting port 80, not a limitation in Squid. | |
94 | ||
95 | === Parameters for the basic scheme follow. === | |
96 | ||
97 | "program" cmdline | |
98 | Specify the command for the external authenticator. Such a program | |
99 | reads a line containing "username password" and replies "OK" or | |
100 | "ERR" in an endless loop. "ERR" responses may optionally be followed | |
101 | by a error description available as %m in the returned error page. | |
102 | If you use an authenticator, make sure you have 1 acl of type proxy_auth. | |
103 | ||
104 | By default, the basic authentication scheme is not used unless a | |
105 | program is specified. | |
106 | ||
107 | If you want to use the traditional NCSA proxy authentication, set | |
108 | this line to something like | |
109 | ||
110 | auth_param basic program @DEFAULT_PREFIX@/libexec/ncsa_auth @DEFAULT_PREFIX@/etc/passwd | |
111 | ||
112 | "children" numberofchildren | |
113 | The number of authenticator processes to spawn. If you start too few | |
114 | Squid will have to wait for them to process a backlog of credential | |
115 | verifications, slowing it down. When password verifications are | |
116 | done via a (slow) network you are likely to need lots of | |
117 | authenticator processes. | |
118 | auth_param basic children 5 | |
119 | ||
120 | "concurrency" concurrency | |
121 | The number of concurrent requests the helper can process. | |
122 | The default of 0 is used for helpers who only supports | |
123 | one request at a time. Setting this changes the protocol used to | |
124 | include a channel number first on the request/response line, allowing | |
125 | multiple requests to be sent to the same helper in parallell without | |
126 | wating for the response. | |
127 | Must not be set unless it's known the helper supports this. | |
128 | auth_param basic concurrency 0 | |
129 | ||
130 | "realm" realmstring | |
131 | Specifies the realm name which is to be reported to the | |
132 | client for the basic proxy authentication scheme (part of | |
133 | the text the user will see when prompted their username and | |
134 | password). There is no default. | |
135 | auth_param basic realm Squid proxy-caching web server | |
136 | ||
137 | "credentialsttl" timetolive | |
138 | Specifies how long squid assumes an externally validated | |
139 | username:password pair is valid for - in other words how | |
140 | often the helper program is called for that user. Set this | |
141 | low to force revalidation with short lived passwords. Note | |
142 | setting this high does not impact your susceptibility | |
143 | to replay attacks unless you are using an one-time password | |
144 | system (such as SecureID). If you are using such a system, | |
145 | you will be vulnerable to replay attacks unless you also | |
146 | use the max_user_ip ACL in an http_access rule. | |
147 | ||
148 | "casesensitive" on|off | |
149 | Specifies if usernames are case sensitive. Most user databases are | |
150 | case insensitive allowing the same username to be spelled using both | |
151 | lower and upper case letters, but some are case sensitive. This | |
152 | makes a big difference for user_max_ip ACL processing and similar. | |
153 | auth_param basic casesensitive off | |
154 | ||
155 | === Parameters for the digest scheme follow === | |
156 | ||
157 | "program" cmdline | |
158 | Specify the command for the external authenticator. Such | |
159 | a program reads a line containing "username":"realm" and | |
160 | replies with the appropriate H(A1) value hex encoded or | |
161 | ERR if the user (or his H(A1) hash) does not exists. | |
162 | See rfc 2616 for the definition of H(A1). | |
163 | "ERR" responses may optionally be followed by a error description | |
164 | available as %m in the returned error page. | |
165 | ||
166 | By default, the digest authentication scheme is not used unless a | |
167 | program is specified. | |
168 | ||
169 | If you want to use a digest authenticator, set this line to | |
170 | something like | |
171 | ||
172 | auth_param digest program @DEFAULT_PREFIX@/bin/digest_auth_pw @DEFAULT_PREFIX@/etc/digpass | |
173 | ||
174 | "children" numberofchildren | |
175 | The number of authenticator processes to spawn (no default). | |
176 | If you start too few Squid will have to wait for them to | |
177 | process a backlog of H(A1) calculations, slowing it down. | |
178 | When the H(A1) calculations are done via a (slow) network | |
179 | you are likely to need lots of authenticator processes. | |
180 | auth_param digest children 5 | |
181 | ||
182 | "realm" realmstring | |
183 | Specifies the realm name which is to be reported to the | |
184 | client for the digest proxy authentication scheme (part of | |
185 | the text the user will see when prompted their username and | |
186 | password). There is no default. | |
187 | auth_param digest realm Squid proxy-caching web server | |
188 | ||
189 | "nonce_garbage_interval" timeinterval | |
190 | Specifies the interval that nonces that have been issued | |
191 | to client_agent's are checked for validity. | |
192 | ||
193 | "nonce_max_duration" timeinterval | |
194 | Specifies the maximum length of time a given nonce will be | |
195 | valid for. | |
196 | ||
197 | "nonce_max_count" number | |
198 | Specifies the maximum number of times a given nonce can be | |
199 | used. | |
200 | ||
201 | "nonce_strictness" on|off | |
202 | Determines if squid requires strict increment-by-1 behavior | |
203 | for nonce counts, or just incrementing (off - for use when | |
204 | useragents generate nonce counts that occasionally miss 1 | |
205 | (ie, 1,2,4,6)). Default off. | |
206 | ||
207 | "check_nonce_count" on|off | |
208 | This directive if set to off can disable the nonce count check | |
209 | completely to work around buggy digest qop implementations in | |
210 | certain mainstream browser versions. Default on to check the | |
211 | nonce count to protect from authentication replay attacks. | |
212 | ||
213 | "post_workaround" on|off | |
214 | This is a workaround to certain buggy browsers who sends | |
215 | an incorrect request digest in POST requests when reusing | |
216 | the same nonce as acquired earlier on a GET request. | |
217 | ||
218 | === NTLM scheme options follow === | |
219 | ||
220 | "program" cmdline | |
221 | Specify the command for the external NTLM authenticator. | |
222 | Such a program reads exchanged NTLMSSP packets with | |
223 | the browser via Squid until authentication is completed. | |
224 | If you use an NTLM authenticator, make sure you have 1 acl | |
225 | of type proxy_auth. By default, the NTLM authenticator_program | |
226 | is not used. | |
227 | ||
228 | auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth | |
229 | ||
230 | "children" numberofchildren | |
231 | The number of authenticator processes to spawn (no default). | |
232 | If you start too few Squid will have to wait for them to | |
233 | process a backlog of credential verifications, slowing it | |
234 | down. When credential verifications are done via a (slow) | |
235 | network you are likely to need lots of authenticator | |
236 | processes. | |
237 | ||
238 | auth_param ntlm children 5 | |
239 | ||
240 | "keep_alive" on|off | |
241 | If you experience problems with PUT/POST requests when using the | |
242 | Negotiate authentication scheme then you can try setting this to | |
243 | off. This will cause Squid to forcibly close the connection on | |
244 | the initial requests where the browser asks which schemes are | |
245 | supported by the proxy. | |
246 | ||
247 | auth_param ntlm keep_alive on | |
248 | ||
249 | === Options for configuring the NEGOTIATE auth-scheme follow === | |
250 | ||
251 | "program" cmdline | |
252 | Specify the command for the external Negotiate authenticator. | |
253 | This protocol is used in Microsoft Active-Directory enabled setups with | |
254 | the Microsoft Internet Explorer or Mozilla Firefox browsers. | |
255 | Its main purpose is to exchange credentials with the Squid proxy | |
256 | using the Kerberos mechanisms. | |
257 | If you use a Negotiate authenticator, make sure you have at least one acl | |
258 | of type proxy_auth active. By default, the negotiate authenticator_program | |
259 | is not used. | |
260 | The only supported program for this role is the ntlm_auth | |
261 | program distributed as part of Samba, version 4 or later. | |
262 | ||
263 | auth_param negotiate program @DEFAULT_PREFIX@/bin/ntlm_auth --helper-protocol=gss-spnego | |
264 | ||
265 | "children" numberofchildren | |
266 | The number of authenticator processes to spawn (no default). | |
267 | If you start too few Squid will have to wait for them to | |
268 | process a backlog of credential verifications, slowing it | |
269 | down. When crendential verifications are done via a (slow) | |
270 | network you are likely to need lots of authenticator | |
271 | processes. | |
272 | auth_param negotiate children 5 | |
273 | ||
274 | "keep_alive" on|off | |
275 | If you experience problems with PUT/POST requests when using the | |
276 | Negotiate authentication scheme then you can try setting this to | |
277 | off. This will cause Squid to forcibly close the connection on | |
278 | the initial requests where the browser asks which schemes are | |
279 | supported by the proxy. | |
280 | ||
281 | auth_param negotiate keep_alive on | |
282 | ||
283 | NOCOMMENT_START | |
284 | #Recommended minimum configuration per scheme: | |
285 | #auth_param negotiate program <uncomment and complete this line to activate> | |
286 | #auth_param negotiate children 5 | |
287 | #auth_param negotiate keep_alive on | |
288 | #auth_param ntlm program <uncomment and complete this line to activate> | |
289 | #auth_param ntlm children 5 | |
290 | #auth_param ntlm keep_alive on | |
291 | #auth_param digest program <uncomment and complete this line> | |
292 | #auth_param digest children 5 | |
293 | #auth_param digest realm Squid proxy-caching web server | |
294 | #auth_param digest nonce_garbage_interval 5 minutes | |
295 | #auth_param digest nonce_max_duration 30 minutes | |
296 | #auth_param digest nonce_max_count 50 | |
297 | #auth_param basic program <uncomment and complete this line> | |
298 | #auth_param basic children 5 | |
299 | #auth_param basic realm Squid proxy-caching web server | |
300 | #auth_param basic credentialsttl 2 hours | |
301 | NOCOMMENT_END | |
302 | DOC_END | |
303 | ||
304 | NAME: authenticate_cache_garbage_interval | |
305 | TYPE: time_t | |
306 | DEFAULT: 1 hour | |
307 | LOC: Config.authenticateGCInterval | |
308 | DOC_START | |
309 | The time period between garbage collection across the username cache. | |
310 | This is a tradeoff between memory utilization (long intervals - say | |
311 | 2 days) and CPU (short intervals - say 1 minute). Only change if you | |
312 | have good reason to. | |
313 | DOC_END | |
314 | ||
315 | NAME: authenticate_ttl | |
316 | TYPE: time_t | |
317 | DEFAULT: 1 hour | |
318 | LOC: Config.authenticateTTL | |
319 | DOC_START | |
320 | The time a user & their credentials stay in the logged in | |
321 | user cache since their last request. When the garbage | |
322 | interval passes, all user credentials that have passed their | |
323 | TTL are removed from memory. | |
324 | DOC_END | |
325 | ||
326 | NAME: authenticate_ip_ttl | |
327 | TYPE: time_t | |
328 | LOC: Config.authenticateIpTTL | |
329 | DEFAULT: 0 seconds | |
330 | DOC_START | |
331 | If you use proxy authentication and the 'max_user_ip' ACL, | |
332 | this directive controls how long Squid remembers the IP | |
333 | addresses associated with each user. Use a small value | |
334 | (e.g., 60 seconds) if your users might change addresses | |
335 | quickly, as is the case with dialups. You might be safe | |
336 | using a larger value (e.g., 2 hours) in a corporate LAN | |
337 | environment with relatively static address assignments. | |
338 | DOC_END | |
339 | ||
340 | COMMENT_START | |
341 | ACCESS CONTROLS | |
342 | ----------------------------------------------------------------------------- | |
343 | COMMENT_END | |
344 | ||
345 | NAME: external_acl_type | |
346 | TYPE: externalAclHelper | |
347 | LOC: Config.externalAclHelperList | |
348 | DEFAULT: none | |
349 | DOC_START | |
350 | This option defines external acl classes using a helper program | |
351 | to look up the status | |
352 | ||
353 | external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..] | |
354 | ||
355 | Options: | |
356 | ||
357 | ttl=n TTL in seconds for cached results (defaults to 3600 | |
358 | for 1 hour) | |
359 | negative_ttl=n | |
360 | TTL for cached negative lookups (default same | |
361 | as ttl) | |
362 | children=n Number of acl helper processes spawn to service | |
363 | external acl lookups of this type. (default 5) | |
364 | concurrency=n concurrency level per process. Only used with helpers | |
365 | capable of processing more than one query at a time. | |
366 | cache=n result cache size, 0 is unbounded (default) | |
367 | grace=n Percentage remaining of TTL where a refresh of a | |
368 | cached entry should be initiated without needing to | |
369 | wait for a new reply. (default 0 for no grace period) | |
370 | protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers | |
371 | ||
372 | FORMAT specifications | |
373 | ||
374 | %LOGIN Authenticated user login name | |
375 | %EXT_USER Username from external acl | |
376 | %IDENT Ident user name | |
377 | %SRC Client IP | |
378 | %SRCPORT Client source port | |
379 | %URI Requested URI | |
380 | %DST Requested host | |
381 | %PROTO Requested protocol | |
382 | %PORT Requested port | |
383 | %PATH Requested URL path | |
384 | %METHOD Request method | |
385 | %MYADDR Squid interface address | |
386 | %MYPORT Squid http_port number | |
387 | %PATH Requested URL-path (including query-string if any) | |
388 | %USER_CERT SSL User certificate in PEM format | |
389 | %USER_CERTCHAIN SSL User certificate chain in PEM format | |
390 | %USER_CERT_xx SSL User certificate subject attribute xx | |
391 | %USER_CA_xx SSL User certificate issuer attribute xx | |
392 | %{Header} HTTP request header | |
393 | %{Hdr:member} HTTP request header list member | |
394 | %{Hdr:;member} | |
395 | HTTP request header list member using ; as | |
396 | list separator. ; can be any non-alphanumeric | |
397 | character. | |
398 | ||
399 | In addition to the above, any string specified in the referencing | |
400 | acl will also be included in the helper request line, after the | |
401 | specified formats (see the "acl external" directive) | |
402 | ||
403 | The helper receives lines per the above format specification, | |
404 | and returns lines starting with OK or ERR indicating the validity | |
405 | of the request and optionally followed by additional keywords with | |
406 | more details. | |
407 | ||
408 | General result syntax: | |
409 | ||
410 | OK/ERR keyword=value ... | |
411 | ||
412 | Defined keywords: | |
413 | ||
414 | user= The users name (login) | |
415 | password= The users password (for login= cache_peer option) | |
416 | message= Message describing the reason. Available as %o | |
417 | in error pages | |
418 | tag= Apply a tag to a request (for both ERR and OK results) | |
419 | Only sets a tag, does not alter existing tags. | |
420 | log= String to be logged in access.log. Available as | |
421 | %ea in logformat specifications | |
422 | ||
423 | If protocol=3.0 (the default) then URL escaping is used to protect | |
424 | each value in both requests and responses. | |
425 | ||
426 | If using protocol=2.5 then all values need to be enclosed in quotes | |
427 | if they may contain whitespace, or the whitespace escaped using \. | |
428 | And quotes or \ characters within the keyword value must be \ escaped. | |
429 | ||
430 | When using the concurrency= option the protocol is changed by | |
431 | introducing a query channel tag infront of the request/response. | |
432 | The query channel tag is a number between 0 and concurrency-1. | |
433 | DOC_END | |
434 | ||
435 | NAME: acl | |
436 | TYPE: acl | |
437 | LOC: Config.aclList | |
438 | DEFAULT: all src all | |
439 | DOC_START | |
440 | Defining an Access List | |
441 | ||
442 | acl aclname acltype string1 ... | |
443 | acl aclname acltype "file" ... | |
444 | ||
445 | when using "file", the file should contain one item per line | |
446 | ||
447 | acltype is one of the types described below | |
448 | ||
449 | By default, regular expressions are CASE-SENSITIVE. To make | |
450 | them case-insensitive, use the -i option. | |
451 | ||
452 | acl aclname src ip-address/netmask ... (clients IP address) | |
453 | acl aclname src addr1-addr2/netmask ... (range of addresses) | |
454 | acl aclname dst ip-address/netmask ... (URL host's IP address) | |
455 | acl aclname myip ip-address/netmask ... (local socket IP address) | |
456 | ||
457 | acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation) | |
458 | # The arp ACL requires the special configure option --enable-arp-acl. | |
459 | # Furthermore, the ARP ACL code is not portable to all operating systems. | |
460 | # It works on Linux, Solaris, Windows, FreeBSD, and some other *BSD variants. | |
461 | # | |
462 | # NOTE: Squid can only determine the MAC address for clients that are on | |
463 | # the same subnet. If the client is on a different subnet, then Squid cannot | |
464 | # find out its MAC address. | |
465 | ||
466 | acl aclname srcdomain .foo.com ... # reverse lookup, client IP | |
467 | acl aclname dstdomain .foo.com ... # Destination server from URL | |
468 | acl aclname srcdom_regex [-i] xxx ... # regex matching client name | |
469 | acl aclname dstdom_regex [-i] xxx ... # regex matching server | |
470 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP | |
471 | # based URL is used and no match is found. The name "none" is used | |
472 | # if the reverse lookup fails. | |
473 | ||
474 | acl aclname http_status 200 301 500- 400-403 ... # status code in reply | |
475 | ||
476 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] | |
477 | day-abbrevs: | |
478 | S - Sunday | |
479 | M - Monday | |
480 | T - Tuesday | |
481 | W - Wednesday | |
482 | H - Thursday | |
483 | F - Friday | |
484 | A - Saturday | |
485 | h1:m1 must be less than h2:m2 | |
486 | acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL | |
487 | acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path | |
488 | acl aclname port 80 70 21 ... | |
489 | acl aclname port 0-1024 ... # ranges allowed | |
490 | acl aclname myport 3128 ... # (local socket TCP port) | |
491 | acl aclname proto HTTP FTP ... | |
492 | acl aclname method GET POST ... | |
493 | acl aclname browser [-i] regexp ... | |
494 | # pattern match on User-Agent header (see also req_header below) | |
495 | acl aclname referer_regex [-i] regexp ... | |
496 | # pattern match on Referer header | |
497 | # Referer is highly unreliable, so use with care | |
498 | acl aclname ident username ... | |
499 | acl aclname ident_regex [-i] pattern ... | |
500 | # string match on ident output. | |
501 | # use REQUIRED to accept any non-null ident. | |
502 | acl aclname src_as number ... | |
503 | acl aclname dst_as number ... | |
504 | # Except for access control, AS numbers can be used for | |
505 | # routing of requests to specific caches. Here's an | |
506 | # example for routing all requests for AS#1241 and only | |
507 | # those to mycache.mydomain.net: | |
508 | # acl asexample dst_as 1241 | |
509 | # cache_peer_access mycache.mydomain.net allow asexample | |
510 | # cache_peer_access mycache_mydomain.net deny all | |
511 | ||
512 | acl aclname proxy_auth [-i] username ... | |
513 | acl aclname proxy_auth_regex [-i] pattern ... | |
514 | # list of valid usernames | |
515 | # use REQUIRED to accept any valid username. | |
516 | # | |
517 | # NOTE: when a Proxy-Authentication header is sent but it is not | |
518 | # needed during ACL checking the username is NOT logged | |
519 | # in access.log. | |
520 | # | |
521 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
522 | # to check username/password combinations (see | |
523 | # auth_param directive). | |
524 | # | |
525 | # NOTE: proxy_auth can't be used in a transparent proxy as | |
526 | # the browser needs to be configured for using a proxy in order | |
527 | # to respond to proxy authentication. | |
528 | ||
529 | acl aclname snmp_community string ... | |
530 | # A community string to limit access to your SNMP Agent | |
531 | # Example: | |
532 | # | |
533 | # acl snmppublic snmp_community public | |
534 | ||
535 | acl aclname maxconn number | |
536 | # This will be matched when the client's IP address has | |
537 | # more than <number> HTTP connections established. | |
538 | ||
539 | acl aclname max_user_ip [-s] number | |
540 | # This will be matched when the user attempts to log in from more | |
541 | # than <number> different ip addresses. The authenticate_ip_ttl | |
542 | # parameter controls the timeout on the ip entries. | |
543 | # If -s is specified the limit is strict, denying browsing | |
544 | # from any further IP addresses until the ttl has expired. Without | |
545 | # -s Squid will just annoy the user by "randomly" denying requests. | |
546 | # (the counter is reset each time the limit is reached and a | |
547 | # request is denied) | |
548 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
549 | # clients may appear to come from multiple addresses if they are | |
550 | # going through proxy farms, so a limit of 1 may cause user problems. | |
551 | ||
552 | acl aclname req_mime_type mime-type1 ... | |
553 | # regex match against the mime type of the request generated | |
554 | # by the client. Can be used to detect file upload or some | |
555 | # types HTTP tunneling requests. | |
556 | # NOTE: This does NOT match the reply. You cannot use this | |
557 | # to match the returned file type. | |
558 | ||
559 | acl aclname req_header header-name [-i] any\.regex\.here | |
560 | # regex match against any of the known request headers. May be | |
561 | # thought of as a superset of "browser", "referer" and "mime-type" | |
562 | # ACLs. | |
563 | ||
564 | acl aclname rep_mime_type mime-type1 ... | |
565 | # regex match against the mime type of the reply received by | |
566 | # squid. Can be used to detect file download or some | |
567 | # types HTTP tunneling requests. | |
568 | # NOTE: This has no effect in http_access rules. It only has | |
569 | # effect in rules that affect the reply data stream such as | |
570 | # http_reply_access. | |
571 | ||
572 | acl aclname rep_header header-name [-i] any\.regex\.here | |
573 | # regex match against any of the known reply headers. May be | |
574 | # thought of as a superset of "browser", "referer" and "mime-type" | |
575 | # ACLs. | |
576 | ||
577 | acl acl_name external class_name [arguments...] | |
578 | # external ACL lookup via a helper class defined by the | |
579 | # external_acl_type directive. | |
580 | ||
581 | acl aclname user_cert attribute values... | |
582 | # match against attributes in a user SSL certificate | |
583 | # attribute is one of DN/C/O/CN/L/ST | |
584 | ||
585 | acl aclname ca_cert attribute values... | |
586 | # match against attributes a users issuing CA SSL certificate | |
587 | # attribute is one of DN/C/O/CN/L/ST | |
588 | ||
589 | acl aclname ext_user username ... | |
590 | acl aclname ext_user_regex [-i] pattern ... | |
591 | # string match on username returned by external acl helper | |
592 | # use REQUIRED to accept any non-null user name. | |
593 | ||
594 | Examples: | |
595 | acl macaddress arp 09:00:2b:23:45:67 | |
596 | acl myexample dst_as 1241 | |
597 | acl password proxy_auth REQUIRED | |
598 | acl fileupload req_mime_type -i ^multipart/form-data$ | |
599 | acl javascript rep_mime_type -i ^application/x-javascript$ | |
600 | ||
601 | NOCOMMENT_START | |
602 | #Recommended minimum configuration: | |
603 | acl manager proto cache_object | |
604 | acl localhost src 127.0.0.1/32 | |
605 | acl to_localhost dst 127.0.0.0/8 | |
606 | # | |
607 | # Example rule allowing access from your local networks. | |
608 | # Adapt to list your (internal) IP networks from where browsing | |
609 | # should be allowed | |
610 | acl localnet src 10.0.0.0/8 # RFC1918 possible internal network | |
611 | acl localnet src 172.16.0.0/12 # RFC1918 possible internal network | |
612 | acl localnet src 192.168.0.0/16 # RFC1918 possible internal network | |
613 | # | |
614 | acl SSL_ports port 443 | |
615 | acl Safe_ports port 80 # http | |
616 | acl Safe_ports port 21 # ftp | |
617 | acl Safe_ports port 443 # https | |
618 | acl Safe_ports port 70 # gopher | |
619 | acl Safe_ports port 210 # wais | |
620 | acl Safe_ports port 1025-65535 # unregistered ports | |
621 | acl Safe_ports port 280 # http-mgmt | |
622 | acl Safe_ports port 488 # gss-http | |
623 | acl Safe_ports port 591 # filemaker | |
624 | acl Safe_ports port 777 # multiling http | |
625 | acl CONNECT method CONNECT | |
626 | NOCOMMENT_END | |
627 | DOC_END | |
628 | ||
629 | NAME: http_access | |
630 | TYPE: acl_access | |
631 | LOC: Config.accessList.http | |
632 | DEFAULT: none | |
633 | DEFAULT_IF_NONE: deny all | |
634 | DOC_START | |
635 | Allowing or Denying access based on defined access lists | |
636 | ||
637 | Access to the HTTP port: | |
638 | http_access allow|deny [!]aclname ... | |
639 | ||
640 | NOTE on default values: | |
641 | ||
642 | If there are no "access" lines present, the default is to deny | |
643 | the request. | |
644 | ||
645 | If none of the "access" lines cause a match, the default is the | |
646 | opposite of the last line in the list. If the last line was | |
647 | deny, the default is allow. Conversely, if the last line | |
648 | is allow, the default will be deny. For these reasons, it is a | |
649 | good idea to have an "deny all" or "allow all" entry at the end | |
650 | of your access lists to avoid potential confusion. | |
651 | ||
652 | NOCOMMENT_START | |
653 | #Recommended minimum configuration: | |
654 | # | |
655 | # Only allow cachemgr access from localhost | |
656 | http_access allow manager localhost | |
657 | http_access deny manager | |
658 | # Deny requests to unknown ports | |
659 | http_access deny !Safe_ports | |
660 | # Deny CONNECT to other than SSL ports | |
661 | http_access deny CONNECT !SSL_ports | |
662 | # | |
663 | # We strongly recommend the following be uncommented to protect innocent | |
664 | # web applications running on the proxy server who think the only | |
665 | # one who can access services on "localhost" is a local user | |
666 | #http_access deny to_localhost | |
667 | # | |
668 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS | |
669 | ||
670 | # Example rule allowing access from your local networks. | |
671 | # Adapt localnet in the ACL section to list your (internal) IP networks | |
672 | # from where browsing should be allowed | |
673 | http_access allow localnet | |
674 | ||
675 | # And finally deny all other access to this proxy | |
676 | http_access deny all | |
677 | NOCOMMENT_END | |
678 | DOC_END | |
679 | ||
680 | NAME: http_reply_access | |
681 | TYPE: acl_access | |
682 | LOC: Config.accessList.reply | |
683 | DEFAULT: none | |
684 | DOC_START | |
685 | Allow replies to client requests. This is complementary to http_access. | |
686 | ||
687 | http_reply_access allow|deny [!] aclname ... | |
688 | ||
689 | NOTE: if there are no access lines present, the default is to allow | |
690 | all replies | |
691 | ||
692 | If none of the access lines cause a match the opposite of the | |
693 | last line will apply. Thus it is good practice to end the rules | |
694 | with an "allow all" or "deny all" entry. | |
695 | DOC_END | |
696 | ||
697 | NAME: icp_access | |
698 | TYPE: acl_access | |
699 | LOC: Config.accessList.icp | |
700 | DEFAULT: none | |
701 | DEFAULT_IF_NONE: deny all | |
702 | DOC_START | |
703 | Allowing or Denying access to the ICP port based on defined | |
704 | access lists | |
705 | ||
706 | icp_access allow|deny [!]aclname ... | |
707 | ||
708 | See http_access for details | |
709 | ||
710 | NOCOMMENT_START | |
711 | #Allow ICP queries from local networks only | |
712 | icp_access allow localnet | |
713 | icp_access deny all | |
714 | NOCOMMENT_END | |
715 | DOC_END | |
716 | ||
717 | NAME: htcp_access | |
718 | IFDEF: USE_HTCP | |
719 | TYPE: acl_access | |
720 | LOC: Config.accessList.htcp | |
721 | DEFAULT: none | |
722 | DEFAULT_IF_NONE: deny all | |
723 | DOC_START | |
724 | Allowing or Denying access to the HTCP port based on defined | |
725 | access lists | |
726 | ||
727 | htcp_access allow|deny [!]aclname ... | |
728 | ||
729 | See http_access for details | |
730 | ||
731 | NOTE: The default if no htcp_access lines are present is to | |
732 | deny all traffic. This default may cause problems with peers | |
733 | using the htcp or htcp-oldsquid options. | |
734 | ||
735 | NOCOMMENT_START | |
736 | #Allow HTCP queries from local networks only | |
737 | htcp_access allow localnet | |
738 | htcp_access deny all | |
739 | NOCOMMENT_END | |
740 | DOC_END | |
741 | ||
742 | NAME: htcp_clr_access | |
743 | IFDEF: USE_HTCP | |
744 | TYPE: acl_access | |
745 | LOC: Config.accessList.htcp_clr | |
746 | DEFAULT: none | |
747 | DEFAULT_IF_NONE: deny all | |
748 | DOC_START | |
749 | Allowing or Denying access to purge content using HTCP based | |
750 | on defined access lists | |
751 | ||
752 | htcp_clr_access allow|deny [!]aclname ... | |
753 | ||
754 | See http_access for details | |
755 | ||
756 | #Allow HTCP CLR requests from trusted peers | |
757 | acl htcp_clr_peer src 172.16.1.2 | |
758 | htcp_clr_access allow htcp_clr_peer | |
759 | DOC_END | |
760 | ||
761 | NAME: miss_access | |
762 | TYPE: acl_access | |
763 | LOC: Config.accessList.miss | |
764 | DEFAULT: none | |
765 | DOC_START | |
766 | Use to force your neighbors to use you as a sibling instead of | |
767 | a parent. For example: | |
768 | ||
769 | acl localclients src 172.16.0.0/16 | |
770 | miss_access allow localclients | |
771 | miss_access deny !localclients | |
772 | ||
773 | This means only your local clients are allowed to fetch | |
774 | MISSES and all other clients can only fetch HITS. | |
775 | ||
776 | By default, allow all clients who passed the http_access rules | |
777 | to fetch MISSES from us. | |
778 | ||
779 | NOCOMMENT_START | |
780 | #Default setting: | |
781 | # miss_access allow all | |
782 | NOCOMMENT_END | |
783 | DOC_END | |
784 | ||
785 | NAME: ident_lookup_access | |
786 | TYPE: acl_access | |
787 | IFDEF: USE_IDENT | |
788 | DEFAULT: none | |
789 | DEFAULT_IF_NONE: deny all | |
790 | LOC: Config.accessList.identLookup | |
791 | DOC_START | |
792 | A list of ACL elements which, if matched, cause an ident | |
793 | (RFC 931) lookup to be performed for this request. For | |
794 | example, you might choose to always perform ident lookups | |
795 | for your main multi-user Unix boxes, but not for your Macs | |
796 | and PCs. By default, ident lookups are not performed for | |
797 | any requests. | |
798 | ||
799 | To enable ident lookups for specific client addresses, you | |
800 | can follow this example: | |
801 | ||
802 | acl ident_aware_hosts src 198.168.1.0/255.255.255.0 | |
803 | ident_lookup_access allow ident_aware_hosts | |
804 | ident_lookup_access deny all | |
805 | ||
806 | Only src type ACL checks are fully supported. A src_domain | |
807 | ACL might work at times, but it will not always provide | |
808 | the correct result. | |
809 | DOC_END | |
810 | ||
811 | NAME: reply_body_max_size | |
812 | COMMENT: size [acl acl...] | |
813 | TYPE: acl_b_size_t | |
814 | DEFAULT: none | |
815 | LOC: Config.ReplyBodySize | |
816 | DOC_START | |
817 | This option specifies the maximum size of a reply body. It can be | |
818 | used to prevent users from downloading very large files, such as | |
819 | MP3's and movies. When the reply headers are received, the | |
820 | reply_body_max_size lines are processed, and the first line where | |
821 | all (if any) listed ACLs are true is used as the maximum body size | |
822 | for this reply. | |
823 | ||
824 | This size is checked twice. First when we get the reply headers, | |
825 | we check the content-length value. If the content length value exists | |
826 | and is larger than the allowed size, the request is denied and the | |
827 | user receives an error message that says "the request or reply | |
828 | is too large." If there is no content-length, and the reply | |
829 | size exceeds this limit, the client's connection is just closed | |
830 | and they will receive a partial reply. | |
831 | ||
832 | WARNING: downstream caches probably can not detect a partial reply | |
833 | if there is no content-length header, so they will cache | |
834 | partial responses and give them out as hits. You should NOT | |
835 | use this option if you have downstream caches. | |
836 | ||
837 | WARNING: A maximum size smaller than the size of squid's error messages | |
838 | will cause an infinite loop and crash squid. Ensure that the smallest | |
839 | non-zero value you use is greater that the maximum header size plus | |
840 | the size of your largest error page. | |
841 | ||
842 | If you set this parameter none (the default), there will be | |
843 | no limit imposed. | |
844 | DOC_END | |
845 | ||
846 | COMMENT_START | |
847 | NETWORK OPTIONS | |
848 | ----------------------------------------------------------------------------- | |
849 | COMMENT_END | |
850 | ||
851 | NAME: http_port ascii_port | |
852 | TYPE: http_port_list | |
853 | DEFAULT: none | |
854 | LOC: Config.Sockaddr.http | |
855 | DOC_START | |
856 | Usage: port [options] | |
857 | hostname:port [options] | |
858 | 1.2.3.4:port [options] | |
859 | ||
860 | The socket addresses where Squid will listen for HTTP client | |
861 | requests. You may specify multiple socket addresses. | |
862 | There are three forms: port alone, hostname with port, and | |
863 | IP address with port. If you specify a hostname or IP | |
864 | address, Squid binds the socket to that specific | |
865 | address. This replaces the old 'tcp_incoming_address' | |
866 | option. Most likely, you do not need to bind to a specific | |
867 | address, so you can use the port number alone. | |
868 | ||
869 | If you are running Squid in accelerator mode, you | |
870 | probably want to listen on port 80 also, or instead. | |
871 | ||
872 | The -a command line option may be used to specify additional | |
873 | port(s) where Squid listens for proxy request. Such ports will | |
874 | be plain proxy ports with no options. | |
875 | ||
876 | You may specify multiple socket addresses on multiple lines. | |
877 | ||
878 | Options: | |
879 | ||
880 | transparent Support for transparent interception of | |
881 | outgoing requests without browser settings. | |
882 | ||
883 | tproxy Support Linux TPROXY for spoofing outgoing | |
884 | connections using the client IP address. | |
885 | ||
886 | accel Accelerator mode. Also needs at least one of | |
887 | vhost / vport / defaultsite. | |
888 | ||
889 | defaultsite=domainname | |
890 | What to use for the Host: header if it is not present | |
891 | in a request. Determines what site (not origin server) | |
892 | accelerators should consider the default. | |
893 | Implies accel. | |
894 | ||
895 | vhost Accelerator mode using Host header for virtual | |
896 | domain support. Implies accel. | |
897 | ||
898 | vport Accelerator with IP based virtual host support. | |
899 | Implies accel. | |
900 | ||
901 | vport=NN As above, but uses specified port number rather | |
902 | than the http_port number. Implies accel. | |
903 | ||
904 | protocol= Protocol to reconstruct accelerated requests with. | |
905 | Defaults to http. | |
906 | ||
907 | disable-pmtu-discovery= | |
908 | Control Path-MTU discovery usage: | |
909 | off lets OS decide on what to do (default). | |
910 | transparent disable PMTU discovery when transparent | |
911 | support is enabled. | |
912 | always disable always PMTU discovery. | |
913 | ||
914 | In many setups of transparently intercepting proxies | |
915 | Path-MTU discovery can not work on traffic towards the | |
916 | clients. This is the case when the intercepting device | |
917 | does not fully track connections and fails to forward | |
918 | ICMP must fragment messages to the cache server. If you | |
919 | have such setup and experience that certain clients | |
920 | sporadically hang or never complete requests set | |
921 | disable-pmtu-discovery option to 'transparent'. | |
922 | ||
923 | If you run Squid on a dual-homed machine with an internal | |
924 | and an external interface we recommend you to specify the | |
925 | internal address:port in http_port. This way Squid will only be | |
926 | visible on the internal address. | |
927 | ||
928 | NOCOMMENT_START | |
929 | # Squid normally listens to port 3128 | |
930 | http_port @DEFAULT_HTTP_PORT@ | |
931 | NOCOMMENT_END | |
932 | DOC_END | |
933 | ||
934 | NAME: https_port | |
935 | IFDEF: USE_SSL | |
936 | TYPE: https_port_list | |
937 | DEFAULT: none | |
938 | LOC: Config.Sockaddr.https | |
939 | DOC_START | |
940 | Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...] | |
941 | ||
942 | The socket address where Squid will listen for HTTPS client | |
943 | requests. | |
944 | ||
945 | This is really only useful for situations where you are running | |
946 | squid in accelerator mode and you want to do the SSL work at the | |
947 | accelerator level. | |
948 | ||
949 | You may specify multiple socket addresses on multiple lines, | |
950 | each with their own SSL certificate and/or options. | |
951 | ||
952 | Options: | |
953 | ||
954 | accel Accelerator mode. Also needs at least one of | |
955 | defaultsite or vhost. | |
956 | ||
957 | defaultsite= The name of the https site presented on | |
958 | this port. Implies accel. | |
959 | ||
960 | vhost Accelerator mode using Host header for virtual | |
961 | domain support. Requires a wildcard certificate | |
962 | or other certificate valid for more than one domain. | |
963 | Implies accel. | |
964 | ||
965 | protocol= Protocol to reconstruct accelerated requests with. | |
966 | Defaults to https. | |
967 | ||
968 | cert= Path to SSL certificate (PEM format). | |
969 | ||
970 | key= Path to SSL private key file (PEM format) | |
971 | if not specified, the certificate file is | |
972 | assumed to be a combined certificate and | |
973 | key file. | |
974 | ||
975 | version= The version of SSL/TLS supported | |
976 | 1 automatic (default) | |
977 | 2 SSLv2 only | |
978 | 3 SSLv3 only | |
979 | 4 TLSv1 only | |
980 | ||
981 | cipher= Colon separated list of supported ciphers. | |
982 | ||
983 | options= Various SSL engine options. The most important | |
984 | being: | |
985 | NO_SSLv2 Disallow the use of SSLv2 | |
986 | NO_SSLv3 Disallow the use of SSLv3 | |
987 | NO_TLSv1 Disallow the use of TLSv1 | |
988 | SINGLE_DH_USE Always create a new key when using | |
989 | temporary/ephemeral DH key exchanges | |
990 | See src/ssl_support.c or OpenSSL SSL_CTX_set_options | |
991 | documentation for a complete list of options. | |
992 | ||
993 | clientca= File containing the list of CAs to use when | |
994 | requesting a client certificate. | |
995 | ||
996 | cafile= File containing additional CA certificates to | |
997 | use when verifying client certificates. If unset | |
998 | clientca will be used. | |
999 | ||
1000 | capath= Directory containing additional CA certificates | |
1001 | and CRL lists to use when verifying client certificates. | |
1002 | ||
1003 | crlfile= File of additional CRL lists to use when verifying | |
1004 | the client certificate, in addition to CRLs stored in | |
1005 | the capath. Implies VERIFY_CRL flag below. | |
1006 | ||
1007 | dhparams= File containing DH parameters for temporary/ephemeral | |
1008 | DH key exchanges. | |
1009 | ||
1010 | sslflags= Various flags modifying the use of SSL: | |
1011 | DELAYED_AUTH | |
1012 | Don't request client certificates | |
1013 | immediately, but wait until acl processing | |
1014 | requires a certificate (not yet implemented). | |
1015 | NO_DEFAULT_CA | |
1016 | Don't use the default CA lists built in | |
1017 | to OpenSSL. | |
1018 | NO_SESSION_REUSE | |
1019 | Don't allow for session reuse. Each connection | |
1020 | will result in a new SSL session. | |
1021 | VERIFY_CRL | |
1022 | Verify CRL lists when accepting client | |
1023 | certificates. | |
1024 | VERIFY_CRL_ALL | |
1025 | Verify CRL lists for all certificates in the | |
1026 | client certificate chain. | |
1027 | ||
1028 | sslcontext= SSL session ID context identifier. | |
1029 | ||
1030 | vport Accelerator with IP based virtual host support. | |
1031 | ||
1032 | vport=NN As above, but uses specified port number rather | |
1033 | than the https_port number. Implies accel. | |
1034 | ||
1035 | DOC_END | |
1036 | ||
1037 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp | |
1038 | TYPE: acl_tos | |
1039 | DEFAULT: none | |
1040 | LOC: Config.accessList.outgoing_tos | |
1041 | DOC_START | |
1042 | Allows you to select a TOS/Diffserv value to mark outgoing | |
1043 | connections with, based on the username or source address | |
1044 | making the request. | |
1045 | ||
1046 | tcp_outgoing_tos ds-field [!]aclname ... | |
1047 | ||
1048 | Example where normal_service_net uses the TOS value 0x00 | |
1049 | and normal_service_net uses 0x20 | |
1050 | ||
1051 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
1052 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
1053 | tcp_outgoing_tos 0x00 normal_service_net | |
1054 | tcp_outgoing_tos 0x20 good_service_net | |
1055 | ||
1056 | TOS/DSCP values really only have local significance - so you should | |
1057 | know what you're specifying. For more information, see RFC2474 and | |
1058 | RFC3260. | |
1059 | ||
1060 | The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or | |
1061 | "default" to use whatever default your host has. Note that in | |
1062 | practice often only values 0 - 63 is usable as the two highest bits | |
1063 | have been redefined for use by ECN (RFC3168). | |
1064 | ||
1065 | Processing proceeds in the order specified, and stops at first fully | |
1066 | matching line. | |
1067 | ||
1068 | Note: The use of this directive using client dependent ACLs is | |
1069 | incompatible with the use of server side persistent connections. To | |
1070 | ensure correct results it is best to set server_persisten_connections | |
1071 | to off when using this directive in such configurations. | |
1072 | DOC_END | |
1073 | ||
1074 | NAME: clientside_tos | |
1075 | TYPE: acl_tos | |
1076 | DEFAULT: none | |
1077 | LOC: Config.accessList.clientside_tos | |
1078 | DOC_START | |
1079 | Allows you to select a TOS/Diffserv value to mark client-side | |
1080 | connections with, based on the username or source address | |
1081 | making the request. | |
1082 | DOC_END | |
1083 | ||
1084 | NAME: tcp_outgoing_address | |
1085 | TYPE: acl_address | |
1086 | DEFAULT: none | |
1087 | LOC: Config.accessList.outgoing_address | |
1088 | DOC_START | |
1089 | Allows you to map requests to different outgoing IP addresses | |
1090 | based on the username or source address of the user making | |
1091 | the request. | |
1092 | ||
1093 | tcp_outgoing_address ipaddr [[!]aclname] ... | |
1094 | ||
1095 | Example where requests from 10.0.0.0/24 will be forwarded | |
1096 | with source address 10.1.0.1, 10.0.2.0/24 forwarded with | |
1097 | source address 10.1.0.2 and the rest will be forwarded with | |
1098 | source address 10.1.0.3. | |
1099 | ||
1100 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
1101 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
1102 | tcp_outgoing_address 10.0.0.1 normal_service_net | |
1103 | tcp_outgoing_address 10.0.0.2 good_service_net | |
1104 | tcp_outgoing_address 10.0.0.3 | |
1105 | ||
1106 | Processing proceeds in the order specified, and stops at first fully | |
1107 | matching line. | |
1108 | ||
1109 | Note: The use of this directive using client dependent ACLs is | |
1110 | incompatible with the use of server side persistent connections. To | |
1111 | ensure correct results it is best to set server_persistent_connections | |
1112 | to off when using this directive in such configurations. | |
1113 | DOC_END | |
1114 | ||
1115 | COMMENT_START | |
1116 | SSL OPTIONS | |
1117 | ----------------------------------------------------------------------------- | |
1118 | COMMENT_END | |
1119 | ||
1120 | NAME: ssl_unclean_shutdown | |
1121 | IFDEF: USE_SSL | |
1122 | TYPE: onoff | |
1123 | DEFAULT: off | |
1124 | LOC: Config.SSL.unclean_shutdown | |
1125 | DOC_START | |
1126 | Some browsers (especially MSIE) bugs out on SSL shutdown | |
1127 | messages. | |
1128 | DOC_END | |
1129 | ||
1130 | NAME: ssl_engine | |
1131 | IFDEF: USE_SSL | |
1132 | TYPE: string | |
1133 | LOC: Config.SSL.ssl_engine | |
1134 | DEFAULT: none | |
1135 | DOC_START | |
1136 | The OpenSSL engine to use. You will need to set this if you | |
1137 | would like to use hardware SSL acceleration for example. | |
1138 | DOC_END | |
1139 | ||
1140 | NAME: sslproxy_client_certificate | |
1141 | IFDEF: USE_SSL | |
1142 | DEFAULT: none | |
1143 | LOC: Config.ssl_client.cert | |
1144 | TYPE: string | |
1145 | DOC_START | |
1146 | Client SSL Certificate to use when proxying https:// URLs | |
1147 | DOC_END | |
1148 | ||
1149 | NAME: sslproxy_client_key | |
1150 | IFDEF: USE_SSL | |
1151 | DEFAULT: none | |
1152 | LOC: Config.ssl_client.key | |
1153 | TYPE: string | |
1154 | DOC_START | |
1155 | Client SSL Key to use when proxying https:// URLs | |
1156 | DOC_END | |
1157 | ||
1158 | NAME: sslproxy_version | |
1159 | IFDEF: USE_SSL | |
1160 | DEFAULT: 1 | |
1161 | LOC: Config.ssl_client.version | |
1162 | TYPE: int | |
1163 | DOC_START | |
1164 | SSL version level to use when proxying https:// URLs | |
1165 | DOC_END | |
1166 | ||
1167 | NAME: sslproxy_options | |
1168 | IFDEF: USE_SSL | |
1169 | DEFAULT: none | |
1170 | LOC: Config.ssl_client.options | |
1171 | TYPE: string | |
1172 | DOC_START | |
1173 | SSL engine options to use when proxying https:// URLs | |
1174 | DOC_END | |
1175 | ||
1176 | NAME: sslproxy_cipher | |
1177 | IFDEF: USE_SSL | |
1178 | DEFAULT: none | |
1179 | LOC: Config.ssl_client.cipher | |
1180 | TYPE: string | |
1181 | DOC_START | |
1182 | SSL cipher list to use when proxying https:// URLs | |
1183 | DOC_END | |
1184 | ||
1185 | NAME: sslproxy_cafile | |
1186 | IFDEF: USE_SSL | |
1187 | DEFAULT: none | |
1188 | LOC: Config.ssl_client.cafile | |
1189 | TYPE: string | |
1190 | DOC_START | |
1191 | file containing CA certificates to use when verifying server | |
1192 | certificates while proxying https:// URLs | |
1193 | DOC_END | |
1194 | ||
1195 | NAME: sslproxy_capath | |
1196 | IFDEF: USE_SSL | |
1197 | DEFAULT: none | |
1198 | LOC: Config.ssl_client.capath | |
1199 | TYPE: string | |
1200 | DOC_START | |
1201 | directory containing CA certificates to use when verifying | |
1202 | server certificates while proxying https:// URLs | |
1203 | DOC_END | |
1204 | ||
1205 | NAME: sslproxy_flags | |
1206 | IFDEF: USE_SSL | |
1207 | DEFAULT: none | |
1208 | LOC: Config.ssl_client.flags | |
1209 | TYPE: string | |
1210 | DOC_START | |
1211 | Various flags modifying the use of SSL while proxying https:// URLs: | |
1212 | DONT_VERIFY_PEER Accept certificates even if they fail to | |
1213 | verify. | |
1214 | NO_DEFAULT_CA Don't use the default CA list built in | |
1215 | to OpenSSL. | |
1216 | DOC_END | |
1217 | ||
1218 | NAME: sslpassword_program | |
1219 | IFDEF: USE_SSL | |
1220 | DEFAULT: none | |
1221 | LOC: Config.Program.ssl_password | |
1222 | TYPE: string | |
1223 | DOC_START | |
1224 | Specify a program used for entering SSL key passphrases | |
1225 | when using encrypted SSL certificate keys. If not specified | |
1226 | keys must either be unencrypted, or Squid started with the -N | |
1227 | option to allow it to query interactively for the passphrase. | |
1228 | DOC_END | |
1229 | ||
1230 | COMMENT_START | |
1231 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM | |
1232 | ----------------------------------------------------------------------------- | |
1233 | COMMENT_END | |
1234 | ||
1235 | NAME: cache_peer | |
1236 | TYPE: peer | |
1237 | DEFAULT: none | |
1238 | LOC: Config.peers | |
1239 | DOC_START | |
1240 | To specify other caches in a hierarchy, use the format: | |
1241 | ||
1242 | cache_peer hostname type http-port icp-port [options] | |
1243 | ||
1244 | For example, | |
1245 | ||
1246 | # proxy icp | |
1247 | # hostname type port port options | |
1248 | # -------------------- -------- ----- ----- ----------- | |
1249 | cache_peer parent.foo.net parent 3128 3130 proxy-only default | |
1250 | cache_peer sib1.foo.net sibling 3128 3130 proxy-only | |
1251 | cache_peer sib2.foo.net sibling 3128 3130 proxy-only | |
1252 | ||
1253 | type: either 'parent', 'sibling', or 'multicast'. | |
1254 | ||
1255 | proxy-port: The port number where the cache listens for proxy | |
1256 | requests. | |
1257 | ||
1258 | icp-port: Used for querying neighbor caches about | |
1259 | objects. To have a non-ICP neighbor | |
1260 | specify '7' for the ICP port and make sure the | |
1261 | neighbor machine has the UDP echo port | |
1262 | enabled in its /etc/inetd.conf file. | |
1263 | NOTE: Also requires icp_port option enabled to send/receive | |
1264 | requests via this method. | |
1265 | ||
1266 | options: proxy-only | |
1267 | weight=n | |
1268 | basetime=n | |
1269 | ttl=n | |
1270 | no-query | |
1271 | background-ping | |
1272 | default | |
1273 | round-robin | |
1274 | weighted-round-robin | |
1275 | carp | |
1276 | multicast-responder | |
1277 | closest-only | |
1278 | no-digest | |
1279 | no-netdb-exchange | |
1280 | no-delay | |
1281 | login=user:password | PASS | *:password | |
1282 | connect-timeout=nn | |
1283 | digest-url=url | |
1284 | allow-miss | |
1285 | max-conn=n | |
1286 | htcp | |
1287 | htcp-oldsquid | |
1288 | originserver | |
1289 | name=xxx | |
1290 | forceddomain=name | |
1291 | ssl | |
1292 | sslcert=/path/to/ssl/certificate | |
1293 | sslkey=/path/to/ssl/key | |
1294 | sslversion=1|2|3|4 | |
1295 | sslcipher=... | |
1296 | ssloptions=... | |
1297 | front-end-https[=on|auto] | |
1298 | ||
1299 | use 'proxy-only' to specify objects fetched | |
1300 | from this cache should not be saved locally. | |
1301 | ||
1302 | use 'weight=n' to affect the selection of a peer | |
1303 | during any weighted peer-selection mechanisms. | |
1304 | The weight must be an integer; default is 1, | |
1305 | larger weights are favored more. | |
1306 | This option does not affect parent selection if a peering | |
1307 | protocol is not in use. | |
1308 | ||
1309 | use 'basetime=n' to specify a base amount to | |
1310 | be subtracted from round trip times of parents. | |
1311 | It is subtracted before division by weight in calculating | |
1312 | which parent to fectch from. If the rtt is less than the | |
1313 | base time the rtt is set to a minimal value. | |
1314 | ||
1315 | use 'ttl=n' to specify a IP multicast TTL to use | |
1316 | when sending an ICP queries to this address. | |
1317 | Only useful when sending to a multicast group. | |
1318 | Because we don't accept ICP replies from random | |
1319 | hosts, you must configure other group members as | |
1320 | peers with the 'multicast-responder' option below. | |
1321 | ||
1322 | use 'no-query' to NOT send ICP queries to this | |
1323 | neighbor. | |
1324 | ||
1325 | use 'background-ping' to only send ICP queries to this | |
1326 | neighbor infrequently. This is used to keep the neighbor | |
1327 | round trip time updated and is usually used in | |
1328 | conjunction with weighted-round-robin. | |
1329 | ||
1330 | use 'default' if this is a parent cache which can | |
1331 | be used as a "last-resort" if a peer cannot be located | |
1332 | by any of the peer-selection mechanisms. | |
1333 | If specified more than once, only the first is used. | |
1334 | ||
1335 | use 'round-robin' to define a set of parents which | |
1336 | should be used in a round-robin fashion in the | |
1337 | absence of any ICP queries. | |
1338 | ||
1339 | use 'weighted-round-robin' to define a set of parents | |
1340 | which should be used in a round-robin fashion with the | |
1341 | frequency of each parent being based on the round trip | |
1342 | time. Closer parents are used more often. | |
1343 | Usually used for background-ping parents. | |
1344 | ||
1345 | use 'carp' to define a set of parents which should | |
1346 | be used as a CARP array. The requests will be | |
1347 | distributed among the parents based on the CARP load | |
1348 | balancing hash function based on their weight. | |
1349 | ||
1350 | 'multicast-responder' indicates the named peer | |
1351 | is a member of a multicast group. ICP queries will | |
1352 | not be sent directly to the peer, but ICP replies | |
1353 | will be accepted from it. | |
1354 | ||
1355 | 'closest-only' indicates that, for ICP_OP_MISS | |
1356 | replies, we'll only forward CLOSEST_PARENT_MISSes | |
1357 | and never FIRST_PARENT_MISSes. | |
1358 | ||
1359 | use 'no-digest' to NOT request cache digests from | |
1360 | this neighbor. | |
1361 | ||
1362 | 'no-netdb-exchange' disables requesting ICMP | |
1363 | RTT database (NetDB) from the neighbor. | |
1364 | ||
1365 | use 'no-delay' to prevent access to this neighbor | |
1366 | from influencing the delay pools. | |
1367 | ||
1368 | use 'login=user:password' if this is a personal/workgroup | |
1369 | proxy and your parent requires proxy authentication. | |
1370 | Note: The string can include URL escapes (i.e. %20 for | |
1371 | spaces). This also means % must be written as %%. | |
1372 | ||
1373 | use 'login=PASS' if users must authenticate against | |
1374 | the upstream proxy or in the case of a reverse proxy | |
1375 | configuration, the origin web server. This will pass | |
1376 | the users credentials as they are to the peer. | |
1377 | This only works for the Basic HTTP authentication scheme. | |
1378 | Note: To combine this with proxy_auth both proxies must | |
1379 | share the same user database as HTTP only allows for | |
1380 | a single login (one for proxy, one for origin server). | |
1381 | Also be warned this will expose your users proxy | |
1382 | password to the peer. USE WITH CAUTION | |
1383 | ||
1384 | use 'login=*:password' to pass the username to the | |
1385 | upstream cache, but with a fixed password. This is meant | |
1386 | to be used when the peer is in another administrative | |
1387 | domain, but it is still needed to identify each user. | |
1388 | The star can optionally be followed by some extra | |
1389 | information which is added to the username. This can | |
1390 | be used to identify this proxy to the peer, similar to | |
1391 | the login=username:password option above. | |
1392 | ||
1393 | use 'connect-timeout=nn' to specify a peer | |
1394 | specific connect timeout (also see the | |
1395 | peer_connect_timeout directive) | |
1396 | ||
1397 | use 'digest-url=url' to tell Squid to fetch the cache | |
1398 | digest (if digests are enabled) for this host from | |
1399 | the specified URL rather than the Squid default | |
1400 | location. | |
1401 | ||
1402 | use 'allow-miss' to disable Squid's use of only-if-cached | |
1403 | when forwarding requests to siblings. This is primarily | |
1404 | useful when icp_hit_stale is used by the sibling. To | |
1405 | extensive use of this option may result in forwarding | |
1406 | loops, and you should avoid having two-way peerings | |
1407 | with this option. (for example to deny peer usage on | |
1408 | requests from peer by denying cache_peer_access if the | |
1409 | source is a peer) | |
1410 | ||
1411 | use 'max-conn=n' to limit the amount of connections Squid | |
1412 | may open to this peer. | |
1413 | ||
1414 | use 'htcp' to send HTCP, instead of ICP, queries | |
1415 | to the neighbor. You probably also want to | |
1416 | set the "icp port" to 4827 instead of 3130. | |
1417 | You MUST also set htcp_access expicitly. The default of | |
1418 | deny all will prevent peer traffic. | |
1419 | ||
1420 | use 'htcp-oldsquid' to send HTCP to old Squid versions | |
1421 | You MUST also set htcp_access expicitly. The default of | |
1422 | deny all will prevent peer traffic. | |
1423 | ||
1424 | 'originserver' causes this parent peer to be contacted as | |
1425 | a origin server. Meant to be used in accelerator setups. | |
1426 | ||
1427 | use 'name=xxx' if you have multiple peers on the same | |
1428 | host but different ports. This name can be used to | |
1429 | differentiate the peers in cache_peer_access and similar | |
1430 | directives. | |
1431 | ||
1432 | use 'forceddomain=name' to forcibly set the Host header | |
1433 | of requests forwarded to this peer. Useful in accelerator | |
1434 | setups where the server (peer) expects a certain domain | |
1435 | name and using redirectors to feed this domain name | |
1436 | is not feasible. | |
1437 | ||
1438 | use 'ssl' to indicate connections to this peer should | |
1439 | be SSL/TLS encrypted. | |
1440 | ||
1441 | use 'sslcert=/path/to/ssl/certificate' to specify a client | |
1442 | SSL certificate to use when connecting to this peer. | |
1443 | ||
1444 | use 'sslkey=/path/to/ssl/key' to specify the private SSL | |
1445 | key corresponding to sslcert above. If 'sslkey' is not | |
1446 | specified 'sslcert' is assumed to reference a | |
1447 | combined file containing both the certificate and the key. | |
1448 | ||
1449 | use sslversion=1|2|3|4 to specify the SSL version to use | |
1450 | when connecting to this peer | |
1451 | 1 = automatic (default) | |
1452 | 2 = SSL v2 only | |
1453 | 3 = SSL v3 only | |
1454 | 4 = TLS v1 only | |
1455 | ||
1456 | use sslcipher=... to specify the list of valid SSL ciphers | |
1457 | to use when connecting to this peer. | |
1458 | ||
1459 | use ssloptions=... to specify various SSL engine options: | |
1460 | NO_SSLv2 Disallow the use of SSLv2 | |
1461 | NO_SSLv3 Disallow the use of SSLv3 | |
1462 | NO_TLSv1 Disallow the use of TLSv1 | |
1463 | See src/ssl_support.c or the OpenSSL documentation for | |
1464 | a more complete list. | |
1465 | ||
1466 | use sslcafile=... to specify a file containing | |
1467 | additional CA certificates to use when verifying the | |
1468 | peer certificate. | |
1469 | ||
1470 | use sslcapath=... to specify a directory containing | |
1471 | additional CA certificates to use when verifying the | |
1472 | peer certificate. | |
1473 | ||
1474 | use sslcrlfile=... to specify a certificate revocation | |
1475 | list file to use when verifying the peer certificate. | |
1476 | ||
1477 | use sslflags=... to specify various flags modifying the | |
1478 | SSL implementation: | |
1479 | DONT_VERIFY_PEER | |
1480 | Accept certificates even if they fail to | |
1481 | verify. | |
1482 | NO_DEFAULT_CA | |
1483 | Don't use the default CA list built in | |
1484 | to OpenSSL. | |
1485 | DONT_VERIFY_DOMAIN | |
1486 | Don't verify the peer certificate | |
1487 | matches the server name | |
1488 | ||
1489 | use ssldomain= to specify the peer name as advertised | |
1490 | in it's certificate. Used for verifying the correctness | |
1491 | of the received peer certificate. If not specified the | |
1492 | peer hostname will be used. | |
1493 | ||
1494 | use front-end-https to enable the "Front-End-Https: On" | |
1495 | header needed when using Squid as a SSL frontend in front | |
1496 | of Microsoft OWA. See MS KB document Q307347 for details | |
1497 | on this header. If set to auto the header will | |
1498 | only be added if the request is forwarded as a https:// | |
1499 | URL. | |
1500 | DOC_END | |
1501 | ||
1502 | NAME: cache_peer_domain cache_host_domain | |
1503 | TYPE: hostdomain | |
1504 | DEFAULT: none | |
1505 | LOC: none | |
1506 | DOC_START | |
1507 | Use to limit the domains for which a neighbor cache will be | |
1508 | queried. Usage: | |
1509 | ||
1510 | cache_peer_domain cache-host domain [domain ...] | |
1511 | cache_peer_domain cache-host !domain | |
1512 | ||
1513 | For example, specifying | |
1514 | ||
1515 | cache_peer_domain parent.foo.net .edu | |
1516 | ||
1517 | has the effect such that UDP query packets are sent to | |
1518 | 'bigserver' only when the requested object exists on a | |
1519 | server in the .edu domain. Prefixing the domainname | |
1520 | with '!' means the cache will be queried for objects | |
1521 | NOT in that domain. | |
1522 | ||
1523 | NOTE: * Any number of domains may be given for a cache-host, | |
1524 | either on the same or separate lines. | |
1525 | * When multiple domains are given for a particular | |
1526 | cache-host, the first matched domain is applied. | |
1527 | * Cache hosts with no domain restrictions are queried | |
1528 | for all requests. | |
1529 | * There are no defaults. | |
1530 | * There is also a 'cache_peer_access' tag in the ACL | |
1531 | section. | |
1532 | DOC_END | |
1533 | ||
1534 | NAME: cache_peer_access | |
1535 | TYPE: peer_access | |
1536 | DEFAULT: none | |
1537 | LOC: none | |
1538 | DOC_START | |
1539 | Similar to 'cache_peer_domain' but provides more flexibility by | |
1540 | using ACL elements. | |
1541 | ||
1542 | cache_peer_access cache-host allow|deny [!]aclname ... | |
1543 | ||
1544 | The syntax is identical to 'http_access' and the other lists of | |
1545 | ACL elements. See the comments for 'http_access' below, or | |
1546 | the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html). | |
1547 | DOC_END | |
1548 | ||
1549 | NAME: neighbor_type_domain | |
1550 | TYPE: hostdomaintype | |
1551 | DEFAULT: none | |
1552 | LOC: none | |
1553 | DOC_START | |
1554 | usage: neighbor_type_domain neighbor parent|sibling domain domain ... | |
1555 | ||
1556 | Modifying the neighbor type for specific domains is now | |
1557 | possible. You can treat some domains differently than the the | |
1558 | default neighbor type specified on the 'cache_peer' line. | |
1559 | Normally it should only be necessary to list domains which | |
1560 | should be treated differently because the default neighbor type | |
1561 | applies for hostnames which do not match domains listed here. | |
1562 | ||
1563 | EXAMPLE: | |
1564 | cache_peer cache.foo.org parent 3128 3130 | |
1565 | neighbor_type_domain cache.foo.org sibling .com .net | |
1566 | neighbor_type_domain cache.foo.org sibling .au .de | |
1567 | DOC_END | |
1568 | ||
1569 | NAME: dead_peer_timeout | |
1570 | COMMENT: (seconds) | |
1571 | DEFAULT: 10 seconds | |
1572 | TYPE: time_t | |
1573 | LOC: Config.Timeout.deadPeer | |
1574 | DOC_START | |
1575 | This controls how long Squid waits to declare a peer cache | |
1576 | as "dead." If there are no ICP replies received in this | |
1577 | amount of time, Squid will declare the peer dead and not | |
1578 | expect to receive any further ICP replies. However, it | |
1579 | continues to send ICP queries, and will mark the peer as | |
1580 | alive upon receipt of the first subsequent ICP reply. | |
1581 | ||
1582 | This timeout also affects when Squid expects to receive ICP | |
1583 | replies from peers. If more than 'dead_peer' seconds have | |
1584 | passed since the last ICP reply was received, Squid will not | |
1585 | expect to receive an ICP reply on the next query. Thus, if | |
1586 | your time between requests is greater than this timeout, you | |
1587 | will see a lot of requests sent DIRECT to origin servers | |
1588 | instead of to your parents. | |
1589 | DOC_END | |
1590 | ||
1591 | NAME: hierarchy_stoplist | |
1592 | TYPE: wordlist | |
1593 | DEFAULT: none | |
1594 | LOC: Config.hierarchy_stoplist | |
1595 | DOC_START | |
1596 | A list of words which, if found in a URL, cause the object to | |
1597 | be handled directly by this cache. In other words, use this | |
1598 | to not query neighbor caches for certain objects. You may | |
1599 | list this option multiple times. | |
1600 | Note: never_direct overrides this option. | |
1601 | NOCOMMENT_START | |
1602 | #We recommend you to use at least the following line. | |
1603 | hierarchy_stoplist cgi-bin ? | |
1604 | NOCOMMENT_END | |
1605 | DOC_END | |
1606 | ||
1607 | COMMENT_START | |
1608 | MEMORY CACHE OPTIONS | |
1609 | ----------------------------------------------------------------------------- | |
1610 | COMMENT_END | |
1611 | ||
1612 | NAME: cache_mem | |
1613 | COMMENT: (bytes) | |
1614 | TYPE: b_size_t | |
1615 | DEFAULT: 8 MB | |
1616 | LOC: Config.memMaxSize | |
1617 | DOC_START | |
1618 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. | |
1619 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
1620 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
1621 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
1622 | ||
1623 | 'cache_mem' specifies the ideal amount of memory to be used | |
1624 | for: | |
1625 | * In-Transit objects | |
1626 | * Hot Objects | |
1627 | * Negative-Cached objects | |
1628 | ||
1629 | Data for these objects are stored in 4 KB blocks. This | |
1630 | parameter specifies the ideal upper limit on the total size of | |
1631 | 4 KB blocks allocated. In-Transit objects take the highest | |
1632 | priority. | |
1633 | ||
1634 | In-transit objects have priority over the others. When | |
1635 | additional space is needed for incoming data, negative-cached | |
1636 | and hot objects will be released. In other words, the | |
1637 | negative-cached and hot objects will fill up any unused space | |
1638 | not needed for in-transit objects. | |
1639 | ||
1640 | If circumstances require, this limit will be exceeded. | |
1641 | Specifically, if your incoming request rate requires more than | |
1642 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
1643 | exceed this limit to satisfy the new requests. When the load | |
1644 | decreases, blocks will be freed until the high-water mark is | |
1645 | reached. Thereafter, blocks will be used to store hot | |
1646 | objects. | |
1647 | DOC_END | |
1648 | ||
1649 | NAME: maximum_object_size_in_memory | |
1650 | COMMENT: (bytes) | |
1651 | TYPE: b_size_t | |
1652 | DEFAULT: 8 KB | |
1653 | LOC: Config.Store.maxInMemObjSize | |
1654 | DOC_START | |
1655 | Objects greater than this size will not be attempted to kept in | |
1656 | the memory cache. This should be set high enough to keep objects | |
1657 | accessed frequently in memory to improve performance whilst low | |
1658 | enough to keep larger objects from hoarding cache_mem. | |
1659 | DOC_END | |
1660 | ||
1661 | NAME: memory_replacement_policy | |
1662 | TYPE: removalpolicy | |
1663 | LOC: Config.memPolicy | |
1664 | DEFAULT: lru | |
1665 | DOC_START | |
1666 | The memory replacement policy parameter determines which | |
1667 | objects are purged from memory when memory space is needed. | |
1668 | ||
1669 | See cache_replacement_policy for details. | |
1670 | DOC_END | |
1671 | ||
1672 | COMMENT_START | |
1673 | DISK CACHE OPTIONS | |
1674 | ----------------------------------------------------------------------------- | |
1675 | COMMENT_END | |
1676 | ||
1677 | NAME: cache_replacement_policy | |
1678 | TYPE: removalpolicy | |
1679 | LOC: Config.replPolicy | |
1680 | DEFAULT: lru | |
1681 | DOC_START | |
1682 | The cache replacement policy parameter determines which | |
1683 | objects are evicted (replaced) when disk space is needed. | |
1684 | ||
1685 | lru : Squid's original list based LRU policy | |
1686 | heap GDSF : Greedy-Dual Size Frequency | |
1687 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
1688 | heap LRU : LRU policy implemented using a heap | |
1689 | ||
1690 | Applies to any cache_dir lines listed below this. | |
1691 | ||
1692 | The LRU policies keeps recently referenced objects. | |
1693 | ||
1694 | The heap GDSF policy optimizes object hit rate by keeping smaller | |
1695 | popular objects in cache so it has a better chance of getting a | |
1696 | hit. It achieves a lower byte hit rate than LFUDA though since | |
1697 | it evicts larger (possibly popular) objects. | |
1698 | ||
1699 | The heap LFUDA policy keeps popular objects in cache regardless of | |
1700 | their size and thus optimizes byte hit rate at the expense of | |
1701 | hit rate since one large, popular object will prevent many | |
1702 | smaller, slightly less popular objects from being cached. | |
1703 | ||
1704 | Both policies utilize a dynamic aging mechanism that prevents | |
1705 | cache pollution that can otherwise occur with frequency-based | |
1706 | replacement policies. | |
1707 | ||
1708 | NOTE: if using the LFUDA replacement policy you should increase | |
1709 | the value of maximum_object_size above its default of 4096 KB to | |
1710 | to maximize the potential byte hit rate improvement of LFUDA. | |
1711 | ||
1712 | For more information about the GDSF and LFUDA cache replacement | |
1713 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
1714 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
1715 | DOC_END | |
1716 | ||
1717 | NAME: cache_dir | |
1718 | TYPE: cachedir | |
1719 | DEFAULT: none | |
1720 | DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256 | |
1721 | LOC: Config.cacheSwap | |
1722 | DOC_START | |
1723 | Usage: | |
1724 | ||
1725 | cache_dir Type Directory-Name Fs-specific-data [options] | |
1726 | ||
1727 | You can specify multiple cache_dir lines to spread the | |
1728 | cache among different disk partitions. | |
1729 | ||
1730 | Type specifies the kind of storage system to use. Only "ufs" | |
1731 | is built by default. To enable any of the other storage systems | |
1732 | see the --enable-storeio configure option. | |
1733 | ||
1734 | 'Directory' is a top-level directory where cache swap | |
1735 | files will be stored. If you want to use an entire disk | |
1736 | for caching, this can be the mount-point directory. | |
1737 | The directory must exist and be writable by the Squid | |
1738 | process. Squid will NOT create this directory for you. | |
1739 | ||
1740 | The ufs store type: | |
1741 | ||
1742 | "ufs" is the old well-known Squid storage format that has always | |
1743 | been there. | |
1744 | ||
1745 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
1746 | ||
1747 | 'Mbytes' is the amount of disk space (MB) to use under this | |
1748 | directory. The default is 100 MB. Change this to suit your | |
1749 | configuration. Do NOT put the size of your disk drive here. | |
1750 | Instead, if you want Squid to use the entire disk drive, | |
1751 | subtract 20% and use that value. | |
1752 | ||
1753 | 'Level-1' is the number of first-level subdirectories which | |
1754 | will be created under the 'Directory'. The default is 16. | |
1755 | ||
1756 | 'Level-2' is the number of second-level subdirectories which | |
1757 | will be created under each first-level directory. The default | |
1758 | is 256. | |
1759 | ||
1760 | The aufs store type: | |
1761 | ||
1762 | "aufs" uses the same storage format as "ufs", utilizing | |
1763 | POSIX-threads to avoid blocking the main Squid process on | |
1764 | disk-I/O. This was formerly known in Squid as async-io. | |
1765 | ||
1766 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
1767 | ||
1768 | see argument descriptions under ufs above | |
1769 | ||
1770 | The diskd store type: | |
1771 | ||
1772 | "diskd" uses the same storage format as "ufs", utilizing a | |
1773 | separate process to avoid blocking the main Squid process on | |
1774 | disk-I/O. | |
1775 | ||
1776 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
1777 | ||
1778 | see argument descriptions under ufs above | |
1779 | ||
1780 | Q1 specifies the number of unacknowledged I/O requests when Squid | |
1781 | stops opening new files. If this many messages are in the queues, | |
1782 | Squid won't open new files. Default is 64 | |
1783 | ||
1784 | Q2 specifies the number of unacknowledged messages when Squid | |
1785 | starts blocking. If this many messages are in the queues, | |
1786 | Squid blocks until it receives some replies. Default is 72 | |
1787 | ||
1788 | When Q1 < Q2 (the default), the cache directory is optimized | |
1789 | for lower response time at the expense of a decrease in hit | |
1790 | ratio. If Q1 > Q2, the cache directory is optimized for | |
1791 | higher hit ratio at the expense of an increase in response | |
1792 | time. | |
1793 | ||
1794 | The coss store type: | |
1795 | ||
1796 | block-size=n defines the "block size" for COSS cache_dir's. | |
1797 | Squid uses file numbers as block numbers. Since file numbers | |
1798 | are limited to 24 bits, the block size determines the maximum | |
1799 | size of the COSS partition. The default is 512 bytes, which | |
1800 | leads to a maximum cache_dir size of 512<<24, or 8 GB. Note | |
1801 | you should not change the coss block size after Squid | |
1802 | has written some objects to the cache_dir. | |
1803 | ||
1804 | The coss file store has changed from 2.5. Now it uses a file | |
1805 | called 'stripe' in the directory names in the config - and | |
1806 | this will be created by squid -z. | |
1807 | ||
1808 | The null store type: | |
1809 | ||
1810 | no options are allowed or required | |
1811 | ||
1812 | Common options: | |
1813 | ||
1814 | no-store, no new objects should be stored to this cache_dir | |
1815 | ||
1816 | max-size=n, refers to the max object size this storedir supports. | |
1817 | It is used to initially choose the storedir to dump the object. | |
1818 | Note: To make optimal use of the max-size limits you should order | |
1819 | the cache_dir lines with the smallest max-size value first and the | |
1820 | ones with no max-size specification last. | |
1821 | ||
1822 | Note for coss, max-size must be less than COSS_MEMBUF_SZ, | |
1823 | which can be changed with the --with-coss-membuf-size=N configure | |
1824 | option. | |
1825 | DOC_END | |
1826 | ||
1827 | NAME: store_dir_select_algorithm | |
1828 | TYPE: string | |
1829 | LOC: Config.store_dir_select_algorithm | |
1830 | DEFAULT: least-load | |
1831 | DOC_START | |
1832 | Set this to 'round-robin' as an alternative. | |
1833 | DOC_END | |
1834 | ||
1835 | NAME: max_open_disk_fds | |
1836 | TYPE: int | |
1837 | LOC: Config.max_open_disk_fds | |
1838 | DEFAULT: 0 | |
1839 | DOC_START | |
1840 | To avoid having disk as the I/O bottleneck Squid can optionally | |
1841 | bypass the on-disk cache if more than this amount of disk file | |
1842 | descriptors are open. | |
1843 | ||
1844 | A value of 0 indicates no limit. | |
1845 | DOC_END | |
1846 | ||
1847 | NAME: minimum_object_size | |
1848 | COMMENT: (bytes) | |
1849 | TYPE: b_int64_t | |
1850 | DEFAULT: 0 KB | |
1851 | LOC: Config.Store.minObjectSize | |
1852 | DOC_START | |
1853 | Objects smaller than this size will NOT be saved on disk. The | |
1854 | value is specified in kilobytes, and the default is 0 KB, which | |
1855 | means there is no minimum. | |
1856 | DOC_END | |
1857 | ||
1858 | NAME: maximum_object_size | |
1859 | COMMENT: (bytes) | |
1860 | TYPE: b_int64_t | |
1861 | DEFAULT: 4096 KB | |
1862 | LOC: Config.Store.maxObjectSize | |
1863 | DOC_START | |
1864 | Objects larger than this size will NOT be saved on disk. The | |
1865 | value is specified in kilobytes, and the default is 4MB. If | |
1866 | you wish to get a high BYTES hit ratio, you should probably | |
1867 | increase this (one 32 MB object hit counts for 3200 10KB | |
1868 | hits). If you wish to increase speed more than your want to | |
1869 | save bandwidth you should leave this low. | |
1870 | ||
1871 | NOTE: if using the LFUDA replacement policy you should increase | |
1872 | this value to maximize the byte hit rate improvement of LFUDA! | |
1873 | See replacement_policy below for a discussion of this policy. | |
1874 | DOC_END | |
1875 | ||
1876 | NAME: cache_swap_low | |
1877 | COMMENT: (percent, 0-100) | |
1878 | TYPE: int | |
1879 | DEFAULT: 90 | |
1880 | LOC: Config.Swap.lowWaterMark | |
1881 | DOC_NONE | |
1882 | ||
1883 | NAME: cache_swap_high | |
1884 | COMMENT: (percent, 0-100) | |
1885 | TYPE: int | |
1886 | DEFAULT: 95 | |
1887 | LOC: Config.Swap.highWaterMark | |
1888 | DOC_START | |
1889 | ||
1890 | The low- and high-water marks for cache object replacement. | |
1891 | Replacement begins when the swap (disk) usage is above the | |
1892 | low-water mark and attempts to maintain utilization near the | |
1893 | low-water mark. As swap utilization gets close to high-water | |
1894 | mark object eviction becomes more aggressive. If utilization is | |
1895 | close to the low-water mark less replacement is done each time. | |
1896 | ||
1897 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
1898 | hundreds of MB. If this is the case you may wish to set these | |
1899 | numbers closer together. | |
1900 | DOC_END | |
1901 | ||
1902 | COMMENT_START | |
1903 | LOGFILE OPTIONS | |
1904 | ----------------------------------------------------------------------------- | |
1905 | COMMENT_END | |
1906 | ||
1907 | NAME: logformat | |
1908 | TYPE: logformat | |
1909 | LOC: Config.Log.logformats | |
1910 | DEFAULT: none | |
1911 | DOC_START | |
1912 | Usage: | |
1913 | ||
1914 | logformat <name> <format specification> | |
1915 | ||
1916 | Defines an access log format. | |
1917 | ||
1918 | The <format specification> is a string with embedded % format codes | |
1919 | ||
1920 | % format codes all follow the same basic structure where all but | |
1921 | the formatcode is optional. Output strings are automatically escaped | |
1922 | as required according to their context and the output format | |
1923 | modifiers are usually not needed, but can be specified if an explicit | |
1924 | output format is desired. | |
1925 | ||
1926 | % ["|[|'|#] [-] [[0]width] [{argument}] formatcode | |
1927 | ||
1928 | " output in quoted string format | |
1929 | [ output in squid text log format as used by log_mime_hdrs | |
1930 | # output in URL quoted format | |
1931 | ' output as-is | |
1932 | ||
1933 | - left aligned | |
1934 | width field width. If starting with 0 the | |
1935 | output is zero padded | |
1936 | {arg} argument such as header name etc | |
1937 | ||
1938 | Format codes: | |
1939 | ||
1940 | >a Client source IP address | |
1941 | >A Client FQDN | |
1942 | >p Client source port | |
1943 | <A Server IP address or peer name | |
1944 | la Local IP address (http_port) | |
1945 | lp Local port number (http_port) | |
1946 | ts Seconds since epoch | |
1947 | tu subsecond time (milliseconds) | |
1948 | tl Local time. Optional strftime format argument | |
1949 | default %d/%b/%Y:%H:%M:%S %z | |
1950 | tg GMT time. Optional strftime format argument | |
1951 | default %d/%b/%Y:%H:%M:%S %z | |
1952 | tr Response time (milliseconds) | |
1953 | >h Request header. Optional header name argument | |
1954 | on the format header[:[separator]element] | |
1955 | <h Reply header. Optional header name argument | |
1956 | as for >h | |
1957 | un User name | |
1958 | ul User name from authentication | |
1959 | ui User name from ident | |
1960 | us User name from SSL | |
1961 | ue User name from external acl helper | |
1962 | Hs HTTP status code | |
1963 | Ss Squid request status (TCP_MISS etc) | |
1964 | Sh Squid hierarchy status (DEFAULT_PARENT etc) | |
1965 | mt MIME content type | |
1966 | rm Request method (GET/POST etc) | |
1967 | ru Request URL | |
1968 | rp Request URL-Path excluding hostname | |
1969 | rv Request protocol version | |
1970 | et Tag returned by external acl | |
1971 | ea Log string returned by external acl | |
1972 | <st Reply size including HTTP headers | |
1973 | <sH Reply high offset sent | |
1974 | <sS Upstream object size | |
1975 | % a literal % character | |
1976 | ||
1977 | logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt | |
1978 | logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h] | |
1979 | logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh | |
1980 | logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh | |
1981 | DOC_END | |
1982 | ||
1983 | NAME: access_log cache_access_log | |
1984 | TYPE: access_log | |
1985 | LOC: Config.Log.accesslogs | |
1986 | DEFAULT: none | |
1987 | DOC_START | |
1988 | These files log client request activities. Has a line every HTTP or | |
1989 | ICP request. The format is: | |
1990 | access_log <filepath> [<logformat name> [acl acl ...]] | |
1991 | access_log none [acl acl ...]] | |
1992 | ||
1993 | Will log to the specified file using the specified format (which | |
1994 | must be defined in a logformat directive) those entries which match | |
1995 | ALL the acl's specified (which must be defined in acl clauses). | |
1996 | If no acl is specified, all requests will be logged to this file. | |
1997 | ||
1998 | To disable logging of a request use the filepath "none", in which case | |
1999 | a logformat name should not be specified. | |
2000 | ||
2001 | To log the request via syslog specify a filepath of "syslog": | |
2002 | ||
2003 | access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]] | |
2004 | where facility could be any of: | |
2005 | authpriv, daemon, local0 .. local7 or user. | |
2006 | ||
2007 | And priority could be any of: | |
2008 | err, warning, notice, info, debug. | |
2009 | NOCOMMENT_START | |
2010 | access_log @DEFAULT_ACCESS_LOG@ squid | |
2011 | NOCOMMENT_END | |
2012 | DOC_END | |
2013 | ||
2014 | NAME: log_access | |
2015 | TYPE: acl_access | |
2016 | LOC: Config.accessList.log | |
2017 | DEFAULT: none | |
2018 | COMMENT: allow|deny acl acl... | |
2019 | DOC_START | |
2020 | This options allows you to control which requests gets logged | |
2021 | to access.log (see access_log directive). Requests denied for | |
2022 | logging will also not be accounted for in performance counters. | |
2023 | DOC_END | |
2024 | ||
2025 | NAME: cache_log | |
2026 | TYPE: string | |
2027 | DEFAULT: @DEFAULT_CACHE_LOG@ | |
2028 | LOC: Config.Log.log | |
2029 | DOC_START | |
2030 | Cache logging file. This is where general information about | |
2031 | your cache's behavior goes. You can increase the amount of data | |
2032 | logged to this file with the "debug_options" tag below. | |
2033 | DOC_END | |
2034 | ||
2035 | NAME: cache_store_log | |
2036 | TYPE: string | |
2037 | DEFAULT: @DEFAULT_STORE_LOG@ | |
2038 | LOC: Config.Log.store | |
2039 | DOC_START | |
2040 | Logs the activities of the storage manager. Shows which | |
2041 | objects are ejected from the cache, and which objects are | |
2042 | saved and for how long. To disable, enter "none". There are | |
2043 | not really utilities to analyze this data, so you can safely | |
2044 | disable it. | |
2045 | DOC_END | |
2046 | ||
2047 | NAME: cache_swap_state cache_swap_log | |
2048 | TYPE: string | |
2049 | LOC: Config.Log.swap | |
2050 | DEFAULT: none | |
2051 | DOC_START | |
2052 | Location for the cache "swap.state" file. This index file holds | |
2053 | the metadata of objects saved on disk. It is used to rebuild | |
2054 | the cache during startup. Normally this file resides in each | |
2055 | 'cache_dir' directory, but you may specify an alternate | |
2056 | pathname here. Note you must give a full filename, not just | |
2057 | a directory. Since this is the index for the whole object | |
2058 | list you CANNOT periodically rotate it! | |
2059 | ||
2060 | If %s can be used in the file name it will be replaced with a | |
2061 | a representation of the cache_dir name where each / is replaced | |
2062 | with '.'. This is needed to allow adding/removing cache_dir | |
2063 | lines when cache_swap_log is being used. | |
2064 | ||
2065 | If have more than one 'cache_dir', and %s is not used in the name | |
2066 | these swap logs will have names such as: | |
2067 | ||
2068 | cache_swap_log.00 | |
2069 | cache_swap_log.01 | |
2070 | cache_swap_log.02 | |
2071 | ||
2072 | The numbered extension (which is added automatically) | |
2073 | corresponds to the order of the 'cache_dir' lines in this | |
2074 | configuration file. If you change the order of the 'cache_dir' | |
2075 | lines in this file, these index files will NOT correspond to | |
2076 | the correct 'cache_dir' entry (unless you manually rename | |
2077 | them). We recommend you do NOT use this option. It is | |
2078 | better to keep these index files in each 'cache_dir' directory. | |
2079 | DOC_END | |
2080 | ||
2081 | NAME: logfile_rotate | |
2082 | TYPE: int | |
2083 | DEFAULT: 10 | |
2084 | LOC: Config.Log.rotateNumber | |
2085 | DOC_START | |
2086 | Specifies the number of logfile rotations to make when you | |
2087 | type 'squid -k rotate'. The default is 10, which will rotate | |
2088 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
2089 | disable the file name rotation, but the logfiles are still closed | |
2090 | and re-opened. This will enable you to rename the logfiles | |
2091 | yourself just before sending the rotate signal. | |
2092 | ||
2093 | Note, the 'squid -k rotate' command normally sends a USR1 | |
2094 | signal to the running squid process. In certain situations | |
2095 | (e.g. on Linux with Async I/O), USR1 is used for other | |
2096 | purposes, so -k rotate uses another signal. It is best to get | |
2097 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
2098 | <pid>'. | |
2099 | DOC_END | |
2100 | ||
2101 | NAME: emulate_httpd_log | |
2102 | COMMENT: on|off | |
2103 | TYPE: onoff | |
2104 | DEFAULT: off | |
2105 | LOC: Config.onoff.common_log | |
2106 | DOC_START | |
2107 | The Cache can emulate the log file format which many 'httpd' | |
2108 | programs use. To disable/enable this emulation, set | |
2109 | emulate_httpd_log to 'off' or 'on'. The default | |
2110 | is to use the native log format since it includes useful | |
2111 | information Squid-specific log analyzers use. | |
2112 | DOC_END | |
2113 | ||
2114 | NAME: log_ip_on_direct | |
2115 | COMMENT: on|off | |
2116 | TYPE: onoff | |
2117 | DEFAULT: on | |
2118 | LOC: Config.onoff.log_ip_on_direct | |
2119 | DOC_START | |
2120 | Log the destination IP address in the hierarchy log tag when going | |
2121 | direct. Earlier Squid versions logged the hostname here. If you | |
2122 | prefer the old way set this to off. | |
2123 | DOC_END | |
2124 | ||
2125 | NAME: mime_table | |
2126 | TYPE: string | |
2127 | DEFAULT: @DEFAULT_MIME_TABLE@ | |
2128 | LOC: Config.mimeTablePathname | |
2129 | DOC_START | |
2130 | Pathname to Squid's MIME table. You shouldn't need to change | |
2131 | this, but the default file contains examples and formatting | |
2132 | information if you do. | |
2133 | DOC_END | |
2134 | ||
2135 | NAME: log_mime_hdrs | |
2136 | COMMENT: on|off | |
2137 | TYPE: onoff | |
2138 | LOC: Config.onoff.log_mime_hdrs | |
2139 | DEFAULT: off | |
2140 | DOC_START | |
2141 | The Cache can record both the request and the response MIME | |
2142 | headers for each HTTP transaction. The headers are encoded | |
2143 | safely and will appear as two bracketed fields at the end of | |
2144 | the access log (for either the native or httpd-emulated log | |
2145 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
2146 | DOC_END | |
2147 | ||
2148 | NAME: useragent_log | |
2149 | TYPE: string | |
2150 | LOC: Config.Log.useragent | |
2151 | DEFAULT: none | |
2152 | IFDEF: USE_USERAGENT_LOG | |
2153 | DOC_START | |
2154 | Squid will write the User-Agent field from HTTP requests | |
2155 | to the filename specified here. By default useragent_log | |
2156 | is disabled. | |
2157 | DOC_END | |
2158 | ||
2159 | NAME: referer_log referrer_log | |
2160 | TYPE: string | |
2161 | LOC: Config.Log.referer | |
2162 | DEFAULT: none | |
2163 | IFDEF: USE_REFERER_LOG | |
2164 | DOC_START | |
2165 | Squid will write the Referer field from HTTP requests to the | |
2166 | filename specified here. By default referer_log is disabled. | |
2167 | Note that "referer" is actually a misspelling of "referrer" | |
2168 | however the misspelt version has been accepted into the HTTP RFCs | |
2169 | and we accept both. | |
2170 | DOC_END | |
2171 | ||
2172 | NAME: pid_filename | |
2173 | TYPE: string | |
2174 | DEFAULT: @DEFAULT_PID_FILE@ | |
2175 | LOC: Config.pidFilename | |
2176 | DOC_START | |
2177 | A filename to write the process-id to. To disable, enter "none". | |
2178 | DOC_END | |
2179 | ||
2180 | NAME: debug_options | |
2181 | TYPE: debug | |
2182 | DEFAULT: ALL,1 | |
2183 | LOC: Config.debugOptions | |
2184 | DOC_START | |
2185 | Logging options are set as section,level where each source file | |
2186 | is assigned a unique section. Lower levels result in less | |
2187 | output, Full debugging (level 9) can result in a very large | |
2188 | log file, so be careful. The magic word "ALL" sets debugging | |
2189 | levels for all sections. We recommend normally running with | |
2190 | "ALL,1". | |
2191 | DOC_END | |
2192 | ||
2193 | NAME: log_fqdn | |
2194 | COMMENT: on|off | |
2195 | TYPE: onoff | |
2196 | DEFAULT: off | |
2197 | LOC: Config.onoff.log_fqdn | |
2198 | DOC_START | |
2199 | Turn this on if you wish to log fully qualified domain names | |
2200 | in the access.log. To do this Squid does a DNS lookup of all | |
2201 | IP's connecting to it. This can (in some situations) increase | |
2202 | latency, which makes your cache seem slower for interactive | |
2203 | browsing. | |
2204 | DOC_END | |
2205 | ||
2206 | NAME: client_netmask | |
2207 | TYPE: address | |
2208 | LOC: Config.Addrs.client_netmask | |
2209 | DEFAULT: 255.255.255.255 | |
2210 | DOC_START | |
2211 | A netmask for client addresses in logfiles and cachemgr output. | |
2212 | Change this to protect the privacy of your cache clients. | |
2213 | A netmask of 255.255.255.0 will log all IP's in that range with | |
2214 | the last digit set to '0'. | |
2215 | DOC_END | |
2216 | ||
2217 | NAME: forward_log | |
2218 | IFDEF: WIP_FWD_LOG | |
2219 | TYPE: string | |
2220 | DEFAULT: none | |
2221 | LOC: Config.Log.forward | |
2222 | DOC_START | |
2223 | Logs the server-side requests. | |
2224 | ||
2225 | This is currently work in progress. | |
2226 | DOC_END | |
2227 | ||
2228 | NAME: strip_query_terms | |
2229 | TYPE: onoff | |
2230 | LOC: Config.onoff.strip_query_terms | |
2231 | DEFAULT: on | |
2232 | DOC_START | |
2233 | By default, Squid strips query terms from requested URLs before | |
2234 | logging. This protects your user's privacy. | |
2235 | DOC_END | |
2236 | ||
2237 | NAME: buffered_logs | |
2238 | COMMENT: on|off | |
2239 | TYPE: onoff | |
2240 | DEFAULT: off | |
2241 | LOC: Config.onoff.buffered_logs | |
2242 | DOC_START | |
2243 | cache.log log file is written with stdio functions, and as such | |
2244 | it can be buffered or unbuffered. By default it will be unbuffered. | |
2245 | Buffering it can speed up the writing slightly (though you are | |
2246 | unlikely to need to worry unless you run with tons of debugging | |
2247 | enabled in which case performance will suffer badly anyway..). | |
2248 | DOC_END | |
2249 | ||
2250 | COMMENT_START | |
2251 | OPTIONS FOR FTP GATEWAYING | |
2252 | ----------------------------------------------------------------------------- | |
2253 | COMMENT_END | |
2254 | ||
2255 | NAME: ftp_user | |
2256 | TYPE: string | |
2257 | DEFAULT: Squid@ | |
2258 | LOC: Config.Ftp.anon_user | |
2259 | DOC_START | |
2260 | If you want the anonymous login password to be more informative | |
2261 | (and enable the use of picky ftp servers), set this to something | |
2262 | reasonable for your domain, like wwwuser@somewhere.net | |
2263 | ||
2264 | The reason why this is domainless by default is the | |
2265 | request can be made on the behalf of a user in any domain, | |
2266 | depending on how the cache is used. | |
2267 | Some ftp server also validate the email address is valid | |
2268 | (for example perl.com). | |
2269 | DOC_END | |
2270 | ||
2271 | NAME: ftp_list_width | |
2272 | TYPE: size_t | |
2273 | DEFAULT: 32 | |
2274 | LOC: Config.Ftp.list_width | |
2275 | DOC_START | |
2276 | Sets the width of ftp listings. This should be set to fit in | |
2277 | the width of a standard browser. Setting this too small | |
2278 | can cut off long filenames when browsing ftp sites. | |
2279 | DOC_END | |
2280 | ||
2281 | NAME: ftp_passive | |
2282 | TYPE: onoff | |
2283 | DEFAULT: on | |
2284 | LOC: Config.Ftp.passive | |
2285 | DOC_START | |
2286 | If your firewall does not allow Squid to use passive | |
2287 | connections, turn off this option. | |
2288 | DOC_END | |
2289 | ||
2290 | NAME: ftp_sanitycheck | |
2291 | TYPE: onoff | |
2292 | DEFAULT: on | |
2293 | LOC: Config.Ftp.sanitycheck | |
2294 | DOC_START | |
2295 | For security and data integrity reasons Squid by default performs | |
2296 | sanity checks of the addresses of FTP data connections ensure the | |
2297 | data connection is to the requested server. If you need to allow | |
2298 | FTP connections to servers using another IP address for the data | |
2299 | connection turn this off. | |
2300 | DOC_END | |
2301 | ||
2302 | NAME: ftp_telnet_protocol | |
2303 | TYPE: onoff | |
2304 | DEFAULT: on | |
2305 | LOC: Config.Ftp.telnet | |
2306 | DOC_START | |
2307 | The FTP protocol is officially defined to use the telnet protocol | |
2308 | as transport channel for the control connection. However, many | |
2309 | implementations are broken and does not respect this aspect of | |
2310 | the FTP protocol. | |
2311 | ||
2312 | If you have trouble accessing files with ASCII code 255 in the | |
2313 | path or similar problems involving this ASCII code you can | |
2314 | try setting this directive to off. If that helps, report to the | |
2315 | operator of the FTP server in question that their FTP server | |
2316 | is broken and does not follow the FTP standard. | |
2317 | DOC_END | |
2318 | ||
2319 | COMMENT_START | |
2320 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS | |
2321 | ----------------------------------------------------------------------------- | |
2322 | COMMENT_END | |
2323 | ||
2324 | NAME: diskd_program | |
2325 | TYPE: string | |
2326 | DEFAULT: @DEFAULT_DISKD@ | |
2327 | LOC: Config.Program.diskd | |
2328 | DOC_START | |
2329 | Specify the location of the diskd executable. | |
2330 | Note this is only useful if you have compiled in | |
2331 | diskd as one of the store io modules. | |
2332 | DOC_END | |
2333 | ||
2334 | NAME: unlinkd_program | |
2335 | IFDEF: USE_UNLINKD | |
2336 | TYPE: string | |
2337 | DEFAULT: @DEFAULT_UNLINKD@ | |
2338 | LOC: Config.Program.unlinkd | |
2339 | DOC_START | |
2340 | Specify the location of the executable for file deletion process. | |
2341 | DOC_END | |
2342 | ||
2343 | NAME: pinger_program | |
2344 | TYPE: string | |
2345 | DEFAULT: @DEFAULT_PINGER@ | |
2346 | LOC: Config.Program.pinger | |
2347 | IFDEF: USE_ICMP | |
2348 | DOC_START | |
2349 | Specify the location of the executable for the pinger process. | |
2350 | DOC_END | |
2351 | ||
2352 | COMMENT_START | |
2353 | OPTIONS FOR URL REWRITING | |
2354 | ----------------------------------------------------------------------------- | |
2355 | COMMENT_END | |
2356 | ||
2357 | NAME: url_rewrite_program redirect_program | |
2358 | TYPE: wordlist | |
2359 | LOC: Config.Program.redirect | |
2360 | DEFAULT: none | |
2361 | DOC_START | |
2362 | Specify the location of the executable for the URL rewriter. | |
2363 | Since they can perform almost any function there isn't one included. | |
2364 | ||
2365 | For each requested URL rewriter will receive on line with the format | |
2366 | ||
2367 | URL <SP> client_ip "/" fqdn <SP> user <SP> method <NL> | |
2368 | ||
2369 | And the rewriter may return a rewritten URL. The other components of | |
2370 | the request line does not need to be returned (ignored if they are). | |
2371 | ||
2372 | The rewriter can also indicate that a client-side redirect should | |
2373 | be performed to the new URL. This is done by prefixing the returned | |
2374 | URL with "301:" (moved permanently) or 302: (moved temporarily). | |
2375 | ||
2376 | By default, a URL rewriter is not used. | |
2377 | DOC_END | |
2378 | ||
2379 | NAME: url_rewrite_children redirect_children | |
2380 | TYPE: int | |
2381 | DEFAULT: 5 | |
2382 | LOC: Config.redirectChildren | |
2383 | DOC_START | |
2384 | The number of redirector processes to spawn. If you start | |
2385 | too few Squid will have to wait for them to process a backlog of | |
2386 | URLs, slowing it down. If you start too many they will use RAM | |
2387 | and other system resources. | |
2388 | DOC_END | |
2389 | ||
2390 | NAME: url_rewrite_concurrency redirect_concurrency | |
2391 | TYPE: int | |
2392 | DEFAULT: 0 | |
2393 | LOC: Config.redirectConcurrency | |
2394 | DOC_START | |
2395 | The number of requests each redirector helper can handle in | |
2396 | parallel. Defaults to 0 which indicates the redirector | |
2397 | is a old-style single threaded redirector. | |
2398 | DOC_END | |
2399 | ||
2400 | NAME: url_rewrite_host_header redirect_rewrites_host_header | |
2401 | TYPE: onoff | |
2402 | DEFAULT: on | |
2403 | LOC: Config.onoff.redir_rewrites_host | |
2404 | DOC_START | |
2405 | By default Squid rewrites any Host: header in redirected | |
2406 | requests. If you are running an accelerator this may | |
2407 | not be a wanted effect of a redirector. | |
2408 | ||
2409 | WARNING: Entries are cached on the result of the URL rewriting | |
2410 | process, so be careful if you have domain-virtual hosts. | |
2411 | DOC_END | |
2412 | ||
2413 | NAME: url_rewrite_access redirector_access | |
2414 | TYPE: acl_access | |
2415 | DEFAULT: none | |
2416 | LOC: Config.accessList.redirector | |
2417 | DOC_START | |
2418 | If defined, this access list specifies which requests are | |
2419 | sent to the redirector processes. By default all requests | |
2420 | are sent. | |
2421 | DOC_END | |
2422 | ||
2423 | NAME: url_rewrite_bypass redirector_bypass | |
2424 | TYPE: onoff | |
2425 | LOC: Config.onoff.redirector_bypass | |
2426 | DEFAULT: off | |
2427 | DOC_START | |
2428 | When this is 'on', a request will not go through the | |
2429 | redirector if all redirectors are busy. If this is 'off' | |
2430 | and the redirector queue grows too large, Squid will exit | |
2431 | with a FATAL error and ask you to increase the number of | |
2432 | redirectors. You should only enable this if the redirectors | |
2433 | are not critical to your caching system. If you use | |
2434 | redirectors for access control, and you enable this option, | |
2435 | users may have access to pages they should not | |
2436 | be allowed to request. | |
2437 | DOC_END | |
2438 | ||
2439 | COMMENT_START | |
2440 | OPTIONS FOR TUNING THE CACHE | |
2441 | ----------------------------------------------------------------------------- | |
2442 | COMMENT_END | |
2443 | ||
2444 | NAME: cache no_cache | |
2445 | TYPE: acl_access | |
2446 | DEFAULT: none | |
2447 | LOC: Config.accessList.noCache | |
2448 | DOC_START | |
2449 | A list of ACL elements which, if matched, cause the request to | |
2450 | not be satisfied from the cache and the reply to not be cached. | |
2451 | In other words, use this to force certain objects to never be cached. | |
2452 | ||
2453 | You must use the word 'DENY' to indicate the ACL names which should | |
2454 | NOT be cached. | |
2455 | ||
2456 | Default is to allow all to be cached | |
2457 | NOCOMMENT_START | |
2458 | #We recommend you to use the following two lines. | |
2459 | acl QUERY urlpath_regex cgi-bin \? | |
2460 | cache deny QUERY | |
2461 | NOCOMMENT_END | |
2462 | DOC_END | |
2463 | ||
2464 | NAME: refresh_pattern | |
2465 | TYPE: refreshpattern | |
2466 | LOC: Config.Refresh | |
2467 | DEFAULT: none | |
2468 | DOC_START | |
2469 | usage: refresh_pattern [-i] regex min percent max [options] | |
2470 | ||
2471 | By default, regular expressions are CASE-SENSITIVE. To make | |
2472 | them case-insensitive, use the -i option. | |
2473 | ||
2474 | 'Min' is the time (in minutes) an object without an explicit | |
2475 | expiry time should be considered fresh. The recommended | |
2476 | value is 0, any higher values may cause dynamic applications | |
2477 | to be erroneously cached unless the application designer | |
2478 | has taken the appropriate actions. | |
2479 | ||
2480 | 'Percent' is a percentage of the objects age (time since last | |
2481 | modification age) an object without explicit expiry time | |
2482 | will be considered fresh. | |
2483 | ||
2484 | 'Max' is an upper limit on how long objects without an explicit | |
2485 | expiry time will be considered fresh. | |
2486 | ||
2487 | options: override-expire | |
2488 | override-lastmod | |
2489 | reload-into-ims | |
2490 | ignore-reload | |
2491 | ignore-no-cache | |
2492 | ignore-no-store | |
2493 | ignore-private | |
2494 | ignore-auth | |
2495 | refresh-ims | |
2496 | ||
2497 | override-expire enforces min age even if the server | |
2498 | sent a Expires: header. Doing this VIOLATES the HTTP | |
2499 | standard. Enabling this feature could make you liable | |
2500 | for problems which it causes. | |
2501 | ||
2502 | override-lastmod enforces min age even on objects | |
2503 | that were modified recently. | |
2504 | ||
2505 | reload-into-ims changes client no-cache or ``reload'' | |
2506 | to If-Modified-Since requests. Doing this VIOLATES the | |
2507 | HTTP standard. Enabling this feature could make you | |
2508 | liable for problems which it causes. | |
2509 | ||
2510 | ignore-reload ignores a client no-cache or ``reload'' | |
2511 | header. Doing this VIOLATES the HTTP standard. Enabling | |
2512 | this feature could make you liable for problems which | |
2513 | it causes. | |
2514 | ||
2515 | ignore-no-cache ignores any ``Pragma: no-cache'' and | |
2516 | ``Cache-control: no-cache'' headers received from a server. | |
2517 | The HTTP RFC never allows the use of this (Pragma) header | |
2518 | from a server, only a client, though plenty of servers | |
2519 | send it anyway. | |
2520 | ||
2521 | ignore-no-store ignores any ``Cache-control: no-store'' | |
2522 | headers received from a server. Doing this VIOLATES | |
2523 | the HTTP standard. Enabling this feature could make you | |
2524 | liable for problems which it causes. | |
2525 | ||
2526 | ignore-private ignores any ``Cache-control: private'' | |
2527 | headers received from a server. Doing this VIOLATES | |
2528 | the HTTP standard. Enabling this feature could make you | |
2529 | liable for problems which it causes. | |
2530 | ||
2531 | ignore-auth caches responses to requests with authorization, | |
2532 | as if the originserver had sent ``Cache-control: public'' | |
2533 | in the response header. Doing this VIOLATES the HTTP standard. | |
2534 | Enabling this feature could make you liable for problems which | |
2535 | it causes. | |
2536 | ||
2537 | refresh-ims causes squid to contact the origin server | |
2538 | when a client issues an If-Modified-Since request. This | |
2539 | ensures that the client will receive an updated version | |
2540 | if one is available. | |
2541 | ||
2542 | Basically a cached object is: | |
2543 | ||
2544 | FRESH if expires < now, else STALE | |
2545 | STALE if age > max | |
2546 | FRESH if lm-factor < percent, else STALE | |
2547 | FRESH if age < min | |
2548 | else STALE | |
2549 | ||
2550 | The refresh_pattern lines are checked in the order listed here. | |
2551 | The first entry which matches is used. If none of the entries | |
2552 | match the default will be used. | |
2553 | ||
2554 | Note, you must uncomment all the default lines if you want | |
2555 | to change one. The default setting is only active if none is | |
2556 | used. | |
2557 | ||
2558 | Suggested default: | |
2559 | NOCOMMENT_START | |
2560 | refresh_pattern ^ftp: 1440 20% 10080 | |
2561 | refresh_pattern ^gopher: 1440 0% 1440 | |
2562 | refresh_pattern . 0 20% 4320 | |
2563 | NOCOMMENT_END | |
2564 | DOC_END | |
2565 | ||
2566 | NAME: quick_abort_min | |
2567 | COMMENT: (KB) | |
2568 | TYPE: kb_int64_t | |
2569 | DEFAULT: 16 KB | |
2570 | LOC: Config.quickAbort.min | |
2571 | DOC_NONE | |
2572 | ||
2573 | NAME: quick_abort_max | |
2574 | COMMENT: (KB) | |
2575 | TYPE: kb_int64_t | |
2576 | DEFAULT: 16 KB | |
2577 | LOC: Config.quickAbort.max | |
2578 | DOC_NONE | |
2579 | ||
2580 | NAME: quick_abort_pct | |
2581 | COMMENT: (percent) | |
2582 | TYPE: int | |
2583 | DEFAULT: 95 | |
2584 | LOC: Config.quickAbort.pct | |
2585 | DOC_START | |
2586 | The cache by default continues downloading aborted requests | |
2587 | which are almost completed (less than 16 KB remaining). This | |
2588 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
2589 | caches. Impatient users may tie up file descriptors and | |
2590 | bandwidth by repeatedly requesting and immediately aborting | |
2591 | downloads. | |
2592 | ||
2593 | When the user aborts a request, Squid will check the | |
2594 | quick_abort values to the amount of data transfered until | |
2595 | then. | |
2596 | ||
2597 | If the transfer has less than 'quick_abort_min' KB remaining, | |
2598 | it will finish the retrieval. | |
2599 | ||
2600 | If the transfer has more than 'quick_abort_max' KB remaining, | |
2601 | it will abort the retrieval. | |
2602 | ||
2603 | If more than 'quick_abort_pct' of the transfer has completed, | |
2604 | it will finish the retrieval. | |
2605 | ||
2606 | If you do not want any retrieval to continue after the client | |
2607 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' | |
2608 | to '0 KB'. | |
2609 | ||
2610 | If you want retrievals to always continue if they are being | |
2611 | cached set 'quick_abort_min' to '-1 KB'. | |
2612 | DOC_END | |
2613 | ||
2614 | NAME: read_ahead_gap | |
2615 | COMMENT: buffer-size | |
2616 | TYPE: b_int64_t | |
2617 | LOC: Config.readAheadGap | |
2618 | DEFAULT: 16 KB | |
2619 | DOC_START | |
2620 | The amount of data the cache will buffer ahead of what has been | |
2621 | sent to the client when retrieving an object from another server. | |
2622 | DOC_END | |
2623 | ||
2624 | NAME: negative_ttl | |
2625 | COMMENT: time-units | |
2626 | TYPE: time_t | |
2627 | LOC: Config.negativeTtl | |
2628 | DEFAULT: 5 minutes | |
2629 | DOC_START | |
2630 | Time-to-Live (TTL) for failed requests. Certain types of | |
2631 | failures (such as "connection refused" and "404 Not Found") are | |
2632 | negatively-cached for a configurable amount of time. The | |
2633 | default is 5 minutes. Note that this is different from | |
2634 | negative caching of DNS lookups. | |
2635 | DOC_END | |
2636 | ||
2637 | NAME: positive_dns_ttl | |
2638 | COMMENT: time-units | |
2639 | TYPE: time_t | |
2640 | LOC: Config.positiveDnsTtl | |
2641 | DEFAULT: 6 hours | |
2642 | DOC_START | |
2643 | Upper limit on how long Squid will cache positive DNS responses. | |
2644 | Default is 6 hours (360 minutes). This directive must be set | |
2645 | larger than negative_dns_ttl. | |
2646 | DOC_END | |
2647 | ||
2648 | NAME: negative_dns_ttl | |
2649 | COMMENT: time-units | |
2650 | TYPE: time_t | |
2651 | LOC: Config.negativeDnsTtl | |
2652 | DEFAULT: 1 minutes | |
2653 | DOC_START | |
2654 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
2655 | This also sets the lower cache limit on positive lookups. | |
2656 | Minimum value is 1 second, and it is not recommendable to go | |
2657 | much below 10 seconds. | |
2658 | DOC_END | |
2659 | ||
2660 | NAME: range_offset_limit | |
2661 | COMMENT: (bytes) | |
2662 | TYPE: b_int64_t | |
2663 | LOC: Config.rangeOffsetLimit | |
2664 | DEFAULT: 0 KB | |
2665 | DOC_START | |
2666 | Sets a upper limit on how far into the the file a Range request | |
2667 | may be to cause Squid to prefetch the whole file. If beyond this | |
2668 | limit Squid forwards the Range request as it is and the result | |
2669 | is NOT cached. | |
2670 | ||
2671 | This is to stop a far ahead range request (lets say start at 17MB) | |
2672 | from making Squid fetch the whole object up to that point before | |
2673 | sending anything to the client. | |
2674 | ||
2675 | A value of -1 causes Squid to always fetch the object from the | |
2676 | beginning so it may cache the result. (2.0 style) | |
2677 | ||
2678 | A value of 0 causes Squid to never fetch more than the | |
2679 | client requested. (default) | |
2680 | DOC_END | |
2681 | ||
2682 | NAME: minimum_expiry_time | |
2683 | COMMENT: (seconds) | |
2684 | TYPE: time_t | |
2685 | LOC: Config.minimum_expiry_time | |
2686 | DEFAULT: 60 seconds | |
2687 | DOC_START | |
2688 | The minimum caching time according to (Expires - Date) | |
2689 | Headers Squid honors if the object can't be revalidated | |
2690 | defaults to 60 seconds. In reverse proxy enorinments it | |
2691 | might be desirable to honor shorter object lifetimes. It | |
2692 | is most likely better to make your server return a | |
2693 | meaningful Last-Modified header however. In ESI environments | |
2694 | where page fragments often have short lifetimes, this will | |
2695 | often be best set to 0. | |
2696 | DOC_END | |
2697 | ||
2698 | NAME: store_avg_object_size | |
2699 | COMMENT: (kbytes) | |
2700 | TYPE: kb_int64_t | |
2701 | DEFAULT: 13 KB | |
2702 | LOC: Config.Store.avgObjectSize | |
2703 | DOC_START | |
2704 | Average object size, used to estimate number of objects your | |
2705 | cache can hold. The default is 13 KB. | |
2706 | DOC_END | |
2707 | ||
2708 | NAME: store_objects_per_bucket | |
2709 | TYPE: int | |
2710 | DEFAULT: 20 | |
2711 | LOC: Config.Store.objectsPerBucket | |
2712 | DOC_START | |
2713 | Target number of objects per bucket in the store hash table. | |
2714 | Lowering this value increases the total number of buckets and | |
2715 | also the storage maintenance rate. The default is 20. | |
2716 | DOC_END | |
2717 | ||
2718 | COMMENT_START | |
2719 | HTTP OPTIONS | |
2720 | ----------------------------------------------------------------------------- | |
2721 | COMMENT_END | |
2722 | ||
2723 | NAME: request_header_max_size | |
2724 | COMMENT: (KB) | |
2725 | TYPE: b_size_t | |
2726 | DEFAULT: 20 KB | |
2727 | LOC: Config.maxRequestHeaderSize | |
2728 | DOC_START | |
2729 | This specifies the maximum size for HTTP headers in a request. | |
2730 | Request headers are usually relatively small (about 512 bytes). | |
2731 | Placing a limit on the request header size will catch certain | |
2732 | bugs (for example with persistent connections) and possibly | |
2733 | buffer-overflow or denial-of-service attacks. | |
2734 | DOC_END | |
2735 | ||
2736 | NAME: reply_header_max_size | |
2737 | COMMENT: (KB) | |
2738 | TYPE: b_size_t | |
2739 | DEFAULT: 20 KB | |
2740 | LOC: Config.maxReplyHeaderSize | |
2741 | DOC_START | |
2742 | This specifies the maximum size for HTTP headers in a reply. | |
2743 | Reply headers are usually relatively small (about 512 bytes). | |
2744 | Placing a limit on the reply header size will catch certain | |
2745 | bugs (for example with persistent connections) and possibly | |
2746 | buffer-overflow or denial-of-service attacks. | |
2747 | DOC_END | |
2748 | ||
2749 | NAME: request_body_max_size | |
2750 | COMMENT: (bytes) | |
2751 | TYPE: b_int64_t | |
2752 | DEFAULT: 0 KB | |
2753 | LOC: Config.maxRequestBodySize | |
2754 | DOC_START | |
2755 | This specifies the maximum size for an HTTP request body. | |
2756 | In other words, the maximum size of a PUT/POST request. | |
2757 | A user who attempts to send a request with a body larger | |
2758 | than this limit receives an "Invalid Request" error message. | |
2759 | If you set this parameter to a zero (the default), there will | |
2760 | be no limit imposed. | |
2761 | DOC_END | |
2762 | ||
2763 | NAME: broken_posts | |
2764 | TYPE: acl_access | |
2765 | DEFAULT: none | |
2766 | LOC: Config.accessList.brokenPosts | |
2767 | DOC_START | |
2768 | A list of ACL elements which, if matched, causes Squid to send | |
2769 | an extra CRLF pair after the body of a PUT/POST request. | |
2770 | ||
2771 | Some HTTP servers has broken implementations of PUT/POST, | |
2772 | and rely on an extra CRLF pair sent by some WWW clients. | |
2773 | ||
2774 | Quote from RFC2616 section 4.1 on this matter: | |
2775 | ||
2776 | Note: certain buggy HTTP/1.0 client implementations generate an | |
2777 | extra CRLF's after a POST request. To restate what is explicitly | |
2778 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
2779 | a request with an extra CRLF. | |
2780 | ||
2781 | Example: | |
2782 | acl buggy_server url_regex ^http://.... | |
2783 | broken_posts allow buggy_server | |
2784 | DOC_END | |
2785 | ||
2786 | NAME: via | |
2787 | IFDEF: HTTP_VIOLATIONS | |
2788 | COMMENT: on|off | |
2789 | TYPE: onoff | |
2790 | DEFAULT: on | |
2791 | LOC: Config.onoff.via | |
2792 | DOC_START | |
2793 | If set (default), Squid will include a Via header in requests and | |
2794 | replies as required by RFC2616. | |
2795 | DOC_END | |
2796 | ||
2797 | NAME: ie_refresh | |
2798 | COMMENT: on|off | |
2799 | TYPE: onoff | |
2800 | LOC: Config.onoff.ie_refresh | |
2801 | DEFAULT: off | |
2802 | DOC_START | |
2803 | Microsoft Internet Explorer up until version 5.5 Service | |
2804 | Pack 1 has an issue with transparent proxies, wherein it | |
2805 | is impossible to force a refresh. Turning this on provides | |
2806 | a partial fix to the problem, by causing all IMS-REFRESH | |
2807 | requests from older IE versions to check the origin server | |
2808 | for fresh content. This reduces hit ratio by some amount | |
2809 | (~10% in my experience), but allows users to actually get | |
2810 | fresh content when they want it. Note because Squid | |
2811 | cannot tell if the user is using 5.5 or 5.5SP1, the behavior | |
2812 | of 5.5 is unchanged from old versions of Squid (i.e. a | |
2813 | forced refresh is impossible). Newer versions of IE will, | |
2814 | hopefully, continue to have the new behavior and will be | |
2815 | handled based on that assumption. This option defaults to | |
2816 | the old Squid behavior, which is better for hit ratios but | |
2817 | worse for clients using IE, if they need to be able to | |
2818 | force fresh content. | |
2819 | DOC_END | |
2820 | ||
2821 | NAME: vary_ignore_expire | |
2822 | COMMENT: on|off | |
2823 | TYPE: onoff | |
2824 | LOC: Config.onoff.vary_ignore_expire | |
2825 | DEFAULT: off | |
2826 | DOC_START | |
2827 | Many HTTP servers supporting Vary gives such objects | |
2828 | immediate expiry time with no cache-control header | |
2829 | when requested by a HTTP/1.0 client. This option | |
2830 | enables Squid to ignore such expiry times until | |
2831 | HTTP/1.1 is fully implemented. | |
2832 | WARNING: This may eventually cause some varying | |
2833 | objects not intended for caching to get cached. | |
2834 | DOC_END | |
2835 | ||
2836 | NAME: extension_methods | |
2837 | TYPE: wordlist | |
2838 | LOC: Config.ext_methods | |
2839 | DEFAULT: none | |
2840 | DOC_START | |
2841 | Squid only knows about standardized HTTP request methods. | |
2842 | You can add up to 20 additional "extension" methods here. | |
2843 | DOC_END | |
2844 | ||
2845 | NAME: request_entities | |
2846 | TYPE: onoff | |
2847 | LOC: Config.onoff.request_entities | |
2848 | DEFAULT: off | |
2849 | DOC_START | |
2850 | Squid defaults to deny GET and HEAD requests with request entities, | |
2851 | as the meaning of such requests are undefined in the HTTP standard | |
2852 | even if not explicitly forbidden. | |
2853 | ||
2854 | Set this directive to on if you have clients which insists | |
2855 | on sending request entities in GET or HEAD requests. But be warned | |
2856 | that there is server software (both proxies and web servers) which | |
2857 | can fail to properly process this kind of request which may make you | |
2858 | vulnerable to cache pollution attacks if enabled. | |
2859 | DOC_END | |
2860 | ||
2861 | NAME: request_header_access | |
2862 | IFDEF: HTTP_VIOLATIONS | |
2863 | TYPE: http_header_access[] | |
2864 | LOC: Config.request_header_access | |
2865 | DEFAULT: none | |
2866 | DOC_START | |
2867 | Usage: request_header_access header_name allow|deny [!]aclname ... | |
2868 | ||
2869 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
2870 | this feature could make you liable for problems which it | |
2871 | causes. | |
2872 | ||
2873 | This option replaces the old 'anonymize_headers' and the | |
2874 | older 'http_anonymizer' option with something that is much | |
2875 | more configurable. This new method creates a list of ACLs | |
2876 | for each header, allowing you very fine-tuned header | |
2877 | mangling. | |
2878 | ||
2879 | This option only applies to request headers, i.e., from the | |
2880 | client to the server. | |
2881 | ||
2882 | You can only specify known headers for the header name. | |
2883 | Other headers are reclassified as 'Other'. You can also | |
2884 | refer to all the headers with 'All'. | |
2885 | ||
2886 | For example, to achieve the same behavior as the old | |
2887 | 'http_anonymizer standard' option, you should use: | |
2888 | ||
2889 | request_header_access From deny all | |
2890 | request_header_access Referer deny all | |
2891 | request_header_access Server deny all | |
2892 | request_header_access User-Agent deny all | |
2893 | request_header_access WWW-Authenticate deny all | |
2894 | request_header_access Link deny all | |
2895 | ||
2896 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
2897 | you should use: | |
2898 | ||
2899 | request_header_access Allow allow all | |
2900 | request_header_access Authorization allow all | |
2901 | request_header_access WWW-Authenticate allow all | |
2902 | request_header_access Proxy-Authorization allow all | |
2903 | request_header_access Proxy-Authenticate allow all | |
2904 | request_header_access Cache-Control allow all | |
2905 | request_header_access Content-Encoding allow all | |
2906 | request_header_access Content-Length allow all | |
2907 | request_header_access Content-Type allow all | |
2908 | request_header_access Date allow all | |
2909 | request_header_access Expires allow all | |
2910 | request_header_access Host allow all | |
2911 | request_header_access If-Modified-Since allow all | |
2912 | request_header_access Last-Modified allow all | |
2913 | request_header_access Location allow all | |
2914 | request_header_access Pragma allow all | |
2915 | request_header_access Accept allow all | |
2916 | request_header_access Accept-Charset allow all | |
2917 | request_header_access Accept-Encoding allow all | |
2918 | request_header_access Accept-Language allow all | |
2919 | request_header_access Content-Language allow all | |
2920 | request_header_access Mime-Version allow all | |
2921 | request_header_access Retry-After allow all | |
2922 | request_header_access Title allow all | |
2923 | request_header_access Connection allow all | |
2924 | request_header_access Proxy-Connection allow all | |
2925 | request_header_access All deny all | |
2926 | ||
2927 | although many of those are HTTP reply headers, and so should be | |
2928 | controlled with the reply_header_access directive. | |
2929 | ||
2930 | By default, all headers are allowed (no anonymizing is | |
2931 | performed). | |
2932 | DOC_END | |
2933 | ||
2934 | NAME: reply_header_access | |
2935 | IFDEF: HTTP_VIOLATIONS | |
2936 | TYPE: http_header_access[] | |
2937 | LOC: Config.reply_header_access | |
2938 | DEFAULT: none | |
2939 | DOC_START | |
2940 | Usage: reply_header_access header_name allow|deny [!]aclname ... | |
2941 | ||
2942 | WARNING: Doing this VIOLATES the HTTP standard. Enabling | |
2943 | this feature could make you liable for problems which it | |
2944 | causes. | |
2945 | ||
2946 | This option only applies to reply headers, i.e., from the | |
2947 | server to the client. | |
2948 | ||
2949 | This is the same as request_header_access, but in the other | |
2950 | direction. | |
2951 | ||
2952 | This option replaces the old 'anonymize_headers' and the | |
2953 | older 'http_anonymizer' option with something that is much | |
2954 | more configurable. This new method creates a list of ACLs | |
2955 | for each header, allowing you very fine-tuned header | |
2956 | mangling. | |
2957 | ||
2958 | You can only specify known headers for the header name. | |
2959 | Other headers are reclassified as 'Other'. You can also | |
2960 | refer to all the headers with 'All'. | |
2961 | ||
2962 | For example, to achieve the same behavior as the old | |
2963 | 'http_anonymizer standard' option, you should use: | |
2964 | ||
2965 | reply_header_access From deny all | |
2966 | reply_header_access Referer deny all | |
2967 | reply_header_access Server deny all | |
2968 | reply_header_access User-Agent deny all | |
2969 | reply_header_access WWW-Authenticate deny all | |
2970 | reply_header_access Link deny all | |
2971 | ||
2972 | Or, to reproduce the old 'http_anonymizer paranoid' feature | |
2973 | you should use: | |
2974 | ||
2975 | reply_header_access Allow allow all | |
2976 | reply_header_access Authorization allow all | |
2977 | reply_header_access WWW-Authenticate allow all | |
2978 | reply_header_access Proxy-Authorization allow all | |
2979 | reply_header_access Proxy-Authenticate allow all | |
2980 | reply_header_access Cache-Control allow all | |
2981 | reply_header_access Content-Encoding allow all | |
2982 | reply_header_access Content-Length allow all | |
2983 | reply_header_access Content-Type allow all | |
2984 | reply_header_access Date allow all | |
2985 | reply_header_access Expires allow all | |
2986 | reply_header_access Host allow all | |
2987 | reply_header_access If-Modified-Since allow all | |
2988 | reply_header_access Last-Modified allow all | |
2989 | reply_header_access Location allow all | |
2990 | reply_header_access Pragma allow all | |
2991 | reply_header_access Accept allow all | |
2992 | reply_header_access Accept-Charset allow all | |
2993 | reply_header_access Accept-Encoding allow all | |
2994 | reply_header_access Accept-Language allow all | |
2995 | reply_header_access Content-Language allow all | |
2996 | reply_header_access Mime-Version allow all | |
2997 | reply_header_access Retry-After allow all | |
2998 | reply_header_access Title allow all | |
2999 | reply_header_access Connection allow all | |
3000 | reply_header_access Proxy-Connection allow all | |
3001 | reply_header_access All deny all | |
3002 | ||
3003 | although the HTTP request headers won't be usefully controlled | |
3004 | by this directive -- see request_header_access for details. | |
3005 | ||
3006 | By default, all headers are allowed (no anonymizing is | |
3007 | performed). | |
3008 | DOC_END | |
3009 | ||
3010 | NAME: header_replace | |
3011 | IFDEF: HTTP_VIOLATIONS | |
3012 | TYPE: http_header_replace[] | |
3013 | LOC: Config.request_header_access | |
3014 | DEFAULT: none | |
3015 | DOC_START | |
3016 | Usage: header_replace header_name message | |
3017 | Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
3018 | ||
3019 | This option allows you to change the contents of headers | |
3020 | denied with header_access above, by replacing them with | |
3021 | some fixed string. This replaces the old fake_user_agent | |
3022 | option. | |
3023 | ||
3024 | This only applies to request headers, not reply headers. | |
3025 | ||
3026 | By default, headers are removed if denied. | |
3027 | DOC_END | |
3028 | ||
3029 | NAME: relaxed_header_parser | |
3030 | COMMENT: on|off|warn | |
3031 | TYPE: tristate | |
3032 | LOC: Config.onoff.relaxed_header_parser | |
3033 | DEFAULT: on | |
3034 | DOC_START | |
3035 | In the default "on" setting Squid accepts certain forms | |
3036 | of non-compliant HTTP messages where it is unambiguous | |
3037 | what the sending application intended even if the message | |
3038 | is not correctly formatted. The messages is then normalized | |
3039 | to the correct form when forwarded by Squid. | |
3040 | ||
3041 | If set to "warn" then a warning will be emitted in cache.log | |
3042 | each time such HTTP error is encountered. | |
3043 | ||
3044 | If set to "off" then such HTTP errors will cause the request | |
3045 | or response to be rejected. | |
3046 | DOC_END | |
3047 | ||
3048 | COMMENT_START | |
3049 | TIMEOUTS | |
3050 | ----------------------------------------------------------------------------- | |
3051 | COMMENT_END | |
3052 | ||
3053 | NAME: forward_timeout | |
3054 | COMMENT: time-units | |
3055 | TYPE: time_t | |
3056 | LOC: Config.Timeout.forward | |
3057 | DEFAULT: 4 minutes | |
3058 | DOC_START | |
3059 | This parameter specifies how long Squid should at most attempt in | |
3060 | finding a forwarding path for the request before giving up. | |
3061 | DOC_END | |
3062 | ||
3063 | NAME: connect_timeout | |
3064 | COMMENT: time-units | |
3065 | TYPE: time_t | |
3066 | LOC: Config.Timeout.connect | |
3067 | DEFAULT: 1 minute | |
3068 | DOC_START | |
3069 | This parameter specifies how long to wait for the TCP connect to | |
3070 | the requested server or peer to complete before Squid should | |
3071 | attempt to find another path where to forward the request. | |
3072 | DOC_END | |
3073 | ||
3074 | NAME: peer_connect_timeout | |
3075 | COMMENT: time-units | |
3076 | TYPE: time_t | |
3077 | LOC: Config.Timeout.peer_connect | |
3078 | DEFAULT: 30 seconds | |
3079 | DOC_START | |
3080 | This parameter specifies how long to wait for a pending TCP | |
3081 | connection to a peer cache. The default is 30 seconds. You | |
3082 | may also set different timeout values for individual neighbors | |
3083 | with the 'connect-timeout' option on a 'cache_peer' line. | |
3084 | DOC_END | |
3085 | ||
3086 | NAME: read_timeout | |
3087 | COMMENT: time-units | |
3088 | TYPE: time_t | |
3089 | LOC: Config.Timeout.read | |
3090 | DEFAULT: 15 minutes | |
3091 | DOC_START | |
3092 | The read_timeout is applied on server-side connections. After | |
3093 | each successful read(), the timeout will be extended by this | |
3094 | amount. If no data is read again after this amount of time, | |
3095 | the request is aborted and logged with ERR_READ_TIMEOUT. The | |
3096 | default is 15 minutes. | |
3097 | DOC_END | |
3098 | ||
3099 | NAME: request_timeout | |
3100 | TYPE: time_t | |
3101 | LOC: Config.Timeout.request | |
3102 | DEFAULT: 5 minutes | |
3103 | DOC_START | |
3104 | How long to wait for an HTTP request after initial | |
3105 | connection establishment. | |
3106 | DOC_END | |
3107 | ||
3108 | NAME: persistent_request_timeout | |
3109 | TYPE: time_t | |
3110 | LOC: Config.Timeout.persistent_request | |
3111 | DEFAULT: 2 minutes | |
3112 | DOC_START | |
3113 | How long to wait for the next HTTP request on a persistent | |
3114 | connection after the previous request completes. | |
3115 | DOC_END | |
3116 | ||
3117 | NAME: client_lifetime | |
3118 | COMMENT: time-units | |
3119 | TYPE: time_t | |
3120 | LOC: Config.Timeout.lifetime | |
3121 | DEFAULT: 1 day | |
3122 | DOC_START | |
3123 | The maximum amount of time a client (browser) is allowed to | |
3124 | remain connected to the cache process. This protects the Cache | |
3125 | from having a lot of sockets (and hence file descriptors) tied up | |
3126 | in a CLOSE_WAIT state from remote clients that go away without | |
3127 | properly shutting down (either because of a network failure or | |
3128 | because of a poor client implementation). The default is one | |
3129 | day, 1440 minutes. | |
3130 | ||
3131 | NOTE: The default value is intended to be much larger than any | |
3132 | client would ever need to be connected to your cache. You | |
3133 | should probably change client_lifetime only as a last resort. | |
3134 | If you seem to have many client connections tying up | |
3135 | filedescriptors, we recommend first tuning the read_timeout, | |
3136 | request_timeout, persistent_request_timeout and quick_abort values. | |
3137 | DOC_END | |
3138 | ||
3139 | NAME: half_closed_clients | |
3140 | TYPE: onoff | |
3141 | LOC: Config.onoff.half_closed_clients | |
3142 | DEFAULT: on | |
3143 | DOC_START | |
3144 | Some clients may shutdown the sending side of their TCP | |
3145 | connections, while leaving their receiving sides open. Sometimes, | |
3146 | Squid can not tell the difference between a half-closed and a | |
3147 | fully-closed TCP connection. By default, half-closed client | |
3148 | connections are kept open until a read(2) or write(2) on the | |
3149 | socket returns an error. Change this option to 'off' and Squid | |
3150 | will immediately close client connections when read(2) returns | |
3151 | "no more data to read." | |
3152 | DOC_END | |
3153 | ||
3154 | NAME: pconn_timeout | |
3155 | TYPE: time_t | |
3156 | LOC: Config.Timeout.pconn | |
3157 | DEFAULT: 1 minute | |
3158 | DOC_START | |
3159 | Timeout for idle persistent connections to servers and other | |
3160 | proxies. | |
3161 | DOC_END | |
3162 | ||
3163 | NAME: ident_timeout | |
3164 | TYPE: time_t | |
3165 | IFDEF: USE_IDENT | |
3166 | LOC: Config.Timeout.ident | |
3167 | DEFAULT: 10 seconds | |
3168 | DOC_START | |
3169 | Maximum time to wait for IDENT lookups to complete. | |
3170 | ||
3171 | If this is too high, and you enabled IDENT lookups from untrusted | |
3172 | users, you might be susceptible to denial-of-service by having | |
3173 | many ident requests going at once. | |
3174 | DOC_END | |
3175 | ||
3176 | NAME: shutdown_lifetime | |
3177 | COMMENT: time-units | |
3178 | TYPE: time_t | |
3179 | LOC: Config.shutdownLifetime | |
3180 | DEFAULT: 30 seconds | |
3181 | DOC_START | |
3182 | When SIGTERM or SIGHUP is received, the cache is put into | |
3183 | "shutdown pending" mode until all active sockets are closed. | |
3184 | This value is the lifetime to set for all open descriptors | |
3185 | during shutdown mode. Any active clients after this many | |
3186 | seconds will receive a 'timeout' message. | |
3187 | DOC_END | |
3188 | ||
3189 | COMMENT_START | |
3190 | ADMINISTRATIVE PARAMETERS | |
3191 | ----------------------------------------------------------------------------- | |
3192 | COMMENT_END | |
3193 | ||
3194 | NAME: cache_mgr | |
3195 | TYPE: string | |
3196 | DEFAULT: webmaster | |
3197 | LOC: Config.adminEmail | |
3198 | DOC_START | |
3199 | Email-address of local cache manager who will receive | |
3200 | mail if the cache dies. The default is "webmaster." | |
3201 | DOC_END | |
3202 | ||
3203 | NAME: mail_from | |
3204 | TYPE: string | |
3205 | DEFAULT: none | |
3206 | LOC: Config.EmailFrom | |
3207 | DOC_START | |
3208 | From: email-address for mail sent when the cache dies. | |
3209 | The default is to use 'appname@unique_hostname'. | |
3210 | Default appname value is "squid", can be changed into | |
3211 | src/globals.h before building squid. | |
3212 | DOC_END | |
3213 | ||
3214 | NAME: mail_program | |
3215 | TYPE: eol | |
3216 | DEFAULT: mail | |
3217 | LOC: Config.EmailProgram | |
3218 | DOC_START | |
3219 | Email program used to send mail if the cache dies. | |
3220 | The default is "mail". The specified program must comply | |
3221 | with the standard Unix mail syntax: | |
3222 | mail-program recipient < mailfile | |
3223 | ||
3224 | Optional command line options can be specified. | |
3225 | DOC_END | |
3226 | ||
3227 | NAME: cache_effective_user | |
3228 | TYPE: string | |
3229 | DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@ | |
3230 | LOC: Config.effectiveUser | |
3231 | DOC_START | |
3232 | If you start Squid as root, it will change its effective/real | |
3233 | UID/GID to the user specified below. The default is to change | |
3234 | to UID of @DEFAULT_CACHE_EFFECTIVE_USER@. | |
3235 | see also; cache_effective_group | |
3236 | DOC_END | |
3237 | ||
3238 | NAME: cache_effective_group | |
3239 | TYPE: string | |
3240 | DEFAULT: none | |
3241 | LOC: Config.effectiveGroup | |
3242 | DOC_START | |
3243 | Squid sets the GID to the effective user's default group ID | |
3244 | (taken from the password file) and supplementary group list | |
3245 | from the groups membership. | |
3246 | ||
3247 | If you want Squid to run with a specific GID regardless of | |
3248 | the group memberships of the effective user then set this | |
3249 | to the group (or GID) you want Squid to run as. When set | |
3250 | all other group privileges of the effective user are ignored | |
3251 | and only this GID is effective. If Squid is not started as | |
3252 | root the user starting Squid MUST be member of the specified | |
3253 | group. | |
3254 | ||
3255 | This option is not recommended by the Squid Team. | |
3256 | Our preference is for administrators to configure a secure | |
3257 | user account for squid with UID/GID matching system policies. | |
3258 | DOC_END | |
3259 | ||
3260 | NAME: httpd_suppress_version_string | |
3261 | COMMENT: on|off | |
3262 | TYPE: onoff | |
3263 | DEFAULT: off | |
3264 | LOC: Config.onoff.httpd_suppress_version_string | |
3265 | DOC_START | |
3266 | Suppress Squid version string info in HTTP headers and HTML error pages. | |
3267 | DOC_END | |
3268 | ||
3269 | NAME: visible_hostname | |
3270 | TYPE: string | |
3271 | LOC: Config.visibleHostname | |
3272 | DEFAULT: none | |
3273 | DOC_START | |
3274 | If you want to present a special hostname in error messages, etc, | |
3275 | define this. Otherwise, the return value of gethostname() | |
3276 | will be used. If you have multiple caches in a cluster and | |
3277 | get errors about IP-forwarding you must set them to have individual | |
3278 | names with this setting. | |
3279 | DOC_END | |
3280 | ||
3281 | NAME: unique_hostname | |
3282 | TYPE: string | |
3283 | LOC: Config.uniqueHostname | |
3284 | DEFAULT: none | |
3285 | DOC_START | |
3286 | If you want to have multiple machines with the same | |
3287 | 'visible_hostname' you must give each machine a different | |
3288 | 'unique_hostname' so forwarding loops can be detected. | |
3289 | DOC_END | |
3290 | ||
3291 | NAME: hostname_aliases | |
3292 | TYPE: wordlist | |
3293 | LOC: Config.hostnameAliases | |
3294 | DEFAULT: none | |
3295 | DOC_START | |
3296 | A list of other DNS names your cache has. | |
3297 | DOC_END | |
3298 | ||
3299 | COMMENT_START | |
3300 | OPTIONS FOR THE CACHE REGISTRATION SERVICE | |
3301 | ----------------------------------------------------------------------------- | |
3302 | ||
3303 | This section contains parameters for the (optional) cache | |
3304 | announcement service. This service is provided to help | |
3305 | cache administrators locate one another in order to join or | |
3306 | create cache hierarchies. | |
3307 | ||
3308 | An 'announcement' message is sent (via UDP) to the registration | |
3309 | service by Squid. By default, the announcement message is NOT | |
3310 | SENT unless you enable it with 'announce_period' below. | |
3311 | ||
3312 | The announcement message includes your hostname, plus the | |
3313 | following information from this configuration file: | |
3314 | ||
3315 | http_port | |
3316 | icp_port | |
3317 | cache_mgr | |
3318 | ||
3319 | All current information is processed regularly and made | |
3320 | available on the Web at http://www.ircache.net/Cache/Tracker/. | |
3321 | COMMENT_END | |
3322 | ||
3323 | NAME: announce_period | |
3324 | TYPE: time_t | |
3325 | LOC: Config.Announce.period | |
3326 | DEFAULT: 0 | |
3327 | DOC_START | |
3328 | This is how frequently to send cache announcements. The | |
3329 | default is `0' which disables sending the announcement | |
3330 | messages. | |
3331 | ||
3332 | To enable announcing your cache, just uncomment the line | |
3333 | below. | |
3334 | ||
3335 | NOCOMMENT_START | |
3336 | #To enable announcing your cache, just uncomment the line below. | |
3337 | #announce_period 1 day | |
3338 | NOCOMMENT_END | |
3339 | DOC_END | |
3340 | ||
3341 | NAME: announce_host | |
3342 | TYPE: string | |
3343 | DEFAULT: tracker.ircache.net | |
3344 | LOC: Config.Announce.host | |
3345 | DOC_NONE | |
3346 | ||
3347 | NAME: announce_file | |
3348 | TYPE: string | |
3349 | DEFAULT: none | |
3350 | LOC: Config.Announce.file | |
3351 | DOC_NONE | |
3352 | ||
3353 | NAME: announce_port | |
3354 | TYPE: ushort | |
3355 | DEFAULT: 3131 | |
3356 | LOC: Config.Announce.port | |
3357 | DOC_START | |
3358 | announce_host and announce_port set the hostname and port | |
3359 | number where the registration message will be sent. | |
3360 | ||
3361 | Hostname will default to 'tracker.ircache.net' and port will | |
3362 | default default to 3131. If the 'filename' argument is given, | |
3363 | the contents of that file will be included in the announce | |
3364 | message. | |
3365 | DOC_END | |
3366 | ||
3367 | COMMENT_START | |
3368 | HTTPD-ACCELERATOR OPTIONS | |
3369 | ----------------------------------------------------------------------------- | |
3370 | COMMENT_END | |
3371 | ||
3372 | NAME: httpd_accel_surrogate_id | |
3373 | IFDEF: ESI | |
3374 | TYPE: string | |
3375 | LOC: Config.Accel.surrogate_id | |
3376 | DEFAULT: unset-id | |
3377 | DOC_START | |
3378 | Surrogates (http://www.esi.org/architecture_spec_1.0.html) | |
3379 | need an identification token to allow control targeting. Because | |
3380 | a farm of surrogates may all perform the same tasks, they may share | |
3381 | an identification token. | |
3382 | DOC_END | |
3383 | ||
3384 | NAME: http_accel_surrogate_remote | |
3385 | IFDEF: ESI | |
3386 | COMMENT: on|off | |
3387 | TYPE: onoff | |
3388 | DEFAULT: off | |
3389 | LOC: Config.onoff.surrogate_is_remote | |
3390 | DOC_START | |
3391 | Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote. | |
3392 | Set this to on to have squid behave as a remote surrogate. | |
3393 | DOC_END | |
3394 | ||
3395 | NAME: esi_parser | |
3396 | IFDEF: ESI | |
3397 | COMMENT: libxml2|expat|custom | |
3398 | TYPE: string | |
3399 | LOC: ESIParser::Type | |
3400 | DEFAULT: custom | |
3401 | DOC_START | |
3402 | ESI markup is not strictly XML compatible. The custom ESI parser | |
3403 | will give higher performance, but cannot handle non ASCII character | |
3404 | encodings. | |
3405 | DOC_END | |
3406 | ||
3407 | COMMENT_START | |
3408 | DELAY POOL PARAMETERS | |
3409 | ----------------------------------------------------------------------------- | |
3410 | COMMENT_END | |
3411 | ||
3412 | NAME: delay_pools | |
3413 | TYPE: delay_pool_count | |
3414 | DEFAULT: 0 | |
3415 | IFDEF: DELAY_POOLS | |
3416 | LOC: Config.Delay | |
3417 | DOC_START | |
3418 | This represents the number of delay pools to be used. For example, | |
3419 | if you have one class 2 delay pool and one class 3 delays pool, you | |
3420 | have a total of 2 delay pools. | |
3421 | DOC_END | |
3422 | ||
3423 | NAME: delay_class | |
3424 | TYPE: delay_pool_class | |
3425 | DEFAULT: none | |
3426 | IFDEF: DELAY_POOLS | |
3427 | LOC: Config.Delay | |
3428 | DOC_START | |
3429 | This defines the class of each delay pool. There must be exactly one | |
3430 | delay_class line for each delay pool. For example, to define two | |
3431 | delay pools, one of class 2 and one of class 3, the settings above | |
3432 | and here would be: | |
3433 | ||
3434 | Example: | |
3435 | delay_pools 4 # 4 delay pools | |
3436 | delay_class 1 2 # pool 1 is a class 2 pool | |
3437 | delay_class 2 3 # pool 2 is a class 3 pool | |
3438 | delay_class 3 4 # pool 3 is a class 4 pool | |
3439 | delay_class 4 5 # pool 4 is a class 5 pool | |
3440 | ||
3441 | The delay pool classes are: | |
3442 | ||
3443 | class 1 Everything is limited by a single aggregate | |
3444 | bucket. | |
3445 | ||
3446 | class 2 Everything is limited by a single aggregate | |
3447 | bucket as well as an "individual" bucket chosen | |
3448 | from bits 25 through 32 of the IP address. | |
3449 | ||
3450 | class 3 Everything is limited by a single aggregate | |
3451 | bucket as well as a "network" bucket chosen | |
3452 | from bits 17 through 24 of the IP address and a | |
3453 | "individual" bucket chosen from bits 17 through | |
3454 | 32 of the IP address. | |
3455 | ||
3456 | class 4 Everything in a class 3 delay pool, with an | |
3457 | additional limit on a per user basis. This | |
3458 | only takes effect if the username is established | |
3459 | in advance - by forcing authentication in your | |
3460 | http_access rules. | |
3461 | ||
3462 | class 5 Requests are grouped according their tag (see | |
3463 | external_acl's tag= reply). | |
3464 | ||
3465 | NOTE: If an IP address is a.b.c.d | |
3466 | -> bits 25 through 32 are "d" | |
3467 | -> bits 17 through 24 are "c" | |
3468 | -> bits 17 through 32 are "c * 256 + d" | |
3469 | DOC_END | |
3470 | ||
3471 | NAME: delay_access | |
3472 | TYPE: delay_pool_access | |
3473 | DEFAULT: none | |
3474 | IFDEF: DELAY_POOLS | |
3475 | LOC: Config.Delay | |
3476 | DOC_START | |
3477 | This is used to determine which delay pool a request falls into. | |
3478 | ||
3479 | delay_access is sorted per pool and the matching starts with pool 1, | |
3480 | then pool 2, ..., and finally pool N. The first delay pool where the | |
3481 | request is allowed is selected for the request. If it does not allow | |
3482 | the request to any pool then the request is not delayed (default). | |
3483 | ||
3484 | For example, if you want some_big_clients in delay | |
3485 | pool 1 and lotsa_little_clients in delay pool 2: | |
3486 | ||
3487 | Example: | |
3488 | delay_access 1 allow some_big_clients | |
3489 | delay_access 1 deny all | |
3490 | delay_access 2 allow lotsa_little_clients | |
3491 | delay_access 2 deny all | |
3492 | delay_access 3 allow authenticated_clients | |
3493 | DOC_END | |
3494 | ||
3495 | NAME: delay_parameters | |
3496 | TYPE: delay_pool_rates | |
3497 | DEFAULT: none | |
3498 | IFDEF: DELAY_POOLS | |
3499 | LOC: Config.Delay | |
3500 | DOC_START | |
3501 | This defines the parameters for a delay pool. Each delay pool has | |
3502 | a number of "buckets" associated with it, as explained in the | |
3503 | description of delay_class. For a class 1 delay pool, the syntax is: | |
3504 | ||
3505 | delay_parameters pool aggregate | |
3506 | ||
3507 | For a class 2 delay pool: | |
3508 | ||
3509 | delay_parameters pool aggregate individual | |
3510 | ||
3511 | For a class 3 delay pool: | |
3512 | ||
3513 | delay_parameters pool aggregate network individual | |
3514 | ||
3515 | For a class 4 delay pool: | |
3516 | ||
3517 | delay_parameters pool aggregate network individual user | |
3518 | ||
3519 | For a class 5 delay pool: | |
3520 | ||
3521 | delay_parameters pool tag | |
3522 | ||
3523 | The variables here are: | |
3524 | ||
3525 | pool a pool number - ie, a number between 1 and the | |
3526 | number specified in delay_pools as used in | |
3527 | delay_class lines. | |
3528 | ||
3529 | aggregate the "delay parameters" for the aggregate bucket | |
3530 | (class 1, 2, 3). | |
3531 | ||
3532 | individual the "delay parameters" for the individual | |
3533 | buckets (class 2, 3). | |
3534 | ||
3535 | network the "delay parameters" for the network buckets | |
3536 | (class 3). | |
3537 | ||
3538 | user the delay parameters for the user buckets | |
3539 | (class 4). | |
3540 | ||
3541 | tag the delay parameters for the tag buckets | |
3542 | (class 5). | |
3543 | ||
3544 | A pair of delay parameters is written restore/maximum, where restore is | |
3545 | the number of bytes (not bits - modem and network speeds are usually | |
3546 | quoted in bits) per second placed into the bucket, and maximum is the | |
3547 | maximum number of bytes which can be in the bucket at any time. | |
3548 | ||
3549 | For example, if delay pool number 1 is a class 2 delay pool as in the | |
3550 | above example, and is being used to strictly limit each host to 64kbps | |
3551 | (plus overheads), with no overall limit, the line is: | |
3552 | ||
3553 | delay_parameters 1 -1/-1 8000/8000 | |
3554 | ||
3555 | Note that the figure -1 is used to represent "unlimited". | |
3556 | ||
3557 | And, if delay pool number 2 is a class 3 delay pool as in the above | |
3558 | example, and you want to limit it to a total of 256kbps (strict limit) | |
3559 | with each 8-bit network permitted 64kbps (strict limit) and each | |
3560 | individual host permitted 4800bps with a bucket maximum size of 64kb | |
3561 | to permit a decent web page to be downloaded at a decent speed | |
3562 | (if the network is not being limited due to overuse) but slow down | |
3563 | large downloads more significantly: | |
3564 | ||
3565 | delay_parameters 2 32000/32000 8000/8000 600/8000 | |
3566 | ||
3567 | There must be one delay_parameters line for each delay pool. | |
3568 | ||
3569 | Finally, for a class 4 delay pool as in the example - each user will | |
3570 | be limited to 128Kb no matter how many workstations they are logged into.: | |
3571 | ||
3572 | delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000 | |
3573 | DOC_END | |
3574 | ||
3575 | NAME: delay_initial_bucket_level | |
3576 | COMMENT: (percent, 0-100) | |
3577 | TYPE: ushort | |
3578 | DEFAULT: 50 | |
3579 | IFDEF: DELAY_POOLS | |
3580 | LOC: Config.Delay.initial | |
3581 | DOC_START | |
3582 | The initial bucket percentage is used to determine how much is put | |
3583 | in each bucket when squid starts, is reconfigured, or first notices | |
3584 | a host accessing it (in class 2 and class 3, individual hosts and | |
3585 | networks only have buckets associated with them once they have been | |
3586 | "seen" by squid). | |
3587 | DOC_END | |
3588 | ||
3589 | COMMENT_START | |
3590 | WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS | |
3591 | ----------------------------------------------------------------------------- | |
3592 | COMMENT_END | |
3593 | ||
3594 | NAME: wccp_router | |
3595 | TYPE: address | |
3596 | LOC: Config.Wccp.router | |
3597 | DEFAULT: 0.0.0.0 | |
3598 | IFDEF: USE_WCCP | |
3599 | DOC_NONE | |
3600 | NAME: wccp2_router | |
3601 | TYPE: sockaddr_in_list | |
3602 | LOC: Config.Wccp2.router | |
3603 | DEFAULT: none | |
3604 | IFDEF: USE_WCCPv2 | |
3605 | DOC_START | |
3606 | Use this option to define your WCCP ``home'' router for | |
3607 | Squid. | |
3608 | ||
3609 | wccp_router supports a single WCCP(v1) router | |
3610 | ||
3611 | wccp2_router supports multiple WCCPv2 routers | |
3612 | ||
3613 | only one of the two may be used at the same time and defines | |
3614 | which version of WCCP to use. | |
3615 | DOC_END | |
3616 | ||
3617 | NAME: wccp_version | |
3618 | TYPE: int | |
3619 | LOC: Config.Wccp.version | |
3620 | DEFAULT: 4 | |
3621 | IFDEF: USE_WCCP | |
3622 | DOC_START | |
3623 | This directive is only relevant if you need to set up WCCP(v1) | |
3624 | to some very old and end-of-life Cisco routers. In all other | |
3625 | setups it must be left unset or at the default setting. | |
3626 | It defines an internal version in the WCCP(v1) protocol, | |
3627 | with version 4 being the officially documented protocol. | |
3628 | ||
3629 | According to some users, Cisco IOS 11.2 and earlier only | |
3630 | support WCCP version 3. If you're using that or an earlier | |
3631 | version of IOS, you may need to change this value to 3, otherwise | |
3632 | do not specify this parameter. | |
3633 | DOC_END | |
3634 | ||
3635 | NAME: wccp2_rebuild_wait | |
3636 | TYPE: onoff | |
3637 | LOC: Config.Wccp2.rebuildwait | |
3638 | DEFAULT: on | |
3639 | IFDEF: USE_WCCPv2 | |
3640 | DOC_START | |
3641 | If this is enabled Squid will wait for the cache dir rebuild to finish | |
3642 | before sending the first wccp2 HereIAm packet | |
3643 | DOC_END | |
3644 | ||
3645 | NAME: wccp2_forwarding_method | |
3646 | TYPE: int | |
3647 | LOC: Config.Wccp2.forwarding_method | |
3648 | DEFAULT: 1 | |
3649 | IFDEF: USE_WCCPv2 | |
3650 | DOC_START | |
3651 | WCCP2 allows the setting of forwarding methods between the | |
3652 | router/switch and the cache. Valid values are as follows: | |
3653 | ||
3654 | 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
3655 | 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
3656 | ||
3657 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
3658 | Cisco switches only support the L2 redirect assignment method. | |
3659 | DOC_END | |
3660 | ||
3661 | NAME: wccp2_return_method | |
3662 | TYPE: int | |
3663 | LOC: Config.Wccp2.return_method | |
3664 | DEFAULT: 1 | |
3665 | IFDEF: USE_WCCPv2 | |
3666 | DOC_START | |
3667 | WCCP2 allows the setting of return methods between the | |
3668 | router/switch and the cache for packets that the cache | |
3669 | decides not to handle. Valid values are as follows: | |
3670 | ||
3671 | 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel) | |
3672 | 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting) | |
3673 | ||
3674 | Currently (as of IOS 12.4) cisco routers only support GRE. | |
3675 | Cisco switches only support the L2 redirect assignment. | |
3676 | ||
3677 | If the "ip wccp redirect exclude in" command has been | |
3678 | enabled on the cache interface, then it is still safe for | |
3679 | the proxy server to use a l2 redirect method even if this | |
3680 | option is set to GRE. | |
3681 | DOC_END | |
3682 | ||
3683 | NAME: wccp2_assignment_method | |
3684 | TYPE: int | |
3685 | LOC: Config.Wccp2.assignment_method | |
3686 | DEFAULT: 1 | |
3687 | IFDEF: USE_WCCPv2 | |
3688 | DOC_START | |
3689 | WCCP2 allows the setting of methods to assign the WCCP hash | |
3690 | Valid values are as follows: | |
3691 | ||
3692 | 1 - Hash assignment | |
3693 | 2 - Mask assignment | |
3694 | ||
3695 | As a general rule, cisco routers support the hash assignment method | |
3696 | and cisco switches support the mask assignment method. | |
3697 | DOC_END | |
3698 | ||
3699 | NAME: wccp2_service | |
3700 | TYPE: wccp2_service | |
3701 | LOC: Config.Wccp2.info | |
3702 | DEFAULT: none | |
3703 | DEFAULT_IF_NONE: standard 0 | |
3704 | IFDEF: USE_WCCPv2 | |
3705 | DOC_START | |
3706 | WCCP2 allows for multiple traffic services. There are two | |
3707 | types: "standard" and "dynamic". The standard type defines | |
3708 | one service id - http (id 0). The dynamic service ids can be from | |
3709 | 51 to 255 inclusive. In order to use a dynamic service id | |
3710 | one must define the type of traffic to be redirected; this is done | |
3711 | using the wccp2_service_info option. | |
3712 | ||
3713 | The "standard" type does not require a wccp2_service_info option, | |
3714 | just specifying the service id will suffice. | |
3715 | ||
3716 | MD5 service authentication can be enabled by adding | |
3717 | "password=<password>" to the end of this service declaration. | |
3718 | ||
3719 | Examples: | |
3720 | ||
3721 | wccp2_service standard 0 # for the 'web-cache' standard service | |
3722 | wccp2_service dynamic 80 # a dynamic service type which will be | |
3723 | # fleshed out with subsequent options. | |
3724 | wccp2_service standard 0 password=foo | |
3725 | ||
3726 | DOC_END | |
3727 | ||
3728 | NAME: wccp2_service_info | |
3729 | TYPE: wccp2_service_info | |
3730 | LOC: Config.Wccp2.info | |
3731 | DEFAULT: none | |
3732 | IFDEF: USE_WCCPv2 | |
3733 | DOC_START | |
3734 | Dynamic WCCPv2 services require further information to define the | |
3735 | traffic you wish to have diverted. | |
3736 | ||
3737 | The format is: | |
3738 | ||
3739 | wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>.. | |
3740 | priority=<priority> ports=<port>,<port>.. | |
3741 | ||
3742 | The relevant WCCPv2 flags: | |
3743 | + src_ip_hash, dst_ip_hash | |
3744 | + source_port_hash, dest_port_hash | |
3745 | + src_ip_alt_hash, dst_ip_alt_hash | |
3746 | + src_port_alt_hash, dst_port_alt_hash | |
3747 | + ports_source | |
3748 | ||
3749 | The port list can be one to eight entries. | |
3750 | ||
3751 | Example: | |
3752 | ||
3753 | wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source | |
3754 | priority=240 ports=80 | |
3755 | ||
3756 | Note: the service id must have been defined by a previous | |
3757 | 'wccp2_service dynamic <id>' entry. | |
3758 | DOC_END | |
3759 | ||
3760 | NAME: wccp2_weight | |
3761 | TYPE: int | |
3762 | LOC: Config.Wccp2.weight | |
3763 | DEFAULT: 10000 | |
3764 | IFDEF: USE_WCCPv2 | |
3765 | DOC_START | |
3766 | Each cache server gets assigned a set of the destination | |
3767 | hash proportional to their weight. | |
3768 | DOC_END | |
3769 | ||
3770 | NAME: wccp_address | |
3771 | TYPE: address | |
3772 | LOC: Config.Wccp.address | |
3773 | DEFAULT: 0.0.0.0 | |
3774 | IFDEF: USE_WCCP | |
3775 | DOC_NONE | |
3776 | NAME: wccp2_address | |
3777 | TYPE: address | |
3778 | LOC: Config.Wccp2.address | |
3779 | DEFAULT: 0.0.0.0 | |
3780 | IFDEF: USE_WCCPv2 | |
3781 | DOC_START | |
3782 | Use this option if you require WCCP to use a specific | |
3783 | interface address. | |
3784 | ||
3785 | The default behavior is to not bind to any specific address. | |
3786 | DOC_END | |
3787 | ||
3788 | COMMENT_START | |
3789 | PERSISTENT CONNECTION HANDLING | |
3790 | ----------------------------------------------------------------------------- | |
3791 | ||
3792 | Also see "pconn_timeout" in the TIMEOUTS section | |
3793 | COMMENT_END | |
3794 | ||
3795 | NAME: client_persistent_connections | |
3796 | TYPE: onoff | |
3797 | LOC: Config.onoff.client_pconns | |
3798 | DEFAULT: on | |
3799 | DOC_NONE | |
3800 | ||
3801 | NAME: server_persistent_connections | |
3802 | TYPE: onoff | |
3803 | LOC: Config.onoff.server_pconns | |
3804 | DEFAULT: on | |
3805 | DOC_START | |
3806 | Persistent connection support for clients and servers. By | |
3807 | default, Squid uses persistent connections (when allowed) | |
3808 | with its clients and servers. You can use these options to | |
3809 | disable persistent connections with clients and/or servers. | |
3810 | DOC_END | |
3811 | ||
3812 | NAME: persistent_connection_after_error | |
3813 | TYPE: onoff | |
3814 | LOC: Config.onoff.error_pconns | |
3815 | DEFAULT: off | |
3816 | DOC_START | |
3817 | With this directive the use of persistent connections after | |
3818 | HTTP errors can be disabled. Useful if you have clients | |
3819 | who fail to handle errors on persistent connections proper. | |
3820 | DOC_END | |
3821 | ||
3822 | NAME: detect_broken_pconn | |
3823 | TYPE: onoff | |
3824 | LOC: Config.onoff.detect_broken_server_pconns | |
3825 | DEFAULT: off | |
3826 | DOC_START | |
3827 | Some servers have been found to incorrectly signal the use | |
3828 | of HTTP/1.0 persistent connections even on replies not | |
3829 | compatible, causing significant delays. This server problem | |
3830 | has mostly been seen on redirects. | |
3831 | ||
3832 | By enabling this directive Squid attempts to detect such | |
3833 | broken replies and automatically assume the reply is finished | |
3834 | after 10 seconds timeout. | |
3835 | DOC_END | |
3836 | ||
3837 | COMMENT_START | |
3838 | CACHE DIGEST OPTIONS | |
3839 | ----------------------------------------------------------------------------- | |
3840 | COMMENT_END | |
3841 | ||
3842 | NAME: digest_generation | |
3843 | IFDEF: USE_CACHE_DIGESTS | |
3844 | TYPE: onoff | |
3845 | LOC: Config.onoff.digest_generation | |
3846 | DEFAULT: on | |
3847 | DOC_START | |
3848 | This controls whether the server will generate a Cache Digest | |
3849 | of its contents. By default, Cache Digest generation is | |
3850 | enabled if Squid is compiled with --enable-cache-digests defined. | |
3851 | DOC_END | |
3852 | ||
3853 | NAME: digest_bits_per_entry | |
3854 | IFDEF: USE_CACHE_DIGESTS | |
3855 | TYPE: int | |
3856 | LOC: Config.digest.bits_per_entry | |
3857 | DEFAULT: 5 | |
3858 | DOC_START | |
3859 | This is the number of bits of the server's Cache Digest which | |
3860 | will be associated with the Digest entry for a given HTTP | |
3861 | Method and URL (public key) combination. The default is 5. | |
3862 | DOC_END | |
3863 | ||
3864 | NAME: digest_rebuild_period | |
3865 | IFDEF: USE_CACHE_DIGESTS | |
3866 | COMMENT: (seconds) | |
3867 | TYPE: time_t | |
3868 | LOC: Config.digest.rebuild_period | |
3869 | DEFAULT: 1 hour | |
3870 | DOC_START | |
3871 | This is the wait time between Cache Digest rebuilds. | |
3872 | DOC_END | |
3873 | ||
3874 | NAME: digest_rewrite_period | |
3875 | COMMENT: (seconds) | |
3876 | IFDEF: USE_CACHE_DIGESTS | |
3877 | TYPE: time_t | |
3878 | LOC: Config.digest.rewrite_period | |
3879 | DEFAULT: 1 hour | |
3880 | DOC_START | |
3881 | This is the wait time between Cache Digest writes to | |
3882 | disk. | |
3883 | DOC_END | |
3884 | ||
3885 | NAME: digest_swapout_chunk_size | |
3886 | COMMENT: (bytes) | |
3887 | TYPE: b_size_t | |
3888 | IFDEF: USE_CACHE_DIGESTS | |
3889 | LOC: Config.digest.swapout_chunk_size | |
3890 | DEFAULT: 4096 bytes | |
3891 | DOC_START | |
3892 | This is the number of bytes of the Cache Digest to write to | |
3893 | disk at a time. It defaults to 4096 bytes (4KB), the Squid | |
3894 | default swap page. | |
3895 | DOC_END | |
3896 | ||
3897 | NAME: digest_rebuild_chunk_percentage | |
3898 | COMMENT: (percent, 0-100) | |
3899 | IFDEF: USE_CACHE_DIGESTS | |
3900 | TYPE: int | |
3901 | LOC: Config.digest.rebuild_chunk_percentage | |
3902 | DEFAULT: 10 | |
3903 | DOC_START | |
3904 | This is the percentage of the Cache Digest to be scanned at a | |
3905 | time. By default it is set to 10% of the Cache Digest. | |
3906 | DOC_END | |
3907 | ||
3908 | COMMENT_START | |
3909 | SNMP OPTIONS | |
3910 | ----------------------------------------------------------------------------- | |
3911 | COMMENT_END | |
3912 | ||
3913 | NAME: snmp_port | |
3914 | TYPE: ushort | |
3915 | LOC: Config.Port.snmp | |
3916 | DEFAULT: 0 | |
3917 | IFDEF: SQUID_SNMP | |
3918 | DOC_START | |
3919 | The port number where Squid listens for SNMP requests. To enable | |
3920 | SNMP support set this to a suitable port number. Port number | |
3921 | 3401 is often used for the Squid SNMP agent. By default it's | |
3922 | set to "0" (disabled) | |
3923 | NOCOMMENT_START | |
3924 | #snmp_port 3401 | |
3925 | NOCOMMENT_END | |
3926 | DOC_END | |
3927 | ||
3928 | NAME: snmp_access | |
3929 | TYPE: acl_access | |
3930 | LOC: Config.accessList.snmp | |
3931 | DEFAULT: none | |
3932 | DEFAULT_IF_NONE: deny all | |
3933 | IFDEF: SQUID_SNMP | |
3934 | DOC_START | |
3935 | Allowing or denying access to the SNMP port. | |
3936 | ||
3937 | All access to the agent is denied by default. | |
3938 | usage: | |
3939 | ||
3940 | snmp_access allow|deny [!]aclname ... | |
3941 | ||
3942 | Example: | |
3943 | snmp_access allow snmppublic localhost | |
3944 | snmp_access deny all | |
3945 | DOC_END | |
3946 | ||
3947 | NAME: snmp_incoming_address | |
3948 | TYPE: address | |
3949 | LOC: Config.Addrs.snmp_incoming | |
3950 | DEFAULT: 0.0.0.0 | |
3951 | IFDEF: SQUID_SNMP | |
3952 | DOC_NONE | |
3953 | NAME: snmp_outgoing_address | |
3954 | TYPE: address | |
3955 | LOC: Config.Addrs.snmp_outgoing | |
3956 | DEFAULT: 255.255.255.255 | |
3957 | IFDEF: SQUID_SNMP | |
3958 | DOC_START | |
3959 | Just like 'udp_incoming_address' above, but for the SNMP port. | |
3960 | ||
3961 | snmp_incoming_address is used for the SNMP socket receiving | |
3962 | messages from SNMP agents. | |
3963 | snmp_outgoing_address is used for SNMP packets returned to SNMP | |
3964 | agents. | |
3965 | ||
3966 | The default snmp_incoming_address (0.0.0.0) is to listen on all | |
3967 | available network interfaces. | |
3968 | ||
3969 | If snmp_outgoing_address is set to 255.255.255.255 (the default) | |
3970 | it will use the same socket as snmp_incoming_address. Only | |
3971 | change this if you want to have SNMP replies sent using another | |
3972 | address than where this Squid listens for SNMP queries. | |
3973 | ||
3974 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have | |
3975 | the same value since they both use port 3401. | |
3976 | DOC_END | |
3977 | ||
3978 | COMMENT_START | |
3979 | ICP OPTIONS | |
3980 | ----------------------------------------------------------------------------- | |
3981 | COMMENT_END | |
3982 | ||
3983 | NAME: icp_port udp_port | |
3984 | TYPE: ushort | |
3985 | DEFAULT: 0 | |
3986 | LOC: Config.Port.icp | |
3987 | DOC_START | |
3988 | The port number where Squid sends and receives ICP queries to | |
3989 | and from neighbor caches. The standard UDP port for ICP is 3130. | |
3990 | Default is disabled (0). | |
3991 | NOCOMMENT_START | |
3992 | icp_port @DEFAULT_ICP_PORT@ | |
3993 | NOCOMMENT_END | |
3994 | DOC_END | |
3995 | ||
3996 | NAME: htcp_port | |
3997 | IFDEF: USE_HTCP | |
3998 | TYPE: ushort | |
3999 | DEFAULT: 0 | |
4000 | LOC: Config.Port.htcp | |
4001 | DOC_START | |
4002 | The port number where Squid sends and receives HTCP queries to | |
4003 | and from neighbor caches. To turn it on you want to set it to | |
4004 | 4827. By default it is set to "0" (disabled). | |
4005 | NOCOMMENT_START | |
4006 | #htcp_port 4827 | |
4007 | NOCOMMENT_END | |
4008 | DOC_END | |
4009 | ||
4010 | NAME: log_icp_queries | |
4011 | COMMENT: on|off | |
4012 | TYPE: onoff | |
4013 | DEFAULT: on | |
4014 | LOC: Config.onoff.log_udp | |
4015 | DOC_START | |
4016 | If set, ICP queries are logged to access.log. You may wish | |
4017 | do disable this if your ICP load is VERY high to speed things | |
4018 | up or to simplify log analysis. | |
4019 | DOC_END | |
4020 | ||
4021 | NAME: udp_incoming_address | |
4022 | TYPE: address | |
4023 | LOC:Config.Addrs.udp_incoming | |
4024 | DEFAULT: 0.0.0.0 | |
4025 | DOC_START | |
4026 | udp_incoming_address is used for UDP packets received from other | |
4027 | caches. | |
4028 | ||
4029 | The default behavior is to not bind to any specific address. | |
4030 | ||
4031 | Only change this if you want to have all UDP queries received on | |
4032 | a specific interface/address. | |
4033 | ||
4034 | NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS | |
4035 | modules. Altering it will affect all of them in the same manner. | |
4036 | ||
4037 | see also; udp_outgoing_address | |
4038 | ||
4039 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
4040 | have the same value since they both use the same port. | |
4041 | DOC_END | |
4042 | ||
4043 | NAME: udp_outgoing_address | |
4044 | TYPE: address | |
4045 | LOC: Config.Addrs.udp_outgoing | |
4046 | DEFAULT: 255.255.255.255 | |
4047 | DOC_START | |
4048 | udp_outgoing_address is used for UDP packets sent out to other | |
4049 | caches. | |
4050 | ||
4051 | The default behavior is to not bind to any specific address. | |
4052 | ||
4053 | Instead it will use the same socket as udp_incoming_address. | |
4054 | Only change this if you want to have UDP queries sent using another | |
4055 | address than where this Squid listens for UDP queries from other | |
4056 | caches. | |
4057 | ||
4058 | NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS | |
4059 | modules. Altering it will affect all of them in the same manner. | |
4060 | ||
4061 | see also; udp_incoming_address | |
4062 | ||
4063 | NOTE, udp_incoming_address and udp_outgoing_address can not | |
4064 | have the same value since they both use the same port. | |
4065 | DOC_END | |
4066 | ||
4067 | NAME: icp_hit_stale | |
4068 | COMMENT: on|off | |
4069 | TYPE: onoff | |
4070 | DEFAULT: off | |
4071 | LOC: Config.onoff.icp_hit_stale | |
4072 | DOC_START | |
4073 | If you want to return ICP_HIT for stale cache objects, set this | |
4074 | option to 'on'. If you have sibling relationships with caches | |
4075 | in other administrative domains, this should be 'off'. If you only | |
4076 | have sibling relationships with caches under your control, | |
4077 | it is probably okay to set this to 'on'. | |
4078 | If set to 'on', your siblings should use the option "allow-miss" | |
4079 | on their cache_peer lines for connecting to you. | |
4080 | DOC_END | |
4081 | ||
4082 | NAME: minimum_direct_hops | |
4083 | TYPE: int | |
4084 | DEFAULT: 4 | |
4085 | LOC: Config.minDirectHops | |
4086 | DOC_START | |
4087 | If using the ICMP pinging stuff, do direct fetches for sites | |
4088 | which are no more than this many hops away. | |
4089 | DOC_END | |
4090 | ||
4091 | NAME: minimum_direct_rtt | |
4092 | TYPE: int | |
4093 | DEFAULT: 400 | |
4094 | LOC: Config.minDirectRtt | |
4095 | DOC_START | |
4096 | If using the ICMP pinging stuff, do direct fetches for sites | |
4097 | which are no more than this many rtt milliseconds away. | |
4098 | DOC_END | |
4099 | ||
4100 | NAME: netdb_low | |
4101 | TYPE: int | |
4102 | DEFAULT: 900 | |
4103 | LOC: Config.Netdb.low | |
4104 | DOC_NONE | |
4105 | ||
4106 | NAME: netdb_high | |
4107 | TYPE: int | |
4108 | DEFAULT: 1000 | |
4109 | LOC: Config.Netdb.high | |
4110 | DOC_START | |
4111 | The low and high water marks for the ICMP measurement | |
4112 | database. These are counts, not percents. The defaults are | |
4113 | 900 and 1000. When the high water mark is reached, database | |
4114 | entries will be deleted until the low mark is reached. | |
4115 | DOC_END | |
4116 | ||
4117 | NAME: netdb_ping_period | |
4118 | TYPE: time_t | |
4119 | LOC: Config.Netdb.period | |
4120 | DEFAULT: 5 minutes | |
4121 | DOC_START | |
4122 | The minimum period for measuring a site. There will be at | |
4123 | least this much delay between successive pings to the same | |
4124 | network. The default is five minutes. | |
4125 | DOC_END | |
4126 | ||
4127 | NAME: query_icmp | |
4128 | COMMENT: on|off | |
4129 | TYPE: onoff | |
4130 | DEFAULT: off | |
4131 | LOC: Config.onoff.query_icmp | |
4132 | DOC_START | |
4133 | If you want to ask your peers to include ICMP data in their ICP | |
4134 | replies, enable this option. | |
4135 | ||
4136 | If your peer has configured Squid (during compilation) with | |
4137 | '--enable-icmp' that peer will send ICMP pings to origin server | |
4138 | sites of the URLs it receives. If you enable this option the | |
4139 | ICP replies from that peer will include the ICMP data (if available). | |
4140 | Then, when choosing a parent cache, Squid will choose the parent with | |
4141 | the minimal RTT to the origin server. When this happens, the | |
4142 | hierarchy field of the access.log will be | |
4143 | "CLOSEST_PARENT_MISS". This option is off by default. | |
4144 | DOC_END | |
4145 | ||
4146 | NAME: test_reachability | |
4147 | COMMENT: on|off | |
4148 | TYPE: onoff | |
4149 | DEFAULT: off | |
4150 | LOC: Config.onoff.test_reachability | |
4151 | DOC_START | |
4152 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
4153 | instead of ICP_MISS if the target host is NOT in the ICMP | |
4154 | database, or has a zero RTT. | |
4155 | DOC_END | |
4156 | ||
4157 | NAME: icp_query_timeout | |
4158 | COMMENT: (msec) | |
4159 | DEFAULT: 0 | |
4160 | TYPE: int | |
4161 | LOC: Config.Timeout.icp_query | |
4162 | DOC_START | |
4163 | Normally Squid will automatically determine an optimal ICP | |
4164 | query timeout value based on the round-trip-time of recent ICP | |
4165 | queries. If you want to override the value determined by | |
4166 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
4167 | value is specified in MILLISECONDS, so, to use a 2-second | |
4168 | timeout (the old default), you would write: | |
4169 | ||
4170 | icp_query_timeout 2000 | |
4171 | DOC_END | |
4172 | ||
4173 | NAME: maximum_icp_query_timeout | |
4174 | COMMENT: (msec) | |
4175 | DEFAULT: 2000 | |
4176 | TYPE: int | |
4177 | LOC: Config.Timeout.icp_query_max | |
4178 | DOC_START | |
4179 | Normally the ICP query timeout is determined dynamically. But | |
4180 | sometimes it can lead to very large values (say 5 seconds). | |
4181 | Use this option to put an upper limit on the dynamic timeout | |
4182 | value. Do NOT use this option to always use a fixed (instead | |
4183 | of a dynamic) timeout value. To set a fixed timeout see the | |
4184 | 'icp_query_timeout' directive. | |
4185 | DOC_END | |
4186 | ||
4187 | NAME: minimum_icp_query_timeout | |
4188 | COMMENT: (msec) | |
4189 | DEFAULT: 5 | |
4190 | TYPE: int | |
4191 | LOC: Config.Timeout.icp_query_min | |
4192 | DOC_START | |
4193 | Normally the ICP query timeout is determined dynamically. But | |
4194 | sometimes it can lead to very small timeouts, even lower than | |
4195 | the normal latency variance on your link due to traffic. | |
4196 | Use this option to put an lower limit on the dynamic timeout | |
4197 | value. Do NOT use this option to always use a fixed (instead | |
4198 | of a dynamic) timeout value. To set a fixed timeout see the | |
4199 | 'icp_query_timeout' directive. | |
4200 | DOC_END | |
4201 | ||
4202 | NAME: background_ping_rate | |
4203 | COMMENT: time-units | |
4204 | TYPE: time_t | |
4205 | DEFAULT: 10 seconds | |
4206 | LOC: Config.backgroundPingRate | |
4207 | DOC_START | |
4208 | Controls how often the ICP pings are sent to siblings that | |
4209 | have background-ping set. | |
4210 | DOC_END | |
4211 | ||
4212 | COMMENT_START | |
4213 | MULTICAST ICP OPTIONS | |
4214 | ----------------------------------------------------------------------------- | |
4215 | COMMENT_END | |
4216 | ||
4217 | NAME: mcast_groups | |
4218 | TYPE: wordlist | |
4219 | LOC: Config.mcast_group_list | |
4220 | DEFAULT: none | |
4221 | DOC_START | |
4222 | This tag specifies a list of multicast groups which your server | |
4223 | should join to receive multicasted ICP queries. | |
4224 | ||
4225 | NOTE! Be very careful what you put here! Be sure you | |
4226 | understand the difference between an ICP _query_ and an ICP | |
4227 | _reply_. This option is to be set only if you want to RECEIVE | |
4228 | multicast queries. Do NOT set this option to SEND multicast | |
4229 | ICP (use cache_peer for that). ICP replies are always sent via | |
4230 | unicast, so this option does not affect whether or not you will | |
4231 | receive replies from multicast group members. | |
4232 | ||
4233 | You must be very careful to NOT use a multicast address which | |
4234 | is already in use by another group of caches. | |
4235 | ||
4236 | If you are unsure about multicast, please read the Multicast | |
4237 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). | |
4238 | ||
4239 | Usage: mcast_groups 239.128.16.128 224.0.1.20 | |
4240 | ||
4241 | By default, Squid doesn't listen on any multicast groups. | |
4242 | DOC_END | |
4243 | ||
4244 | NAME: mcast_miss_addr | |
4245 | IFDEF: MULTICAST_MISS_STREAM | |
4246 | TYPE: address | |
4247 | LOC: Config.mcast_miss.addr | |
4248 | DEFAULT: 255.255.255.255 | |
4249 | DOC_START | |
4250 | If you enable this option, every "cache miss" URL will | |
4251 | be sent out on the specified multicast address. | |
4252 | ||
4253 | Do not enable this option unless you are are absolutely | |
4254 | certain you understand what you are doing. | |
4255 | DOC_END | |
4256 | ||
4257 | NAME: mcast_miss_ttl | |
4258 | IFDEF: MULTICAST_MISS_STREAM | |
4259 | TYPE: ushort | |
4260 | LOC: Config.mcast_miss.ttl | |
4261 | DEFAULT: 16 | |
4262 | DOC_START | |
4263 | This is the time-to-live value for packets multicasted | |
4264 | when multicasting off cache miss URLs is enabled. By | |
4265 | default this is set to 'site scope', i.e. 16. | |
4266 | DOC_END | |
4267 | ||
4268 | NAME: mcast_miss_port | |
4269 | IFDEF: MULTICAST_MISS_STREAM | |
4270 | TYPE: ushort | |
4271 | LOC: Config.mcast_miss.port | |
4272 | DEFAULT: 3135 | |
4273 | DOC_START | |
4274 | This is the port number to be used in conjunction with | |
4275 | 'mcast_miss_addr'. | |
4276 | DOC_END | |
4277 | ||
4278 | NAME: mcast_miss_encode_key | |
4279 | IFDEF: MULTICAST_MISS_STREAM | |
4280 | TYPE: string | |
4281 | LOC: Config.mcast_miss.encode_key | |
4282 | DEFAULT: XXXXXXXXXXXXXXXX | |
4283 | DOC_START | |
4284 | The URLs that are sent in the multicast miss stream are | |
4285 | encrypted. This is the encryption key. | |
4286 | DOC_END | |
4287 | ||
4288 | NAME: mcast_icp_query_timeout | |
4289 | COMMENT: (msec) | |
4290 | DEFAULT: 2000 | |
4291 | TYPE: int | |
4292 | LOC: Config.Timeout.mcast_icp_query | |
4293 | DOC_START | |
4294 | For multicast peers, Squid regularly sends out ICP "probes" to | |
4295 | count how many other peers are listening on the given multicast | |
4296 | address. This value specifies how long Squid should wait to | |
4297 | count all the replies. The default is 2000 msec, or 2 | |
4298 | seconds. | |
4299 | DOC_END | |
4300 | ||
4301 | COMMENT_START | |
4302 | INTERNAL ICON OPTIONS | |
4303 | ----------------------------------------------------------------------------- | |
4304 | COMMENT_END | |
4305 | ||
4306 | NAME: icon_directory | |
4307 | TYPE: string | |
4308 | LOC: Config.icons.directory | |
4309 | DEFAULT: @DEFAULT_ICON_DIR@ | |
4310 | DOC_START | |
4311 | Where the icons are stored. These are normally kept in | |
4312 | @DEFAULT_ICON_DIR@ | |
4313 | DOC_END | |
4314 | ||
4315 | NAME: global_internal_static | |
4316 | TYPE: onoff | |
4317 | LOC: Config.onoff.global_internal_static | |
4318 | DEFAULT: on | |
4319 | DOC_START | |
4320 | This directive controls is Squid should intercept all requests for | |
4321 | /squid-internal-static/ no matter which host the URL is requesting | |
4322 | (default on setting), or if nothing special should be done for | |
4323 | such URLs (off setting). The purpose of this directive is to make | |
4324 | icons etc work better in complex cache hierarchies where it may | |
4325 | not always be possible for all corners in the cache mesh to reach | |
4326 | the server generating a directory listing. | |
4327 | DOC_END | |
4328 | ||
4329 | NAME: short_icon_urls | |
4330 | TYPE: onoff | |
4331 | LOC: Config.icons.use_short_names | |
4332 | DEFAULT: on | |
4333 | DOC_START | |
4334 | If this is enabled Squid will use short URLs for icons. | |
4335 | If disabled it will revert to the old behavior of including | |
4336 | it's own name and port in the URL. | |
4337 | ||
4338 | If you run a complex cache hierarchy with a mix of Squid and | |
4339 | other proxies you may need to disable this directive. | |
4340 | DOC_END | |
4341 | ||
4342 | COMMENT_START | |
4343 | ERROR PAGE OPTIONS | |
4344 | ----------------------------------------------------------------------------- | |
4345 | COMMENT_END | |
4346 | ||
4347 | NAME: error_directory | |
4348 | TYPE: string | |
4349 | LOC: Config.errorDirectory | |
4350 | DEFAULT: @DEFAULT_ERROR_DIR@ | |
4351 | DOC_START | |
4352 | If you wish to create your own versions of the default | |
4353 | (English) error files, either to customize them to suit your | |
4354 | language or company copy the template English files to another | |
4355 | directory and point this tag at them. | |
4356 | ||
4357 | The squid developers are interested in making squid available in | |
4358 | a wide variety of languages. If you are making translations for a | |
4359 | langauge that Squid does not currently provide please consider | |
4360 | contributing your translation back to the project. | |
4361 | DOC_END | |
4362 | ||
4363 | NAME: err_html_text | |
4364 | TYPE: eol | |
4365 | LOC: Config.errHtmlText | |
4366 | DEFAULT: none | |
4367 | DOC_START | |
4368 | HTML text to include in error messages. Make this a "mailto" | |
4369 | URL to your admin address, or maybe just a link to your | |
4370 | organizations Web page. | |
4371 | ||
4372 | To include this in your error messages, you must rewrite | |
4373 | the error template files (found in the "errors" directory). | |
4374 | Wherever you want the 'err_html_text' line to appear, | |
4375 | insert a %L tag in the error template file. | |
4376 | DOC_END | |
4377 | ||
4378 | NAME: email_err_data | |
4379 | COMMENT: on|off | |
4380 | TYPE: onoff | |
4381 | LOC: Config.onoff.emailErrData | |
4382 | DEFAULT: on | |
4383 | DOC_START | |
4384 | If enabled, information about the occurred error will be | |
4385 | included in the mailto links of the ERR pages (if %W is set) | |
4386 | so that the email body contains the data. | |
4387 | Syntax is <A HREF="mailto:%w%W">%w</A> | |
4388 | DOC_END | |
4389 | ||
4390 | NAME: deny_info | |
4391 | TYPE: denyinfo | |
4392 | LOC: Config.denyInfoList | |
4393 | DEFAULT: none | |
4394 | DOC_START | |
4395 | Usage: deny_info err_page_name acl | |
4396 | or deny_info http://... acl | |
4397 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
4398 | ||
4399 | This can be used to return a ERR_ page for requests which | |
4400 | do not pass the 'http_access' rules. Squid remembers the last | |
4401 | acl it evaluated in http_access, and if a 'deny_info' line exists | |
4402 | for that ACL Squid returns a corresponding error page. | |
4403 | ||
4404 | The acl is typically the last acl on the http_access deny line which | |
4405 | denied access. The exceptions to this rule are: | |
4406 | - When Squid needs to request authentication credentials. It's then | |
4407 | the first authentication related acl encountered | |
4408 | - When none of the http_access lines matches. It's then the last | |
4409 | acl processed on the last http_access line. | |
4410 | ||
4411 | You may use ERR_ pages that come with Squid or create your own pages | |
4412 | and put them into the configured errors/ directory. | |
4413 | ||
4414 | Alternatively you can specify an error URL. The browsers will | |
4415 | get redirected (302) to the specified URL. %s in the redirection | |
4416 | URL will be replaced by the requested URL. | |
4417 | ||
4418 | Alternatively you can tell Squid to reset the TCP connection | |
4419 | by specifying TCP_RESET. | |
4420 | DOC_END | |
4421 | ||
4422 | COMMENT_START | |
4423 | OPTIONS INFLUENCING REQUEST FORWARDING | |
4424 | ----------------------------------------------------------------------------- | |
4425 | COMMENT_END | |
4426 | ||
4427 | NAME: nonhierarchical_direct | |
4428 | TYPE: onoff | |
4429 | LOC: Config.onoff.nonhierarchical_direct | |
4430 | DEFAULT: on | |
4431 | DOC_START | |
4432 | By default, Squid will send any non-hierarchical requests | |
4433 | (matching hierarchy_stoplist or not cacheable request type) direct | |
4434 | to origin servers. | |
4435 | ||
4436 | If you set this to off, Squid will prefer to send these | |
4437 | requests to parents. | |
4438 | ||
4439 | Note that in most configurations, by turning this off you will only | |
4440 | add latency to these request without any improvement in global hit | |
4441 | ratio. | |
4442 | ||
4443 | If you are inside an firewall see never_direct instead of | |
4444 | this directive. | |
4445 | DOC_END | |
4446 | ||
4447 | NAME: prefer_direct | |
4448 | TYPE: onoff | |
4449 | LOC: Config.onoff.prefer_direct | |
4450 | DEFAULT: off | |
4451 | DOC_START | |
4452 | Normally Squid tries to use parents for most requests. If you for some | |
4453 | reason like it to first try going direct and only use a parent if | |
4454 | going direct fails set this to on. | |
4455 | ||
4456 | By combining nonhierarchical_direct off and prefer_direct on you | |
4457 | can set up Squid to use a parent as a backup path if going direct | |
4458 | fails. | |
4459 | ||
4460 | Note: If you want Squid to use parents for all requests see | |
4461 | the never_direct directive. prefer_direct only modifies how Squid | |
4462 | acts on cacheable requests. | |
4463 | DOC_END | |
4464 | ||
4465 | NAME: always_direct | |
4466 | TYPE: acl_access | |
4467 | LOC: Config.accessList.AlwaysDirect | |
4468 | DEFAULT: none | |
4469 | DOC_START | |
4470 | Usage: always_direct allow|deny [!]aclname ... | |
4471 | ||
4472 | Here you can use ACL elements to specify requests which should | |
4473 | ALWAYS be forwarded by Squid to the origin servers without using | |
4474 | any peers. For example, to always directly forward requests for | |
4475 | local servers ignoring any parents or siblings you may have use | |
4476 | something like: | |
4477 | ||
4478 | acl local-servers dstdomain my.domain.net | |
4479 | always_direct allow local-servers | |
4480 | ||
4481 | To always forward FTP requests directly, use | |
4482 | ||
4483 | acl FTP proto FTP | |
4484 | always_direct allow FTP | |
4485 | ||
4486 | NOTE: There is a similar, but opposite option named | |
4487 | 'never_direct'. You need to be aware that "always_direct deny | |
4488 | foo" is NOT the same thing as "never_direct allow foo". You | |
4489 | may need to use a deny rule to exclude a more-specific case of | |
4490 | some other rule. Example: | |
4491 | ||
4492 | acl local-external dstdomain external.foo.net | |
4493 | acl local-servers dstdomain .foo.net | |
4494 | always_direct deny local-external | |
4495 | always_direct allow local-servers | |
4496 | ||
4497 | NOTE: If your goal is to make the client forward the request | |
4498 | directly to the origin server bypassing Squid then this needs | |
4499 | to be done in the client configuration. Squid configuration | |
4500 | can only tell Squid how Squid should fetch the object. | |
4501 | ||
4502 | NOTE: This directive is not related to caching. The replies | |
4503 | is cached as usual even if you use always_direct. To not cache | |
4504 | the replies see no_cache. | |
4505 | ||
4506 | This option replaces some v1.1 options such as local_domain | |
4507 | and local_ip. | |
4508 | DOC_END | |
4509 | ||
4510 | NAME: never_direct | |
4511 | TYPE: acl_access | |
4512 | LOC: Config.accessList.NeverDirect | |
4513 | DEFAULT: none | |
4514 | DOC_START | |
4515 | Usage: never_direct allow|deny [!]aclname ... | |
4516 | ||
4517 | never_direct is the opposite of always_direct. Please read | |
4518 | the description for always_direct if you have not already. | |
4519 | ||
4520 | With 'never_direct' you can use ACL elements to specify | |
4521 | requests which should NEVER be forwarded directly to origin | |
4522 | servers. For example, to force the use of a proxy for all | |
4523 | requests, except those in your local domain use something like: | |
4524 | ||
4525 | acl local-servers dstdomain .foo.net | |
4526 | acl all src 0.0.0.0/0.0.0.0 | |
4527 | never_direct deny local-servers | |
4528 | never_direct allow all | |
4529 | ||
4530 | or if Squid is inside a firewall and there are local intranet | |
4531 | servers inside the firewall use something like: | |
4532 | ||
4533 | acl local-intranet dstdomain .foo.net | |
4534 | acl local-external dstdomain external.foo.net | |
4535 | always_direct deny local-external | |
4536 | always_direct allow local-intranet | |
4537 | never_direct allow all | |
4538 | ||
4539 | This option replaces some v1.1 options such as inside_firewall | |
4540 | and firewall_ip. | |
4541 | DOC_END | |
4542 | ||
4543 | COMMENT_START | |
4544 | ADVANCED NETWORKING OPTIONS | |
4545 | ----------------------------------------------------------------------------- | |
4546 | COMMENT_END | |
4547 | ||
4548 | NAME: incoming_icp_average | |
4549 | TYPE: int | |
4550 | DEFAULT: 6 | |
4551 | LOC: Config.comm_incoming.icp_average | |
4552 | DOC_NONE | |
4553 | ||
4554 | NAME: incoming_http_average | |
4555 | TYPE: int | |
4556 | DEFAULT: 4 | |
4557 | LOC: Config.comm_incoming.http_average | |
4558 | DOC_NONE | |
4559 | ||
4560 | NAME: incoming_dns_average | |
4561 | TYPE: int | |
4562 | DEFAULT: 4 | |
4563 | LOC: Config.comm_incoming.dns_average | |
4564 | DOC_NONE | |
4565 | ||
4566 | NAME: min_icp_poll_cnt | |
4567 | TYPE: int | |
4568 | DEFAULT: 8 | |
4569 | LOC: Config.comm_incoming.icp_min_poll | |
4570 | DOC_NONE | |
4571 | ||
4572 | NAME: min_dns_poll_cnt | |
4573 | TYPE: int | |
4574 | DEFAULT: 8 | |
4575 | LOC: Config.comm_incoming.dns_min_poll | |
4576 | DOC_NONE | |
4577 | ||
4578 | NAME: min_http_poll_cnt | |
4579 | TYPE: int | |
4580 | DEFAULT: 8 | |
4581 | LOC: Config.comm_incoming.http_min_poll | |
4582 | DOC_START | |
4583 | Heavy voodoo here. I can't even believe you are reading this. | |
4584 | Are you crazy? Don't even think about adjusting these unless | |
4585 | you understand the algorithms in comm_select.c first! | |
4586 | DOC_END | |
4587 | ||
4588 | NAME: accept_filter | |
4589 | TYPE: string | |
4590 | DEFAULT: none | |
4591 | LOC: Config.accept_filter | |
4592 | DOC_START | |
4593 | FreeBSD: | |
4594 | ||
4595 | The name of an accept(2) filter to install on Squid's | |
4596 | listen socket(s). This feature is perhaps specific to | |
4597 | FreeBSD and requires support in the kernel. | |
4598 | ||
4599 | The 'httpready' filter delays delivering new connections | |
4600 | to Squid until a full HTTP request has been received. | |
4601 | See the accf_http(9) man page for details. | |
4602 | ||
4603 | The 'dataready' filter delays delivering new connections | |
4604 | to Squid until there is some data to process. | |
4605 | See the accf_dataready(9) man page for details. | |
4606 | ||
4607 | Linux: | |
4608 | ||
4609 | The 'data' filter delays delivering of new connections | |
4610 | to Squid until there is some data to process by TCP_ACCEPT_DEFER. | |
4611 | You may optionally specify a number of seconds to wait by | |
4612 | 'data=N' where N is the number of seconds. Defaults to 30 | |
4613 | if not specified. See the tcp(7) man page for details. | |
4614 | EXAMPLE: | |
4615 | # FreeBSD | |
4616 | accept_filter httpready | |
4617 | # Linux | |
4618 | accept_filter data | |
4619 | DOC_END | |
4620 | ||
4621 | NAME: tcp_recv_bufsize | |
4622 | COMMENT: (bytes) | |
4623 | TYPE: b_size_t | |
4624 | DEFAULT: 0 bytes | |
4625 | LOC: Config.tcpRcvBufsz | |
4626 | DOC_START | |
4627 | Size of receive buffer to set for TCP sockets. Probably just | |
4628 | as easy to change your kernel's default. Set to zero to use | |
4629 | the default buffer size. | |
4630 | DOC_END | |
4631 | ||
4632 | COMMENT_START | |
4633 | ICAP OPTIONS | |
4634 | ----------------------------------------------------------------------------- | |
4635 | COMMENT_END | |
4636 | ||
4637 | NAME: icap_enable | |
4638 | TYPE: onoff | |
4639 | IFDEF: ICAP_CLIENT | |
4640 | COMMENT: on|off | |
4641 | LOC: TheICAPConfig.onoff | |
4642 | DEFAULT: off | |
4643 | DOC_START | |
4644 | If you want to enable the ICAP module support, set this to on. | |
4645 | DOC_END | |
4646 | ||
4647 | NAME: icap_connect_timeout | |
4648 | TYPE: time_t | |
4649 | DEFAULT: none | |
4650 | LOC: TheICAPConfig.connect_timeout_raw | |
4651 | IFDEF: ICAP_CLIENT | |
4652 | DOC_START | |
4653 | This parameter specifies how long to wait for the TCP connect to | |
4654 | the requested ICAP server to complete before giving up and either | |
4655 | terminating the HTTP transaction or bypassing the failure. | |
4656 | ||
4657 | The default for optional services is peer_connect_timeout. | |
4658 | The default for essential services is connect_timeout. | |
4659 | If this option is explicitly set, its value applies to all services. | |
4660 | DOC_END | |
4661 | ||
4662 | NAME: icap_io_timeout | |
4663 | COMMENT: time-units | |
4664 | TYPE: time_t | |
4665 | DEFAULT: none | |
4666 | LOC: TheICAPConfig.io_timeout_raw | |
4667 | IFDEF: ICAP_CLIENT | |
4668 | DOC_START | |
4669 | This parameter specifies how long to wait for an I/O activity on | |
4670 | an established, active ICAP connection before giving up and | |
4671 | either terminating the HTTP transaction or bypassing the | |
4672 | failure. | |
4673 | ||
4674 | The default is read_timeout. | |
4675 | DOC_END | |
4676 | ||
4677 | NAME: icap_service_failure_limit | |
4678 | TYPE: int | |
4679 | IFDEF: ICAP_CLIENT | |
4680 | LOC: TheICAPConfig.service_failure_limit | |
4681 | DEFAULT: 10 | |
4682 | DOC_START | |
4683 | The limit specifies the number of failures that Squid tolerates | |
4684 | when establishing a new TCP connection with an ICAP service. If | |
4685 | the number of failures exceeds the limit, the ICAP service is | |
4686 | not used for new ICAP requests until it is time to refresh its | |
4687 | OPTIONS. The per-service failure counter is reset to zero each | |
4688 | time Squid fetches new service OPTIONS. | |
4689 | ||
4690 | A negative value disables the limit. Without the limit, an ICAP | |
4691 | service will not be considered down due to connectivity failures | |
4692 | between ICAP OPTIONS requests. | |
4693 | DOC_END | |
4694 | ||
4695 | NAME: icap_service_revival_delay | |
4696 | TYPE: int | |
4697 | IFDEF: ICAP_CLIENT | |
4698 | LOC: TheICAPConfig.service_revival_delay | |
4699 | DEFAULT: 180 | |
4700 | DOC_START | |
4701 | The delay specifies the number of seconds to wait after an ICAP | |
4702 | OPTIONS request failure before requesting the options again. The | |
4703 | failed ICAP service is considered "down" until fresh OPTIONS are | |
4704 | fetched. | |
4705 | ||
4706 | The actual delay cannot be smaller than the hardcoded minimum | |
4707 | delay of 30 seconds. | |
4708 | DOC_END | |
4709 | ||
4710 | NAME: icap_preview_enable | |
4711 | TYPE: onoff | |
4712 | IFDEF: ICAP_CLIENT | |
4713 | COMMENT: on|off | |
4714 | LOC: TheICAPConfig.preview_enable | |
4715 | DEFAULT: on | |
4716 | DOC_START | |
4717 | The ICAP Preview feature allows the ICAP server to handle the | |
4718 | HTTP message by looking only at the beginning of the message body | |
4719 | or even without receiving the body at all. In some environments, | |
4720 | previews greatly speedup ICAP processing. | |
4721 | ||
4722 | During an ICAP OPTIONS transaction, the server may tell Squid what | |
4723 | HTTP messages should be previewed and how big the preview should be. | |
4724 | Squid will not use Preview if the server did not request one. | |
4725 | ||
4726 | To disable ICAP Preview for all ICAP services, regardless of | |
4727 | individual ICAP server OPTIONS responses, set this option to "off". | |
4728 | Example: | |
4729 | icap_preview_enable off | |
4730 | DOC_END | |
4731 | ||
4732 | NAME: icap_preview_size | |
4733 | TYPE: int | |
4734 | IFDEF: ICAP_CLIENT | |
4735 | LOC: TheICAPConfig.preview_size | |
4736 | DEFAULT: -1 | |
4737 | DOC_START | |
4738 | The default size of preview data to be sent to the ICAP server. | |
4739 | -1 means no preview. This value might be overwritten on a per server | |
4740 | basis by OPTIONS requests. | |
4741 | DOC_END | |
4742 | ||
4743 | NAME: icap_default_options_ttl | |
4744 | TYPE: int | |
4745 | IFDEF: ICAP_CLIENT | |
4746 | LOC: TheICAPConfig.default_options_ttl | |
4747 | DEFAULT: 60 | |
4748 | DOC_START | |
4749 | The default TTL value for ICAP OPTIONS responses that don't have | |
4750 | an Options-TTL header. | |
4751 | DOC_END | |
4752 | ||
4753 | NAME: icap_persistent_connections | |
4754 | TYPE: onoff | |
4755 | IFDEF: ICAP_CLIENT | |
4756 | COMMENT: on|off | |
4757 | LOC: TheICAPConfig.reuse_connections | |
4758 | DEFAULT: on | |
4759 | DOC_START | |
4760 | Whether or not Squid should use persistent connections to | |
4761 | an ICAP server. | |
4762 | DOC_END | |
4763 | ||
4764 | NAME: icap_send_client_ip | |
4765 | TYPE: onoff | |
4766 | IFDEF: ICAP_CLIENT | |
4767 | COMMENT: on|off | |
4768 | LOC: TheICAPConfig.send_client_ip | |
4769 | DEFAULT: off | |
4770 | DOC_START | |
4771 | This adds the header "X-Client-IP" to ICAP requests. | |
4772 | DOC_END | |
4773 | ||
4774 | NAME: icap_send_client_username | |
4775 | TYPE: onoff | |
4776 | IFDEF: ICAP_CLIENT | |
4777 | COMMENT: on|off | |
4778 | LOC: TheICAPConfig.send_client_username | |
4779 | DEFAULT: off | |
4780 | DOC_START | |
4781 | This sends authenticated HTTP client username (if available) to | |
4782 | the ICAP service. The username value is encoded based on the | |
4783 | icap_client_username_encode option and is sent using the header | |
4784 | specified by the icap_client_username_header option. | |
4785 | DOC_END | |
4786 | ||
4787 | NAME: icap_client_username_header | |
4788 | TYPE: string | |
4789 | IFDEF: ICAP_CLIENT | |
4790 | LOC: TheICAPConfig.client_username_header | |
4791 | DEFAULT: X-Client-Username | |
4792 | DOC_START | |
4793 | ICAP request header name to use for send_client_username. | |
4794 | DOC_END | |
4795 | ||
4796 | NAME: icap_client_username_encode | |
4797 | TYPE: onoff | |
4798 | IFDEF: ICAP_CLIENT | |
4799 | COMMENT: on|off | |
4800 | LOC: TheICAPConfig.client_username_encode | |
4801 | DEFAULT: off | |
4802 | DOC_START | |
4803 | Whether to base64 encode the authenticated client username. | |
4804 | DOC_END | |
4805 | ||
4806 | NAME: icap_service | |
4807 | TYPE: icap_service_type | |
4808 | IFDEF: ICAP_CLIENT | |
4809 | LOC: TheICAPConfig | |
4810 | DEFAULT: none | |
4811 | DOC_START | |
4812 | Defines a single ICAP service | |
4813 | ||
4814 | icap_service servicename vectoring_point bypass service_url | |
4815 | ||
4816 | vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache | |
4817 | This specifies at which point of transaction processing the | |
4818 | ICAP service should be activated. *_postcache vectoring points | |
4819 | are not yet supported. | |
4820 | bypass = 1|0 | |
4821 | If set to 1, the ICAP service is treated as optional. If the | |
4822 | service cannot be reached or malfunctions, Squid will try to | |
4823 | ignore any errors and process the message as if the service | |
4824 | was not enabled. No all ICAP errors can be bypassed. | |
4825 | If set to 0, the ICAP service is treated as essential and all | |
4826 | ICAP errors will result in an error page returned to the | |
4827 | HTTP client. | |
4828 | service_url = icap://servername:port/service | |
4829 | ||
4830 | Example: | |
4831 | icap_service service_1 reqmod_precache 0 icap://icap1.mydomain.net:1344/reqmod | |
4832 | icap_service service_2 respmod_precache 0 icap://icap2.mydomain.net:1344/respmod | |
4833 | DOC_END | |
4834 | ||
4835 | NAME: icap_class | |
4836 | TYPE: icap_class_type | |
4837 | IFDEF: ICAP_CLIENT | |
4838 | LOC: TheICAPConfig | |
4839 | DEFAULT: none | |
4840 | DOC_START | |
4841 | Defines an ICAP service chain. Eventually, multiple services per | |
4842 | vectoring point will be supported. For now, please specify a single | |
4843 | service per class: | |
4844 | ||
4845 | icap_class classname servicename | |
4846 | ||
4847 | Example: | |
4848 | icap_class class_1 service_1 | |
4849 | icap class class_2 service_1 | |
4850 | icap class class_3 service_3 | |
4851 | DOC_END | |
4852 | ||
4853 | NAME: icap_access | |
4854 | TYPE: icap_access_type | |
4855 | IFDEF: ICAP_CLIENT | |
4856 | LOC: TheICAPConfig | |
4857 | DEFAULT: none | |
4858 | DOC_START | |
4859 | Redirects a request through an ICAP service class, depending | |
4860 | on given acls | |
4861 | ||
4862 | icap_access classname allow|deny [!]aclname... | |
4863 | ||
4864 | The icap_access statements are processed in the order they appear in | |
4865 | this configuration file. If an access list matches, the processing stops. | |
4866 | For an "allow" rule, the specified class is used for the request. A "deny" | |
4867 | rule simply stops processing without using the class. You can also use the | |
4868 | special classname "None". | |
4869 | ||
4870 | For backward compatibility, it is also possible to use services | |
4871 | directly here. | |
4872 | Example: | |
4873 | icap_access class_1 allow all | |
4874 | DOC_END | |
4875 | ||
4876 | COMMENT_START | |
4877 | DNS OPTIONS | |
4878 | ----------------------------------------------------------------------------- | |
4879 | COMMENT_END | |
4880 | ||
4881 | NAME: check_hostnames | |
4882 | TYPE: onoff | |
4883 | DEFAULT: off | |
4884 | LOC: Config.onoff.check_hostnames | |
4885 | DOC_START | |
4886 | For security and stability reasons Squid can check | |
4887 | hostnames for Internet standard RFC compliance. If you want | |
4888 | Squid to perform these checks turn this directive on. | |
4889 | DOC_END | |
4890 | ||
4891 | NAME: allow_underscore | |
4892 | TYPE: onoff | |
4893 | DEFAULT: on | |
4894 | LOC: Config.onoff.allow_underscore | |
4895 | DOC_START | |
4896 | Underscore characters is not strictly allowed in Internet hostnames | |
4897 | but nevertheless used by many sites. Set this to off if you want | |
4898 | Squid to be strict about the standard. | |
4899 | This check is performed only when check_hostnames is set to on. | |
4900 | DOC_END | |
4901 | ||
4902 | NAME: cache_dns_program | |
4903 | TYPE: string | |
4904 | IFDEF: USE_DNSSERVERS | |
4905 | DEFAULT: @DEFAULT_DNSSERVER@ | |
4906 | LOC: Config.Program.dnsserver | |
4907 | DOC_START | |
4908 | Specify the location of the executable for dnslookup process. | |
4909 | DOC_END | |
4910 | ||
4911 | NAME: dns_children | |
4912 | TYPE: int | |
4913 | IFDEF: USE_DNSSERVERS | |
4914 | DEFAULT: 5 | |
4915 | LOC: Config.dnsChildren | |
4916 | DOC_START | |
4917 | The number of processes spawn to service DNS name lookups. | |
4918 | For heavily loaded caches on large servers, you should | |
4919 | probably increase this value to at least 10. The maximum | |
4920 | is 32. The default is 5. | |
4921 | ||
4922 | You must have at least one dnsserver process. | |
4923 | DOC_END | |
4924 | ||
4925 | NAME: dns_retransmit_interval | |
4926 | TYPE: time_t | |
4927 | DEFAULT: 5 seconds | |
4928 | LOC: Config.Timeout.idns_retransmit | |
4929 | IFDEF: !USE_DNSSERVERS | |
4930 | DOC_START | |
4931 | Initial retransmit interval for DNS queries. The interval is | |
4932 | doubled each time all configured DNS servers have been tried. | |
4933 | ||
4934 | DOC_END | |
4935 | ||
4936 | NAME: dns_timeout | |
4937 | TYPE: time_t | |
4938 | DEFAULT: 2 minutes | |
4939 | LOC: Config.Timeout.idns_query | |
4940 | IFDEF: !USE_DNSSERVERS | |
4941 | DOC_START | |
4942 | DNS Query timeout. If no response is received to a DNS query | |
4943 | within this time all DNS servers for the queried domain | |
4944 | are assumed to be unavailable. | |
4945 | DOC_END | |
4946 | ||
4947 | NAME: dns_defnames | |
4948 | COMMENT: on|off | |
4949 | TYPE: onoff | |
4950 | DEFAULT: off | |
4951 | LOC: Config.onoff.res_defnames | |
4952 | DOC_START | |
4953 | Normally the RES_DEFNAMES resolver option is disabled | |
4954 | (see res_init(3)). This prevents caches in a hierarchy | |
4955 | from interpreting single-component hostnames locally. To allow | |
4956 | Squid to handle single-component names, enable this option. | |
4957 | DOC_END | |
4958 | ||
4959 | NAME: dns_nameservers | |
4960 | TYPE: wordlist | |
4961 | DEFAULT: none | |
4962 | LOC: Config.dns_nameservers | |
4963 | DOC_START | |
4964 | Use this if you want to specify a list of DNS name servers | |
4965 | (IP addresses) to use instead of those given in your | |
4966 | /etc/resolv.conf file. | |
4967 | On Windows platforms, if no value is specified here or in | |
4968 | the /etc/resolv.conf file, the list of DNS name servers are | |
4969 | taken from the Windows registry, both static and dynamic DHCP | |
4970 | configurations are supported. | |
4971 | ||
4972 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
4973 | DOC_END | |
4974 | ||
4975 | NAME: hosts_file | |
4976 | TYPE: string | |
4977 | DEFAULT: @DEFAULT_HOSTS@ | |
4978 | LOC: Config.etcHostsPath | |
4979 | DOC_START | |
4980 | Location of the host-local IP name-address associations | |
4981 | database. Most Operating Systems have such a file on different | |
4982 | default locations: | |
4983 | - Un*X & Linux: /etc/hosts | |
4984 | - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts | |
4985 | (%SystemRoot% value install default is c:\winnt) | |
4986 | - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts | |
4987 | (%SystemRoot% value install default is c:\windows) | |
4988 | - Windows 9x/Me: %windir%\hosts | |
4989 | (%windir% value is usually c:\windows) | |
4990 | - Cygwin: /etc/hosts | |
4991 | ||
4992 | The file contains newline-separated definitions, in the | |
4993 | form ip_address_in_dotted_form name [name ...] names are | |
4994 | whitespace-separated. Lines beginning with an hash (#) | |
4995 | character are comments. | |
4996 | ||
4997 | The file is checked at startup and upon configuration. | |
4998 | If set to 'none', it won't be checked. | |
4999 | If append_domain is used, that domain will be added to | |
5000 | domain-local (i.e. not containing any dot character) host | |
5001 | definitions. | |
5002 | DOC_END | |
5003 | ||
5004 | NAME: dns_testnames | |
5005 | TYPE: wordlist | |
5006 | LOC: Config.dns_testname_list | |
5007 | DEFAULT: none | |
5008 | DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com | |
5009 | DOC_START | |
5010 | The DNS tests exit as soon as the first site is successfully looked up | |
5011 | ||
5012 | This test can be disabled with the -D command line option. | |
5013 | DOC_END | |
5014 | ||
5015 | NAME: append_domain | |
5016 | TYPE: string | |
5017 | LOC: Config.appendDomain | |
5018 | DEFAULT: none | |
5019 | DOC_START | |
5020 | Appends local domain name to hostnames without any dots in | |
5021 | them. append_domain must begin with a period. | |
5022 | ||
5023 | Be warned there are now Internet names with no dots in | |
5024 | them using only top-domain names, so setting this may | |
5025 | cause some Internet sites to become unavailable. | |
5026 | ||
5027 | Example: | |
5028 | append_domain .yourdomain.com | |
5029 | DOC_END | |
5030 | ||
5031 | NAME: ignore_unknown_nameservers | |
5032 | TYPE: onoff | |
5033 | LOC: Config.onoff.ignore_unknown_nameservers | |
5034 | DEFAULT: on | |
5035 | DOC_START | |
5036 | By default Squid checks that DNS responses are received | |
5037 | from the same IP addresses they are sent to. If they | |
5038 | don't match, Squid ignores the response and writes a warning | |
5039 | message to cache.log. You can allow responses from unknown | |
5040 | nameservers by setting this option to 'off'. | |
5041 | DOC_END | |
5042 | ||
5043 | NAME: ipcache_size | |
5044 | COMMENT: (number of entries) | |
5045 | TYPE: int | |
5046 | DEFAULT: 1024 | |
5047 | LOC: Config.ipcache.size | |
5048 | DOC_NONE | |
5049 | ||
5050 | NAME: ipcache_low | |
5051 | COMMENT: (percent) | |
5052 | TYPE: int | |
5053 | DEFAULT: 90 | |
5054 | LOC: Config.ipcache.low | |
5055 | DOC_NONE | |
5056 | ||
5057 | NAME: ipcache_high | |
5058 | COMMENT: (percent) | |
5059 | TYPE: int | |
5060 | DEFAULT: 95 | |
5061 | LOC: Config.ipcache.high | |
5062 | DOC_START | |
5063 | The size, low-, and high-water marks for the IP cache. | |
5064 | DOC_END | |
5065 | ||
5066 | NAME: fqdncache_size | |
5067 | COMMENT: (number of entries) | |
5068 | TYPE: int | |
5069 | DEFAULT: 1024 | |
5070 | LOC: Config.fqdncache.size | |
5071 | DOC_START | |
5072 | Maximum number of FQDN cache entries. | |
5073 | DOC_END | |
5074 | ||
5075 | COMMENT_START | |
5076 | MISCELLANEOUS | |
5077 | ----------------------------------------------------------------------------- | |
5078 | COMMENT_END | |
5079 | ||
5080 | NAME: memory_pools | |
5081 | COMMENT: on|off | |
5082 | TYPE: onoff | |
5083 | DEFAULT: on | |
5084 | LOC: Config.onoff.mem_pools | |
5085 | DOC_START | |
5086 | If set, Squid will keep pools of allocated (but unused) memory | |
5087 | available for future use. If memory is a premium on your | |
5088 | system and you believe your malloc library outperforms Squid | |
5089 | routines, disable this. | |
5090 | DOC_END | |
5091 | ||
5092 | NAME: memory_pools_limit | |
5093 | COMMENT: (bytes) | |
5094 | TYPE: b_size_t | |
5095 | DEFAULT: 5 MB | |
5096 | LOC: Config.MemPools.limit | |
5097 | DOC_START | |
5098 | Used only with memory_pools on: | |
5099 | memory_pools_limit 50 MB | |
5100 | ||
5101 | If set to a non-zero value, Squid will keep at most the specified | |
5102 | limit of allocated (but unused) memory in memory pools. All free() | |
5103 | requests that exceed this limit will be handled by your malloc | |
5104 | library. Squid does not pre-allocate any memory, just safe-keeps | |
5105 | objects that otherwise would be free()d. Thus, it is safe to set | |
5106 | memory_pools_limit to a reasonably high value even if your | |
5107 | configuration will use less memory. | |
5108 | ||
5109 | If set to zero, Squid will keep all memory it can. That is, there | |
5110 | will be no limit on the total amount of memory used for safe-keeping. | |
5111 | ||
5112 | To disable memory allocation optimization, do not set | |
5113 | memory_pools_limit to 0. Set memory_pools to "off" instead. | |
5114 | ||
5115 | An overhead for maintaining memory pools is not taken into account | |
5116 | when the limit is checked. This overhead is close to four bytes per | |
5117 | object kept. However, pools may actually _save_ memory because of | |
5118 | reduced memory thrashing in your malloc library. | |
5119 | DOC_END | |
5120 | ||
5121 | NAME: forwarded_for | |
5122 | COMMENT: on|off | |
5123 | TYPE: onoff | |
5124 | DEFAULT: on | |
5125 | LOC: opt_forwarded_for | |
5126 | DOC_START | |
5127 | If set, Squid will include your system's IP address or name | |
5128 | in the HTTP requests it forwards. By default it looks like | |
5129 | this: | |
5130 | ||
5131 | X-Forwarded-For: 192.1.2.3 | |
5132 | ||
5133 | If you disable this, it will appear as | |
5134 | ||
5135 | X-Forwarded-For: unknown | |
5136 | DOC_END | |
5137 | ||
5138 | NAME: cachemgr_passwd | |
5139 | TYPE: cachemgrpasswd | |
5140 | DEFAULT: none | |
5141 | LOC: Config.passwd_list | |
5142 | DOC_START | |
5143 | Specify passwords for cachemgr operations. | |
5144 | ||
5145 | Usage: cachemgr_passwd password action action ... | |
5146 | ||
5147 | Some valid actions are (see cache manager menu for a full list): | |
5148 | 5min | |
5149 | 60min | |
5150 | asndb | |
5151 | authenticator | |
5152 | cbdata | |
5153 | client_list | |
5154 | comm_incoming | |
5155 | config * | |
5156 | counters | |
5157 | delay | |
5158 | digest_stats | |
5159 | dns | |
5160 | events | |
5161 | filedescriptors | |
5162 | fqdncache | |
5163 | histograms | |
5164 | http_headers | |
5165 | info | |
5166 | io | |
5167 | ipcache | |
5168 | mem | |
5169 | menu | |
5170 | netdb | |
5171 | non_peers | |
5172 | objects | |
5173 | offline_toggle * | |
5174 | pconn | |
5175 | peer_select | |
5176 | redirector | |
5177 | refresh | |
5178 | server_list | |
5179 | shutdown * | |
5180 | store_digest | |
5181 | storedir | |
5182 | utilization | |
5183 | via_headers | |
5184 | vm_objects | |
5185 | ||
5186 | * Indicates actions which will not be performed without a | |
5187 | valid password, others can be performed if not listed here. | |
5188 | ||
5189 | To disable an action, set the password to "disable". | |
5190 | To allow performing an action without a password, set the | |
5191 | password to "none". | |
5192 | ||
5193 | Use the keyword "all" to set the same password for all actions. | |
5194 | ||
5195 | Example: | |
5196 | cachemgr_passwd secret shutdown | |
5197 | cachemgr_passwd lesssssssecret info stats/objects | |
5198 | cachemgr_passwd disable all | |
5199 | DOC_END | |
5200 | ||
5201 | NAME: client_db | |
5202 | COMMENT: on|off | |
5203 | TYPE: onoff | |
5204 | DEFAULT: on | |
5205 | LOC: Config.onoff.client_db | |
5206 | DOC_START | |
5207 | If you want to disable collecting per-client statistics, | |
5208 | turn off client_db here. | |
5209 | DOC_END | |
5210 | ||
5211 | NAME: refresh_all_ims | |
5212 | COMMENT: on|off | |
5213 | TYPE: onoff | |
5214 | DEFAULT: off | |
5215 | LOC: Config.onoff.refresh_all_ims | |
5216 | DOC_START | |
5217 | When you enable this option, squid will always check | |
5218 | the origin server for an update when a client sends an | |
5219 | If-Modified-Since request. Many browsers use IMS | |
5220 | requests when the user requests a reload, and this | |
5221 | ensures those clients receive the latest version. | |
5222 | ||
5223 | By default (off), squid may return a Not Modified response | |
5224 | based on the age of the cached version. | |
5225 | DOC_END | |
5226 | ||
5227 | NAME: reload_into_ims | |
5228 | IFDEF: HTTP_VIOLATIONS | |
5229 | COMMENT: on|off | |
5230 | TYPE: onoff | |
5231 | DEFAULT: off | |
5232 | LOC: Config.onoff.reload_into_ims | |
5233 | DOC_START | |
5234 | When you enable this option, client no-cache or ``reload'' | |
5235 | requests will be changed to If-Modified-Since requests. | |
5236 | Doing this VIOLATES the HTTP standard. Enabling this | |
5237 | feature could make you liable for problems which it | |
5238 | causes. | |
5239 | ||
5240 | see also refresh_pattern for a more selective approach. | |
5241 | DOC_END | |
5242 | ||
5243 | NAME: maximum_single_addr_tries | |
5244 | TYPE: int | |
5245 | LOC: Config.retry.maxtries | |
5246 | DEFAULT: 1 | |
5247 | DOC_START | |
5248 | This sets the maximum number of connection attempts for a | |
5249 | host that only has one address (for multiple-address hosts, | |
5250 | each address is tried once). | |
5251 | ||
5252 | The default value is one attempt, the (not recommended) | |
5253 | maximum is 255 tries. A warning message will be generated | |
5254 | if it is set to a value greater than ten. | |
5255 | ||
5256 | Note: This is in addition to the request re-forwarding which | |
5257 | takes place if Squid fails to get a satisfying response. | |
5258 | DOC_END | |
5259 | ||
5260 | NAME: retry_on_error | |
5261 | TYPE: onoff | |
5262 | LOC: Config.retry.onerror | |
5263 | DEFAULT: off | |
5264 | DOC_START | |
5265 | If set to on Squid will automatically retry requests when | |
5266 | receiving an error response. This is mainly useful if you | |
5267 | are in a complex cache hierarchy to work around access | |
5268 | control errors. | |
5269 | DOC_END | |
5270 | ||
5271 | NAME: as_whois_server | |
5272 | TYPE: string | |
5273 | LOC: Config.as_whois_server | |
5274 | DEFAULT: whois.ra.net | |
5275 | DEFAULT_IF_NONE: whois.ra.net | |
5276 | DOC_START | |
5277 | WHOIS server to query for AS numbers. NOTE: AS numbers are | |
5278 | queried only when Squid starts up, not for every request. | |
5279 | DOC_END | |
5280 | ||
5281 | NAME: offline_mode | |
5282 | TYPE: onoff | |
5283 | LOC: Config.onoff.offline | |
5284 | DEFAULT: off | |
5285 | DOC_START | |
5286 | Enable this option and Squid will never try to validate cached | |
5287 | objects. | |
5288 | DOC_END | |
5289 | ||
5290 | NAME: uri_whitespace | |
5291 | TYPE: uri_whitespace | |
5292 | LOC: Config.uri_whitespace | |
5293 | DEFAULT: strip | |
5294 | DOC_START | |
5295 | What to do with requests that have whitespace characters in the | |
5296 | URI. Options: | |
5297 | ||
5298 | strip: The whitespace characters are stripped out of the URL. | |
5299 | This is the behavior recommended by RFC2396. | |
5300 | deny: The request is denied. The user receives an "Invalid | |
5301 | Request" message. | |
5302 | allow: The request is allowed and the URI is not changed. The | |
5303 | whitespace characters remain in the URI. Note the | |
5304 | whitespace is passed to redirector processes if they | |
5305 | are in use. | |
5306 | encode: The request is allowed and the whitespace characters are | |
5307 | encoded according to RFC1738. This could be considered | |
5308 | a violation of the HTTP/1.1 | |
5309 | RFC because proxies are not allowed to rewrite URI's. | |
5310 | chop: The request is allowed and the URI is chopped at the | |
5311 | first whitespace. This might also be considered a | |
5312 | violation. | |
5313 | DOC_END | |
5314 | ||
5315 | NAME: coredump_dir | |
5316 | TYPE: string | |
5317 | LOC: Config.coredump_dir | |
5318 | DEFAULT: none | |
5319 | DEFAULT_IF_NONE: none | |
5320 | DOC_START | |
5321 | By default Squid leaves core files in the directory from where | |
5322 | it was started. If you set 'coredump_dir' to a directory | |
5323 | that exists, Squid will chdir() to that directory at startup | |
5324 | and coredump files will be left there. | |
5325 | ||
5326 | NOCOMMENT_START | |
5327 | # Leave coredumps in the first cache dir | |
5328 | coredump_dir @DEFAULT_SWAP_DIR@ | |
5329 | NOCOMMENT_END | |
5330 | DOC_END | |
5331 | ||
5332 | NAME: chroot | |
5333 | TYPE: string | |
5334 | LOC: Config.chroot_dir | |
5335 | DEFAULT: none | |
5336 | DOC_START | |
5337 | Use this to have Squid do a chroot() while initializing. This | |
5338 | also causes Squid to fully drop root privileges after | |
5339 | initializing. This means, for example, if you use a HTTP | |
5340 | port less than 1024 and try to reconfigure, you will may get an | |
5341 | error saying that Squid can not open the port. | |
5342 | DOC_END | |
5343 | ||
5344 | NAME: balance_on_multiple_ip | |
5345 | TYPE: onoff | |
5346 | LOC: Config.onoff.balance_on_multiple_ip | |
5347 | DEFAULT: on | |
5348 | DOC_START | |
5349 | Some load balancing servers based on round robin DNS have been | |
5350 | found not to preserve user session state across requests | |
5351 | to different IP addresses. | |
5352 | ||
5353 | By default Squid rotates IP's per request. By disabling | |
5354 | this directive only connection failure triggers rotation. | |
5355 | DOC_END | |
5356 | ||
5357 | NAME: pipeline_prefetch | |
5358 | TYPE: onoff | |
5359 | LOC: Config.onoff.pipeline_prefetch | |
5360 | DEFAULT: off | |
5361 | DOC_START | |
5362 | To boost the performance of pipelined requests to closer | |
5363 | match that of a non-proxied environment Squid can try to fetch | |
5364 | up to two requests in parallel from a pipeline. | |
5365 | ||
5366 | Defaults to off for bandwidth management and access logging | |
5367 | reasons. | |
5368 | DOC_END | |
5369 | ||
5370 | NAME: high_response_time_warning | |
5371 | TYPE: int | |
5372 | COMMENT: (msec) | |
5373 | LOC: Config.warnings.high_rptm | |
5374 | DEFAULT: 0 | |
5375 | DOC_START | |
5376 | If the one-minute median response time exceeds this value, | |
5377 | Squid prints a WARNING with debug level 0 to get the | |
5378 | administrators attention. The value is in milliseconds. | |
5379 | DOC_END | |
5380 | ||
5381 | NAME: high_page_fault_warning | |
5382 | TYPE: int | |
5383 | LOC: Config.warnings.high_pf | |
5384 | DEFAULT: 0 | |
5385 | DOC_START | |
5386 | If the one-minute average page fault rate exceeds this | |
5387 | value, Squid prints a WARNING with debug level 0 to get | |
5388 | the administrators attention. The value is in page faults | |
5389 | per second. | |
5390 | DOC_END | |
5391 | ||
5392 | NAME: high_memory_warning | |
5393 | TYPE: b_size_t | |
5394 | LOC: Config.warnings.high_memory | |
5395 | DEFAULT: 0 KB | |
5396 | DOC_START | |
5397 | If the memory usage (as determined by mallinfo) exceeds | |
5398 | this amount, Squid prints a WARNING with debug level 0 to get | |
5399 | the administrators attention. | |
5400 | DOC_END | |
5401 | ||
5402 | NAME: sleep_after_fork | |
5403 | COMMENT: (microseconds) | |
5404 | TYPE: int | |
5405 | LOC: Config.sleep_after_fork | |
5406 | DEFAULT: 0 | |
5407 | DOC_START | |
5408 | When this is set to a non-zero value, the main Squid process | |
5409 | sleeps the specified number of microseconds after a fork() | |
5410 | system call. This sleep may help the situation where your | |
5411 | system reports fork() failures due to lack of (virtual) | |
5412 | memory. Note, however, if you have a lot of child | |
5413 | processes, these sleep delays will add up and your | |
5414 | Squid will not service requests for some amount of time | |
5415 | until all the child processes have been started. | |
5416 | On Windows value less then 1000 (1 milliseconds) are | |
5417 | rounded to 1000. | |
5418 | DOC_END | |
5419 | ||
5420 | EOF |