]>
Commit | Line | Data |
---|---|---|
3a278cb8 | 1 | |
9cef6668 | 2 | # |
87e6f180 | 3 | # $Id: cf.data.pre,v 1.269 2002/07/03 06:56:15 hno Exp $ |
9cef6668 | 4 | # |
5 | # | |
2b6662ba | 6 | # SQUID Web Proxy Cache http://www.squid-cache.org/ |
9cef6668 | 7 | # ---------------------------------------------------------- |
8 | # | |
2b6662ba | 9 | # Squid is the result of efforts by numerous individuals from |
10 | # the Internet community; see the CONTRIBUTORS file for full | |
11 | # details. Many organizations have provided support for Squid's | |
12 | # development; see the SPONSORS file for full details. Squid is | |
13 | # Copyrighted (C) 2000 by the Regents of the University of | |
14 | # California; see the COPYRIGHT file for full details. Squid | |
15 | # incorporates software developed and/or copyrighted by other | |
16 | # sources; see the CREDITS file for full details. | |
9cef6668 | 17 | # |
18 | # This program is free software; you can redistribute it and/or modify | |
19 | # it under the terms of the GNU General Public License as published by | |
20 | # the Free Software Foundation; either version 2 of the License, or | |
21 | # (at your option) any later version. | |
96d88dcb | 22 | # |
9cef6668 | 23 | # This program is distributed in the hope that it will be useful, |
24 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
26 | # GNU General Public License for more details. | |
96d88dcb | 27 | # |
9cef6668 | 28 | # You should have received a copy of the GNU General Public License |
29 | # along with this program; if not, write to the Free Software | |
30 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. | |
31 | # | |
32 | ||
0f74202c | 33 | COMMENT_START |
448cd7c7 | 34 | WELCOME TO SQUID 2 |
35 | ------------------ | |
3a278cb8 | 36 | |
cf5cc17e | 37 | This is the default Squid configuration file. You may wish |
2b6662ba | 38 | to look at the Squid home page (http://www.squid-cache.org/) |
6b8e7481 | 39 | for the FAQ and other documentation. |
3a278cb8 | 40 | |
debd9a31 | 41 | The default Squid config file shows what the defaults for |
42 | various options happen to be. If you don't need to change the | |
43 | default, you shouldn't uncomment the line. Doing so may cause | |
44 | run-time problems. In some cases "none" refers to no default | |
efd900cb | 45 | setting at all, while in other cases it refers to a valid |
debd9a31 | 46 | option - the comments for that keyword indicate if this is the |
47 | case. | |
48 | ||
0f74202c | 49 | COMMENT_END |
3a278cb8 | 50 | |
0f74202c | 51 | COMMENT_START |
3a278cb8 | 52 | NETWORK OPTIONS |
53 | ----------------------------------------------------------------------------- | |
0f74202c | 54 | COMMENT_END |
3a278cb8 | 55 | |
934b03fc | 56 | NAME: http_port ascii_port |
7e3ce7b9 | 57 | TYPE: sockaddr_in_list |
f53b06f9 | 58 | DEFAULT: none |
7e3ce7b9 | 59 | LOC: Config.Sockaddr.http |
934b03fc | 60 | DOC_START |
7e3ce7b9 | 61 | Usage: port |
62 | hostname:port | |
63 | 1.2.3.4:port | |
934b03fc | 64 | |
7e3ce7b9 | 65 | The socket addresses where Squid will listen for HTTP client |
66 | requests. You may specify multiple socket addresses. | |
67 | There are three forms: port alone, hostname with port, and | |
68 | IP address with port. If you specify a hostname or IP | |
69 | address, then Squid binds the socket to that specific | |
70 | address. This replaces the old 'tcp_incoming_address' | |
71 | option. Most likely, you do not need to bind to a specific | |
72 | address, so you can use the port number alone. | |
73 | ||
efd900cb | 74 | If you are running Squid in accelerator mode, then you |
7e3ce7b9 | 75 | probably want to listen on port 80 also, or instead. |
76 | ||
77 | The -a command line option will override the *first* port | |
78 | number listed here. That option will NOT override an IP | |
79 | address, however. | |
934b03fc | 80 | |
efd900cb | 81 | You may specify multiple socket addresses on multiple lines. |
b9d7fe3e | 82 | |
54bab452 | 83 | If you run Squid on a dual-homed machine with an internal |
b9d7fe3e | 84 | and an external interface then we recommend you to specify the |
85 | internal address:port in http_port. This way Squid will only be | |
86 | visible on the internal address. | |
52f772de | 87 | |
88 | NOCOMMENT_START | |
89 | # Squid normally listens to port 3128 | |
90 | http_port 3128 | |
91 | NOCOMMENT_END | |
934b03fc | 92 | DOC_END |
93 | ||
1f7c9178 | 94 | NAME: https_port |
95 | IFDEF: USE_SSL | |
d193a436 | 96 | TYPE: https_port_list |
1f7c9178 | 97 | DEFAULT: none |
98 | LOC: Config.Sockaddr.https | |
99 | DOC_START | |
9690f3c5 | 100 | Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...] |
1f7c9178 | 101 | |
d193a436 | 102 | The socket address where Squid will listen for HTTPS client |
103 | requests. | |
d6827718 | 104 | |
1f7c9178 | 105 | This is really only useful for situations where you are running |
106 | squid in accelerator mode and you want to do the SSL work at the | |
107 | accelerator level. | |
1f7c9178 | 108 | |
d193a436 | 109 | You may specify multiple socket addresses on multiple lines, |
9690f3c5 | 110 | each with their own SSL certificate and/or options. |
820feeed | 111 | |
112 | Options: | |
113 | ||
114 | cert= Path to SSL certificate (PEM format) | |
115 | ||
116 | key= Path to SSL private key file (PEM format) | |
117 | if not specified, the certificate file is | |
118 | assumed to be a combined certificate and | |
119 | key file | |
120 | ||
121 | version= The version of SSL/TLS supported | |
122 | 1 automatic (default) | |
123 | 2 SSLv2 only | |
124 | 3 SSLv3 only | |
125 | 4 TLSv1 only | |
126 | ||
127 | cipher= Colon separated list of supported ciphers | |
128 | ||
129 | options= Varions SSL engine options. The most important | |
130 | being: | |
131 | NO_SSLv2 Disallow the use of SSLv2 | |
132 | NO_SSLv3 Disallow the use of SSLv3 | |
133 | NO_TLSv1 Disallow the use of TLSv1 | |
134 | See src/ssl_support.c or OpenSSL documentation | |
135 | for a more complete list. | |
1f7c9178 | 136 | DOC_END |
137 | ||
79d4ccdf | 138 | NAME: ssl_unclean_shutdown |
e1d9c13c | 139 | IFDEF: USE_SSL |
79d4ccdf | 140 | TYPE: onoff |
141 | DEFAULT: off | |
142 | LOC: Config.SSL.unclean_shutdown | |
1f7c9178 | 143 | DOC_START |
79d4ccdf | 144 | Some browsers (especially MSIE) bugs out on SSL shutdown |
145 | messages. | |
1f7c9178 | 146 | DOC_END |
147 | ||
934b03fc | 148 | NAME: icp_port udp_port |
149 | TYPE: ushort | |
150 | DEFAULT: 3130 | |
151 | LOC: Config.Port.icp | |
152 | DOC_START | |
78a0e865 | 153 | The port number where Squid sends and receives ICP queries to |
934b03fc | 154 | and from neighbor caches. Default is 3130. To disable use |
155 | "0". May be overridden with -u on the command line. | |
934b03fc | 156 | DOC_END |
157 | ||
459f1836 | 158 | NAME: htcp_port |
159 | IFDEF: USE_HTCP | |
160 | TYPE: ushort | |
161 | DEFAULT: 4827 | |
162 | LOC: Config.Port.htcp | |
163 | DOC_START | |
78a0e865 | 164 | The port number where Squid sends and receives HTCP queries to |
459f1836 | 165 | and from neighbor caches. Default is 4827. To disable use |
166 | "0". | |
459f1836 | 167 | DOC_END |
168 | ||
934b03fc | 169 | |
170 | NAME: mcast_groups | |
171 | TYPE: wordlist | |
172 | LOC: Config.mcast_group_list | |
1273d501 | 173 | DEFAULT: none |
934b03fc | 174 | DOC_START |
cf5cc17e | 175 | This tag specifies a list of multicast groups which your server |
78a0e865 | 176 | should join to receive multicasted ICP queries. |
934b03fc | 177 | |
178 | NOTE! Be very careful what you put here! Be sure you | |
179 | understand the difference between an ICP _query_ and an ICP | |
180 | _reply_. This option is to be set only if you want to RECEIVE | |
181 | multicast queries. Do NOT set this option to SEND multicast | |
a95856a0 | 182 | ICP (use cache_peer for that). ICP replies are always sent via |
934b03fc | 183 | unicast, so this option does not affect whether or not you will |
184 | receive replies from multicast group members. | |
185 | ||
186 | You must be very careful to NOT use a multicast address which | |
efd900cb | 187 | is already in use by another group of caches. |
934b03fc | 188 | |
cf5cc17e | 189 | If you are unsure about multicast, please read the Multicast |
2b6662ba | 190 | chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/). |
cf5cc17e | 191 | |
934b03fc | 192 | Usage: mcast_groups 239.128.16.128 224.0.1.20 |
193 | ||
cf5cc17e | 194 | By default, Squid doesn't listen on any multicast groups. |
934b03fc | 195 | DOC_END |
196 | ||
197 | ||
934b03fc | 198 | NAME: udp_incoming_address |
199 | TYPE: address | |
200 | LOC:Config.Addrs.udp_incoming | |
270b86af | 201 | DEFAULT: 0.0.0.0 |
934b03fc | 202 | DOC_NONE |
203 | ||
204 | NAME: udp_outgoing_address | |
205 | TYPE: address | |
206 | LOC: Config.Addrs.udp_outgoing | |
270b86af | 207 | DEFAULT: 255.255.255.255 |
934b03fc | 208 | DOC_START |
934b03fc | 209 | udp_incoming_address is used for the ICP socket receiving packets |
210 | from other caches. | |
211 | udp_outgoing_address is used for ICP packets sent out to other | |
212 | caches. | |
213 | ||
efd900cb | 214 | The default behavior is to not bind to any specific address. |
934b03fc | 215 | |
4326614a | 216 | A udp_incoming_address value of 0.0.0.0 indicates that Squid should |
217 | listen for UDP messages on all available interfaces. | |
6b53c392 | 218 | |
219 | If udp_outgoing_address is set to 255.255.255.255 (the default) | |
220 | then it will use the same socket as udp_incoming_address. Only | |
221 | change this if you want to have ICP queries sent using another | |
222 | address than where this Squid listens for ICP queries from other | |
223 | caches. | |
224 | ||
5a3f6538 | 225 | NOTE, udp_incoming_address and udp_outgoing_address can not |
6b53c392 | 226 | have the same value since they both use port 3130. |
934b03fc | 227 | DOC_END |
228 | ||
0f74202c | 229 | COMMENT_START |
3a278cb8 | 230 | OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM |
231 | ----------------------------------------------------------------------------- | |
0f74202c | 232 | COMMENT_END |
934b03fc | 233 | |
40a1495e | 234 | NAME: cache_peer |
235 | TYPE: peer | |
1273d501 | 236 | DEFAULT: none |
0153d498 | 237 | LOC: Config.peers |
934b03fc | 238 | DOC_START |
239 | To specify other caches in a hierarchy, use the format: | |
240 | ||
6b53c392 | 241 | cache_peer hostname type http_port icp_port |
934b03fc | 242 | |
d0d41f07 | 243 | For example, |
934b03fc | 244 | |
245 | # proxy icp | |
246 | # hostname type port port options | |
247 | # -------------------- -------- ----- ----- ----------- | |
cf5cc17e | 248 | cache_peer parent.foo.net parent 3128 3130 [proxy-only] |
249 | cache_peer sib1.foo.net sibling 3128 3130 [proxy-only] | |
250 | cache_peer sib2.foo.net sibling 3128 3130 [proxy-only] | |
934b03fc | 251 | |
252 | type: either 'parent', 'sibling', or 'multicast'. | |
253 | ||
254 | proxy_port: The port number where the cache listens for proxy | |
255 | requests. | |
256 | ||
257 | icp_port: Used for querying neighbor caches about | |
258 | objects. To have a non-ICP neighbor | |
259 | specify '7' for the ICP port and make sure the | |
260 | neighbor machine has the UDP echo port | |
261 | enabled in its /etc/inetd.conf file. | |
262 | ||
263 | options: proxy-only | |
264 | weight=n | |
d1b63fc8 | 265 | basetime=n |
934b03fc | 266 | ttl=n |
267 | no-query | |
d1b63fc8 | 268 | background-ping |
934b03fc | 269 | default |
270 | round-robin | |
d1b63fc8 | 271 | weighted-round-robin |
934b03fc | 272 | multicast-responder |
b3264694 | 273 | closest-only |
46b034a4 | 274 | no-digest |
223213df | 275 | no-netdb-exchange |
95e36d02 | 276 | no-delay |
c3b33cb7 | 277 | login=user:password | PASS | *:password |
3f62decd | 278 | connect-timeout=nn |
7e3ce7b9 | 279 | digest-url=url |
987de783 | 280 | allow-miss |
e79a6f05 | 281 | max-conn |
934b03fc | 282 | |
283 | use 'proxy-only' to specify that objects fetched | |
284 | from this cache should not be saved locally. | |
285 | ||
286 | use 'weight=n' to specify a weighted parent. | |
287 | The weight must be an integer. The default weight | |
288 | is 1, larger weights are favored more. | |
289 | ||
d1b63fc8 | 290 | use 'basetime=n' to specify a base amount to |
291 | be subtracted from round trip times of parents. | |
292 | It is subtraced before devision by weight in calculating | |
293 | which parent to fectch from. If the rtt is less than the | |
294 | base time then the rtt is set to a minimal value. | |
295 | ||
934b03fc | 296 | use 'ttl=n' to specify a IP multicast TTL to use |
78a0e865 | 297 | when sending an ICP queries to this address. |
934b03fc | 298 | Only useful when sending to a multicast group. |
299 | Because we don't accept ICP replies from random | |
300 | hosts, you must configure other group members as | |
301 | peers with the 'multicast-responder' option below. | |
302 | ||
303 | use 'no-query' to NOT send ICP queries to this | |
304 | neighbor. | |
305 | ||
d1b63fc8 | 306 | use 'background-ping' to only send ICP queries to this |
307 | neighbor infrequently. This is used to keep the neighbor | |
308 | round trip time updated and is usually used in | |
309 | conjunction with weighted-round-robin. | |
310 | ||
934b03fc | 311 | use 'default' if this is a parent cache which can |
312 | be used as a "last-resort." You should probably | |
313 | only use 'default' in situations where you cannot | |
314 | use ICP with your parent cache(s). | |
315 | ||
316 | use 'round-robin' to define a set of parents which | |
317 | should be used in a round-robin fashion in the | |
318 | absence of any ICP queries. | |
319 | ||
d1b63fc8 | 320 | use 'weighted-round-robin' to define a set of parents |
321 | which should be used in a round-robin fashion with the | |
322 | frequency of each parent being based on the round trip | |
323 | time. Closer parents are used more often. | |
324 | Usually used for background-ping parents. | |
325 | ||
934b03fc | 326 | 'multicast-responder' indicates that the named peer |
327 | is a member of a multicast group. ICP queries will | |
328 | not be sent directly to the peer, but ICP replies | |
329 | will be accepted from it. | |
330 | ||
b3264694 | 331 | 'closest-only' indicates that, for ICP_OP_MISS |
332 | replies, we'll only forward CLOSEST_PARENT_MISSes | |
333 | and never FIRST_PARENT_MISSes. | |
334 | ||
46b034a4 | 335 | use 'no-digest' to NOT request cache digests from |
336 | this neighbor. | |
337 | ||
223213df | 338 | 'no-netdb-exchange' disables requesting ICMP |
339 | RTT database (NetDB) from the neighbor. | |
340 | ||
95e36d02 | 341 | use 'no-delay' to prevent access to this neighbor |
342 | from influencing the delay pools. | |
343 | ||
c68e9c6b | 344 | use 'login=user:password' if this is a personal/workgroup |
345 | proxy and your parent requires proxy authentication. | |
4472c779 | 346 | Note: The string can include URL escapes (i.e. %20 for |
347 | spaces). This also means that % must be written as %%. | |
c68e9c6b | 348 | |
94439e4e | 349 | use 'login=PASS' if users must authenticate against |
ac3e1323 | 350 | the upstream proxy. This will pass the users credentials |
351 | as they are to the peer proxy. This only works for the | |
352 | Basic HTTP authentication sheme. Note: To combine this | |
353 | with proxy_auth both proxies must share the same user | |
94439e4e | 354 | database as HTTP only allows for one proxy login. |
355 | Also be warned that this will expose your users proxy | |
ac3e1323 | 356 | password to the peer. USE WITH CAUTION |
94439e4e | 357 | |
c3b33cb7 | 358 | use 'login=*:password' to pass the username to the |
359 | upstream cache, but with a fixed password. This is meant | |
360 | to be used when the peer is in another administrative | |
361 | domain, but it is still needed to identify each user. | |
362 | The star can optionally be followed by some extra | |
363 | information which is added to the username. This can | |
364 | be used to identify this proxy to the peer, similar to | |
365 | the login=username:password option above. | |
366 | ||
3f62decd | 367 | use 'connect-timeout=nn' to specify a peer |
368 | specific connect timeout (also see the | |
369 | peer_connect_timeout directive) | |
370 | ||
7e3ce7b9 | 371 | use 'digest-url=url' to tell Squid to fetch the cache |
372 | digest (if digests are enabled) for this host from | |
373 | the specified URL rather than the Squid default | |
374 | location. | |
3f62decd | 375 | |
987de783 | 376 | use 'allow-miss' to disable Squid's use of only-if-cached |
377 | when forwarding requests to siblings. This is primarily | |
378 | useful when icp_hit_stale is used by the sibling. To | |
379 | extensive use of this option may result in forwarding | |
380 | loops, and you should avoid having two-way peerings | |
381 | with this option. (for example to deny peer usage on | |
382 | requests from peer by denying cache_peer_access if the | |
383 | source is a peer) | |
384 | ||
e79a6f05 | 385 | use 'max-conn' to limit the amount of connections Squid |
386 | may open to this peer. | |
387 | ||
934b03fc | 388 | NOTE: non-ICP neighbors must be specified as 'parent'. |
934b03fc | 389 | DOC_END |
390 | ||
af7d912e | 391 | NAME: cache_peer_domain cache_host_domain |
934b03fc | 392 | TYPE: hostdomain |
f1dc9b30 | 393 | DEFAULT: none |
394 | LOC: none | |
934b03fc | 395 | DOC_START |
cf5cc17e | 396 | Use to limit the domains for which a neighbor cache will be |
397 | queried. Usage: | |
934b03fc | 398 | |
af7d912e | 399 | cache_peer_domain cache-host domain [domain ...] |
400 | cache_peer_domain cache-host !domain | |
934b03fc | 401 | |
402 | For example, specifying | |
403 | ||
af7d912e | 404 | cache_peer_domain parent.foo.net .edu |
934b03fc | 405 | |
406 | has the effect such that UDP query packets are sent to | |
407 | 'bigserver' only when the requested object exists on a | |
408 | server in the .edu domain. Prefixing the domainname | |
409 | with '!' means that the cache will be queried for objects | |
410 | NOT in that domain. | |
411 | ||
412 | NOTE: * Any number of domains may be given for a cache-host, | |
413 | either on the same or separate lines. | |
414 | * When multiple domains are given for a particular | |
415 | cache-host, the first matched domain is applied. | |
416 | * Cache hosts with no domain restrictions are queried | |
417 | for all requests. | |
418 | * There are no defaults. | |
3794b2b6 | 419 | * There is also a 'cache_peer_access' tag in the ACL |
934b03fc | 420 | section. |
421 | DOC_END | |
422 | ||
423 | ||
424 | NAME: neighbor_type_domain | |
425 | TYPE: hostdomaintype | |
f1dc9b30 | 426 | DEFAULT: none |
427 | LOC: none | |
934b03fc | 428 | DOC_START |
429 | usage: neighbor_type_domain parent|sibling domain domain ... | |
430 | ||
431 | Modifying the neighbor type for specific domains is now | |
432 | possible. You can treat some domains differently than the the | |
a95856a0 | 433 | default neighbor type specified on the 'cache_peer' line. |
934b03fc | 434 | Normally it should only be necessary to list domains which |
435 | should be treated differently because the default neighbor type | |
436 | applies for hostnames which do not match domains listed here. | |
437 | ||
438 | EXAMPLE: | |
a95856a0 | 439 | cache_peer parent cache.foo.org 3128 3130 |
934b03fc | 440 | neighbor_type_domain cache.foo.org sibling .com .net |
441 | neighbor_type_domain cache.foo.org sibling .au .de | |
442 | DOC_END | |
443 | ||
465dc415 | 444 | NAME: icp_query_timeout |
445 | COMMENT: (msec) | |
446 | DEFAULT: 0 | |
447 | TYPE: int | |
448 | LOC: Config.Timeout.icp_query | |
934b03fc | 449 | DOC_START |
465dc415 | 450 | Normally Squid will automatically determine an optimal ICP |
451 | query timeout value based on the round-trip-time of recent ICP | |
452 | queries. If you want to override the value determined by | |
453 | Squid, set this 'icp_query_timeout' to a non-zero value. This | |
454 | value is specified in MILLISECONDS, so, to use a 2-second | |
455 | timeout (the old default), you would write: | |
934b03fc | 456 | |
465dc415 | 457 | icp_query_timeout 2000 |
465dc415 | 458 | DOC_END |
459 | ||
28993292 | 460 | NAME: maximum_icp_query_timeout |
461 | COMMENT: (msec) | |
462 | DEFAULT: 2000 | |
463 | TYPE: int | |
464 | LOC: Config.Timeout.icp_query_max | |
465 | DOC_START | |
efd900cb | 466 | Normally the ICP query timeout is determined dynamically. But |
467 | sometimes it can lead to very large values (say 5 seconds). | |
468 | Use this option to put an upper limit on the dynamic timeout | |
469 | value. Do NOT use this option to always use a fixed (instead | |
e0d5ba83 | 470 | of a dynamic) timeout value. To set a fixed timeout see the |
471 | 'icp_query_timeout' directive. | |
28993292 | 472 | DOC_END |
473 | ||
43af4d27 | 474 | NAME: minimum_icp_query_timeout |
475 | COMMENT: (msec) | |
476 | DEFAULT: 5 | |
477 | TYPE: int | |
ce6113a2 | 478 | LOC: Config.Timeout.icp_query_min |
43af4d27 | 479 | DOC_START |
480 | Normally the ICP query timeout is determined dynamically. But | |
481 | sometimes it can lead to very small timeouts, even lower than | |
482 | the normal latency variance on your link due to traffic. | |
483 | Use this option to put an lower limit on the dynamic timeout | |
484 | value. Do NOT use this option to always use a fixed (instead | |
485 | of a dynamic) timeout value. To set a fixed timeout see the | |
486 | 'icp_query_timeout' directive. | |
487 | DOC_END | |
488 | ||
465dc415 | 489 | NAME: mcast_icp_query_timeout |
490 | COMMENT: (msec) | |
491 | DEFAULT: 2000 | |
492 | TYPE: int | |
493 | LOC: Config.Timeout.mcast_icp_query | |
494 | DOC_START | |
495 | For Multicast peers, Squid regularly sends out ICP "probes" to | |
496 | count how many other peers are listening on the given multicast | |
497 | address. This value specifies how long Squid should wait to | |
498 | count all the replies. The default is 2000 msec, or 2 | |
499 | seconds. | |
934b03fc | 500 | DOC_END |
501 | ||
dc835977 | 502 | NAME: dead_peer_timeout |
503 | COMMENT: (seconds) | |
504 | DEFAULT: 10 seconds | |
505 | TYPE: time_t | |
506 | LOC: Config.Timeout.deadPeer | |
507 | DOC_START | |
508 | This controls how long Squid waits to declare a peer cache | |
509 | as "dead." If there are no ICP replies received in this | |
510 | amount of time, Squid will declare the peer dead and not | |
511 | expect to receive any further ICP replies. However, it | |
512 | continues to send ICP queries, and will mark the peer as | |
513 | alive upon receipt of the first subsequent ICP reply. | |
514 | ||
a8ad9a81 | 515 | This timeout also affects when Squid expects to receive ICP |
516 | replies from peers. If more than 'dead_peer' seconds have | |
517 | passed since the last ICP reply was received, Squid will not | |
518 | expect to receive an ICP reply on the next query. Thus, if | |
519 | your time between requests is greater than this timeout, you | |
520 | will see a lot of requests sent DIRECT to origin servers | |
521 | instead of to your parents. | |
dc835977 | 522 | DOC_END |
523 | ||
934b03fc | 524 | |
525 | NAME: hierarchy_stoplist | |
526 | TYPE: wordlist | |
f8d9f54a | 527 | DEFAULT: none |
934b03fc | 528 | LOC: Config.hierarchy_stoplist |
529 | DOC_START | |
530 | A list of words which, if found in a URL, cause the object to | |
531 | be handled directly by this cache. In other words, use this | |
532 | to not query neighbor caches for certain objects. You may | |
533 | list this option multiple times. | |
6b53c392 | 534 | NOCOMMENT_START |
535 | #We recommend you to use at least the following line. | |
934b03fc | 536 | hierarchy_stoplist cgi-bin ? |
6b53c392 | 537 | NOCOMMENT_END |
934b03fc | 538 | DOC_END |
539 | ||
540 | ||
bd05e3e3 | 541 | NAME: no_cache |
542 | TYPE: acl_access | |
543 | DEFAULT: none | |
544 | LOC: Config.accessList.noCache | |
934b03fc | 545 | DOC_START |
d08a99eb | 546 | A list of ACL elements which, if matched, cause the request to |
547 | not be satisfied from the cache and the reply to not be cached. | |
548 | In other words, use this to force certain objects to never be cached. | |
934b03fc | 549 | |
b269cf4e | 550 | You must use the word 'DENY' to indicate the ACL names which should |
551 | NOT be cached. | |
0fdafae7 | 552 | |
6b53c392 | 553 | NOCOMMENT_START |
554 | #We recommend you to use the following two lines. | |
bd05e3e3 | 555 | acl QUERY urlpath_regex cgi-bin \? |
b269cf4e | 556 | no_cache deny QUERY |
6b53c392 | 557 | NOCOMMENT_END |
934b03fc | 558 | DOC_END |
559 | ||
d1b63fc8 | 560 | NAME: background_ping_rate |
561 | COMMENT: time-units | |
562 | TYPE: time_t | |
563 | DEFAULT: 10 seconds | |
564 | LOC: Config.backgroundPingRate | |
565 | DOC_START | |
566 | Controls how often the ICP pings are sent to siblings that | |
567 | have background-ping set. | |
568 | DOC_END | |
569 | ||
934b03fc | 570 | |
0f74202c | 571 | COMMENT_START |
3a278cb8 | 572 | OPTIONS WHICH AFFECT THE CACHE SIZE |
573 | ----------------------------------------------------------------------------- | |
0f74202c | 574 | COMMENT_END |
934b03fc | 575 | |
576 | NAME: cache_mem | |
9906e724 | 577 | COMMENT: (bytes) |
1b635117 | 578 | TYPE: b_size_t |
9906e724 | 579 | DEFAULT: 8 MB |
43a70238 | 580 | LOC: Config.memMaxSize |
934b03fc | 581 | DOC_START |
fab315fd | 582 | NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE. |
583 | IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL | |
584 | USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER | |
585 | THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS. | |
7b2496ca | 586 | |
587 | 'cache_mem' specifies the ideal amount of memory to be used | |
588 | for: | |
589 | * In-Transit objects | |
590 | * Hot Objects | |
591 | * Negative-Cached objects | |
592 | ||
593 | Data for these objects are stored in 4 KB blocks. This | |
594 | parameter specifies the ideal upper limit on the total size of | |
595 | 4 KB blocks allocated. In-Transit objects take the highest | |
596 | priority. | |
934b03fc | 597 | |
598 | In-transit objects have priority over the others. When | |
599 | additional space is needed for incoming data, negative-cached | |
600 | and hot objects will be released. In other words, the | |
601 | negative-cached and hot objects will fill up any unused space | |
602 | not needed for in-transit objects. | |
603 | ||
7b2496ca | 604 | If circumstances require, this limit will be exceeded. |
605 | Specifically, if your incoming request rate requires more than | |
606 | 'cache_mem' of memory to hold in-transit objects, Squid will | |
607 | exceed this limit to satisfy the new requests. When the load | |
608 | decreases, blocks will be freed until the high-water mark is | |
609 | reached. Thereafter, blocks will be used to store hot | |
610 | objects. | |
934b03fc | 611 | DOC_END |
612 | ||
613 | ||
614 | NAME: cache_swap_low | |
615 | COMMENT: (percent, 0-100) | |
616 | TYPE: int | |
617 | DEFAULT: 90 | |
618 | LOC: Config.Swap.lowWaterMark | |
619 | DOC_NONE | |
620 | ||
621 | NAME: cache_swap_high | |
622 | COMMENT: (percent, 0-100) | |
623 | TYPE: int | |
624 | DEFAULT: 95 | |
625 | LOC: Config.Swap.highWaterMark | |
626 | DOC_START | |
2b906e48 | 627 | |
628 | The low- and high-water marks for cache object replacement. | |
629 | Replacement begins when the swap (disk) usage is above the | |
630 | low-water mark and attempts to maintain utilization near the | |
631 | low-water mark. As swap utilization gets close to high-water | |
632 | mark object eviction becomes more aggressive. If utilization is | |
633 | close to the low-water mark less replacement is done each time. | |
634 | ||
635 | Defaults are 90% and 95%. If you have a large cache, 5% could be | |
636 | hundreds of MB. If this is the case you may wish to set these | |
637 | numbers closer together. | |
934b03fc | 638 | DOC_END |
639 | ||
934b03fc | 640 | NAME: maximum_object_size |
9e975e4e | 641 | COMMENT: (bytes) |
1b635117 | 642 | TYPE: b_size_t |
9906e724 | 643 | DEFAULT: 4096 KB |
934b03fc | 644 | LOC: Config.Store.maxObjectSize |
645 | DOC_START | |
646 | Objects larger than this size will NOT be saved on disk. The | |
cf5cc17e | 647 | value is specified in kilobytes, and the default is 4MB. If |
648 | you wish to get a high BYTES hit ratio, you should probably | |
649 | increase this (one 32 MB object hit counts for 3200 10KB | |
650 | hits). If you wish to increase speed more than your want to | |
651 | save bandwidth you should leave this low. | |
934b03fc | 652 | |
2b906e48 | 653 | NOTE: if using the LFUDA replacement policy you should increase |
654 | this value to maximize the byte hit rate improvement of LFUDA! | |
655 | See replacement_policy below for a discussion of this policy. | |
934b03fc | 656 | DOC_END |
657 | ||
d20b1cd0 | 658 | NAME: minimum_object_size |
659 | COMMENT: (bytes) | |
660 | TYPE: b_size_t | |
661 | DEFAULT: 0 KB | |
662 | LOC: Config.Store.minObjectSize | |
663 | DOC_START | |
664 | Objects smaller than this size will NOT be saved on disk. The | |
665 | value is specified in kilobytes, and the default is 0 KB, which | |
666 | means there is no minimum. | |
667 | DOC_END | |
934b03fc | 668 | |
16689110 | 669 | NAME: maximum_object_size_in_memory |
670 | COMMENT: (bytes) | |
671 | TYPE: b_size_t | |
672 | DEFAULT: 8 KB | |
673 | LOC: Config.Store.maxInMemObjSize | |
674 | DOC_START | |
675 | Objects greater than this size will not be attempted to kept in | |
676 | the memory cache. This should be set high enough to keep objects | |
677 | accessed frequently in memory to improve performance whilst low | |
678 | enough to keep larger objects from hoarding cache_mem . | |
679 | DOC_END | |
680 | ||
934b03fc | 681 | NAME: ipcache_size |
682 | COMMENT: (number of entries) | |
683 | TYPE: int | |
684 | DEFAULT: 1024 | |
685 | LOC: Config.ipcache.size | |
686 | DOC_NONE | |
687 | ||
688 | NAME: ipcache_low | |
689 | COMMENT: (percent) | |
690 | TYPE: int | |
691 | DEFAULT: 90 | |
692 | LOC: Config.ipcache.low | |
693 | DOC_NONE | |
694 | ||
695 | NAME: ipcache_high | |
696 | COMMENT: (percent) | |
697 | TYPE: int | |
698 | DEFAULT: 95 | |
699 | LOC: Config.ipcache.high | |
700 | DOC_START | |
701 | The size, low-, and high-water marks for the IP cache. | |
934b03fc | 702 | DOC_END |
703 | ||
e55650e3 | 704 | NAME: fqdncache_size |
705 | COMMENT: (number of entries) | |
706 | TYPE: int | |
707 | DEFAULT: 1024 | |
708 | LOC: Config.fqdncache.size | |
709 | DOC_START | |
710 | Maximum number of FQDN cache entries. | |
e55650e3 | 711 | DOC_END |
712 | ||
6a566b9c | 713 | NAME: cache_replacement_policy |
714 | TYPE: removalpolicy | |
715 | LOC: Config.replPolicy | |
716 | DEFAULT: lru | |
717 | DOC_START | |
718 | The cache replacement policy parameter determines which | |
719 | objects are evicted (replaced) when disk space is needed. | |
720 | ||
721 | lru : Squid's original list based LRU policy | |
722 | heap GDSF : Greedy-Dual Size Frequency | |
723 | heap LFUDA: Least Frequently Used with Dynamic Aging | |
724 | heap LRU : LRU policy implemented using a heap | |
725 | ||
726 | Applies to any cache_dir lines listed below this. | |
727 | ||
728 | The LRU policies keeps recently referenced objects. | |
729 | ||
730 | The heap GDSF policy optimizes object hit rate by keeping smaller | |
731 | popular objects in cache so it has a better chance of getting a | |
732 | hit. It achieves a lower byte hit rate than LFUDA though since | |
733 | it evicts larger (possibly popular) objects. | |
734 | ||
735 | The heap LFUDA policy keeps popular objects in cache regardless of | |
736 | their size and thus optimizes byte hit rate at the expense of | |
737 | hit rate since one large, popular object will prevent many | |
738 | smaller, slightly less popular objects from being cached. | |
739 | ||
740 | Both policies utilize a dynamic aging mechanism that prevents | |
741 | cache pollution that can otherwise occur with frequency-based | |
742 | replacement policies. | |
743 | ||
744 | NOTE: if using the LFUDA replacement policy you should increase | |
745 | the value of maximum_object_size above its default of 4096 KB to | |
96d88dcb | 746 | to maximize the potential byte hit rate improvement of LFUDA. |
6a566b9c | 747 | |
748 | For more information about the GDSF and LFUDA cache replacement | |
749 | policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html | |
750 | and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. | |
751 | DOC_END | |
752 | ||
753 | NAME: memory_replacement_policy | |
754 | TYPE: removalpolicy | |
755 | LOC: Config.memPolicy | |
756 | DEFAULT: lru | |
757 | DOC_START | |
758 | The memory replacement policy parameter determines which | |
759 | objects are purged from memory when memory space is needed. | |
760 | ||
761 | See cache_replacement_policy for details. | |
762 | DOC_END | |
763 | ||
764 | ||
0f74202c | 765 | COMMENT_START |
3a278cb8 | 766 | LOGFILE PATHNAMES AND CACHE DIRECTORIES |
767 | ----------------------------------------------------------------------------- | |
0f74202c | 768 | COMMENT_END |
934b03fc | 769 | |
770 | NAME: cache_dir | |
771 | TYPE: cachedir | |
f1dc9b30 | 772 | DEFAULT: none |
8e8d4f30 | 773 | DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256 |
f1dc9b30 | 774 | LOC: Config.cacheSwap |
934b03fc | 775 | DOC_START |
cf5cc17e | 776 | Usage: |
777 | ||
8e8d4f30 | 778 | cache_dir Type Directory-Name Fs-specific-data [options] |
934b03fc | 779 | |
1f7c9178 | 780 | cache_dir diskd Maxobjsize Directory-Name MB L1 L2 Q1 Q2 |
781 | ||
934b03fc | 782 | You can specify multiple cache_dir lines to spread the |
783 | cache among different disk partitions. | |
784 | ||
c463eb5f | 785 | Type specifies the kind of storage system to use. Only "ufs" |
786 | is built by default. To eanble any of the other storage systems | |
787 | see the --enable-storeio configure option. | |
9bc73deb | 788 | |
cf5cc17e | 789 | 'Directory' is a top-level directory where cache swap |
790 | files will be stored. If you want to use an entire disk | |
791 | for caching, then this can be the mount-point directory. | |
792 | The directory must exist and be writable by the Squid | |
793 | process. Squid will NOT create this directory for you. | |
794 | ||
8e8d4f30 | 795 | The ufs store type: |
796 | ||
797 | "ufs" is the old well-known Squid storage format that has always | |
798 | been there. | |
799 | ||
800 | cache_dir ufs Directory-Name Mbytes L1 L2 [options] | |
cf5cc17e | 801 | |
802 | 'Mbytes' is the amount of disk space (MB) to use under this | |
803 | directory. The default is 100 MB. Change this to suit your | |
804 | configuration. | |
805 | ||
806 | 'Level-1' is the number of first-level subdirectories which | |
807 | will be created under the 'Directory'. The default is 16. | |
808 | ||
809 | 'Level-2' is the number of second-level subdirectories which | |
810 | will be created under each first-level directory. The default | |
811 | is 256. | |
d1595b77 | 812 | |
8e8d4f30 | 813 | The aufs store type: |
814 | ||
815 | "aufs" uses the same storage format as "ufs", utilizing | |
816 | POSIX-threads to avoid blocking the main Squid process on | |
817 | disk-I/O. This was formerly known in Squid as async-io. | |
818 | ||
819 | cache_dir aufs Directory-Name Mbytes L1 L2 [options] | |
820 | ||
821 | see argument descriptions under ufs above | |
822 | ||
823 | The diskd store type: | |
824 | ||
825 | "diskd" uses the same storage format as "ufs", utilizing a | |
826 | separate process to avoid blocking the main Squid process on | |
827 | disk-I/O. | |
828 | ||
829 | cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n] | |
830 | ||
831 | see argument descriptions under ufs above | |
832 | ||
833 | Q1 specifies the number of unacknowledged I/O requests when Squid | |
834 | stops opening new files. If this many messages are in the queues, | |
835 | Squid won't open new files. Default is 64 | |
836 | ||
d1595b77 | 837 | Q2 specifies the number of unacknowledged messages when Squid |
838 | starts blocking. If this many messages are in the queues, | |
8e8d4f30 | 839 | Squid blocks until it recevies some replies. Default is 72 |
840 | ||
841 | Common options: | |
842 | ||
843 | read-only, this cache_dir is read only. | |
844 | ||
845 | max-size=n, refers to the max object size this storedir supports. | |
846 | It is used to initially choose the storedir to dump the object. | |
847 | Note: To make optimal use of the max-size limits you should order | |
848 | the cache_dir lines with the smallest max-size value first and the | |
849 | ones with no max-size specification last. | |
934b03fc | 850 | DOC_END |
851 | ||
852 | ||
853 | NAME: cache_access_log | |
854 | TYPE: string | |
d0b98f84 | 855 | DEFAULT: @DEFAULT_ACCESS_LOG@ |
934b03fc | 856 | LOC: Config.Log.access |
857 | DOC_START | |
858 | Logs the client request activity. Contains an entry for | |
0eb83825 | 859 | every HTTP and ICP queries received. To disable, enter "none". |
934b03fc | 860 | DOC_END |
861 | ||
862 | ||
863 | NAME: cache_log | |
864 | TYPE: string | |
0153d498 | 865 | DEFAULT: @DEFAULT_CACHE_LOG@ |
934b03fc | 866 | LOC: Config.Log.log |
867 | DOC_START | |
cf5cc17e | 868 | Cache logging file. This is where general information about |
efd900cb | 869 | your cache's behavior goes. You can increase the amount of data |
cf5cc17e | 870 | logged to this file with the "debug_options" tag below. |
934b03fc | 871 | DOC_END |
872 | ||
873 | ||
874 | NAME: cache_store_log | |
875 | TYPE: string | |
0153d498 | 876 | DEFAULT: @DEFAULT_STORE_LOG@ |
934b03fc | 877 | LOC: Config.Log.store |
878 | DOC_START | |
879 | Logs the activities of the storage manager. Shows which | |
880 | objects are ejected from the cache, and which objects are | |
cf5cc17e | 881 | saved and for how long. To disable, enter "none". There are |
efd900cb | 882 | not really utilities to analyze this data, so you can safely |
cf5cc17e | 883 | disable it. |
934b03fc | 884 | DOC_END |
885 | ||
886 | ||
887 | NAME: cache_swap_log | |
888 | TYPE: string | |
889 | LOC: Config.Log.swap | |
1273d501 | 890 | DEFAULT: none |
934b03fc | 891 | DOC_START |
d0d3ec94 | 892 | Location for the cache "swap.log." This log file holds the |
934b03fc | 893 | metadata of objects saved on disk. It is used to rebuild the |
a80e50c7 | 894 | cache during startup. Normally this file resides in each |
934b03fc | 895 | 'cache_dir' directory, but you may specify an alternate |
896 | pathname here. Note you must give a full filename, not just | |
cf5cc17e | 897 | a directory. Since this is the index for the whole object |
898 | list you CANNOT periodically rotate it! | |
934b03fc | 899 | |
a80e50c7 | 900 | If %s can be used in the file name then it will be replaced with a |
901 | a representation of the cache_dir name where each / is replaced | |
902 | with '.'. This is needed to allow adding/removing cache_dir | |
903 | lines when cache_swap_log is being used. | |
96d88dcb | 904 | |
a80e50c7 | 905 | If have more than one 'cache_dir', and %s is not used in the name |
906 | then these swap logs will have names such as: | |
710df4ca | 907 | |
908 | cache_swap_log.00 | |
909 | cache_swap_log.01 | |
910 | cache_swap_log.02 | |
911 | ||
912 | The numbered extension (which is added automatically) | |
913 | corresponds to the order of the 'cache_dir' lines in this | |
914 | configuration file. If you change the order of the 'cache_dir' | |
915 | lines in this file, then these log files will NOT correspond to | |
916 | the correct 'cache_dir' entry (unless you manually rename | |
917 | them). We recommend that you do NOT use this option. It is | |
918 | better to keep these log files in each 'cache_dir' directory. | |
934b03fc | 919 | DOC_END |
920 | ||
921 | ||
922 | NAME: emulate_httpd_log | |
923 | COMMENT: on|off | |
924 | TYPE: onoff | |
f1dc9b30 | 925 | DEFAULT: off |
17a0a4ee | 926 | LOC: Config.onoff.common_log |
934b03fc | 927 | DOC_START |
928 | The Cache can emulate the log file format which many 'httpd' | |
929 | programs use. To disable/enable this emulation, set | |
930 | emulate_httpd_log to 'off' or 'on'. The default | |
cf5cc17e | 931 | is to use the native log format since it includes useful |
efd900cb | 932 | information that Squid-specific log analyzers use. |
934b03fc | 933 | DOC_END |
934 | ||
890b0fa8 | 935 | NAME: log_ip_on_direct |
936 | COMMENT: on|off | |
937 | TYPE: onoff | |
938 | DEFAULT: on | |
939 | LOC: Config.onoff.log_ip_on_direct | |
940 | DOC_START | |
941 | Log the destination IP address in the hierarchy log tag when going | |
942 | direct. Earlier Squid versions logged the hostname here. If you | |
943 | prefer the old way set this to off. | |
890b0fa8 | 944 | DOC_END |
934b03fc | 945 | |
946 | NAME: mime_table | |
f0b19334 | 947 | TYPE: string |
0153d498 | 948 | DEFAULT: @DEFAULT_MIME_TABLE@ |
934b03fc | 949 | LOC: Config.mimeTablePathname |
950 | DOC_START | |
cf5cc17e | 951 | Pathname to Squid's MIME table. You shouldn't need to change |
952 | this, but the default file contains examples and formatting | |
953 | information if you do. | |
934b03fc | 954 | DOC_END |
955 | ||
956 | ||
957 | NAME: log_mime_hdrs | |
958 | COMMENT: on|off | |
959 | TYPE: onoff | |
17a0a4ee | 960 | LOC: Config.onoff.log_mime_hdrs |
f1dc9b30 | 961 | DEFAULT: off |
934b03fc | 962 | DOC_START |
cf5cc17e | 963 | The Cache can record both the request and the response MIME |
964 | headers for each HTTP transaction. The headers are encoded | |
965 | safely and will appear as two bracketed fields at the end of | |
966 | the access log (for either the native or httpd-emulated log | |
967 | formats). To enable this logging set log_mime_hdrs to 'on'. | |
934b03fc | 968 | DOC_END |
969 | ||
970 | ||
971 | NAME: useragent_log | |
972 | TYPE: string | |
973 | LOC: Config.Log.useragent | |
f1dc9b30 | 974 | DEFAULT: none |
6b53c392 | 975 | IFDEF: USE_USERAGENT_LOG |
934b03fc | 976 | DOC_START |
6b53c392 | 977 | Squid will write the User-Agent field from HTTP requests |
978 | to the filename specified here. By default useragent_log | |
979 | is disabled. | |
934b03fc | 980 | DOC_END |
981 | ||
982 | ||
fd2c5549 | 983 | NAME: referer_log |
984 | TYPE: string | |
985 | LOC: Config.Log.referer | |
986 | DEFAULT: none | |
b81f1cf3 | 987 | IFDEF: USE_REFERER_LOG |
fd2c5549 | 988 | DOC_START |
b81f1cf3 | 989 | Squid will write the Referer field from HTTP requests to the |
990 | filename specified here. By default referer_log is disabled. | |
fd2c5549 | 991 | DOC_END |
992 | ||
993 | ||
934b03fc | 994 | NAME: pid_filename |
995 | TYPE: string | |
0153d498 | 996 | DEFAULT: @DEFAULT_PID_FILE@ |
934b03fc | 997 | LOC: Config.pidFilename |
998 | DOC_START | |
d0d41f07 | 999 | A filename to write the process-id to. To disable, enter "none". |
934b03fc | 1000 | DOC_END |
1001 | ||
1002 | ||
1003 | NAME: debug_options | |
f1dc9b30 | 1004 | TYPE: eol |
934b03fc | 1005 | DEFAULT: ALL,1 |
1006 | LOC: Config.debugOptions | |
1007 | DOC_START | |
1008 | Logging options are set as section,level where each source file | |
1009 | is assigned a unique section. Lower levels result in less | |
1010 | output, Full debugging (level 9) can result in a very large | |
1011 | log file, so be careful. The magic word "ALL" sets debugging | |
1012 | levels for all sections. We recommend normally running with | |
1013 | "ALL,1". | |
934b03fc | 1014 | DOC_END |
1015 | ||
1016 | ||
934b03fc | 1017 | NAME: log_fqdn |
1018 | COMMENT: on|off | |
1019 | TYPE: onoff | |
f1dc9b30 | 1020 | DEFAULT: off |
17a0a4ee | 1021 | LOC: Config.onoff.log_fqdn |
934b03fc | 1022 | DOC_START |
1023 | Turn this on if you wish to log fully qualified domain names | |
cf5cc17e | 1024 | in the access.log. To do this Squid does a DNS lookup of all |
1025 | IP's connecting to it. This can (in some situations) increase | |
1026 | latency, which makes your cache seem slower for interactive | |
96d88dcb | 1027 | browsing. |
934b03fc | 1028 | DOC_END |
1029 | ||
1030 | ||
1031 | NAME: client_netmask | |
1032 | TYPE: address | |
1033 | LOC: Config.Addrs.client_netmask | |
f1dc9b30 | 1034 | DEFAULT: 255.255.255.255 |
934b03fc | 1035 | DOC_START |
1036 | A netmask for client addresses in logfiles and cachemgr output. | |
1037 | Change this to protect the privacy of your cache clients. | |
cf5cc17e | 1038 | A netmask of 255.255.255.0 will log all IP's in that range with |
1039 | the last digit set to '0'. | |
934b03fc | 1040 | DOC_END |
1041 | ||
1042 | ||
0f74202c | 1043 | COMMENT_START |
3a278cb8 | 1044 | OPTIONS FOR EXTERNAL SUPPORT PROGRAMS |
1045 | ----------------------------------------------------------------------------- | |
0f74202c | 1046 | COMMENT_END |
934b03fc | 1047 | |
934b03fc | 1048 | NAME: ftp_user |
1049 | TYPE: string | |
cf5cc17e | 1050 | DEFAULT: Squid@ |
934b03fc | 1051 | LOC: Config.Ftp.anon_user |
1052 | DOC_START | |
1053 | If you want the anonymous login password to be more informative | |
1054 | (and enable the use of picky ftp servers), set this to something | |
efd900cb | 1055 | reasonable for your domain, like wwwuser@somewhere.net |
934b03fc | 1056 | |
1057 | The reason why this is domainless by default is that the | |
1058 | request can be made on the behalf of a user in any domain, | |
1059 | depending on how the cache is used. | |
1060 | Some ftp server also validate that the email address is valid | |
1061 | (for example perl.com). | |
934b03fc | 1062 | DOC_END |
1063 | ||
365cb147 | 1064 | NAME: ftp_list_width |
1b635117 | 1065 | TYPE: size_t |
365cb147 | 1066 | DEFAULT: 32 |
1067 | LOC: Config.Ftp.list_width | |
1068 | DOC_START | |
cf5cc17e | 1069 | Sets the width of ftp listings. This should be set to fit in |
1070 | the width of a standard browser. Setting this too small | |
1071 | can cut off long filenames when browsing ftp sites. | |
365cb147 | 1072 | DOC_END |
1073 | ||
d20b1cd0 | 1074 | NAME: ftp_passive |
1075 | TYPE: onoff | |
1076 | DEFAULT: on | |
1077 | LOC: Config.Ftp.passive | |
1078 | DOC_START | |
1079 | If your firewall does not allow Squid to use passive | |
1080 | connections, then turn off this option. | |
1081 | DOC_END | |
1082 | ||
00c5afca | 1083 | NAME: ftp_sanitycheck |
1084 | TYPE: onoff | |
1085 | DEFAULT: on | |
1086 | LOC: Config.Ftp.sanitycheck | |
1087 | DOC_START | |
1088 | For security and data integrity reasons Squid by default performs | |
1089 | sanity checks of the addresses of FTP data connections ensure the | |
1090 | data connection is to the requested server. If you need to allow | |
1091 | FTP connections to servers using another IP address for the data | |
1092 | connection then turn this off. | |
1093 | DOC_END | |
1094 | ||
934b03fc | 1095 | NAME: cache_dns_program |
f0b19334 | 1096 | TYPE: string |
589c90de | 1097 | IFDEF: USE_DNSSERVERS |
0153d498 | 1098 | DEFAULT: @DEFAULT_DNSSERVER@ |
934b03fc | 1099 | LOC: Config.Program.dnsserver |
1100 | DOC_START | |
1101 | Specify the location of the executable for dnslookup process. | |
934b03fc | 1102 | DOC_END |
1103 | ||
934b03fc | 1104 | NAME: dns_children |
1105 | TYPE: int | |
6b53c392 | 1106 | IFDEF: USE_DNSSERVERS |
934b03fc | 1107 | DEFAULT: 5 |
1108 | LOC: Config.dnsChildren | |
1109 | DOC_START | |
1110 | The number of processes spawn to service DNS name lookups. | |
1111 | For heavily loaded caches on large servers, you should | |
1112 | probably increase this value to at least 10. The maximum | |
1113 | is 32. The default is 5. | |
1114 | ||
efd900cb | 1115 | You must have at least one dnsserver process. |
934b03fc | 1116 | DOC_END |
1117 | ||
4fe0e1d0 | 1118 | NAME: dns_retransmit_interval |
1119 | TYPE: time_t | |
1120 | DEFAULT: 5 seconds | |
1121 | LOC: Config.Timeout.idns_retransmit | |
1122 | IFDEF: !USE_DNSSERVERS | |
1123 | DOC_START | |
1124 | Initial retransmit interval for DNS queries. The interval is | |
1125 | doubled each time all configured DNS servers have been tried. | |
1126 | ||
1127 | DOC_END | |
1128 | ||
1129 | NAME: dns_timeout | |
1130 | TYPE: time_t | |
1131 | DEFAULT: 5 minutes | |
1132 | LOC: Config.Timeout.idns_query | |
1133 | IFDEF: !USE_DNSSERVERS | |
1134 | DOC_START | |
1135 | DNS Query timeout. If no response is received to a DNS query | |
1136 | within this time then all DNS servers for the queried domain | |
1137 | is assumed to be unavailable. | |
1138 | DOC_END | |
934b03fc | 1139 | |
1140 | NAME: dns_defnames | |
1141 | COMMENT: on|off | |
589c90de | 1142 | IFDEF: USE_DNSSERVERS |
934b03fc | 1143 | TYPE: onoff |
f1dc9b30 | 1144 | DEFAULT: off |
17a0a4ee | 1145 | LOC: Config.onoff.res_defnames |
6b53c392 | 1146 | IFDEF: USE_DNSSERVERS |
934b03fc | 1147 | DOC_START |
1148 | Normally the 'dnsserver' disables the RES_DEFNAMES resolver | |
1149 | option (see res_init(3)). This prevents caches in a hierarchy | |
1150 | from interpreting single-component hostnames locally. To allow | |
1151 | dnsserver to handle single-component names, enable this | |
1152 | option. | |
934b03fc | 1153 | DOC_END |
1154 | ||
09c483ec | 1155 | NAME: dns_nameservers |
1156 | TYPE: wordlist | |
1157 | DEFAULT: none | |
1158 | LOC: Config.dns_nameservers | |
1159 | DOC_START | |
1160 | Use this if you want to specify a list of DNS name servers | |
1161 | (IP addresses) to use instead of those given in your | |
1162 | /etc/resolv.conf file. | |
836d6233 | 1163 | On Windows platforms, if no value is specified here or in |
1164 | the /etc/resolv.conf file, the list of DNS name servers are | |
1165 | taken from the Windows registry, both static and dynamic DHCP | |
1166 | configurations are supported. | |
09c483ec | 1167 | |
1168 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
09c483ec | 1169 | DOC_END |
1170 | ||
0e70aa1e | 1171 | NAME: hosts_file |
1172 | TYPE: string | |
1173 | DEFAULT: /etc/hosts | |
1174 | LOC: Config.etcHostsPath | |
1175 | DOC_START | |
1176 | Location of the host-local IP name-address associations | |
1177 | database. Most Operating Systems have such a file: under | |
1178 | Un*X it's by default in /etc/hosts MS-Windows NT/2000 places | |
1179 | that in %SystemRoot%(by default | |
1180 | c:\winnt)\system32\drivers\etc\hosts, while Windows 9x/ME | |
1181 | places that in %windir%(usually c:\windows)\hosts | |
1182 | ||
1183 | The file contains newline-separated definitions, in the | |
1184 | form ip_address_in_dotted_form name [name ...] names are | |
1185 | whitespace-separated. lines beginnng with an hash (#) | |
1186 | character are comments. | |
1187 | ||
1188 | The file is checked at startup and upon configuration. If | |
1189 | set to 'none', it won't be checked. If append_domain is | |
1190 | used, that domain will be added to domain-local (i.e. not | |
1191 | containing any dot character) host definitions. | |
1192 | DOC_END | |
934b03fc | 1193 | |
be7d89d4 | 1194 | NAME: diskd_program |
1195 | TYPE: string | |
1196 | DEFAULT: @DEFAULT_DISKD@ | |
1197 | LOC: Config.Program.diskd | |
1198 | DOC_START | |
1199 | Specify the location of the diskd executable. | |
1200 | Note that this is only useful if you have compiled in | |
1201 | diskd as one of the store io modules. | |
1202 | DOC_END | |
1203 | ||
934b03fc | 1204 | NAME: unlinkd_program |
a3d0a19d | 1205 | IFDEF: USE_UNLINKD |
f0b19334 | 1206 | TYPE: string |
0153d498 | 1207 | DEFAULT: @DEFAULT_UNLINKD@ |
934b03fc | 1208 | LOC: Config.Program.unlinkd |
1209 | DOC_START | |
1210 | Specify the location of the executable for file deletion process. | |
934b03fc | 1211 | DOC_END |
1212 | ||
934b03fc | 1213 | NAME: pinger_program |
a95856a0 | 1214 | TYPE: string |
0153d498 | 1215 | DEFAULT: @DEFAULT_PINGER@ |
934b03fc | 1216 | LOC: Config.Program.pinger |
6b53c392 | 1217 | IFDEF: USE_ICMP |
934b03fc | 1218 | DOC_START |
1219 | Specify the location of the executable for the pinger process. | |
934b03fc | 1220 | DOC_END |
1221 | ||
1222 | ||
1223 | NAME: redirect_program | |
c6d5b87b | 1224 | TYPE: wordlist |
934b03fc | 1225 | LOC: Config.Program.redirect |
62607543 | 1226 | DEFAULT: none |
934b03fc | 1227 | DOC_START |
1228 | Specify the location of the executable for the URL redirector. | |
cf5cc17e | 1229 | Since they can perform almost any function there isn't one included. |
3f94eab9 | 1230 | See the FAQ (section 15) for information on how to write one. |
cf5cc17e | 1231 | By default, a redirector is not used. |
934b03fc | 1232 | DOC_END |
1233 | ||
1234 | ||
1235 | NAME: redirect_children | |
1236 | TYPE: int | |
1237 | DEFAULT: 5 | |
1238 | LOC: Config.redirectChildren | |
1239 | DOC_START | |
cf5cc17e | 1240 | The number of redirector processes to spawn. If you start |
1241 | too few Squid will have to wait for them to process a backlog of | |
1242 | URLs, slowing it down. If you start too many they will use RAM | |
1243 | and other system resources. | |
934b03fc | 1244 | DOC_END |
1245 | ||
c68e9c6b | 1246 | NAME: redirect_rewrites_host_header |
1247 | TYPE: onoff | |
1248 | DEFAULT: on | |
1249 | LOC: Config.onoff.redir_rewrites_host | |
1250 | DOC_START | |
7e3ce7b9 | 1251 | By default Squid rewrites any Host: header in redirected |
54bab452 | 1252 | requests. If you are running an accelerator then this may |
7e3ce7b9 | 1253 | not be a wanted effect of a redirector. |
c68e9c6b | 1254 | DOC_END |
1255 | ||
9bc73deb | 1256 | NAME: redirector_access |
1257 | TYPE: acl_access | |
1258 | DEFAULT: none | |
1259 | LOC: Config.accessList.redirector | |
1260 | DOC_START | |
1261 | If defined, this access list specifies which requests are | |
1262 | sent to the redirector processes. By default all requests | |
1263 | are sent. | |
1264 | DOC_END | |
1265 | ||
94439e4e | 1266 | NAME: auth_param |
1267 | TYPE: authparam | |
1268 | LOC: Config.authConfig | |
73e67ee0 | 1269 | DEFAULT: none |
1270 | DOC_START | |
94439e4e | 1271 | This is used to pass parameters to the various authentication |
1272 | schemes. | |
1273 | format: auth_param scheme parameter [setting] | |
1274 | ||
1275 | auth_param basic program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwd | |
1276 | would tell the basic authentication scheme it's program parameter. | |
1277 | ||
1278 | The order that authentication prompts are presented to the client_agent | |
1279 | is dependant on the order the scheme first appears in config file. | |
1280 | IE has a bug (it's not rfc 2617 compliant) in that it will use the basic | |
1281 | scheme if basic is the first entry presented, even if more secure schemes | |
1282 | are presented. For now use the order in the file below. If other browsers | |
1283 | have difficulties (don't recognise the schemes offered even if you are using | |
1284 | basic) then either put basic first, or disable the other schemes (by commenting | |
1285 | out their program entry). | |
1286 | ||
2d70df72 | 1287 | Once an authentication scheme is fully configured, it can only be shutdown |
1288 | by shutting squid down and restarting. Changes can be made on the fly and | |
96d88dcb | 1289 | activated with a reconfigure. I.E. You can change to a different helper, |
2d70df72 | 1290 | but not unconfigure the helper completely. |
1291 | ||
94439e4e | 1292 | === Parameters for the basic scheme follow. === |
1293 | ||
1294 | "program" cmdline | |
6c20b822 | 1295 | Specify the command for the external authenticator. Such a |
1296 | program reads a line containing "username password" and replies | |
1297 | "OK" or "ERR" in an endless loop. If you use an authenticator, | |
1298 | make sure you have 1 acl of type proxy_auth. By default, the | |
94439e4e | 1299 | authenticate_program is not used. |
73e67ee0 | 1300 | |
6c20b822 | 1301 | If you want to use the traditional proxy authentication, |
1302 | jump over to the ../auth_modules/NCSA directory and | |
1303 | type: | |
1304 | % make | |
1305 | % make install | |
73e67ee0 | 1306 | |
6c20b822 | 1307 | Then, set this line to something like |
73e67ee0 | 1308 | |
94439e4e | 1309 | auth_param basic program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwd |
73e67ee0 | 1310 | |
94439e4e | 1311 | "children" numberofchildren |
1312 | The number of authenticator processes to spawn (no default). If you | |
73e67ee0 | 1313 | start too few Squid will have to wait for them to process a backlog |
1314 | of usercode/password verifications, slowing it down. When password | |
1315 | verifications are done via a (slow) network you are likely to need | |
1316 | lots of authenticator processes. | |
94439e4e | 1317 | auth_param basic children 5 |
1318 | ||
1319 | "realm" realmstring | |
1320 | Specifies the realm name which is to be reported to the client for | |
1321 | the basic proxy authentication scheme (part of the text the user will | |
1322 | see when prompted their username and password). Their is no default. | |
1323 | auth_param basic realm Squid proxy-caching web server | |
1324 | ||
1325 | "credentialsttl" timetolive | |
1326 | Specifies how long squid assumes an externally validated username:password | |
96d88dcb | 1327 | pair is valid for - in other words how often the helper program is called |
94439e4e | 1328 | for that user. Set this low to force revalidation with short lived passwords. |
1329 | Note that setting this high does not impact your susceptability to replay | |
54bab452 | 1330 | attacks unless you are using an one-time password system (such as SecureID). |
94439e4e | 1331 | If you are using such a system, you will be vulnerable to replay attacks |
1332 | unless you also enable the IP ttl is strict option. | |
1333 | ||
2d70df72 | 1334 | === Parameters for the digest scheme follow === |
1335 | ||
1336 | "program" cmdline | |
1337 | Specify the command for the external authenticator. Such a | |
1338 | program reads a line containing "username":"realm" and replies | |
1339 | with the appropriate H(A1) value base64 encoded. See rfc 2616 for | |
1340 | the definition of H(A1). If you use an authenticator, | |
96d88dcb | 1341 | make sure you have 1 acl of type proxy_auth. By default, |
2d70df72 | 1342 | authentication is not used. |
1343 | ||
54bab452 | 1344 | If you want to use build an authenticator, |
96d88dcb | 1345 | jump over to the ../digest_auth_modules directory and choose the |
2d70df72 | 1346 | authenticator to use. It it's directory type |
1347 | % make | |
1348 | % make install | |
1349 | ||
1350 | Then, set this line to something like | |
1351 | ||
1352 | auth_param digest program @DEFAULT_PREFIX@/bin/digest_auth_pw @DEFAULT_PREFIX@/etc/digpass | |
1353 | ||
1354 | ||
1355 | "children" numberofchildren | |
1356 | The number of authenticator processes to spawn (no default). If you | |
1357 | start too few Squid will have to wait for them to process a backlog | |
1358 | of H(A1) calculations, slowing it down. When the H(A1) calculations | |
96d88dcb | 1359 | are done via a (slow) network you are likely to need lots of |
2d70df72 | 1360 | authenticator processes. |
1361 | auth_param digest children 5 | |
1362 | ||
1363 | "realm" realmstring | |
1364 | Specifies the realm name which is to be reported to the client for | |
1365 | the digest proxy authentication scheme (part of the text the user will | |
1366 | see when prompted their username and password). There is no default. | |
1367 | auth_param digest realm Squid proxy-caching web server | |
1368 | ||
1369 | "nonce_garbage_interval" timeinterval | |
1370 | Specifies the interval that nonces that have been issued to client_agent's | |
1371 | are checked for validity. | |
1372 | ||
1373 | "nonce_max_duration" timeinterval | |
96d88dcb | 1374 | Specifies the maximum length of time a given nonce will be valid for. |
2d70df72 | 1375 | |
1376 | "nonce_max_count" number | |
1377 | Specifies the maximum number of times a given nonce can be used. | |
1378 | ||
d205783b | 1379 | "nonce_strictness" on|off |
1380 | Determines if squid requires increment-by-1 behaviour for nonce counts | |
1381 | (on - the default), or strictly incrementing (off - for use when useragents | |
1382 | generate nonce counts that occasionally miss 1 (ie, 1,2,4,6)). | |
1383 | ||
94439e4e | 1384 | === NTLM scheme options follow === |
1385 | ||
1386 | "program" cmdline | |
1387 | Specify the command for the external ntlm authenticator. Such a | |
1388 | program reads a line containing the uuencoded NEGOTIATE and replies | |
1389 | with the ntlm CHALLENGE, then waits for the response and answers with | |
1390 | "OK" or "ERR" in an endless loop. If you use an ntlm authenticator, | |
1391 | make sure you have 1 acl of type proxy_auth. By default, the | |
1392 | ntlm authenticator_program is not used. | |
1393 | ||
1394 | auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth | |
1395 | ||
1396 | "children" numberofchildren | |
1397 | The number of authenticator processes to spawn (no default). If you | |
1398 | start too few Squid will have to wait for them to process a backlog | |
1399 | of credential verifications, slowing it down. When crendential | |
1400 | verifications are done via a (slow) network you are likely to need | |
1401 | lots of authenticator processes. | |
1402 | auth_param ntlm children 5 | |
1403 | ||
1404 | "max_challenge_reuses" number | |
1405 | The maximum number of times a challenge given by a ntlm authentication | |
96d88dcb | 1406 | helper can be reused. Increasing this number increases your exposure |
1407 | to replay attacks on your network. 0 means use the challenge only once. | |
94439e4e | 1408 | (disable challenge caching) |
1409 | See max_ntlm_challenge_lifetime for more information. | |
1410 | auth_param ntlm max_challenge_reuses 0 | |
1411 | ||
1412 | "max_challenge_lifetime" timespan | |
1413 | The maximum time period that a ntlm challenge is reused over. | |
96d88dcb | 1414 | The actual period will be the minimum of this time AND the number of |
94439e4e | 1415 | reused challenges. |
1416 | auth_param ntlm max_challenge_lifetime 2 minutes | |
1417 | ||
1418 | NOCOMMENT_START | |
1419 | #Recommended minimum configuration: | |
2d70df72 | 1420 | #auth_param digest program <uncomment and complete this line> |
1421 | #auth_param digest children 5 | |
1422 | #auth_param digest realm Squid proxy-caching web server | |
1423 | #auth_param digest nonce_garbage_interval 5 minutes | |
1424 | #auth_param digest nonce_max_duration 30 minutes | |
1425 | #auth_param digest nonce_max_count 50 | |
94439e4e | 1426 | #auth_param ntlm program <uncomment and complete this line to activate> |
2d70df72 | 1427 | #auth_param ntlm children 5 |
1428 | #auth_param ntlm max_challenge_reuses 0 | |
1429 | #auth_param ntlm max_challenge_lifetime 2 minutes | |
94439e4e | 1430 | #auth_param basic program <uncomment and complete this line> |
1431 | auth_param basic children 5 | |
1432 | auth_param basic realm Squid proxy-caching web server | |
1433 | auth_param basic credentialsttl 2 hours | |
1434 | NOCOMMENT_END | |
1435 | DOC_END | |
1436 | ||
1437 | NAME: authenticate_cache_garbage_interval | |
1438 | TYPE: time_t | |
1439 | DEFAULT: 1 hour | |
1440 | LOC: Config.authenticateGCInterval | |
1441 | DOC_START | |
96d88dcb | 1442 | The time period between garbage collection across the username cache. |
94439e4e | 1443 | This is a tradeoff between memory utilisation (long intervals - say |
1444 | 2 days) and CPU (short intervals - say 1 minute). Only change if | |
1445 | you have good reason to. | |
73e67ee0 | 1446 | DOC_END |
1447 | ||
c68e9c6b | 1448 | NAME: authenticate_ttl |
70a76033 | 1449 | TYPE: time_t |
1450 | DEFAULT: 1 hour | |
c68e9c6b | 1451 | LOC: Config.authenticateTTL |
1452 | DOC_START | |
94439e4e | 1453 | The time a user & their credentials stay in the logged in user cache |
1454 | since their last request. When the garbage interval passes, all | |
1455 | user credentials that have passed their TTL are removed from memory. | |
c68e9c6b | 1456 | DOC_END |
1457 | ||
9bc73deb | 1458 | NAME: authenticate_ip_ttl |
70a76033 | 1459 | TYPE: time_t |
9bc73deb | 1460 | LOC: Config.authenticateIpTTL |
70a76033 | 1461 | DEFAULT: 0 seconds |
9bc73deb | 1462 | DOC_START |
1463 | With this option you control how long a proxy authentication | |
1464 | will be bound to a specific IP address. If a request using | |
1465 | the same user name is received during this time then access | |
1466 | will be denied and both users are required to reauthenticate | |
1467 | them selves. The idea behind this is to make it annoying | |
1468 | for people to share their password to their friends, but | |
1469 | yet allow a dialup user to reconnect on a different dialup | |
1470 | port. | |
1471 | ||
1472 | The default is 0 to disable the check. Recommended value | |
70a76033 | 1473 | if you have dialup users are no more than 60 seconds to allow |
1474 | the user to redial without hassle. If all your users are | |
1475 | stationary then higher values may be used. | |
1476 | ||
1cdf9bc1 | 1477 | See also the acl max_user_ip. The max_user_ip acl replaces |
b0213b00 | 1478 | the authenticate_ip_ttl_is_strict option found in earlier |
1479 | Squid versions. | |
9bc73deb | 1480 | DOC_END |
1481 | ||
d9572179 | 1482 | NAME: external_acl_type |
1483 | TYPE: externalAclHelper | |
1484 | LOC: Config.externalAclHelperList | |
1485 | DEFAULT: none | |
1486 | DOC_START | |
1487 | This option defines external acl classes using a helper program | |
1488 | to look up the status | |
1489 | ||
1490 | external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..] | |
1491 | ||
1492 | Options: | |
1493 | ||
1494 | ttl=n TTL in seconds for cached results (defaults to 3600 | |
1495 | for 1 hour) | |
1496 | negative_ttl=n | |
1497 | TTL for cached negative lookups (default same | |
1498 | as ttl) | |
94a04679 | 1499 | concurrency=n Concurrency level / number of processes spawn |
d9572179 | 1500 | to service external acl lookups of this type. |
1501 | cache=n result cache size, 0 is unbounded (default) | |
1502 | ||
d9572179 | 1503 | FORMAT specifications |
1504 | ||
1505 | %LOGIN Authenticated user login name | |
1506 | %IDENT Ident user name | |
1507 | %SRC Client IP | |
1508 | %DST Requested host | |
1509 | %PROTO Requested protocol | |
1510 | %PORT Requested port | |
1511 | %METHOD Request method | |
1512 | %{Header} HTTP request header | |
1513 | %{Hdr:member} HTTP request header list member | |
1514 | %{Hdr:;member} | |
1515 | HTTP request header list member using ; as | |
1516 | list separator. ; can be any non-alphanumeric | |
1517 | character. | |
1518 | ||
1519 | In addition, any string specified in the referencing acl will also be | |
1520 | included in the helper request line, after the specified formats | |
1521 | (see the acl directive) | |
1522 | ||
87e6f180 | 1523 | The helper receives lines per the above FORMAT specification, and |
1524 | returns OK or ERR indicating the validity of the request, and | |
1525 | optionally additional keywords with additional details. | |
1526 | ||
1527 | General result syntax: | |
1528 | ||
1529 | OK/ERR keyword=value ... | |
1530 | ||
1531 | Keywords: | |
1532 | ||
1533 | user= The users name (login) | |
1534 | error= Error description (only defined for ERR results) | |
1535 | ||
1536 | Keyword values need to be enclosed in quotes if they may contain | |
1537 | whitespace, or the whitespace escaped using \. Any quotes or \ | |
1538 | characters in the result must be \ escaped. | |
d9572179 | 1539 | DOC_END |
1540 | ||
0f74202c | 1541 | COMMENT_START |
3a278cb8 | 1542 | OPTIONS FOR TUNING THE CACHE |
1543 | ----------------------------------------------------------------------------- | |
0f74202c | 1544 | COMMENT_END |
934b03fc | 1545 | |
0153d498 | 1546 | NAME: wais_relay_host |
1547 | TYPE: string | |
1273d501 | 1548 | DEFAULT: none |
0153d498 | 1549 | LOC: Config.Wais.relayHost |
1550 | DOC_NONE | |
934b03fc | 1551 | |
0153d498 | 1552 | NAME: wais_relay_port |
1553 | TYPE: ushort | |
1554 | DEFAULT: 0 | |
1555 | LOC: Config.Wais.relayPort | |
934b03fc | 1556 | DOC_START |
1557 | Relay WAIS request to host (1st arg) at port (2 arg). | |
934b03fc | 1558 | DOC_END |
1559 | ||
1560 | ||
0483b991 | 1561 | NAME: request_header_max_size |
1562 | COMMENT: (KB) | |
1563 | TYPE: b_size_t | |
1564 | DEFAULT: 10 KB | |
1565 | LOC: Config.maxRequestHeaderSize | |
1566 | DOC_START | |
1567 | This specifies the maximum size for HTTP headers in a request. | |
1568 | Request headers are usually relatively small (about 512 bytes). | |
1569 | Placing a limit on the request header size will catch certain | |
1570 | bugs (for example with persistent connections) and possibly | |
1571 | buffer-overflow or denial-of-service attacks. | |
0483b991 | 1572 | DOC_END |
1573 | ||
1574 | NAME: request_body_max_size | |
9906e724 | 1575 | COMMENT: (KB) |
518da0bd | 1576 | TYPE: b_size_t |
ec719ae2 | 1577 | DEFAULT: 0 KB |
0483b991 | 1578 | LOC: Config.maxRequestBodySize |
934b03fc | 1579 | DOC_START |
0483b991 | 1580 | This specifies the maximum size for an HTTP request body. |
1581 | In other words, the maximum size of a PUT/POST request. | |
1582 | A user who attempts to send a request with a body larger | |
1583 | than this limit receives an "Invalid Request" error message. | |
ec719ae2 | 1584 | If you set this parameter to a zero (the default), there will |
1585 | be no limit imposed. | |
0483b991 | 1586 | DOC_END |
934b03fc | 1587 | |
934b03fc | 1588 | NAME: refresh_pattern |
934b03fc | 1589 | TYPE: refreshpattern |
f1dc9b30 | 1590 | LOC: Config.Refresh |
1273d501 | 1591 | DEFAULT: none |
934b03fc | 1592 | DOC_START |
7ddc902f | 1593 | usage: refresh_pattern [-i] regex min percent max [options] |
1594 | ||
1595 | By default, regular expressions are CASE-SENSITIVE. To make | |
1596 | them case-insensitive, use the -i option. | |
934b03fc | 1597 | |
7e3ce7b9 | 1598 | 'Min' is the time (in minutes) an object without an explicit |
1599 | expiry time should be considered fresh. The recommended | |
1600 | value is 0, any higher values may cause dynamic applications | |
efd900cb | 1601 | to be erroneously cached unless the application designer |
7e3ce7b9 | 1602 | has taken the appropriate actions. |
1603 | ||
1604 | 'Percent' is a percentage of the objects age (time since last | |
efd900cb | 1605 | modification age) an object without explicit expiry time |
7e3ce7b9 | 1606 | will be considered fresh. |
1607 | ||
1608 | 'Max' is an upper limit on how long objects without an explicit | |
1609 | expiry time will be considered fresh. | |
934b03fc | 1610 | |
c20d16c0 | 1611 | options: override-expire |
1dfa1d81 | 1612 | override-lastmod |
cbe3a719 | 1613 | reload-into-ims |
1614 | ignore-reload | |
1dfa1d81 | 1615 | |
1616 | override-expire enforces min age even if the server | |
cbe3a719 | 1617 | sent a Expires: header. Doing this VIOLATES the HTTP |
1618 | standard. Enabling this feature could make you liable | |
1619 | for problems which it causes. | |
1dfa1d81 | 1620 | |
1621 | override-lastmod enforces min age even on objects | |
1622 | that was modified recently. | |
cbe3a719 | 1623 | |
1624 | reload-into-ims changes client no-cache or ``reload'' | |
1625 | to If-Modified-Since requests. Doing this VIOLATES the | |
1626 | HTTP standard. Enabling this feature could make you | |
1627 | liable for problems which it causes. | |
1628 | ||
1629 | ignore-reload ignores a client no-cache or ``reload'' | |
1630 | header. Doing this VIOLATES the HTTP standard. Enabling | |
1631 | this feature could make you liable for problems which | |
1632 | it causes. | |
1dfa1d81 | 1633 | |
934b03fc | 1634 | Please see the file doc/Release-Notes-1.1.txt for a full |
1635 | description of Squid's refresh algorithm. Basically a | |
1dfa1d81 | 1636 | cached object is: (the order is changed from 1.1.X) |
934b03fc | 1637 | |
1dfa1d81 | 1638 | FRESH if expires < now, else STALE |
6b8e7481 | 1639 | STALE if age > max |
1dfa1d81 | 1640 | FRESH if lm-factor < percent, else STALE |
1641 | FRESH if age < min | |
1642 | else STALE | |
934b03fc | 1643 | |
1644 | The refresh_pattern lines are checked in the order listed here. | |
1645 | The first entry which matches is used. If none of the entries | |
1646 | match, then the default will be used. | |
1647 | ||
6b53c392 | 1648 | Note, you must uncomment all the default lines if you want |
1649 | to change one. The default setting is only active if none is | |
1650 | used. | |
8e89beb3 | 1651 | |
1652 | Suggested default: | |
1653 | NOCOMMENT_START | |
1654 | refresh_pattern ^ftp: 1440 20% 10080 | |
1655 | refresh_pattern ^gopher: 1440 0% 1440 | |
1656 | refresh_pattern . 0 20% 4320 | |
1657 | NOCOMMENT_END | |
934b03fc | 1658 | DOC_END |
1659 | ||
934b03fc | 1660 | NAME: reference_age |
f1dc9b30 | 1661 | TYPE: time_t |
934b03fc | 1662 | LOC: Config.referenceAge |
f1dc9b30 | 1663 | DEFAULT: 1 year |
934b03fc | 1664 | DOC_START |
1665 | As a part of normal operation, Squid performs Least Recently | |
1666 | Used removal of cached objects. The LRU age for removal is | |
1667 | computed dynamically, based on the amount of disk space in | |
6778c757 | 1668 | use. The dynamic value can be seen in the Cache Manager 'info' |
1669 | output. | |
1670 | ||
1671 | The 'reference_age' parameter defines the maximum LRU age. For | |
1672 | example, setting reference_age to '1 week' will cause objects | |
1673 | to be removed if they have not been accessed for a week or | |
7e3ce7b9 | 1674 | more. The default value is one year. |
934b03fc | 1675 | |
1676 | Specify a number here, followed by units of time. For example: | |
1677 | 1 week | |
1678 | 3.5 days | |
1679 | 4 months | |
1680 | 2.2 hours | |
1681 | ||
2b906e48 | 1682 | NOTE: this parameter is not used when using the enhanced |
1683 | replacement policies, GDSH or LFUDA. | |
934b03fc | 1684 | DOC_END |
1685 | ||
1686 | ||
0153d498 | 1687 | NAME: quick_abort_min |
9906e724 | 1688 | COMMENT: (KB) |
1689 | TYPE: kb_size_t | |
c68e9c6b | 1690 | DEFAULT: 16 KB |
0153d498 | 1691 | LOC: Config.quickAbort.min |
1692 | DOC_NONE | |
1693 | ||
0153d498 | 1694 | NAME: quick_abort_max |
9906e724 | 1695 | COMMENT: (KB) |
1696 | TYPE: kb_size_t | |
6b53c392 | 1697 | DEFAULT: 16 KB |
0153d498 | 1698 | LOC: Config.quickAbort.max |
1b2f5c2f | 1699 | DOC_NONE |
1700 | ||
1701 | NAME: quick_abort_pct | |
1702 | COMMENT: (percent) | |
1703 | TYPE: int | |
c68e9c6b | 1704 | DEFAULT: 95 |
1b2f5c2f | 1705 | LOC: Config.quickAbort.pct |
934b03fc | 1706 | DOC_START |
9923e308 | 1707 | The cache by default continues downloading aborted requests |
7a61d612 | 1708 | which are almost completed (less than 16 KB remaining). This |
1709 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
1710 | caches. Impatient users may tie up file descriptors and | |
1711 | bandwidth by repeatedly requesting and immediately aborting | |
1712 | downloads. | |
934b03fc | 1713 | |
1714 | When the user aborts a request, Squid will check the | |
1715 | quick_abort values to the amount of data transfered until | |
1716 | then. | |
1717 | ||
cf5cc17e | 1718 | If the transfer has less than 'quick_abort_min' KB remaining, |
2bb84b43 | 1719 | it will finish the retrieval. |
934b03fc | 1720 | |
cf5cc17e | 1721 | If the transfer has more than 'quick_abort_max' KB remaining, |
1722 | it will abort the retrieval. | |
934b03fc | 1723 | |
1b2f5c2f | 1724 | If more than 'quick_abort_pct' of the transfer has completed, |
1725 | it will finish the retrieval. | |
2bb84b43 | 1726 | |
7a61d612 | 1727 | If you do not want any retrieval to continue after the client |
2bb84b43 | 1728 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' |
1729 | to '0 KB'. | |
1730 | ||
9923e308 | 1731 | If you want retrievals to always continue if they are being |
2bb84b43 | 1732 | cached then set 'quick_abort_min' to '-1 KB'. |
934b03fc | 1733 | DOC_END |
1734 | ||
7e820f36 | 1735 | NAME: read_ahead_gap |
1736 | COMMENT: buffer-size | |
1737 | TYPE: kb_size_t | |
1738 | LOC: Config.readAheadGap | |
1739 | DEFAULT: 16 KB | |
1740 | DOC_START | |
1741 | The amount of data the cache will buffer ahead of what has been | |
1742 | sent to the client when retrieving an object from another server. | |
1743 | DOC_END | |
934b03fc | 1744 | |
1745 | NAME: negative_ttl | |
bc0eb004 | 1746 | COMMENT: time-units |
f1dc9b30 | 1747 | TYPE: time_t |
934b03fc | 1748 | LOC: Config.negativeTtl |
9e975e4e | 1749 | DEFAULT: 5 minutes |
934b03fc | 1750 | DOC_START |
1751 | Time-to-Live (TTL) for failed requests. Certain types of | |
1752 | failures (such as "connection refused" and "404 Not Found") are | |
cf5cc17e | 1753 | negatively-cached for a configurable amount of time. The |
1754 | default is 5 minutes. Note that this is different from | |
1755 | negative caching of DNS lookups. | |
934b03fc | 1756 | DOC_END |
1757 | ||
1758 | ||
1759 | NAME: positive_dns_ttl | |
bc0eb004 | 1760 | COMMENT: time-units |
f1dc9b30 | 1761 | TYPE: time_t |
934b03fc | 1762 | LOC: Config.positiveDnsTtl |
9e975e4e | 1763 | DEFAULT: 6 hours |
934b03fc | 1764 | DOC_START |
1765 | Time-to-Live (TTL) for positive caching of successful DNS lookups. | |
1766 | Default is 6 hours (360 minutes). If you want to minimize the | |
1767 | use of Squid's ipcache, set this to 1, not 0. | |
934b03fc | 1768 | DOC_END |
1769 | ||
1770 | ||
1771 | NAME: negative_dns_ttl | |
bc0eb004 | 1772 | COMMENT: time-units |
f1dc9b30 | 1773 | TYPE: time_t |
934b03fc | 1774 | LOC: Config.negativeDnsTtl |
9e975e4e | 1775 | DEFAULT: 5 minutes |
934b03fc | 1776 | DOC_START |
1777 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
934b03fc | 1778 | DOC_END |
1779 | ||
c68e9c6b | 1780 | NAME: range_offset_limit |
1781 | COMMENT: (bytes) | |
1782 | TYPE: b_size_t | |
1783 | LOC: Config.rangeOffsetLimit | |
1784 | DEFAULT: 0 KB | |
1785 | DOC_START | |
1786 | Sets a upper limit on how far into the the file a Range request | |
1787 | may be to cause Squid to prefetch the whole file. If beyond this | |
1788 | limit then Squid forwards the Range request as it is and the result | |
1789 | is NOT cached. | |
1790 | ||
1791 | This is to stop a far ahead range request (lets say start at 17MB) | |
1792 | from making Squid fetch the whole object up to that point before | |
1793 | sending anything to the client. | |
1794 | ||
1795 | A value of -1 causes Squid to always fetch the object from the | |
1796 | beginning so that it may cache the result. (2.0 style) | |
1797 | ||
6e7dbcbd | 1798 | A value of 0 causes Squid to never fetch more than the |
c68e9c6b | 1799 | client requested. (default) |
c68e9c6b | 1800 | DOC_END |
1801 | ||
1802 | ||
0f74202c | 1803 | COMMENT_START |
3a278cb8 | 1804 | TIMEOUTS |
1805 | ----------------------------------------------------------------------------- | |
0f74202c | 1806 | COMMENT_END |
934b03fc | 1807 | |
1808 | NAME: connect_timeout | |
bc0eb004 | 1809 | COMMENT: time-units |
f1dc9b30 | 1810 | TYPE: time_t |
934b03fc | 1811 | LOC: Config.Timeout.connect |
9e975e4e | 1812 | DEFAULT: 2 minutes |
934b03fc | 1813 | DOC_START |
1814 | Some systems (notably Linux) can not be relied upon to properly | |
cf5cc17e | 1815 | time out connect(2) requests. Therefore the Squid process |
934b03fc | 1816 | enforces its own timeout on server connections. This parameter |
1817 | specifies how long to wait for the connect to complete. The | |
1818 | default is two minutes (120 seconds). | |
934b03fc | 1819 | DOC_END |
1820 | ||
3f62decd | 1821 | NAME: peer_connect_timeout |
1822 | COMMENT: time-units | |
1823 | TYPE: time_t | |
1824 | LOC: Config.Timeout.peer_connect | |
1825 | DEFAULT: 30 seconds | |
1826 | DOC_START | |
1827 | This parameter specifies how long to wait for a pending TCP | |
1828 | connection to a peer cache. The default is 30 seconds. You | |
1829 | may also set different timeout values for individual neighbors | |
1830 | with the 'connect-timeout' option on a 'cache_peer' line. | |
9bc73deb | 1831 | DOC_END |
3f62decd | 1832 | |
23d92c64 | 1833 | NAME: siteselect_timeout |
1834 | COMMENT: time-units | |
1835 | TYPE: time_t | |
1836 | LOC: Config.Timeout.siteSelect | |
1837 | DEFAULT: 4 seconds | |
1838 | DOC_START | |
1839 | For URN to multiple URL's URL selection | |
23d92c64 | 1840 | DOC_END |
934b03fc | 1841 | |
1842 | NAME: read_timeout | |
bc0eb004 | 1843 | COMMENT: time-units |
f1dc9b30 | 1844 | TYPE: time_t |
934b03fc | 1845 | LOC: Config.Timeout.read |
9e975e4e | 1846 | DEFAULT: 15 minutes |
934b03fc | 1847 | DOC_START |
1848 | The read_timeout is applied on server-side connections. After | |
1849 | each successful read(), the timeout will be extended by this | |
1850 | amount. If no data is read again after this amount of time, | |
1851 | the request is aborted and logged with ERR_READ_TIMEOUT. The | |
1852 | default is 15 minutes. | |
934b03fc | 1853 | DOC_END |
1854 | ||
1855 | ||
934b03fc | 1856 | NAME: request_timeout |
f1dc9b30 | 1857 | TYPE: time_t |
934b03fc | 1858 | LOC: Config.Timeout.request |
049d61bb | 1859 | DEFAULT: 5 minutes |
1860 | DOC_START | |
1861 | How long to wait for an HTTP request after initial | |
1862 | connection establishment. | |
1863 | DOC_END | |
1864 | ||
1865 | ||
1866 | NAME: persistent_request_timeout | |
1867 | TYPE: time_t | |
1868 | LOC: Config.Timeout.persistent_request | |
1869 | DEFAULT: 1 minute | |
934b03fc | 1870 | DOC_START |
049d61bb | 1871 | How long to wait for the next HTTP request on a persistent |
1872 | connection after the previous request completes. | |
934b03fc | 1873 | DOC_END |
1874 | ||
1875 | ||
1876 | NAME: client_lifetime | |
bc0eb004 | 1877 | COMMENT: time-units |
f1dc9b30 | 1878 | TYPE: time_t |
934b03fc | 1879 | LOC: Config.Timeout.lifetime |
9e975e4e | 1880 | DEFAULT: 1 day |
934b03fc | 1881 | DOC_START |
1882 | The maximum amount of time that a client (browser) is allowed to | |
1883 | remain connected to the cache process. This protects the Cache | |
efd900cb | 1884 | from having a lot of sockets (and hence file descriptors) tied up |
934b03fc | 1885 | in a CLOSE_WAIT state from remote clients that go away without |
1886 | properly shutting down (either because of a network failure or | |
1887 | because of a poor client implementation). The default is one | |
1888 | day, 1440 minutes. | |
1889 | ||
1890 | NOTE: The default value is intended to be much larger than any | |
1891 | client would ever need to be connected to your cache. You | |
1892 | should probably change client_lifetime only as a last resort. | |
1893 | If you seem to have many client connections tying up | |
1894 | filedescriptors, we recommend first tuning the read_timeout, | |
049d61bb | 1895 | request_timeout, persistent_request_timeout and quick_abort values. |
934b03fc | 1896 | DOC_END |
1897 | ||
ea285003 | 1898 | NAME: half_closed_clients |
1899 | TYPE: onoff | |
1900 | LOC: Config.onoff.half_closed_clients | |
1901 | DEFAULT: on | |
1902 | DOC_START | |
1903 | Some clients may shutdown the sending side of their TCP | |
1904 | connections, while leaving their receiving sides open. Sometimes, | |
1905 | Squid can not tell the difference between a half-closed and a | |
1906 | fully-closed TCP connection. By default, half-closed client | |
1907 | connections are kept open until a read(2) or write(2) on the | |
1908 | socket returns an error. Change this option to 'off' and Squid | |
1909 | will immediately close client connections when read(2) returns | |
1910 | "no more data to read." | |
ea285003 | 1911 | DOC_END |
1912 | ||
603a02fd | 1913 | NAME: pconn_timeout |
1914 | TYPE: time_t | |
1915 | LOC: Config.Timeout.pconn | |
1916 | DEFAULT: 120 seconds | |
1917 | DOC_START | |
1918 | Timeout for idle persistent connections to servers and other | |
1919 | proxies. | |
603a02fd | 1920 | DOC_END |
1921 | ||
05832ae1 | 1922 | NAME: ident_timeout |
1923 | TYPE: time_t | |
3898f57f | 1924 | IFDEF: USE_IDENT |
05832ae1 | 1925 | LOC: Config.Timeout.ident |
1926 | DEFAULT: 10 seconds | |
1927 | DOC_START | |
c463eb5f | 1928 | Maximum time to wait for IDENT lookups to complete. |
1929 | ||
1930 | If this is too high, and you enabled IDENT lookups from untrusted | |
1931 | users, then you might be susceptible to denial-of-service by having | |
1932 | many ident requests going at once. | |
05832ae1 | 1933 | DOC_END |
1934 | ||
934b03fc | 1935 | |
1936 | NAME: shutdown_lifetime | |
bc0eb004 | 1937 | COMMENT: time-units |
f1dc9b30 | 1938 | TYPE: time_t |
934b03fc | 1939 | LOC: Config.shutdownLifetime |
9e975e4e | 1940 | DEFAULT: 30 seconds |
934b03fc | 1941 | DOC_START |
1942 | When SIGTERM or SIGHUP is received, the cache is put into | |
1943 | "shutdown pending" mode until all active sockets are closed. | |
1944 | This value is the lifetime to set for all open descriptors | |
1945 | during shutdown mode. Any active clients after this many | |
1946 | seconds will receive a 'timeout' message. | |
934b03fc | 1947 | DOC_END |
1948 | ||
0f74202c | 1949 | COMMENT_START |
3a278cb8 | 1950 | ACCESS CONTROLS |
1951 | ----------------------------------------------------------------------------- | |
0f74202c | 1952 | COMMENT_END |
934b03fc | 1953 | |
1954 | NAME: acl | |
1955 | TYPE: acl | |
f1dc9b30 | 1956 | LOC: Config.aclList |
1957 | DEFAULT: none | |
934b03fc | 1958 | DOC_START |
1959 | Defining an Access List | |
1960 | ||
1961 | acl aclname acltype string1 ... | |
1962 | acl aclname acltype "file" ... | |
1963 | ||
1964 | when using "file", the file should contain one item per line | |
1965 | ||
fc659d9d | 1966 | acltype is one of the types described below |
934b03fc | 1967 | |
edd80fbb | 1968 | By default, regular expressions are CASE-SENSITIVE. To make |
1969 | them case-insensitive, use the -i option. | |
1970 | ||
934b03fc | 1971 | acl aclname src ip-address/netmask ... (clients IP address) |
1972 | acl aclname src addr1-addr2/netmask ... (range of addresses) | |
1973 | acl aclname dst ip-address/netmask ... (URL host's IP address) | |
ae2c08a2 | 1974 | acl aclname myip ip-address/netmask ... (local socket IP address) |
d0d41f07 | 1975 | |
efd900cb | 1976 | acl aclname srcdomain .foo.com ... # reverse lookup, client IP |
1977 | acl aclname dstdomain .foo.com ... # Destination server from URL | |
edd80fbb | 1978 | acl aclname srcdom_regex [-i] xxx ... # regex matching client name |
1979 | acl aclname dstdom_regex [-i] xxx ... # regex matching server | |
d0d41f07 | 1980 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP |
1981 | # based URL is used. The name "none" is used if the reverse lookup | |
1982 | # fails. | |
1983 | ||
934b03fc | 1984 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
1985 | day-abbrevs: | |
1986 | S - Sunday | |
1987 | M - Monday | |
1988 | T - Tuesday | |
1989 | W - Wednesday | |
1990 | H - Thursday | |
1991 | F - Friday | |
1992 | A - Saturday | |
1993 | h1:m1 must be less than h2:m2 | |
edd80fbb | 1994 | acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL |
1995 | acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path | |
934b03fc | 1996 | acl aclname port 80 70 21 ... |
ec5bba4d | 1997 | acl aclname port 0-1024 ... # ranges allowed |
7e3ce7b9 | 1998 | acl aclname myport 3128 ... # (local socket TCP port) |
934b03fc | 1999 | acl aclname proto HTTP FTP ... |
2000 | acl aclname method GET POST ... | |
fc659d9d | 2001 | acl aclname browser [-i] regexp ... |
edd80fbb | 2002 | # pattern match on User-Agent header |
fc659d9d | 2003 | acl aclname referer_regex [-i] regexp ... |
2004 | # pattern match on Referer header | |
2005 | # Referer is highly unreliable, so use with care | |
c68e9c6b | 2006 | acl aclname ident username ... |
145cf928 | 2007 | acl aclname ident_regex [-i] pattern ... |
c68e9c6b | 2008 | # string match on ident output. |
2009 | # use REQUIRED to accept any non-null ident. | |
96d88dcb | 2010 | acl aclname src_as number ... |
6468fe10 | 2011 | acl aclname dst_as number ... |
2012 | # Except for access control, AS numbers can be used for | |
96d88dcb | 2013 | # routing of requests to specific caches. Here's an |
2014 | # example for routing all requests for AS#1241 and only | |
6468fe10 | 2015 | # those to mycache.mydomain.net: |
2016 | # acl asexample dst_as 1241 | |
d87ebd78 | 2017 | # cache_peer_access mycache.mydomain.net allow asexample |
2018 | # cache_peer_access mycache_mydomain.net deny all | |
6468fe10 | 2019 | |
c68e9c6b | 2020 | acl aclname proxy_auth username ... |
145cf928 | 2021 | acl aclname proxy_auth_regex [-i] pattern ... |
c68e9c6b | 2022 | # list of valid usernames |
2023 | # use REQUIRED to accept any valid username. | |
73e67ee0 | 2024 | # |
2025 | # NOTE: when a Proxy-Authentication header is sent but it is not | |
2026 | # needed during ACL checking the username is NOT logged | |
2027 | # in access.log. | |
c68e9c6b | 2028 | # |
2029 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
2030 | # to check username/password combinations (see | |
2031 | # authenticate_program). | |
2032 | # | |
2033 | # WARNING: proxy_auth can't be used in a transparent proxy. It | |
2034 | # collides with any authentication done by origin servers. It may | |
2035 | # seem like it works at first, but it doesn't. | |
934b03fc | 2036 | |
dba79ac5 | 2037 | acl aclname snmp_community string ... |
08f6b5e0 | 2038 | # A community string to limit access to your SNMP Agent |
dba79ac5 | 2039 | # Example: |
96d88dcb | 2040 | # |
dba79ac5 | 2041 | # acl snmppublic snmp_community public |
2042 | ||
9bc73deb | 2043 | acl aclname maxconn number |
2044 | # This will be matched when the client's IP address has | |
2045 | # more than <number> HTTP connections established. | |
2046 | ||
be5caa55 | 2047 | acl aclname max_user_ip [-s] number |
96d88dcb | 2048 | # This will be matched when the user attempts to log in from more |
60d096f4 | 2049 | # than <number> different ip address's. The authenticate_ip_ttl |
2050 | # parameter controls the timeout on the ip entries. | |
be5caa55 | 2051 | # If -s is specified then the limit is strict, denying browsing |
2052 | # from any further IP addresses until the ttl has expired. Without | |
2053 | # -s Squid will just annoy the user by "randomly" deny requests. | |
2054 | # (the counter is then reset each time the limit is reached and a | |
2055 | # request is denied) | |
2056 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
2057 | # clients may appear to come from multiple address's if they are | |
2058 | # going through proxy farms, so a limit of 1 may cause user problems. | |
60d096f4 | 2059 | |
fb8ee28e | 2060 | acl aclname req_mime_type mime-type1 ... |
ba2b31a8 | 2061 | # regex match agains the mime type of the request generated |
2062 | # by the client. Can be used to detect file upload or some | |
2063 | # types HTTP tunelling requests. | |
2064 | # NOTE: This does NOT match the reply. You cannot use this | |
2065 | # to match the returned file type. | |
c68e9c6b | 2066 | |
fb8ee28e | 2067 | acl aclname rep_mime_type mime-type1 ... |
c4ab8329 | 2068 | # regex match against the mime type of the reply recieved by |
2069 | # squid. Can be used to detect file download or some | |
2070 | # types HTTP tunelling requests. | |
2071 | # NOTE: This has no effect in http_access rules. It only has | |
2072 | # effect in rules that affect the reply data stream such as | |
2073 | # http_reply_access. | |
2074 | ||
d9572179 | 2075 | acl acl_name external class_name [arguments...] |
2076 | # external ACL lookup via a helper class defined by the | |
2077 | # external_acl_type directive. | |
c4ab8329 | 2078 | |
c68e9c6b | 2079 | Examples: |
2080 | acl myexample dst_as 1241 | |
aa6956a5 | 2081 | acl password proxy_auth REQUIRED |
ba2b31a8 | 2082 | acl fileupload req_mime_type -i ^multipart/form-data$ |
c4ab8329 | 2083 | acl javascript rep_mime_type -i ^application/x-javascript$ |
c68e9c6b | 2084 | |
c68e9c6b | 2085 | NOCOMMENT_START |
6b53c392 | 2086 | #Recommended minimum configuration: |
c68e9c6b | 2087 | acl all src 0.0.0.0/0.0.0.0 |
934b03fc | 2088 | acl manager proto cache_object |
2089 | acl localhost src 127.0.0.1/255.255.255.255 | |
4cc6eb12 | 2090 | acl to_localhost dst 127.0.0.0/8 |
934b03fc | 2091 | acl SSL_ports port 443 563 |
6b53c392 | 2092 | acl Safe_ports port 80 # http |
2093 | acl Safe_ports port 21 # ftp | |
2094 | acl Safe_ports port 443 563 # https, snews | |
2095 | acl Safe_ports port 70 # gopher | |
2096 | acl Safe_ports port 210 # wais | |
2097 | acl Safe_ports port 1025-65535 # unregistered ports | |
9bc73deb | 2098 | acl Safe_ports port 280 # http-mgmt |
2099 | acl Safe_ports port 488 # gss-http | |
2100 | acl Safe_ports port 591 # filemaker | |
2101 | acl Safe_ports port 777 # multiling http | |
934b03fc | 2102 | acl CONNECT method CONNECT |
c68e9c6b | 2103 | NOCOMMENT_END |
934b03fc | 2104 | DOC_END |
2105 | ||
2106 | NAME: http_access | |
2107 | TYPE: acl_access | |
f1dc9b30 | 2108 | LOC: Config.accessList.http |
2109 | DEFAULT: none | |
da7f354f | 2110 | DEFAULT_IF_NONE: deny all |
934b03fc | 2111 | DOC_START |
2112 | Allowing or Denying access based on defined access lists | |
2113 | ||
2114 | Access to the HTTP port: | |
2115 | http_access allow|deny [!]aclname ... | |
2116 | ||
934b03fc | 2117 | NOTE on default values: |
2118 | ||
6b53c392 | 2119 | If there are no "access" lines present, the default is to deny |
934b03fc | 2120 | the request. |
2121 | ||
2122 | If none of the "access" lines cause a match, the default is the | |
2123 | opposite of the last line in the list. If the last line was | |
2124 | deny, then the default is allow. Conversely, if the last line | |
2125 | is allow, the default will be deny. For these reasons, it is a | |
2126 | good idea to have an "deny all" or "allow all" entry at the end | |
2127 | of your access lists to avoid potential confusion. | |
2128 | ||
c68e9c6b | 2129 | NOCOMMENT_START |
6b53c392 | 2130 | #Recommended minimum configuration: |
2131 | # | |
2132 | # Only allow cachemgr access from localhost | |
c68e9c6b | 2133 | http_access allow manager localhost |
2134 | http_access deny manager | |
6b53c392 | 2135 | # Deny requests to unknown ports |
499558df | 2136 | http_access deny !Safe_ports |
6b53c392 | 2137 | # Deny CONNECT to other than SSL ports |
c68e9c6b | 2138 | http_access deny CONNECT !SSL_ports |
2139 | # | |
4cc6eb12 | 2140 | # We strongly recommend to uncomment the following to protect innocent |
2141 | # web applications running on the proxy server who think that the only | |
2142 | # one who can access services on "localhost" is a local user | |
2143 | #http_access deny to_localhost | |
c68e9c6b | 2144 | # |
4cc6eb12 | 2145 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS |
2146 | ||
b9d7fe3e | 2147 | # Exampe rule allowing access from your local networks. Adapt |
2148 | # to list your (internal) IP networks from where browsing should | |
2149 | # be allowed | |
2150 | #acl our_networks src 192.168.1.0/24 192.168.2.0/24 | |
2151 | #http_access allow our_networks | |
2152 | ||
6b53c392 | 2153 | # And finally deny all other access to this proxy |
c68e9c6b | 2154 | http_access deny all |
2155 | NOCOMMENT_END | |
934b03fc | 2156 | DOC_END |
2157 | ||
c4ab8329 | 2158 | NAME: http_reply_access |
2159 | TYPE: acl_access | |
2160 | LOC: Config.accessList.reply | |
2161 | DEFAULT: none | |
2162 | DEFAULT_IF_NONE: allow all | |
2163 | DOC_START | |
2164 | Allow replies to client requests. This is complementary to http_access. | |
2165 | ||
2166 | http_reply_access allow|deny [!] aclname ... | |
2167 | ||
96d88dcb | 2168 | NOTE: if there are no access lines present, the default is to allow |
c4ab8329 | 2169 | all replies |
2170 | ||
2171 | If none of the access lines cause a match, then the opposite of the | |
2172 | last line will apply. Thus it is good practice to end the rules | |
2173 | with an "allow all" or "deny all" entry. | |
2174 | ||
2175 | NOCOMMENT_START | |
2176 | #Recommended minimum configuration: | |
2177 | # | |
2178 | # Insert your own rules here. | |
2179 | # | |
2180 | # | |
2181 | # and finally allow by default | |
2182 | http_reply_access allow all | |
2183 | NOCOMMENT_END | |
2184 | DOC_END | |
2185 | ||
934b03fc | 2186 | |
2187 | NAME: icp_access | |
2188 | TYPE: acl_access | |
f1dc9b30 | 2189 | LOC: Config.accessList.icp |
2190 | DEFAULT: none | |
da7f354f | 2191 | DEFAULT_IF_NONE: deny all |
934b03fc | 2192 | DOC_START |
6b53c392 | 2193 | Allowing or Denying access to the ICP port based on defined |
2194 | access lists | |
2195 | ||
2196 | icp_access allow|deny [!]aclname ... | |
2197 | ||
2198 | See http_access for details | |
934b03fc | 2199 | |
c68e9c6b | 2200 | NOCOMMENT_START |
6b53c392 | 2201 | #Allow ICP queries from eveyone |
c68e9c6b | 2202 | icp_access allow all |
2203 | NOCOMMENT_END | |
934b03fc | 2204 | DOC_END |
2205 | ||
2206 | ||
2207 | NAME: miss_access | |
2208 | TYPE: acl_access | |
f1dc9b30 | 2209 | LOC: Config.accessList.miss |
2210 | DEFAULT: none | |
934b03fc | 2211 | DOC_START |
2212 | Use to force your neighbors to use you as a sibling instead of | |
2213 | a parent. For example: | |
2214 | ||
2215 | acl localclients src 172.16.0.0/16 | |
2216 | miss_access allow localclients | |
2217 | miss_access deny !localclients | |
2218 | ||
2219 | This means that only your local clients are allowed to fetch | |
2220 | MISSES and all other clients can only fetch HITS. | |
2221 | ||
2222 | By default, allow all clients who passed the http_access rules | |
2223 | to fetch MISSES from us. | |
6b53c392 | 2224 | |
c68e9c6b | 2225 | NOCOMMENT_START |
6b53c392 | 2226 | #Default setting: |
2227 | # miss_access allow all | |
c68e9c6b | 2228 | NOCOMMENT_END |
934b03fc | 2229 | DOC_END |
2230 | ||
2231 | ||
505e35db | 2232 | NAME: cache_peer_access |
2233 | TYPE: peer_access | |
f1dc9b30 | 2234 | DEFAULT: none |
2235 | LOC: none | |
934b03fc | 2236 | DOC_START |
505e35db | 2237 | Similar to 'cache_peer_domain' but provides more flexibility by |
2238 | using ACL elements. | |
934b03fc | 2239 | |
505e35db | 2240 | cache_peer_access cache-host allow|deny [!]aclname ... |
934b03fc | 2241 | |
505e35db | 2242 | The syntax is identical to 'http_access' and the other lists of |
2243 | ACL elements. See the comments for 'http_access' below, or | |
2b6662ba | 2244 | the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html). |
934b03fc | 2245 | DOC_END |
2246 | ||
ec603b25 | 2247 | NAME: ident_lookup_access |
2248 | TYPE: acl_access | |
2249 | IFDEF: USE_IDENT | |
2250 | DEFAULT: none | |
2251 | DEFAULT_IF_NONE: deny all | |
2252 | LOC: Config.accessList.identLookup | |
2253 | DOC_START | |
2254 | A list of ACL elements which, if matched, cause an ident | |
2255 | (RFC 931) lookup to be performed for this request. For | |
2256 | example, you might choose to always perform ident lookups | |
2257 | for your main multi-user Unix boxes, but not for your Macs | |
2258 | and PCs. By default, ident lookups are not performed for | |
2259 | any requests. | |
2260 | ||
2261 | To enable ident lookups for specific client addresses, you | |
2262 | can follow this example: | |
96d88dcb | 2263 | |
ec603b25 | 2264 | acl ident_aware_hosts src 198.168.1.0/255.255.255.0 |
2265 | ident_lookup_access allow ident_aware_hosts | |
2266 | ident_lookup_access deny all | |
2267 | ||
c463eb5f | 2268 | Only src type ACL checks are fully supported. A src_domain |
2269 | ACL might work at times, but it will not always provide | |
2270 | the correct result. | |
ec603b25 | 2271 | DOC_END |
2272 | ||
43a5f06a | 2273 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp |
d6827718 | 2274 | TYPE: acl_tos |
2275 | DEFAULT: none | |
2276 | LOC: Config.accessList.outgoing_tos | |
2277 | DOC_START | |
2278 | Allows you to select a TOS/Diffserv value to mark outgoing | |
2279 | connections with, based on the username or source address | |
2280 | making the request. | |
2281 | ||
2282 | tcp_outgoing_tos ds-field [!]aclname ... | |
2283 | ||
2284 | Example where normal_service_net uses the TOS value 0x00 | |
2285 | and normal_service_net uses 0x20 | |
2286 | ||
2287 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
2288 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
2289 | tcp_outgoing_tos 0x00 normal_service_net 0x00 | |
2290 | tcp_outgoing_tos 0x20 good_service_net | |
2291 | ||
2292 | TOS/DSCP values really only have local significance - so you should | |
2293 | know what you're specifying. For more, see RFC 2474 | |
2294 | ||
2295 | The TOS/DSCP byte must be exactly that - a byte, value 0 - 255, or | |
2296 | "default" to use whatever default your host has. | |
2297 | ||
2298 | Processing proceeds in the order specified, and stops at first fully | |
2299 | matching line. | |
2300 | DOC_END | |
2301 | ||
2302 | NAME: tcp_outgoing_address | |
2303 | TYPE: acl_address | |
2304 | DEFAULT: none | |
2305 | LOC: Config.accessList.outgoing_address | |
2306 | DOC_START | |
2307 | Allows you to map requests to different outgoing IP addresses | |
2308 | based on the username or sourceaddress of the user making | |
2309 | the request. | |
2310 | ||
2311 | tcp_outgoing_address ipaddr [[!]aclname] ... | |
2312 | ||
2313 | Example where requests from 10.0.0.0/24 will be forwareded | |
2314 | with source address 10.1.0.1, 10.0.2.0/24 forwarded with | |
2315 | source address 10.1.0.2 and the rest will be forwarded with | |
2316 | source address 10.1.0.3. | |
2317 | ||
2318 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
2319 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
2320 | tcp_outgoing_address 10.0.0.1 normal_service_net | |
2321 | tcp_outgoing_address 10.0.0.2 good_service_net | |
2322 | tcp_outgoing_address 10.0.0.3 | |
2323 | ||
2324 | Processing proceeds in the order specified, and stops at first fully | |
2325 | matching line. | |
2326 | DOC_END | |
ec603b25 | 2327 | |
a560ee93 | 2328 | NAME: reply_body_max_size |
2329 | COMMENT: bytes allow|deny acl acl... | |
2330 | TYPE: body_size_t | |
2331 | DEFAULT: none | |
2332 | DEFAULT_IF_NONE: 0 allow all | |
2333 | LOC: Config.ReplyBodySize | |
2334 | DOC_START | |
2335 | This option specifies the maximum size of a reply body. It | |
2336 | can be used to prevent users from downloading very large files, | |
2337 | such as MP3's and movies. When the reply headers are recieved, | |
2338 | the reply_body_max_size lines are processed, and the first line with | |
2339 | a result of "allow" is used as the maximum body size for this reply. | |
2340 | This size is then checked twice. First when we get the reply headers, | |
2341 | we check the content-length value. If the content length value exists | |
2342 | and is larger than the allowed size, the request is denied and the | |
2343 | user receives an error message that says "the request or reply | |
2344 | is too large." If there is no content-length, and the reply | |
2345 | size exceeds this limit, the client's connection is just closed | |
2346 | and they will receive a partial reply. | |
2347 | ||
2348 | WARNING: downstream caches probably can not detect a partial reply | |
2349 | if there is no content-length header, so they will cache | |
2350 | partial responses and give them out as hits. You should NOT | |
2351 | use this option if you have downstream caches. | |
2352 | ||
96d88dcb | 2353 | WARNING: A maximum size larger than the size of squid's error messages |
a560ee93 | 2354 | will cause an infinite loop and crash squid. Ensure that the smallest |
2355 | non-zero value you use is greater that the maximum header size plus | |
2356 | the size of your largest error page. | |
2357 | ||
2358 | If you set this parameter to zero (the default), there will be | |
2359 | no limit imposed. | |
2360 | DOC_END | |
2361 | ||
0f74202c | 2362 | COMMENT_START |
3a278cb8 | 2363 | ADMINISTRATIVE PARAMETERS |
2364 | ----------------------------------------------------------------------------- | |
0f74202c | 2365 | COMMENT_END |
934b03fc | 2366 | |
2367 | NAME: cache_mgr | |
2368 | TYPE: string | |
2369 | DEFAULT: webmaster | |
2370 | LOC: Config.adminEmail | |
2371 | DOC_START | |
2372 | Email-address of local cache manager who will receive | |
2373 | mail if the cache dies. The default is "webmaster." | |
934b03fc | 2374 | DOC_END |
2375 | ||
2376 | ||
2377 | NAME: cache_effective_user | |
0153d498 | 2378 | TYPE: string |
a95856a0 | 2379 | DEFAULT: nobody |
0153d498 | 2380 | LOC: Config.effectiveUser |
2381 | DOC_NONE | |
2382 | ||
2383 | NAME: cache_effective_group | |
2384 | TYPE: string | |
8749fa47 | 2385 | DEFAULT: none |
0153d498 | 2386 | LOC: Config.effectiveGroup |
934b03fc | 2387 | DOC_START |
5a3f6538 | 2388 | |
934b03fc | 2389 | If the cache is run as root, it will change its effective/real |
5a3f6538 | 2390 | UID/GID to the UID/GID specified below. The default is to |
8749fa47 | 2391 | change to UID to nobody and GID to the default group of nobody. |
5a3f6538 | 2392 | |
2393 | If Squid is not started as root, the default is to keep the | |
8749fa47 | 2394 | current UID/GID, and only the GID can be changed to any of |
2395 | the groups the user starting Squid is member of. Note that if | |
2396 | Squid is not started as root then you cannot set http_port to | |
2397 | a value lower than 1024. | |
934b03fc | 2398 | DOC_END |
2399 | ||
2400 | ||
2401 | NAME: visible_hostname | |
2402 | TYPE: string | |
2403 | LOC: Config.visibleHostname | |
f1dc9b30 | 2404 | DEFAULT: none |
934b03fc | 2405 | DOC_START |
2406 | If you want to present a special hostname in error messages, etc, | |
2407 | then define this. Otherwise, the return value of gethostname() | |
cf5cc17e | 2408 | will be used. If you have multiple caches in a cluster and |
2409 | get errors about IP-forwarding you must set them to have individual | |
2410 | names with this setting. | |
934b03fc | 2411 | DOC_END |
2412 | ||
98829f69 | 2413 | |
2414 | NAME: unique_hostname | |
2415 | TYPE: string | |
2416 | LOC: Config.uniqueHostname | |
2417 | DEFAULT: none | |
2418 | DOC_START | |
2419 | If you want to have multiple machines with the same | |
2420 | 'visible_hostname' then you must give each machine a different | |
2421 | 'unique_hostname' so that forwarding loops can be detected. | |
98829f69 | 2422 | DOC_END |
2423 | ||
1f38f50a | 2424 | |
2425 | NAME: hostname_aliases | |
2426 | TYPE: wordlist | |
2427 | LOC: Config.hostnameAliases | |
2428 | DEFAULT: none | |
2429 | DOC_START | |
2430 | A list of other DNS names that your cache has. | |
2431 | DOC_END | |
2432 | ||
0f74202c | 2433 | COMMENT_START |
3a278cb8 | 2434 | OPTIONS FOR THE CACHE REGISTRATION SERVICE |
2435 | ----------------------------------------------------------------------------- | |
934b03fc | 2436 | |
3a278cb8 | 2437 | This section contains parameters for the (optional) cache |
2438 | announcement service. This service is provided to help | |
2439 | cache administrators locate one another in order to join or | |
2440 | create cache hierarchies. | |
934b03fc | 2441 | |
3a278cb8 | 2442 | An 'announcement' message is sent (via UDP) to the registration |
efd900cb | 2443 | service by Squid. By default, the announcement message is NOT |
d2d631ce | 2444 | SENT unless you enable it with 'announce_period' below. |
3a278cb8 | 2445 | |
2446 | The announcement message includes your hostname, plus the | |
2447 | following information from this configuration file: | |
934b03fc | 2448 | |
3a278cb8 | 2449 | http_port |
2450 | icp_port | |
2451 | cache_mgr | |
2452 | ||
2453 | All current information is processed regularly and made | |
2b6662ba | 2454 | available on the Web at http://www.ircache.net/Cache/Tracker/. |
0f74202c | 2455 | COMMENT_END |
934b03fc | 2456 | |
f1dc9b30 | 2457 | NAME: announce_period |
2458 | TYPE: time_t | |
2459 | LOC: Config.Announce.period | |
d2d631ce | 2460 | DEFAULT: 0 |
934b03fc | 2461 | DOC_START |
d2d631ce | 2462 | This is how frequently to send cache announcements. The |
2463 | default is `0' which disables sending the announcement | |
2464 | messages. | |
934b03fc | 2465 | |
cd748f27 | 2466 | To enable announcing your cache, just uncomment the line |
2467 | below. | |
2468 | ||
6b53c392 | 2469 | NOCOMMENT_START |
2470 | #To enable announcing your cache, just uncomment the line below. | |
2471 | #announce_period 1 day | |
2472 | NOCOMMENT_END | |
934b03fc | 2473 | DOC_END |
2474 | ||
2475 | ||
f1dc9b30 | 2476 | NAME: announce_host |
2477 | TYPE: string | |
61735fcf | 2478 | DEFAULT: tracker.ircache.net |
f1dc9b30 | 2479 | LOC: Config.Announce.host |
2480 | DOC_NONE | |
2481 | ||
cf5cc17e | 2482 | NAME: announce_file |
2483 | TYPE: string | |
61735fcf | 2484 | DEFAULT: none |
cf5cc17e | 2485 | LOC: Config.Announce.file |
2486 | DOC_NONE | |
2487 | ||
f1dc9b30 | 2488 | NAME: announce_port |
2489 | TYPE: ushort | |
2490 | DEFAULT: 3131 | |
2491 | LOC: Config.Announce.port | |
934b03fc | 2492 | DOC_START |
d2d631ce | 2493 | announce_host and announce_port set the hostname and port |
2494 | number where the registration message will be sent. | |
934b03fc | 2495 | |
d2d631ce | 2496 | Hostname will default to 'tracker.ircache.net' and port will |
2497 | default default to 3131. If the 'filename' argument is given, | |
2498 | the contents of that file will be included in the announce | |
2499 | message. | |
934b03fc | 2500 | DOC_END |
2501 | ||
0f74202c | 2502 | COMMENT_START |
3a278cb8 | 2503 | HTTPD-ACCELERATOR OPTIONS |
2504 | ----------------------------------------------------------------------------- | |
0f74202c | 2505 | COMMENT_END |
934b03fc | 2506 | |
f1dc9b30 | 2507 | NAME: httpd_accel_host |
2508 | TYPE: string | |
2509 | LOC: Config.Accel.host | |
2510 | DEFAULT: none | |
2511 | DOC_NONE | |
2512 | ||
2513 | NAME: httpd_accel_port | |
2514 | TYPE: ushort | |
2515 | LOC: Config.Accel.port | |
5b68a4d3 | 2516 | DEFAULT: 80 |
934b03fc | 2517 | DOC_START |
cf5cc17e | 2518 | If you want to run Squid as an httpd accelerator, define the |
934b03fc | 2519 | host name and port number where the real HTTP server is. |
2520 | ||
2c10d62d | 2521 | If you want IP based virtual host support then specify the |
2522 | hostname as "virtual". This will make Squid use the IP address | |
2523 | where it accepted the request as hostname in the URL. | |
934b03fc | 2524 | |
42b51993 | 2525 | If you want virtual port support then specify the port as "0". |
2526 | ||
839491ad | 2527 | NOTE: enabling httpd_accel_host disables proxy-caching and |
2528 | ICP. If you want these features enabled also, then set | |
2529 | the 'httpd_accel_with_proxy' option. | |
934b03fc | 2530 | DOC_END |
2531 | ||
13c7936a | 2532 | NAME: httpd_accel_single_host |
2533 | COMMENT: on|off | |
2534 | TYPE: onoff | |
2535 | LOC: Config.Accel.single_host | |
b0a9b5f2 | 2536 | DEFAULT: off |
13c7936a | 2537 | DOC_START |
54bab452 | 2538 | If you are running Squid as an accelerator and have a single backend |
13c7936a | 2539 | server then set this to on. This causes Squid to forward the request |
2540 | to this server irregardles of what any redirectors or Host headers | |
2541 | says. | |
2542 | ||
b0a9b5f2 | 2543 | Leave this at off if you have multiple backend servers, and use a |
2544 | redirector (or host table or private DNS) to map the requests to the | |
13c7936a | 2545 | appropriate backend servers. Note that the mapping needs to be a |
2546 | 1-1 mapping between requested and backend (from redirector) domain | |
2547 | names or caching will fail, as cacing is performed using the | |
2548 | URL returned from the redirector. | |
2549 | ||
2550 | See also redirect_rewrites_host_header. | |
2551 | DOC_END | |
934b03fc | 2552 | |
2553 | NAME: httpd_accel_with_proxy | |
2554 | COMMENT: on|off | |
2555 | TYPE: onoff | |
f1dc9b30 | 2556 | DEFAULT: off |
17a0a4ee | 2557 | LOC: Config.onoff.accel_with_proxy |
934b03fc | 2558 | DOC_START |
cf5cc17e | 2559 | If you want to use Squid as both a local httpd accelerator |
6b53c392 | 2560 | and as a proxy, change this to 'on'. Note however that your |
2561 | proxy users may have trouble to reach the accelerated domains | |
2562 | unless their browsers are configured not to use this proxy for | |
2563 | those domains (for example via the no_proxy browser configuration | |
2564 | setting) | |
934b03fc | 2565 | DOC_END |
2566 | ||
934b03fc | 2567 | NAME: httpd_accel_uses_host_header |
2568 | COMMENT: on|off | |
2569 | TYPE: onoff | |
f1dc9b30 | 2570 | DEFAULT: off |
934b03fc | 2571 | LOC: opt_accel_uses_host |
2572 | DOC_START | |
2573 | HTTP/1.1 requests include a Host: header which is basically the | |
2c10d62d | 2574 | hostname from the URL. The Host: header is used for domain based |
2575 | virutal hosts. If your accelerator needs to provide domain based | |
2576 | virtual hosts on the same IP address then you will need to turn this | |
2577 | on. | |
2578 | ||
2579 | Note that Squid does NOT check the value of the Host header matches | |
2580 | any of your accelerated server, so it may open a big security hole | |
2581 | unless you take care to set up access controls proper. We recommend | |
2582 | that this option remain disabled unless you are sure of what you | |
2583 | are doing. | |
934b03fc | 2584 | |
04f6f348 | 2585 | However, you will need to enable this option if you run Squid |
2586 | as a transparent proxy. Otherwise, virtual servers which | |
2587 | require the Host: header will not be properly cached. | |
934b03fc | 2588 | DOC_END |
2589 | ||
0f74202c | 2590 | COMMENT_START |
3a278cb8 | 2591 | MISCELLANEOUS |
2592 | ----------------------------------------------------------------------------- | |
0f74202c | 2593 | COMMENT_END |
934b03fc | 2594 | |
2595 | NAME: dns_testnames | |
2596 | TYPE: wordlist | |
2597 | LOC: Config.dns_testname_list | |
f1dc9b30 | 2598 | DEFAULT: none |
6b53c392 | 2599 | DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com |
934b03fc | 2600 | DOC_START |
2601 | The DNS tests exit as soon as the first site is successfully looked up | |
2602 | ||
6b53c392 | 2603 | This test can be disabled with the -D command line option. |
934b03fc | 2604 | DOC_END |
2605 | ||
2606 | ||
2607 | NAME: logfile_rotate | |
2608 | TYPE: int | |
2609 | DEFAULT: 10 | |
2610 | LOC: Config.Log.rotateNumber | |
2611 | DOC_START | |
5a3f6538 | 2612 | Specifies the number of logfile rotations to make when you |
2613 | type 'squid -k rotate'. The default is 10, which will rotate | |
cf5cc17e | 2614 | with extensions 0 through 9. Setting logfile_rotate to 0 will |
934b03fc | 2615 | disable the rotation, but the logfiles are still closed and |
cf5cc17e | 2616 | re-opened. This will enable you to rename the logfiles |
5a3f6538 | 2617 | yourself just before sending the rotate signal. |
2618 | ||
2619 | Note, the 'squid -k rotate' command normally sends a USR1 | |
2620 | signal to the running squid process. In certain situations | |
2621 | (e.g. on Linux with Async I/O), USR1 is used for other | |
2622 | purposes, so -k rotate uses another signal. It is best to get | |
2623 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
2624 | <pid>'. | |
934b03fc | 2625 | DOC_END |
2626 | ||
2627 | ||
2628 | NAME: append_domain | |
f1dc9b30 | 2629 | TYPE: string |
2630 | LOC: Config.appendDomain | |
2631 | DEFAULT: none | |
934b03fc | 2632 | DOC_START |
cf5cc17e | 2633 | Appends local domain name to hostnames without any dots in |
2634 | them. append_domain must begin with a period. | |
934b03fc | 2635 | |
cd98395a | 2636 | Be warned that there today is Internet names with no dots in |
2637 | them using only top-domain names, so setting this may | |
2638 | cause some Internet sites to become unavailable. | |
2639 | ||
6b53c392 | 2640 | Example: |
2641 | append_domain .yourdomain.com | |
934b03fc | 2642 | DOC_END |
2643 | ||
2644 | ||
2645 | NAME: tcp_recv_bufsize | |
89de058c | 2646 | COMMENT: (bytes) |
1b635117 | 2647 | TYPE: b_size_t |
89de058c | 2648 | DEFAULT: 0 bytes |
934b03fc | 2649 | LOC: Config.tcpRcvBufsz |
2650 | DOC_START | |
2651 | Size of receive buffer to set for TCP sockets. Probably just | |
2652 | as easy to change your kernel's default. Set to zero to use | |
2653 | the default buffer size. | |
934b03fc | 2654 | DOC_END |
2655 | ||
934b03fc | 2656 | NAME: err_html_text |
f1dc9b30 | 2657 | TYPE: eol |
2658 | LOC: Config.errHtmlText | |
2659 | DEFAULT: none | |
934b03fc | 2660 | DOC_START |
2661 | HTML text to include in error messages. Make this a "mailto" | |
2662 | URL to your admin address, or maybe just a link to your | |
2663 | organizations Web page. | |
2664 | ||
ab1e6b8a | 2665 | To include this in your error messages, you must rewrite |
2666 | the error template files (found in the "errors" directory). | |
2667 | Wherever you want the 'err_html_text' line to appear, | |
2668 | insert a %L tag in the error template file. | |
934b03fc | 2669 | DOC_END |
2670 | ||
2671 | ||
2672 | NAME: deny_info | |
2673 | TYPE: denyinfo | |
2674 | LOC: Config.denyInfoList | |
f1dc9b30 | 2675 | DEFAULT: none |
934b03fc | 2676 | DOC_START |
02922e76 | 2677 | Usage: deny_info err_page_name acl |
76cdc28d | 2678 | or deny_info http://... acl |
02922e76 | 2679 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys |
934b03fc | 2680 | |
02922e76 | 2681 | This can be used to return a ERR_ page for requests which |
934b03fc | 2682 | do not pass the 'http_access' rules. A single ACL will cause |
2683 | the http_access check to fail. If a 'deny_info' line exists | |
02922e76 | 2684 | for that ACL then Squid returns a corresponding error page. |
cf5cc17e | 2685 | |
02922e76 | 2686 | You may use ERR_ pages that come with Squid or create your own pages |
2687 | and put them into the configured errors/ directory. | |
76cdc28d | 2688 | |
2689 | Alternatively you can specify an error URL. The browsers will then | |
2690 | get redirected (302) to the specified URL. %s in the redirection | |
2691 | URL will be replaced by the requested URL. | |
2692 | ||
2693 | Alternatively you can tell Squid to reset the TCP connection | |
2694 | by specifying TCP_RESET. | |
934b03fc | 2695 | DOC_END |
2696 | ||
934b03fc | 2697 | NAME: memory_pools |
2698 | COMMENT: on|off | |
2699 | TYPE: onoff | |
f1dc9b30 | 2700 | DEFAULT: on |
3f6c0fb2 | 2701 | LOC: Config.onoff.mem_pools |
934b03fc | 2702 | DOC_START |
2703 | If set, Squid will keep pools of allocated (but unused) memory | |
2704 | available for future use. If memory is a premium on your | |
96d88dcb | 2705 | system and you believe your malloc library outperforms Squid |
d0d41f07 | 2706 | routines, disable this. |
934b03fc | 2707 | DOC_END |
2708 | ||
7021844c | 2709 | NAME: memory_pools_limit |
2710 | COMMENT: (bytes) | |
2711 | TYPE: b_size_t | |
2712 | DEFAULT: none | |
f12c295b | 2713 | LOC: Config.MemPools.limit |
7021844c | 2714 | DOC_START |
f12c295b | 2715 | Used only with memory_pools on: |
2716 | memory_pools_limit 50 MB | |
7021844c | 2717 | |
f12c295b | 2718 | If set to a non-zero value, Squid will keep at most the specified |
2719 | limit of allocated (but unused) memory in memory pools. All free() | |
2720 | requests that exceed this limit will be handled by your malloc | |
2721 | library. Squid does not pre-allocate any memory, just safe-keeps | |
2722 | objects that otherwise would be free()d. Thus, it is safe to set | |
7021844c | 2723 | memory_pools_limit to a reasonably high value even if your |
f12c295b | 2724 | configuration will use less memory. |
2725 | ||
2726 | If not set (default) or set to zero, Squid will keep all memory it | |
2727 | can. That is, there will be no limit on the total amount of memory | |
2728 | used for safe-keeping. | |
7021844c | 2729 | |
2730 | To disable memory allocation optimization, do not set | |
2731 | memory_pools_limit to 0. Set memory_pools to "off" instead. | |
2732 | ||
f12c295b | 2733 | An overhead for maintaining memory pools is not taken into account |
2734 | when the limit is checked. This overhead is close to four bytes per | |
2735 | object kept. However, pools may actually _save_ memory because of | |
2736 | reduced memory thrashing in your malloc library. | |
7021844c | 2737 | DOC_END |
2738 | ||
934b03fc | 2739 | NAME: forwarded_for |
2740 | COMMENT: on|off | |
2741 | TYPE: onoff | |
f1dc9b30 | 2742 | DEFAULT: on |
934b03fc | 2743 | LOC: opt_forwarded_for |
2744 | DOC_START | |
2745 | If set, Squid will include your system's IP address or name | |
2746 | in the HTTP requests it forwards. By default it looks like | |
2747 | this: | |
2748 | ||
2749 | X-Forwarded-For: 192.1.2.3 | |
2750 | ||
2751 | If you disable this, it will appear as | |
2752 | ||
2753 | X-Forwarded-For: unknown | |
934b03fc | 2754 | DOC_END |
2755 | ||
2756 | NAME: log_icp_queries | |
2757 | COMMENT: on|off | |
2758 | TYPE: onoff | |
f1dc9b30 | 2759 | DEFAULT: on |
17a0a4ee | 2760 | LOC: Config.onoff.log_udp |
934b03fc | 2761 | DOC_START |
cf5cc17e | 2762 | If set, ICP queries are logged to access.log. You may wish |
2763 | do disable this if your ICP load is VERY high to speed things | |
2764 | up or to simplify log analysis. | |
934b03fc | 2765 | DOC_END |
2766 | ||
88738790 | 2767 | NAME: icp_hit_stale |
2768 | COMMENT: on|off | |
2769 | TYPE: onoff | |
2770 | DEFAULT: off | |
17a0a4ee | 2771 | LOC: Config.onoff.icp_hit_stale |
88738790 | 2772 | DOC_START |
2773 | If you want to return ICP_HIT for stale cache objects, set this | |
2774 | option to 'on'. If you have sibling relationships with caches | |
2775 | in other administrative domains, this should be 'off'. If you only | |
2776 | have sibling relationships with caches under your control, then | |
2777 | it is probably okay to set this to 'on'. | |
0ccdf88e | 2778 | If set to 'on', then your siblings should use the option "allow-miss" |
2779 | on their cache_peer lines for connecting to you. | |
88738790 | 2780 | DOC_END |
2781 | ||
934b03fc | 2782 | |
2783 | NAME: minimum_direct_hops | |
2784 | TYPE: int | |
2785 | DEFAULT: 4 | |
2786 | LOC: Config.minDirectHops | |
2787 | DOC_START | |
2788 | If using the ICMP pinging stuff, do direct fetches for sites | |
2789 | which are no more than this many hops away. | |
934b03fc | 2790 | DOC_END |
2791 | ||
5f84d830 | 2792 | NAME: minimum_direct_rtt |
2793 | TYPE: int | |
2794 | DEFAULT: 400 | |
2795 | LOC: Config.minDirectRtt | |
2796 | DOC_START | |
2797 | If using the ICMP pinging stuff, do direct fetches for sites | |
2798 | which are no more than this many rtt milliseconds away. | |
2799 | DOC_END | |
934b03fc | 2800 | |
2801 | NAME: cachemgr_passwd | |
2802 | TYPE: cachemgrpasswd | |
86101e40 | 2803 | DEFAULT: none |
f1dc9b30 | 2804 | LOC: Config.passwd_list |
934b03fc | 2805 | DOC_START |
2806 | Specify passwords for cachemgr operations. | |
2807 | ||
2808 | Usage: cachemgr_passwd password action action ... | |
2809 | ||
064a674d | 2810 | Some valid actions are (see cache manager menu for a full list): |
2811 | 5min | |
2812 | 60min | |
2813 | asndb | |
2814 | authenticator | |
2815 | cbdata | |
2816 | client_list | |
2817 | comm_incoming | |
2818 | config * | |
2819 | counters | |
2820 | delay | |
2821 | digest_stats | |
cf5cc17e | 2822 | dns |
064a674d | 2823 | events |
cf5cc17e | 2824 | filedescriptors |
064a674d | 2825 | fqdncache |
2826 | histograms | |
2827 | http_headers | |
2828 | info | |
2829 | io | |
2830 | ipcache | |
2831 | mem | |
2832 | menu | |
cf5cc17e | 2833 | netdb |
064a674d | 2834 | non_peers |
2835 | objects | |
2836 | pconn | |
2837 | peer_select | |
2838 | redirector | |
2839 | refresh | |
934b03fc | 2840 | server_list |
064a674d | 2841 | shutdown * |
2842 | store_digest | |
2843 | storedir | |
2844 | utilization | |
2845 | via_headers | |
2846 | vm_objects | |
934b03fc | 2847 | |
2848 | * Indicates actions which will not be performed without a | |
2849 | valid password, others can be performed if not listed here. | |
2850 | ||
2851 | To disable an action, set the password to "disable". | |
2852 | To allow performing an action without a password, set the | |
2853 | password to "none". | |
2854 | ||
2855 | Use the keyword "all" to set the same password for all actions. | |
2856 | ||
6b53c392 | 2857 | Example: |
2858 | cachemgr_passwd secret shutdown | |
2859 | cachemgr_passwd lesssssssecret info stats/objects | |
2860 | cachemgr_passwd disable all | |
934b03fc | 2861 | DOC_END |
2862 | ||
934b03fc | 2863 | NAME: store_avg_object_size |
86101e40 | 2864 | COMMENT: (kbytes) |
2865 | TYPE: kb_size_t | |
2bf99296 | 2866 | DEFAULT: 13 KB |
934b03fc | 2867 | LOC: Config.Store.avgObjectSize |
2868 | DOC_START | |
2869 | Average object size, used to estimate number of objects your | |
2870 | cache can hold. See doc/Release-Notes-1.1.txt. The default is | |
2bf99296 | 2871 | 13 KB. |
934b03fc | 2872 | DOC_END |
2873 | ||
2874 | NAME: store_objects_per_bucket | |
2875 | TYPE: int | |
baf144ad | 2876 | DEFAULT: 20 |
934b03fc | 2877 | LOC: Config.Store.objectsPerBucket |
2878 | DOC_START | |
2879 | Target number of objects per bucket in the store hash table. | |
2880 | Lowering this value increases the total number of buckets and | |
7e3ce7b9 | 2881 | also the storage maintenance rate. The default is 50. |
934b03fc | 2882 | DOC_END |
2883 | ||
934b03fc | 2884 | NAME: client_db |
2885 | COMMENT: on|off | |
2886 | TYPE: onoff | |
f1dc9b30 | 2887 | DEFAULT: on |
17a0a4ee | 2888 | LOC: Config.onoff.client_db |
934b03fc | 2889 | DOC_START |
2890 | If you want to disable collecting per-client statistics, then | |
2891 | turn off client_db here. | |
934b03fc | 2892 | DOC_END |
2893 | ||
2894 | ||
2895 | NAME: netdb_low | |
2896 | TYPE: int | |
2897 | DEFAULT: 900 | |
2898 | LOC: Config.Netdb.low | |
2899 | DOC_NONE | |
2900 | ||
2901 | NAME: netdb_high | |
2902 | TYPE: int | |
2903 | DEFAULT: 1000 | |
2904 | LOC: Config.Netdb.high | |
2905 | DOC_START | |
2906 | The low and high water marks for the ICMP measurement | |
2907 | database. These are counts, not percents. The defaults are | |
2908 | 900 and 1000. When the high water mark is reached, database | |
2909 | entries will be deleted until the low mark is reached. | |
934b03fc | 2910 | DOC_END |
2911 | ||
2912 | ||
2913 | NAME: netdb_ping_period | |
f1dc9b30 | 2914 | TYPE: time_t |
934b03fc | 2915 | LOC: Config.Netdb.period |
9e975e4e | 2916 | DEFAULT: 5 minutes |
934b03fc | 2917 | DOC_START |
2918 | The minimum period for measuring a site. There will be at | |
2919 | least this much delay between successive pings to the same | |
2920 | network. The default is five minutes. | |
934b03fc | 2921 | DOC_END |
2922 | ||
2923 | ||
2924 | NAME: query_icmp | |
2925 | COMMENT: on|off | |
2926 | TYPE: onoff | |
f1dc9b30 | 2927 | DEFAULT: off |
17a0a4ee | 2928 | LOC: Config.onoff.query_icmp |
934b03fc | 2929 | DOC_START |
2930 | If you want to ask your peers to include ICMP data in their ICP | |
2931 | replies, enable this option. | |
2932 | ||
cf5cc17e | 2933 | If your peer has configured Squid (during compilation) with |
2934 | '--enable-icmp' then that peer will send ICMP pings to origin server | |
2935 | sites of the URLs it receives. If you enable this option then the | |
2936 | ICP replies from that peer will include the ICMP data (if available). | |
2937 | Then, when choosing a parent cache, Squid will choose the parent with | |
934b03fc | 2938 | the minimal RTT to the origin server. When this happens, the |
2939 | hierarchy field of the access.log will be | |
2940 | "CLOSEST_PARENT_MISS". This option is off by default. | |
934b03fc | 2941 | DOC_END |
2942 | ||
88500f96 | 2943 | NAME: test_reachability |
194dd3b8 | 2944 | COMMENT: on|off |
2945 | TYPE: onoff | |
2946 | DEFAULT: off | |
2947 | LOC: Config.onoff.test_reachability | |
2948 | DOC_START | |
2949 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
2950 | instead of ICP_MISS if the target host is NOT in the ICMP | |
2951 | database, or has a zero RTT. | |
194dd3b8 | 2952 | DOC_END |
2953 | ||
78f1250a | 2954 | NAME: buffered_logs |
2955 | COMMENT: on|off | |
2956 | TYPE: onoff | |
2957 | DEFAULT: off | |
17a0a4ee | 2958 | LOC: Config.onoff.buffered_logs |
78f1250a | 2959 | DOC_START |
3d44788b | 2960 | cache.log log file is written with stdio functions, and as such |
2961 | it can be buffered or unbuffered. By default it will be unbuffered. | |
2962 | Buffering it can speed up the writing slightly (though you are | |
2963 | unlikely to need to worry unless you run with tons of debugging | |
2964 | enabled in which case performance will suffer badly anyway..). | |
78f1250a | 2965 | DOC_END |
2966 | ||
465dc415 | 2967 | NAME: reload_into_ims |
9f60cfdf | 2968 | IFDEF: HTTP_VIOLATIONS |
465dc415 | 2969 | COMMENT: on|off |
2970 | TYPE: onoff | |
2971 | DEFAULT: off | |
2972 | LOC: Config.onoff.reload_into_ims | |
2973 | DOC_START | |
2974 | When you enable this option, client no-cache or ``reload'' | |
2975 | requests will be changed to If-Modified-Since requests. | |
2976 | Doing this VIOLATES the HTTP standard. Enabling this | |
2977 | feature could make you liable for problems which it | |
2978 | causes. | |
cbe3a719 | 2979 | |
2980 | see also refresh_pattern for a more selective approach. | |
465dc415 | 2981 | DOC_END |
2982 | ||
934b03fc | 2983 | NAME: always_direct |
2984 | TYPE: acl_access | |
2985 | LOC: Config.accessList.AlwaysDirect | |
f1dc9b30 | 2986 | DEFAULT: none |
934b03fc | 2987 | DOC_START |
2a78fa67 | 2988 | Usage: always_direct allow|deny [!]aclname ... |
2989 | ||
2990 | Here you can use ACL elements to specify requests which should | |
3445a83a | 2991 | ALWAYS be forwarded directly to origin servers. For example, |
2992 | to always directly forward requests for local servers use | |
2a78fa67 | 2993 | something like: |
2994 | ||
2995 | acl local-servers dstdomain my.domain.net | |
2996 | always_direct allow local-servers | |
2997 | ||
2998 | To always forward FTP requests directly, use | |
2999 | ||
3000 | acl FTP proto FTP | |
3001 | always_direct allow FTP | |
3002 | ||
3003 | NOTE: There is a similar, but opposite option named | |
3004 | 'never_direct'. You need to be aware that "always_direct deny | |
3005 | foo" is NOT the same thing as "never_direct allow foo". You | |
3006 | may need to use a deny rule to exclude a more-specific case of | |
3007 | some other rule. Example: | |
3008 | ||
3009 | acl local-external dstdomain external.foo.net | |
5d8ea528 | 3010 | acl local-servers dstdomain .foo.net |
2a78fa67 | 3011 | always_direct deny local-external |
3012 | always_direct allow local-servers | |
3445a83a | 3013 | |
3014 | This option replaces some v1.1 options such as local_domain | |
3015 | and local_ip. | |
934b03fc | 3016 | DOC_END |
3017 | ||
3018 | NAME: never_direct | |
3019 | TYPE: acl_access | |
3020 | LOC: Config.accessList.NeverDirect | |
f1dc9b30 | 3021 | DEFAULT: none |
934b03fc | 3022 | DOC_START |
d0d41f07 | 3023 | Usage: never_direct allow|deny [!]aclname ... |
2a78fa67 | 3024 | |
3025 | never_direct is the opposite of always_direct. Please read | |
3026 | the description for always_direct if you have not already. | |
934b03fc | 3027 | |
2a78fa67 | 3028 | With 'never_direct' you can use ACL elements to specify |
3029 | requests which should NEVER be forwarded directly to origin | |
3445a83a | 3030 | servers. For example, to force the use of a proxy for all |
3031 | requests, except those in your local domain use something like: | |
2a78fa67 | 3032 | |
5d8ea528 | 3033 | acl local-servers dstdomain .foo.net |
2a78fa67 | 3034 | acl all src 0.0.0.0/0.0.0.0 |
d0d41f07 | 3035 | never_direct deny local-servers |
3036 | never_direct allow all | |
3445a83a | 3037 | |
3038 | or if squid is inside a firewall and there is local intranet | |
3039 | servers inside the firewall then use something like: | |
3040 | ||
5d8ea528 | 3041 | acl local-intranet dstdomain .foo.net |
3445a83a | 3042 | acl local-external dstdomain external.foo.net |
3043 | always_direct deny local-external | |
3044 | always_direct allow local-intranet | |
3045 | never_direct allow all | |
3046 | ||
3047 | This option replaces some v1.1 options such as inside_firewall | |
3048 | and firewall_ip. | |
2a78fa67 | 3049 | DOC_END |
934b03fc | 3050 | |
6bccf575 | 3051 | NAME: header_access |
3052 | TYPE: http_header_access[] | |
3053 | LOC: Config.header_access | |
97474590 | 3054 | DEFAULT: none |
3055 | DOC_START | |
6bccf575 | 3056 | Usage: header_access header_name allow|deny [!]aclname ... |
96d88dcb | 3057 | |
6bccf575 | 3058 | This option replaces the old 'anonymize_headers' and the |
3059 | older 'http_anonymizer' option with something that is much | |
3060 | more configurable. This new method creates a list of ACLs | |
3061 | for each header, allowing you very fine-tuned header | |
3062 | mangling. | |
3063 | ||
3064 | You can only specify known headers for the header name. | |
3065 | Other headers are reclassified as 'Other'. You can also | |
3066 | refer to all the headers with 'All'. | |
96d88dcb | 3067 | |
6bccf575 | 3068 | For example, to achieve the same behaviour as the old |
5bcad01d | 3069 | 'http_anonymizer standard' option, you should use: |
96d88dcb | 3070 | |
6bccf575 | 3071 | header_access From deny all |
3072 | header_access Referer deny all | |
3073 | header_access Server deny all | |
3074 | header_access User-Agent deny all | |
3075 | header_access WWW-Authenticate deny all | |
3076 | header_access Link deny all | |
97474590 | 3077 | |
5bcad01d | 3078 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
3079 | you should use: | |
96d88dcb | 3080 | |
6bccf575 | 3081 | header_access Allow allow all |
3082 | header_access Authorization allow all | |
3083 | header_access Cache-Control allow all | |
3084 | header_access Content-Encoding allow all | |
3085 | header_access Content-Length allow all | |
3086 | header_access Content-Type allow all | |
3087 | header_access Date allow all | |
3088 | header_access Expires allow all | |
3089 | header_access Host allow all | |
3090 | header_access If-Modified-Since allow all | |
3091 | header_access Last-Modified allow all | |
3092 | header_access Location allow all | |
3093 | header_access Pragma allow all | |
3094 | header_access Accept allow all | |
3095 | header_access Charset allow all | |
3096 | header_access Accept-Encoding allow all | |
3097 | header_access Accept-Language allow all | |
3098 | header_access Content-Language allow all | |
3099 | header_access Mime-Version allow all | |
3100 | header_access Retry-After allow all | |
3101 | header_access Title allow all | |
3102 | header_access Connection allow all | |
3103 | header_access Proxy-Connection allow all | |
3104 | header_access All deny all | |
96d88dcb | 3105 | |
5bcad01d | 3106 | By default, all headers are allowed (no anonymizing is |
3107 | performed). | |
97474590 | 3108 | DOC_END |
3109 | ||
6bccf575 | 3110 | NAME: header_replace |
3111 | TYPE: http_header_replace[] | |
3112 | LOC: Config.header_access | |
88738790 | 3113 | DEFAULT: none |
3114 | DOC_START | |
6bccf575 | 3115 | Usage: header_replace header_name message |
3116 | Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
96d88dcb | 3117 | |
6bccf575 | 3118 | This option allows you to change the contents of headers |
3119 | denied with header_access above, by replacing them with | |
3120 | some fixed string. This replaces the old fake_user_agent | |
3121 | option. | |
96d88dcb | 3122 | |
6bccf575 | 3123 | By default, headers are removed if denied. |
88738790 | 3124 | DOC_END |
3125 | ||
365cb147 | 3126 | NAME: icon_directory |
f0b19334 | 3127 | TYPE: string |
365cb147 | 3128 | LOC: Config.icons.directory |
3129 | DEFAULT: @DEFAULT_ICON_DIR@ | |
3130 | DOC_START | |
cf5cc17e | 3131 | Where the icons are stored. These are normally kept in |
3132 | @DEFAULT_ICON_DIR@ | |
365cb147 | 3133 | DOC_END |
3134 | ||
cf5cc17e | 3135 | NAME: error_directory |
365cb147 | 3136 | TYPE: string |
cf5cc17e | 3137 | LOC: Config.errorDirectory |
3138 | DEFAULT: @DEFAULT_ERROR_DIR@ | |
365cb147 | 3139 | DOC_START |
cf5cc17e | 3140 | If you wish to create your own versions of the default |
efd900cb | 3141 | (English) error files, either to customize them to suit your |
3142 | language or company copy the template English files to another | |
cf5cc17e | 3143 | directory and point this tag at them. |
365cb147 | 3144 | DOC_END |
88738790 | 3145 | |
22c653cd | 3146 | NAME: minimum_retry_timeout |
3147 | COMMENT: (seconds) | |
3148 | TYPE: time_t | |
3149 | LOC: Config.retry.timeout | |
3150 | DEFAULT: 5 seconds | |
3151 | DOC_START | |
3152 | This specifies the minimum connect timeout, for when the | |
3153 | connect timeout is reduced to compensate for the availability | |
3154 | of multiple IP addresses. | |
3155 | ||
cf5cc17e | 3156 | When a connection to a host is initiated, and that host has |
3157 | several IP addresses, the default connection timeout is reduced | |
3158 | by dividing it by the number of addresses. So, a site with 15 | |
3159 | addresses would then have a timeout of 8 seconds for each | |
3160 | address attempted. To avoid having the timeout reduced to the | |
3161 | point where even a working host would not have a chance to | |
3162 | respond, this setting is provided. The default, and the | |
3163 | minimum value, is five seconds, and the maximum value is sixty | |
3164 | seconds, or half of connect_timeout, whichever is greater and | |
3165 | less than connect_timeout. | |
22c653cd | 3166 | DOC_END |
3167 | ||
3168 | NAME: maximum_single_addr_tries | |
3169 | TYPE: int | |
3170 | LOC: Config.retry.maxtries | |
3171 | DEFAULT: 3 | |
3172 | DOC_START | |
3173 | This sets the maximum number of connection attempts for a | |
3174 | host that only has one address (for multiple-address hosts, | |
3175 | each address is tried once). | |
3176 | ||
3177 | The default value is three tries, the (not recommended) | |
3178 | maximum is 255 tries. A warning message will be generated | |
3179 | if it is set to a value greater than ten. | |
22c653cd | 3180 | DOC_END |
6d1c0d53 | 3181 | |
a97cfa48 | 3182 | NAME: snmp_port |
3183 | TYPE: ushort | |
3184 | LOC: Config.Port.snmp | |
3185 | DEFAULT: 3401 | |
1df370e3 | 3186 | IFDEF: SQUID_SNMP |
a97cfa48 | 3187 | DOC_START |
cf5cc17e | 3188 | Squid can now serve statistics and status information via SNMP. |
3189 | By default it listens to port 3401 on the machine. If you don't | |
9bc73deb | 3190 | wish to use SNMP, set this to "0". |
a97cfa48 | 3191 | DOC_END |
3192 | ||
dba79ac5 | 3193 | NAME: snmp_access |
3194 | TYPE: acl_access | |
3195 | LOC: Config.accessList.snmp | |
a97cfa48 | 3196 | DEFAULT: none |
6502682e | 3197 | DEFAULT_IF_NONE: deny all |
1df370e3 | 3198 | IFDEF: SQUID_SNMP |
a97cfa48 | 3199 | DOC_START |
dba79ac5 | 3200 | Allowing or denying access to the SNMP port. |
08f6b5e0 | 3201 | |
3202 | All access to the agent is denied by default. | |
dba79ac5 | 3203 | usage: |
4feb7b2e | 3204 | |
dba79ac5 | 3205 | snmp_access allow|deny [!]aclname ... |
08f6b5e0 | 3206 | |
3207 | Example: | |
6b53c392 | 3208 | snmp_access allow snmppublic localhost |
3209 | snmp_access deny all | |
bdf18524 | 3210 | DOC_END |
3211 | ||
15dcc168 | 3212 | NAME: snmp_incoming_address |
3213 | TYPE: address | |
1ecaa0a0 | 3214 | LOC: Config.Addrs.snmp_incoming |
15dcc168 | 3215 | DEFAULT: 0.0.0.0 |
3216 | IFDEF: SQUID_SNMP | |
3217 | DOC_NONE | |
3218 | NAME: snmp_outgoing_address | |
3219 | TYPE: address | |
3220 | LOC: Config.Addrs.snmp_outgoing | |
3221 | DEFAULT: 255.255.255.255 | |
3222 | IFDEF: SQUID_SNMP | |
3223 | DOC_START | |
3224 | Just like 'udp_incoming_address' above, but for the SNMP port. | |
3225 | ||
3226 | snmp_incoming_address is used for the SNMP socket receiving | |
3227 | messages from SNMP agents. | |
3228 | snmp_outgoing_address is used for SNMP packets returned to SNMP | |
3229 | agents. | |
3230 | ||
6b53c392 | 3231 | The default snmp_incoming_address (0.0.0.0) is to listen on all |
3232 | available network interfaces. | |
15dcc168 | 3233 | |
6b53c392 | 3234 | If snmp_outgoing_address is set to 255.255.255.255 (the default) |
3235 | then it will use the same socket as snmp_incoming_address. Only | |
3236 | change this if you want to have SNMP replies sent using another | |
3237 | address than where this Squid listens for SNMP queries. | |
15dcc168 | 3238 | |
6b53c392 | 3239 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have |
3240 | the same value since they both use port 3401. | |
15dcc168 | 3241 | DOC_END |
bdf18524 | 3242 | |
53ad48e6 | 3243 | NAME: as_whois_server |
3244 | TYPE: string | |
3245 | LOC: Config.as_whois_server | |
3246 | DEFAULT: whois.ra.net | |
3247 | DEFAULT_IF_NONE: whois.ra.net | |
3248 | DOC_START | |
cf5cc17e | 3249 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
3250 | queried only when Squid starts up, not for every request. | |
53ad48e6 | 3251 | DOC_END |
95e36d02 | 3252 | |
320e9f36 | 3253 | NAME: wccp_router |
3254 | TYPE: address | |
3255 | LOC: Config.Wccp.router | |
3256 | DEFAULT: 0.0.0.0 | |
eb824054 | 3257 | IFDEF: USE_WCCP |
320e9f36 | 3258 | DOC_START |
efd900cb | 3259 | Use this option to define your WCCP ``home'' router for |
3260 | Squid. Setting the 'wccp_router' to 0.0.0.0 (the default) | |
3261 | disables WCCP. | |
320e9f36 | 3262 | DOC_END |
3263 | ||
d20b1cd0 | 3264 | NAME: wccp_version |
3265 | TYPE: int | |
3266 | LOC: Config.Wccp.version | |
3267 | DEFAULT: 4 | |
3268 | IFDEF: USE_WCCP | |
3269 | DOC_START | |
3270 | According to some users, Cisco IOS 11.2 only supports WCCP | |
3271 | version 3. If you're using that version of IOS, change | |
3272 | this value to 3. | |
3273 | DOC_END | |
3274 | ||
320e9f36 | 3275 | NAME: wccp_incoming_address |
3276 | TYPE: address | |
eb824054 | 3277 | LOC: Config.Wccp.incoming |
320e9f36 | 3278 | DEFAULT: 0.0.0.0 |
eb824054 | 3279 | IFDEF: USE_WCCP |
320e9f36 | 3280 | DOC_NONE |
3281 | NAME: wccp_outgoing_address | |
3282 | TYPE: address | |
eb824054 | 3283 | LOC: Config.Wccp.outgoing |
320e9f36 | 3284 | DEFAULT: 255.255.255.255 |
eb824054 | 3285 | IFDEF: USE_WCCP |
320e9f36 | 3286 | DOC_START |
efd900cb | 3287 | wccp_incoming_address Use this option if you require WCCP |
3288 | messages to be received on only one | |
3289 | interface. Do NOT use this option if | |
3290 | you're unsure how many interfaces you | |
3291 | have, or if you know you have only one | |
3292 | interface. | |
320e9f36 | 3293 | |
efd900cb | 3294 | wccp_outgoing_address Use this option if you require WCCP |
3295 | messages to be sent out on only one | |
3296 | interface. Do NOT use this option if | |
3297 | you're unsure how many interfaces you | |
3298 | have, or if you know you have only one | |
3299 | interface. | |
320e9f36 | 3300 | |
efd900cb | 3301 | The default behavior is to not bind to any specific address. |
320e9f36 | 3302 | |
3303 | NOTE, wccp_incoming_address and wccp_outgoing_address can not have | |
3304 | the same value since they both use port 2048. | |
320e9f36 | 3305 | DOC_END |
3306 | ||
3307 | ||
95e36d02 | 3308 | COMMENT_START |
3309 | DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option) | |
3310 | ----------------------------------------------------------------------------- | |
95e36d02 | 3311 | COMMENT_END |
3312 | ||
59715b38 | 3313 | NAME: delay_pools |
3314 | TYPE: delay_pool_count | |
3315 | DEFAULT: 0 | |
95e36d02 | 3316 | IFDEF: DELAY_POOLS |
59715b38 | 3317 | LOC: Config.Delay |
95e36d02 | 3318 | DOC_START |
59715b38 | 3319 | This represents the number of delay pools to be used. For example, |
3320 | if you have one class 2 delay pool and one class 3 delays pool, you | |
3321 | have a total of 2 delay pools. | |
95e36d02 | 3322 | DOC_END |
3323 | ||
59715b38 | 3324 | NAME: delay_class |
3325 | TYPE: delay_pool_class | |
95e36d02 | 3326 | DEFAULT: none |
3327 | IFDEF: DELAY_POOLS | |
59715b38 | 3328 | LOC: Config.Delay |
95e36d02 | 3329 | DOC_START |
59715b38 | 3330 | This defines the class of each delay pool. There must be exactly one |
3331 | delay_class line for each delay pool. For example, to define two | |
3332 | delay pools, one of class 2 and one of class 3, the settings above | |
3333 | and here would be: | |
3334 | ||
6b53c392 | 3335 | Example: |
3336 | delay_pools 2 # 2 delay pools | |
3337 | delay_class 1 2 # pool 1 is a class 2 pool | |
3338 | delay_class 2 3 # pool 2 is a class 3 pool | |
59715b38 | 3339 | |
3340 | The delay pool classes are: | |
3341 | ||
3342 | class 1 Everything is limited by a single aggregate | |
3343 | bucket. | |
3344 | ||
3345 | class 2 Everything is limited by a single aggregate | |
3346 | bucket as well as an "individual" bucket chosen | |
3347 | from bits 25 through 32 of the IP address. | |
3348 | ||
3349 | class 3 Everything is limited by a single aggregate | |
3350 | bucket as well as a "network" bucket chosen | |
3351 | from bits 17 through 24 of the IP address and a | |
3352 | "individual" bucket chosen from bits 17 through | |
3353 | 32 of the IP address. | |
3354 | ||
3355 | NOTE: If an IP address is a.b.c.d | |
3356 | -> bits 25 through 32 are "d" | |
3357 | -> bits 17 through 24 are "c" | |
3358 | -> bits 17 through 32 are "c * 256 + d" | |
95e36d02 | 3359 | DOC_END |
3360 | ||
59715b38 | 3361 | NAME: delay_access |
3362 | TYPE: delay_pool_access | |
95e36d02 | 3363 | DEFAULT: none |
3364 | IFDEF: DELAY_POOLS | |
59715b38 | 3365 | LOC: Config.Delay |
95e36d02 | 3366 | DOC_START |
59715b38 | 3367 | This is used to determine which delay pool a request falls into. |
efd900cb | 3368 | The first matched delay pool is always used, i.e., if a request falls |
59715b38 | 3369 | into delay pool number one, no more delay are checked, otherwise the |
3370 | rest are checked in order of their delay pool number until they have | |
3371 | all been checked. For example, if you want some_big_clients in delay | |
3372 | pool 1 and lotsa_little_clients in delay pool 2: | |
95e36d02 | 3373 | |
6b53c392 | 3374 | Example: |
3375 | delay_access 1 allow some_big_clients | |
3376 | delay_access 1 deny all | |
3377 | delay_access 2 allow lotsa_little_clients | |
3378 | delay_access 2 deny all | |
95e36d02 | 3379 | DOC_END |
3380 | ||
59715b38 | 3381 | NAME: delay_parameters |
3382 | TYPE: delay_pool_rates | |
3383 | DEFAULT: none | |
95e36d02 | 3384 | IFDEF: DELAY_POOLS |
59715b38 | 3385 | LOC: Config.Delay |
95e36d02 | 3386 | DOC_START |
59715b38 | 3387 | This defines the parameters for a delay pool. Each delay pool has |
3388 | a number of "buckets" associated with it, as explained in the | |
3389 | description of delay_class. For a class 1 delay pool, the syntax is: | |
95e36d02 | 3390 | |
59715b38 | 3391 | delay_parameters pool aggregate |
95e36d02 | 3392 | |
59715b38 | 3393 | For a class 2 delay pool: |
95e36d02 | 3394 | |
59715b38 | 3395 | delay_parameters pool aggregate individual |
95e36d02 | 3396 | |
59715b38 | 3397 | For a class 3 delay pool: |
95e36d02 | 3398 | |
59715b38 | 3399 | delay_parameters pool aggregate network individual |
95e36d02 | 3400 | |
59715b38 | 3401 | The variables here are: |
95e36d02 | 3402 | |
59715b38 | 3403 | pool a pool number - ie, a number between 1 and the |
3404 | number specified in delay_pools as used in | |
3405 | delay_class lines. | |
95e36d02 | 3406 | |
59715b38 | 3407 | aggregate the "delay parameters" for the aggregate bucket |
3408 | (class 1, 2, 3). | |
95e36d02 | 3409 | |
59715b38 | 3410 | individual the "delay parameters" for the individual |
3411 | buckets (class 2, 3). | |
3412 | ||
3413 | network the "delay parameters" for the network buckets | |
3414 | (class 3). | |
3415 | ||
3416 | A pair of delay parameters is written restore/maximum, where restore is | |
3417 | the number of bytes (not bits - modem and network speeds are usually | |
3418 | quoted in bits) per second placed into the bucket, and maximum is the | |
3419 | maximum number of bytes which can be in the bucket at any time. | |
3420 | ||
3421 | For example, if delay pool number 1 is a class 2 delay pool as in the | |
3422 | above example, and is being used to strictly limit each host to 64kbps | |
3423 | (plus overheads), with no overall limit, the line is: | |
3424 | ||
3425 | delay_parameters 1 -1/-1 8000/8000 | |
3426 | ||
3427 | Note that the figure -1 is used to represent "unlimited". | |
3428 | ||
3429 | And, if delay pool number 2 is a class 3 delay pool as in the above | |
3430 | example, and you want to limit it to a total of 256kbps (strict limit) | |
3431 | with each 8-bit network permitted 64kbps (strict limit) and each | |
3432 | individual host permitted 4800bps with a bucket maximum size of 64kb | |
3433 | to permit a decent web page to be downloaded at a decent speed | |
3434 | (if the network is not being limited due to overuse) but slow down | |
3435 | large downloads more significantly: | |
3436 | ||
3437 | delay_parameters 2 32000/32000 8000/8000 600/64000 | |
3438 | ||
3439 | There must be one delay_parameters line for each delay pool. | |
95e36d02 | 3440 | DOC_END |
3441 | ||
59715b38 | 3442 | NAME: delay_initial_bucket_level |
3443 | COMMENT: (percent, 0-100) | |
3444 | TYPE: ushort | |
3445 | DEFAULT: 50 | |
95e36d02 | 3446 | IFDEF: DELAY_POOLS |
59715b38 | 3447 | LOC: Config.Delay.initial |
95e36d02 | 3448 | DOC_START |
59715b38 | 3449 | The initial bucket percentage is used to determine how much is put |
3450 | in each bucket when squid starts, is reconfigured, or first notices | |
3451 | a host accessing it (in class 2 and class 3, individual hosts and | |
3452 | networks only have buckets associated with them once they have been | |
3453 | "seen" by squid). | |
95e36d02 | 3454 | DOC_END |
6be2389e | 3455 | |
9cd6c6fb | 3456 | NAME: incoming_icp_average |
6be2389e | 3457 | TYPE: int |
3458 | DEFAULT: 6 | |
3459 | LOC: Config.comm_incoming.icp_average | |
3460 | DOC_NONE | |
3461 | ||
9cd6c6fb | 3462 | NAME: incoming_http_average |
6be2389e | 3463 | TYPE: int |
3464 | DEFAULT: 4 | |
3465 | LOC: Config.comm_incoming.http_average | |
3466 | DOC_NONE | |
3467 | ||
afc28c12 | 3468 | NAME: incoming_dns_average |
3469 | TYPE: int | |
3470 | DEFAULT: 4 | |
3471 | LOC: Config.comm_incoming.dns_average | |
3472 | DOC_NONE | |
3473 | ||
9cd6c6fb | 3474 | NAME: min_icp_poll_cnt |
6be2389e | 3475 | TYPE: int |
3476 | DEFAULT: 8 | |
3477 | LOC: Config.comm_incoming.icp_min_poll | |
3478 | DOC_NONE | |
3479 | ||
afc28c12 | 3480 | NAME: min_dns_poll_cnt |
3481 | TYPE: int | |
3482 | DEFAULT: 8 | |
3483 | LOC: Config.comm_incoming.dns_min_poll | |
3484 | DOC_NONE | |
3485 | ||
9cd6c6fb | 3486 | NAME: min_http_poll_cnt |
6be2389e | 3487 | TYPE: int |
3488 | DEFAULT: 8 | |
3489 | LOC: Config.comm_incoming.http_min_poll | |
3490 | DOC_START | |
b6a2f15e | 3491 | Heavy voodoo here. I can't even believe you are reading this. |
6be2389e | 3492 | Are you crazy? Don't even think about adjusting these unless |
3493 | you understand the algorithms in comm_select.c first! | |
3494 | DOC_END | |
2b4283e4 | 3495 | |
c5f627c2 | 3496 | NAME: max_open_disk_fds |
3497 | TYPE: int | |
3498 | LOC: Config.max_open_disk_fds | |
3499 | DEFAULT: 0 | |
6b53c392 | 3500 | DOC_START |
3501 | To avoid having disk as the I/O bottleneck Squid can optionally | |
3502 | bypass the on-disk cache if more than this amount of disk file | |
3503 | descriptors are open. | |
3504 | ||
3505 | A value of 0 indicates no limit. | |
3506 | DOC_END | |
c5f627c2 | 3507 | |
b540e168 | 3508 | NAME: offline_mode |
3509 | TYPE: onoff | |
3510 | LOC: Config.onoff.offline | |
3511 | DEFAULT: off | |
3512 | DOC_START | |
3513 | Enable this option and Squid will never try to validate cached | |
3514 | objects. | |
3515 | DOC_END | |
3516 | ||
d548ee64 | 3517 | NAME: uri_whitespace |
3518 | TYPE: uri_whitespace | |
3519 | LOC: Config.uri_whitespace | |
7e3ce7b9 | 3520 | DEFAULT: strip |
d548ee64 | 3521 | DOC_START |
3522 | What to do with requests that have whitespace characters in the | |
3523 | URI. Options: | |
3524 | ||
7e3ce7b9 | 3525 | strip: The whitespace characters are stripped out of the URL. |
3526 | This is the behavior recommended by RFC2616. | |
d548ee64 | 3527 | deny: The request is denied. The user receives an "Invalid |
3528 | Request" message. | |
3529 | allow: The request is allowed and the URI is not changed. The | |
3530 | whitespace characters remain in the URI. Note the | |
3531 | whitespace is passed to redirector processes if they | |
3532 | are in use. | |
3533 | encode: The request is allowed and the whitespace characters are | |
3534 | encoded according to RFC1738. This could be considered | |
3535 | a violation of the HTTP/1.1 | |
3536 | RFC because proxies are not allowed to rewrite URI's. | |
3537 | chop: The request is allowed and the URI is chopped at the | |
3538 | first whitespace. This might also be considered a | |
3539 | violation. | |
d548ee64 | 3540 | DOC_END |
3541 | ||
376bb137 | 3542 | NAME: broken_posts |
3543 | TYPE: acl_access | |
3544 | DEFAULT: none | |
3545 | LOC: Config.accessList.brokenPosts | |
c68e9c6b | 3546 | DOC_START |
376bb137 | 3547 | A list of ACL elements which, if matched, causes Squid to send |
54bab452 | 3548 | an extra CRLF pair after the body of a PUT/POST request. |
376bb137 | 3549 | |
3550 | Some HTTP servers has broken implementations of PUT/POST, | |
54bab452 | 3551 | and rely on an extra CRLF pair sent by some WWW clients. |
376bb137 | 3552 | |
3553 | Quote from RFC 2068 section 4.1 on this matter: | |
3554 | ||
3555 | Note: certain buggy HTTP/1.0 client implementations generate an | |
3556 | extra CRLF's after a POST request. To restate what is explicitly | |
3557 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
3558 | a request with an extra CRLF. | |
3559 | ||
6b53c392 | 3560 | Example: |
3561 | acl buggy_server url_regex ^http://.... | |
3562 | broken_posts allow buggy_server | |
c68e9c6b | 3563 | DOC_END |
9b094667 | 3564 | |
e66d7923 | 3565 | NAME: mcast_miss_addr |
3566 | IFDEF: MULTICAST_MISS_STREAM | |
3567 | TYPE: address | |
3568 | LOC: Config.mcast_miss.addr | |
3569 | DEFAULT: 255.255.255.255 | |
b6a2f15e | 3570 | DOC_START |
3571 | If you enable this option, every "cache miss" URL will | |
3572 | be sent out on the specified multicast address. | |
3573 | ||
3574 | Do not enable this option unless you are are absolutely | |
3575 | certain you understand what you are doing. | |
3576 | DOC_END | |
e66d7923 | 3577 | |
7e3ce7b9 | 3578 | NAME: mcast_miss_ttl |
3579 | IFDEF: MULTICAST_MISS_TTL | |
3580 | TYPE: ushort | |
3581 | LOC: Config.mcast_miss.ttl | |
3582 | DEFAULT: 16 | |
3583 | DOC_START | |
3584 | This is the time-to-live value for packets multicasted | |
3585 | when multicasting off cache miss URLs is enabled. By | |
3586 | default this is set to 'site scope', i.e. 16. | |
3587 | DOC_END | |
3588 | ||
e66d7923 | 3589 | NAME: mcast_miss_port |
3590 | IFDEF: MULTICAST_MISS_STREAM | |
3591 | TYPE: ushort | |
3592 | LOC: Config.mcast_miss.port | |
3593 | DEFAULT: 3135 | |
b6a2f15e | 3594 | DOC_START |
efd900cb | 3595 | This is the port number to be used in conjunction with |
b6a2f15e | 3596 | 'mcast_miss_addr'. |
3597 | DOC_END | |
e66d7923 | 3598 | |
3599 | NAME: mcast_miss_encode_key | |
3600 | IFDEF: MULTICAST_MISS_STREAM | |
3601 | TYPE: string | |
3602 | LOC: Config.mcast_miss.encode_key | |
3603 | DEFAULT: XXXXXXXXXXXXXXXX | |
b6a2f15e | 3604 | DOC_START |
3605 | The URLs that are sent in the multicast miss stream are | |
3606 | encrypted. This is the encryption key. | |
3607 | DOC_END | |
e66d7923 | 3608 | |
168dfda9 | 3609 | NAME: nonhierarchical_direct |
3610 | TYPE: onoff | |
3611 | LOC: Config.onoff.nonhierarchical_direct | |
3612 | DEFAULT: on | |
3613 | DOC_START | |
3614 | By default, Squid will send any non-hierarchical requests | |
3615 | (matching hierarchy_stoplist or not cachable request type) direct | |
3616 | to origin servers. | |
3617 | ||
3618 | If you set this to off, then Squid will prefer to send these | |
3619 | requests to parents. | |
3620 | ||
3621 | Note that in most configurations, by turning this off you will only | |
3622 | add latency to these request without any improvement in global hit | |
3623 | ratio. | |
3624 | ||
3625 | If you are inside an firewall then see never_direct instead of | |
3626 | this directive. | |
168dfda9 | 3627 | DOC_END |
3628 | ||
9b094667 | 3629 | NAME: prefer_direct |
3630 | TYPE: onoff | |
3631 | LOC: Config.onoff.prefer_direct | |
168dfda9 | 3632 | DEFAULT: off |
9b094667 | 3633 | DOC_START |
168dfda9 | 3634 | Normally Squid tries to use parents for most requests. If you by some |
3635 | reason like it to first try going direct and only use a parent if | |
3636 | going direct fails then set this to off. | |
3637 | ||
3638 | By combining nonhierarchical_direct off and prefer_direct on you | |
3639 | can set up Squid to use a parent as a backup path if going direct | |
3640 | fails. | |
9b094667 | 3641 | DOC_END |
4d62b0af | 3642 | |
bcbc11b0 | 3643 | NAME: strip_query_terms |
3644 | TYPE: onoff | |
3645 | LOC: Config.onoff.strip_query_terms | |
3646 | DEFAULT: on | |
3647 | DOC_START | |
3648 | By default, Squid strips query terms from requested URLs before | |
3649 | logging. This protects your user's privacy. | |
bcbc11b0 | 3650 | DOC_END |
3651 | ||
b6a2f15e | 3652 | NAME: coredump_dir |
3653 | TYPE: string | |
3654 | LOC: Config.coredump_dir | |
3655 | DEFAULT: none | |
5ff76111 | 3656 | DEFAULT_IF_NONE: none |
b6a2f15e | 3657 | DOC_START |
5ff76111 | 3658 | By default Squid leaves core files in the directory from where |
3659 | it was started. If you set 'coredump_dir' to a directory | |
b6a2f15e | 3660 | that exists, Squid will chdir() to that directory at startup |
3661 | and coredump files will be left there. | |
5ff76111 | 3662 | |
3663 | NOCOMMENT_START | |
3664 | # Leave coredumps in the first cache dir | |
3665 | coredump_dir @DEFAULT_SWAP_DIR@ | |
3666 | NOCOMMENT_END | |
b6a2f15e | 3667 | DOC_END |
3668 | ||
07476a7f | 3669 | NAME: redirector_bypass |
3670 | TYPE: onoff | |
3671 | LOC: Config.onoff.redirector_bypass | |
3672 | DEFAULT: off | |
3673 | DOC_START | |
3674 | When this is 'on', a request will not go through the | |
3675 | redirector if all redirectors are busy. If this is 'off' | |
3676 | and the redirector queue grows too large, Squid will exit | |
29de1a20 | 3677 | with a FATAL error and ask you to increase the number of |
07476a7f | 3678 | redirectors. You should only enable this if the redirectors |
3679 | are not critical to your caching system. If you use | |
3680 | redirectors for access control, and you enable this option, | |
3681 | then users may have access to pages that they should not | |
3682 | be allowed to request. | |
3683 | DOC_END | |
3684 | ||
9bc73deb | 3685 | NAME: ignore_unknown_nameservers |
3686 | TYPE: onoff | |
3687 | LOC: Config.onoff.ignore_unknown_nameservers | |
3688 | DEFAULT: on | |
3689 | DOC_START | |
3690 | By default Squid checks that DNS responses are received | |
3691 | from the same IP addresses that they are sent to. If they | |
3692 | don't match, Squid ignores the response and writes a warning | |
3693 | message to cache.log. You can allow responses from unknown | |
3694 | nameservers by setting this option to 'off'. | |
9bc73deb | 3695 | DOC_END |
3696 | ||
7e3ce7b9 | 3697 | NAME: digest_generation |
3698 | IFDEF: USE_CACHE_DIGESTS | |
3699 | TYPE: onoff | |
3700 | LOC: Config.onoff.digest_generation | |
3701 | DEFAULT: on | |
3702 | DOC_START | |
3703 | This controls whether the server will generate a Cache Digest | |
3704 | of its contents. By default, Cache Digest generation is | |
3705 | enabled if Squid is compiled with USE_CACHE_DIGESTS defined. | |
7e3ce7b9 | 3706 | DOC_END |
3707 | ||
3708 | NAME: digest_bits_per_entry | |
3709 | IFDEF: USE_CACHE_DIGESTS | |
3710 | TYPE: int | |
3711 | LOC: Config.digest.bits_per_entry | |
3712 | DEFAULT: 5 | |
3713 | DOC_START | |
3714 | This is the number of bits of the server's Cache Digest which | |
3715 | will be associated with the Digest entry for a given HTTP | |
3716 | Method and URL (public key) combination. The default is 5. | |
7e3ce7b9 | 3717 | DOC_END |
3718 | ||
3719 | NAME: digest_rebuild_period | |
3720 | IFDEF: USE_CACHE_DIGESTS | |
efd900cb | 3721 | COMMENT: (seconds) |
3722 | TYPE: time_t | |
7e3ce7b9 | 3723 | LOC: Config.digest.rebuild_period |
efd900cb | 3724 | DEFAULT: 1 hour |
7e3ce7b9 | 3725 | DOC_START |
3726 | This is the number of seconds between Cache Digest rebuilds. | |
7e3ce7b9 | 3727 | DOC_END |
3728 | ||
3729 | NAME: digest_rewrite_period | |
efd900cb | 3730 | COMMENT: (seconds) |
7e3ce7b9 | 3731 | IFDEF: USE_CACHE_DIGESTS |
efd900cb | 3732 | TYPE: time_t |
7e3ce7b9 | 3733 | LOC: Config.digest.rewrite_period |
efd900cb | 3734 | DEFAULT: 1 hour |
7e3ce7b9 | 3735 | DOC_START |
3736 | This is the number of seconds between Cache Digest writes to | |
6b53c392 | 3737 | disk. |
7e3ce7b9 | 3738 | DOC_END |
3739 | ||
3740 | NAME: digest_swapout_chunk_size | |
efd900cb | 3741 | COMMENT: (bytes) |
3742 | TYPE: b_size_t | |
7e3ce7b9 | 3743 | IFDEF: USE_CACHE_DIGESTS |
7e3ce7b9 | 3744 | LOC: Config.digest.swapout_chunk_size |
efd900cb | 3745 | DEFAULT: 4096 bytes |
7e3ce7b9 | 3746 | DOC_START |
3747 | This is the number of bytes of the Cache Digest to write to | |
efd900cb | 3748 | disk at a time. It defaults to 4096 bytes (4KB), the Squid |
3749 | default swap page. | |
7e3ce7b9 | 3750 | DOC_END |
3751 | ||
3752 | NAME: digest_rebuild_chunk_percentage | |
efd900cb | 3753 | COMMENT: (percent, 0-100) |
7e3ce7b9 | 3754 | IFDEF: USE_CACHE_DIGESTS |
3755 | TYPE: int | |
3756 | LOC: Config.digest.rebuild_chunk_percentage | |
3757 | DEFAULT: 10 | |
3758 | DOC_START | |
efd900cb | 3759 | This is the percentage of the Cache Digest to be scanned at a |
3760 | time. By default it is set to 10% of the Cache Digest. | |
7e3ce7b9 | 3761 | DOC_END |
3762 | ||
efd900cb | 3763 | NAME: chroot |
3764 | TYPE: string | |
3765 | LOC: Config.chroot_dir | |
3766 | DEFAULT: none | |
3767 | DOC_START | |
3768 | Use this to have Squid do a chroot() while initializing. This | |
3769 | also causes Squid to fully drop root privileges after | |
3770 | initializing. This means, for example, that if you use a HTTP | |
3771 | port less than 1024 and try to reconfigure, you will get an | |
3772 | error. | |
3773 | DOC_END | |
efd900cb | 3774 | |
3775 | NAME: client_persistent_connections | |
3776 | TYPE: onoff | |
3777 | LOC: Config.onoff.client_pconns | |
3778 | DEFAULT: on | |
3779 | DOC_NONE | |
3780 | ||
3781 | NAME: server_persistent_connections | |
3782 | TYPE: onoff | |
3783 | LOC: Config.onoff.server_pconns | |
3784 | DEFAULT: on | |
3785 | DOC_START | |
3786 | Persistent connection support for clients and servers. By | |
3787 | default, Squid uses persistent connections (when allowed) | |
3788 | with its clients and servers. You can use these options to | |
3789 | disable persistent connections with clients and/or servers. | |
efd900cb | 3790 | DOC_END |
9d24d603 | 3791 | |
3d15e2d7 | 3792 | NAME: pipeline_prefetch |
3793 | TYPE: onoff | |
3794 | LOC: Config.onoff.pipeline_prefetch | |
3795 | DEFAULT: on | |
3796 | DOC_START | |
3797 | To boost the performance of pipelined requests to closer | |
3798 | match that of a non-proxied environment Squid tries to fetch | |
3799 | up to two requests in parallell from a pipeline. | |
3800 | DOC_END | |
3801 | ||
56fe752e | 3802 | NAME: extension_methods |
3803 | TYPE: wordlist | |
3804 | LOC: Config.ext_methods | |
3805 | DEFAULT: none | |
3806 | DOC_START | |
3807 | Squid only knows about standardized HTTP request methods. | |
3808 | You can add up to 20 additional "extension" methods here. | |
3809 | DOC_END | |
3810 | ||
b8a46de0 | 3811 | NAME: high_response_time_warning |
3812 | TYPE: int | |
3813 | COMMENT: (msec) | |
3814 | LOC: Config.warnings.high_rptm | |
3815 | DEFAULT: 0 | |
3816 | DOC_START | |
3817 | If the one-minute median response time exceeds this value, | |
3818 | Squid prints a WARNING with debug level 0 to get the | |
3819 | administrators attention. The value is in milliseconds. | |
3820 | DOC_END | |
3821 | ||
3822 | NAME: high_page_fault_warning | |
3823 | TYPE: int | |
3824 | LOC: Config.warnings.high_pf | |
3825 | DEFAULT: 0 | |
3826 | DOC_START | |
3827 | If the one-minute average page fault rate exceeds this | |
3828 | value, Squid prints a WARNING with debug level 0 to get | |
3829 | the administrators attention. The value is in page faults | |
3830 | per second. | |
3831 | DOC_END | |
3832 | ||
3833 | NAME: high_memory_warning | |
3834 | TYPE: b_size_t | |
3835 | LOC: Config.warnings.high_memory | |
3836 | DEFAULT: 0 | |
3837 | DOC_START | |
3838 | If the memory usage (as determined by mallinfo) exceeds | |
3839 | value, Squid prints a WARNING with debug level 0 to get | |
3840 | the administrators attention. | |
3841 | DOC_END | |
3842 | ||
65a53c8e | 3843 | NAME: store_dir_select_algorithm |
3844 | TYPE: string | |
3845 | LOC: Config.store_dir_select_algorithm | |
3846 | DEFAULT: least-load | |
3847 | DOC_START | |
3848 | Set this to 'round-robin' as an alternative. | |
3849 | DOC_END | |
3850 | ||
225644d7 | 3851 | NAME: forward_log |
3852 | IFDEF: WIP_FWD_LOG | |
3853 | TYPE: string | |
3854 | DEFAULT: none | |
3855 | LOC: Config.Log.forward | |
3856 | DOC_START | |
3857 | Logs the server-side requests. | |
3858 | ||
3859 | This is currently work in progress. | |
3860 | DOC_END | |
3861 | ||
7613d09c | 3862 | NAME: ie_refresh |
3863 | COMMENT: on|off | |
3864 | TYPE: onoff | |
3865 | LOC: Config.onoff.ie_refresh | |
3866 | DEFAULT: off | |
3867 | DOC_START | |
3868 | Microsoft Internet Explorer up until version 5.5 Service | |
3869 | Pack 1 has an issue with transparent proxies, wherein it | |
3870 | is impossible to force a refresh. Turning this on provides | |
3871 | a partial fix to the problem, by causing all IMS-REFRESH | |
3872 | requests from older IE versions to check the origin server | |
3873 | for fresh content. This reduces hit ratio by some amount | |
3874 | (~10% in my experience), but allows users to actually get | |
3875 | fresh content when they want it. Note that because Squid | |
3876 | cannot tell if the user is using 5.5 or 5.5SP1, the behavior | |
3877 | of 5.5 is unchanged from old versions of Squid (i.e. a | |
3878 | forced refresh is impossible). Newer versions of IE will, | |
3879 | hopefully, continue to have the new behavior and will be | |
3880 | handled based on that assumption. This option defaults to | |
3881 | the old Squid behavior, which is better for hit ratios but | |
3882 | worse for clients using IE, if they need to be able to | |
3883 | force fresh content. | |
3884 | DOC_END | |
3885 | ||
f66a9ef4 | 3886 | NAME: vary_ignore_expire |
3887 | COMMENT: on|off | |
3888 | TYPE: onoff | |
3889 | LOC: Config.onoff.vary_ignore_expire | |
3890 | DEFAULT: off | |
3891 | DOC_START | |
3892 | Many HTTP servers supporting Vary gives such objects | |
3893 | immediate expiry time with no cache-control header | |
3894 | when requested by a HTTP/1.0 client. This option | |
3895 | enables Squid to ignore such expiry times until | |
3896 | HTTP/1.1 is fully implemented. | |
3897 | WARNING: This may eventually cause some varying | |
3898 | objects not intended for caching to get cached. | |
3899 | DOC_END | |
3900 | ||
d1ec12c7 | 3901 | NAME: sleep_after_fork |
3902 | COMMENT: (microseconds) | |
3903 | TYPE: int | |
3904 | LOC: Config.sleep_after_fork | |
3905 | DEFAULT: 0 | |
3906 | DOC_START | |
96d88dcb | 3907 | When this is set to a non-zero value, the main Squid process |
3908 | sleeps the specified number of microseconds after a fork() | |
3909 | system call. This sleep may help the situation where your | |
3910 | system reports fork() failures due to lack of (virtual) | |
3911 | memory. Note, however, that if you have a lot of child | |
3912 | processes, then these sleep delays will add up and your | |
3913 | Squid will not service requests for some amount of time | |
3914 | until all the child processes have been started. | |
d1ec12c7 | 3915 | DOC_END |
1fbbdcb0 | 3916 | |
2b4283e4 | 3917 | EOF |