]>
Commit | Line | Data |
---|---|---|
3a278cb8 | 1 | |
9cef6668 | 2 | # |
736cb6aa | 3 | # $Id: cf.data.pre,v 1.279 2002/09/01 13:46:55 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. | |
e1ad0523 | 292 | It is subtracted before division by weight in calculating |
d1b63fc8 | 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 | ||
036145b4 | 1095 | NAME: check_hostnames |
1096 | TYPE: onoff | |
1097 | DEFAULT: on | |
1098 | LOC: Config.onoff.check_hostnames | |
1099 | DOC_START | |
1100 | For security and stability reasons Squid by default checks | |
1101 | hostnames for Internet standard RFC compliance. If you do not want | |
1102 | Squid to perform these checks then turn this directive off. | |
1103 | DOC_END | |
1104 | ||
934b03fc | 1105 | NAME: cache_dns_program |
f0b19334 | 1106 | TYPE: string |
589c90de | 1107 | IFDEF: USE_DNSSERVERS |
0153d498 | 1108 | DEFAULT: @DEFAULT_DNSSERVER@ |
934b03fc | 1109 | LOC: Config.Program.dnsserver |
1110 | DOC_START | |
1111 | Specify the location of the executable for dnslookup process. | |
934b03fc | 1112 | DOC_END |
1113 | ||
934b03fc | 1114 | NAME: dns_children |
1115 | TYPE: int | |
6b53c392 | 1116 | IFDEF: USE_DNSSERVERS |
934b03fc | 1117 | DEFAULT: 5 |
1118 | LOC: Config.dnsChildren | |
1119 | DOC_START | |
1120 | The number of processes spawn to service DNS name lookups. | |
1121 | For heavily loaded caches on large servers, you should | |
1122 | probably increase this value to at least 10. The maximum | |
1123 | is 32. The default is 5. | |
1124 | ||
efd900cb | 1125 | You must have at least one dnsserver process. |
934b03fc | 1126 | DOC_END |
1127 | ||
4fe0e1d0 | 1128 | NAME: dns_retransmit_interval |
1129 | TYPE: time_t | |
1130 | DEFAULT: 5 seconds | |
1131 | LOC: Config.Timeout.idns_retransmit | |
1132 | IFDEF: !USE_DNSSERVERS | |
1133 | DOC_START | |
1134 | Initial retransmit interval for DNS queries. The interval is | |
1135 | doubled each time all configured DNS servers have been tried. | |
1136 | ||
1137 | DOC_END | |
1138 | ||
1139 | NAME: dns_timeout | |
1140 | TYPE: time_t | |
1141 | DEFAULT: 5 minutes | |
1142 | LOC: Config.Timeout.idns_query | |
1143 | IFDEF: !USE_DNSSERVERS | |
1144 | DOC_START | |
1145 | DNS Query timeout. If no response is received to a DNS query | |
1146 | within this time then all DNS servers for the queried domain | |
1147 | is assumed to be unavailable. | |
1148 | DOC_END | |
934b03fc | 1149 | |
1150 | NAME: dns_defnames | |
1151 | COMMENT: on|off | |
589c90de | 1152 | IFDEF: USE_DNSSERVERS |
934b03fc | 1153 | TYPE: onoff |
f1dc9b30 | 1154 | DEFAULT: off |
17a0a4ee | 1155 | LOC: Config.onoff.res_defnames |
6b53c392 | 1156 | IFDEF: USE_DNSSERVERS |
934b03fc | 1157 | DOC_START |
1158 | Normally the 'dnsserver' disables the RES_DEFNAMES resolver | |
1159 | option (see res_init(3)). This prevents caches in a hierarchy | |
1160 | from interpreting single-component hostnames locally. To allow | |
1161 | dnsserver to handle single-component names, enable this | |
1162 | option. | |
934b03fc | 1163 | DOC_END |
1164 | ||
09c483ec | 1165 | NAME: dns_nameservers |
1166 | TYPE: wordlist | |
1167 | DEFAULT: none | |
1168 | LOC: Config.dns_nameservers | |
1169 | DOC_START | |
1170 | Use this if you want to specify a list of DNS name servers | |
1171 | (IP addresses) to use instead of those given in your | |
1172 | /etc/resolv.conf file. | |
836d6233 | 1173 | On Windows platforms, if no value is specified here or in |
1174 | the /etc/resolv.conf file, the list of DNS name servers are | |
1175 | taken from the Windows registry, both static and dynamic DHCP | |
1176 | configurations are supported. | |
09c483ec | 1177 | |
1178 | Example: dns_nameservers 10.0.0.1 192.172.0.4 | |
09c483ec | 1179 | DOC_END |
1180 | ||
0e70aa1e | 1181 | NAME: hosts_file |
1182 | TYPE: string | |
1183 | DEFAULT: /etc/hosts | |
1184 | LOC: Config.etcHostsPath | |
1185 | DOC_START | |
1186 | Location of the host-local IP name-address associations | |
1187 | database. Most Operating Systems have such a file: under | |
1188 | Un*X it's by default in /etc/hosts MS-Windows NT/2000 places | |
1189 | that in %SystemRoot%(by default | |
1190 | c:\winnt)\system32\drivers\etc\hosts, while Windows 9x/ME | |
1191 | places that in %windir%(usually c:\windows)\hosts | |
1192 | ||
1193 | The file contains newline-separated definitions, in the | |
1194 | form ip_address_in_dotted_form name [name ...] names are | |
1195 | whitespace-separated. lines beginnng with an hash (#) | |
1196 | character are comments. | |
1197 | ||
1198 | The file is checked at startup and upon configuration. If | |
1199 | set to 'none', it won't be checked. If append_domain is | |
1200 | used, that domain will be added to domain-local (i.e. not | |
1201 | containing any dot character) host definitions. | |
1202 | DOC_END | |
934b03fc | 1203 | |
be7d89d4 | 1204 | NAME: diskd_program |
1205 | TYPE: string | |
1206 | DEFAULT: @DEFAULT_DISKD@ | |
1207 | LOC: Config.Program.diskd | |
1208 | DOC_START | |
1209 | Specify the location of the diskd executable. | |
1210 | Note that this is only useful if you have compiled in | |
1211 | diskd as one of the store io modules. | |
1212 | DOC_END | |
1213 | ||
934b03fc | 1214 | NAME: unlinkd_program |
a3d0a19d | 1215 | IFDEF: USE_UNLINKD |
f0b19334 | 1216 | TYPE: string |
0153d498 | 1217 | DEFAULT: @DEFAULT_UNLINKD@ |
934b03fc | 1218 | LOC: Config.Program.unlinkd |
1219 | DOC_START | |
1220 | Specify the location of the executable for file deletion process. | |
934b03fc | 1221 | DOC_END |
1222 | ||
934b03fc | 1223 | NAME: pinger_program |
a95856a0 | 1224 | TYPE: string |
0153d498 | 1225 | DEFAULT: @DEFAULT_PINGER@ |
934b03fc | 1226 | LOC: Config.Program.pinger |
6b53c392 | 1227 | IFDEF: USE_ICMP |
934b03fc | 1228 | DOC_START |
1229 | Specify the location of the executable for the pinger process. | |
934b03fc | 1230 | DOC_END |
1231 | ||
1232 | ||
1233 | NAME: redirect_program | |
c6d5b87b | 1234 | TYPE: wordlist |
934b03fc | 1235 | LOC: Config.Program.redirect |
62607543 | 1236 | DEFAULT: none |
934b03fc | 1237 | DOC_START |
1238 | Specify the location of the executable for the URL redirector. | |
cf5cc17e | 1239 | Since they can perform almost any function there isn't one included. |
3f94eab9 | 1240 | See the FAQ (section 15) for information on how to write one. |
cf5cc17e | 1241 | By default, a redirector is not used. |
934b03fc | 1242 | DOC_END |
1243 | ||
1244 | ||
1245 | NAME: redirect_children | |
1246 | TYPE: int | |
1247 | DEFAULT: 5 | |
1248 | LOC: Config.redirectChildren | |
1249 | DOC_START | |
cf5cc17e | 1250 | The number of redirector processes to spawn. If you start |
1251 | too few Squid will have to wait for them to process a backlog of | |
1252 | URLs, slowing it down. If you start too many they will use RAM | |
1253 | and other system resources. | |
934b03fc | 1254 | DOC_END |
1255 | ||
c68e9c6b | 1256 | NAME: redirect_rewrites_host_header |
1257 | TYPE: onoff | |
1258 | DEFAULT: on | |
1259 | LOC: Config.onoff.redir_rewrites_host | |
1260 | DOC_START | |
7e3ce7b9 | 1261 | By default Squid rewrites any Host: header in redirected |
54bab452 | 1262 | requests. If you are running an accelerator then this may |
7e3ce7b9 | 1263 | not be a wanted effect of a redirector. |
c68e9c6b | 1264 | DOC_END |
1265 | ||
9bc73deb | 1266 | NAME: redirector_access |
1267 | TYPE: acl_access | |
1268 | DEFAULT: none | |
1269 | LOC: Config.accessList.redirector | |
1270 | DOC_START | |
1271 | If defined, this access list specifies which requests are | |
1272 | sent to the redirector processes. By default all requests | |
1273 | are sent. | |
1274 | DOC_END | |
1275 | ||
94439e4e | 1276 | NAME: auth_param |
1277 | TYPE: authparam | |
1278 | LOC: Config.authConfig | |
73e67ee0 | 1279 | DEFAULT: none |
1280 | DOC_START | |
94439e4e | 1281 | This is used to pass parameters to the various authentication |
1282 | schemes. | |
1283 | format: auth_param scheme parameter [setting] | |
1284 | ||
1285 | auth_param basic program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwd | |
1286 | would tell the basic authentication scheme it's program parameter. | |
1287 | ||
1288 | The order that authentication prompts are presented to the client_agent | |
1289 | is dependant on the order the scheme first appears in config file. | |
1290 | IE has a bug (it's not rfc 2617 compliant) in that it will use the basic | |
1291 | scheme if basic is the first entry presented, even if more secure schemes | |
1292 | are presented. For now use the order in the file below. If other browsers | |
1293 | have difficulties (don't recognise the schemes offered even if you are using | |
1294 | basic) then either put basic first, or disable the other schemes (by commenting | |
1295 | out their program entry). | |
1296 | ||
2d70df72 | 1297 | Once an authentication scheme is fully configured, it can only be shutdown |
1298 | by shutting squid down and restarting. Changes can be made on the fly and | |
96d88dcb | 1299 | activated with a reconfigure. I.E. You can change to a different helper, |
2d70df72 | 1300 | but not unconfigure the helper completely. |
1301 | ||
94439e4e | 1302 | === Parameters for the basic scheme follow. === |
1303 | ||
1304 | "program" cmdline | |
6c20b822 | 1305 | Specify the command for the external authenticator. Such a |
1306 | program reads a line containing "username password" and replies | |
1307 | "OK" or "ERR" in an endless loop. If you use an authenticator, | |
1308 | make sure you have 1 acl of type proxy_auth. By default, the | |
94439e4e | 1309 | authenticate_program is not used. |
73e67ee0 | 1310 | |
6c20b822 | 1311 | If you want to use the traditional proxy authentication, |
1312 | jump over to the ../auth_modules/NCSA directory and | |
1313 | type: | |
1314 | % make | |
1315 | % make install | |
73e67ee0 | 1316 | |
6c20b822 | 1317 | Then, set this line to something like |
73e67ee0 | 1318 | |
94439e4e | 1319 | auth_param basic program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwd |
73e67ee0 | 1320 | |
94439e4e | 1321 | "children" numberofchildren |
73eab8df | 1322 | The number of authenticator processes to spawn (no default). |
1323 | If you start too few Squid will have to wait for them to | |
1324 | process a backlog of usercode/password verifications, slowing | |
1325 | it down. When password verifications are done via a (slow) | |
1326 | network you are likely to need lots of authenticator | |
1327 | processes. | |
94439e4e | 1328 | auth_param basic children 5 |
1329 | ||
1330 | "realm" realmstring | |
73eab8df | 1331 | Specifies the realm name which is to be reported to the |
1332 | client for the basic proxy authentication scheme (part of | |
1333 | the text the user will see when prompted their username and | |
1334 | password). There is no default. | |
94439e4e | 1335 | auth_param basic realm Squid proxy-caching web server |
1336 | ||
1337 | "credentialsttl" timetolive | |
73eab8df | 1338 | Specifies how long squid assumes an externally validated |
1339 | username:password pair is valid for - in other words how | |
1340 | often the helper program is called for that user. Set this | |
1341 | low to force revalidation with short lived passwords. Note | |
1342 | that setting this high does not impact your susceptability | |
1343 | to replay attacks unless you are using an one-time password | |
1344 | system (such as SecureID). If you are using such a system, | |
1345 | you will be vulnerable to replay attacks unless you also | |
1346 | enable the IP ttl is strict option. | |
94439e4e | 1347 | |
2d70df72 | 1348 | === Parameters for the digest scheme follow === |
1349 | ||
1350 | "program" cmdline | |
73eab8df | 1351 | Specify the command for the external authenticator. Such |
1352 | a program reads a line containing "username":"realm" and | |
1353 | replies with the appropriate H(A1) value base64 encoded. | |
1354 | See rfc 2616 for the definition of H(A1). If you use an | |
1355 | authenticator, make sure you have 1 acl of type proxy_auth. | |
1356 | By default, authentication is not used. | |
2d70df72 | 1357 | |
54bab452 | 1358 | If you want to use build an authenticator, |
96d88dcb | 1359 | jump over to the ../digest_auth_modules directory and choose the |
2d70df72 | 1360 | authenticator to use. It it's directory type |
1361 | % make | |
1362 | % make install | |
1363 | ||
1364 | Then, set this line to something like | |
1365 | ||
1366 | auth_param digest program @DEFAULT_PREFIX@/bin/digest_auth_pw @DEFAULT_PREFIX@/etc/digpass | |
1367 | ||
1368 | ||
1369 | "children" numberofchildren | |
73eab8df | 1370 | The number of authenticator processes to spawn (no default). |
1371 | If you start too few Squid will have to wait for them to | |
1372 | process a backlog of H(A1) calculations, slowing it down. | |
1373 | When the H(A1) calculations are done via a (slow) network | |
1374 | you are likely to need lots of authenticator processes. | |
2d70df72 | 1375 | auth_param digest children 5 |
1376 | ||
1377 | "realm" realmstring | |
73eab8df | 1378 | Specifies the realm name which is to be reported to the |
1379 | client for the digest proxy authentication scheme (part of | |
1380 | the text the user will see when prompted their username and | |
1381 | password). There is no default. | |
2d70df72 | 1382 | auth_param digest realm Squid proxy-caching web server |
1383 | ||
1384 | "nonce_garbage_interval" timeinterval | |
73eab8df | 1385 | Specifies the interval that nonces that have been issued |
1386 | to client_agent's are checked for validity. | |
2d70df72 | 1387 | |
1388 | "nonce_max_duration" timeinterval | |
73eab8df | 1389 | Specifies the maximum length of time a given nonce will be |
1390 | valid for. | |
2d70df72 | 1391 | |
1392 | "nonce_max_count" number | |
73eab8df | 1393 | Specifies the maximum number of times a given nonce can be |
1394 | used. | |
2d70df72 | 1395 | |
d205783b | 1396 | "nonce_strictness" on|off |
73eab8df | 1397 | Determines if squid requires increment-by-1 behaviour for |
1398 | nonce counts (on - the default), or strictly incrementing | |
1399 | (off - for use when useragents generate nonce counts that | |
1400 | occasionally miss 1 (ie, 1,2,4,6)). | |
d205783b | 1401 | |
94439e4e | 1402 | === NTLM scheme options follow === |
1403 | ||
1404 | "program" cmdline | |
73eab8df | 1405 | Specify the command for the external ntlm authenticator. |
1406 | Such a program reads a line containing the uuencoded NEGOTIATE | |
1407 | and replies with the ntlm CHALLENGE, then waits for the | |
1408 | response and answers with "OK" or "ERR" in an endless loop. | |
1409 | If you use an ntlm authenticator, make sure you have 1 acl | |
1410 | of type proxy_auth. By default, the ntlm authenticator_program | |
1411 | is not used. | |
94439e4e | 1412 | |
1413 | auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth | |
1414 | ||
1415 | "children" numberofchildren | |
73eab8df | 1416 | The number of authenticator processes to spawn (no default). |
1417 | If you start too few Squid will have to wait for them to | |
1418 | process a backlog of credential verifications, slowing it | |
1419 | down. When crendential verifications are done via a (slow) | |
1420 | network you are likely to need lots of authenticator | |
1421 | processes. | |
94439e4e | 1422 | auth_param ntlm children 5 |
1423 | ||
1424 | "max_challenge_reuses" number | |
73eab8df | 1425 | The maximum number of times a challenge given by a ntlm |
1426 | authentication helper can be reused. Increasing this number | |
1427 | increases your exposure to replay attacks on your network. | |
1428 | 0 means use the challenge only once. (disable challenge | |
1429 | caching) See max_ntlm_challenge_lifetime for more information. | |
94439e4e | 1430 | auth_param ntlm max_challenge_reuses 0 |
1431 | ||
1432 | "max_challenge_lifetime" timespan | |
73eab8df | 1433 | The maximum time period that a ntlm challenge is reused |
1434 | over. The actual period will be the minimum of this time | |
1435 | AND the number of reused challenges. | |
94439e4e | 1436 | auth_param ntlm max_challenge_lifetime 2 minutes |
1437 | ||
1438 | NOCOMMENT_START | |
1439 | #Recommended minimum configuration: | |
2d70df72 | 1440 | #auth_param digest program <uncomment and complete this line> |
1441 | #auth_param digest children 5 | |
1442 | #auth_param digest realm Squid proxy-caching web server | |
1443 | #auth_param digest nonce_garbage_interval 5 minutes | |
1444 | #auth_param digest nonce_max_duration 30 minutes | |
1445 | #auth_param digest nonce_max_count 50 | |
94439e4e | 1446 | #auth_param ntlm program <uncomment and complete this line to activate> |
2d70df72 | 1447 | #auth_param ntlm children 5 |
1448 | #auth_param ntlm max_challenge_reuses 0 | |
1449 | #auth_param ntlm max_challenge_lifetime 2 minutes | |
94439e4e | 1450 | #auth_param basic program <uncomment and complete this line> |
1451 | auth_param basic children 5 | |
1452 | auth_param basic realm Squid proxy-caching web server | |
1453 | auth_param basic credentialsttl 2 hours | |
1454 | NOCOMMENT_END | |
1455 | DOC_END | |
1456 | ||
1457 | NAME: authenticate_cache_garbage_interval | |
1458 | TYPE: time_t | |
1459 | DEFAULT: 1 hour | |
1460 | LOC: Config.authenticateGCInterval | |
1461 | DOC_START | |
73eab8df | 1462 | The time period between garbage collection across the |
1463 | username cache. This is a tradeoff between memory utilisation | |
1464 | (long intervals - say 2 days) and CPU (short intervals - | |
1465 | say 1 minute). Only change if you have good reason to. | |
73e67ee0 | 1466 | DOC_END |
1467 | ||
c68e9c6b | 1468 | NAME: authenticate_ttl |
70a76033 | 1469 | TYPE: time_t |
1470 | DEFAULT: 1 hour | |
c68e9c6b | 1471 | LOC: Config.authenticateTTL |
1472 | DOC_START | |
73eab8df | 1473 | The time a user & their credentials stay in the logged in |
1474 | user cache since their last request. When the garbage | |
1475 | interval passes, all user credentials that have passed their | |
1476 | TTL are removed from memory. | |
c68e9c6b | 1477 | DOC_END |
1478 | ||
9bc73deb | 1479 | NAME: authenticate_ip_ttl |
70a76033 | 1480 | TYPE: time_t |
9bc73deb | 1481 | LOC: Config.authenticateIpTTL |
70a76033 | 1482 | DEFAULT: 0 seconds |
9bc73deb | 1483 | DOC_START |
1484 | With this option you control how long a proxy authentication | |
1485 | will be bound to a specific IP address. If a request using | |
1486 | the same user name is received during this time then access | |
1487 | will be denied and both users are required to reauthenticate | |
1488 | them selves. The idea behind this is to make it annoying | |
1489 | for people to share their password to their friends, but | |
1490 | yet allow a dialup user to reconnect on a different dialup | |
1491 | port. | |
1492 | ||
1493 | The default is 0 to disable the check. Recommended value | |
70a76033 | 1494 | if you have dialup users are no more than 60 seconds to allow |
1495 | the user to redial without hassle. If all your users are | |
1496 | stationary then higher values may be used. | |
1497 | ||
1cdf9bc1 | 1498 | See also the acl max_user_ip. The max_user_ip acl replaces |
b0213b00 | 1499 | the authenticate_ip_ttl_is_strict option found in earlier |
1500 | Squid versions. | |
9bc73deb | 1501 | DOC_END |
1502 | ||
d9572179 | 1503 | NAME: external_acl_type |
1504 | TYPE: externalAclHelper | |
1505 | LOC: Config.externalAclHelperList | |
1506 | DEFAULT: none | |
1507 | DOC_START | |
1508 | This option defines external acl classes using a helper program | |
1509 | to look up the status | |
1510 | ||
1511 | external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..] | |
1512 | ||
1513 | Options: | |
1514 | ||
1515 | ttl=n TTL in seconds for cached results (defaults to 3600 | |
1516 | for 1 hour) | |
1517 | negative_ttl=n | |
1518 | TTL for cached negative lookups (default same | |
1519 | as ttl) | |
94a04679 | 1520 | concurrency=n Concurrency level / number of processes spawn |
d9572179 | 1521 | to service external acl lookups of this type. |
1522 | cache=n result cache size, 0 is unbounded (default) | |
1523 | ||
d9572179 | 1524 | FORMAT specifications |
1525 | ||
1526 | %LOGIN Authenticated user login name | |
1527 | %IDENT Ident user name | |
1528 | %SRC Client IP | |
1529 | %DST Requested host | |
1530 | %PROTO Requested protocol | |
1531 | %PORT Requested port | |
7a31d9e8 | 1532 | %PATH Requested URL path |
d9572179 | 1533 | %METHOD Request method |
1534 | %{Header} HTTP request header | |
1535 | %{Hdr:member} HTTP request header list member | |
1536 | %{Hdr:;member} | |
1537 | HTTP request header list member using ; as | |
1538 | list separator. ; can be any non-alphanumeric | |
1539 | character. | |
1540 | ||
9ad4dd4b | 1541 | In addition, any string specified in the referencing acl will |
1542 | also be included in the helper request line, after the specified | |
1543 | formats (see the "acl external" directive) | |
d9572179 | 1544 | |
9ad4dd4b | 1545 | The helper receives lines per the above format specification, |
1546 | and returns lines starting with OK or ERR indicating the validity | |
1547 | of the request and optionally followed by additional keywords with | |
1548 | more details. | |
87e6f180 | 1549 | |
1550 | General result syntax: | |
1551 | ||
1552 | OK/ERR keyword=value ... | |
1553 | ||
9ad4dd4b | 1554 | Defined keywords: |
87e6f180 | 1555 | |
1556 | user= The users name (login) | |
1557 | error= Error description (only defined for ERR results) | |
1558 | ||
73eab8df | 1559 | Keyword values need to be enclosed in quotes if they may |
1560 | contain whitespace, or the whitespace escaped using \. Any | |
1561 | quotes or \ characters within the keyword value must be \ | |
1562 | escaped. | |
d9572179 | 1563 | DOC_END |
1564 | ||
0f74202c | 1565 | COMMENT_START |
3a278cb8 | 1566 | OPTIONS FOR TUNING THE CACHE |
1567 | ----------------------------------------------------------------------------- | |
0f74202c | 1568 | COMMENT_END |
934b03fc | 1569 | |
0153d498 | 1570 | NAME: wais_relay_host |
1571 | TYPE: string | |
1273d501 | 1572 | DEFAULT: none |
0153d498 | 1573 | LOC: Config.Wais.relayHost |
1574 | DOC_NONE | |
934b03fc | 1575 | |
0153d498 | 1576 | NAME: wais_relay_port |
1577 | TYPE: ushort | |
1578 | DEFAULT: 0 | |
1579 | LOC: Config.Wais.relayPort | |
934b03fc | 1580 | DOC_START |
1581 | Relay WAIS request to host (1st arg) at port (2 arg). | |
934b03fc | 1582 | DOC_END |
1583 | ||
1584 | ||
0483b991 | 1585 | NAME: request_header_max_size |
1586 | COMMENT: (KB) | |
1587 | TYPE: b_size_t | |
1588 | DEFAULT: 10 KB | |
1589 | LOC: Config.maxRequestHeaderSize | |
1590 | DOC_START | |
1591 | This specifies the maximum size for HTTP headers in a request. | |
1592 | Request headers are usually relatively small (about 512 bytes). | |
1593 | Placing a limit on the request header size will catch certain | |
1594 | bugs (for example with persistent connections) and possibly | |
1595 | buffer-overflow or denial-of-service attacks. | |
0483b991 | 1596 | DOC_END |
1597 | ||
1598 | NAME: request_body_max_size | |
9906e724 | 1599 | COMMENT: (KB) |
518da0bd | 1600 | TYPE: b_size_t |
ec719ae2 | 1601 | DEFAULT: 0 KB |
0483b991 | 1602 | LOC: Config.maxRequestBodySize |
934b03fc | 1603 | DOC_START |
0483b991 | 1604 | This specifies the maximum size for an HTTP request body. |
1605 | In other words, the maximum size of a PUT/POST request. | |
1606 | A user who attempts to send a request with a body larger | |
1607 | than this limit receives an "Invalid Request" error message. | |
ec719ae2 | 1608 | If you set this parameter to a zero (the default), there will |
1609 | be no limit imposed. | |
0483b991 | 1610 | DOC_END |
934b03fc | 1611 | |
934b03fc | 1612 | NAME: refresh_pattern |
934b03fc | 1613 | TYPE: refreshpattern |
f1dc9b30 | 1614 | LOC: Config.Refresh |
1273d501 | 1615 | DEFAULT: none |
934b03fc | 1616 | DOC_START |
7ddc902f | 1617 | usage: refresh_pattern [-i] regex min percent max [options] |
1618 | ||
1619 | By default, regular expressions are CASE-SENSITIVE. To make | |
1620 | them case-insensitive, use the -i option. | |
934b03fc | 1621 | |
7e3ce7b9 | 1622 | 'Min' is the time (in minutes) an object without an explicit |
1623 | expiry time should be considered fresh. The recommended | |
1624 | value is 0, any higher values may cause dynamic applications | |
efd900cb | 1625 | to be erroneously cached unless the application designer |
7e3ce7b9 | 1626 | has taken the appropriate actions. |
1627 | ||
1628 | 'Percent' is a percentage of the objects age (time since last | |
efd900cb | 1629 | modification age) an object without explicit expiry time |
7e3ce7b9 | 1630 | will be considered fresh. |
1631 | ||
1632 | 'Max' is an upper limit on how long objects without an explicit | |
1633 | expiry time will be considered fresh. | |
934b03fc | 1634 | |
c20d16c0 | 1635 | options: override-expire |
1dfa1d81 | 1636 | override-lastmod |
cbe3a719 | 1637 | reload-into-ims |
1638 | ignore-reload | |
1dfa1d81 | 1639 | |
1640 | override-expire enforces min age even if the server | |
cbe3a719 | 1641 | sent a Expires: header. Doing this VIOLATES the HTTP |
1642 | standard. Enabling this feature could make you liable | |
1643 | for problems which it causes. | |
1dfa1d81 | 1644 | |
1645 | override-lastmod enforces min age even on objects | |
1646 | that was modified recently. | |
cbe3a719 | 1647 | |
1648 | reload-into-ims changes client no-cache or ``reload'' | |
1649 | to If-Modified-Since requests. Doing this VIOLATES the | |
1650 | HTTP standard. Enabling this feature could make you | |
1651 | liable for problems which it causes. | |
1652 | ||
1653 | ignore-reload ignores a client no-cache or ``reload'' | |
1654 | header. Doing this VIOLATES the HTTP standard. Enabling | |
1655 | this feature could make you liable for problems which | |
1656 | it causes. | |
1dfa1d81 | 1657 | |
934b03fc | 1658 | Please see the file doc/Release-Notes-1.1.txt for a full |
1659 | description of Squid's refresh algorithm. Basically a | |
1dfa1d81 | 1660 | cached object is: (the order is changed from 1.1.X) |
934b03fc | 1661 | |
1dfa1d81 | 1662 | FRESH if expires < now, else STALE |
6b8e7481 | 1663 | STALE if age > max |
1dfa1d81 | 1664 | FRESH if lm-factor < percent, else STALE |
1665 | FRESH if age < min | |
1666 | else STALE | |
934b03fc | 1667 | |
1668 | The refresh_pattern lines are checked in the order listed here. | |
1669 | The first entry which matches is used. If none of the entries | |
1670 | match, then the default will be used. | |
1671 | ||
6b53c392 | 1672 | Note, you must uncomment all the default lines if you want |
1673 | to change one. The default setting is only active if none is | |
1674 | used. | |
8e89beb3 | 1675 | |
1676 | Suggested default: | |
1677 | NOCOMMENT_START | |
1678 | refresh_pattern ^ftp: 1440 20% 10080 | |
1679 | refresh_pattern ^gopher: 1440 0% 1440 | |
1680 | refresh_pattern . 0 20% 4320 | |
1681 | NOCOMMENT_END | |
934b03fc | 1682 | DOC_END |
1683 | ||
0153d498 | 1684 | NAME: quick_abort_min |
9906e724 | 1685 | COMMENT: (KB) |
1686 | TYPE: kb_size_t | |
c68e9c6b | 1687 | DEFAULT: 16 KB |
0153d498 | 1688 | LOC: Config.quickAbort.min |
1689 | DOC_NONE | |
1690 | ||
0153d498 | 1691 | NAME: quick_abort_max |
9906e724 | 1692 | COMMENT: (KB) |
1693 | TYPE: kb_size_t | |
6b53c392 | 1694 | DEFAULT: 16 KB |
0153d498 | 1695 | LOC: Config.quickAbort.max |
1b2f5c2f | 1696 | DOC_NONE |
1697 | ||
1698 | NAME: quick_abort_pct | |
1699 | COMMENT: (percent) | |
1700 | TYPE: int | |
c68e9c6b | 1701 | DEFAULT: 95 |
1b2f5c2f | 1702 | LOC: Config.quickAbort.pct |
934b03fc | 1703 | DOC_START |
9923e308 | 1704 | The cache by default continues downloading aborted requests |
7a61d612 | 1705 | which are almost completed (less than 16 KB remaining). This |
1706 | may be undesirable on slow (e.g. SLIP) links and/or very busy | |
1707 | caches. Impatient users may tie up file descriptors and | |
1708 | bandwidth by repeatedly requesting and immediately aborting | |
1709 | downloads. | |
934b03fc | 1710 | |
1711 | When the user aborts a request, Squid will check the | |
1712 | quick_abort values to the amount of data transfered until | |
1713 | then. | |
1714 | ||
cf5cc17e | 1715 | If the transfer has less than 'quick_abort_min' KB remaining, |
2bb84b43 | 1716 | it will finish the retrieval. |
934b03fc | 1717 | |
cf5cc17e | 1718 | If the transfer has more than 'quick_abort_max' KB remaining, |
1719 | it will abort the retrieval. | |
934b03fc | 1720 | |
1b2f5c2f | 1721 | If more than 'quick_abort_pct' of the transfer has completed, |
1722 | it will finish the retrieval. | |
2bb84b43 | 1723 | |
7a61d612 | 1724 | If you do not want any retrieval to continue after the client |
2bb84b43 | 1725 | has aborted, set both 'quick_abort_min' and 'quick_abort_max' |
1726 | to '0 KB'. | |
1727 | ||
9923e308 | 1728 | If you want retrievals to always continue if they are being |
2bb84b43 | 1729 | cached then set 'quick_abort_min' to '-1 KB'. |
934b03fc | 1730 | DOC_END |
1731 | ||
7e820f36 | 1732 | NAME: read_ahead_gap |
1733 | COMMENT: buffer-size | |
1734 | TYPE: kb_size_t | |
1735 | LOC: Config.readAheadGap | |
1736 | DEFAULT: 16 KB | |
1737 | DOC_START | |
1738 | The amount of data the cache will buffer ahead of what has been | |
1739 | sent to the client when retrieving an object from another server. | |
1740 | DOC_END | |
934b03fc | 1741 | |
1742 | NAME: negative_ttl | |
bc0eb004 | 1743 | COMMENT: time-units |
f1dc9b30 | 1744 | TYPE: time_t |
934b03fc | 1745 | LOC: Config.negativeTtl |
9e975e4e | 1746 | DEFAULT: 5 minutes |
934b03fc | 1747 | DOC_START |
1748 | Time-to-Live (TTL) for failed requests. Certain types of | |
1749 | failures (such as "connection refused" and "404 Not Found") are | |
cf5cc17e | 1750 | negatively-cached for a configurable amount of time. The |
1751 | default is 5 minutes. Note that this is different from | |
1752 | negative caching of DNS lookups. | |
934b03fc | 1753 | DOC_END |
1754 | ||
1755 | ||
1756 | NAME: positive_dns_ttl | |
bc0eb004 | 1757 | COMMENT: time-units |
f1dc9b30 | 1758 | TYPE: time_t |
934b03fc | 1759 | LOC: Config.positiveDnsTtl |
9e975e4e | 1760 | DEFAULT: 6 hours |
934b03fc | 1761 | DOC_START |
1762 | Time-to-Live (TTL) for positive caching of successful DNS lookups. | |
1763 | Default is 6 hours (360 minutes). If you want to minimize the | |
1764 | use of Squid's ipcache, set this to 1, not 0. | |
934b03fc | 1765 | DOC_END |
1766 | ||
1767 | ||
1768 | NAME: negative_dns_ttl | |
bc0eb004 | 1769 | COMMENT: time-units |
f1dc9b30 | 1770 | TYPE: time_t |
934b03fc | 1771 | LOC: Config.negativeDnsTtl |
9e975e4e | 1772 | DEFAULT: 5 minutes |
934b03fc | 1773 | DOC_START |
1774 | Time-to-Live (TTL) for negative caching of failed DNS lookups. | |
934b03fc | 1775 | DOC_END |
1776 | ||
c68e9c6b | 1777 | NAME: range_offset_limit |
1778 | COMMENT: (bytes) | |
1779 | TYPE: b_size_t | |
1780 | LOC: Config.rangeOffsetLimit | |
1781 | DEFAULT: 0 KB | |
1782 | DOC_START | |
1783 | Sets a upper limit on how far into the the file a Range request | |
1784 | may be to cause Squid to prefetch the whole file. If beyond this | |
1785 | limit then Squid forwards the Range request as it is and the result | |
1786 | is NOT cached. | |
1787 | ||
1788 | This is to stop a far ahead range request (lets say start at 17MB) | |
1789 | from making Squid fetch the whole object up to that point before | |
1790 | sending anything to the client. | |
1791 | ||
1792 | A value of -1 causes Squid to always fetch the object from the | |
1793 | beginning so that it may cache the result. (2.0 style) | |
1794 | ||
6e7dbcbd | 1795 | A value of 0 causes Squid to never fetch more than the |
c68e9c6b | 1796 | client requested. (default) |
c68e9c6b | 1797 | DOC_END |
1798 | ||
1799 | ||
0f74202c | 1800 | COMMENT_START |
3a278cb8 | 1801 | TIMEOUTS |
1802 | ----------------------------------------------------------------------------- | |
0f74202c | 1803 | COMMENT_END |
934b03fc | 1804 | |
1805 | NAME: connect_timeout | |
bc0eb004 | 1806 | COMMENT: time-units |
f1dc9b30 | 1807 | TYPE: time_t |
934b03fc | 1808 | LOC: Config.Timeout.connect |
9e975e4e | 1809 | DEFAULT: 2 minutes |
934b03fc | 1810 | DOC_START |
1811 | Some systems (notably Linux) can not be relied upon to properly | |
cf5cc17e | 1812 | time out connect(2) requests. Therefore the Squid process |
934b03fc | 1813 | enforces its own timeout on server connections. This parameter |
1814 | specifies how long to wait for the connect to complete. The | |
1815 | default is two minutes (120 seconds). | |
934b03fc | 1816 | DOC_END |
1817 | ||
3f62decd | 1818 | NAME: peer_connect_timeout |
1819 | COMMENT: time-units | |
1820 | TYPE: time_t | |
1821 | LOC: Config.Timeout.peer_connect | |
1822 | DEFAULT: 30 seconds | |
1823 | DOC_START | |
1824 | This parameter specifies how long to wait for a pending TCP | |
1825 | connection to a peer cache. The default is 30 seconds. You | |
1826 | may also set different timeout values for individual neighbors | |
1827 | with the 'connect-timeout' option on a 'cache_peer' line. | |
9bc73deb | 1828 | DOC_END |
3f62decd | 1829 | |
23d92c64 | 1830 | NAME: siteselect_timeout |
1831 | COMMENT: time-units | |
1832 | TYPE: time_t | |
1833 | LOC: Config.Timeout.siteSelect | |
1834 | DEFAULT: 4 seconds | |
1835 | DOC_START | |
1836 | For URN to multiple URL's URL selection | |
23d92c64 | 1837 | DOC_END |
934b03fc | 1838 | |
1839 | NAME: read_timeout | |
bc0eb004 | 1840 | COMMENT: time-units |
f1dc9b30 | 1841 | TYPE: time_t |
934b03fc | 1842 | LOC: Config.Timeout.read |
9e975e4e | 1843 | DEFAULT: 15 minutes |
934b03fc | 1844 | DOC_START |
1845 | The read_timeout is applied on server-side connections. After | |
1846 | each successful read(), the timeout will be extended by this | |
1847 | amount. If no data is read again after this amount of time, | |
1848 | the request is aborted and logged with ERR_READ_TIMEOUT. The | |
1849 | default is 15 minutes. | |
934b03fc | 1850 | DOC_END |
1851 | ||
1852 | ||
934b03fc | 1853 | NAME: request_timeout |
f1dc9b30 | 1854 | TYPE: time_t |
934b03fc | 1855 | LOC: Config.Timeout.request |
049d61bb | 1856 | DEFAULT: 5 minutes |
1857 | DOC_START | |
1858 | How long to wait for an HTTP request after initial | |
1859 | connection establishment. | |
1860 | DOC_END | |
1861 | ||
1862 | ||
1863 | NAME: persistent_request_timeout | |
1864 | TYPE: time_t | |
1865 | LOC: Config.Timeout.persistent_request | |
1866 | DEFAULT: 1 minute | |
934b03fc | 1867 | DOC_START |
049d61bb | 1868 | How long to wait for the next HTTP request on a persistent |
1869 | connection after the previous request completes. | |
934b03fc | 1870 | DOC_END |
1871 | ||
1872 | ||
1873 | NAME: client_lifetime | |
bc0eb004 | 1874 | COMMENT: time-units |
f1dc9b30 | 1875 | TYPE: time_t |
934b03fc | 1876 | LOC: Config.Timeout.lifetime |
9e975e4e | 1877 | DEFAULT: 1 day |
934b03fc | 1878 | DOC_START |
1879 | The maximum amount of time that a client (browser) is allowed to | |
1880 | remain connected to the cache process. This protects the Cache | |
efd900cb | 1881 | from having a lot of sockets (and hence file descriptors) tied up |
934b03fc | 1882 | in a CLOSE_WAIT state from remote clients that go away without |
1883 | properly shutting down (either because of a network failure or | |
1884 | because of a poor client implementation). The default is one | |
1885 | day, 1440 minutes. | |
1886 | ||
1887 | NOTE: The default value is intended to be much larger than any | |
1888 | client would ever need to be connected to your cache. You | |
1889 | should probably change client_lifetime only as a last resort. | |
1890 | If you seem to have many client connections tying up | |
1891 | filedescriptors, we recommend first tuning the read_timeout, | |
049d61bb | 1892 | request_timeout, persistent_request_timeout and quick_abort values. |
934b03fc | 1893 | DOC_END |
1894 | ||
ea285003 | 1895 | NAME: half_closed_clients |
1896 | TYPE: onoff | |
1897 | LOC: Config.onoff.half_closed_clients | |
1898 | DEFAULT: on | |
1899 | DOC_START | |
1900 | Some clients may shutdown the sending side of their TCP | |
1901 | connections, while leaving their receiving sides open. Sometimes, | |
1902 | Squid can not tell the difference between a half-closed and a | |
1903 | fully-closed TCP connection. By default, half-closed client | |
1904 | connections are kept open until a read(2) or write(2) on the | |
1905 | socket returns an error. Change this option to 'off' and Squid | |
1906 | will immediately close client connections when read(2) returns | |
1907 | "no more data to read." | |
ea285003 | 1908 | DOC_END |
1909 | ||
603a02fd | 1910 | NAME: pconn_timeout |
1911 | TYPE: time_t | |
1912 | LOC: Config.Timeout.pconn | |
1913 | DEFAULT: 120 seconds | |
1914 | DOC_START | |
1915 | Timeout for idle persistent connections to servers and other | |
1916 | proxies. | |
603a02fd | 1917 | DOC_END |
1918 | ||
05832ae1 | 1919 | NAME: ident_timeout |
1920 | TYPE: time_t | |
3898f57f | 1921 | IFDEF: USE_IDENT |
05832ae1 | 1922 | LOC: Config.Timeout.ident |
1923 | DEFAULT: 10 seconds | |
1924 | DOC_START | |
c463eb5f | 1925 | Maximum time to wait for IDENT lookups to complete. |
1926 | ||
1927 | If this is too high, and you enabled IDENT lookups from untrusted | |
1928 | users, then you might be susceptible to denial-of-service by having | |
1929 | many ident requests going at once. | |
05832ae1 | 1930 | DOC_END |
1931 | ||
934b03fc | 1932 | |
1933 | NAME: shutdown_lifetime | |
bc0eb004 | 1934 | COMMENT: time-units |
f1dc9b30 | 1935 | TYPE: time_t |
934b03fc | 1936 | LOC: Config.shutdownLifetime |
9e975e4e | 1937 | DEFAULT: 30 seconds |
934b03fc | 1938 | DOC_START |
1939 | When SIGTERM or SIGHUP is received, the cache is put into | |
1940 | "shutdown pending" mode until all active sockets are closed. | |
1941 | This value is the lifetime to set for all open descriptors | |
1942 | during shutdown mode. Any active clients after this many | |
1943 | seconds will receive a 'timeout' message. | |
934b03fc | 1944 | DOC_END |
1945 | ||
0f74202c | 1946 | COMMENT_START |
3a278cb8 | 1947 | ACCESS CONTROLS |
1948 | ----------------------------------------------------------------------------- | |
0f74202c | 1949 | COMMENT_END |
934b03fc | 1950 | |
1951 | NAME: acl | |
1952 | TYPE: acl | |
f1dc9b30 | 1953 | LOC: Config.aclList |
1954 | DEFAULT: none | |
934b03fc | 1955 | DOC_START |
1956 | Defining an Access List | |
1957 | ||
1958 | acl aclname acltype string1 ... | |
1959 | acl aclname acltype "file" ... | |
1960 | ||
1961 | when using "file", the file should contain one item per line | |
1962 | ||
fc659d9d | 1963 | acltype is one of the types described below |
934b03fc | 1964 | |
edd80fbb | 1965 | By default, regular expressions are CASE-SENSITIVE. To make |
1966 | them case-insensitive, use the -i option. | |
1967 | ||
934b03fc | 1968 | acl aclname src ip-address/netmask ... (clients IP address) |
1969 | acl aclname src addr1-addr2/netmask ... (range of addresses) | |
1970 | acl aclname dst ip-address/netmask ... (URL host's IP address) | |
ae2c08a2 | 1971 | acl aclname myip ip-address/netmask ... (local socket IP address) |
d0d41f07 | 1972 | |
efd900cb | 1973 | acl aclname srcdomain .foo.com ... # reverse lookup, client IP |
1974 | acl aclname dstdomain .foo.com ... # Destination server from URL | |
edd80fbb | 1975 | acl aclname srcdom_regex [-i] xxx ... # regex matching client name |
1976 | acl aclname dstdom_regex [-i] xxx ... # regex matching server | |
d0d41f07 | 1977 | # For dstdomain and dstdom_regex a reverse lookup is tried if a IP |
1978 | # based URL is used. The name "none" is used if the reverse lookup | |
1979 | # fails. | |
1980 | ||
934b03fc | 1981 | acl aclname time [day-abbrevs] [h1:m1-h2:m2] |
1982 | day-abbrevs: | |
1983 | S - Sunday | |
1984 | M - Monday | |
1985 | T - Tuesday | |
1986 | W - Wednesday | |
1987 | H - Thursday | |
1988 | F - Friday | |
1989 | A - Saturday | |
1990 | h1:m1 must be less than h2:m2 | |
edd80fbb | 1991 | acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL |
1992 | acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path | |
934b03fc | 1993 | acl aclname port 80 70 21 ... |
ec5bba4d | 1994 | acl aclname port 0-1024 ... # ranges allowed |
7e3ce7b9 | 1995 | acl aclname myport 3128 ... # (local socket TCP port) |
934b03fc | 1996 | acl aclname proto HTTP FTP ... |
1997 | acl aclname method GET POST ... | |
fc659d9d | 1998 | acl aclname browser [-i] regexp ... |
edd80fbb | 1999 | # pattern match on User-Agent header |
fc659d9d | 2000 | acl aclname referer_regex [-i] regexp ... |
2001 | # pattern match on Referer header | |
2002 | # Referer is highly unreliable, so use with care | |
c68e9c6b | 2003 | acl aclname ident username ... |
145cf928 | 2004 | acl aclname ident_regex [-i] pattern ... |
c68e9c6b | 2005 | # string match on ident output. |
2006 | # use REQUIRED to accept any non-null ident. | |
96d88dcb | 2007 | acl aclname src_as number ... |
6468fe10 | 2008 | acl aclname dst_as number ... |
2009 | # Except for access control, AS numbers can be used for | |
96d88dcb | 2010 | # routing of requests to specific caches. Here's an |
2011 | # example for routing all requests for AS#1241 and only | |
6468fe10 | 2012 | # those to mycache.mydomain.net: |
2013 | # acl asexample dst_as 1241 | |
d87ebd78 | 2014 | # cache_peer_access mycache.mydomain.net allow asexample |
2015 | # cache_peer_access mycache_mydomain.net deny all | |
6468fe10 | 2016 | |
c68e9c6b | 2017 | acl aclname proxy_auth username ... |
145cf928 | 2018 | acl aclname proxy_auth_regex [-i] pattern ... |
c68e9c6b | 2019 | # list of valid usernames |
2020 | # use REQUIRED to accept any valid username. | |
73e67ee0 | 2021 | # |
2022 | # NOTE: when a Proxy-Authentication header is sent but it is not | |
2023 | # needed during ACL checking the username is NOT logged | |
2024 | # in access.log. | |
c68e9c6b | 2025 | # |
2026 | # NOTE: proxy_auth requires a EXTERNAL authentication program | |
2027 | # to check username/password combinations (see | |
2028 | # authenticate_program). | |
2029 | # | |
2030 | # WARNING: proxy_auth can't be used in a transparent proxy. It | |
2031 | # collides with any authentication done by origin servers. It may | |
2032 | # seem like it works at first, but it doesn't. | |
934b03fc | 2033 | |
dba79ac5 | 2034 | acl aclname snmp_community string ... |
08f6b5e0 | 2035 | # A community string to limit access to your SNMP Agent |
dba79ac5 | 2036 | # Example: |
96d88dcb | 2037 | # |
dba79ac5 | 2038 | # acl snmppublic snmp_community public |
2039 | ||
9bc73deb | 2040 | acl aclname maxconn number |
2041 | # This will be matched when the client's IP address has | |
2042 | # more than <number> HTTP connections established. | |
2043 | ||
be5caa55 | 2044 | acl aclname max_user_ip [-s] number |
96d88dcb | 2045 | # This will be matched when the user attempts to log in from more |
60d096f4 | 2046 | # than <number> different ip address's. The authenticate_ip_ttl |
2047 | # parameter controls the timeout on the ip entries. | |
be5caa55 | 2048 | # If -s is specified then the limit is strict, denying browsing |
2049 | # from any further IP addresses until the ttl has expired. Without | |
2050 | # -s Squid will just annoy the user by "randomly" deny requests. | |
2051 | # (the counter is then reset each time the limit is reached and a | |
2052 | # request is denied) | |
2053 | # NOTE: in acceleration mode or where there is mesh of child proxies, | |
2054 | # clients may appear to come from multiple address's if they are | |
2055 | # going through proxy farms, so a limit of 1 may cause user problems. | |
60d096f4 | 2056 | |
fb8ee28e | 2057 | acl aclname req_mime_type mime-type1 ... |
ba2b31a8 | 2058 | # regex match agains the mime type of the request generated |
2059 | # by the client. Can be used to detect file upload or some | |
2060 | # types HTTP tunelling requests. | |
2061 | # NOTE: This does NOT match the reply. You cannot use this | |
2062 | # to match the returned file type. | |
c68e9c6b | 2063 | |
fb8ee28e | 2064 | acl aclname rep_mime_type mime-type1 ... |
c4ab8329 | 2065 | # regex match against the mime type of the reply recieved by |
2066 | # squid. Can be used to detect file download or some | |
2067 | # types HTTP tunelling requests. | |
2068 | # NOTE: This has no effect in http_access rules. It only has | |
2069 | # effect in rules that affect the reply data stream such as | |
2070 | # http_reply_access. | |
2071 | ||
d9572179 | 2072 | acl acl_name external class_name [arguments...] |
2073 | # external ACL lookup via a helper class defined by the | |
2074 | # external_acl_type directive. | |
c4ab8329 | 2075 | |
c68e9c6b | 2076 | Examples: |
2077 | acl myexample dst_as 1241 | |
aa6956a5 | 2078 | acl password proxy_auth REQUIRED |
ba2b31a8 | 2079 | acl fileupload req_mime_type -i ^multipart/form-data$ |
c4ab8329 | 2080 | acl javascript rep_mime_type -i ^application/x-javascript$ |
c68e9c6b | 2081 | |
c68e9c6b | 2082 | NOCOMMENT_START |
6b53c392 | 2083 | #Recommended minimum configuration: |
c68e9c6b | 2084 | acl all src 0.0.0.0/0.0.0.0 |
934b03fc | 2085 | acl manager proto cache_object |
2086 | acl localhost src 127.0.0.1/255.255.255.255 | |
4cc6eb12 | 2087 | acl to_localhost dst 127.0.0.0/8 |
934b03fc | 2088 | acl SSL_ports port 443 563 |
6b53c392 | 2089 | acl Safe_ports port 80 # http |
2090 | acl Safe_ports port 21 # ftp | |
2091 | acl Safe_ports port 443 563 # https, snews | |
2092 | acl Safe_ports port 70 # gopher | |
2093 | acl Safe_ports port 210 # wais | |
2094 | acl Safe_ports port 1025-65535 # unregistered ports | |
9bc73deb | 2095 | acl Safe_ports port 280 # http-mgmt |
2096 | acl Safe_ports port 488 # gss-http | |
2097 | acl Safe_ports port 591 # filemaker | |
2098 | acl Safe_ports port 777 # multiling http | |
934b03fc | 2099 | acl CONNECT method CONNECT |
c68e9c6b | 2100 | NOCOMMENT_END |
934b03fc | 2101 | DOC_END |
2102 | ||
2103 | NAME: http_access | |
2104 | TYPE: acl_access | |
f1dc9b30 | 2105 | LOC: Config.accessList.http |
2106 | DEFAULT: none | |
da7f354f | 2107 | DEFAULT_IF_NONE: deny all |
934b03fc | 2108 | DOC_START |
2109 | Allowing or Denying access based on defined access lists | |
2110 | ||
2111 | Access to the HTTP port: | |
2112 | http_access allow|deny [!]aclname ... | |
2113 | ||
934b03fc | 2114 | NOTE on default values: |
2115 | ||
6b53c392 | 2116 | If there are no "access" lines present, the default is to deny |
934b03fc | 2117 | the request. |
2118 | ||
2119 | If none of the "access" lines cause a match, the default is the | |
2120 | opposite of the last line in the list. If the last line was | |
2121 | deny, then the default is allow. Conversely, if the last line | |
2122 | is allow, the default will be deny. For these reasons, it is a | |
2123 | good idea to have an "deny all" or "allow all" entry at the end | |
2124 | of your access lists to avoid potential confusion. | |
2125 | ||
c68e9c6b | 2126 | NOCOMMENT_START |
6b53c392 | 2127 | #Recommended minimum configuration: |
2128 | # | |
2129 | # Only allow cachemgr access from localhost | |
c68e9c6b | 2130 | http_access allow manager localhost |
2131 | http_access deny manager | |
6b53c392 | 2132 | # Deny requests to unknown ports |
499558df | 2133 | http_access deny !Safe_ports |
6b53c392 | 2134 | # Deny CONNECT to other than SSL ports |
c68e9c6b | 2135 | http_access deny CONNECT !SSL_ports |
2136 | # | |
4cc6eb12 | 2137 | # We strongly recommend to uncomment the following to protect innocent |
2138 | # web applications running on the proxy server who think that the only | |
2139 | # one who can access services on "localhost" is a local user | |
2140 | #http_access deny to_localhost | |
c68e9c6b | 2141 | # |
4cc6eb12 | 2142 | # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS |
2143 | ||
b9d7fe3e | 2144 | # Exampe rule allowing access from your local networks. Adapt |
2145 | # to list your (internal) IP networks from where browsing should | |
2146 | # be allowed | |
2147 | #acl our_networks src 192.168.1.0/24 192.168.2.0/24 | |
2148 | #http_access allow our_networks | |
2149 | ||
6b53c392 | 2150 | # And finally deny all other access to this proxy |
c68e9c6b | 2151 | http_access deny all |
2152 | NOCOMMENT_END | |
934b03fc | 2153 | DOC_END |
2154 | ||
c4ab8329 | 2155 | NAME: http_reply_access |
2156 | TYPE: acl_access | |
2157 | LOC: Config.accessList.reply | |
2158 | DEFAULT: none | |
2159 | DEFAULT_IF_NONE: allow all | |
2160 | DOC_START | |
2161 | Allow replies to client requests. This is complementary to http_access. | |
2162 | ||
2163 | http_reply_access allow|deny [!] aclname ... | |
2164 | ||
96d88dcb | 2165 | NOTE: if there are no access lines present, the default is to allow |
c4ab8329 | 2166 | all replies |
2167 | ||
2168 | If none of the access lines cause a match, then the opposite of the | |
2169 | last line will apply. Thus it is good practice to end the rules | |
2170 | with an "allow all" or "deny all" entry. | |
2171 | ||
2172 | NOCOMMENT_START | |
2173 | #Recommended minimum configuration: | |
2174 | # | |
2175 | # Insert your own rules here. | |
2176 | # | |
2177 | # | |
2178 | # and finally allow by default | |
2179 | http_reply_access allow all | |
2180 | NOCOMMENT_END | |
2181 | DOC_END | |
2182 | ||
934b03fc | 2183 | |
2184 | NAME: icp_access | |
2185 | TYPE: acl_access | |
f1dc9b30 | 2186 | LOC: Config.accessList.icp |
2187 | DEFAULT: none | |
da7f354f | 2188 | DEFAULT_IF_NONE: deny all |
934b03fc | 2189 | DOC_START |
6b53c392 | 2190 | Allowing or Denying access to the ICP port based on defined |
2191 | access lists | |
2192 | ||
2193 | icp_access allow|deny [!]aclname ... | |
2194 | ||
2195 | See http_access for details | |
934b03fc | 2196 | |
c68e9c6b | 2197 | NOCOMMENT_START |
403b5e7b | 2198 | #Allow ICP queries from everyone |
c68e9c6b | 2199 | icp_access allow all |
2200 | NOCOMMENT_END | |
934b03fc | 2201 | DOC_END |
2202 | ||
2203 | ||
2204 | NAME: miss_access | |
2205 | TYPE: acl_access | |
f1dc9b30 | 2206 | LOC: Config.accessList.miss |
2207 | DEFAULT: none | |
934b03fc | 2208 | DOC_START |
2209 | Use to force your neighbors to use you as a sibling instead of | |
2210 | a parent. For example: | |
2211 | ||
2212 | acl localclients src 172.16.0.0/16 | |
2213 | miss_access allow localclients | |
2214 | miss_access deny !localclients | |
2215 | ||
2216 | This means that only your local clients are allowed to fetch | |
2217 | MISSES and all other clients can only fetch HITS. | |
2218 | ||
2219 | By default, allow all clients who passed the http_access rules | |
2220 | to fetch MISSES from us. | |
6b53c392 | 2221 | |
c68e9c6b | 2222 | NOCOMMENT_START |
6b53c392 | 2223 | #Default setting: |
2224 | # miss_access allow all | |
c68e9c6b | 2225 | NOCOMMENT_END |
934b03fc | 2226 | DOC_END |
2227 | ||
2228 | ||
505e35db | 2229 | NAME: cache_peer_access |
2230 | TYPE: peer_access | |
f1dc9b30 | 2231 | DEFAULT: none |
2232 | LOC: none | |
934b03fc | 2233 | DOC_START |
505e35db | 2234 | Similar to 'cache_peer_domain' but provides more flexibility by |
2235 | using ACL elements. | |
934b03fc | 2236 | |
505e35db | 2237 | cache_peer_access cache-host allow|deny [!]aclname ... |
934b03fc | 2238 | |
505e35db | 2239 | The syntax is identical to 'http_access' and the other lists of |
2240 | ACL elements. See the comments for 'http_access' below, or | |
2b6662ba | 2241 | the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html). |
934b03fc | 2242 | DOC_END |
2243 | ||
ec603b25 | 2244 | NAME: ident_lookup_access |
2245 | TYPE: acl_access | |
2246 | IFDEF: USE_IDENT | |
2247 | DEFAULT: none | |
2248 | DEFAULT_IF_NONE: deny all | |
2249 | LOC: Config.accessList.identLookup | |
2250 | DOC_START | |
2251 | A list of ACL elements which, if matched, cause an ident | |
2252 | (RFC 931) lookup to be performed for this request. For | |
2253 | example, you might choose to always perform ident lookups | |
2254 | for your main multi-user Unix boxes, but not for your Macs | |
2255 | and PCs. By default, ident lookups are not performed for | |
2256 | any requests. | |
2257 | ||
2258 | To enable ident lookups for specific client addresses, you | |
2259 | can follow this example: | |
96d88dcb | 2260 | |
ec603b25 | 2261 | acl ident_aware_hosts src 198.168.1.0/255.255.255.0 |
2262 | ident_lookup_access allow ident_aware_hosts | |
2263 | ident_lookup_access deny all | |
2264 | ||
c463eb5f | 2265 | Only src type ACL checks are fully supported. A src_domain |
2266 | ACL might work at times, but it will not always provide | |
2267 | the correct result. | |
ec603b25 | 2268 | DOC_END |
2269 | ||
43a5f06a | 2270 | NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp |
d6827718 | 2271 | TYPE: acl_tos |
2272 | DEFAULT: none | |
2273 | LOC: Config.accessList.outgoing_tos | |
2274 | DOC_START | |
2275 | Allows you to select a TOS/Diffserv value to mark outgoing | |
2276 | connections with, based on the username or source address | |
2277 | making the request. | |
2278 | ||
2279 | tcp_outgoing_tos ds-field [!]aclname ... | |
2280 | ||
2281 | Example where normal_service_net uses the TOS value 0x00 | |
2282 | and normal_service_net uses 0x20 | |
2283 | ||
2284 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
2285 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
2286 | tcp_outgoing_tos 0x00 normal_service_net 0x00 | |
2287 | tcp_outgoing_tos 0x20 good_service_net | |
2288 | ||
2289 | TOS/DSCP values really only have local significance - so you should | |
2290 | know what you're specifying. For more, see RFC 2474 | |
2291 | ||
2292 | The TOS/DSCP byte must be exactly that - a byte, value 0 - 255, or | |
2293 | "default" to use whatever default your host has. | |
2294 | ||
2295 | Processing proceeds in the order specified, and stops at first fully | |
2296 | matching line. | |
2297 | DOC_END | |
2298 | ||
2299 | NAME: tcp_outgoing_address | |
2300 | TYPE: acl_address | |
2301 | DEFAULT: none | |
2302 | LOC: Config.accessList.outgoing_address | |
2303 | DOC_START | |
2304 | Allows you to map requests to different outgoing IP addresses | |
2305 | based on the username or sourceaddress of the user making | |
2306 | the request. | |
2307 | ||
2308 | tcp_outgoing_address ipaddr [[!]aclname] ... | |
2309 | ||
2310 | Example where requests from 10.0.0.0/24 will be forwareded | |
2311 | with source address 10.1.0.1, 10.0.2.0/24 forwarded with | |
2312 | source address 10.1.0.2 and the rest will be forwarded with | |
2313 | source address 10.1.0.3. | |
2314 | ||
2315 | acl normal_service_net src 10.0.0.0/255.255.255.0 | |
2316 | acl good_service_net src 10.0.1.0/255.255.255.0 | |
2317 | tcp_outgoing_address 10.0.0.1 normal_service_net | |
2318 | tcp_outgoing_address 10.0.0.2 good_service_net | |
2319 | tcp_outgoing_address 10.0.0.3 | |
2320 | ||
2321 | Processing proceeds in the order specified, and stops at first fully | |
2322 | matching line. | |
2323 | DOC_END | |
ec603b25 | 2324 | |
a560ee93 | 2325 | NAME: reply_body_max_size |
2326 | COMMENT: bytes allow|deny acl acl... | |
2327 | TYPE: body_size_t | |
2328 | DEFAULT: none | |
2329 | DEFAULT_IF_NONE: 0 allow all | |
2330 | LOC: Config.ReplyBodySize | |
2331 | DOC_START | |
2332 | This option specifies the maximum size of a reply body. It | |
2333 | can be used to prevent users from downloading very large files, | |
2334 | such as MP3's and movies. When the reply headers are recieved, | |
2335 | the reply_body_max_size lines are processed, and the first line with | |
2336 | a result of "allow" is used as the maximum body size for this reply. | |
2337 | This size is then checked twice. First when we get the reply headers, | |
2338 | we check the content-length value. If the content length value exists | |
2339 | and is larger than the allowed size, the request is denied and the | |
2340 | user receives an error message that says "the request or reply | |
2341 | is too large." If there is no content-length, and the reply | |
2342 | size exceeds this limit, the client's connection is just closed | |
2343 | and they will receive a partial reply. | |
2344 | ||
2345 | WARNING: downstream caches probably can not detect a partial reply | |
2346 | if there is no content-length header, so they will cache | |
2347 | partial responses and give them out as hits. You should NOT | |
2348 | use this option if you have downstream caches. | |
2349 | ||
96d88dcb | 2350 | WARNING: A maximum size larger than the size of squid's error messages |
a560ee93 | 2351 | will cause an infinite loop and crash squid. Ensure that the smallest |
2352 | non-zero value you use is greater that the maximum header size plus | |
2353 | the size of your largest error page. | |
2354 | ||
2355 | If you set this parameter to zero (the default), there will be | |
2356 | no limit imposed. | |
2357 | DOC_END | |
2358 | ||
0f74202c | 2359 | COMMENT_START |
3a278cb8 | 2360 | ADMINISTRATIVE PARAMETERS |
2361 | ----------------------------------------------------------------------------- | |
0f74202c | 2362 | COMMENT_END |
934b03fc | 2363 | |
2364 | NAME: cache_mgr | |
2365 | TYPE: string | |
2366 | DEFAULT: webmaster | |
2367 | LOC: Config.adminEmail | |
2368 | DOC_START | |
2369 | Email-address of local cache manager who will receive | |
2370 | mail if the cache dies. The default is "webmaster." | |
934b03fc | 2371 | DOC_END |
2372 | ||
2373 | ||
2374 | NAME: cache_effective_user | |
0153d498 | 2375 | TYPE: string |
a95856a0 | 2376 | DEFAULT: nobody |
0153d498 | 2377 | LOC: Config.effectiveUser |
2378 | DOC_NONE | |
2379 | ||
2380 | NAME: cache_effective_group | |
2381 | TYPE: string | |
8749fa47 | 2382 | DEFAULT: none |
0153d498 | 2383 | LOC: Config.effectiveGroup |
934b03fc | 2384 | DOC_START |
5a3f6538 | 2385 | |
934b03fc | 2386 | If the cache is run as root, it will change its effective/real |
5a3f6538 | 2387 | UID/GID to the UID/GID specified below. The default is to |
8749fa47 | 2388 | change to UID to nobody and GID to the default group of nobody. |
5a3f6538 | 2389 | |
2390 | If Squid is not started as root, the default is to keep the | |
8749fa47 | 2391 | current UID/GID, and only the GID can be changed to any of |
2392 | the groups the user starting Squid is member of. Note that if | |
2393 | Squid is not started as root then you cannot set http_port to | |
2394 | a value lower than 1024. | |
934b03fc | 2395 | DOC_END |
2396 | ||
2397 | ||
2398 | NAME: visible_hostname | |
2399 | TYPE: string | |
2400 | LOC: Config.visibleHostname | |
f1dc9b30 | 2401 | DEFAULT: none |
934b03fc | 2402 | DOC_START |
2403 | If you want to present a special hostname in error messages, etc, | |
2404 | then define this. Otherwise, the return value of gethostname() | |
cf5cc17e | 2405 | will be used. If you have multiple caches in a cluster and |
2406 | get errors about IP-forwarding you must set them to have individual | |
2407 | names with this setting. | |
934b03fc | 2408 | DOC_END |
2409 | ||
98829f69 | 2410 | |
2411 | NAME: unique_hostname | |
2412 | TYPE: string | |
2413 | LOC: Config.uniqueHostname | |
2414 | DEFAULT: none | |
2415 | DOC_START | |
2416 | If you want to have multiple machines with the same | |
2417 | 'visible_hostname' then you must give each machine a different | |
2418 | 'unique_hostname' so that forwarding loops can be detected. | |
98829f69 | 2419 | DOC_END |
2420 | ||
1f38f50a | 2421 | |
2422 | NAME: hostname_aliases | |
2423 | TYPE: wordlist | |
2424 | LOC: Config.hostnameAliases | |
2425 | DEFAULT: none | |
2426 | DOC_START | |
2427 | A list of other DNS names that your cache has. | |
2428 | DOC_END | |
2429 | ||
0f74202c | 2430 | COMMENT_START |
3a278cb8 | 2431 | OPTIONS FOR THE CACHE REGISTRATION SERVICE |
2432 | ----------------------------------------------------------------------------- | |
934b03fc | 2433 | |
3a278cb8 | 2434 | This section contains parameters for the (optional) cache |
2435 | announcement service. This service is provided to help | |
2436 | cache administrators locate one another in order to join or | |
2437 | create cache hierarchies. | |
934b03fc | 2438 | |
3a278cb8 | 2439 | An 'announcement' message is sent (via UDP) to the registration |
efd900cb | 2440 | service by Squid. By default, the announcement message is NOT |
d2d631ce | 2441 | SENT unless you enable it with 'announce_period' below. |
3a278cb8 | 2442 | |
2443 | The announcement message includes your hostname, plus the | |
2444 | following information from this configuration file: | |
934b03fc | 2445 | |
3a278cb8 | 2446 | http_port |
2447 | icp_port | |
2448 | cache_mgr | |
2449 | ||
2450 | All current information is processed regularly and made | |
2b6662ba | 2451 | available on the Web at http://www.ircache.net/Cache/Tracker/. |
0f74202c | 2452 | COMMENT_END |
934b03fc | 2453 | |
f1dc9b30 | 2454 | NAME: announce_period |
2455 | TYPE: time_t | |
2456 | LOC: Config.Announce.period | |
d2d631ce | 2457 | DEFAULT: 0 |
934b03fc | 2458 | DOC_START |
d2d631ce | 2459 | This is how frequently to send cache announcements. The |
2460 | default is `0' which disables sending the announcement | |
2461 | messages. | |
934b03fc | 2462 | |
cd748f27 | 2463 | To enable announcing your cache, just uncomment the line |
2464 | below. | |
2465 | ||
6b53c392 | 2466 | NOCOMMENT_START |
2467 | #To enable announcing your cache, just uncomment the line below. | |
2468 | #announce_period 1 day | |
2469 | NOCOMMENT_END | |
934b03fc | 2470 | DOC_END |
2471 | ||
2472 | ||
f1dc9b30 | 2473 | NAME: announce_host |
2474 | TYPE: string | |
61735fcf | 2475 | DEFAULT: tracker.ircache.net |
f1dc9b30 | 2476 | LOC: Config.Announce.host |
2477 | DOC_NONE | |
2478 | ||
cf5cc17e | 2479 | NAME: announce_file |
2480 | TYPE: string | |
61735fcf | 2481 | DEFAULT: none |
cf5cc17e | 2482 | LOC: Config.Announce.file |
2483 | DOC_NONE | |
2484 | ||
f1dc9b30 | 2485 | NAME: announce_port |
2486 | TYPE: ushort | |
2487 | DEFAULT: 3131 | |
2488 | LOC: Config.Announce.port | |
934b03fc | 2489 | DOC_START |
d2d631ce | 2490 | announce_host and announce_port set the hostname and port |
2491 | number where the registration message will be sent. | |
934b03fc | 2492 | |
d2d631ce | 2493 | Hostname will default to 'tracker.ircache.net' and port will |
2494 | default default to 3131. If the 'filename' argument is given, | |
2495 | the contents of that file will be included in the announce | |
2496 | message. | |
934b03fc | 2497 | DOC_END |
2498 | ||
0f74202c | 2499 | COMMENT_START |
3a278cb8 | 2500 | HTTPD-ACCELERATOR OPTIONS |
2501 | ----------------------------------------------------------------------------- | |
0f74202c | 2502 | COMMENT_END |
934b03fc | 2503 | |
f1dc9b30 | 2504 | NAME: httpd_accel_host |
2505 | TYPE: string | |
2506 | LOC: Config.Accel.host | |
2507 | DEFAULT: none | |
2508 | DOC_NONE | |
2509 | ||
2510 | NAME: httpd_accel_port | |
2511 | TYPE: ushort | |
2512 | LOC: Config.Accel.port | |
5b68a4d3 | 2513 | DEFAULT: 80 |
934b03fc | 2514 | DOC_START |
cf5cc17e | 2515 | If you want to run Squid as an httpd accelerator, define the |
934b03fc | 2516 | host name and port number where the real HTTP server is. |
2517 | ||
2c10d62d | 2518 | If you want IP based virtual host support then specify the |
2519 | hostname as "virtual". This will make Squid use the IP address | |
2520 | where it accepted the request as hostname in the URL. | |
934b03fc | 2521 | |
42b51993 | 2522 | If you want virtual port support then specify the port as "0". |
2523 | ||
839491ad | 2524 | NOTE: enabling httpd_accel_host disables proxy-caching and |
2525 | ICP. If you want these features enabled also, then set | |
2526 | the 'httpd_accel_with_proxy' option. | |
934b03fc | 2527 | DOC_END |
2528 | ||
13c7936a | 2529 | NAME: httpd_accel_single_host |
2530 | COMMENT: on|off | |
2531 | TYPE: onoff | |
2532 | LOC: Config.Accel.single_host | |
b0a9b5f2 | 2533 | DEFAULT: off |
13c7936a | 2534 | DOC_START |
54bab452 | 2535 | If you are running Squid as an accelerator and have a single backend |
13c7936a | 2536 | server then set this to on. This causes Squid to forward the request |
2537 | to this server irregardles of what any redirectors or Host headers | |
2538 | says. | |
2539 | ||
b0a9b5f2 | 2540 | Leave this at off if you have multiple backend servers, and use a |
2541 | redirector (or host table or private DNS) to map the requests to the | |
13c7936a | 2542 | appropriate backend servers. Note that the mapping needs to be a |
2543 | 1-1 mapping between requested and backend (from redirector) domain | |
2544 | names or caching will fail, as cacing is performed using the | |
2545 | URL returned from the redirector. | |
2546 | ||
2547 | See also redirect_rewrites_host_header. | |
2548 | DOC_END | |
934b03fc | 2549 | |
2550 | NAME: httpd_accel_with_proxy | |
2551 | COMMENT: on|off | |
2552 | TYPE: onoff | |
f1dc9b30 | 2553 | DEFAULT: off |
17a0a4ee | 2554 | LOC: Config.onoff.accel_with_proxy |
934b03fc | 2555 | DOC_START |
cf5cc17e | 2556 | If you want to use Squid as both a local httpd accelerator |
6b53c392 | 2557 | and as a proxy, change this to 'on'. Note however that your |
2558 | proxy users may have trouble to reach the accelerated domains | |
2559 | unless their browsers are configured not to use this proxy for | |
2560 | those domains (for example via the no_proxy browser configuration | |
2561 | setting) | |
934b03fc | 2562 | DOC_END |
2563 | ||
934b03fc | 2564 | NAME: httpd_accel_uses_host_header |
2565 | COMMENT: on|off | |
2566 | TYPE: onoff | |
f1dc9b30 | 2567 | DEFAULT: off |
934b03fc | 2568 | LOC: opt_accel_uses_host |
2569 | DOC_START | |
2570 | HTTP/1.1 requests include a Host: header which is basically the | |
2c10d62d | 2571 | hostname from the URL. The Host: header is used for domain based |
2572 | virutal hosts. If your accelerator needs to provide domain based | |
2573 | virtual hosts on the same IP address then you will need to turn this | |
2574 | on. | |
2575 | ||
2576 | Note that Squid does NOT check the value of the Host header matches | |
2577 | any of your accelerated server, so it may open a big security hole | |
2578 | unless you take care to set up access controls proper. We recommend | |
2579 | that this option remain disabled unless you are sure of what you | |
2580 | are doing. | |
934b03fc | 2581 | |
04f6f348 | 2582 | However, you will need to enable this option if you run Squid |
2583 | as a transparent proxy. Otherwise, virtual servers which | |
2584 | require the Host: header will not be properly cached. | |
934b03fc | 2585 | DOC_END |
2586 | ||
0f74202c | 2587 | COMMENT_START |
3a278cb8 | 2588 | MISCELLANEOUS |
2589 | ----------------------------------------------------------------------------- | |
0f74202c | 2590 | COMMENT_END |
934b03fc | 2591 | |
2592 | NAME: dns_testnames | |
2593 | TYPE: wordlist | |
2594 | LOC: Config.dns_testname_list | |
f1dc9b30 | 2595 | DEFAULT: none |
6b53c392 | 2596 | DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com |
934b03fc | 2597 | DOC_START |
2598 | The DNS tests exit as soon as the first site is successfully looked up | |
2599 | ||
6b53c392 | 2600 | This test can be disabled with the -D command line option. |
934b03fc | 2601 | DOC_END |
2602 | ||
2603 | ||
2604 | NAME: logfile_rotate | |
2605 | TYPE: int | |
2606 | DEFAULT: 10 | |
2607 | LOC: Config.Log.rotateNumber | |
2608 | DOC_START | |
5a3f6538 | 2609 | Specifies the number of logfile rotations to make when you |
2610 | type 'squid -k rotate'. The default is 10, which will rotate | |
cf5cc17e | 2611 | with extensions 0 through 9. Setting logfile_rotate to 0 will |
934b03fc | 2612 | disable the rotation, but the logfiles are still closed and |
cf5cc17e | 2613 | re-opened. This will enable you to rename the logfiles |
5a3f6538 | 2614 | yourself just before sending the rotate signal. |
2615 | ||
2616 | Note, the 'squid -k rotate' command normally sends a USR1 | |
2617 | signal to the running squid process. In certain situations | |
2618 | (e.g. on Linux with Async I/O), USR1 is used for other | |
2619 | purposes, so -k rotate uses another signal. It is best to get | |
2620 | in the habit of using 'squid -k rotate' instead of 'kill -USR1 | |
2621 | <pid>'. | |
934b03fc | 2622 | DOC_END |
2623 | ||
2624 | ||
2625 | NAME: append_domain | |
f1dc9b30 | 2626 | TYPE: string |
2627 | LOC: Config.appendDomain | |
2628 | DEFAULT: none | |
934b03fc | 2629 | DOC_START |
cf5cc17e | 2630 | Appends local domain name to hostnames without any dots in |
2631 | them. append_domain must begin with a period. | |
934b03fc | 2632 | |
cd98395a | 2633 | Be warned that there today is Internet names with no dots in |
2634 | them using only top-domain names, so setting this may | |
2635 | cause some Internet sites to become unavailable. | |
2636 | ||
6b53c392 | 2637 | Example: |
2638 | append_domain .yourdomain.com | |
934b03fc | 2639 | DOC_END |
2640 | ||
2641 | ||
2642 | NAME: tcp_recv_bufsize | |
89de058c | 2643 | COMMENT: (bytes) |
1b635117 | 2644 | TYPE: b_size_t |
89de058c | 2645 | DEFAULT: 0 bytes |
934b03fc | 2646 | LOC: Config.tcpRcvBufsz |
2647 | DOC_START | |
2648 | Size of receive buffer to set for TCP sockets. Probably just | |
2649 | as easy to change your kernel's default. Set to zero to use | |
2650 | the default buffer size. | |
934b03fc | 2651 | DOC_END |
2652 | ||
934b03fc | 2653 | NAME: err_html_text |
f1dc9b30 | 2654 | TYPE: eol |
2655 | LOC: Config.errHtmlText | |
2656 | DEFAULT: none | |
934b03fc | 2657 | DOC_START |
2658 | HTML text to include in error messages. Make this a "mailto" | |
2659 | URL to your admin address, or maybe just a link to your | |
2660 | organizations Web page. | |
2661 | ||
ab1e6b8a | 2662 | To include this in your error messages, you must rewrite |
2663 | the error template files (found in the "errors" directory). | |
2664 | Wherever you want the 'err_html_text' line to appear, | |
2665 | insert a %L tag in the error template file. | |
934b03fc | 2666 | DOC_END |
2667 | ||
2668 | ||
2669 | NAME: deny_info | |
2670 | TYPE: denyinfo | |
2671 | LOC: Config.denyInfoList | |
f1dc9b30 | 2672 | DEFAULT: none |
934b03fc | 2673 | DOC_START |
02922e76 | 2674 | Usage: deny_info err_page_name acl |
76cdc28d | 2675 | or deny_info http://... acl |
02922e76 | 2676 | Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys |
934b03fc | 2677 | |
02922e76 | 2678 | This can be used to return a ERR_ page for requests which |
934b03fc | 2679 | do not pass the 'http_access' rules. A single ACL will cause |
2680 | the http_access check to fail. If a 'deny_info' line exists | |
02922e76 | 2681 | for that ACL then Squid returns a corresponding error page. |
cf5cc17e | 2682 | |
02922e76 | 2683 | You may use ERR_ pages that come with Squid or create your own pages |
2684 | and put them into the configured errors/ directory. | |
76cdc28d | 2685 | |
2686 | Alternatively you can specify an error URL. The browsers will then | |
2687 | get redirected (302) to the specified URL. %s in the redirection | |
2688 | URL will be replaced by the requested URL. | |
2689 | ||
2690 | Alternatively you can tell Squid to reset the TCP connection | |
2691 | by specifying TCP_RESET. | |
934b03fc | 2692 | DOC_END |
2693 | ||
934b03fc | 2694 | NAME: memory_pools |
2695 | COMMENT: on|off | |
2696 | TYPE: onoff | |
f1dc9b30 | 2697 | DEFAULT: on |
3f6c0fb2 | 2698 | LOC: Config.onoff.mem_pools |
934b03fc | 2699 | DOC_START |
2700 | If set, Squid will keep pools of allocated (but unused) memory | |
2701 | available for future use. If memory is a premium on your | |
96d88dcb | 2702 | system and you believe your malloc library outperforms Squid |
d0d41f07 | 2703 | routines, disable this. |
934b03fc | 2704 | DOC_END |
2705 | ||
7021844c | 2706 | NAME: memory_pools_limit |
2707 | COMMENT: (bytes) | |
2708 | TYPE: b_size_t | |
2709 | DEFAULT: none | |
f12c295b | 2710 | LOC: Config.MemPools.limit |
7021844c | 2711 | DOC_START |
f12c295b | 2712 | Used only with memory_pools on: |
2713 | memory_pools_limit 50 MB | |
7021844c | 2714 | |
f12c295b | 2715 | If set to a non-zero value, Squid will keep at most the specified |
2716 | limit of allocated (but unused) memory in memory pools. All free() | |
2717 | requests that exceed this limit will be handled by your malloc | |
2718 | library. Squid does not pre-allocate any memory, just safe-keeps | |
2719 | objects that otherwise would be free()d. Thus, it is safe to set | |
7021844c | 2720 | memory_pools_limit to a reasonably high value even if your |
f12c295b | 2721 | configuration will use less memory. |
2722 | ||
2723 | If not set (default) or set to zero, Squid will keep all memory it | |
2724 | can. That is, there will be no limit on the total amount of memory | |
2725 | used for safe-keeping. | |
7021844c | 2726 | |
2727 | To disable memory allocation optimization, do not set | |
2728 | memory_pools_limit to 0. Set memory_pools to "off" instead. | |
2729 | ||
f12c295b | 2730 | An overhead for maintaining memory pools is not taken into account |
2731 | when the limit is checked. This overhead is close to four bytes per | |
2732 | object kept. However, pools may actually _save_ memory because of | |
2733 | reduced memory thrashing in your malloc library. | |
7021844c | 2734 | DOC_END |
2735 | ||
736cb6aa | 2736 | NAME: via |
2737 | COMMENT: on|off | |
2738 | DEFAULT: on | |
2739 | LOC: Config.onoff.via | |
2740 | DOC_START | |
2741 | If set (default), Squid will include a Via header in requests and | |
2742 | replies as required by RFC2616. | |
2743 | DOC_END | |
2744 | ||
934b03fc | 2745 | NAME: forwarded_for |
2746 | COMMENT: on|off | |
2747 | TYPE: onoff | |
f1dc9b30 | 2748 | DEFAULT: on |
934b03fc | 2749 | LOC: opt_forwarded_for |
2750 | DOC_START | |
2751 | If set, Squid will include your system's IP address or name | |
2752 | in the HTTP requests it forwards. By default it looks like | |
2753 | this: | |
2754 | ||
2755 | X-Forwarded-For: 192.1.2.3 | |
2756 | ||
2757 | If you disable this, it will appear as | |
2758 | ||
2759 | X-Forwarded-For: unknown | |
934b03fc | 2760 | DOC_END |
2761 | ||
2762 | NAME: log_icp_queries | |
2763 | COMMENT: on|off | |
2764 | TYPE: onoff | |
f1dc9b30 | 2765 | DEFAULT: on |
17a0a4ee | 2766 | LOC: Config.onoff.log_udp |
934b03fc | 2767 | DOC_START |
cf5cc17e | 2768 | If set, ICP queries are logged to access.log. You may wish |
2769 | do disable this if your ICP load is VERY high to speed things | |
2770 | up or to simplify log analysis. | |
934b03fc | 2771 | DOC_END |
2772 | ||
88738790 | 2773 | NAME: icp_hit_stale |
2774 | COMMENT: on|off | |
2775 | TYPE: onoff | |
2776 | DEFAULT: off | |
17a0a4ee | 2777 | LOC: Config.onoff.icp_hit_stale |
88738790 | 2778 | DOC_START |
2779 | If you want to return ICP_HIT for stale cache objects, set this | |
2780 | option to 'on'. If you have sibling relationships with caches | |
2781 | in other administrative domains, this should be 'off'. If you only | |
2782 | have sibling relationships with caches under your control, then | |
2783 | it is probably okay to set this to 'on'. | |
0ccdf88e | 2784 | If set to 'on', then your siblings should use the option "allow-miss" |
2785 | on their cache_peer lines for connecting to you. | |
88738790 | 2786 | DOC_END |
2787 | ||
934b03fc | 2788 | |
2789 | NAME: minimum_direct_hops | |
2790 | TYPE: int | |
2791 | DEFAULT: 4 | |
2792 | LOC: Config.minDirectHops | |
2793 | DOC_START | |
2794 | If using the ICMP pinging stuff, do direct fetches for sites | |
2795 | which are no more than this many hops away. | |
934b03fc | 2796 | DOC_END |
2797 | ||
5f84d830 | 2798 | NAME: minimum_direct_rtt |
2799 | TYPE: int | |
2800 | DEFAULT: 400 | |
2801 | LOC: Config.minDirectRtt | |
2802 | DOC_START | |
2803 | If using the ICMP pinging stuff, do direct fetches for sites | |
2804 | which are no more than this many rtt milliseconds away. | |
2805 | DOC_END | |
934b03fc | 2806 | |
2807 | NAME: cachemgr_passwd | |
2808 | TYPE: cachemgrpasswd | |
86101e40 | 2809 | DEFAULT: none |
f1dc9b30 | 2810 | LOC: Config.passwd_list |
934b03fc | 2811 | DOC_START |
2812 | Specify passwords for cachemgr operations. | |
2813 | ||
2814 | Usage: cachemgr_passwd password action action ... | |
2815 | ||
064a674d | 2816 | Some valid actions are (see cache manager menu for a full list): |
2817 | 5min | |
2818 | 60min | |
2819 | asndb | |
2820 | authenticator | |
2821 | cbdata | |
2822 | client_list | |
2823 | comm_incoming | |
2824 | config * | |
2825 | counters | |
2826 | delay | |
2827 | digest_stats | |
cf5cc17e | 2828 | dns |
064a674d | 2829 | events |
cf5cc17e | 2830 | filedescriptors |
064a674d | 2831 | fqdncache |
2832 | histograms | |
2833 | http_headers | |
2834 | info | |
2835 | io | |
2836 | ipcache | |
2837 | mem | |
2838 | menu | |
cf5cc17e | 2839 | netdb |
064a674d | 2840 | non_peers |
2841 | objects | |
2842 | pconn | |
2843 | peer_select | |
2844 | redirector | |
2845 | refresh | |
934b03fc | 2846 | server_list |
064a674d | 2847 | shutdown * |
2848 | store_digest | |
2849 | storedir | |
2850 | utilization | |
2851 | via_headers | |
2852 | vm_objects | |
934b03fc | 2853 | |
2854 | * Indicates actions which will not be performed without a | |
2855 | valid password, others can be performed if not listed here. | |
2856 | ||
2857 | To disable an action, set the password to "disable". | |
2858 | To allow performing an action without a password, set the | |
2859 | password to "none". | |
2860 | ||
2861 | Use the keyword "all" to set the same password for all actions. | |
2862 | ||
6b53c392 | 2863 | Example: |
2864 | cachemgr_passwd secret shutdown | |
2865 | cachemgr_passwd lesssssssecret info stats/objects | |
2866 | cachemgr_passwd disable all | |
934b03fc | 2867 | DOC_END |
2868 | ||
934b03fc | 2869 | NAME: store_avg_object_size |
86101e40 | 2870 | COMMENT: (kbytes) |
2871 | TYPE: kb_size_t | |
2bf99296 | 2872 | DEFAULT: 13 KB |
934b03fc | 2873 | LOC: Config.Store.avgObjectSize |
2874 | DOC_START | |
2875 | Average object size, used to estimate number of objects your | |
2876 | cache can hold. See doc/Release-Notes-1.1.txt. The default is | |
2bf99296 | 2877 | 13 KB. |
934b03fc | 2878 | DOC_END |
2879 | ||
2880 | NAME: store_objects_per_bucket | |
2881 | TYPE: int | |
baf144ad | 2882 | DEFAULT: 20 |
934b03fc | 2883 | LOC: Config.Store.objectsPerBucket |
2884 | DOC_START | |
2885 | Target number of objects per bucket in the store hash table. | |
2886 | Lowering this value increases the total number of buckets and | |
7e3ce7b9 | 2887 | also the storage maintenance rate. The default is 50. |
934b03fc | 2888 | DOC_END |
2889 | ||
934b03fc | 2890 | NAME: client_db |
2891 | COMMENT: on|off | |
2892 | TYPE: onoff | |
f1dc9b30 | 2893 | DEFAULT: on |
17a0a4ee | 2894 | LOC: Config.onoff.client_db |
934b03fc | 2895 | DOC_START |
2896 | If you want to disable collecting per-client statistics, then | |
2897 | turn off client_db here. | |
934b03fc | 2898 | DOC_END |
2899 | ||
2900 | ||
2901 | NAME: netdb_low | |
2902 | TYPE: int | |
2903 | DEFAULT: 900 | |
2904 | LOC: Config.Netdb.low | |
2905 | DOC_NONE | |
2906 | ||
2907 | NAME: netdb_high | |
2908 | TYPE: int | |
2909 | DEFAULT: 1000 | |
2910 | LOC: Config.Netdb.high | |
2911 | DOC_START | |
2912 | The low and high water marks for the ICMP measurement | |
2913 | database. These are counts, not percents. The defaults are | |
2914 | 900 and 1000. When the high water mark is reached, database | |
2915 | entries will be deleted until the low mark is reached. | |
934b03fc | 2916 | DOC_END |
2917 | ||
2918 | ||
2919 | NAME: netdb_ping_period | |
f1dc9b30 | 2920 | TYPE: time_t |
934b03fc | 2921 | LOC: Config.Netdb.period |
9e975e4e | 2922 | DEFAULT: 5 minutes |
934b03fc | 2923 | DOC_START |
2924 | The minimum period for measuring a site. There will be at | |
2925 | least this much delay between successive pings to the same | |
2926 | network. The default is five minutes. | |
934b03fc | 2927 | DOC_END |
2928 | ||
2929 | ||
2930 | NAME: query_icmp | |
2931 | COMMENT: on|off | |
2932 | TYPE: onoff | |
f1dc9b30 | 2933 | DEFAULT: off |
17a0a4ee | 2934 | LOC: Config.onoff.query_icmp |
934b03fc | 2935 | DOC_START |
2936 | If you want to ask your peers to include ICMP data in their ICP | |
2937 | replies, enable this option. | |
2938 | ||
cf5cc17e | 2939 | If your peer has configured Squid (during compilation) with |
2940 | '--enable-icmp' then that peer will send ICMP pings to origin server | |
2941 | sites of the URLs it receives. If you enable this option then the | |
2942 | ICP replies from that peer will include the ICMP data (if available). | |
2943 | Then, when choosing a parent cache, Squid will choose the parent with | |
934b03fc | 2944 | the minimal RTT to the origin server. When this happens, the |
2945 | hierarchy field of the access.log will be | |
2946 | "CLOSEST_PARENT_MISS". This option is off by default. | |
934b03fc | 2947 | DOC_END |
2948 | ||
88500f96 | 2949 | NAME: test_reachability |
194dd3b8 | 2950 | COMMENT: on|off |
2951 | TYPE: onoff | |
2952 | DEFAULT: off | |
2953 | LOC: Config.onoff.test_reachability | |
2954 | DOC_START | |
2955 | When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH | |
2956 | instead of ICP_MISS if the target host is NOT in the ICMP | |
2957 | database, or has a zero RTT. | |
194dd3b8 | 2958 | DOC_END |
2959 | ||
78f1250a | 2960 | NAME: buffered_logs |
2961 | COMMENT: on|off | |
2962 | TYPE: onoff | |
2963 | DEFAULT: off | |
17a0a4ee | 2964 | LOC: Config.onoff.buffered_logs |
78f1250a | 2965 | DOC_START |
3d44788b | 2966 | cache.log log file is written with stdio functions, and as such |
2967 | it can be buffered or unbuffered. By default it will be unbuffered. | |
2968 | Buffering it can speed up the writing slightly (though you are | |
2969 | unlikely to need to worry unless you run with tons of debugging | |
2970 | enabled in which case performance will suffer badly anyway..). | |
78f1250a | 2971 | DOC_END |
2972 | ||
465dc415 | 2973 | NAME: reload_into_ims |
9f60cfdf | 2974 | IFDEF: HTTP_VIOLATIONS |
465dc415 | 2975 | COMMENT: on|off |
2976 | TYPE: onoff | |
2977 | DEFAULT: off | |
2978 | LOC: Config.onoff.reload_into_ims | |
2979 | DOC_START | |
2980 | When you enable this option, client no-cache or ``reload'' | |
2981 | requests will be changed to If-Modified-Since requests. | |
2982 | Doing this VIOLATES the HTTP standard. Enabling this | |
2983 | feature could make you liable for problems which it | |
2984 | causes. | |
cbe3a719 | 2985 | |
2986 | see also refresh_pattern for a more selective approach. | |
465dc415 | 2987 | DOC_END |
2988 | ||
934b03fc | 2989 | NAME: always_direct |
2990 | TYPE: acl_access | |
2991 | LOC: Config.accessList.AlwaysDirect | |
f1dc9b30 | 2992 | DEFAULT: none |
934b03fc | 2993 | DOC_START |
2a78fa67 | 2994 | Usage: always_direct allow|deny [!]aclname ... |
2995 | ||
2996 | Here you can use ACL elements to specify requests which should | |
3445a83a | 2997 | ALWAYS be forwarded directly to origin servers. For example, |
2998 | to always directly forward requests for local servers use | |
2a78fa67 | 2999 | something like: |
3000 | ||
3001 | acl local-servers dstdomain my.domain.net | |
3002 | always_direct allow local-servers | |
3003 | ||
3004 | To always forward FTP requests directly, use | |
3005 | ||
3006 | acl FTP proto FTP | |
3007 | always_direct allow FTP | |
3008 | ||
3009 | NOTE: There is a similar, but opposite option named | |
3010 | 'never_direct'. You need to be aware that "always_direct deny | |
3011 | foo" is NOT the same thing as "never_direct allow foo". You | |
3012 | may need to use a deny rule to exclude a more-specific case of | |
3013 | some other rule. Example: | |
3014 | ||
3015 | acl local-external dstdomain external.foo.net | |
5d8ea528 | 3016 | acl local-servers dstdomain .foo.net |
2a78fa67 | 3017 | always_direct deny local-external |
3018 | always_direct allow local-servers | |
3445a83a | 3019 | |
3020 | This option replaces some v1.1 options such as local_domain | |
3021 | and local_ip. | |
934b03fc | 3022 | DOC_END |
3023 | ||
3024 | NAME: never_direct | |
3025 | TYPE: acl_access | |
3026 | LOC: Config.accessList.NeverDirect | |
f1dc9b30 | 3027 | DEFAULT: none |
934b03fc | 3028 | DOC_START |
d0d41f07 | 3029 | Usage: never_direct allow|deny [!]aclname ... |
2a78fa67 | 3030 | |
3031 | never_direct is the opposite of always_direct. Please read | |
3032 | the description for always_direct if you have not already. | |
934b03fc | 3033 | |
2a78fa67 | 3034 | With 'never_direct' you can use ACL elements to specify |
3035 | requests which should NEVER be forwarded directly to origin | |
3445a83a | 3036 | servers. For example, to force the use of a proxy for all |
3037 | requests, except those in your local domain use something like: | |
2a78fa67 | 3038 | |
5d8ea528 | 3039 | acl local-servers dstdomain .foo.net |
2a78fa67 | 3040 | acl all src 0.0.0.0/0.0.0.0 |
d0d41f07 | 3041 | never_direct deny local-servers |
3042 | never_direct allow all | |
3445a83a | 3043 | |
3044 | or if squid is inside a firewall and there is local intranet | |
3045 | servers inside the firewall then use something like: | |
3046 | ||
5d8ea528 | 3047 | acl local-intranet dstdomain .foo.net |
3445a83a | 3048 | acl local-external dstdomain external.foo.net |
3049 | always_direct deny local-external | |
3050 | always_direct allow local-intranet | |
3051 | never_direct allow all | |
3052 | ||
3053 | This option replaces some v1.1 options such as inside_firewall | |
3054 | and firewall_ip. | |
2a78fa67 | 3055 | DOC_END |
934b03fc | 3056 | |
6bccf575 | 3057 | NAME: header_access |
3058 | TYPE: http_header_access[] | |
3059 | LOC: Config.header_access | |
97474590 | 3060 | DEFAULT: none |
3061 | DOC_START | |
6bccf575 | 3062 | Usage: header_access header_name allow|deny [!]aclname ... |
96d88dcb | 3063 | |
6bccf575 | 3064 | This option replaces the old 'anonymize_headers' and the |
3065 | older 'http_anonymizer' option with something that is much | |
3066 | more configurable. This new method creates a list of ACLs | |
3067 | for each header, allowing you very fine-tuned header | |
3068 | mangling. | |
3069 | ||
3070 | You can only specify known headers for the header name. | |
3071 | Other headers are reclassified as 'Other'. You can also | |
3072 | refer to all the headers with 'All'. | |
96d88dcb | 3073 | |
6bccf575 | 3074 | For example, to achieve the same behaviour as the old |
5bcad01d | 3075 | 'http_anonymizer standard' option, you should use: |
96d88dcb | 3076 | |
6bccf575 | 3077 | header_access From deny all |
3078 | header_access Referer deny all | |
3079 | header_access Server deny all | |
3080 | header_access User-Agent deny all | |
3081 | header_access WWW-Authenticate deny all | |
3082 | header_access Link deny all | |
97474590 | 3083 | |
5bcad01d | 3084 | Or, to reproduce the old 'http_anonymizer paranoid' feature |
3085 | you should use: | |
96d88dcb | 3086 | |
6bccf575 | 3087 | header_access Allow allow all |
3088 | header_access Authorization allow all | |
3089 | header_access Cache-Control allow all | |
3090 | header_access Content-Encoding allow all | |
3091 | header_access Content-Length allow all | |
3092 | header_access Content-Type allow all | |
3093 | header_access Date allow all | |
3094 | header_access Expires allow all | |
3095 | header_access Host allow all | |
3096 | header_access If-Modified-Since allow all | |
3097 | header_access Last-Modified allow all | |
3098 | header_access Location allow all | |
3099 | header_access Pragma allow all | |
3100 | header_access Accept allow all | |
3101 | header_access Charset allow all | |
3102 | header_access Accept-Encoding allow all | |
3103 | header_access Accept-Language allow all | |
3104 | header_access Content-Language allow all | |
3105 | header_access Mime-Version allow all | |
3106 | header_access Retry-After allow all | |
3107 | header_access Title allow all | |
3108 | header_access Connection allow all | |
3109 | header_access Proxy-Connection allow all | |
3110 | header_access All deny all | |
96d88dcb | 3111 | |
5bcad01d | 3112 | By default, all headers are allowed (no anonymizing is |
3113 | performed). | |
97474590 | 3114 | DOC_END |
3115 | ||
6bccf575 | 3116 | NAME: header_replace |
3117 | TYPE: http_header_replace[] | |
3118 | LOC: Config.header_access | |
88738790 | 3119 | DEFAULT: none |
3120 | DOC_START | |
6bccf575 | 3121 | Usage: header_replace header_name message |
3122 | Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit) | |
96d88dcb | 3123 | |
6bccf575 | 3124 | This option allows you to change the contents of headers |
3125 | denied with header_access above, by replacing them with | |
3126 | some fixed string. This replaces the old fake_user_agent | |
3127 | option. | |
96d88dcb | 3128 | |
6bccf575 | 3129 | By default, headers are removed if denied. |
88738790 | 3130 | DOC_END |
3131 | ||
365cb147 | 3132 | NAME: icon_directory |
f0b19334 | 3133 | TYPE: string |
365cb147 | 3134 | LOC: Config.icons.directory |
3135 | DEFAULT: @DEFAULT_ICON_DIR@ | |
3136 | DOC_START | |
cf5cc17e | 3137 | Where the icons are stored. These are normally kept in |
3138 | @DEFAULT_ICON_DIR@ | |
365cb147 | 3139 | DOC_END |
3140 | ||
cf5cc17e | 3141 | NAME: error_directory |
365cb147 | 3142 | TYPE: string |
cf5cc17e | 3143 | LOC: Config.errorDirectory |
3144 | DEFAULT: @DEFAULT_ERROR_DIR@ | |
365cb147 | 3145 | DOC_START |
cf5cc17e | 3146 | If you wish to create your own versions of the default |
efd900cb | 3147 | (English) error files, either to customize them to suit your |
3148 | language or company copy the template English files to another | |
cf5cc17e | 3149 | directory and point this tag at them. |
365cb147 | 3150 | DOC_END |
88738790 | 3151 | |
22c653cd | 3152 | NAME: minimum_retry_timeout |
3153 | COMMENT: (seconds) | |
3154 | TYPE: time_t | |
3155 | LOC: Config.retry.timeout | |
3156 | DEFAULT: 5 seconds | |
3157 | DOC_START | |
3158 | This specifies the minimum connect timeout, for when the | |
3159 | connect timeout is reduced to compensate for the availability | |
3160 | of multiple IP addresses. | |
3161 | ||
cf5cc17e | 3162 | When a connection to a host is initiated, and that host has |
3163 | several IP addresses, the default connection timeout is reduced | |
3164 | by dividing it by the number of addresses. So, a site with 15 | |
3165 | addresses would then have a timeout of 8 seconds for each | |
3166 | address attempted. To avoid having the timeout reduced to the | |
3167 | point where even a working host would not have a chance to | |
3168 | respond, this setting is provided. The default, and the | |
3169 | minimum value, is five seconds, and the maximum value is sixty | |
3170 | seconds, or half of connect_timeout, whichever is greater and | |
3171 | less than connect_timeout. | |
22c653cd | 3172 | DOC_END |
3173 | ||
3174 | NAME: maximum_single_addr_tries | |
3175 | TYPE: int | |
3176 | LOC: Config.retry.maxtries | |
3177 | DEFAULT: 3 | |
3178 | DOC_START | |
3179 | This sets the maximum number of connection attempts for a | |
3180 | host that only has one address (for multiple-address hosts, | |
3181 | each address is tried once). | |
3182 | ||
3183 | The default value is three tries, the (not recommended) | |
3184 | maximum is 255 tries. A warning message will be generated | |
3185 | if it is set to a value greater than ten. | |
22c653cd | 3186 | DOC_END |
6d1c0d53 | 3187 | |
a97cfa48 | 3188 | NAME: snmp_port |
3189 | TYPE: ushort | |
3190 | LOC: Config.Port.snmp | |
3191 | DEFAULT: 3401 | |
1df370e3 | 3192 | IFDEF: SQUID_SNMP |
a97cfa48 | 3193 | DOC_START |
cf5cc17e | 3194 | Squid can now serve statistics and status information via SNMP. |
3195 | By default it listens to port 3401 on the machine. If you don't | |
9bc73deb | 3196 | wish to use SNMP, set this to "0". |
a97cfa48 | 3197 | DOC_END |
3198 | ||
dba79ac5 | 3199 | NAME: snmp_access |
3200 | TYPE: acl_access | |
3201 | LOC: Config.accessList.snmp | |
a97cfa48 | 3202 | DEFAULT: none |
6502682e | 3203 | DEFAULT_IF_NONE: deny all |
1df370e3 | 3204 | IFDEF: SQUID_SNMP |
a97cfa48 | 3205 | DOC_START |
dba79ac5 | 3206 | Allowing or denying access to the SNMP port. |
08f6b5e0 | 3207 | |
3208 | All access to the agent is denied by default. | |
dba79ac5 | 3209 | usage: |
4feb7b2e | 3210 | |
dba79ac5 | 3211 | snmp_access allow|deny [!]aclname ... |
08f6b5e0 | 3212 | |
3213 | Example: | |
6b53c392 | 3214 | snmp_access allow snmppublic localhost |
3215 | snmp_access deny all | |
bdf18524 | 3216 | DOC_END |
3217 | ||
15dcc168 | 3218 | NAME: snmp_incoming_address |
3219 | TYPE: address | |
1ecaa0a0 | 3220 | LOC: Config.Addrs.snmp_incoming |
15dcc168 | 3221 | DEFAULT: 0.0.0.0 |
3222 | IFDEF: SQUID_SNMP | |
3223 | DOC_NONE | |
3224 | NAME: snmp_outgoing_address | |
3225 | TYPE: address | |
3226 | LOC: Config.Addrs.snmp_outgoing | |
3227 | DEFAULT: 255.255.255.255 | |
3228 | IFDEF: SQUID_SNMP | |
3229 | DOC_START | |
3230 | Just like 'udp_incoming_address' above, but for the SNMP port. | |
3231 | ||
3232 | snmp_incoming_address is used for the SNMP socket receiving | |
3233 | messages from SNMP agents. | |
3234 | snmp_outgoing_address is used for SNMP packets returned to SNMP | |
3235 | agents. | |
3236 | ||
6b53c392 | 3237 | The default snmp_incoming_address (0.0.0.0) is to listen on all |
3238 | available network interfaces. | |
15dcc168 | 3239 | |
6b53c392 | 3240 | If snmp_outgoing_address is set to 255.255.255.255 (the default) |
3241 | then it will use the same socket as snmp_incoming_address. Only | |
3242 | change this if you want to have SNMP replies sent using another | |
3243 | address than where this Squid listens for SNMP queries. | |
15dcc168 | 3244 | |
6b53c392 | 3245 | NOTE, snmp_incoming_address and snmp_outgoing_address can not have |
3246 | the same value since they both use port 3401. | |
15dcc168 | 3247 | DOC_END |
bdf18524 | 3248 | |
53ad48e6 | 3249 | NAME: as_whois_server |
3250 | TYPE: string | |
3251 | LOC: Config.as_whois_server | |
3252 | DEFAULT: whois.ra.net | |
3253 | DEFAULT_IF_NONE: whois.ra.net | |
3254 | DOC_START | |
cf5cc17e | 3255 | WHOIS server to query for AS numbers. NOTE: AS numbers are |
3256 | queried only when Squid starts up, not for every request. | |
53ad48e6 | 3257 | DOC_END |
95e36d02 | 3258 | |
320e9f36 | 3259 | NAME: wccp_router |
3260 | TYPE: address | |
3261 | LOC: Config.Wccp.router | |
3262 | DEFAULT: 0.0.0.0 | |
eb824054 | 3263 | IFDEF: USE_WCCP |
320e9f36 | 3264 | DOC_START |
efd900cb | 3265 | Use this option to define your WCCP ``home'' router for |
3266 | Squid. Setting the 'wccp_router' to 0.0.0.0 (the default) | |
3267 | disables WCCP. | |
320e9f36 | 3268 | DOC_END |
3269 | ||
d20b1cd0 | 3270 | NAME: wccp_version |
3271 | TYPE: int | |
3272 | LOC: Config.Wccp.version | |
3273 | DEFAULT: 4 | |
3274 | IFDEF: USE_WCCP | |
3275 | DOC_START | |
3276 | According to some users, Cisco IOS 11.2 only supports WCCP | |
3277 | version 3. If you're using that version of IOS, change | |
3278 | this value to 3. | |
3279 | DOC_END | |
3280 | ||
320e9f36 | 3281 | NAME: wccp_incoming_address |
3282 | TYPE: address | |
eb824054 | 3283 | LOC: Config.Wccp.incoming |
320e9f36 | 3284 | DEFAULT: 0.0.0.0 |
eb824054 | 3285 | IFDEF: USE_WCCP |
320e9f36 | 3286 | DOC_NONE |
3287 | NAME: wccp_outgoing_address | |
3288 | TYPE: address | |
eb824054 | 3289 | LOC: Config.Wccp.outgoing |
320e9f36 | 3290 | DEFAULT: 255.255.255.255 |
eb824054 | 3291 | IFDEF: USE_WCCP |
320e9f36 | 3292 | DOC_START |
efd900cb | 3293 | wccp_incoming_address Use this option if you require WCCP |
3294 | messages to be received on only one | |
3295 | interface. Do NOT use this option if | |
3296 | you're unsure how many interfaces you | |
3297 | have, or if you know you have only one | |
3298 | interface. | |
320e9f36 | 3299 | |
efd900cb | 3300 | wccp_outgoing_address Use this option if you require WCCP |
3301 | messages to be sent out on only one | |
3302 | interface. Do NOT use this option if | |
3303 | you're unsure how many interfaces you | |
3304 | have, or if you know you have only one | |
3305 | interface. | |
320e9f36 | 3306 | |
efd900cb | 3307 | The default behavior is to not bind to any specific address. |
320e9f36 | 3308 | |
3309 | NOTE, wccp_incoming_address and wccp_outgoing_address can not have | |
3310 | the same value since they both use port 2048. | |
320e9f36 | 3311 | DOC_END |
3312 | ||
3313 | ||
95e36d02 | 3314 | COMMENT_START |
3315 | DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option) | |
3316 | ----------------------------------------------------------------------------- | |
95e36d02 | 3317 | COMMENT_END |
3318 | ||
59715b38 | 3319 | NAME: delay_pools |
3320 | TYPE: delay_pool_count | |
3321 | DEFAULT: 0 | |
95e36d02 | 3322 | IFDEF: DELAY_POOLS |
59715b38 | 3323 | LOC: Config.Delay |
95e36d02 | 3324 | DOC_START |
59715b38 | 3325 | This represents the number of delay pools to be used. For example, |
3326 | if you have one class 2 delay pool and one class 3 delays pool, you | |
3327 | have a total of 2 delay pools. | |
95e36d02 | 3328 | DOC_END |
3329 | ||
59715b38 | 3330 | NAME: delay_class |
3331 | TYPE: delay_pool_class | |
95e36d02 | 3332 | DEFAULT: none |
3333 | IFDEF: DELAY_POOLS | |
59715b38 | 3334 | LOC: Config.Delay |
95e36d02 | 3335 | DOC_START |
59715b38 | 3336 | This defines the class of each delay pool. There must be exactly one |
3337 | delay_class line for each delay pool. For example, to define two | |
3338 | delay pools, one of class 2 and one of class 3, the settings above | |
3339 | and here would be: | |
3340 | ||
6b53c392 | 3341 | Example: |
3342 | delay_pools 2 # 2 delay pools | |
3343 | delay_class 1 2 # pool 1 is a class 2 pool | |
3344 | delay_class 2 3 # pool 2 is a class 3 pool | |
59715b38 | 3345 | |
3346 | The delay pool classes are: | |
3347 | ||
3348 | class 1 Everything is limited by a single aggregate | |
3349 | bucket. | |
3350 | ||
3351 | class 2 Everything is limited by a single aggregate | |
3352 | bucket as well as an "individual" bucket chosen | |
3353 | from bits 25 through 32 of the IP address. | |
3354 | ||
3355 | class 3 Everything is limited by a single aggregate | |
3356 | bucket as well as a "network" bucket chosen | |
3357 | from bits 17 through 24 of the IP address and a | |
3358 | "individual" bucket chosen from bits 17 through | |
3359 | 32 of the IP address. | |
3360 | ||
3361 | NOTE: If an IP address is a.b.c.d | |
3362 | -> bits 25 through 32 are "d" | |
3363 | -> bits 17 through 24 are "c" | |
3364 | -> bits 17 through 32 are "c * 256 + d" | |
95e36d02 | 3365 | DOC_END |
3366 | ||
59715b38 | 3367 | NAME: delay_access |
3368 | TYPE: delay_pool_access | |
95e36d02 | 3369 | DEFAULT: none |
3370 | IFDEF: DELAY_POOLS | |
59715b38 | 3371 | LOC: Config.Delay |
95e36d02 | 3372 | DOC_START |
59715b38 | 3373 | This is used to determine which delay pool a request falls into. |
efd900cb | 3374 | The first matched delay pool is always used, i.e., if a request falls |
59715b38 | 3375 | into delay pool number one, no more delay are checked, otherwise the |
3376 | rest are checked in order of their delay pool number until they have | |
3377 | all been checked. For example, if you want some_big_clients in delay | |
3378 | pool 1 and lotsa_little_clients in delay pool 2: | |
95e36d02 | 3379 | |
6b53c392 | 3380 | Example: |
3381 | delay_access 1 allow some_big_clients | |
3382 | delay_access 1 deny all | |
3383 | delay_access 2 allow lotsa_little_clients | |
3384 | delay_access 2 deny all | |
95e36d02 | 3385 | DOC_END |
3386 | ||
59715b38 | 3387 | NAME: delay_parameters |
3388 | TYPE: delay_pool_rates | |
3389 | DEFAULT: none | |
95e36d02 | 3390 | IFDEF: DELAY_POOLS |
59715b38 | 3391 | LOC: Config.Delay |
95e36d02 | 3392 | DOC_START |
59715b38 | 3393 | This defines the parameters for a delay pool. Each delay pool has |
3394 | a number of "buckets" associated with it, as explained in the | |
3395 | description of delay_class. For a class 1 delay pool, the syntax is: | |
95e36d02 | 3396 | |
59715b38 | 3397 | delay_parameters pool aggregate |
95e36d02 | 3398 | |
59715b38 | 3399 | For a class 2 delay pool: |
95e36d02 | 3400 | |
59715b38 | 3401 | delay_parameters pool aggregate individual |
95e36d02 | 3402 | |
59715b38 | 3403 | For a class 3 delay pool: |
95e36d02 | 3404 | |
59715b38 | 3405 | delay_parameters pool aggregate network individual |
95e36d02 | 3406 | |
59715b38 | 3407 | The variables here are: |
95e36d02 | 3408 | |
59715b38 | 3409 | pool a pool number - ie, a number between 1 and the |
3410 | number specified in delay_pools as used in | |
3411 | delay_class lines. | |
95e36d02 | 3412 | |
59715b38 | 3413 | aggregate the "delay parameters" for the aggregate bucket |
3414 | (class 1, 2, 3). | |
95e36d02 | 3415 | |
59715b38 | 3416 | individual the "delay parameters" for the individual |
3417 | buckets (class 2, 3). | |
3418 | ||
3419 | network the "delay parameters" for the network buckets | |
3420 | (class 3). | |
3421 | ||
3422 | A pair of delay parameters is written restore/maximum, where restore is | |
3423 | the number of bytes (not bits - modem and network speeds are usually | |
3424 | quoted in bits) per second placed into the bucket, and maximum is the | |
3425 | maximum number of bytes which can be in the bucket at any time. | |
3426 | ||
3427 | For example, if delay pool number 1 is a class 2 delay pool as in the | |
3428 | above example, and is being used to strictly limit each host to 64kbps | |
3429 | (plus overheads), with no overall limit, the line is: | |
3430 | ||
3431 | delay_parameters 1 -1/-1 8000/8000 | |
3432 | ||
3433 | Note that the figure -1 is used to represent "unlimited". | |
3434 | ||
3435 | And, if delay pool number 2 is a class 3 delay pool as in the above | |
3436 | example, and you want to limit it to a total of 256kbps (strict limit) | |
3437 | with each 8-bit network permitted 64kbps (strict limit) and each | |
3438 | individual host permitted 4800bps with a bucket maximum size of 64kb | |
3439 | to permit a decent web page to be downloaded at a decent speed | |
3440 | (if the network is not being limited due to overuse) but slow down | |
3441 | large downloads more significantly: | |
3442 | ||
3443 | delay_parameters 2 32000/32000 8000/8000 600/64000 | |
3444 | ||
3445 | There must be one delay_parameters line for each delay pool. | |
95e36d02 | 3446 | DOC_END |
3447 | ||
59715b38 | 3448 | NAME: delay_initial_bucket_level |
3449 | COMMENT: (percent, 0-100) | |
3450 | TYPE: ushort | |
3451 | DEFAULT: 50 | |
95e36d02 | 3452 | IFDEF: DELAY_POOLS |
59715b38 | 3453 | LOC: Config.Delay.initial |
95e36d02 | 3454 | DOC_START |
59715b38 | 3455 | The initial bucket percentage is used to determine how much is put |
3456 | in each bucket when squid starts, is reconfigured, or first notices | |
3457 | a host accessing it (in class 2 and class 3, individual hosts and | |
3458 | networks only have buckets associated with them once they have been | |
3459 | "seen" by squid). | |
95e36d02 | 3460 | DOC_END |
6be2389e | 3461 | |
9cd6c6fb | 3462 | NAME: incoming_icp_average |
6be2389e | 3463 | TYPE: int |
3464 | DEFAULT: 6 | |
3465 | LOC: Config.comm_incoming.icp_average | |
3466 | DOC_NONE | |
3467 | ||
9cd6c6fb | 3468 | NAME: incoming_http_average |
6be2389e | 3469 | TYPE: int |
3470 | DEFAULT: 4 | |
3471 | LOC: Config.comm_incoming.http_average | |
3472 | DOC_NONE | |
3473 | ||
afc28c12 | 3474 | NAME: incoming_dns_average |
3475 | TYPE: int | |
3476 | DEFAULT: 4 | |
3477 | LOC: Config.comm_incoming.dns_average | |
3478 | DOC_NONE | |
3479 | ||
9cd6c6fb | 3480 | NAME: min_icp_poll_cnt |
6be2389e | 3481 | TYPE: int |
3482 | DEFAULT: 8 | |
3483 | LOC: Config.comm_incoming.icp_min_poll | |
3484 | DOC_NONE | |
3485 | ||
afc28c12 | 3486 | NAME: min_dns_poll_cnt |
3487 | TYPE: int | |
3488 | DEFAULT: 8 | |
3489 | LOC: Config.comm_incoming.dns_min_poll | |
3490 | DOC_NONE | |
3491 | ||
9cd6c6fb | 3492 | NAME: min_http_poll_cnt |
6be2389e | 3493 | TYPE: int |
3494 | DEFAULT: 8 | |
3495 | LOC: Config.comm_incoming.http_min_poll | |
3496 | DOC_START | |
b6a2f15e | 3497 | Heavy voodoo here. I can't even believe you are reading this. |
6be2389e | 3498 | Are you crazy? Don't even think about adjusting these unless |
3499 | you understand the algorithms in comm_select.c first! | |
3500 | DOC_END | |
2b4283e4 | 3501 | |
c5f627c2 | 3502 | NAME: max_open_disk_fds |
3503 | TYPE: int | |
3504 | LOC: Config.max_open_disk_fds | |
3505 | DEFAULT: 0 | |
6b53c392 | 3506 | DOC_START |
3507 | To avoid having disk as the I/O bottleneck Squid can optionally | |
3508 | bypass the on-disk cache if more than this amount of disk file | |
3509 | descriptors are open. | |
3510 | ||
3511 | A value of 0 indicates no limit. | |
3512 | DOC_END | |
c5f627c2 | 3513 | |
b540e168 | 3514 | NAME: offline_mode |
3515 | TYPE: onoff | |
3516 | LOC: Config.onoff.offline | |
3517 | DEFAULT: off | |
3518 | DOC_START | |
3519 | Enable this option and Squid will never try to validate cached | |
3520 | objects. | |
3521 | DOC_END | |
3522 | ||
d548ee64 | 3523 | NAME: uri_whitespace |
3524 | TYPE: uri_whitespace | |
3525 | LOC: Config.uri_whitespace | |
7e3ce7b9 | 3526 | DEFAULT: strip |
d548ee64 | 3527 | DOC_START |
3528 | What to do with requests that have whitespace characters in the | |
3529 | URI. Options: | |
3530 | ||
7e3ce7b9 | 3531 | strip: The whitespace characters are stripped out of the URL. |
3532 | This is the behavior recommended by RFC2616. | |
d548ee64 | 3533 | deny: The request is denied. The user receives an "Invalid |
3534 | Request" message. | |
3535 | allow: The request is allowed and the URI is not changed. The | |
3536 | whitespace characters remain in the URI. Note the | |
3537 | whitespace is passed to redirector processes if they | |
3538 | are in use. | |
3539 | encode: The request is allowed and the whitespace characters are | |
3540 | encoded according to RFC1738. This could be considered | |
3541 | a violation of the HTTP/1.1 | |
3542 | RFC because proxies are not allowed to rewrite URI's. | |
3543 | chop: The request is allowed and the URI is chopped at the | |
3544 | first whitespace. This might also be considered a | |
3545 | violation. | |
d548ee64 | 3546 | DOC_END |
3547 | ||
376bb137 | 3548 | NAME: broken_posts |
3549 | TYPE: acl_access | |
3550 | DEFAULT: none | |
3551 | LOC: Config.accessList.brokenPosts | |
c68e9c6b | 3552 | DOC_START |
376bb137 | 3553 | A list of ACL elements which, if matched, causes Squid to send |
54bab452 | 3554 | an extra CRLF pair after the body of a PUT/POST request. |
376bb137 | 3555 | |
3556 | Some HTTP servers has broken implementations of PUT/POST, | |
54bab452 | 3557 | and rely on an extra CRLF pair sent by some WWW clients. |
376bb137 | 3558 | |
3559 | Quote from RFC 2068 section 4.1 on this matter: | |
3560 | ||
3561 | Note: certain buggy HTTP/1.0 client implementations generate an | |
3562 | extra CRLF's after a POST request. To restate what is explicitly | |
3563 | forbidden by the BNF, an HTTP/1.1 client must not preface or follow | |
3564 | a request with an extra CRLF. | |
3565 | ||
6b53c392 | 3566 | Example: |
3567 | acl buggy_server url_regex ^http://.... | |
3568 | broken_posts allow buggy_server | |
c68e9c6b | 3569 | DOC_END |
9b094667 | 3570 | |
e66d7923 | 3571 | NAME: mcast_miss_addr |
3572 | IFDEF: MULTICAST_MISS_STREAM | |
3573 | TYPE: address | |
3574 | LOC: Config.mcast_miss.addr | |
3575 | DEFAULT: 255.255.255.255 | |
b6a2f15e | 3576 | DOC_START |
3577 | If you enable this option, every "cache miss" URL will | |
3578 | be sent out on the specified multicast address. | |
3579 | ||
3580 | Do not enable this option unless you are are absolutely | |
3581 | certain you understand what you are doing. | |
3582 | DOC_END | |
e66d7923 | 3583 | |
7e3ce7b9 | 3584 | NAME: mcast_miss_ttl |
3585 | IFDEF: MULTICAST_MISS_TTL | |
3586 | TYPE: ushort | |
3587 | LOC: Config.mcast_miss.ttl | |
3588 | DEFAULT: 16 | |
3589 | DOC_START | |
3590 | This is the time-to-live value for packets multicasted | |
3591 | when multicasting off cache miss URLs is enabled. By | |
3592 | default this is set to 'site scope', i.e. 16. | |
3593 | DOC_END | |
3594 | ||
e66d7923 | 3595 | NAME: mcast_miss_port |
3596 | IFDEF: MULTICAST_MISS_STREAM | |
3597 | TYPE: ushort | |
3598 | LOC: Config.mcast_miss.port | |
3599 | DEFAULT: 3135 | |
b6a2f15e | 3600 | DOC_START |
efd900cb | 3601 | This is the port number to be used in conjunction with |
b6a2f15e | 3602 | 'mcast_miss_addr'. |
3603 | DOC_END | |
e66d7923 | 3604 | |
3605 | NAME: mcast_miss_encode_key | |
3606 | IFDEF: MULTICAST_MISS_STREAM | |
3607 | TYPE: string | |
3608 | LOC: Config.mcast_miss.encode_key | |
3609 | DEFAULT: XXXXXXXXXXXXXXXX | |
b6a2f15e | 3610 | DOC_START |
3611 | The URLs that are sent in the multicast miss stream are | |
3612 | encrypted. This is the encryption key. | |
3613 | DOC_END | |
e66d7923 | 3614 | |
168dfda9 | 3615 | NAME: nonhierarchical_direct |
3616 | TYPE: onoff | |
3617 | LOC: Config.onoff.nonhierarchical_direct | |
3618 | DEFAULT: on | |
3619 | DOC_START | |
3620 | By default, Squid will send any non-hierarchical requests | |
3621 | (matching hierarchy_stoplist or not cachable request type) direct | |
3622 | to origin servers. | |
3623 | ||
3624 | If you set this to off, then Squid will prefer to send these | |
3625 | requests to parents. | |
3626 | ||
3627 | Note that in most configurations, by turning this off you will only | |
3628 | add latency to these request without any improvement in global hit | |
3629 | ratio. | |
3630 | ||
3631 | If you are inside an firewall then see never_direct instead of | |
3632 | this directive. | |
168dfda9 | 3633 | DOC_END |
3634 | ||
9b094667 | 3635 | NAME: prefer_direct |
3636 | TYPE: onoff | |
3637 | LOC: Config.onoff.prefer_direct | |
168dfda9 | 3638 | DEFAULT: off |
9b094667 | 3639 | DOC_START |
168dfda9 | 3640 | Normally Squid tries to use parents for most requests. If you by some |
3641 | reason like it to first try going direct and only use a parent if | |
177c7d77 | 3642 | going direct fails then set this to on. |
168dfda9 | 3643 | |
3644 | By combining nonhierarchical_direct off and prefer_direct on you | |
3645 | can set up Squid to use a parent as a backup path if going direct | |
3646 | fails. | |
9b094667 | 3647 | DOC_END |
4d62b0af | 3648 | |
bcbc11b0 | 3649 | NAME: strip_query_terms |
3650 | TYPE: onoff | |
3651 | LOC: Config.onoff.strip_query_terms | |
3652 | DEFAULT: on | |
3653 | DOC_START | |
3654 | By default, Squid strips query terms from requested URLs before | |
3655 | logging. This protects your user's privacy. | |
bcbc11b0 | 3656 | DOC_END |
3657 | ||
b6a2f15e | 3658 | NAME: coredump_dir |
3659 | TYPE: string | |
3660 | LOC: Config.coredump_dir | |
3661 | DEFAULT: none | |
5ff76111 | 3662 | DEFAULT_IF_NONE: none |
b6a2f15e | 3663 | DOC_START |
5ff76111 | 3664 | By default Squid leaves core files in the directory from where |
3665 | it was started. If you set 'coredump_dir' to a directory | |
b6a2f15e | 3666 | that exists, Squid will chdir() to that directory at startup |
3667 | and coredump files will be left there. | |
5ff76111 | 3668 | |
3669 | NOCOMMENT_START | |
3670 | # Leave coredumps in the first cache dir | |
3671 | coredump_dir @DEFAULT_SWAP_DIR@ | |
3672 | NOCOMMENT_END | |
b6a2f15e | 3673 | DOC_END |
3674 | ||
07476a7f | 3675 | NAME: redirector_bypass |
3676 | TYPE: onoff | |
3677 | LOC: Config.onoff.redirector_bypass | |
3678 | DEFAULT: off | |
3679 | DOC_START | |
3680 | When this is 'on', a request will not go through the | |
3681 | redirector if all redirectors are busy. If this is 'off' | |
3682 | and the redirector queue grows too large, Squid will exit | |
29de1a20 | 3683 | with a FATAL error and ask you to increase the number of |
07476a7f | 3684 | redirectors. You should only enable this if the redirectors |
3685 | are not critical to your caching system. If you use | |
3686 | redirectors for access control, and you enable this option, | |
3687 | then users may have access to pages that they should not | |
3688 | be allowed to request. | |
3689 | DOC_END | |
3690 | ||
9bc73deb | 3691 | NAME: ignore_unknown_nameservers |
3692 | TYPE: onoff | |
3693 | LOC: Config.onoff.ignore_unknown_nameservers | |
3694 | DEFAULT: on | |
3695 | DOC_START | |
3696 | By default Squid checks that DNS responses are received | |
3697 | from the same IP addresses that they are sent to. If they | |
3698 | don't match, Squid ignores the response and writes a warning | |
3699 | message to cache.log. You can allow responses from unknown | |
3700 | nameservers by setting this option to 'off'. | |
9bc73deb | 3701 | DOC_END |
3702 | ||
7e3ce7b9 | 3703 | NAME: digest_generation |
3704 | IFDEF: USE_CACHE_DIGESTS | |
3705 | TYPE: onoff | |
3706 | LOC: Config.onoff.digest_generation | |
3707 | DEFAULT: on | |
3708 | DOC_START | |
3709 | This controls whether the server will generate a Cache Digest | |
3710 | of its contents. By default, Cache Digest generation is | |
3711 | enabled if Squid is compiled with USE_CACHE_DIGESTS defined. | |
7e3ce7b9 | 3712 | DOC_END |
3713 | ||
3714 | NAME: digest_bits_per_entry | |
3715 | IFDEF: USE_CACHE_DIGESTS | |
3716 | TYPE: int | |
3717 | LOC: Config.digest.bits_per_entry | |
3718 | DEFAULT: 5 | |
3719 | DOC_START | |
3720 | This is the number of bits of the server's Cache Digest which | |
3721 | will be associated with the Digest entry for a given HTTP | |
3722 | Method and URL (public key) combination. The default is 5. | |
7e3ce7b9 | 3723 | DOC_END |
3724 | ||
3725 | NAME: digest_rebuild_period | |
3726 | IFDEF: USE_CACHE_DIGESTS | |
efd900cb | 3727 | COMMENT: (seconds) |
3728 | TYPE: time_t | |
7e3ce7b9 | 3729 | LOC: Config.digest.rebuild_period |
efd900cb | 3730 | DEFAULT: 1 hour |
7e3ce7b9 | 3731 | DOC_START |
3732 | This is the number of seconds between Cache Digest rebuilds. | |
7e3ce7b9 | 3733 | DOC_END |
3734 | ||
3735 | NAME: digest_rewrite_period | |
efd900cb | 3736 | COMMENT: (seconds) |
7e3ce7b9 | 3737 | IFDEF: USE_CACHE_DIGESTS |
efd900cb | 3738 | TYPE: time_t |
7e3ce7b9 | 3739 | LOC: Config.digest.rewrite_period |
efd900cb | 3740 | DEFAULT: 1 hour |
7e3ce7b9 | 3741 | DOC_START |
3742 | This is the number of seconds between Cache Digest writes to | |
6b53c392 | 3743 | disk. |
7e3ce7b9 | 3744 | DOC_END |
3745 | ||
3746 | NAME: digest_swapout_chunk_size | |
efd900cb | 3747 | COMMENT: (bytes) |
3748 | TYPE: b_size_t | |
7e3ce7b9 | 3749 | IFDEF: USE_CACHE_DIGESTS |
7e3ce7b9 | 3750 | LOC: Config.digest.swapout_chunk_size |
efd900cb | 3751 | DEFAULT: 4096 bytes |
7e3ce7b9 | 3752 | DOC_START |
3753 | This is the number of bytes of the Cache Digest to write to | |
efd900cb | 3754 | disk at a time. It defaults to 4096 bytes (4KB), the Squid |
3755 | default swap page. | |
7e3ce7b9 | 3756 | DOC_END |
3757 | ||
3758 | NAME: digest_rebuild_chunk_percentage | |
efd900cb | 3759 | COMMENT: (percent, 0-100) |
7e3ce7b9 | 3760 | IFDEF: USE_CACHE_DIGESTS |
3761 | TYPE: int | |
3762 | LOC: Config.digest.rebuild_chunk_percentage | |
3763 | DEFAULT: 10 | |
3764 | DOC_START | |
efd900cb | 3765 | This is the percentage of the Cache Digest to be scanned at a |
3766 | time. By default it is set to 10% of the Cache Digest. | |
7e3ce7b9 | 3767 | DOC_END |
3768 | ||
efd900cb | 3769 | NAME: chroot |
3770 | TYPE: string | |
3771 | LOC: Config.chroot_dir | |
3772 | DEFAULT: none | |
3773 | DOC_START | |
3774 | Use this to have Squid do a chroot() while initializing. This | |
3775 | also causes Squid to fully drop root privileges after | |
3776 | initializing. This means, for example, that if you use a HTTP | |
3777 | port less than 1024 and try to reconfigure, you will get an | |
3778 | error. | |
3779 | DOC_END | |
efd900cb | 3780 | |
3781 | NAME: client_persistent_connections | |
3782 | TYPE: onoff | |
3783 | LOC: Config.onoff.client_pconns | |
3784 | DEFAULT: on | |
3785 | DOC_NONE | |
3786 | ||
3787 | NAME: server_persistent_connections | |
3788 | TYPE: onoff | |
3789 | LOC: Config.onoff.server_pconns | |
3790 | DEFAULT: on | |
3791 | DOC_START | |
3792 | Persistent connection support for clients and servers. By | |
3793 | default, Squid uses persistent connections (when allowed) | |
3794 | with its clients and servers. You can use these options to | |
3795 | disable persistent connections with clients and/or servers. | |
efd900cb | 3796 | DOC_END |
9d24d603 | 3797 | |
3d15e2d7 | 3798 | NAME: pipeline_prefetch |
3799 | TYPE: onoff | |
3800 | LOC: Config.onoff.pipeline_prefetch | |
30b4eb1e | 3801 | DEFAULT: off |
3d15e2d7 | 3802 | DOC_START |
3803 | To boost the performance of pipelined requests to closer | |
036145b4 | 3804 | match that of a non-proxied environment Squid can try to fetch |
3d15e2d7 | 3805 | up to two requests in parallell from a pipeline. |
30b4eb1e | 3806 | |
036145b4 | 3807 | Defaults to off for bandwidth management and access logging |
3808 | reasons. | |
3d15e2d7 | 3809 | DOC_END |
3810 | ||
56fe752e | 3811 | NAME: extension_methods |
3812 | TYPE: wordlist | |
3813 | LOC: Config.ext_methods | |
3814 | DEFAULT: none | |
3815 | DOC_START | |
3816 | Squid only knows about standardized HTTP request methods. | |
3817 | You can add up to 20 additional "extension" methods here. | |
3818 | DOC_END | |
3819 | ||
b8a46de0 | 3820 | NAME: high_response_time_warning |
3821 | TYPE: int | |
3822 | COMMENT: (msec) | |
3823 | LOC: Config.warnings.high_rptm | |
3824 | DEFAULT: 0 | |
3825 | DOC_START | |
3826 | If the one-minute median response time exceeds this value, | |
3827 | Squid prints a WARNING with debug level 0 to get the | |
3828 | administrators attention. The value is in milliseconds. | |
3829 | DOC_END | |
3830 | ||
3831 | NAME: high_page_fault_warning | |
3832 | TYPE: int | |
3833 | LOC: Config.warnings.high_pf | |
3834 | DEFAULT: 0 | |
3835 | DOC_START | |
3836 | If the one-minute average page fault rate exceeds this | |
3837 | value, Squid prints a WARNING with debug level 0 to get | |
3838 | the administrators attention. The value is in page faults | |
3839 | per second. | |
3840 | DOC_END | |
3841 | ||
3842 | NAME: high_memory_warning | |
3843 | TYPE: b_size_t | |
3844 | LOC: Config.warnings.high_memory | |
3845 | DEFAULT: 0 | |
3846 | DOC_START | |
3847 | If the memory usage (as determined by mallinfo) exceeds | |
3848 | value, Squid prints a WARNING with debug level 0 to get | |
3849 | the administrators attention. | |
3850 | DOC_END | |
3851 | ||
65a53c8e | 3852 | NAME: store_dir_select_algorithm |
3853 | TYPE: string | |
3854 | LOC: Config.store_dir_select_algorithm | |
3855 | DEFAULT: least-load | |
3856 | DOC_START | |
3857 | Set this to 'round-robin' as an alternative. | |
3858 | DOC_END | |
3859 | ||
225644d7 | 3860 | NAME: forward_log |
3861 | IFDEF: WIP_FWD_LOG | |
3862 | TYPE: string | |
3863 | DEFAULT: none | |
3864 | LOC: Config.Log.forward | |
3865 | DOC_START | |
3866 | Logs the server-side requests. | |
3867 | ||
3868 | This is currently work in progress. | |
3869 | DOC_END | |
3870 | ||
7613d09c | 3871 | NAME: ie_refresh |
3872 | COMMENT: on|off | |
3873 | TYPE: onoff | |
3874 | LOC: Config.onoff.ie_refresh | |
3875 | DEFAULT: off | |
3876 | DOC_START | |
3877 | Microsoft Internet Explorer up until version 5.5 Service | |
3878 | Pack 1 has an issue with transparent proxies, wherein it | |
3879 | is impossible to force a refresh. Turning this on provides | |
3880 | a partial fix to the problem, by causing all IMS-REFRESH | |
3881 | requests from older IE versions to check the origin server | |
3882 | for fresh content. This reduces hit ratio by some amount | |
3883 | (~10% in my experience), but allows users to actually get | |
3884 | fresh content when they want it. Note that because Squid | |
3885 | cannot tell if the user is using 5.5 or 5.5SP1, the behavior | |
3886 | of 5.5 is unchanged from old versions of Squid (i.e. a | |
3887 | forced refresh is impossible). Newer versions of IE will, | |
3888 | hopefully, continue to have the new behavior and will be | |
3889 | handled based on that assumption. This option defaults to | |
3890 | the old Squid behavior, which is better for hit ratios but | |
3891 | worse for clients using IE, if they need to be able to | |
3892 | force fresh content. | |
3893 | DOC_END | |
3894 | ||
f66a9ef4 | 3895 | NAME: vary_ignore_expire |
3896 | COMMENT: on|off | |
3897 | TYPE: onoff | |
3898 | LOC: Config.onoff.vary_ignore_expire | |
3899 | DEFAULT: off | |
3900 | DOC_START | |
3901 | Many HTTP servers supporting Vary gives such objects | |
3902 | immediate expiry time with no cache-control header | |
3903 | when requested by a HTTP/1.0 client. This option | |
3904 | enables Squid to ignore such expiry times until | |
3905 | HTTP/1.1 is fully implemented. | |
3906 | WARNING: This may eventually cause some varying | |
3907 | objects not intended for caching to get cached. | |
3908 | DOC_END | |
3909 | ||
d1ec12c7 | 3910 | NAME: sleep_after_fork |
3911 | COMMENT: (microseconds) | |
3912 | TYPE: int | |
3913 | LOC: Config.sleep_after_fork | |
3914 | DEFAULT: 0 | |
3915 | DOC_START | |
96d88dcb | 3916 | When this is set to a non-zero value, the main Squid process |
3917 | sleeps the specified number of microseconds after a fork() | |
3918 | system call. This sleep may help the situation where your | |
3919 | system reports fork() failures due to lack of (virtual) | |
3920 | memory. Note, however, that if you have a lot of child | |
3921 | processes, then these sleep delays will add up and your | |
3922 | Squid will not service requests for some amount of time | |
3923 | until all the child processes have been started. | |
d1ec12c7 | 3924 | DOC_END |
1fbbdcb0 | 3925 | |
2b4283e4 | 3926 | EOF |