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