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