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