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