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