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