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