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