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