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