]>
Commit | Line | Data |
---|---|---|
3a278cb8 | 1 | |
0f74202c | 2 | COMMENT_START |
3 | WELCOME TO SQUID 1.2 | |
4 | -------------------- | |
3a278cb8 | 5 | |
cf5cc17e | 6 | This is the default Squid configuration file. You may wish |
b58b1ad6 | 7 | to look at http://cache.is.co.za/squid/ for documentation, |
8 | or the Squid home page (http://squid.nlanr.net/) for the FAQ. | |
3a278cb8 | 9 | |
0f74202c | 10 | COMMENT_END |
3a278cb8 | 11 | |
0f74202c | 12 | COMMENT_START |
3a278cb8 | 13 | NETWORK OPTIONS |
14 | ----------------------------------------------------------------------------- | |
0f74202c | 15 | COMMENT_END |
3a278cb8 | 16 | |
934b03fc | 17 | NAME: http_port ascii_port |
18 | TYPE: ushortlist | |
f53b06f9 | 19 | DEFAULT: none |
20 | DEFAULT_IF_NONE: 3128 | |
934b03fc | 21 | LOC: Config.Port.http |
22 | DOC_START | |
cf5cc17e | 23 | The port number where Squid will listen for HTTP client |
934b03fc | 24 | requests. Default is 3128, for httpd-accel mode use port 80. |
25 | May be overridden with -a on the command line. | |
26 | ||
27 | You may specify multiple ports here, but they MUST all be on | |
28 | a single line. | |
29 | ||
30 | http_port 3128 | |
31 | DOC_END | |
32 | ||
33 | ||
34 | NAME: icp_port udp_port | |
35 | TYPE: ushort | |
36 | DEFAULT: 3130 | |
37 | LOC: Config.Port.icp | |
38 | DOC_START | |
459f1836 | 39 | The port number where Squid sends and receives ICP requests to |
934b03fc | 40 | and from neighbor caches. Default is 3130. To disable use |
41 | "0". May be overridden with -u on the command line. | |
42 | ||
43 | icp_port 3130 | |
44 | DOC_END | |
45 | ||
459f1836 | 46 | NAME: htcp_port |
47 | IFDEF: USE_HTCP | |
48 | TYPE: ushort | |
49 | DEFAULT: 4827 | |
50 | LOC: Config.Port.htcp | |
51 | DOC_START | |
52 | The port number where Squid sends and receives ICP requests to | |
53 | and from neighbor caches. Default is 4827. To disable use | |
54 | "0". | |
55 | ||
56 | htcp_port 4827 | |
57 | DOC_END | |
58 | ||
934b03fc | 59 | |
60 | NAME: mcast_groups | |
61 | TYPE: wordlist | |
62 | LOC: Config.mcast_group_list | |
1273d501 | 63 | DEFAULT: none |
934b03fc | 64 | DOC_START |
cf5cc17e | 65 | This tag specifies a list of multicast groups which your server |
66 | should join to receive multicasted ICP requests. | |
934b03fc | 67 | |
68 | NOTE! Be very careful what you put here! Be sure you | |
69 | understand the difference between an ICP _query_ and an ICP | |
70 | _reply_. This option is to be set only if you want to RECEIVE | |
71 | multicast queries. Do NOT set this option to SEND multicast | |
a95856a0 | 72 | ICP (use cache_peer for that). ICP replies are always sent via |
934b03fc | 73 | unicast, so this option does not affect whether or not you will |
74 | receive replies from multicast group members. | |
75 | ||
76 | You must be very careful to NOT use a multicast address which | |
77 | is already in use by another group of caches. NLANR has been | |
78 | assigned a block of multicast address space for use in Web | |
79 | Caching. Plese write to us at nlanr-cache@nlanr.net to receive | |
80 | an address for your own use. | |
81 | ||
cf5cc17e | 82 | If you are unsure about multicast, please read the Multicast |
83 | chapter in the Squid FAQ (http://squid.nlanr.net/Squid/FAQ/). | |
84 | ||
934b03fc | 85 | Usage: mcast_groups 239.128.16.128 224.0.1.20 |
86 | ||
cf5cc17e | 87 | By default, Squid doesn't listen on any multicast groups. |
934b03fc | 88 | |
89 | mcast_groups 239.128.16.128 | |
90 | DOC_END | |
91 | ||
92 | ||
93 | NAME: tcp_incoming_address bind_address | |
94 | TYPE: address | |
95 | LOC: Config.Addrs.tcp_incoming | |
270b86af | 96 | DEFAULT: 0.0.0.0 |
934b03fc | 97 | DOC_NONE |
98 | ||
99 | NAME: tcp_outgoing_address outbound_address | |
100 | TYPE: address | |
101 | LOC: Config.Addrs.tcp_outgoing | |
270b86af | 102 | DEFAULT: 255.255.255.255 |
934b03fc | 103 | DOC_NONE |
104 | ||
105 | NAME: udp_incoming_address | |
106 | TYPE: address | |
107 | LOC:Config.Addrs.udp_incoming | |
270b86af | 108 | DEFAULT: 0.0.0.0 |
934b03fc | 109 | DOC_NONE |
110 | ||
111 | NAME: udp_outgoing_address | |
112 | TYPE: address | |
113 | LOC: Config.Addrs.udp_outgoing | |
270b86af | 114 | DEFAULT: 255.255.255.255 |
934b03fc | 115 | DOC_START |
116 | Usage: tcp_incoming_address 10.20.30.40 | |
117 | udp_outgoing_address fully.qualified.domain.name | |
118 | ||
934b03fc | 119 | tcp_incoming_address is used for the HTTP socket which accepts |
120 | connections from clients and other caches. | |
121 | tcp_outgoing_address is used for connections made to remote | |
122 | servers and other caches. | |
123 | udp_incoming_address is used for the ICP socket receiving packets | |
124 | from other caches. | |
125 | udp_outgoing_address is used for ICP packets sent out to other | |
126 | caches. | |
127 | ||
128 | The defaults behaviour is to not bind to any specific address. | |
129 | ||
130 | NOTE, udp_incoming_address and udp_outgoing_address can not have | |
131 | the same value since they both use port 3130. | |
132 | ||
133 | tcp_incoming_address 0.0.0.0 | |
134 | tcp_outgoing_address 0.0.0.0 | |
135 | udp_incoming_address 0.0.0.0 | |
136 | udp_outgoing_address 0.0.0.0 | |
137 | DOC_END | |
138 | ||
0f74202c | 139 | COMMENT_START |
3a278cb8 | 140 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM |
141 | ----------------------------------------------------------------------------- | |
0f74202c | 142 | COMMENT_END |
934b03fc | 143 | |
40a1495e | 144 | NAME: cache_peer |
145 | TYPE: peer | |
1273d501 | 146 | DEFAULT: none |
0153d498 | 147 | LOC: Config.peers |
934b03fc | 148 | DOC_START |
149 | To specify other caches in a hierarchy, use the format: | |
150 | ||
151 | hostname type http_port icp_port | |
152 | ||
d0d41f07 | 153 | For example, |
934b03fc | 154 | |
155 | # proxy icp | |
156 | # hostname type port port options | |
157 | # -------------------- -------- ----- ----- ----------- | |
cf5cc17e | 158 | cache_peer parent.foo.net parent 3128 3130 [proxy-only] |
159 | cache_peer sib1.foo.net sibling 3128 3130 [proxy-only] | |
160 | cache_peer sib2.foo.net sibling 3128 3130 [proxy-only] | |
934b03fc | 161 | |
162 | type: either 'parent', 'sibling', or 'multicast'. | |
163 | ||
164 | proxy_port: The port number where the cache listens for proxy | |
165 | requests. | |
166 | ||
167 | icp_port: Used for querying neighbor caches about | |
168 | objects. To have a non-ICP neighbor | |
169 | specify '7' for the ICP port and make sure the | |
170 | neighbor machine has the UDP echo port | |
171 | enabled in its /etc/inetd.conf file. | |
172 | ||
173 | options: proxy-only | |
174 | weight=n | |
175 | ttl=n | |
176 | no-query | |
177 | default | |
178 | round-robin | |
179 | multicast-responder | |
b3264694 | 180 | closest-only |
934b03fc | 181 | |
182 | use 'proxy-only' to specify that objects fetched | |
183 | from this cache should not be saved locally. | |
184 | ||
185 | use 'weight=n' to specify a weighted parent. | |
186 | The weight must be an integer. The default weight | |
187 | is 1, larger weights are favored more. | |
188 | ||
189 | use 'ttl=n' to specify a IP multicast TTL to use | |
190 | when sending an ICP request to this address. | |
191 | Only useful when sending to a multicast group. | |
192 | Because we don't accept ICP replies from random | |
193 | hosts, you must configure other group members as | |
194 | peers with the 'multicast-responder' option below. | |
195 | ||
196 | use 'no-query' to NOT send ICP queries to this | |
197 | neighbor. | |
198 | ||
199 | use 'default' if this is a parent cache which can | |
200 | be used as a "last-resort." You should probably | |
201 | only use 'default' in situations where you cannot | |
202 | use ICP with your parent cache(s). | |
203 | ||
204 | use 'round-robin' to define a set of parents which | |
205 | should be used in a round-robin fashion in the | |
206 | absence of any ICP queries. | |
207 | ||
208 | 'multicast-responder' indicates that the named peer | |
209 | is a member of a multicast group. ICP queries will | |
210 | not be sent directly to the peer, but ICP replies | |
211 | will be accepted from it. | |
212 | ||
b3264694 | 213 | 'closest-only' indicates that, for ICP_OP_MISS |
214 | replies, we'll only forward CLOSEST_PARENT_MISSes | |
215 | and never FIRST_PARENT_MISSes. | |
216 | ||
934b03fc | 217 | NOTE: non-ICP neighbors must be specified as 'parent'. |
218 | ||
a95856a0 | 219 | cache_peer hostname type 3128 3130 |
934b03fc | 220 | DOC_END |
221 | ||
222 | ||
af7d912e | 223 | NAME: cache_peer_domain cache_host_domain |
934b03fc | 224 | TYPE: hostdomain |
f1dc9b30 | 225 | DEFAULT: none |
226 | LOC: none | |
934b03fc | 227 | DOC_START |
cf5cc17e | 228 | Use to limit the domains for which a neighbor cache will be |
229 | queried. Usage: | |
934b03fc | 230 | |
af7d912e | 231 | cache_peer_domain cache-host domain [domain ...] |
232 | cache_peer_domain cache-host !domain | |
934b03fc | 233 | |
234 | For example, specifying | |
235 | ||
af7d912e | 236 | cache_peer_domain parent.foo.net .edu |
934b03fc | 237 | |
238 | has the effect such that UDP query packets are sent to | |
239 | 'bigserver' only when the requested object exists on a | |
240 | server in the .edu domain. Prefixing the domainname | |
241 | with '!' means that the cache will be queried for objects | |
242 | NOT in that domain. | |
243 | ||
244 | NOTE: * Any number of domains may be given for a cache-host, | |
245 | either on the same or separate lines. | |
246 | * When multiple domains are given for a particular | |
247 | cache-host, the first matched domain is applied. | |
248 | * Cache hosts with no domain restrictions are queried | |
249 | for all requests. | |
250 | * There are no defaults. | |
af7d912e | 251 | * There is also a 'cache_peer_acl' tag in the ACL |
934b03fc | 252 | section. |
253 | DOC_END | |
254 | ||
255 | ||
256 | NAME: neighbor_type_domain | |
257 | TYPE: hostdomaintype | |
f1dc9b30 | 258 | DEFAULT: none |
259 | LOC: none | |
934b03fc | 260 | DOC_START |
261 | usage: neighbor_type_domain parent|sibling domain domain ... | |
262 | ||
263 | Modifying the neighbor type for specific domains is now | |
264 | possible. You can treat some domains differently than the the | |
a95856a0 | 265 | default neighbor type specified on the 'cache_peer' line. |
934b03fc | 266 | Normally it should only be necessary to list domains which |
267 | should be treated differently because the default neighbor type | |
268 | applies for hostnames which do not match domains listed here. | |
269 | ||
270 | EXAMPLE: | |
a95856a0 | 271 | cache_peer parent cache.foo.org 3128 3130 |
934b03fc | 272 | neighbor_type_domain cache.foo.org sibling .com .net |
273 | neighbor_type_domain cache.foo.org sibling .au .de | |
274 | DOC_END | |
275 | ||
934b03fc | 276 | NAME: neighbor_timeout neighbour_timeout |
277 | COMMENT: (seconds) | |
9e975e4e | 278 | DEFAULT: 2 seconds |
f1dc9b30 | 279 | TYPE: time_t |
934b03fc | 280 | LOC: Config.neighborTimeout |
281 | DOC_START | |
282 | This controls how long to wait for replies from neighbor caches. | |
283 | If none of the parent or neighbor caches reply before this many | |
284 | seconds (due to dropped packets or slow links), then the object | |
285 | request will be satisfied from the default source. The default | |
286 | timeout is two seconds. | |
287 | ||
288 | neighbor_timeout 2 seconds | |
289 | DOC_END | |
290 | ||
dc835977 | 291 | NAME: dead_peer_timeout |
292 | COMMENT: (seconds) | |
293 | DEFAULT: 10 seconds | |
294 | TYPE: time_t | |
295 | LOC: Config.Timeout.deadPeer | |
296 | DOC_START | |
297 | This controls how long Squid waits to declare a peer cache | |
298 | as "dead." If there are no ICP replies received in this | |
299 | amount of time, Squid will declare the peer dead and not | |
300 | expect to receive any further ICP replies. However, it | |
301 | continues to send ICP queries, and will mark the peer as | |
302 | alive upon receipt of the first subsequent ICP reply. | |
303 | ||
304 | dead_peer_timeout 10 seconds | |
305 | DOC_END | |
306 | ||
934b03fc | 307 | |
308 | NAME: hierarchy_stoplist | |
309 | TYPE: wordlist | |
8ad4f479 | 310 | DEFAULT: cgi-bin ? |
934b03fc | 311 | LOC: Config.hierarchy_stoplist |
312 | DOC_START | |
313 | A list of words which, if found in a URL, cause the object to | |
314 | be handled directly by this cache. In other words, use this | |
315 | to not query neighbor caches for certain objects. You may | |
316 | list this option multiple times. | |
317 | ||
318 | The default is to directly fetch URLs containing 'cgi-bin' or '?'. | |
319 | ||
320 | hierarchy_stoplist cgi-bin ? | |
321 | DOC_END | |
322 | ||
323 | ||
bd05e3e3 | 324 | NAME: no_cache |
325 | TYPE: acl_access | |
326 | DEFAULT: none | |
327 | LOC: Config.accessList.noCache | |
934b03fc | 328 | DOC_START |
bd05e3e3 | 329 | A list of ACL elements which, if matched, cause the reply to |
934b03fc | 330 | immediately removed from the cache. In other words, use this |
bd05e3e3 | 331 | to force certain objects to never be cached. |
934b03fc | 332 | |
0fdafae7 | 333 | Even though it seems strange, you must use the word 'ALLOW' |
334 | to indicate the ACL names which should NOT be cached. | |
335 | ||
bd05e3e3 | 336 | There is no default. We recommend you uncomment the following |
337 | two lines. | |
934b03fc | 338 | |
bd05e3e3 | 339 | acl QUERY urlpath_regex cgi-bin \? |
0fdafae7 | 340 | no_cache allow QUERY |
934b03fc | 341 | DOC_END |
342 | ||
934b03fc | 343 | NAME: cache_stoplist_pattern |
934b03fc | 344 | TYPE: regexlist |
345 | LOC: Config.cache_stop_relist | |
1273d501 | 346 | DEFAULT: none |
934b03fc | 347 | DOC_START |
348 | Just like 'cache_stoplist' but you can use regular expressions | |
349 | instead of simple string matching. There is no default. | |
0153d498 | 350 | Insert -i to get case-insensitive regular expressions. |
934b03fc | 351 | |
352 | cache_stoplist_pattern | |
353 | DOC_END | |
354 | ||
355 | ||
0f74202c | 356 | COMMENT_START |
3a278cb8 | 357 | OPTIONS WHICH AFFECT THE CACHE SIZE |
358 | ----------------------------------------------------------------------------- | |
0f74202c | 359 | COMMENT_END |
934b03fc | 360 | |
361 | NAME: cache_mem | |
9906e724 | 362 | COMMENT: (bytes) |
1b635117 | 363 | TYPE: b_size_t |
9906e724 | 364 | DEFAULT: 8 MB |
934b03fc | 365 | LOC: Config.Mem.maxSize |
366 | DOC_START | |
367 | Maximum amout of VM used to store objects in memory. | |
368 | This includes: | |
369 | in-transit objects, | |
370 | negative-cached objects, | |
371 | "hot" objects | |
372 | The value of cache_mem is an upper limit on the size of the | |
373 | "in-memory object data" pool. This is a pool of 4k pages used | |
374 | to hold object data. | |
375 | ||
376 | In-transit objects have priority over the others. When | |
377 | additional space is needed for incoming data, negative-cached | |
378 | and hot objects will be released. In other words, the | |
379 | negative-cached and hot objects will fill up any unused space | |
380 | not needed for in-transit objects. | |
381 | ||
382 | The values of cache_mem_low and cache_mem_high (below) can be | |
383 | used to tune the use of the memory pool. When the high mark is | |
384 | reached, in-transit and hot objects will be released to clear | |
385 | space. When an object transfer is completed, it will remain in | |
386 | memory only if the current memory usage is below the low water | |
387 | mark. | |
388 | ||
389 | The default is 8 Megabytes. | |
390 | ||
9906e724 | 391 | cache_mem 8 MB |
934b03fc | 392 | DOC_END |
393 | ||
394 | ||
395 | NAME: cache_swap_low | |
396 | COMMENT: (percent, 0-100) | |
397 | TYPE: int | |
398 | DEFAULT: 90 | |
399 | LOC: Config.Swap.lowWaterMark | |
400 | DOC_NONE | |
401 | ||
402 | NAME: cache_swap_high | |
403 | COMMENT: (percent, 0-100) | |
404 | TYPE: int | |
405 | DEFAULT: 95 | |
406 | LOC: Config.Swap.highWaterMark | |
407 | DOC_START | |
cf5cc17e | 408 | The low- and high-water marks for cache LRU replacement. LRU |
409 | replacement begins when the high-water mark is reached and ends | |
410 | when enough objects have been removed and the low-water mark is | |
411 | reached. Defaults are 90% and 95%. If you have a large cache, 5% | |
412 | could be hundreds of MB. If this is the case you may wish to | |
413 | set these numbers closer together. | |
934b03fc | 414 | |
415 | cache_swap_low 90 | |
416 | cache_swap_high 95 | |
417 | DOC_END | |
418 | ||
419 | ||
420 | NAME: cache_mem_low | |
421 | COMMENT: (in percent, 0-100) | |
422 | TYPE: int | |
423 | DEFAULT: 75 | |
424 | LOC: Config.Mem.lowWaterMark | |
425 | DOC_NONE | |
426 | ||
427 | NAME: cache_mem_high | |
428 | COMMENT: (in percent, 0-100) | |
429 | TYPE: int | |
430 | DEFAULT: 95 | |
431 | LOC: Config.Mem.highWaterMark | |
432 | DOC_START | |
433 | The low- and high-water mark for cache memory storage. When | |
434 | the amount of RAM used by the hot-object RAM cache reaches this | |
435 | point, the cache starts throwing objects out of the RAM cache | |
436 | (but they remain on disk). Defaults are 75% and 90%. | |
437 | ||
438 | cache_mem_low 75 | |
439 | cache_mem_high 90 | |
440 | DOC_END | |
441 | ||
442 | ||
443 | NAME: maximum_object_size | |
9e975e4e | 444 | COMMENT: (bytes) |
1b635117 | 445 | TYPE: b_size_t |
9906e724 | 446 | DEFAULT: 4096 KB |
934b03fc | 447 | LOC: Config.Store.maxObjectSize |
448 | DOC_START | |
449 | Objects larger than this size will NOT be saved on disk. The | |
cf5cc17e | 450 | value is specified in kilobytes, and the default is 4MB. If |
451 | you wish to get a high BYTES hit ratio, you should probably | |
452 | increase this (one 32 MB object hit counts for 3200 10KB | |
453 | hits). If you wish to increase speed more than your want to | |
454 | save bandwidth you should leave this low. | |
934b03fc | 455 | |
9906e724 | 456 | maximum_object_size 4096 KB |
934b03fc | 457 | DOC_END |
458 | ||
459 | ||
460 | NAME: ipcache_size | |
461 | COMMENT: (number of entries) | |
462 | TYPE: int | |
463 | DEFAULT: 1024 | |
464 | LOC: Config.ipcache.size | |
465 | DOC_NONE | |
466 | ||
467 | NAME: ipcache_low | |
468 | COMMENT: (percent) | |
469 | TYPE: int | |
470 | DEFAULT: 90 | |
471 | LOC: Config.ipcache.low | |
472 | DOC_NONE | |
473 | ||
474 | NAME: ipcache_high | |
475 | COMMENT: (percent) | |
476 | TYPE: int | |
477 | DEFAULT: 95 | |
478 | LOC: Config.ipcache.high | |
479 | DOC_START | |
480 | The size, low-, and high-water marks for the IP cache. | |
481 | ||
482 | ipcache_size 1024 | |
483 | ipcache_low 90 | |
484 | ipcache_high 95 | |
485 | DOC_END | |
486 | ||
0f74202c | 487 | COMMENT_START |
3a278cb8 | 488 | LOGFILE PATHNAMES AND CACHE DIRECTORIES |
489 | ----------------------------------------------------------------------------- | |
0f74202c | 490 | COMMENT_END |
934b03fc | 491 | |
492 | NAME: cache_dir | |
493 | TYPE: cachedir | |
f1dc9b30 | 494 | DEFAULT: none |
0108d71f | 495 | DEFAULT_IF_NONE: @DEFAULT_SWAP_DIR@ 100 16 256 |
f1dc9b30 | 496 | LOC: Config.cacheSwap |
934b03fc | 497 | DOC_START |
cf5cc17e | 498 | Usage: |
499 | ||
500 | cache_dir Directory-Name Mbytes Level-1 Level2 | |
934b03fc | 501 | |
502 | You can specify multiple cache_dir lines to spread the | |
503 | cache among different disk partitions. | |
504 | ||
cf5cc17e | 505 | 'Directory' is a top-level directory where cache swap |
506 | files will be stored. If you want to use an entire disk | |
507 | for caching, then this can be the mount-point directory. | |
508 | The directory must exist and be writable by the Squid | |
509 | process. Squid will NOT create this directory for you. | |
510 | ||
511 | If no 'cache_dir' lines are specified, the following | |
512 | default will be used: @DEFAULT_SWAP_DIR@. | |
513 | ||
514 | 'Mbytes' is the amount of disk space (MB) to use under this | |
515 | directory. The default is 100 MB. Change this to suit your | |
516 | configuration. | |
517 | ||
518 | 'Level-1' is the number of first-level subdirectories which | |
519 | will be created under the 'Directory'. The default is 16. | |
520 | ||
521 | 'Level-2' is the number of second-level subdirectories which | |
522 | will be created under each first-level directory. The default | |
523 | is 256. | |
524 | ||
5375428c | 525 | cache_dir @DEFAULT_SWAP_DIR@ 100 16 256 |
934b03fc | 526 | DOC_END |
527 | ||
528 | ||
529 | NAME: cache_access_log | |
530 | TYPE: string | |
d0b98f84 | 531 | DEFAULT: @DEFAULT_ACCESS_LOG@ |
934b03fc | 532 | LOC: Config.Log.access |
533 | DOC_START | |
534 | Logs the client request activity. Contains an entry for | |
535 | every HTTP and ICP request received. | |
536 | ||
5375428c | 537 | cache_access_log @DEFAULT_ACCESS_LOG@ |
934b03fc | 538 | DOC_END |
539 | ||
540 | ||
541 | NAME: cache_log | |
542 | TYPE: string | |
0153d498 | 543 | DEFAULT: @DEFAULT_CACHE_LOG@ |
934b03fc | 544 | LOC: Config.Log.log |
545 | DOC_START | |
cf5cc17e | 546 | Cache logging file. This is where general information about |
547 | your cache's behaviour goes. You can increase the amount of data | |
548 | logged to this file with the "debug_options" tag below. | |
934b03fc | 549 | |
0153d498 | 550 | cache_log @DEFAULT_CACHE_LOG@ |
934b03fc | 551 | DOC_END |
552 | ||
553 | ||
554 | NAME: cache_store_log | |
555 | TYPE: string | |
0153d498 | 556 | DEFAULT: @DEFAULT_STORE_LOG@ |
934b03fc | 557 | LOC: Config.Log.store |
558 | DOC_START | |
559 | Logs the activities of the storage manager. Shows which | |
560 | objects are ejected from the cache, and which objects are | |
cf5cc17e | 561 | saved and for how long. To disable, enter "none". There are |
562 | not really utilities to analyse this data, so you can safely | |
563 | disable it. | |
934b03fc | 564 | |
0153d498 | 565 | cache_store_log @DEFAULT_STORE_LOG@ |
934b03fc | 566 | DOC_END |
567 | ||
568 | ||
569 | NAME: cache_swap_log | |
570 | TYPE: string | |
571 | LOC: Config.Log.swap | |
1273d501 | 572 | DEFAULT: none |
934b03fc | 573 | DOC_START |
d0d3ec94 | 574 | Location for the cache "swap.log." This log file holds the |
934b03fc | 575 | metadata of objects saved on disk. It is used to rebuild the |
576 | cache during startup. Normally this file resides in the first | |
577 | 'cache_dir' directory, but you may specify an alternate | |
578 | pathname here. Note you must give a full filename, not just | |
cf5cc17e | 579 | a directory. Since this is the index for the whole object |
580 | list you CANNOT periodically rotate it! | |
934b03fc | 581 | |
582 | cache_swap_log | |
583 | DOC_END | |
584 | ||
585 | ||
586 | NAME: emulate_httpd_log | |
587 | COMMENT: on|off | |
588 | TYPE: onoff | |
f1dc9b30 | 589 | DEFAULT: off |
17a0a4ee | 590 | LOC: Config.onoff.common_log |
934b03fc | 591 | DOC_START |
592 | The Cache can emulate the log file format which many 'httpd' | |
593 | programs use. To disable/enable this emulation, set | |
594 | emulate_httpd_log to 'off' or 'on'. The default | |
cf5cc17e | 595 | is to use the native log format since it includes useful |
596 | information that Squid-specific log analysers use. | |
934b03fc | 597 | |
598 | emulate_httpd_log off | |
599 | DOC_END | |
600 | ||
601 | ||
602 | NAME: mime_table | |
f0b19334 | 603 | TYPE: string |
0153d498 | 604 | DEFAULT: @DEFAULT_MIME_TABLE@ |
934b03fc | 605 | LOC: Config.mimeTablePathname |
606 | DOC_START | |
cf5cc17e | 607 | Pathname to Squid's MIME table. You shouldn't need to change |
608 | this, but the default file contains examples and formatting | |
609 | information if you do. | |
934b03fc | 610 | |
0153d498 | 611 | mime_table @DEFAULT_MIME_TABLE@ |
934b03fc | 612 | DOC_END |
613 | ||
614 | ||
615 | NAME: log_mime_hdrs | |
616 | COMMENT: on|off | |
617 | TYPE: onoff | |
17a0a4ee | 618 | LOC: Config.onoff.log_mime_hdrs |
f1dc9b30 | 619 | DEFAULT: off |
934b03fc | 620 | DOC_START |
cf5cc17e | 621 | The Cache can record both the request and the response MIME |
622 | headers for each HTTP transaction. The headers are encoded | |
623 | safely and will appear as two bracketed fields at the end of | |
624 | the access log (for either the native or httpd-emulated log | |
625 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
934b03fc | 626 | |
627 | log_mime_hdrs off | |
628 | DOC_END | |
629 | ||
630 | ||
631 | NAME: useragent_log | |
632 | TYPE: string | |
633 | LOC: Config.Log.useragent | |
f1dc9b30 | 634 | DEFAULT: none |
934b03fc | 635 | DOC_START |
cf5cc17e | 636 | If configured with the "--enable-useragent_log" configure |
637 | option, Squid will write the User-Agent field from HTTP | |
638 | requests to the filename specified here. By default | |
639 | useragent_log is disabled. | |
934b03fc | 640 | |
641 | useragent_log none | |
642 | DOC_END | |
643 | ||
644 | ||
645 | NAME: pid_filename | |
646 | TYPE: string | |
0153d498 | 647 | DEFAULT: @DEFAULT_PID_FILE@ |
934b03fc | 648 | LOC: Config.pidFilename |
649 | DOC_START | |
d0d41f07 | 650 | A filename to write the process-id to. To disable, enter "none". |
934b03fc | 651 | |
0153d498 | 652 | pid_filename @DEFAULT_PID_FILE@ |
934b03fc | 653 | DOC_END |
654 | ||
655 | ||
656 | NAME: debug_options | |
f1dc9b30 | 657 | TYPE: eol |
934b03fc | 658 | DEFAULT: ALL,1 |
659 | LOC: Config.debugOptions | |
660 | DOC_START | |
661 | Logging options are set as section,level where each source file | |
662 | is assigned a unique section. Lower levels result in less | |
663 | output, Full debugging (level 9) can result in a very large | |
664 | log file, so be careful. The magic word "ALL" sets debugging | |
665 | levels for all sections. We recommend normally running with | |
666 | "ALL,1". | |
667 | ||
668 | debug_options ALL,1 | |
669 | DOC_END | |
670 | ||
671 | ||
672 | NAME: ident_lookup | |
673 | COMMENT: on|off | |
674 | TYPE: onoff | |
f1dc9b30 | 675 | DEFAULT: off |
17a0a4ee | 676 | LOC: Config.onoff.ident_lookup |
934b03fc | 677 | DOC_START |
cf5cc17e | 678 | If you wish to make an RFC931/ident lookup of the client |
679 | username for each connection, enable this. It is off by | |
680 | default. | |
934b03fc | 681 | |
682 | ident_lookup off | |
683 | DOC_END | |
684 | ||
685 | ||
686 | NAME: log_fqdn | |
687 | COMMENT: on|off | |
688 | TYPE: onoff | |
f1dc9b30 | 689 | DEFAULT: off |
17a0a4ee | 690 | LOC: Config.onoff.log_fqdn |
934b03fc | 691 | DOC_START |
692 | Turn this on if you wish to log fully qualified domain names | |
cf5cc17e | 693 | in the access.log. To do this Squid does a DNS lookup of all |
694 | IP's connecting to it. This can (in some situations) increase | |
695 | latency, which makes your cache seem slower for interactive | |
696 | browsing. | |
934b03fc | 697 | |
698 | log_fqdn off | |
699 | DOC_END | |
700 | ||
701 | ||
702 | NAME: client_netmask | |
703 | TYPE: address | |
704 | LOC: Config.Addrs.client_netmask | |
f1dc9b30 | 705 | DEFAULT: 255.255.255.255 |
934b03fc | 706 | DOC_START |
707 | A netmask for client addresses in logfiles and cachemgr output. | |
708 | Change this to protect the privacy of your cache clients. | |
cf5cc17e | 709 | A netmask of 255.255.255.0 will log all IP's in that range with |
710 | the last digit set to '0'. | |
934b03fc | 711 | |
712 | client_netmask 255.255.255.255 | |
713 | DOC_END | |
714 | ||
715 | ||
0f74202c | 716 | COMMENT_START |
3a278cb8 | 717 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS |
718 | ----------------------------------------------------------------------------- | |
0f74202c | 719 | COMMENT_END |
934b03fc | 720 | |
934b03fc | 721 | NAME: ftp_user |
722 | TYPE: string | |
cf5cc17e | 723 | DEFAULT: Squid@ |
934b03fc | 724 | LOC: Config.Ftp.anon_user |
725 | DOC_START | |
726 | If you want the anonymous login password to be more informative | |
727 | (and enable the use of picky ftp servers), set this to something | |
728 | resonable for your domain, like wwwuser@somewhere.net | |
729 | ||
730 | The reason why this is domainless by default is that the | |
731 | request can be made on the behalf of a user in any domain, | |
732 | depending on how the cache is used. | |
733 | Some ftp server also validate that the email address is valid | |
734 | (for example perl.com). | |
735 | ||
cf5cc17e | 736 | ftp_user Squid@ |
934b03fc | 737 | DOC_END |
738 | ||
365cb147 | 739 | NAME: ftp_list_width |
1b635117 | 740 | TYPE: size_t |
365cb147 | 741 | DEFAULT: 32 |
742 | LOC: Config.Ftp.list_width | |
743 | DOC_START | |
cf5cc17e | 744 | Sets the width of ftp listings. This should be set to fit in |
745 | the width of a standard browser. Setting this too small | |
746 | can cut off long filenames when browsing ftp sites. | |
747 | ||
365cb147 | 748 | ftp_list_width 32 |
749 | DOC_END | |
750 | ||
934b03fc | 751 | NAME: cache_dns_program |
f0b19334 | 752 | TYPE: string |
0153d498 | 753 | DEFAULT: @DEFAULT_DNSSERVER@ |
934b03fc | 754 | LOC: Config.Program.dnsserver |
755 | DOC_START | |
756 | Specify the location of the executable for dnslookup process. | |
757 | ||
0153d498 | 758 | cache_dns_program @DEFAULT_DNSSERVER@ |
934b03fc | 759 | DOC_END |
760 | ||
934b03fc | 761 | NAME: dns_children |
762 | TYPE: int | |
763 | DEFAULT: 5 | |
764 | LOC: Config.dnsChildren | |
765 | DOC_START | |
766 | The number of processes spawn to service DNS name lookups. | |
767 | For heavily loaded caches on large servers, you should | |
768 | probably increase this value to at least 10. The maximum | |
769 | is 32. The default is 5. | |
770 | ||
771 | To disable dnsservers, set this to 0. NOTE, this is very | |
772 | strongly discouraged. If you disable dnsservers your Squid | |
773 | process will BLOCK on DNS lookups! | |
774 | ||
775 | dns_children 5 | |
776 | DOC_END | |
777 | ||
778 | ||
779 | NAME: dns_defnames | |
780 | COMMENT: on|off | |
781 | TYPE: onoff | |
f1dc9b30 | 782 | DEFAULT: off |
17a0a4ee | 783 | LOC: Config.onoff.res_defnames |
934b03fc | 784 | DOC_START |
785 | Normally the 'dnsserver' disables the RES_DEFNAMES resolver | |
786 | option (see res_init(3)). This prevents caches in a hierarchy | |
787 | from interpreting single-component hostnames locally. To allow | |
788 | dnsserver to handle single-component names, enable this | |
789 | option. | |
790 | ||
791 | dns_defnames off | |
792 | DOC_END | |
793 | ||
09c483ec | 794 | NAME: dns_nameservers |
795 | TYPE: wordlist | |
796 | DEFAULT: none | |
797 | LOC: Config.dns_nameservers | |
798 | DOC_START | |
799 | Use this if you want to specify a list of DNS name servers | |
800 | (IP addresses) to use instead of those given in your | |
801 | /etc/resolv.conf file. | |
802 | ||
803 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
804 | ||
805 | dns_nameservers none | |
806 | DOC_END | |
807 | ||
934b03fc | 808 | |
809 | NAME: unlinkd_program | |
f0b19334 | 810 | TYPE: string |
0153d498 | 811 | DEFAULT: @DEFAULT_UNLINKD@ |
934b03fc | 812 | LOC: Config.Program.unlinkd |
813 | DOC_START | |
814 | Specify the location of the executable for file deletion process. | |
cf5cc17e | 815 | This isn't needed if you are using async-io since it's handled by |
816 | a thread. | |
934b03fc | 817 | |
0153d498 | 818 | unlinkd_program @DEFAULT_UNLINKD@ |
934b03fc | 819 | DOC_END |
820 | ||
821 | ||
822 | NAME: pinger_program | |
a95856a0 | 823 | TYPE: string |
0153d498 | 824 | DEFAULT: @DEFAULT_PINGER@ |
934b03fc | 825 | LOC: Config.Program.pinger |
826 | DOC_START | |
827 | Specify the location of the executable for the pinger process. | |
cf5cc17e | 828 | This is only useful if you configured Squid (during compliation) |
829 | with the '--enable-icmp' option. | |
934b03fc | 830 | |
0153d498 | 831 | pinger_program @DEFAULT_PINGER@ |
934b03fc | 832 | DOC_END |
833 | ||
834 | ||
835 | NAME: redirect_program | |
f0b19334 | 836 | TYPE: string |
934b03fc | 837 | LOC: Config.Program.redirect |
62607543 | 838 | DEFAULT: none |
934b03fc | 839 | DOC_START |
840 | Specify the location of the executable for the URL redirector. | |
cf5cc17e | 841 | Since they can perform almost any function there isn't one included. |
842 | See the Release-Notes for information on how to write one. | |
843 | By default, a redirector is not used. | |
934b03fc | 844 | |
f0b19334 | 845 | redirect_program none |
934b03fc | 846 | DOC_END |
847 | ||
848 | ||
849 | NAME: redirect_children | |
850 | TYPE: int | |
851 | DEFAULT: 5 | |
852 | LOC: Config.redirectChildren | |
853 | DOC_START | |
cf5cc17e | 854 | The number of redirector processes to spawn. If you start |
855 | too few Squid will have to wait for them to process a backlog of | |
856 | URLs, slowing it down. If you start too many they will use RAM | |
857 | and other system resources. | |
934b03fc | 858 | |
859 | redirect_children 5 | |
860 | DOC_END | |
861 | ||
0f74202c | 862 | COMMENT_START |
3a278cb8 | 863 | OPTIONS FOR TUNING THE CACHE |
864 | ----------------------------------------------------------------------------- | |
0f74202c | 865 | COMMENT_END |
934b03fc | 866 | |
0153d498 | 867 | NAME: wais_relay_host |
868 | TYPE: string | |
1273d501 | 869 | DEFAULT: none |
0153d498 | 870 | LOC: Config.Wais.relayHost |
871 | DOC_NONE | |
934b03fc | 872 | |
0153d498 | 873 | NAME: wais_relay_port |
874 | TYPE: ushort | |
875 | DEFAULT: 0 | |
876 | LOC: Config.Wais.relayPort | |
934b03fc | 877 | DOC_START |
878 | Relay WAIS request to host (1st arg) at port (2 arg). | |
879 | ||
0153d498 | 880 | wais_relay_host localhost |
881 | wais_relay_port 8000 | |
934b03fc | 882 | DOC_END |
883 | ||
884 | ||
885 | NAME: request_size | |
9906e724 | 886 | COMMENT: (KB) |
518da0bd | 887 | TYPE: b_size_t |
9906e724 | 888 | DEFAULT: 100 KB |
934b03fc | 889 | LOC: Config.maxRequestSize |
890 | DOC_START | |
891 | Maximum allowed request size in kilobytes. If people are using | |
892 | POST to upload files, then set this to the largest acceptable | |
893 | filesize plus a few extra kbytes. | |
894 | ||
9906e724 | 895 | request_size 100 KB |
934b03fc | 896 | DOC_END |
897 | ||
898 | ||
899 | NAME: refresh_pattern | |
934b03fc | 900 | TYPE: refreshpattern |
f1dc9b30 | 901 | LOC: Config.Refresh |
1273d501 | 902 | DEFAULT: none |
934b03fc | 903 | DOC_START |
904 | usage: refresh_pattern regex min percent max | |
905 | ||
906 | min and max are specified in MINUTES. | |
907 | percent is an integer number. | |
908 | ||
909 | Please see the file doc/Release-Notes-1.1.txt for a full | |
910 | description of Squid's refresh algorithm. Basically a | |
911 | cached object is: | |
912 | ||
913 | FRESH if age < min | |
914 | STALE if expires < now | |
915 | STALE if age > max | |
916 | FRESH if lm-factor < percent | |
917 | ||
918 | The refresh_pattern lines are checked in the order listed here. | |
919 | The first entry which matches is used. If none of the entries | |
920 | match, then the default will be used. | |
921 | ||
922 | Default: | |
923 | refresh_pattern . 0 20% 4320 | |
924 | DOC_END | |
925 | ||
926 | ||
927 | NAME: reference_age | |
f1dc9b30 | 928 | TYPE: time_t |
934b03fc | 929 | LOC: Config.referenceAge |
f1dc9b30 | 930 | DEFAULT: 1 year |
934b03fc | 931 | DOC_START |
932 | As a part of normal operation, Squid performs Least Recently | |
933 | Used removal of cached objects. The LRU age for removal is | |
934 | computed dynamically, based on the amount of disk space in | |
935 | use. The 'reference_age' value defines the maximum LRU age. | |
936 | For example, setting reference_age to '1 week' will cause | |
937 | objects to be removed if they have not been accessed for a week | |
938 | or more. If set to zero, LRU removal is disabled, and objects | |
939 | will be removed only when disk usage is over the high water | |
cf5cc17e | 940 | mark. The default value is one month. |
934b03fc | 941 | |
942 | Specify a number here, followed by units of time. For example: | |
943 | 1 week | |
944 | 3.5 days | |
945 | 4 months | |
946 | 2.2 hours | |
947 | ||
f1dc9b30 | 948 | reference_age 1 month |
934b03fc | 949 | DOC_END |
950 | ||
951 | ||
0153d498 | 952 | NAME: quick_abort_min |
9906e724 | 953 | COMMENT: (KB) |
954 | TYPE: kb_size_t | |
9e975e4e | 955 | DEFAULT: -1 kb |
0153d498 | 956 | LOC: Config.quickAbort.min |
957 | DOC_NONE | |
958 | ||
959 | NAME: quick_abort_pct | |
960 | COMMENT: (percent) | |
961 | TYPE: int | |
962 | DEFAULT: 0 | |
963 | LOC: Config.quickAbort.pct | |
964 | DOC_NONE | |
965 | ||
966 | NAME: quick_abort_max | |
9906e724 | 967 | COMMENT: (KB) |
968 | TYPE: kb_size_t | |
9e975e4e | 969 | DEFAULT: 0 kb |
0153d498 | 970 | LOC: Config.quickAbort.max |
934b03fc | 971 | DOC_START |
cf5cc17e | 972 | The cache can be configured to continue downloading aborted |
973 | requests. This may be undesirable on slow (e.g. SLIP) links | |
974 | and/or very busy caches. Impatient users may tie up file | |
975 | descriptors and bandwidth by repeatedly requesting and | |
976 | immediately aborting downloads. | |
934b03fc | 977 | |
978 | When the user aborts a request, Squid will check the | |
979 | quick_abort values to the amount of data transfered until | |
980 | then. | |
981 | ||
cf5cc17e | 982 | If the transfer has less than 'quick_abort_min' KB remaining, |
983 | it will finish the retrieval. Setting 'quick_abort_min' to -1 | |
984 | will disable the quick_abort feature. | |
934b03fc | 985 | |
cf5cc17e | 986 | If more than 'quick_abort_pct' of the transfer has completed, |
987 | it will finish the retrieval. | |
934b03fc | 988 | |
cf5cc17e | 989 | If the transfer has more than 'quick_abort_max' KB remaining, |
990 | it will abort the retrieval. | |
934b03fc | 991 | |
cf5cc17e | 992 | quick_abort_min -1 KB |
0153d498 | 993 | quick_abort_pct 0 |
cf5cc17e | 994 | quick_abort_max 0 KB |
934b03fc | 995 | DOC_END |
996 | ||
997 | ||
998 | NAME: negative_ttl | |
bc0eb004 | 999 | COMMENT: time-units |
f1dc9b30 | 1000 | TYPE: time_t |
934b03fc | 1001 | LOC: Config.negativeTtl |
9e975e4e | 1002 | DEFAULT: 5 minutes |
934b03fc | 1003 | DOC_START |
1004 | Time-to-Live (TTL) for failed requests. Certain types of | |
1005 | failures (such as "connection refused" and "404 Not Found") are | |
cf5cc17e | 1006 | negatively-cached for a configurable amount of time. The |
1007 | default is 5 minutes. Note that this is different from | |
1008 | negative caching of DNS lookups. | |
934b03fc | 1009 | |
1010 | negative_ttl 5 minutes | |
1011 | DOC_END | |
1012 | ||
1013 | ||
1014 | NAME: positive_dns_ttl | |
bc0eb004 | 1015 | COMMENT: time-units |
f1dc9b30 | 1016 | TYPE: time_t |
934b03fc | 1017 | LOC: Config.positiveDnsTtl |
9e975e4e | 1018 | DEFAULT: 6 hours |
934b03fc | 1019 | DOC_START |
1020 | Time-to-Live (TTL) for positive caching of successful DNS lookups. | |
1021 | Default is 6 hours (360 minutes). If you want to minimize the | |
1022 | use of Squid's ipcache, set this to 1, not 0. | |
1023 | ||
9e975e4e | 1024 | positive_dns_ttl 6 hours |
934b03fc | 1025 | DOC_END |
1026 | ||
1027 | ||
1028 | NAME: negative_dns_ttl | |
bc0eb004 | 1029 | COMMENT: time-units |
f1dc9b30 | 1030 | TYPE: time_t |
934b03fc | 1031 | LOC: Config.negativeDnsTtl |
9e975e4e | 1032 | DEFAULT: 5 minutes |
934b03fc | 1033 | DOC_START |
1034 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
1035 | ||
1036 | negative_dns_ttl 5 minutes | |
1037 | DOC_END | |
1038 | ||
0f74202c | 1039 | COMMENT_START |
3a278cb8 | 1040 | TIMEOUTS |
1041 | ----------------------------------------------------------------------------- | |
0f74202c | 1042 | COMMENT_END |
934b03fc | 1043 | |
1044 | NAME: connect_timeout | |
bc0eb004 | 1045 | COMMENT: time-units |
f1dc9b30 | 1046 | TYPE: time_t |
934b03fc | 1047 | LOC: Config.Timeout.connect |
9e975e4e | 1048 | DEFAULT: 2 minutes |
934b03fc | 1049 | DOC_START |
1050 | Some systems (notably Linux) can not be relied upon to properly | |
cf5cc17e | 1051 | time out connect(2) requests. Therefore the Squid process |
934b03fc | 1052 | enforces its own timeout on server connections. This parameter |
1053 | specifies how long to wait for the connect to complete. The | |
1054 | default is two minutes (120 seconds). | |
1055 | ||
1056 | connect_timeout 120 seconds | |
1057 | DOC_END | |
1058 | ||
23d92c64 | 1059 | NAME: siteselect_timeout |
1060 | COMMENT: time-units | |
1061 | TYPE: time_t | |
1062 | LOC: Config.Timeout.siteSelect | |
1063 | DEFAULT: 4 seconds | |
1064 | DOC_START | |
1065 | For URN to multiple URL's URL selection | |
1066 | ||
1067 | siteselect_timeout 4 seconds | |
1068 | DOC_END | |
934b03fc | 1069 | |
1070 | NAME: read_timeout | |
bc0eb004 | 1071 | COMMENT: time-units |
f1dc9b30 | 1072 | TYPE: time_t |
934b03fc | 1073 | LOC: Config.Timeout.read |
9e975e4e | 1074 | DEFAULT: 15 minutes |
934b03fc | 1075 | DOC_START |
1076 | The read_timeout is applied on server-side connections. After | |
1077 | each successful read(), the timeout will be extended by this | |
1078 | amount. If no data is read again after this amount of time, | |
1079 | the request is aborted and logged with ERR_READ_TIMEOUT. The | |
1080 | default is 15 minutes. | |
1081 | ||
1082 | read_timeout 15 minutes | |
1083 | DOC_END | |
1084 | ||
1085 | ||
934b03fc | 1086 | NAME: request_timeout |
f1dc9b30 | 1087 | TYPE: time_t |
934b03fc | 1088 | LOC: Config.Timeout.request |
9e975e4e | 1089 | DEFAULT: 30 seconds |
934b03fc | 1090 | DOC_START |
1091 | How long to wait for an HTTP request after connection | |
1092 | establishment. For persistent connections, wait this long | |
1093 | after the previous request completes. | |
1094 | ||
0fbcf3c7 | 1095 | request_timeout 30 seconds |
934b03fc | 1096 | DOC_END |
1097 | ||
1098 | ||
1099 | NAME: client_lifetime | |
bc0eb004 | 1100 | COMMENT: time-units |
f1dc9b30 | 1101 | TYPE: time_t |
934b03fc | 1102 | LOC: Config.Timeout.lifetime |
9e975e4e | 1103 | DEFAULT: 1 day |
934b03fc | 1104 | DOC_START |
1105 | The maximum amount of time that a client (browser) is allowed to | |
1106 | remain connected to the cache process. This protects the Cache | |
1107 | from having alot of sockets (and hence file descriptors) tied up | |
1108 | in a CLOSE_WAIT state from remote clients that go away without | |
1109 | properly shutting down (either because of a network failure or | |
1110 | because of a poor client implementation). The default is one | |
1111 | day, 1440 minutes. | |
1112 | ||
1113 | NOTE: The default value is intended to be much larger than any | |
1114 | client would ever need to be connected to your cache. You | |
1115 | should probably change client_lifetime only as a last resort. | |
1116 | If you seem to have many client connections tying up | |
1117 | filedescriptors, we recommend first tuning the read_timeout, | |
0fbcf3c7 | 1118 | request_timeout, pconn_timeout and quick_abort values. |
934b03fc | 1119 | |
1120 | client_lifetime 1 day | |
1121 | DOC_END | |
1122 | ||
603a02fd | 1123 | NAME: pconn_timeout |
1124 | TYPE: time_t | |
1125 | LOC: Config.Timeout.pconn | |
1126 | DEFAULT: 120 seconds | |
1127 | DOC_START | |
1128 | Timeout for idle persistent connections to servers and other | |
1129 | proxies. | |
1130 | pconn_timeout 120 seconds | |
1131 | DOC_END | |
1132 | ||
934b03fc | 1133 | |
1134 | NAME: shutdown_lifetime | |
bc0eb004 | 1135 | COMMENT: time-units |
f1dc9b30 | 1136 | TYPE: time_t |
934b03fc | 1137 | LOC: Config.shutdownLifetime |
9e975e4e | 1138 | DEFAULT: 30 seconds |
934b03fc | 1139 | DOC_START |
1140 | When SIGTERM or SIGHUP is received, the cache is put into | |
1141 | "shutdown pending" mode until all active sockets are closed. | |
1142 | This value is the lifetime to set for all open descriptors | |
1143 | during shutdown mode. Any active clients after this many | |
1144 | seconds will receive a 'timeout' message. | |
1145 | ||
1146 | shutdown_lifetime 30 seconds | |
1147 | DOC_END | |
1148 | ||
0f74202c | 1149 | COMMENT_START |
3a278cb8 | 1150 | ACCESS CONTROLS |
1151 | ----------------------------------------------------------------------------- | |
0f74202c | 1152 | COMMENT_END |
934b03fc | 1153 | |
1154 | NAME: acl | |
1155 | TYPE: acl | |
f1dc9b30 | 1156 | LOC: Config.aclList |
1157 | DEFAULT: none | |
934b03fc | 1158 | DOC_START |
1159 | Defining an Access List | |
1160 | ||
1161 | acl aclname acltype string1 ... | |
1162 | acl aclname acltype "file" ... | |
1163 | ||
1164 | when using "file", the file should contain one item per line | |
1165 | ||
1166 | acltype is one of src dst srcdomain dstdomain url_pattern | |
1167 | urlpath_pattern time port proto method browser user | |
1168 | ||
1169 | acl aclname src ip-address/netmask ... (clients IP address) | |
1170 | acl aclname src addr1-addr2/netmask ... (range of addresses) | |
1171 | acl aclname dst ip-address/netmask ... (URL host's IP address) | |
d0d41f07 | 1172 | |
1173 | acl aclname srcdomain foo.com ... # reverse lookup, client IP | |
1174 | acl aclname dstdomain foo.com ... # Destination server from URL | |
1175 | acl aclname srcdom_regex xxx ... # regex matching client name | |
1176 | acl aclname dstdom_regex xxx ... # regex matching server | |
1177 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP | |
1178 | # based URL is used. The name "none" is used if the reverse lookup | |
1179 | # fails. | |
1180 | ||
934b03fc | 1181 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
1182 | day-abbrevs: | |
1183 | S - Sunday | |
1184 | M - Monday | |
1185 | T - Tuesday | |
1186 | W - Wednesday | |
1187 | H - Thursday | |
1188 | F - Friday | |
1189 | A - Saturday | |
1190 | h1:m1 must be less than h2:m2 | |
1191 | acl aclname url_regex ^http:// ... # regex matching on whole URL | |
d0d41f07 | 1192 | acl aclname urlpath_regex \.gif$ ... # regex matching on URL path |
934b03fc | 1193 | acl aclname port 80 70 21 ... |
1194 | acl aclname proto HTTP FTP ... | |
1195 | acl aclname method GET POST ... | |
1196 | acl aclname browser regexp | |
1197 | acl aclname user username ... # string match on ident output. | |
1198 | # use REQUIRED to accept any | |
1199 | # non-null ident. | |
6468fe10 | 1200 | acl aclname src_as number ... |
1201 | acl aclname dst_as number ... | |
1202 | # Except for access control, AS numbers can be used for | |
1203 | # routing of requests to specific caches. Here's an | |
1204 | # example for routing all requests for AS#1241 and only | |
1205 | # those to mycache.mydomain.net: | |
1206 | # acl asexample dst_as 1241 | |
af7d912e | 1207 | # cache_peer_acl mycache.mydomain.net asexample |
1208 | # cache_peer_acl mycache_mydomain.net !all | |
6468fe10 | 1209 | |
afe95a7e | 1210 | acl aclname proxy_auth passwd_file [ refresh ] |
1211 | # 'passwd_file' is an Apache-style file of passwords for | |
1212 | # authenticated proxy access. Looks like user:password, with | |
1213 | # the password being standard crypt() format. 'refresh' is | |
1214 | # the time in seconds to check for a changes in the file | |
1215 | # (default = 300 secs). When using a proxy_auth ACL in an | |
1216 | # ACL list, make sure it is the *last* in the list and the | |
1217 | # only proxy_auth ACL in the list. NOTE: when a | |
1218 | # Proxy-Authentication header is sent but it is not needed | |
1219 | # during ACL checking the username is NOT logged in | |
1220 | # access.log. | |
934b03fc | 1221 | |
1222 | acl manager proto cache_object | |
1223 | acl localhost src 127.0.0.1/255.255.255.255 | |
1224 | acl all src 0.0.0.0/0.0.0.0 | |
6468fe10 | 1225 | acl myexample dst_as 1241 |
934b03fc | 1226 | acl SSL_ports port 443 563 |
1227 | acl Dangerous_ports port 7 9 19 | |
1228 | acl CONNECT method CONNECT | |
1229 | DOC_END | |
1230 | ||
1231 | NAME: http_access | |
1232 | TYPE: acl_access | |
f1dc9b30 | 1233 | LOC: Config.accessList.http |
1234 | DEFAULT: none | |
934b03fc | 1235 | DOC_START |
1236 | Allowing or Denying access based on defined access lists | |
1237 | ||
1238 | Access to the HTTP port: | |
1239 | http_access allow|deny [!]aclname ... | |
1240 | ||
1241 | Access to the ICP port: | |
1242 | icp_access allow|deny [!]aclname ... | |
1243 | ||
1244 | NOTE on default values: | |
1245 | ||
1246 | If there are no "access" lines present, the default is to allow | |
1247 | the request. | |
1248 | ||
1249 | If none of the "access" lines cause a match, the default is the | |
1250 | opposite of the last line in the list. If the last line was | |
1251 | deny, then the default is allow. Conversely, if the last line | |
1252 | is allow, the default will be deny. For these reasons, it is a | |
1253 | good idea to have an "deny all" or "allow all" entry at the end | |
1254 | of your access lists to avoid potential confusion. | |
1255 | ||
1256 | ||
1257 | Only allow access to the cache manager functions from the local host. | |
1258 | http_access deny manager !localhost | |
1259 | http_access deny CONNECT !SSL_ports | |
1260 | http_access deny Dangerous_ports | |
1261 | ||
1262 | Allow everything else | |
1263 | http_access allow all | |
1264 | DOC_END | |
1265 | ||
1266 | ||
1267 | NAME: icp_access | |
1268 | TYPE: acl_access | |
f1dc9b30 | 1269 | LOC: Config.accessList.icp |
1270 | DEFAULT: none | |
934b03fc | 1271 | DOC_START |
1272 | Reply to all ICP queries we receive | |
1273 | ||
1274 | icp_access allow all | |
1275 | DOC_END | |
1276 | ||
1277 | ||
1278 | NAME: miss_access | |
1279 | TYPE: acl_access | |
f1dc9b30 | 1280 | LOC: Config.accessList.miss |
1281 | DEFAULT: none | |
934b03fc | 1282 | DOC_START |
1283 | Use to force your neighbors to use you as a sibling instead of | |
1284 | a parent. For example: | |
1285 | ||
1286 | acl localclients src 172.16.0.0/16 | |
1287 | miss_access allow localclients | |
1288 | miss_access deny !localclients | |
1289 | ||
1290 | This means that only your local clients are allowed to fetch | |
1291 | MISSES and all other clients can only fetch HITS. | |
1292 | ||
1293 | By default, allow all clients who passed the http_access rules | |
1294 | to fetch MISSES from us. | |
1295 | ||
1296 | miss_access allow all | |
1297 | DOC_END | |
1298 | ||
1299 | ||
af7d912e | 1300 | NAME: cache_peer_acl cache_host_acl |
f1dc9b30 | 1301 | TYPE: peeracl |
1302 | DEFAULT: none | |
1303 | LOC: none | |
934b03fc | 1304 | DOC_START |
af7d912e | 1305 | Just like 'cache_peer_domain' but provides more flexibility by |
934b03fc | 1306 | using ACL's. |
1307 | ||
af7d912e | 1308 | cache_peer_acl cache-host [!]aclname ... |
934b03fc | 1309 | |
1310 | NOTE: * Any number of ACL's may be given for a cache-host, | |
1311 | either on the same or separate lines. | |
1312 | * When multiple ACL's are given for a particular | |
1313 | cache-host, the first matched ACL is applied. | |
1314 | * Cache hosts with no domain or ACL restrictions are | |
1315 | queried for all requests. | |
1316 | * There are no defaults. | |
1317 | DOC_END | |
1318 | ||
0f74202c | 1319 | COMMENT_START |
3a278cb8 | 1320 | ADMINISTRATIVE PARAMETERS |
1321 | ----------------------------------------------------------------------------- | |
0f74202c | 1322 | COMMENT_END |
934b03fc | 1323 | |
1324 | NAME: cache_mgr | |
1325 | TYPE: string | |
1326 | DEFAULT: webmaster | |
1327 | LOC: Config.adminEmail | |
1328 | DOC_START | |
1329 | Email-address of local cache manager who will receive | |
1330 | mail if the cache dies. The default is "webmaster." | |
1331 | ||
1332 | cache_mgr webmaster | |
1333 | DOC_END | |
1334 | ||
1335 | ||
1336 | NAME: cache_effective_user | |
0153d498 | 1337 | TYPE: string |
a95856a0 | 1338 | DEFAULT: nobody |
0153d498 | 1339 | LOC: Config.effectiveUser |
1340 | DOC_NONE | |
1341 | ||
1342 | NAME: cache_effective_group | |
1343 | TYPE: string | |
a95856a0 | 1344 | DEFAULT: nogroup |
0153d498 | 1345 | LOC: Config.effectiveGroup |
934b03fc | 1346 | DOC_START |
1347 | If the cache is run as root, it will change its effective/real | |
1348 | UID/GID to the UID/GID specified below. The default is not to | |
1349 | change UID/GID. | |
1350 | ||
0153d498 | 1351 | cache_effective_user nobody |
1352 | cache_effective_group nogroup | |
934b03fc | 1353 | DOC_END |
1354 | ||
1355 | ||
1356 | NAME: visible_hostname | |
1357 | TYPE: string | |
1358 | LOC: Config.visibleHostname | |
f1dc9b30 | 1359 | DEFAULT: none |
934b03fc | 1360 | DOC_START |
1361 | If you want to present a special hostname in error messages, etc, | |
1362 | then define this. Otherwise, the return value of gethostname() | |
cf5cc17e | 1363 | will be used. If you have multiple caches in a cluster and |
1364 | get errors about IP-forwarding you must set them to have individual | |
1365 | names with this setting. | |
934b03fc | 1366 | |
1367 | visible_hostname www-cache.foo.org | |
1368 | DOC_END | |
1369 | ||
0f74202c | 1370 | COMMENT_START |
3a278cb8 | 1371 | OPTIONS FOR THE CACHE REGISTRATION SERVICE |
1372 | ----------------------------------------------------------------------------- | |
934b03fc | 1373 | |
3a278cb8 | 1374 | This section contains parameters for the (optional) cache |
1375 | announcement service. This service is provided to help | |
1376 | cache administrators locate one another in order to join or | |
1377 | create cache hierarchies. | |
934b03fc | 1378 | |
3a278cb8 | 1379 | An 'announcement' message is sent (via UDP) to the registration |
1380 | service by Squid. By default, the annoucement message is NOT | |
d2d631ce | 1381 | SENT unless you enable it with 'announce_period' below. |
3a278cb8 | 1382 | |
1383 | The announcement message includes your hostname, plus the | |
1384 | following information from this configuration file: | |
934b03fc | 1385 | |
3a278cb8 | 1386 | http_port |
1387 | icp_port | |
1388 | cache_mgr | |
1389 | ||
1390 | All current information is processed regularly and made | |
d2d631ce | 1391 | available on the Web at http://ircache.nlanr.net/Cache/Tracker/. |
0f74202c | 1392 | COMMENT_END |
934b03fc | 1393 | |
f1dc9b30 | 1394 | NAME: announce_period |
1395 | TYPE: time_t | |
1396 | LOC: Config.Announce.period | |
d2d631ce | 1397 | DEFAULT: 0 |
934b03fc | 1398 | DOC_START |
d2d631ce | 1399 | This is how frequently to send cache announcements. The |
1400 | default is `0' which disables sending the announcement | |
1401 | messages. | |
934b03fc | 1402 | |
d2d631ce | 1403 | To enable announcing your cache, just uncomment the line |
1404 | below. | |
934b03fc | 1405 | |
9e975e4e | 1406 | announce_period 1 day |
934b03fc | 1407 | DOC_END |
1408 | ||
1409 | ||
f1dc9b30 | 1410 | NAME: announce_host |
1411 | TYPE: string | |
61735fcf | 1412 | DEFAULT: tracker.ircache.net |
f1dc9b30 | 1413 | LOC: Config.Announce.host |
1414 | DOC_NONE | |
1415 | ||
cf5cc17e | 1416 | NAME: announce_file |
1417 | TYPE: string | |
61735fcf | 1418 | DEFAULT: none |
cf5cc17e | 1419 | LOC: Config.Announce.file |
1420 | DOC_NONE | |
1421 | ||
f1dc9b30 | 1422 | NAME: announce_port |
1423 | TYPE: ushort | |
1424 | DEFAULT: 3131 | |
1425 | LOC: Config.Announce.port | |
934b03fc | 1426 | DOC_START |
d2d631ce | 1427 | announce_host and announce_port set the hostname and port |
1428 | number where the registration message will be sent. | |
934b03fc | 1429 | |
d2d631ce | 1430 | Hostname will default to 'tracker.ircache.net' and port will |
1431 | default default to 3131. If the 'filename' argument is given, | |
1432 | the contents of that file will be included in the announce | |
1433 | message. | |
934b03fc | 1434 | |
61735fcf | 1435 | announce_host tracker.ircache.net |
f1dc9b30 | 1436 | announce_port 3131 |
934b03fc | 1437 | DOC_END |
1438 | ||
0f74202c | 1439 | COMMENT_START |
3a278cb8 | 1440 | HTTPD-ACCELERATOR OPTIONS |
1441 | ----------------------------------------------------------------------------- | |
0f74202c | 1442 | COMMENT_END |
934b03fc | 1443 | |
f1dc9b30 | 1444 | NAME: httpd_accel_host |
1445 | TYPE: string | |
1446 | LOC: Config.Accel.host | |
1447 | DEFAULT: none | |
1448 | DOC_NONE | |
1449 | ||
1450 | NAME: httpd_accel_port | |
1451 | TYPE: ushort | |
1452 | LOC: Config.Accel.port | |
5b68a4d3 | 1453 | DEFAULT: 80 |
934b03fc | 1454 | DOC_START |
cf5cc17e | 1455 | If you want to run Squid as an httpd accelerator, define the |
934b03fc | 1456 | host name and port number where the real HTTP server is. |
1457 | ||
1458 | If you want virtual host support then specify the hostname | |
1459 | as "virtual". | |
1460 | ||
f1dc9b30 | 1461 | httpd_accel_host hostname |
1462 | httpd_accel_port port | |
934b03fc | 1463 | DOC_END |
1464 | ||
1465 | ||
1466 | NAME: httpd_accel_with_proxy | |
1467 | COMMENT: on|off | |
1468 | TYPE: onoff | |
f1dc9b30 | 1469 | DEFAULT: off |
17a0a4ee | 1470 | LOC: Config.onoff.accel_with_proxy |
934b03fc | 1471 | DOC_START |
cf5cc17e | 1472 | If you want to use Squid as both a local httpd accelerator |
934b03fc | 1473 | and as a proxy, change this to 'on'. |
1474 | ||
1475 | httpd_accel_with_proxy off | |
1476 | DOC_END | |
1477 | ||
1478 | ||
1479 | NAME: httpd_accel_uses_host_header | |
1480 | COMMENT: on|off | |
1481 | TYPE: onoff | |
f1dc9b30 | 1482 | DEFAULT: off |
934b03fc | 1483 | LOC: opt_accel_uses_host |
1484 | DOC_START | |
1485 | HTTP/1.1 requests include a Host: header which is basically the | |
1486 | hostname from the URL. Squid can be an accelerator for | |
1487 | different HTTP servers by looking at this header. However, | |
1488 | Squid does NOT check the value of the Host header, so it opens | |
1489 | a big security hole. We recommend that this option remain | |
1490 | disabled unless you are sure of what you are doing. | |
1491 | ||
04f6f348 | 1492 | However, you will need to enable this option if you run Squid |
1493 | as a transparent proxy. Otherwise, virtual servers which | |
1494 | require the Host: header will not be properly cached. | |
934b03fc | 1495 | httpd_accel_uses_host_header off |
1496 | DOC_END | |
1497 | ||
0f74202c | 1498 | COMMENT_START |
3a278cb8 | 1499 | MISCELLANEOUS |
1500 | ----------------------------------------------------------------------------- | |
0f74202c | 1501 | COMMENT_END |
934b03fc | 1502 | |
1503 | NAME: dns_testnames | |
1504 | TYPE: wordlist | |
1505 | LOC: Config.dns_testname_list | |
f1dc9b30 | 1506 | DEFAULT: none |
934b03fc | 1507 | DOC_START |
1508 | The DNS tests exit as soon as the first site is successfully looked up | |
1509 | ||
1510 | If you want to disable DNS tests, do not comment out or delete this | |
1511 | list. Instead use the -D command line option | |
1512 | ||
cf5cc17e | 1513 | dns_testnames netscape.com internic.net nlanr.net microsoft.com |
934b03fc | 1514 | DOC_END |
1515 | ||
1516 | ||
1517 | NAME: logfile_rotate | |
1518 | TYPE: int | |
1519 | DEFAULT: 10 | |
1520 | LOC: Config.Log.rotateNumber | |
1521 | DOC_START | |
cf5cc17e | 1522 | Specifies the number of logfile rotations to make upon |
1523 | receiving a USR1 signal. The default is 10, which will rotate | |
1524 | with extensions 0 through 9. Setting logfile_rotate to 0 will | |
934b03fc | 1525 | disable the rotation, but the logfiles are still closed and |
cf5cc17e | 1526 | re-opened. This will enable you to rename the logfiles |
1527 | yourself just before sending a USR1 signal to the Squid | |
1528 | process. | |
934b03fc | 1529 | |
1530 | logfile_rotate 10 | |
1531 | DOC_END | |
1532 | ||
1533 | ||
1534 | NAME: append_domain | |
f1dc9b30 | 1535 | TYPE: string |
1536 | LOC: Config.appendDomain | |
1537 | DEFAULT: none | |
934b03fc | 1538 | DOC_START |
cf5cc17e | 1539 | Appends local domain name to hostnames without any dots in |
1540 | them. append_domain must begin with a period. | |
934b03fc | 1541 | |
1542 | append_domain .yourdomain.com | |
1543 | DOC_END | |
1544 | ||
1545 | ||
1546 | NAME: tcp_recv_bufsize | |
89de058c | 1547 | COMMENT: (bytes) |
1b635117 | 1548 | TYPE: b_size_t |
89de058c | 1549 | DEFAULT: 0 bytes |
934b03fc | 1550 | LOC: Config.tcpRcvBufsz |
1551 | DOC_START | |
1552 | Size of receive buffer to set for TCP sockets. Probably just | |
1553 | as easy to change your kernel's default. Set to zero to use | |
1554 | the default buffer size. | |
1555 | ||
89de058c | 1556 | tcp_recv_bufsize 0 bytes |
934b03fc | 1557 | DOC_END |
1558 | ||
934b03fc | 1559 | NAME: err_html_text |
f1dc9b30 | 1560 | TYPE: eol |
1561 | LOC: Config.errHtmlText | |
1562 | DEFAULT: none | |
934b03fc | 1563 | DOC_START |
1564 | HTML text to include in error messages. Make this a "mailto" | |
1565 | URL to your admin address, or maybe just a link to your | |
1566 | organizations Web page. | |
1567 | ||
1568 | err_html_text | |
1569 | DOC_END | |
1570 | ||
1571 | ||
1572 | NAME: deny_info | |
1573 | TYPE: denyinfo | |
1574 | LOC: Config.denyInfoList | |
f1dc9b30 | 1575 | DEFAULT: none |
934b03fc | 1576 | DOC_START |
02922e76 | 1577 | Usage: deny_info err_page_name acl |
1578 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys | |
934b03fc | 1579 | |
02922e76 | 1580 | This can be used to return a ERR_ page for requests which |
934b03fc | 1581 | do not pass the 'http_access' rules. A single ACL will cause |
1582 | the http_access check to fail. If a 'deny_info' line exists | |
02922e76 | 1583 | for that ACL then Squid returns a corresponding error page. |
cf5cc17e | 1584 | |
02922e76 | 1585 | You may use ERR_ pages that come with Squid or create your own pages |
1586 | and put them into the configured errors/ directory. | |
934b03fc | 1587 | DOC_END |
1588 | ||
934b03fc | 1589 | NAME: memory_pools |
1590 | COMMENT: on|off | |
1591 | TYPE: onoff | |
f1dc9b30 | 1592 | DEFAULT: on |
3f6c0fb2 | 1593 | LOC: Config.onoff.mem_pools |
934b03fc | 1594 | DOC_START |
1595 | If set, Squid will keep pools of allocated (but unused) memory | |
1596 | available for future use. If memory is a premium on your | |
7021844c | 1597 | system and you believe your malloc library outperforms Squid |
d0d41f07 | 1598 | routines, disable this. |
934b03fc | 1599 | |
1600 | memory_pools on | |
1601 | DOC_END | |
1602 | ||
7021844c | 1603 | NAME: memory_pools_limit |
1604 | COMMENT: (bytes) | |
1605 | TYPE: b_size_t | |
1606 | DEFAULT: none | |
f12c295b | 1607 | LOC: Config.MemPools.limit |
7021844c | 1608 | DOC_START |
f12c295b | 1609 | Used only with memory_pools on: |
1610 | memory_pools_limit 50 MB | |
7021844c | 1611 | |
f12c295b | 1612 | If set to a non-zero value, Squid will keep at most the specified |
1613 | limit of allocated (but unused) memory in memory pools. All free() | |
1614 | requests that exceed this limit will be handled by your malloc | |
1615 | library. Squid does not pre-allocate any memory, just safe-keeps | |
1616 | objects that otherwise would be free()d. Thus, it is safe to set | |
7021844c | 1617 | memory_pools_limit to a reasonably high value even if your |
f12c295b | 1618 | configuration will use less memory. |
1619 | ||
1620 | If not set (default) or set to zero, Squid will keep all memory it | |
1621 | can. That is, there will be no limit on the total amount of memory | |
1622 | used for safe-keeping. | |
7021844c | 1623 | |
1624 | To disable memory allocation optimization, do not set | |
1625 | memory_pools_limit to 0. Set memory_pools to "off" instead. | |
1626 | ||
f12c295b | 1627 | An overhead for maintaining memory pools is not taken into account |
1628 | when the limit is checked. This overhead is close to four bytes per | |
1629 | object kept. However, pools may actually _save_ memory because of | |
1630 | reduced memory thrashing in your malloc library. | |
7021844c | 1631 | DOC_END |
1632 | ||
934b03fc | 1633 | NAME: forwarded_for |
1634 | COMMENT: on|off | |
1635 | TYPE: onoff | |
f1dc9b30 | 1636 | DEFAULT: on |
934b03fc | 1637 | LOC: opt_forwarded_for |
1638 | DOC_START | |
1639 | If set, Squid will include your system's IP address or name | |
1640 | in the HTTP requests it forwards. By default it looks like | |
1641 | this: | |
1642 | ||
1643 | X-Forwarded-For: 192.1.2.3 | |
1644 | ||
1645 | If you disable this, it will appear as | |
1646 | ||
1647 | X-Forwarded-For: unknown | |
1648 | ||
1649 | forwarded_for on | |
1650 | DOC_END | |
1651 | ||
1652 | NAME: log_icp_queries | |
1653 | COMMENT: on|off | |
1654 | TYPE: onoff | |
f1dc9b30 | 1655 | DEFAULT: on |
17a0a4ee | 1656 | LOC: Config.onoff.log_udp |
934b03fc | 1657 | DOC_START |
cf5cc17e | 1658 | If set, ICP queries are logged to access.log. You may wish |
1659 | do disable this if your ICP load is VERY high to speed things | |
1660 | up or to simplify log analysis. | |
934b03fc | 1661 | |
1662 | log_icp_queries on | |
1663 | DOC_END | |
1664 | ||
88738790 | 1665 | NAME: icp_hit_stale |
1666 | COMMENT: on|off | |
1667 | TYPE: onoff | |
1668 | DEFAULT: off | |
17a0a4ee | 1669 | LOC: Config.onoff.icp_hit_stale |
88738790 | 1670 | DOC_START |
1671 | If you want to return ICP_HIT for stale cache objects, set this | |
1672 | option to 'on'. If you have sibling relationships with caches | |
1673 | in other administrative domains, this should be 'off'. If you only | |
1674 | have sibling relationships with caches under your control, then | |
1675 | it is probably okay to set this to 'on'. | |
1676 | ||
1677 | icp_hit_stale off | |
1678 | DOC_END | |
1679 | ||
934b03fc | 1680 | |
1681 | NAME: minimum_direct_hops | |
1682 | TYPE: int | |
1683 | DEFAULT: 4 | |
1684 | LOC: Config.minDirectHops | |
1685 | DOC_START | |
1686 | If using the ICMP pinging stuff, do direct fetches for sites | |
1687 | which are no more than this many hops away. | |
1688 | ||
1689 | minimum_direct_hops 4 | |
1690 | DOC_END | |
1691 | ||
1692 | ||
1693 | NAME: cachemgr_passwd | |
1694 | TYPE: cachemgrpasswd | |
86101e40 | 1695 | DEFAULT: none |
f1dc9b30 | 1696 | LOC: Config.passwd_list |
934b03fc | 1697 | DOC_START |
1698 | Specify passwords for cachemgr operations. | |
1699 | ||
1700 | Usage: cachemgr_passwd password action action ... | |
1701 | ||
1702 | valid actions are: | |
1703 | shutdown * | |
1704 | info | |
cf5cc17e | 1705 | objects |
1706 | vm_objects | |
1707 | utilization | |
1708 | ipcache | |
1709 | fqdncache | |
1710 | dns | |
1711 | redirector | |
1712 | io | |
1713 | reply_headers | |
1714 | filedescriptors | |
1715 | netdb | |
934b03fc | 1716 | server_list |
1717 | client_list | |
cf5cc17e | 1718 | config * |
934b03fc | 1719 | |
1720 | * Indicates actions which will not be performed without a | |
1721 | valid password, others can be performed if not listed here. | |
1722 | ||
1723 | To disable an action, set the password to "disable". | |
1724 | To allow performing an action without a password, set the | |
1725 | password to "none". | |
1726 | ||
1727 | Use the keyword "all" to set the same password for all actions. | |
1728 | ||
1729 | cachemgr_passwd secret shutdown | |
1730 | cachemgr_passwd lesssssssecret info stats/objects | |
1731 | cachemgr_passwd disable all | |
1732 | DOC_END | |
1733 | ||
934b03fc | 1734 | NAME: store_avg_object_size |
86101e40 | 1735 | COMMENT: (kbytes) |
1736 | TYPE: kb_size_t | |
2bf99296 | 1737 | DEFAULT: 13 KB |
934b03fc | 1738 | LOC: Config.Store.avgObjectSize |
1739 | DOC_START | |
1740 | Average object size, used to estimate number of objects your | |
1741 | cache can hold. See doc/Release-Notes-1.1.txt. The default is | |
2bf99296 | 1742 | 13 KB. |
934b03fc | 1743 | |
2bf99296 | 1744 | store_avg_object_size 13 KB |
934b03fc | 1745 | DOC_END |
1746 | ||
1747 | NAME: store_objects_per_bucket | |
1748 | TYPE: int | |
1749 | DEFAULT: 50 | |
1750 | LOC: Config.Store.objectsPerBucket | |
1751 | DOC_START | |
1752 | Target number of objects per bucket in the store hash table. | |
1753 | Lowering this value increases the total number of buckets and | |
1754 | also the storage maintenance rate. The default is 20. | |
1755 | ||
1756 | store_objects_per_bucket 20 | |
1757 | DOC_END | |
1758 | ||
1759 | ||
1760 | NAME: http_anonymizer | |
1761 | TYPE: httpanonymizer | |
17a0a4ee | 1762 | LOC: Config.onoff.anonymizer |
f1dc9b30 | 1763 | DEFAULT: off |
934b03fc | 1764 | DOC_START |
1765 | If you want to filter out certain HTTP request headers for | |
1766 | privacy reasons, enable this option. There are three | |
1767 | appropriate settings: | |
1768 | 'off' All HTTP request headers are passed. | |
1769 | 'standard' Specific headers are removed | |
1770 | 'paranoid' Only specific headers are allowed. | |
1771 | To see which headers are allowed or denied, please see the | |
1772 | http-anon.c source file. | |
1773 | ||
1774 | http_anonymizer off | |
1775 | DOC_END | |
1776 | ||
1777 | ||
1778 | NAME: client_db | |
1779 | COMMENT: on|off | |
1780 | TYPE: onoff | |
f1dc9b30 | 1781 | DEFAULT: on |
17a0a4ee | 1782 | LOC: Config.onoff.client_db |
934b03fc | 1783 | DOC_START |
1784 | If you want to disable collecting per-client statistics, then | |
1785 | turn off client_db here. | |
1786 | ||
1787 | client_db on | |
1788 | DOC_END | |
1789 | ||
1790 | ||
1791 | NAME: netdb_low | |
1792 | TYPE: int | |
1793 | DEFAULT: 900 | |
1794 | LOC: Config.Netdb.low | |
1795 | DOC_NONE | |
1796 | ||
1797 | NAME: netdb_high | |
1798 | TYPE: int | |
1799 | DEFAULT: 1000 | |
1800 | LOC: Config.Netdb.high | |
1801 | DOC_START | |
1802 | The low and high water marks for the ICMP measurement | |
1803 | database. These are counts, not percents. The defaults are | |
1804 | 900 and 1000. When the high water mark is reached, database | |
1805 | entries will be deleted until the low mark is reached. | |
1806 | ||
1807 | netdb_low 900 | |
1808 | netdb_high 1000 | |
1809 | DOC_END | |
1810 | ||
1811 | ||
1812 | NAME: netdb_ping_period | |
f1dc9b30 | 1813 | TYPE: time_t |
934b03fc | 1814 | LOC: Config.Netdb.period |
9e975e4e | 1815 | DEFAULT: 5 minutes |
934b03fc | 1816 | DOC_START |
1817 | The minimum period for measuring a site. There will be at | |
1818 | least this much delay between successive pings to the same | |
1819 | network. The default is five minutes. | |
1820 | ||
1821 | netdb_ping_period 5 minutes | |
1822 | DOC_END | |
1823 | ||
1824 | ||
1825 | NAME: query_icmp | |
1826 | COMMENT: on|off | |
1827 | TYPE: onoff | |
f1dc9b30 | 1828 | DEFAULT: off |
17a0a4ee | 1829 | LOC: Config.onoff.query_icmp |
934b03fc | 1830 | DOC_START |
1831 | If you want to ask your peers to include ICMP data in their ICP | |
1832 | replies, enable this option. | |
1833 | ||
cf5cc17e | 1834 | If your peer has configured Squid (during compilation) with |
1835 | '--enable-icmp' then that peer will send ICMP pings to origin server | |
1836 | sites of the URLs it receives. If you enable this option then the | |
1837 | ICP replies from that peer will include the ICMP data (if available). | |
1838 | Then, when choosing a parent cache, Squid will choose the parent with | |
934b03fc | 1839 | the minimal RTT to the origin server. When this happens, the |
1840 | hierarchy field of the access.log will be | |
1841 | "CLOSEST_PARENT_MISS". This option is off by default. | |
1842 | ||
1843 | query_icmp off | |
1844 | DOC_END | |
1845 | ||
88500f96 | 1846 | NAME: test_reachability |
194dd3b8 | 1847 | COMMENT: on|off |
1848 | TYPE: onoff | |
1849 | DEFAULT: off | |
1850 | LOC: Config.onoff.test_reachability | |
1851 | DOC_START | |
1852 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
1853 | instead of ICP_MISS if the target host is NOT in the ICMP | |
1854 | database, or has a zero RTT. | |
1855 | ||
1856 | test_reachability off | |
1857 | DOC_END | |
1858 | ||
78f1250a | 1859 | NAME: buffered_logs |
1860 | COMMENT: on|off | |
1861 | TYPE: onoff | |
1862 | DEFAULT: off | |
17a0a4ee | 1863 | LOC: Config.onoff.buffered_logs |
78f1250a | 1864 | DOC_START |
1865 | Some log files (cache.log, useragent.log) are written with | |
1866 | stdio functions, and as such they can be buffered or | |
cf5cc17e | 1867 | unbuffered. By default they will be unbuffered. Buffering them |
1868 | can speed up the writing slightly (though you are unlikely to | |
1869 | need to worry). | |
78f1250a | 1870 | buffered_logs off |
1871 | DOC_END | |
1872 | ||
934b03fc | 1873 | NAME: always_direct |
1874 | TYPE: acl_access | |
1875 | LOC: Config.accessList.AlwaysDirect | |
f1dc9b30 | 1876 | DEFAULT: none |
934b03fc | 1877 | DOC_START |
2a78fa67 | 1878 | Usage: always_direct allow|deny [!]aclname ... |
1879 | ||
1880 | Here you can use ACL elements to specify requests which should | |
1881 | ALWAYS be forwarded directly to origin servers. This option | |
1882 | replaces some v1.1 options such as inside_firewall, | |
1883 | firewall_ip, local_domain, and local_ip. For example, to | |
1884 | always directly forward requests for local servers use | |
1885 | something like: | |
1886 | ||
1887 | acl local-servers dstdomain my.domain.net | |
1888 | always_direct allow local-servers | |
1889 | ||
1890 | To always forward FTP requests directly, use | |
1891 | ||
1892 | acl FTP proto FTP | |
1893 | always_direct allow FTP | |
1894 | ||
1895 | NOTE: There is a similar, but opposite option named | |
1896 | 'never_direct'. You need to be aware that "always_direct deny | |
1897 | foo" is NOT the same thing as "never_direct allow foo". You | |
1898 | may need to use a deny rule to exclude a more-specific case of | |
1899 | some other rule. Example: | |
1900 | ||
1901 | acl local-external dstdomain external.foo.net | |
1902 | acl local-servers dstdomain foo.net | |
1903 | always_direct deny local-external | |
1904 | always_direct allow local-servers | |
934b03fc | 1905 | DOC_END |
1906 | ||
1907 | NAME: never_direct | |
1908 | TYPE: acl_access | |
1909 | LOC: Config.accessList.NeverDirect | |
f1dc9b30 | 1910 | DEFAULT: none |
934b03fc | 1911 | DOC_START |
d0d41f07 | 1912 | Usage: never_direct allow|deny [!]aclname ... |
2a78fa67 | 1913 | |
1914 | never_direct is the opposite of always_direct. Please read | |
1915 | the description for always_direct if you have not already. | |
934b03fc | 1916 | |
2a78fa67 | 1917 | With 'never_direct' you can use ACL elements to specify |
1918 | requests which should NEVER be forwarded directly to origin | |
1919 | servers. This option replaces some v1.1 options such as | |
1920 | inside_firewall, firewall_ip, local_domain, and local_ip. For | |
1921 | example, to force the use of a proxy for all requests, except | |
1922 | those in your local domain, use something like: | |
1923 | ||
d0d41f07 | 1924 | acl local-servers dstdomain my.domain.net |
2a78fa67 | 1925 | acl all src 0.0.0.0/0.0.0.0 |
d0d41f07 | 1926 | never_direct deny local-servers |
1927 | never_direct allow all | |
2a78fa67 | 1928 | DOC_END |
934b03fc | 1929 | |
88738790 | 1930 | NAME: fake_user_agent |
1931 | TYPE: eol | |
1932 | LOC: Config.fake_ua | |
1933 | DEFAULT: none | |
1934 | DOC_START | |
d0d41f07 | 1935 | If you use the paranoid http_anonymizer setting, Squid will strip |
1936 | your User-agent string from the request. Some Web servers will | |
1937 | refuse your request without a User-agent string. Use this to | |
1938 | fake one up. For example: | |
88738790 | 1939 | |
d0d41f07 | 1940 | fake_user_agent Nutscrape/1.0 (CP/M; 8-bit) |
1941 | (credit to Paul Southworth pauls@etext.org for this one!) | |
88738790 | 1942 | |
1943 | fake_user_agent none | |
1944 | DOC_END | |
1945 | ||
365cb147 | 1946 | NAME: icon_directory |
f0b19334 | 1947 | TYPE: string |
365cb147 | 1948 | LOC: Config.icons.directory |
1949 | DEFAULT: @DEFAULT_ICON_DIR@ | |
1950 | DOC_START | |
cf5cc17e | 1951 | Where the icons are stored. These are normally kept in |
1952 | @DEFAULT_ICON_DIR@ | |
365cb147 | 1953 | DOC_END |
1954 | ||
cf5cc17e | 1955 | NAME: error_directory |
365cb147 | 1956 | TYPE: string |
cf5cc17e | 1957 | LOC: Config.errorDirectory |
1958 | DEFAULT: @DEFAULT_ERROR_DIR@ | |
365cb147 | 1959 | DOC_START |
cf5cc17e | 1960 | If you wish to create your own versions of the default |
1961 | (English) error files, either to customise them to suit your | |
1962 | language or company copy the template english files to anther | |
1963 | directory and point this tag at them. | |
365cb147 | 1964 | DOC_END |
88738790 | 1965 | |
22c653cd | 1966 | NAME: minimum_retry_timeout |
1967 | COMMENT: (seconds) | |
1968 | TYPE: time_t | |
1969 | LOC: Config.retry.timeout | |
1970 | DEFAULT: 5 seconds | |
1971 | DOC_START | |
1972 | This specifies the minimum connect timeout, for when the | |
1973 | connect timeout is reduced to compensate for the availability | |
1974 | of multiple IP addresses. | |
1975 | ||
cf5cc17e | 1976 | When a connection to a host is initiated, and that host has |
1977 | several IP addresses, the default connection timeout is reduced | |
1978 | by dividing it by the number of addresses. So, a site with 15 | |
1979 | addresses would then have a timeout of 8 seconds for each | |
1980 | address attempted. To avoid having the timeout reduced to the | |
1981 | point where even a working host would not have a chance to | |
1982 | respond, this setting is provided. The default, and the | |
1983 | minimum value, is five seconds, and the maximum value is sixty | |
1984 | seconds, or half of connect_timeout, whichever is greater and | |
1985 | less than connect_timeout. | |
22c653cd | 1986 | |
cf5cc17e | 1987 | minimum_retry_timeout 5 seconds |
22c653cd | 1988 | DOC_END |
1989 | ||
1990 | NAME: maximum_single_addr_tries | |
1991 | TYPE: int | |
1992 | LOC: Config.retry.maxtries | |
1993 | DEFAULT: 3 | |
1994 | DOC_START | |
1995 | This sets the maximum number of connection attempts for a | |
1996 | host that only has one address (for multiple-address hosts, | |
1997 | each address is tried once). | |
1998 | ||
1999 | The default value is three tries, the (not recommended) | |
2000 | maximum is 255 tries. A warning message will be generated | |
2001 | if it is set to a value greater than ten. | |
2002 | ||
2003 | maximum_single_addr_tries 3 | |
2004 | DOC_END | |
6d1c0d53 | 2005 | |
a97cfa48 | 2006 | NAME: snmp_port |
2007 | TYPE: ushort | |
2008 | LOC: Config.Port.snmp | |
2009 | DEFAULT: 3401 | |
1df370e3 | 2010 | IFDEF: SQUID_SNMP |
a97cfa48 | 2011 | DOC_START |
cf5cc17e | 2012 | Squid can now serve statistics and status information via SNMP. |
2013 | By default it listens to port 3401 on the machine. If you don't | |
2014 | wish to use SNMP, set this to '-1'. | |
2015 | ||
2016 | NOTE: SNMP support requires use the --enable-snmp configure | |
2017 | command line option. | |
794a4fea | 2018 | snmp_port 3401 |
a97cfa48 | 2019 | DOC_END |
2020 | ||
a97cfa48 | 2021 | NAME: snmp_do_queueing |
2022 | TYPE: onoff | |
2023 | LOC: Config.Snmp.do_queueing | |
2024 | DEFAULT: on | |
1df370e3 | 2025 | IFDEF: SQUID_SNMP |
a97cfa48 | 2026 | DOC_START |
cf5cc17e | 2027 | If disabled, snmp packets will not be queued but delivered |
2028 | immediately. This could be useful when you want to monitor a | |
2029 | cache in trouble, but this could also make Squid block, slowing | |
2030 | connections and possibly worsening the cache status. | |
794a4fea | 2031 | snmp_do_queueing on |
a97cfa48 | 2032 | DOC_END |
2033 | ||
2034 | NAME: forward_snmpd_port | |
2035 | TYPE: ushort | |
2036 | LOC: Config.Snmp.localPort | |
2037 | DEFAULT: 0 | |
1df370e3 | 2038 | IFDEF: SQUID_SNMP |
a97cfa48 | 2039 | DOC_START |
2040 | This configures whether we should be forwarding SNMP requests | |
cf5cc17e | 2041 | to another snmpd. The reason for putting this piece of |
2042 | functionality into Squid was to enable access to the system's | |
2043 | installed snmpd with minimal changes. This option is turned | |
2044 | off by default, check with your /etc/services for your system's | |
2045 | snmp port (usually 161). We do not use getservbyname() to | |
2046 | allow you to set Squid into port 161 and your system's snmpd to | |
2047 | another port by changing /etc/services. | |
2048 | ||
d0d41f07 | 2049 | WARNING: Because of Squid acting as a proxy snmpd for system |
2050 | you have to do security checks on THIS snmpd for all objects. | |
2051 | Check your snmp_config_file. | |
794a4fea | 2052 | forward_snmpd_port 0 |
a97cfa48 | 2053 | DOC_END |
2054 | ||
2055 | NAME: snmp_mib_path | |
2056 | TYPE: string | |
2057 | LOC: Config.Snmp.mibPath | |
2058 | DEFAULT: @DEFAULT_MIB_PATH@ | |
1df370e3 | 2059 | IFDEF: SQUID_SNMP |
a97cfa48 | 2060 | DOC_START |
cf5cc17e | 2061 | The location of Squid's mib. |
794a4fea | 2062 | snmp_mib_path @DEFAULT_MIB_PATH@ |
a97cfa48 | 2063 | DOC_END |
2064 | ||
a97cfa48 | 2065 | NAME: trap_sink |
4feb7b2e | 2066 | TYPE: string |
a97cfa48 | 2067 | LOC: Config.Snmp.trap_sink |
2068 | DEFAULT: 127.0.0.1 | |
1df370e3 | 2069 | IFDEF: SQUID_SNMP |
4feb7b2e | 2070 | DOC_START |
a97cfa48 | 2071 | Hostname or ip address of trap sink for snmp |
794a4fea | 2072 | trap_sink 127.0.0.1 |
4feb7b2e | 2073 | DOC_END |
2074 | ||
a97cfa48 | 2075 | NAME: snmp_trap_community |
2076 | TYPE: string | |
2077 | LOC: Config.Snmp.trap_community | |
2078 | DEFAULT: public | |
1df370e3 | 2079 | IFDEF: SQUID_SNMP |
a97cfa48 | 2080 | DOC_START |
cf5cc17e | 2081 | Community name for traps. |
794a4fea | 2082 | snmp_trap_community public |
a97cfa48 | 2083 | DOC_END |
2084 | ||
2085 | NAME: snmp_enable_authen_traps | |
2086 | TYPE: onoff | |
2087 | LOC: Config.Snmp.conf_authtraps | |
2088 | DEFAULT: off | |
1df370e3 | 2089 | IFDEF: SQUID_SNMP |
a97cfa48 | 2090 | DOC_START |
cf5cc17e | 2091 | Enable SNMP authenticated traps. Set to 'off' or 'on'. |
794a4fea | 2092 | snmp_enable_authen_traps off |
a97cfa48 | 2093 | DOC_END |
2094 | ||
2095 | NAME: snmp_agent_conf | |
5e14bf6d | 2096 | TYPE: stringlist |
a97cfa48 | 2097 | LOC: Config.Snmp.snmpconf |
2098 | DEFAULT: none | |
1df370e3 | 2099 | IFDEF: SQUID_SNMP |
a97cfa48 | 2100 | DOC_START |
2101 | Define snmp views, users and communities | |
2102 | Example: | |
2103 | snmp_agent_conf view all .1.3.6 included | |
2104 | snmp_agent_conf view squid .1.3.6 included | |
2105 | snmp_agent_conf user squid - all all public | |
2106 | snmp_agent_conf user all all all all squid | |
2107 | snmp_agent_conf community public squid squid | |
2108 | snmp_agent_conf community readwrite all all | |
2109 | DOC_END | |
4feb7b2e | 2110 | |
bdf18524 | 2111 | NAME: snmp_acl |
2112 | TYPE: snmp_access | |
2113 | LOC: Config.Snmp.communities | |
2114 | DEFAULT: none | |
2115 | IFDEF: SQUID_SNMP | |
2116 | DOC_START | |
2117 | Define access controls per community: | |
2118 | snmp_access communityname allow|deny [!]aclname ... | |
2119 | Example: | |
2120 | snmp_acl public allow adminsubnet | |
2121 | snmp_acl public deny all | |
2122 | DOC_END | |
2123 | ||
2124 | ||
53ad48e6 | 2125 | NAME: as_whois_server |
2126 | TYPE: string | |
2127 | LOC: Config.as_whois_server | |
2128 | DEFAULT: whois.ra.net | |
2129 | DEFAULT_IF_NONE: whois.ra.net | |
2130 | DOC_START | |
cf5cc17e | 2131 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
2132 | queried only when Squid starts up, not for every request. | |
53ad48e6 | 2133 | DOC_END |
2134 | ||
6d1c0d53 | 2135 | EOF |