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