Advertisement
Guest User

squid.conf

a guest
Feb 24th, 2013
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 156.22 KB | None | 0 0
  1.  
  2. # WELCOME TO SQUID 2.6.STABLE21
  3. # ----------------------------
  4. #
  5. # This is the default Squid configuration file. You may wish
  6. # to look at the Squid home page (http://www.squid-cache.org/)
  7. # for the FAQ and other documentation.
  8. #
  9. # The default Squid config file shows what the defaults for
  10. # various options happen to be. If you don't need to change the
  11. # default, you shouldn't uncomment the line. Doing so may cause
  12. # run-time problems. In some cases "none" refers to no default
  13. # setting at all, while in other cases it refers to a valid
  14. # option - the comments for that keyword indicate if this is the
  15. # case.
  16. #
  17.  
  18.  
  19. # OPTIONS FOR AUTHENTICATION
  20. # -----------------------------------------------------------------------------
  21.  
  22. # TAG: auth_param
  23. # This is used to define parameters for the various authentication
  24. # schemes supported by Squid.
  25. #
  26. # format: auth_param scheme parameter [setting]
  27. #
  28. # The order in which authentication schemes are presented to the client is
  29. # dependent on the order the scheme first appears in config file. IE
  30. # has a bug (it's not RFC 2617 compliant) in that it will use the basic
  31. # scheme if basic is the first entry presented, even if more secure
  32. # schemes are presented. For now use the order in the recommended
  33. # settings section below. If other browsers have difficulties (don't
  34. # recognize the schemes offered even if you are using basic) either
  35. # put basic first, or disable the other schemes (by commenting out their
  36. # program entry).
  37. #
  38. # Once an authentication scheme is fully configured, it can only be
  39. # shutdown by shutting squid down and restarting. Changes can be made on
  40. # the fly and activated with a reconfigure. I.E. You can change to a
  41. # different helper, but not unconfigure the helper completely.
  42. #
  43. # Please note that while this directive defines how Squid processes
  44. # authentication it does not automatically activate authentication.
  45. # To use authentication you must in addition make use of ACLs based
  46. # on login name in http_access (proxy_auth, proxy_auth_regex or
  47. # external with %LOGIN used in the format tag). The browser will be
  48. # challenged for authentication on the first such acl encountered
  49. # in http_access processing and will also be re-challenged for new
  50. # login credentials if the request is being denied by a proxy_auth
  51. # type acl.
  52. #
  53. # WARNING: authentication can't be used in a transparently intercepting
  54. # proxy as the client then thinks it is talking to an origin server and
  55. # not the proxy. This is a limitation of bending the TCP/IP protocol to
  56. # transparently intercepting port 80, not a limitation in Squid.
  57. #
  58. # === Parameters for the basic scheme follow. ===
  59. #
  60. # "program" cmdline
  61. # Specify the command for the external authenticator. Such a program
  62. # reads a line containing "username password" and replies "OK" or
  63. # "ERR" in an endless loop. "ERR" responses may optionally be followed
  64. # by a error description available as %m in the returned error page.
  65. #
  66. # By default, the basic authentication scheme is not used unless a
  67. # program is specified.
  68. #
  69. # If you want to use the traditional proxy authentication, jump over to
  70. # the helpers/basic_auth/NCSA directory and type:
  71. # % make
  72. # % make install
  73. #
  74. # Then, set this line to something like
  75. #
  76. # auth_param basic program /usr/libexec/ncsa_auth /usr/etc/passwd
  77. #
  78. # "children" numberofchildren
  79. # The number of authenticator processes to spawn. If you start too few
  80. # squid will have to wait for them to process a backlog of credential
  81. # verifications, slowing it down. When credential verifications are
  82. # done via a (slow) network you are likely to need lots of
  83. # authenticator processes.
  84. # auth_param basic children 5
  85. #
  86. # "concurrency" numberofconcurrentrequests
  87. # The number of concurrent requests/channels the helper supports.
  88. # Changes the protocol used to include a channel number first on
  89. # the request/response line, allowing multiple requests to be sent
  90. # to the same helper in parallell without wating for the response.
  91. # Must not be set unless it's known the helper supports this.
  92. #
  93. # "realm" realmstring
  94. # Specifies the realm name which is to be reported to the client for
  95. # the basic proxy authentication scheme (part of the text the user
  96. # will see when prompted their username and password).
  97. # auth_param basic realm Squid proxy-caching web server
  98. #
  99. # "credentialsttl" timetolive
  100. # Specifies how long squid assumes an externally validated
  101. # username:password pair is valid for - in other words how often the
  102. # helper program is called for that user. Set this low to force
  103. # revalidation with short lived passwords. Note that setting this high
  104. # does not impact your susceptibility to replay attacks unless you are
  105. # using an one-time password system (such as SecureID). If you are using
  106. # such a system, you will be vulnerable to replay attacks unless you
  107. # also use the max_user_ip ACL in an http_access rule.
  108. # auth_param basic credentialsttl 2 hours
  109. #
  110. # "casesensitive" on|off
  111. # Specifies if usernames are case sensitive. Most user databases are
  112. # case insensitive allowing the same username to be spelled using both
  113. # lower and upper case letters, but some are case sensitive. This
  114. # makes a big difference for user_max_ip ACL processing and similar.
  115. # auth_param basic casesensitive off
  116. #
  117. # "blankpassword" on|off
  118. # Specifies if blank passwords should be supported. Defaults to off
  119. # as there is multiple authentication backends which handles blank
  120. # passwords as "guest" access.
  121. #
  122. # === Parameters for the digest scheme follow ===
  123. #
  124. # "program" cmdline
  125. # Specify the command for the external authenticator. Such a program
  126. # reads a line containing "username":"realm" and replies with the
  127. # appropriate H(A1) value hex encoded or ERR if the user (or his H(A1)
  128. # hash) does not exists. See RFC 2616 for the definition of H(A1).
  129. # "ERR" responses may optionally be followed by a error description
  130. # available as %m in the returned error page.
  131. #
  132. # By default, the digest authentication scheme is not used unless a
  133. # program is specified.
  134. #
  135. # If you want to use a digest authenticator, jump over to the
  136. # helpers/digest_auth/ directory and choose the authenticator to use.
  137. # It it's directory type
  138. # % make
  139. # % make install
  140. #
  141. # Then, set this line to something like
  142. #
  143. # auth_param digest program /usr/libexec/digest_auth_pw /usr/etc/digpass
  144. #
  145. # "children" numberofchildren
  146. # The number of authenticator processes to spawn. If you start too few
  147. # squid will have to wait for them to process a backlog of credential
  148. # verifications, slowing it down. When credential verifications are
  149. # done via a (slow) network you are likely to need lots of
  150. # authenticator processes.
  151. # auth_param digest children 5
  152. #
  153. # "concurrency" numberofconcurrentrequests
  154. # The number of concurrent requests/channels the helper supports.
  155. # Changes the protocol used to include a channel number first on
  156. # the request/response line, allowing multiple requests to be sent
  157. # to the same helper in parallell without wating for the response.
  158. # Must not be set unless it's known the helper supports this.
  159. #
  160. # "realm" realmstring
  161. # Specifies the realm name which is to be reported to the client for the
  162. # digest proxy authentication scheme (part of the text the user will see
  163. # when prompted their username and password).
  164. # auth_param digest realm Squid proxy-caching web server
  165. #
  166. # "nonce_garbage_interval" timeinterval
  167. # Specifies the interval that nonces that have been issued to clients are
  168. # checked for validity.
  169. # auth_param digest nonce_garbage_interval 5 minutes
  170. #
  171. # "nonce_max_duration" timeinterval
  172. # Specifies the maximum length of time a given nonce will be valid for.
  173. # auth_param digest nonce_max_duration 30 minutes
  174. #
  175. # "nonce_max_count" number
  176. # Specifies the maximum number of times a given nonce can be used.
  177. # auth_param digest nonce_max_count 50
  178. #
  179. # "nonce_strictness" on|off
  180. # Determines if squid requires strict increment-by-1 behavior for nonce
  181. # counts, or just incrementing (off - for use when useragents generate
  182. # nonce counts that occasionally miss 1 (ie, 1,2,4,6)).
  183. # auth_param digest nonce_strictness off
  184. #
  185. # "check_nonce_count" on|off
  186. # This directive if set to off can disable the nonce count check
  187. # completely to work around buggy digest qop implementations in certain
  188. # mainstream browser versions. Default on to check the nonce count to
  189. # protect from authentication replay attacks.
  190. # auth_param digest check_nonce_count on
  191. #
  192. # "post_workaround" on|off
  193. # This is a workaround to certain buggy browsers who sends an incorrect
  194. # request digest in POST requests when reusing the same nonce as acquired
  195. # earlier in response to a GET request.
  196. # auth_param digest post_workaround off
  197. #
  198. # === NTLM scheme options follow ===
  199. #
  200. # "program" cmdline
  201. # Specify the command for the external NTLM authenticator. Such a
  202. # program participates in the NTLMSSP exchanges between Squid and the
  203. # client and reads commands according to the Squid NTLMSSP helper
  204. # protocol. See helpers/ntlm_auth/ for details. Recommended ntlm
  205. # authenticator is ntlm_auth from Samba-3.X, but a number of other
  206. # ntlm authenticators is available.
  207. #
  208. # By default, the ntlm authentication scheme is not used unless a
  209. # program is specified.
  210. #
  211. # auth_param ntlm program /path/to/samba/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp
  212. #
  213. # "children" numberofchildren
  214. # The number of authenticator processes to spawn. If you start too few
  215. # squid will have to wait for them to process a backlog of credential
  216. # verifications, slowing it down. When credential verifications are
  217. # done via a (slow) network you are likely to need lots of
  218. # authenticator processes.
  219. # auth_param ntlm children 5
  220. #
  221. # "keep_alive" on|off
  222. # This option enables the use of keep-alive on the initial
  223. # authentication request. It has been reported some versions of MSIE
  224. # have problems if this is enabled, but performance will be increased
  225. # if enabled.
  226. #
  227. # auth_param ntlm keep_alive on
  228. #
  229. # === Negotiate scheme options follow ===
  230. #
  231. # "program" cmdline
  232. # Specify the command for the external Negotiate authenticator. Such a
  233. # program participates in the SPNEGO exchanges between Squid and the
  234. # client and reads commands according to the Squid ntlmssp helper
  235. # protocol. See helpers/ntlm_auth/ for details. Recommended SPNEGO
  236. # authenticator is ntlm_auth from Samba-4.X.
  237. #
  238. # By default, the Negotiate authentication scheme is not used unless a
  239. # program is specified.
  240. #
  241. # auth_param negotiate program /path/to/samba/bin/ntlm_auth --helper-proto# col=gss-spnego
  242. #
  243. # "children" numberofchildren
  244. # The number of authenticator processes to spawn. If you start too few
  245. # squid will have to wait for them to process a backlog of credential
  246. # verifications, slowing it down. When credential verifications are
  247. # done via a (slow) network you are likely to need lots of
  248. # authenticator processes.
  249. # auth_param negotiate children 5
  250. #
  251. # "keep_alive" on|off
  252. # If you experience problems with PUT/POST requests when using the
  253. # Negotiate authentication scheme then you can try setting this to
  254. # off. This will cause Squid to forcibly close the connection on
  255. # the initial requests where the browser asks which schemes are
  256. # supported by the proxy.
  257. #
  258. # auth_param negotiate keep_alive on
  259. #
  260. #Recommended minimum configuration per scheme:
  261. #auth_param negotiate program <uncomment and complete this line to activate>
  262. #auth_param negotiate children 5
  263. #auth_param negotiate keep_alive on
  264. #auth_param ntlm program <uncomment and complete this line to activate>
  265. #auth_param ntlm children 5
  266. #auth_param ntlm keep_alive on
  267. #auth_param digest program <uncomment and complete this line>
  268. #auth_param digest children 5
  269. #auth_param digest realm Squid proxy-caching web server
  270. #auth_param digest nonce_garbage_interval 5 minutes
  271. #auth_param digest nonce_max_duration 30 minutes
  272. #auth_param digest nonce_max_count 50
  273. #auth_param basic program <uncomment and complete this line>
  274. #auth_param basic children 5
  275. #auth_param basic realm Squid proxy-caching web server
  276. #auth_param basic credentialsttl 2 hours
  277. #auth_param basic casesensitive off
  278.  
  279. # TAG: authenticate_cache_garbage_interval
  280. # The time period between garbage collection across the username cache.
  281. # This is a tradeoff between memory utilization (long intervals - say
  282. # 2 days) and CPU (short intervals - say 1 minute). Only change if you
  283. # have good reason to.
  284. #
  285. #Default:
  286. # authenticate_cache_garbage_interval 1 hour
  287.  
  288. # TAG: authenticate_ttl
  289. # The time a user & their credentials stay in the logged in user cache
  290. # since their last request. When the garbage interval passes, all user
  291. # credentials that have passed their TTL are removed from memory.
  292. #
  293. #Default:
  294. # authenticate_ttl 1 hour
  295.  
  296. # TAG: authenticate_ip_ttl
  297. # If you use proxy authentication and the 'max_user_ip' ACL, this
  298. # directive controls how long Squid remembers the IP addresses
  299. # associated with each user. Use a small value (e.g., 60 seconds) if
  300. # your users might change addresses quickly, as is the case with
  301. # dialups. You might be safe using a larger value (e.g., 2 hours) in a
  302. # corporate LAN environment with relatively static address assignments.
  303. #
  304. #Default:
  305. # authenticate_ip_ttl 0 seconds
  306.  
  307.  
  308. # ACCESS CONTROLS
  309. # -----------------------------------------------------------------------------
  310.  
  311. # TAG: external_acl_type
  312. # This option defines external acl classes using a helper program to
  313. # look up the status
  314. #
  315. # external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
  316. #
  317. # Options:
  318. #
  319. # ttl=n TTL in seconds for cached results (defaults to 3600
  320. # for 1 hour)
  321. # negative_ttl=n
  322. # TTL for cached negative lookups (default same
  323. # as ttl)
  324. # children=n number of processes spawn to service external acl
  325. # lookups of this type. (default 5).
  326. # concurrency=n concurrency level per process. Only used with helpers
  327. # capable of processing more than one query at a time.
  328. # Note: see compatibility note below
  329. # cache=n result cache size, 0 is unbounded (default)
  330. # grace= Percentage remaining of TTL where a refresh of a
  331. # cached entry should be initiated without needing to
  332. # wait for a new reply. (default 0 for no grace period)
  333. # protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
  334. #
  335. # FORMAT specifications
  336. #
  337. # %LOGIN Authenticated user login name
  338. # %EXT_USER Username from external acl
  339. # %IDENT Ident user name
  340. # %SRC Client IP
  341. # %SRCPORT Client source port
  342. # %DST Requested host
  343. # %PROTO Requested protocol
  344. # %PORT Requested port
  345. # %METHOD Request method
  346. # %MYADDR Squid interface address
  347. # %MYPORT Squid http_port number
  348. # %PATH Requested URL-path (including query-string if any)
  349. # %USER_CERT SSL User certificate in PEM format
  350. # %USER_CERTCHAIN SSL User certificate chain in PEM format
  351. # %USER_CERT_xx SSL User certificate subject attribute xx
  352. # %USER_CA_xx SSL User certificate issuer attribute xx
  353. # %{Header} HTTP request header
  354. # %{Hdr:member} HTTP request header list member
  355. # %{Hdr:;member}
  356. # HTTP request header list member using ; as
  357. # list separator. ; can be any non-alphanumeric
  358. # character.
  359. # %ACL The ACL name
  360. # %DATA The ACL arguments. If not used then any arguments
  361. # is automatically added at the end
  362. #
  363. # In addition to the above, any string specified in the referencing
  364. # acl will also be included in the helper request line, after the
  365. # specified formats (see the "acl external" directive)
  366. #
  367. # The helper receives lines per the above format specification,
  368. # and returns lines starting with OK or ERR indicating the validity
  369. # of the request and optionally followed by additional keywords with
  370. # more details.
  371. #
  372. # General result syntax:
  373. #
  374. # OK/ERR keyword=value ...
  375. #
  376. # Defined keywords:
  377. #
  378. # user= The users name (login also understood)
  379. # password= The users password (for PROXYPASS login= cache_peer)
  380. # message= Error message or similar used as %o in error messages
  381. # (error also understood)
  382. # log= String to be logged in access.log. Available as
  383. # %ea in logformat specifications
  384. #
  385. # If protocol=3.0 (the default) then URL escaping is used to protect
  386. # each value in both requests and responses.
  387. #
  388. # If using protocol=2.5 then all values need to be enclosed in quotes
  389. # if they may contain whitespace, or the whitespace escaped using \.
  390. # And quotes or \ characters within the keyword value must be \ escaped.
  391. #
  392. # When using the concurrency= option the protocol is changed by
  393. # introducing a query channel tag infront of the request/response.
  394. # The query channel tag is a number between 0 and concurrency-1.
  395. #
  396. # Compatibility Note: The children= option was named concurrency= in
  397. # Squid-2.5.STABLE3 and earlier, and was accepted as an alias for the
  398. # duration of the Squid-2.5 releases to keep compatibility. However,
  399. # the meaning of concurrency= option has changed in Squid-2.6 to match
  400. # that of Squid-3 and the old syntax no longer works.
  401. #
  402. #Default:
  403. # none
  404.  
  405. # TAG: acl
  406. # Defining an Access List
  407. #
  408. # acl aclname acltype string1 ...
  409. # acl aclname acltype "file" ...
  410. #
  411. # when using "file", the file should contain one item per line
  412. #
  413. # acltype is one of the types described below
  414. #
  415. # By default, regular expressions are CASE-SENSITIVE. To make
  416. # them case-insensitive, use the -i option.
  417. #
  418. # acl aclname src ip-address/netmask ... (clients IP address)
  419. # acl aclname src addr1-addr2/netmask ... (range of addresses)
  420. # acl aclname dst ip-address/netmask ... (URL host's IP address)
  421. # acl aclname myip ip-address/netmask ... (local socket IP address)
  422. #
  423. # acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
  424. # # The arp ACL requires the special configure option --enable-arp-acl.
  425. # # Furthermore, the arp ACL code is not portable to all operating systems.
  426. # # It works on Linux, Solaris, FreeBSD and some other *BSD variants.
  427. # #
  428. # # NOTE: Squid can only determine the MAC address for clients that are on
  429. # # the same subnet. If the client is on a different subnet, then Squid cannot
  430. # # find out its MAC address.
  431. #
  432. # acl aclname srcdomain .foo.com ... # reverse lookup, client IP
  433. # acl aclname dstdomain .foo.com ... # Destination server from URL
  434. # acl aclname srcdom_regex [-i] xxx ... # regex matching client name
  435. # acl aclname dstdom_regex [-i] xxx ... # regex matching server
  436. # # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
  437. # # based URL is used and no match is found. The name "none" is used
  438. # # if the reverse lookup fails.
  439. #
  440. # acl aclname time [day-abbrevs] [h1:m1-h2:m2]
  441. # day-abbrevs:
  442. # S - Sunday
  443. # M - Monday
  444. # T - Tuesday
  445. # W - Wednesday
  446. # H - Thursday
  447. # F - Friday
  448. # A - Saturday
  449. # h1:m1 must be less than h2:m2
  450. # acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
  451. # acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path
  452. # acl aclname urllogin [-i] [^a-zA-Z0-9] ... # regex matching on URL login field
  453. # acl aclname port 80 70 21 ...
  454. # acl aclname port 0-1024 ... # ranges allowed
  455. # acl aclname myport 3128 ... # (local socket TCP port)
  456. # acl aclname proto HTTP FTP ...
  457. # acl aclname method GET POST ...
  458. # acl aclname browser [-i] regexp ...
  459. # # pattern match on User-Agent header (see also req_header below)
  460. # acl aclname referer_regex [-i] regexp ...
  461. # # pattern match on Referer header
  462. # # Referer is highly unreliable, so use with care
  463. # acl aclname ident username ...
  464. # acl aclname ident_regex [-i] pattern ...
  465. # # string match on ident output.
  466. # # use REQUIRED to accept any non-null ident.
  467. # acl aclname src_as number ...
  468. # acl aclname dst_as number ...
  469. # # Except for access control, AS numbers can be used for
  470. # # routing of requests to specific caches. Here's an
  471. # # example for routing all requests for AS#1241 and only
  472. # # those to mycache.mydomain.net:
  473. # # acl asexample dst_as 1241
  474. # # cache_peer_access mycache.mydomain.net allow asexample
  475. # # cache_peer_access mycache_mydomain.net deny all
  476. #
  477. # acl aclname proxy_auth [-i] username ...
  478. # acl aclname proxy_auth_regex [-i] pattern ...
  479. # # list of valid usernames
  480. # # use REQUIRED to accept any valid username.
  481. # #
  482. # # NOTE: when a Proxy-Authentication header is sent but it is not
  483. # # needed during ACL checking the username is NOT logged
  484. # # in access.log.
  485. # #
  486. # # NOTE: proxy_auth requires a EXTERNAL authentication program
  487. # # to check username/password combinations (see
  488. # # auth_param directive).
  489. # #
  490. # # NOTE: proxy_auth can't be used in a transparent proxy as
  491. # # the browser needs to be configured for using a proxy in order
  492. # # to respond to proxy authentication.
  493. #
  494. # acl aclname snmp_community string ...
  495. # # A community string to limit access to your SNMP Agent
  496. # # Example:
  497. # #
  498. # # acl snmppublic snmp_community public
  499. #
  500. # acl aclname maxconn number
  501. # # This will be matched when the client's IP address has
  502. # # more than <number> HTTP connections established.
  503. #
  504. # acl aclname max_user_ip [-s] number
  505. # # This will be matched when the user attempts to log in from more
  506. # # than <number> different ip addresses. The authenticate_ip_ttl
  507. # # parameter controls the timeout on the ip entries.
  508. # # If -s is specified the limit is strict, denying browsing
  509. # # from any further IP addresses until the ttl has expired. Without
  510. # # -s Squid will just annoy the user by "randomly" denying requests.
  511. # # (the counter is reset each time the limit is reached and a
  512. # # request is denied)
  513. # # NOTE: in acceleration mode or where there is mesh of child proxies,
  514. # # clients may appear to come from multiple addresses if they are
  515. # # going through proxy farms, so a limit of 1 may cause user problems.
  516. #
  517. # acl aclname req_mime_type mime-type1 ...
  518. # # regex match against the mime type of the request generated
  519. # # by the client. Can be used to detect file upload or some
  520. # # types HTTP tunneling requests.
  521. # # NOTE: This does NOT match the reply. You cannot use this
  522. # # to match the returned file type.
  523. #
  524. # acl aclname req_header header-name [-i] any\.regex\.here
  525. # # regex match against any of the known request headers. May be
  526. # # thought of as a superset of "browser", "referer" and "mime-type"
  527. # # ACLs.
  528. #
  529. # acl aclname rep_mime_type mime-type1 ...
  530. # # regex match against the mime type of the reply received by
  531. # # squid. Can be used to detect file download or some
  532. # # types HTTP tunneling requests.
  533. # # NOTE: This has no effect in http_access rules. It only has
  534. # # effect in rules that affect the reply data stream such as
  535. # # http_reply_access.
  536. #
  537. # acl aclname rep_header header-name [-i] any\.regex\.here
  538. # # regex match against any of the known reply headers. May be
  539. # # thought of as a superset of "browser", "referer" and "mime-type"
  540. # # ACLs.
  541. # #
  542. # # Example:
  543. # #
  544. # # acl many_spaces rep_header Content-Disposition -i [[:space:]]{3,}
  545. #
  546. # acl acl_name external class_name [arguments...]
  547. # # external ACL lookup via a helper class defined by the
  548. # # external_acl_type directive.
  549. #
  550. # acl urlgroup group1 ...
  551. # # match against the urlgroup as indicated by redirectors
  552. #
  553. # acl aclname user_cert attribute values...
  554. # # match against attributes in a user SSL certificate
  555. # # attribute is one of DN/C/O/CN/L/ST
  556. #
  557. # acl aclname ca_cert attribute values...
  558. # # match against attributes a users issuing CA SSL certificate
  559. # # attribute is one of DN/C/O/CN/L/ST
  560. #
  561. # acl aclname ext_user username ...
  562. # acl aclname ext_user_regex [-i] pattern ...
  563. # # string match on username returned by external acl helper
  564. # # use REQUIRED to accept any non-null user name.
  565. #
  566. #Examples:
  567. #acl macaddress arp 09:00:2b:23:45:67
  568. #acl myexample dst_as 1241
  569. #acl password proxy_auth REQUIRED
  570. #acl fileupload req_mime_type -i ^multipart/form-data$
  571. #acl javascript rep_mime_type -i ^application/x-javascript$
  572. #
  573. #Recommended minimum configuration:
  574. acl all src 0.0.0.0/0.0.0.0
  575. acl manager proto cache_object
  576. acl localhost src 127.0.0.1/255.255.255.255
  577. acl to_localhost dst 127.0.0.0/8
  578. acl SSL_ports port 443
  579. acl Safe_ports port 80 # http
  580. acl Safe_ports port 21 # ftp
  581. acl Safe_ports port 443 # https
  582. acl Safe_ports port 70 # gopher
  583. acl Safe_ports port 210 # wais
  584. acl Safe_ports port 1025-65535 # unregistered ports
  585. acl Safe_ports port 280 # http-mgmt
  586. acl Safe_ports port 488 # gss-http
  587. acl Safe_ports port 591 # filemaker
  588. acl Safe_ports port 777 # multiling http
  589. acl CONNECT method CONNECT
  590.  
  591. # TAG: http_access
  592. # Allowing or Denying access based on defined access lists
  593. #
  594. # Access to the HTTP port:
  595. # http_access allow|deny [!]aclname ...
  596. #
  597. # NOTE on default values:
  598. #
  599. # If there are no "access" lines present, the default is to deny
  600. # the request.
  601. #
  602. # If none of the "access" lines cause a match, the default is the
  603. # opposite of the last line in the list. If the last line was
  604. # deny, the default is allow. Conversely, if the last line
  605. # is allow, the default will be deny. For these reasons, it is a
  606. # good idea to have an "deny all" or "allow all" entry at the end
  607. # of your access lists to avoid potential confusion.
  608. #
  609. #Default:
  610. # http_access deny all
  611. #
  612. #Recommended minimum configuration:
  613. #
  614. # Only allow cachemgr access from localhost
  615. http_access allow manager localhost
  616. http_access deny manager
  617. # Deny requests to unknown ports
  618. http_access deny !Safe_ports
  619. # Deny CONNECT to other than SSL ports
  620. http_access deny CONNECT !SSL_ports
  621. #
  622. # We strongly recommend the following be uncommented to protect innocent
  623. # web applications running on the proxy server who think the only
  624. # one who can access services on "localhost" is a local user
  625. #http_access deny to_localhost
  626. #
  627. # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
  628. # /auth_param
  629. # Example rule allowing access from your local networks. Adapt
  630. # to list your (internal) IP networks from where browsing should
  631. # be allowed
  632. acl server src 192.168.254.0/24
  633. acl full-access src 192.168.254.5-192.168.254.25
  634. acl bad_url url_regex "/etc/squid/acl/bad_url"
  635. acl upload url_regex "/etc/squid/acl/upload"
  636. acl filetypes urlpath_regex -i "/etc/squid/acl/filetypes.acl"
  637. acl banners url_regex "/etc/squid/acl/ads.acl
  638. http_access deny banners !full-access
  639. http_access deny filetypes !full-access
  640. http_access deny upload !full-access
  641. #http_access deny bad_url !full-access
  642. acl block_vkontakte dst 95.142.200.0/21 87.240.128.0/18 93.186.224.0/21 93.186.232.0/21 95.142.192.0/21
  643. http_access allow server
  644. http_access allow full-access
  645. # And finally deny all other access to this proxy
  646. #http_access allow localhost
  647. #http_access deny all
  648.  
  649. # TAG: http_access2
  650. # Allowing or Denying access based on defined access lists
  651. #
  652. # Identical to http_access, but runs after redirectors. If not set
  653. # then only http_access is used.
  654. #
  655. #Default:
  656. # none
  657.  
  658. # TAG: http_reply_access
  659. # Allow replies to client requests. This is complementary to http_access.
  660. #
  661. # http_reply_access allow|deny [!] aclname ...
  662. #
  663. # NOTE: if there are no access lines present, the default is to allow
  664. # all replies
  665. #
  666. # If none of the access lines cause a match the opposite of the
  667. # last line will apply. Thus it is good practice to end the rules
  668. # with an "allow all" or "deny all" entry.
  669. #
  670. #Default:
  671. # http_reply_access allow all
  672.  
  673. # TAG: icp_access
  674. # Allowing or Denying access to the ICP port based on defined
  675. # access lists
  676. #
  677. # icp_access allow|deny [!]aclname ...
  678. #
  679. # See http_access for details
  680. #
  681. #Default:
  682. # icp_access deny all
  683. #
  684. #Allow ICP queries from everyone
  685. icp_access allow all
  686.  
  687. # TAG: htcp_access
  688. # Note: This option is only available if Squid is rebuilt with the
  689. # --enable-htcp option
  690. #
  691. # Allowing or Denying access to the HTCP port based on defined
  692. # access lists
  693. #
  694. # htcp_access allow|deny [!]aclname ...
  695. #
  696. # See http_access for details
  697. #
  698. # NOTE: The default if no htcp_access lines are present is to
  699. # deny all traffic. This default may cause problems with peers
  700. # using the htcp or htcp-oldsquid options.
  701. #
  702. ##Allow HTCP queries from everyone
  703. #htcp_access allow all
  704. #
  705. #Default:
  706. # htcp_access deny all
  707.  
  708. # TAG: htcp_clr_access
  709. # Note: This option is only available if Squid is rebuilt with the
  710. # --enable-htcp option
  711. #
  712. # Allowing or Denying access to purge content using HTCP based
  713. # on defined access lists
  714. #
  715. # htcp_clr_access allow|deny [!]aclname ...
  716. #
  717. # See http_access for details
  718. #
  719. ##Allow HTCP CLR requests from trusted peers
  720. #acl htcp_clr_peer src 172.16.1.2
  721. #htcp_clr_access allow htcp_clr_peer
  722. #
  723. #Default:
  724. # htcp_clr_access deny all
  725.  
  726. # TAG: miss_access
  727. # Use to force your neighbors to use you as a sibling instead of
  728. # a parent. For example:
  729. #
  730. # acl localclients src 172.16.0.0/16
  731. # miss_access allow localclients
  732. # miss_access deny !localclients
  733. #
  734. # This means only your local clients are allowed to fetch
  735. # MISSES and all other clients can only fetch HITS.
  736. #
  737. # By default, allow all clients who passed the http_access rules
  738. # to fetch MISSES from us.
  739. #
  740. #Default setting:
  741. # miss_access allow all
  742.  
  743. # TAG: ident_lookup_access
  744. # A list of ACL elements which, if matched, cause an ident
  745. # (RFC931) lookup to be performed for this request. For
  746. # example, you might choose to always perform ident lookups
  747. # for your main multi-user Unix boxes, but not for your Macs
  748. # and PCs. By default, ident lookups are not performed for
  749. # any requests.
  750. #
  751. # To enable ident lookups for specific client addresses, you
  752. # can follow this example:
  753. #
  754. # acl ident_aware_hosts src 198.168.1.0/255.255.255.0
  755. # ident_lookup_access allow ident_aware_hosts
  756. # ident_lookup_access deny all
  757. #
  758. # Only src type ACL checks are fully supported. A src_domain
  759. # ACL might work at times, but it will not always provide
  760. # the correct result.
  761. #
  762. #Default:
  763. # ident_lookup_access deny all
  764.  
  765. # TAG: reply_body_max_size bytes allow|deny acl acl...
  766. # This option specifies the maximum size of a reply body in bytes.
  767. # It can be used to prevent users from downloading very large files,
  768. # such as MP3's and movies. When the reply headers are received,
  769. # the reply_body_max_size lines are processed, and the first line with
  770. # a result of "allow" is used as the maximum body size for this reply.
  771. # This size is checked twice. First when we get the reply headers,
  772. # we check the content-length value. If the content length value exists
  773. # and is larger than the allowed size, the request is denied and the
  774. # user receives an error message that says "the request or reply
  775. # is too large." If there is no content-length, and the reply
  776. # size exceeds this limit, the client's connection is just closed
  777. # and they will receive a partial reply.
  778. #
  779. # WARNING: downstream caches probably can not detect a partial reply
  780. # if there is no content-length header, so they will cache
  781. # partial responses and give them out as hits. You should NOT
  782. # use this option if you have downstream caches.
  783. #
  784. # If you set this parameter to zero (the default), there will be
  785. # no limit imposed.
  786. #
  787. #Default:
  788. # reply_body_max_size 0 allow all
  789.  
  790.  
  791. # OPTIONS FOR X-Forwarded-For
  792. # -----------------------------------------------------------------------------
  793.  
  794. # TAG: follow_x_forwarded_for
  795. # Allowing or Denying the X-Forwarded-For header to be followed to
  796. # find the original source of a request.
  797. #
  798. # Requests may pass through a chain of several other proxies
  799. # before reaching us. The X-Forwarded-For header will contain a
  800. # comma-separated list of the IP addresses in the chain, with the
  801. # rightmost address being the most recent.
  802. #
  803. # If a request reaches us from a source that is allowed by this
  804. # configuration item, then we consult the X-Forwarded-For header
  805. # to see where that host received the request from. If the
  806. # X-Forwarded-For header contains multiple addresses, and if
  807. # acl_uses_indirect_client is on, then we continue backtracking
  808. # until we reach an address for which we are not allowed to
  809. # follow the X-Forwarded-For header, or until we reach the first
  810. # address in the list. (If acl_uses_indirect_client is off, then
  811. # it's impossible to backtrack through more than one level of
  812. # X-Forwarded-For addresses.)
  813. #
  814. # The end result of this process is an IP address that we will
  815. # refer to as the indirect client address. This address may
  816. # be treated as the client address for access control, delay
  817. # pools and logging, depending on the acl_uses_indirect_client,
  818. # delay_pool_uses_indirect_client and log_uses_indirect_client
  819. # options.
  820. #
  821. # SECURITY CONSIDERATIONS:
  822. #
  823. # Any host for which we follow the X-Forwarded-For header
  824. # can place incorrect information in the header, and Squid
  825. # will use the incorrect information as if it were the
  826. # source address of the request. This may enable remote
  827. # hosts to bypass any access control restrictions that are
  828. # based on the client's source addresses.
  829. #
  830. # For example:
  831. #
  832. # acl localhost src 127.0.0.1
  833. # acl my_other_proxy srcdomain .proxy.example.com
  834. # follow_x_forwarded_for allow localhost
  835. # follow_x_forwarded_for allow my_other_proxy
  836. #
  837. #Default:
  838. # follow_x_forwarded_for deny all
  839.  
  840. # TAG: acl_uses_indirect_client on|off
  841. # Controls whether the indirect client address
  842. # (see follow_x_forwarded_for) is used instead of the
  843. # direct client address in acl matching.
  844. #
  845. #Default:
  846. # acl_uses_indirect_client on
  847.  
  848. # TAG: delay_pool_uses_indirect_client on|off
  849. # Controls whether the indirect client address
  850. # (see follow_x_forwarded_for) is used instead of the
  851. # direct client address in delay pools.
  852. #
  853. #Default:
  854. # delay_pool_uses_indirect_client on
  855.  
  856. # TAG: log_uses_indirect_client on|off
  857. # Controls whether the indirect client address
  858. # (see follow_x_forwarded_for) is used instead of the
  859. # direct client address in the access log.
  860. #
  861. #Default:
  862. # log_uses_indirect_client on
  863.  
  864.  
  865. # NETWORK OPTIONS
  866. # -----------------------------------------------------------------------------
  867.  
  868. # TAG: http_port
  869. # Usage: port [options]
  870. # hostname:port [options]
  871. # 1.2.3.4:port [options]
  872. #
  873. # The socket addresses where Squid will listen for HTTP client
  874. # requests. You may specify multiple socket addresses.
  875. # There are three forms: port alone, hostname with port, and
  876. # IP address with port. If you specify a hostname or IP
  877. # address, Squid binds the socket to that specific
  878. # address. This replaces the old 'tcp_incoming_address'
  879. # option. Most likely, you do not need to bind to a specific
  880. # address, so you can use the port number alone.
  881. #
  882. # If you are running Squid in accelerator mode, you
  883. # probably want to listen on port 80 also, or instead.
  884. #
  885. # You may specify multiple socket addresses on multiple lines.
  886. #
  887. # Options:
  888. #
  889. # transparent Support for transparent interception of
  890. # outgoing requests without browser settings.
  891. #
  892. # tproxy Support Linux TPROXY for spoofing outgoing
  893. # connections using the client IP address.
  894. #
  895. # accel Accelerator mode. See also the related vhost,
  896. # vport and defaultsite directives.
  897. #
  898. # defaultsite=domainname
  899. # What to use for the Host: header if it is not present
  900. # in a request. Determines what site (not origin server)
  901. # accelerators should consider the default.
  902. # Defaults to visible_hostname:port if not set
  903. # May be combined with vport=NN to override the port number.
  904. # Implies accel.
  905. #
  906. # vhost Accelerator mode using Host header for virtual
  907. # domain support. Implies accel.
  908. #
  909. # vport Accelerator with IP based virtual host support.
  910. # Implies accel.
  911. #
  912. # vport=NN As above, but uses specified port number rather
  913. # than the http_port number. Implies accel.
  914. #
  915. # urlgroup= Default urlgroup to mark requests with (see
  916. # also acl urlgroup and url_rewrite_program)
  917. #
  918. # protocol= Protocol to reconstruct accelerated requests with.
  919. # Defaults to http.
  920. #
  921. # no-connection-auth
  922. # Prevent forwarding of Microsoft connection oriented
  923. # authentication (NTLM, Negotiate and Kerberos)
  924. #
  925. # If you run Squid on a dual-homed machine with an internal
  926. # and an external interface we recommend you to specify the
  927. # internal address:port in http_port. This way Squid will only be
  928. # visible on the internal address.
  929. #
  930. # Squid normally listens to port 3128
  931. http_port 192.168.254.1:3128 transparent
  932.  
  933. # TAG: https_port
  934. # Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
  935. #
  936. # The socket address where Squid will listen for HTTPS client
  937. # requests.
  938. #
  939. # This is really only useful for situations where you are running
  940. # squid in accelerator mode and you want to do the SSL work at the
  941. # accelerator level.
  942. #
  943. # You may specify multiple socket addresses on multiple lines,
  944. # each with their own SSL certificate and/or options.
  945. #
  946. # Options:
  947. #
  948. # accel Accelerator mode. Also needs at least one of
  949. # defaultsite or vhost.
  950. #
  951. # defaultsite= The name of the https site presented on
  952. # this port. Implies accel.
  953. #
  954. # vhost Accelerator mode using Host header for virtual
  955. # domain support. Requires a wildcard certificate
  956. # or other certificate valid for more than one domain.
  957. # May be combined with vport=NN to override the port
  958. # number.
  959. # Implies accel.
  960. #
  961. # urlgroup= Default urlgroup to mark requests with (see
  962. # also acl urlgroup and url_rewrite_program).
  963. #
  964. # protocol= Protocol to reconstruct accelerated requests with.
  965. # Defaults to https.
  966. #
  967. # cert= Path to SSL certificate (PEM format).
  968. #
  969. # key= Path to SSL private key file (PEM format)
  970. # if not specified, the certificate file is
  971. # assumed to be a combined certificate and
  972. # key file.
  973. #
  974. # version= The version of SSL/TLS supported
  975. # 1 automatic (default)
  976. # 2 SSLv2 only
  977. # 3 SSLv3 only
  978. # 4 TLSv1 only
  979. #
  980. # cipher= Colon separated list of supported ciphers.
  981. #
  982. # options= Various SSL engine options. The most important
  983. # being:
  984. # NO_SSLv2 Disallow the use of SSLv2
  985. # NO_SSLv3 Disallow the use of SSLv3
  986. # NO_TLSv1 Disallow the use of TLSv1
  987. # SINGLE_DH_USE Always create a new key when using
  988. # temporary/ephemeral DH key exchanges
  989. # See src/ssl_support.c or OpenSSL SSL_CTX_set_options
  990. # documentation for a complete list of options.
  991. #
  992. # clientca= File containing the list of CAs to use when
  993. # requesting a client certificate.
  994. #
  995. # cafile= File containing additional CA certificates to
  996. # use when verifying client certificates. If unset
  997. # clientca will be used.
  998. #
  999. # capath= Directory containing additional CA certificates
  1000. # and CRL lists to use when verifying client certificates.
  1001. #
  1002. # crlfile= File of additional CRL lists to use when verifying
  1003. # the client certificate, in addition to CRLs stored in
  1004. # the capath. Implies VERIFY_CRL flag below.
  1005. #
  1006. # dhparams= File containing DH parameters for temporary/ephemeral
  1007. # DH key exchanges.
  1008. #
  1009. # sslflags= Various flags modifying the use of SSL:
  1010. # DELAYED_AUTH
  1011. # Don't request client certificates
  1012. # immediately, but wait until acl processing
  1013. # requires a certificate (not yet implemented).
  1014. # NO_DEFAULT_CA
  1015. # Don't use the default CA lists built in
  1016. # to OpenSSL.
  1017. # NO_SESSION_REUSE
  1018. # Don't allow for session reuse. Each connection
  1019. # will result in a new SSL session.
  1020. # VERIFY_CRL
  1021. # Verify CRL lists when accepting client
  1022. # certificates.
  1023. # VERIFY_CRL_ALL
  1024. # Verify CRL lists for all certificates in the
  1025. # client certificate chain.
  1026. #
  1027. # sslcontext= SSL session ID context identifier.
  1028. #
  1029. # vport Accelerator with IP based virtual host support.
  1030. #
  1031. # vport=NN As above, but uses specified port number rather
  1032. # than the https_port number. Implies accel.
  1033. #
  1034. #
  1035. #Default:
  1036. # none
  1037.  
  1038. # TAG: tcp_outgoing_tos
  1039. # Allows you to select a TOS/Diffserv value to mark outgoing
  1040. # connections with, based on the username or source address
  1041. # making the request.
  1042. #
  1043. # tcp_outgoing_tos ds-field [!]aclname ...
  1044. #
  1045. # Example where normal_service_net uses the TOS value 0x00
  1046. # and good_service_net uses 0x20
  1047. #
  1048. # acl normal_service_net src 10.0.0.0/255.255.255.0
  1049. # acl good_service_net src 10.0.1.0/255.255.255.0
  1050. # tcp_outgoing_tos 0x00 normal_service_net
  1051. # tcp_outgoing_tos 0x20 good_service_net
  1052. #
  1053. # TOS/DSCP values really only have local significance - so you should
  1054. # know what you're specifying. For more information, see RFC2474 and
  1055. # RFC3260.
  1056. #
  1057. # The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
  1058. # "default" to use whatever default your host has. Note that in
  1059. # practice often only values 0 - 63 is usable as the two highest bits
  1060. # have been redefined for use by ECN (RFC3168).
  1061. #
  1062. # Processing proceeds in the order specified, and stops at first fully
  1063. # matching line.
  1064. #
  1065. # Note: The use of this directive using client dependent ACLs is
  1066. # incompatible with the use of server side persistent connections. To
  1067. # ensure correct results it is best to set server_persisten_connections
  1068. # to off when using this directive in such configurations.
  1069. #
  1070. #Default:
  1071. # none
  1072.  
  1073. # TAG: tcp_outgoing_address
  1074. # Allows you to map requests to different outgoing IP addresses
  1075. # based on the username or source address of the user making
  1076. # the request.
  1077. #
  1078. # tcp_outgoing_address ipaddr [[!]aclname] ...
  1079. #
  1080. # Example where requests from 10.0.0.0/24 will be forwarded
  1081. # with source address 10.1.0.1, 10.0.2.0/24 forwarded with
  1082. # source address 10.1.0.2 and the rest will be forwarded with
  1083. # source address 10.1.0.3.
  1084. #
  1085. # acl normal_service_net src 10.0.0.0/24
  1086. # acl good_service_net src 10.0.1.0/24 10.0.2.0/24
  1087. # tcp_outgoing_address 10.1.0.1 normal_service_net
  1088. # tcp_outgoing_address 10.1.0.2 good_service_net
  1089. # tcp_outgoing_address 10.1.0.3
  1090. #
  1091. # Processing proceeds in the order specified, and stops at first fully
  1092. # matching line.
  1093. #
  1094. # Note: The use of this directive using client dependent ACLs is
  1095. # incompatible with the use of server side persistent connections. To
  1096. # ensure correct results it is best to set server_persistent_connections
  1097. # to off when using this directive in such configurations.
  1098. #
  1099. #Default:
  1100. # none
  1101.  
  1102.  
  1103. # SSL OPTIONS
  1104. # -----------------------------------------------------------------------------
  1105.  
  1106. # TAG: ssl_unclean_shutdown
  1107. # Some browsers (especially MSIE) bugs out on SSL shutdown
  1108. # messages.
  1109. #
  1110. #Default:
  1111. # ssl_unclean_shutdown off
  1112.  
  1113. # TAG: ssl_engine
  1114. # The OpenSSL engine to use. You will need to set this if you
  1115. # would like to use hardware SSL acceleration for example.
  1116. #
  1117. #Default:
  1118. # none
  1119.  
  1120. # TAG: sslproxy_client_certificate
  1121. # Client SSL Certificate to use when proxying https:// URLs
  1122. #
  1123. #Default:
  1124. # none
  1125.  
  1126. # TAG: sslproxy_client_key
  1127. # Client SSL Key to use when proxying https:// URLs
  1128. #
  1129. #Default:
  1130. # none
  1131.  
  1132. # TAG: sslproxy_version
  1133. # SSL version level to use when proxying https:// URLs
  1134. #
  1135. #Default:
  1136. # sslproxy_version 1
  1137.  
  1138. # TAG: sslproxy_options
  1139. # SSL engine options to use when proxying https:// URLs
  1140. #
  1141. #Default:
  1142. # none
  1143.  
  1144. # TAG: sslproxy_cipher
  1145. # SSL cipher list to use when proxying https:// URLs
  1146. #
  1147. #Default:
  1148. # none
  1149.  
  1150. # TAG: sslproxy_cafile
  1151. # file containing CA certificates to use when verifying server
  1152. # certificates while proxying https:// URLs
  1153. #
  1154. #Default:
  1155. # none
  1156.  
  1157. # TAG: sslproxy_capath
  1158. # directory containing CA certificates to use when verifying
  1159. # server certificates while proxying https:// URLs
  1160. #
  1161. #Default:
  1162. # none
  1163.  
  1164. # TAG: sslproxy_flags
  1165. # Various flags modifying the use of SSL while proxying https:// URLs:
  1166. # DONT_VERIFY_PEER Accept certificates even if they fail to
  1167. # verify.
  1168. # NO_DEFAULT_CA Don't use the default CA list built in
  1169. # to OpenSSL.
  1170. #
  1171. #Default:
  1172. # none
  1173.  
  1174. # TAG: sslpassword_program
  1175. # Specify a program used for entering SSL key passphrases
  1176. # when using encrypted SSL certificate keys. If not specified
  1177. # keys must either be unencrypted, or Squid started with the -N
  1178. # option to allow it to query interactively for the passphrase.
  1179. #
  1180. #Default:
  1181. # none
  1182.  
  1183.  
  1184. # OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
  1185. # -----------------------------------------------------------------------------
  1186.  
  1187. # TAG: cache_peer
  1188. # To specify other caches in a hierarchy, use the format:
  1189. #
  1190. # cache_peer hostname type http-port icp-port [options]
  1191. #
  1192. # For example,
  1193. #
  1194. # # proxy icp
  1195. # # hostname type port port options
  1196. # # -------------------- -------- ----- ----- -----------
  1197. # cache_peer parent.foo.net parent 3128 3130 proxy-only default
  1198. # cache_peer sib1.foo.net sibling 3128 3130 proxy-only
  1199. # cache_peer sib2.foo.net sibling 3128 3130 proxy-only
  1200. #
  1201. # type: either 'parent', 'sibling', or 'multicast'.
  1202. #
  1203. # proxy-port: The port number where the cache listens for proxy
  1204. # requests.
  1205. #
  1206. # icp-port: Used for querying neighbor caches about
  1207. # objects. To have a non-ICP neighbor
  1208. # specify '7' for the ICP port and make sure the
  1209. # neighbor machine has the UDP echo port
  1210. # enabled in its /etc/inetd.conf file.
  1211. # NOTE: Also requires icp_port option enabled to send/receive
  1212. # requests via this method.
  1213. #
  1214. # options: proxy-only
  1215. # weight=n
  1216. # ttl=n
  1217. # no-query
  1218. # default
  1219. # round-robin
  1220. # carp
  1221. # multicast-responder
  1222. # closest-only
  1223. # no-digest
  1224. # no-netdb-exchange
  1225. # no-delay
  1226. # login=user:password | PASS | *:password
  1227. # connect-timeout=nn
  1228. # digest-url=url
  1229. # allow-miss
  1230. # max-conn=n
  1231. # htcp
  1232. # htcp-oldsquid
  1233. # originserver
  1234. # userhash
  1235. # sourcehash
  1236. # name=xxx
  1237. # monitorurl=url
  1238. # monitorsize=sizespec
  1239. # monitorinterval=seconds
  1240. # monitortimeout=seconds
  1241. # forceddomain=name
  1242. # ssl
  1243. # sslcert=/path/to/ssl/certificate
  1244. # sslkey=/path/to/ssl/key
  1245. # sslversion=1|2|3|4
  1246. # sslcipher=...
  1247. # ssloptions=...
  1248. # front-end-https[=on|auto]
  1249. # connection-auth[=on|off|auto]
  1250. #
  1251. # use 'proxy-only' to specify objects fetched
  1252. # from this cache should not be saved locally.
  1253. #
  1254. # use 'weight=n' to affect the selection of a peer
  1255. # during any weighted peer-selection mechanisms.
  1256. # The weight must be an integer; default is 1,
  1257. # larger weights are favored more.
  1258. # This option does not affect parent selection if a peering
  1259. # protocol is not in use.
  1260. #
  1261. # use 'ttl=n' to specify a IP multicast TTL to use
  1262. # when sending an ICP queries to this address.
  1263. # Only useful when sending to a multicast group.
  1264. # Because we don't accept ICP replies from random
  1265. # hosts, you must configure other group members as
  1266. # peers with the 'multicast-responder' option below.
  1267. #
  1268. # use 'no-query' to NOT send ICP queries to this
  1269. # neighbor.
  1270. #
  1271. # use 'default' if this is a parent cache which can
  1272. # be used as a "last-resort" if a peer cannot be located
  1273. # by any of the peer-selection mechanisms.
  1274. # If specified more than once, only the first is used.
  1275. #
  1276. # use 'round-robin' to define a set of parents which
  1277. # should be used in a round-robin fashion in the
  1278. # absence of any ICP queries.
  1279. #
  1280. # use 'carp' to define a set of parents which should
  1281. # be used as a CARP array. The requests will be
  1282. # distributed among the parents based on the CARP load
  1283. # balancing hash function based on their weight.
  1284. #
  1285. # 'multicast-responder' indicates the named peer
  1286. # is a member of a multicast group. ICP queries will
  1287. # not be sent directly to the peer, but ICP replies
  1288. # will be accepted from it.
  1289. #
  1290. # 'closest-only' indicates that, for ICP_OP_MISS
  1291. # replies, we'll only forward CLOSEST_PARENT_MISSes
  1292. # and never FIRST_PARENT_MISSes.
  1293. #
  1294. # use 'no-digest' to NOT request cache digests from
  1295. # this neighbor.
  1296. #
  1297. # 'no-netdb-exchange' disables requesting ICMP
  1298. # RTT database (NetDB) from the neighbor.
  1299. #
  1300. # use 'no-delay' to prevent access to this neighbor
  1301. # from influencing the delay pools.
  1302. #
  1303. # use 'login=user:password' if this is a personal/workgroup
  1304. # proxy and your parent requires proxy authentication.
  1305. # Note: The string can include URL escapes (i.e. %20 for
  1306. # spaces). This also means % must be written as %%.
  1307. #
  1308. # use 'login=PASS' if users must authenticate against
  1309. # the upstream proxy or in the case of a reverse proxy
  1310. # configuration, the origin web server. This will pass
  1311. # the users credentials as they are to the peer.
  1312. # Note: To combine this with local authentication the Basic
  1313. # authentication scheme must be used, and both servers must
  1314. # share the same user database as HTTP only allows for
  1315. # a single login (one for proxy, one for origin server).
  1316. # Also be warned this will expose your users proxy
  1317. # password to the peer. USE WITH CAUTION
  1318. #
  1319. # use 'login=*:password' to pass the username to the
  1320. # upstream cache, but with a fixed password. This is meant
  1321. # to be used when the peer is in another administrative
  1322. # domain, but it is still needed to identify each user.
  1323. # The star can optionally be followed by some extra
  1324. # information which is added to the username. This can
  1325. # be used to identify this proxy to the peer, similar to
  1326. # the login=username:password option above.
  1327. #
  1328. # use 'connect-timeout=nn' to specify a peer
  1329. # specific connect timeout (also see the
  1330. # peer_connect_timeout directive)
  1331. #
  1332. # use 'digest-url=url' to tell Squid to fetch the cache
  1333. # digest (if digests are enabled) for this host from
  1334. # the specified URL rather than the Squid default
  1335. # location.
  1336. #
  1337. # use 'allow-miss' to disable Squid's use of only-if-cached
  1338. # when forwarding requests to siblings. This is primarily
  1339. # useful when icp_hit_stale is used by the sibling. To
  1340. # extensive use of this option may result in forwarding
  1341. # loops, and you should avoid having two-way peerings
  1342. # with this option. (for example to deny peer usage on
  1343. # requests from peer by denying cache_peer_access if the
  1344. # source is a peer)
  1345. #
  1346. # use 'max-conn=n' to limit the amount of connections Squid
  1347. # may open to this peer.
  1348. #
  1349. # use 'htcp' to send HTCP, instead of ICP, queries
  1350. # to the neighbor. You probably also want to
  1351. # set the "icp port" to 4827 instead of 3130.
  1352. # You must also allow this Squid htcp_access and
  1353. # http_access in the peer Squid configuration.
  1354. #
  1355. # use 'htcp-oldsquid' to send HTCP to old Squid versions
  1356. # You must also allow this Squid htcp_access and
  1357. # http_access in the peer Squid configuration.
  1358. #
  1359. # 'originserver' causes this parent peer to be contacted as
  1360. # a origin server. Meant to be used in accelerator setups.
  1361. #
  1362. # use 'userhash' to load-balance amongst a set of parents
  1363. # based on the client proxy_auth or ident username.
  1364. #
  1365. # use 'sourcehash' to load-balance amongst a set of parents
  1366. # based on the client source ip.
  1367. #
  1368. # use 'name=xxx' if you have multiple peers on the same
  1369. # host but different ports. This name can be used to
  1370. # differentiate the peers in cache_peer_access and similar
  1371. # directives.
  1372. #
  1373. # use 'monitorurl=url' to have periodically request a given
  1374. # URL from the peer, and only consider the peer as alive
  1375. # if this monitoring is successful (default none)
  1376. #
  1377. # use 'monitorsize=min[-max]' to limit the size range of
  1378. # 'monitorurl' replies considered valid. Defaults to 0 to
  1379. # accept any size replies as valid.
  1380. #
  1381. # use 'monitorinterval=seconds' to change frequency of
  1382. # how often the peer is monitored with 'monitorurl'
  1383. # (default 300 for a 5 minute interval). If set to 0
  1384. # then monitoring is disabled even if a URL is defined.
  1385. #
  1386. # use 'monitortimeout=seconds' to change the timeout of
  1387. # 'monitorurl'. Defaults to 'monitorinterval'.
  1388. #
  1389. # use 'forceddomain=name' to forcibly set the Host header
  1390. # of requests forwarded to this peer. Useful in accelerator
  1391. # setups where the server (peer) expects a certain domain
  1392. # name and using redirectors to feed this domain name
  1393. # is not feasible.
  1394. #
  1395. # use 'ssl' to indicate connections to this peer should
  1396. # be SSL/TLS encrypted.
  1397. #
  1398. # use 'sslcert=/path/to/ssl/certificate' to specify a client
  1399. # SSL certificate to use when connecting to this peer.
  1400. #
  1401. # use 'sslkey=/path/to/ssl/key' to specify the private SSL
  1402. # key corresponding to sslcert above. If 'sslkey' is not
  1403. # specified 'sslcert' is assumed to reference a
  1404. # combined file containing both the certificate and the key.
  1405. #
  1406. # use sslversion=1|2|3|4 to specify the SSL version to use
  1407. # when connecting to this peer
  1408. # 1 = automatic (default)
  1409. # 2 = SSL v2 only
  1410. # 3 = SSL v3 only
  1411. # 4 = TLS v1 only
  1412. #
  1413. # use sslcipher=... to specify the list of valid SSL ciphers
  1414. # to use when connecting to this peer.
  1415. #
  1416. # use ssloptions=... to specify various SSL engine options:
  1417. # NO_SSLv2 Disallow the use of SSLv2
  1418. # NO_SSLv3 Disallow the use of SSLv3
  1419. # NO_TLSv1 Disallow the use of TLSv1
  1420. # See src/ssl_support.c or the OpenSSL documentation for
  1421. # a more complete list.
  1422. #
  1423. # use sslcafile=... to specify a file containing
  1424. # additional CA certificates to use when verifying the
  1425. # peer certificate.
  1426. #
  1427. # use sslcapath=... to specify a directory containing
  1428. # additional CA certificates to use when verifying the
  1429. # peer certificate.
  1430. #
  1431. # use sslcrlfile=... to specify a certificate revocation
  1432. # list file to use when verifying the peer certificate.
  1433. #
  1434. # use sslflags=... to specify various flags modifying the
  1435. # SSL implementation:
  1436. # DONT_VERIFY_PEER
  1437. # Accept certificates even if they fail to
  1438. # verify.
  1439. # NO_DEFAULT_CA
  1440. # Don't use the default CA list built in
  1441. # to OpenSSL.
  1442. #
  1443. # use ssldomain= to specify the peer name as advertised
  1444. # in it's certificate. Used for verifying the correctness
  1445. # of the received peer certificate. If not specified the
  1446. # peer hostname will be used.
  1447. #
  1448. # use front-end-https to enable the "Front-End-Https: On"
  1449. # header needed when using Squid as a SSL frontend in front
  1450. # of Microsoft OWA. See MS KB document Q307347 for details
  1451. # on this header. If set to auto the header will
  1452. # only be added if the request is forwarded as a https://
  1453. # URL.
  1454. #
  1455. # use connection-auth=off to tell Squid that this peer does
  1456. # not support Microsoft connection oriented authentication,
  1457. # and any such challenges received from there should be
  1458. # ignored. Default is auto to automatically determine the
  1459. # status of the peer.
  1460. #
  1461. #Default:
  1462. # none
  1463.  
  1464. # TAG: cache_peer_domain
  1465. # Use to limit the domains for which a neighbor cache will be
  1466. # queried. Usage:
  1467. #
  1468. # cache_peer_domain cache-host domain [domain ...]
  1469. # cache_peer_domain cache-host !domain
  1470. #
  1471. # For example, specifying
  1472. #
  1473. # cache_peer_domain parent.foo.net .edu
  1474. #
  1475. # has the effect such that UDP query packets are sent to
  1476. # 'bigserver' only when the requested object exists on a
  1477. # server in the .edu domain. Prefixing the domain name
  1478. # with '!' means the cache will be queried for objects
  1479. # NOT in that domain.
  1480. #
  1481. # NOTE: * Any number of domains may be given for a cache-host,
  1482. # either on the same or separate lines.
  1483. # * When multiple domains are given for a particular
  1484. # cache-host, the first matched domain is applied.
  1485. # * Cache hosts with no domain restrictions are queried
  1486. # for all requests.
  1487. # * There are no defaults.
  1488. # * There is also a 'cache_peer_access' tag in the ACL
  1489. # section.
  1490. #
  1491. #Default:
  1492. # none
  1493.  
  1494. # TAG: cache_peer_access
  1495. # Similar to 'cache_peer_domain' but provides more flexibility by
  1496. # using ACL elements.
  1497. #
  1498. # cache_peer_access cache-host allow|deny [!]aclname ...
  1499. #
  1500. # The syntax is identical to 'http_access' and the other lists of
  1501. # ACL elements. See the comments for 'http_access' below, or
  1502. # the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
  1503. #
  1504. #Default:
  1505. # none
  1506.  
  1507. # TAG: neighbor_type_domain
  1508. # usage: neighbor_type_domain neighbor parent|sibling domain domain ...
  1509. #
  1510. # Modifying the neighbor type for specific domains is now
  1511. # possible. You can treat some domains differently than the the
  1512. # default neighbor type specified on the 'cache_peer' line.
  1513. # Normally it should only be necessary to list domains which
  1514. # should be treated differently because the default neighbor type
  1515. # applies for hostnames which do not match domains listed here.
  1516. #
  1517. #EXAMPLE:
  1518. # cache_peer cache.foo.org parent 3128 3130
  1519. # neighbor_type_domain cache.foo.org sibling .com .net
  1520. # neighbor_type_domain cache.foo.org sibling .au .de
  1521. #
  1522. #Default:
  1523. # none
  1524.  
  1525. # TAG: dead_peer_timeout (seconds)
  1526. # This controls how long Squid waits to declare a peer cache
  1527. # as "dead." If there are no ICP replies received in this
  1528. # amount of time, Squid will declare the peer dead and not
  1529. # expect to receive any further ICP replies. However, it
  1530. # continues to send ICP queries, and will mark the peer as
  1531. # alive upon receipt of the first subsequent ICP reply.
  1532. #
  1533. # This timeout also affects when Squid expects to receive ICP
  1534. # replies from peers. If more than 'dead_peer' seconds have
  1535. # passed since the last ICP reply was received, Squid will not
  1536. # expect to receive an ICP reply on the next query. Thus, if
  1537. # your time between requests is greater than this timeout, you
  1538. # will see a lot of requests sent DIRECT to origin servers
  1539. # instead of to your parents.
  1540. #
  1541. #Default:
  1542. # dead_peer_timeout 10 seconds
  1543.  
  1544. # TAG: hierarchy_stoplist
  1545. # A list of words which, if found in a URL, cause the object to
  1546. # be handled directly by this cache. In other words, use this
  1547. # to not query neighbor caches for certain objects. You may
  1548. # list this option multiple times. Note: never_direct overrides
  1549. # this option.
  1550. #We recommend you to use at least the following line.
  1551. hierarchy_stoplist cgi-bin ?
  1552.  
  1553.  
  1554. # MEMORY CACHE OPTIONS
  1555. # -----------------------------------------------------------------------------
  1556.  
  1557. # TAG: cache_mem (bytes)
  1558. # NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
  1559. # IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
  1560. # USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
  1561. # THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
  1562. #
  1563. # 'cache_mem' specifies the ideal amount of memory to be used
  1564. # for:
  1565. # * In-Transit objects
  1566. # * Hot Objects
  1567. # * Negative-Cached objects
  1568. #
  1569. # Data for these objects are stored in 4 KB blocks. This
  1570. # parameter specifies the ideal upper limit on the total size of
  1571. # 4 KB blocks allocated. In-Transit objects take the highest
  1572. # priority.
  1573. #
  1574. # In-transit objects have priority over the others. When
  1575. # additional space is needed for incoming data, negative-cached
  1576. # and hot objects will be released. In other words, the
  1577. # negative-cached and hot objects will fill up any unused space
  1578. # not needed for in-transit objects.
  1579. #
  1580. # If circumstances require, this limit will be exceeded.
  1581. # Specifically, if your incoming request rate requires more than
  1582. # 'cache_mem' of memory to hold in-transit objects, Squid will
  1583. # exceed this limit to satisfy the new requests. When the load
  1584. # decreases, blocks will be freed until the high-water mark is
  1585. # reached. Thereafter, blocks will be used to store hot
  1586. # objects.
  1587. #
  1588. #Default:
  1589. # cache_mem 8 MB
  1590.  
  1591. # TAG: maximum_object_size_in_memory (bytes)
  1592. # Objects greater than this size will not be attempted to kept in
  1593. # the memory cache. This should be set high enough to keep objects
  1594. # accessed frequently in memory to improve performance whilst low
  1595. # enough to keep larger objects from hoarding cache_mem.
  1596. #
  1597. #Default:
  1598. # maximum_object_size_in_memory 8 KB
  1599.  
  1600. # TAG: memory_replacement_policy
  1601. # The memory replacement policy parameter determines which
  1602. # objects are purged from memory when memory space is needed.
  1603. #
  1604. # See cache_replacement_policy for details.
  1605. #
  1606. #Default:
  1607. # memory_replacement_policy lru
  1608.  
  1609.  
  1610. # DISK CACHE OPTIONS
  1611. # -----------------------------------------------------------------------------
  1612.  
  1613. # TAG: cache_replacement_policy
  1614. # The cache replacement policy parameter determines which
  1615. # objects are evicted (replaced) when disk space is needed.
  1616. #
  1617. # lru : Squid's original list based LRU policy
  1618. # heap GDSF : Greedy-Dual Size Frequency
  1619. # heap LFUDA: Least Frequently Used with Dynamic Aging
  1620. # heap LRU : LRU policy implemented using a heap
  1621. #
  1622. # Applies to any cache_dir lines listed below this.
  1623. #
  1624. # The LRU policies keeps recently referenced objects.
  1625. #
  1626. # The heap GDSF policy optimizes object hit rate by keeping smaller
  1627. # popular objects in cache so it has a better chance of getting a
  1628. # hit. It achieves a lower byte hit rate than LFUDA though since
  1629. # it evicts larger (possibly popular) objects.
  1630. #
  1631. # The heap LFUDA policy keeps popular objects in cache regardless of
  1632. # their size and thus optimizes byte hit rate at the expense of
  1633. # hit rate since one large, popular object will prevent many
  1634. # smaller, slightly less popular objects from being cached.
  1635. #
  1636. # Both policies utilize a dynamic aging mechanism that prevents
  1637. # cache pollution that can otherwise occur with frequency-based
  1638. # replacement policies.
  1639. #
  1640. # NOTE: if using the LFUDA replacement policy you should increase
  1641. # the value of maximum_object_size above its default of 4096 KB to
  1642. # to maximize the potential byte hit rate improvement of LFUDA.
  1643. #
  1644. # For more information about the GDSF and LFUDA cache replacement
  1645. # policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
  1646. # and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
  1647. #
  1648. #Default:
  1649. # cache_replacement_policy lru
  1650.  
  1651. # TAG: cache_dir
  1652. # Usage:
  1653. #
  1654. # cache_dir Type Directory-Name Fs-specific-data [options]
  1655. #
  1656. # You can specify multiple cache_dir lines to spread the
  1657. # cache among different disk partitions.
  1658. #
  1659. # Type specifies the kind of storage system to use. Only "ufs"
  1660. # is built by default. To enable any of the other storage systems
  1661. # see the --enable-storeio configure option.
  1662. #
  1663. # 'Directory' is a top-level directory where cache swap
  1664. # files will be stored. If you want to use an entire disk
  1665. # for caching, this can be the mount-point directory.
  1666. # The directory must exist and be writable by the Squid
  1667. # process. Squid will NOT create this directory for you.
  1668. # Only using COSS, a raw disk device or a stripe file can
  1669. # be specified, but the configuration of the "cache_swap_log"
  1670. # tag is mandatory.
  1671. #
  1672. # The ufs store type:
  1673. #
  1674. # "ufs" is the old well-known Squid storage format that has always
  1675. # been there.
  1676. #
  1677. # cache_dir ufs Directory-Name Mbytes L1 L2 [options]
  1678. #
  1679. # 'Mbytes' is the amount of disk space (MB) to use under this
  1680. # directory. The default is 100 MB. Change this to suit your
  1681. # configuration. Do NOT put the size of your disk drive here.
  1682. # Instead, if you want Squid to use the entire disk drive,
  1683. # subtract 20% and use that value.
  1684. #
  1685. # 'Level-1' is the number of first-level subdirectories which
  1686. # will be created under the 'Directory'. The default is 16.
  1687. #
  1688. # 'Level-2' is the number of second-level subdirectories which
  1689. # will be created under each first-level directory. The default
  1690. # is 256.
  1691. #
  1692. # The aufs store type:
  1693. #
  1694. # "aufs" uses the same storage format as "ufs", utilizing
  1695. # POSIX-threads to avoid blocking the main Squid process on
  1696. # disk-I/O. This was formerly known in Squid as async-io.
  1697. #
  1698. # cache_dir aufs Directory-Name Mbytes L1 L2 [options]
  1699. #
  1700. # see argument descriptions under ufs above
  1701. #
  1702. # The diskd store type:
  1703. #
  1704. # "diskd" uses the same storage format as "ufs", utilizing a
  1705. # separate process to avoid blocking the main Squid process on
  1706. # disk-I/O.
  1707. #
  1708. # cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
  1709. #
  1710. # see argument descriptions under ufs above
  1711. #
  1712. # Q1 specifies the number of unacknowledged I/O requests when Squid
  1713. # stops opening new files. If this many messages are in the queues,
  1714. # Squid won't open new files. Default is 64
  1715. #
  1716. # Q2 specifies the number of unacknowledged messages when Squid
  1717. # starts blocking. If this many messages are in the queues,
  1718. # Squid blocks until it receives some replies. Default is 72
  1719. #
  1720. # When Q1 < Q2 (the default), the cache directory is optimized
  1721. # for lower response time at the expense of a decrease in hit
  1722. # ratio. If Q1 > Q2, the cache directory is optimized for
  1723. # higher hit ratio at the expense of an increase in response
  1724. # time.
  1725. #
  1726. # The coss store type:
  1727. #
  1728. # block-size=n defines the "block size" for COSS cache_dir's.
  1729. # Squid uses file numbers as block numbers. Since file numbers
  1730. # are limited to 24 bits, the block size determines the maximum
  1731. # size of the COSS partition. The default is 512 bytes, which
  1732. # leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
  1733. # you should not change the COSS block size after Squid
  1734. # has written some objects to the cache_dir.
  1735. #
  1736. # overwrite-percent=n defines the percentage of disk that COSS
  1737. # must write to before a given object will be moved to the
  1738. # current stripe. A value of "n" closer to 100 will cause COSS
  1739. # to waste less disk space by having multiple copies of an object
  1740. # on disk, but will increase the chances of overwriting a popular
  1741. # object as COSS overwrites stripes. A value of "n" close to 0
  1742. # will cause COSS to keep all current objects in the current COSS
  1743. # stripe at the expense of the hit rate. The default value of 50
  1744. # will allow any given object to be stored on disk a maximum of
  1745. # 2 times.
  1746. #
  1747. # max-stripe-waste=n defines the maximum amount of space that COSS
  1748. # will waste in a given stripe (in bytes). When COSS writes data
  1749. # to disk, it will potentially waste up to "max-size" worth of disk
  1750. # space for each 1MB of data written. If "max-size" is set to a
  1751. # large value (ie >256k), this could potentially result in large
  1752. # amounts of wasted disk space. Setting this value to a lower value
  1753. # (ie 64k or 32k) will result in a COSS disk refusing to cache
  1754. # larger objects until the COSS stripe has been filled to within
  1755. # "max-stripe-waste" of the maximum size (1MB).
  1756. #
  1757. # membufs=n defines the number of "memory-only" stripes that COSS
  1758. # will use. When an cache hit is performed on a COSS stripe before
  1759. # COSS has reached the overwrite-percent value for that object,
  1760. # COSS will use a series of memory buffers to hold the object in
  1761. # while the data is sent to the client. This will define the maximum
  1762. # number of memory-only buffers that COSS will use. The default value
  1763. # is 10, which will use a maximum of 10MB of memory for buffers.
  1764. #
  1765. # maxfullbufs=n defines the maximum number of stripes a COSS partition
  1766. # will have in memory waiting to be freed (either because the disk is
  1767. # under load and the stripe is unwritten, or because clients are still
  1768. # transferring data from objects using the memory). In order to try
  1769. # and maintain a good hit rate under load, COSS will reserve the last
  1770. # 2 full stripes for object hits. (ie a COSS cache_dir will reject
  1771. # new objects when the number of full stripes is 2 less than maxfullbufs)
  1772. #
  1773. # The null store type:
  1774. #
  1775. # no options are allowed or required
  1776. #
  1777. # Common options:
  1778. #
  1779. # read-only, no new objects should be stored to this cache_dir
  1780. #
  1781. # min-size=n, refers to the min object size this storedir will accept.
  1782. # It's used to restrict a storedir to only store large objects
  1783. # (e.g. aufs) while other storedirs are optimized for smaller objects
  1784. # (e.g. COSS). Defaults to 0.
  1785. #
  1786. # max-size=n, refers to the max object size this storedir supports.
  1787. # It is used to initially choose the storedir to dump the object.
  1788. # Note: To make optimal use of the max-size limits you should order
  1789. # the cache_dir lines with the smallest max-size value first and the
  1790. # ones with no max-size specification last.
  1791. #
  1792. # Note that for coss, max-size must be less than COSS_MEMBUF_SZ
  1793. # (hard coded at 1 MB).
  1794. #
  1795. #Default:
  1796. cache_dir ufs /var/spool/squid 100 16 256
  1797.  
  1798. # TAG: store_dir_select_algorithm
  1799. # Set this to 'round-robin' as an alternative.
  1800. #
  1801. #Default:
  1802. # store_dir_select_algorithm least-load
  1803.  
  1804. # TAG: max_open_disk_fds
  1805. # To avoid having disk as the I/O bottleneck Squid can optionally
  1806. # bypass the on-disk cache if more than this amount of disk file
  1807. # descriptors are open.
  1808. #
  1809. # A value of 0 indicates no limit.
  1810. #
  1811. #Default:
  1812. # max_open_disk_fds 0
  1813.  
  1814. # TAG: minimum_object_size (bytes)
  1815. # Objects smaller than this size will NOT be saved on disk. The
  1816. # value is specified in kilobytes, and the default is 0 KB, which
  1817. # means there is no minimum.
  1818. #
  1819. #Default:
  1820. # minimum_object_size 0 KB
  1821.  
  1822. # TAG: maximum_object_size (bytes)
  1823. # Objects larger than this size will NOT be saved on disk. The
  1824. # value is specified in kilobytes, and the default is 4MB. If
  1825. # you wish to get a high BYTES hit ratio, you should probably
  1826. # increase this (one 32 MB object hit counts for 3200 10KB
  1827. # hits). If you wish to increase speed more than your want to
  1828. # save bandwidth you should leave this low.
  1829. #
  1830. # NOTE: if using the LFUDA replacement policy you should increase
  1831. # this value to maximize the byte hit rate improvement of LFUDA!
  1832. # See replacement_policy below for a discussion of this policy.
  1833. #
  1834. #Default:
  1835. maximum_object_size 4096 KB
  1836.  
  1837. # TAG: cache_swap_low (percent, 0-100)
  1838. # TAG: cache_swap_high (percent, 0-100)
  1839. #
  1840. # The low- and high-water marks for cache object replacement.
  1841. # Replacement begins when the swap (disk) usage is above the
  1842. # low-water mark and attempts to maintain utilization near the
  1843. # low-water mark. As swap utilization gets close to high-water
  1844. # mark object eviction becomes more aggressive. If utilization is
  1845. # close to the low-water mark less replacement is done each time.
  1846. #
  1847. # Defaults are 90% and 95%. If you have a large cache, 5% could be
  1848. # hundreds of MB. If this is the case you may wish to set these
  1849. # numbers closer together.
  1850. #
  1851. #Default:
  1852. cache_swap_low 90
  1853. cache_swap_high 95
  1854.  
  1855.  
  1856. # LOGFILE OPTIONS
  1857. # -----------------------------------------------------------------------------
  1858.  
  1859. # TAG: logformat
  1860. # Usage:
  1861. #
  1862. # logformat <name> <format specification>
  1863. #
  1864. # Defines an access log format.
  1865. #
  1866. # The <format specification> is a string with embedded % format codes
  1867. #
  1868. # % format codes all follow the same basic structure where all but
  1869. # the formatcode is optional. Output strings are automatically escaped
  1870. # as required according to their context and the output format
  1871. # modifiers are usually not needed, but can be specified if an explicit
  1872. # output format is desired.
  1873. #
  1874. # % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
  1875. #
  1876. # " output in quoted string format
  1877. # [ output in squid text log format as used by log_mime_hdrs
  1878. # # output in URL quoted format
  1879. # ' output as-is
  1880. #
  1881. # - left aligned
  1882. # width field width. If starting with 0 the
  1883. # output is zero padded
  1884. # {arg} argument such as header name etc
  1885. #
  1886. # Format codes:
  1887. #
  1888. # >a Client source IP address
  1889. # >A Client FQDN
  1890. # >p Client source port
  1891. # <A Server IP address or peer name
  1892. # la Local IP address (http_port)
  1893. # lp Local port number (http_port)
  1894. # ts Seconds since epoch
  1895. # tu subsecond time (milliseconds)
  1896. # tl Local time. Optional strftime format argument
  1897. # default %d/%b/%Y:%H:%M:%S %z
  1898. # tg GMT time. Optional strftime format argument
  1899. # default %d/%b/%Y:%H:%M:%S %z
  1900. # tr Response time (milliseconds)
  1901. # >h Request header. Optional header name argument
  1902. # on the format header[:[separator]element]
  1903. # <h Reply header. Optional header name argument
  1904. # as for >h
  1905. # un User name
  1906. # ul User name from authentication
  1907. # ui User name from ident
  1908. # us User name from SSL
  1909. # ue User name from external acl helper
  1910. # Hs HTTP status code
  1911. # Ss Squid request status (TCP_MISS etc)
  1912. # Sh Squid hierarchy status (DEFAULT_PARENT etc)
  1913. # mt MIME content type
  1914. # rm Request method (GET/POST etc)
  1915. # ru Request URL
  1916. # rv Request protocol version
  1917. # ea Log string returned by external acl
  1918. # <st Reply size including HTTP headers
  1919. # >st Request size including HTTP headers
  1920. # st Request+Reply size including HTTP headers
  1921. # % a literal % character
  1922. #
  1923. # The default formats available (which do not need re-defining) are:
  1924. #
  1925. #logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
  1926. #logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
  1927. #logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
  1928. #logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
  1929. #
  1930. #Default:
  1931. # none
  1932.  
  1933. # TAG: access_log
  1934. # These files log client request activities. Has a line every HTTP or
  1935. # ICP request. The format is:
  1936. # access_log <filepath> [<logformat name> [acl acl ...]]
  1937. # access_log none [acl acl ...]]
  1938. #
  1939. # Will log to the specified file using the specified format (which
  1940. # must be defined in a logformat directive) those entries which match
  1941. # ALL the acl's specified (which must be defined in acl clauses).
  1942. # If no acl is specified, all requests will be logged to this file.
  1943. #
  1944. # To disable logging of a request use the filepath "none", in which case
  1945. # a logformat name should not be specified.
  1946. #
  1947. # To log the request via syslog specify a filepath of "syslog":
  1948. #
  1949. # access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
  1950. # where facility could be any of:
  1951. # authpriv, daemon, local0 .. local7 or user.
  1952. #
  1953. # And priority could be any of:
  1954. # err, warning, notice, info, debug.
  1955. #
  1956. # Note: 2.6.STABLE14 and earlier only supports a slightly different
  1957. # and undocumented format with all uppercase LOG_FACILITY|LOG_PRIORITY
  1958. access_log /var/log/squid/access.log squid
  1959.  
  1960. # TAG: log_access allow|deny acl acl...
  1961. # This options allows you to control which requests gets logged
  1962. # to access.log (see access_log directive). Requests denied for
  1963. # logging will also not be accounted for in performance counters.
  1964. #
  1965. #Default:
  1966. # none
  1967.  
  1968. # TAG: cache_log
  1969. # Cache logging file. This is where general information about
  1970. # your cache's behavior goes. You can increase the amount of data
  1971. # logged to this file with the "debug_options" tag below.
  1972. #
  1973. #Default:
  1974. # cache_log /var/log/squid/cache.log
  1975.  
  1976. # TAG: cache_store_log
  1977. # Logs the activities of the storage manager. Shows which
  1978. # objects are ejected from the cache, and which objects are
  1979. # saved and for how long. To disable, enter "none". There are
  1980. # not really utilities to analyze this data, so you can safely
  1981. # disable it.
  1982. #
  1983. #Default:
  1984. # cache_store_log /var/log/squid/store.log
  1985.  
  1986. # TAG: cache_swap_state
  1987. # Location for the cache "swap.state" file. This index file holds
  1988. # the metadata of objects saved on disk. It is used to rebuild
  1989. # the cache during startup. Normally this file resides in each
  1990. # 'cache_dir' directory, but you may specify an alternate
  1991. # pathname here. Note you must give a full filename, not just
  1992. # a directory. Since this is the index for the whole object
  1993. # list you CANNOT periodically rotate it!
  1994. #
  1995. # If %s can be used in the file name it will be replaced with a
  1996. # a representation of the cache_dir name where each / is replaced
  1997. # with '.'. This is needed to allow adding/removing cache_dir
  1998. # lines when cache_swap_log is being used.
  1999. #
  2000. # If have more than one 'cache_dir', and %s is not used in the name
  2001. # these swap logs will have names such as:
  2002. #
  2003. # cache_swap_log.00
  2004. # cache_swap_log.01
  2005. # cache_swap_log.02
  2006. #
  2007. # The numbered extension (which is added automatically)
  2008. # corresponds to the order of the 'cache_dir' lines in this
  2009. # configuration file. If you change the order of the 'cache_dir'
  2010. # lines in this file, these index files will NOT correspond to
  2011. # the correct 'cache_dir' entry (unless you manually rename
  2012. # them). We recommend you do NOT use this option. It is
  2013. # better to keep these index files in each 'cache_dir' directory.
  2014. #
  2015. #Default:
  2016. # none
  2017.  
  2018. # TAG: logfile_rotate
  2019. # Specifies the number of logfile rotations to make when you
  2020. # type 'squid -k rotate'. The default is 10, which will rotate
  2021. # with extensions 0 through 9. Setting logfile_rotate to 0 will
  2022. # disable the file name rotation, but the logfiles are still closed
  2023. # and re-opened. This will enable you to rename the logfiles
  2024. # yourself just before sending the rotate signal.
  2025. #
  2026. # Note, the 'squid -k rotate' command normally sends a USR1
  2027. # signal to the running squid process. In certain situations
  2028. # (e.g. on Linux with Async I/O), USR1 is used for other
  2029. # purposes, so -k rotate uses another signal. It is best to get
  2030. # in the habit of using 'squid -k rotate' instead of 'kill -USR1
  2031. # <pid>'.
  2032. #
  2033. #logfile_rotate 0
  2034. #
  2035. #Default:
  2036. # logfile_rotate 0
  2037.  
  2038. # TAG: emulate_httpd_log on|off
  2039. # The Cache can emulate the log file format which many 'httpd'
  2040. # programs use. To disable/enable this emulation, set
  2041. # emulate_httpd_log to 'off' or 'on'. The default
  2042. # is to use the native log format since it includes useful
  2043. # information Squid-specific log analyzers use.
  2044. #
  2045. #Default:
  2046. # emulate_httpd_log off
  2047.  
  2048. # TAG: log_ip_on_direct on|off
  2049. # Log the destination IP address in the hierarchy log tag when going
  2050. # direct. Earlier Squid versions logged the hostname here. If you
  2051. # prefer the old way set this to off.
  2052. #
  2053. #Default:
  2054. # log_ip_on_direct on
  2055.  
  2056. # TAG: mime_table
  2057. # Pathname to Squid's MIME table. You shouldn't need to change
  2058. # this, but the default file contains examples and formatting
  2059. # information if you do.
  2060. #
  2061. #Default:
  2062. # mime_table /etc/squid/mime.conf
  2063.  
  2064. # TAG: log_mime_hdrs on|off
  2065. # The Cache can record both the request and the response MIME
  2066. # headers for each HTTP transaction. The headers are encoded
  2067. # safely and will appear as two bracketed fields at the end of
  2068. # the access log (for either the native or httpd-emulated log
  2069. # formats). To enable this logging set log_mime_hdrs to 'on'.
  2070. #
  2071. #Default:
  2072. # log_mime_hdrs off
  2073.  
  2074. # TAG: useragent_log
  2075. # Squid will write the User-Agent field from HTTP requests
  2076. # to the filename specified here. By default useragent_log
  2077. # is disabled.
  2078. #
  2079. #Default:
  2080. # none
  2081.  
  2082. # TAG: referer_log
  2083. # Squid will write the Referer field from HTTP requests to the
  2084. # filename specified here. By default referer_log is disabled.
  2085. # Note that "referer" is actually a misspelling of "referrer"
  2086. # however the misspelt version has been accepted into the HTTP RFCs
  2087. # and we accept both.
  2088. #
  2089. #Default:
  2090. # none
  2091.  
  2092. # TAG: pid_filename
  2093. # A filename to write the process-id to. To disable, enter "none".
  2094. #
  2095. #Default:
  2096. # pid_filename /var/run/squid.pid
  2097.  
  2098. # TAG: debug_options
  2099. # Logging options are set as section,level where each source file
  2100. # is assigned a unique section. Lower levels result in less
  2101. # output, Full debugging (level 9) can result in a very large
  2102. # log file, so be careful. The magic word "ALL" sets debugging
  2103. # levels for all sections. We recommend normally running with
  2104. # "ALL,1".
  2105. #
  2106. #Default:
  2107. # debug_options ALL,1
  2108.  
  2109. # TAG: log_fqdn on|off
  2110. # Turn this on if you wish to log fully qualified domain names
  2111. # in the access.log. To do this Squid does a DNS lookup of all
  2112. # IP's connecting to it. This can (in some situations) increase
  2113. # latency, which makes your cache seem slower for interactive
  2114. # browsing.
  2115. #
  2116. #Default:
  2117. # log_fqdn off
  2118.  
  2119. # TAG: client_netmask
  2120. # A netmask for client addresses in logfiles and cachemgr output.
  2121. # Change this to protect the privacy of your cache clients.
  2122. # A netmask of 255.255.255.0 will log all IP's in that range with
  2123. # the last digit set to '0'.
  2124. #
  2125. #Default:
  2126. # client_netmask 255.255.255.255
  2127.  
  2128. # TAG: forward_log
  2129. # Note: This option is only available if Squid is rebuilt with the
  2130. # --enable-forward-log option
  2131. #
  2132. # Logs the server-side requests.
  2133. #
  2134. # This is currently work in progress.
  2135. #
  2136. #Default:
  2137. # none
  2138.  
  2139. # TAG: strip_query_terms
  2140. # By default, Squid strips query terms from requested URLs before
  2141. # logging. This protects your user's privacy.
  2142. #
  2143. #Default:
  2144. # strip_query_terms on
  2145.  
  2146. # TAG: buffered_logs on|off
  2147. # cache.log log file is written with stdio functions, and as such
  2148. # it can be buffered or unbuffered. By default it will be unbuffered.
  2149. # Buffering it can speed up the writing slightly (though you are
  2150. # unlikely to need to worry unless you run with tons of debugging
  2151. # enabled in which case performance will suffer badly anyway..).
  2152. #
  2153. #Default:
  2154. # buffered_logs off
  2155.  
  2156.  
  2157. # OPTIONS FOR FTP GATEWAYING
  2158. # -----------------------------------------------------------------------------
  2159.  
  2160. # TAG: ftp_user
  2161. # If you want the anonymous login password to be more informative
  2162. # (and enable the use of picky ftp servers), set this to something
  2163. # reasonable for your domain, like wwwuser@somewhere.net
  2164. #
  2165. # The reason why this is domainless by default is the
  2166. # request can be made on the behalf of a user in any domain,
  2167. # depending on how the cache is used.
  2168. # Some ftp server also validate the email address is valid
  2169. # (for example perl.com).
  2170. #
  2171. #Default:
  2172. # ftp_user Squid@
  2173.  
  2174. # TAG: ftp_list_width
  2175. # Sets the width of ftp listings. This should be set to fit in
  2176. # the width of a standard browser. Setting this too small
  2177. # can cut off long filenames when browsing ftp sites.
  2178. #
  2179. #Default:
  2180. # ftp_list_width 32
  2181.  
  2182. # TAG: ftp_passive
  2183. # If your firewall does not allow Squid to use passive
  2184. # connections, turn off this option.
  2185. #
  2186. #Default:
  2187. # ftp_passive on
  2188.  
  2189. # TAG: ftp_sanitycheck
  2190. # For security and data integrity reasons Squid by default performs
  2191. # sanity checks of the addresses of FTP data connections ensure the
  2192. # data connection is to the requested server. If you need to allow
  2193. # FTP connections to servers using another IP address for the data
  2194. # connection turn this off.
  2195. #
  2196. #Default:
  2197. # ftp_sanitycheck on
  2198.  
  2199. # TAG: ftp_telnet_protocol
  2200. # The FTP protocol is officially defined to use the telnet protocol
  2201. # as transport channel for the control connection. However, many
  2202. # implementations are broken and does not respect this aspect of
  2203. # the FTP protocol.
  2204. #
  2205. # If you have trouble accessing files with ASCII code 255 in the
  2206. # path or similar problems involving this ASCII code you can
  2207. # try setting this directive to off. If that helps, report to the
  2208. # operator of the FTP server in question that their FTP server
  2209. # is broken and does not follow the FTP standard.
  2210. #
  2211. #Default:
  2212. # ftp_telnet_protocol on
  2213.  
  2214.  
  2215. # OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
  2216. # -----------------------------------------------------------------------------
  2217.  
  2218. # TAG: diskd_program
  2219. # Specify the location of the diskd executable.
  2220. # Note this is only useful if you have compiled in
  2221. # diskd as one of the store io modules.
  2222. #
  2223. #Default:
  2224. # diskd_program /usr/lib/squid/diskd-daemon
  2225.  
  2226. # TAG: unlinkd_program
  2227. # Specify the location of the executable for file deletion process.
  2228. #
  2229. #Default:
  2230. # unlinkd_program /usr/lib/squid/unlinkd
  2231.  
  2232. # TAG: pinger_program
  2233. # Note: This option is only available if Squid is rebuilt with the
  2234. # --enable-icmp option
  2235. #
  2236. # Specify the location of the executable for the pinger process.
  2237. #
  2238. #Default:
  2239. # pinger_program /usr/lib/squid/pinger
  2240.  
  2241.  
  2242. # OPTIONS FOR URL REWRITING
  2243. # -----------------------------------------------------------------------------
  2244.  
  2245. # TAG: url_rewrite_program
  2246. # Specify the location of the executable for the URL rewriter.
  2247. # Since they can perform almost any function there isn't one included.
  2248. #
  2249. # For each requested URL rewriter will receive on line with the format
  2250. #
  2251. # URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup <NL>
  2252. #
  2253. # And the rewriter may return a rewritten URL. The other components of
  2254. # the request line does not need to be returned (ignored if they are).
  2255. #
  2256. # The rewriter can also indicate that a client-side redirect should
  2257. # be performed to the new URL. This is done by prefixing the returned
  2258. # URL with "301:" (moved permanently) or 302: (moved temporarily).
  2259. #
  2260. # It can also return a "urlgroup" that can subsequently be matched
  2261. # in cache_peer_access and similar ACL driven rules. An urlgroup is
  2262. # returned by prefixing the returned URL with "!urlgroup!".
  2263. #
  2264. # By default, a URL rewriter is not used.
  2265. #
  2266. #Default:
  2267. # none
  2268.  
  2269. # TAG: url_rewrite_children
  2270. # The number of redirector processes to spawn. If you start
  2271. # too few Squid will have to wait for them to process a backlog of
  2272. # URLs, slowing it down. If you start too many they will use RAM
  2273. # and other system resources.
  2274. #
  2275. #Default:
  2276. # url_rewrite_children 5
  2277.  
  2278. # TAG: url_rewrite_concurrency
  2279. # The number of requests each redirector helper can handle in
  2280. # parallel. Defaults to 0 which indicates the redirector
  2281. # is a old-style single threaded redirector.
  2282. #
  2283. # When this directive is set to a value >= 1 then the protocol
  2284. # used to communicate with the helper is modified to include
  2285. # a request ID in front of the request/response. The request
  2286. # ID from the request must be echoed back with the response
  2287. # to that request.
  2288. #
  2289. #Default:
  2290. # url_rewrite_concurrency 0
  2291.  
  2292. # TAG: url_rewrite_host_header
  2293. # By default Squid rewrites any Host: header in redirected
  2294. # requests. If you are running an accelerator this may
  2295. # not be a wanted effect of a redirector.
  2296. #
  2297. # WARNING: Entries are cached on the result of the URL rewriting
  2298. # process, so be careful if you have domain-virtual hosts.
  2299. #
  2300. #Default:
  2301. # url_rewrite_host_header on
  2302.  
  2303. # TAG: url_rewrite_access
  2304. # If defined, this access list specifies which requests are
  2305. # sent to the redirector processes. By default all requests
  2306. # are sent.
  2307. #
  2308. #Default:
  2309. # none
  2310.  
  2311. # TAG: redirector_bypass
  2312. # When this is 'on', a request will not go through the
  2313. # redirector if all redirectors are busy. If this is 'off'
  2314. # and the redirector queue grows too large, Squid will exit
  2315. # with a FATAL error and ask you to increase the number of
  2316. # redirectors. You should only enable this if the redirectors
  2317. # are not critical to your caching system. If you use
  2318. # redirectors for access control, and you enable this option,
  2319. # users may have access to pages they should not
  2320. # be allowed to request.
  2321. #
  2322. #Default:
  2323. # redirector_bypass off
  2324.  
  2325. # TAG: location_rewrite_program
  2326. # Specify the location of the executable for the Location rewriter,
  2327. # used to rewrite server generated redirects. Usually used in
  2328. # conjunction with a url_rewrite_program
  2329. #
  2330. # For each Location header received the location rewriter will receive
  2331. # one line with the format:
  2332. #
  2333. # location URL <SP> requested URL <SP> urlgroup <NL>
  2334. #
  2335. # And the rewriter may return a rewritten Location URL or a blank line.
  2336. # The other components of the request line does not need to be returned
  2337. # (ignored if they are).
  2338. #
  2339. # By default, a Location rewriter is not used.
  2340. #
  2341. #Default:
  2342. # none
  2343.  
  2344. # TAG: location_rewrite_children
  2345. # The number of location rewriting processes to spawn. If you start
  2346. # too few Squid will have to wait for them to process a backlog of
  2347. # URLs, slowing it down. If you start too many they will use RAM
  2348. # and other system resources.
  2349. #
  2350. #Default:
  2351. # location_rewrite_children 5
  2352.  
  2353. # TAG: location_rewrite_concurrency
  2354. # The number of requests each Location rewriter helper can handle in
  2355. # parallel. Defaults to 0 which indicates that the helper
  2356. # is a old-style singlethreaded helper.
  2357. #
  2358. #Default:
  2359. # location_rewrite_concurrency 0
  2360.  
  2361. # TAG: location_rewrite_access
  2362. # If defined, this access list specifies which requests are
  2363. # sent to the location rewriting processes. By default all Location
  2364. # headers are sent.
  2365. #
  2366. #Default:
  2367. # none
  2368.  
  2369.  
  2370. # OPTIONS FOR TUNING THE CACHE
  2371. # -----------------------------------------------------------------------------
  2372.  
  2373. # TAG: cache
  2374. # A list of ACL elements which, if matched, cause the request to
  2375. # not be satisfied from the cache and the reply to not be cached.
  2376. # In other words, use this to force certain objects to never be cached.
  2377. #
  2378. # You must use the word 'DENY' to indicate the ACL names which should
  2379. # NOT be cached.
  2380. #
  2381. # Default is to allow all to be cached
  2382. #We recommend you to use the following two lines.
  2383. acl QUERY urlpath_regex cgi-bin \?
  2384. cache deny QUERY
  2385.  
  2386. # TAG: refresh_pattern
  2387. # usage: refresh_pattern [-i] regex min percent max [options]
  2388. #
  2389. # By default, regular expressions are CASE-SENSITIVE. To make
  2390. # them case-insensitive, use the -i option.
  2391. #
  2392. # 'Min' is the time (in minutes) an object without an explicit
  2393. # expiry time should be considered fresh. The recommended
  2394. # value is 0, any higher values may cause dynamic applications
  2395. # to be erroneously cached unless the application designer
  2396. # has taken the appropriate actions.
  2397. #
  2398. # 'Percent' is a percentage of the objects age (time since last
  2399. # modification age) an object without explicit expiry time
  2400. # will be considered fresh.
  2401. #
  2402. # 'Max' is an upper limit on how long objects without an explicit
  2403. # expiry time will be considered fresh.
  2404. #
  2405. # options: override-expire
  2406. # override-lastmod
  2407. # reload-into-ims
  2408. # ignore-reload
  2409. # ignore-no-cache
  2410. # ignore-private
  2411. # ignore-auth
  2412. #
  2413. # override-expire enforces min age even if the server
  2414. # sent a Expires: header. Doing this VIOLATES the HTTP
  2415. # standard. Enabling this feature could make you liable
  2416. # for problems which it causes.
  2417. #
  2418. # override-lastmod enforces min age even on objects
  2419. # that were modified recently.
  2420. #
  2421. # reload-into-ims changes client no-cache or ``reload''
  2422. # to If-Modified-Since requests. Doing this VIOLATES the
  2423. # HTTP standard. Enabling this feature could make you
  2424. # liable for problems which it causes.
  2425. #
  2426. # ignore-reload ignores a client no-cache or ``reload''
  2427. # header. Doing this VIOLATES the HTTP standard. Enabling
  2428. # this feature could make you liable for problems which
  2429. # it causes.
  2430. #
  2431. # ignore-no-cache ignores any ``Pragma: no-cache'' and
  2432. # ``Cache-control: no-cache'' headers received from a server.
  2433. # The HTTP RFC never allows the use of this (Pragma) header
  2434. # from a server, only a client, though plenty of servers
  2435. # send it anyway.
  2436. #
  2437. # ignore-private ignores any ``Cache-control: private''
  2438. # headers received from a server. Doing this VIOLATES
  2439. # the HTTP standard. Enabling this feature could make you
  2440. # liable for problems which it causes.
  2441. #
  2442. # ignore-auth caches responses to requests with authorization,
  2443. # as if the originserver had sent ``Cache-control: public''
  2444. # in the response header. Doing this VIOLATES the HTTP standard.
  2445. # Enabling this feature could make you liable for problems which
  2446. # it causes.
  2447. #
  2448. # Basically a cached object is:
  2449. #
  2450. # FRESH if expires < now, else STALE
  2451. # STALE if age > max
  2452. # FRESH if lm-factor < percent, else STALE
  2453. # FRESH if age < min
  2454. # else STALE
  2455. #
  2456. # The refresh_pattern lines are checked in the order listed here.
  2457. # The first entry which matches is used. If none of the entries
  2458. # match the default will be used.
  2459. #
  2460. # Note, you must uncomment all the default lines if you want
  2461. # to change one. The default setting is only active if none is
  2462. # used.
  2463. #
  2464. #Suggested default:
  2465. refresh_pattern ^ftp: 1440 20% 10080
  2466. refresh_pattern ^gopher: 1440 0% 1440
  2467. refresh_pattern . 0 20% 4320
  2468.  
  2469. # TAG: quick_abort_min (KB)
  2470. # TAG: quick_abort_max (KB)
  2471. # TAG: quick_abort_pct (percent)
  2472. # The cache by default continues downloading aborted requests
  2473. # which are almost completed (less than 16 KB remaining). This
  2474. # may be undesirable on slow (e.g. SLIP) links and/or very busy
  2475. # caches. Impatient users may tie up file descriptors and
  2476. # bandwidth by repeatedly requesting and immediately aborting
  2477. # downloads.
  2478. #
  2479. # When the user aborts a request, Squid will check the
  2480. # quick_abort values to the amount of data transfered until
  2481. # then.
  2482. #
  2483. # If the transfer has less than 'quick_abort_min' KB remaining,
  2484. # it will finish the retrieval.
  2485. #
  2486. # If the transfer has more than 'quick_abort_max' KB remaining,
  2487. # it will abort the retrieval.
  2488. #
  2489. # If more than 'quick_abort_pct' of the transfer has completed,
  2490. # it will finish the retrieval.
  2491. #
  2492. # If you do not want any retrieval to continue after the client
  2493. # has aborted, set both 'quick_abort_min' and 'quick_abort_max'
  2494. # to '0 KB'.
  2495. #
  2496. # If you want retrievals to always continue if they are being
  2497. # cached set 'quick_abort_min' to '-1 KB'.
  2498. #
  2499. #Default:
  2500. # quick_abort_min 16 KB
  2501. # quick_abort_max 16 KB
  2502. # quick_abort_pct 95
  2503.  
  2504. # TAG: read_ahead_gap buffer-size
  2505. # The amount of data the cache will buffer ahead of what has been
  2506. # sent to the client when retrieving an object from another server.
  2507. #
  2508. #Default:
  2509. # read_ahead_gap 16 KB
  2510.  
  2511. # TAG: negative_ttl time-units
  2512. # Time-to-Live (TTL) for failed requests. Certain types of
  2513. # failures (such as "connection refused" and "404 Not Found") are
  2514. # negatively-cached for a configurable amount of time. The
  2515. # default is 5 minutes. Note that this is different from
  2516. # negative caching of DNS lookups.
  2517. #
  2518. #Default:
  2519. # negative_ttl 5 minutes
  2520.  
  2521. # TAG: positive_dns_ttl time-units
  2522. # Upper limit on how long Squid will cache positive DNS responses.
  2523. # Default is 6 hours (360 minutes). This directive must be set
  2524. # larger than negative_dns_ttl.
  2525. #
  2526. #Default:
  2527. # positive_dns_ttl 6 hours
  2528.  
  2529. # TAG: negative_dns_ttl time-units
  2530. # Time-to-Live (TTL) for negative caching of failed DNS lookups.
  2531. # This also sets the lower cache limit on positive lookups.
  2532. # Minimum value is 1 second, and it is not recommendable to go
  2533. # much below 10 seconds.
  2534. #
  2535. #Default:
  2536. # negative_dns_ttl 1 minute
  2537.  
  2538. # TAG: range_offset_limit (bytes)
  2539. # Sets a upper limit on how far into the the file a Range request
  2540. # may be to cause Squid to prefetch the whole file. If beyond this
  2541. # limit Squid forwards the Range request as it is and the result
  2542. # is NOT cached.
  2543. #
  2544. # This is to stop a far ahead range request (lets say start at 17MB)
  2545. # from making Squid fetch the whole object up to that point before
  2546. # sending anything to the client.
  2547. #
  2548. # A value of -1 causes Squid to always fetch the object from the
  2549. # beginning so it may cache the result. (2.0 style)
  2550. #
  2551. # A value of 0 causes Squid to never fetch more than the
  2552. # client requested. (default)
  2553. #
  2554. #Default:
  2555. # range_offset_limit 0 KB
  2556.  
  2557. # TAG: minimum_expiry_time (seconds)
  2558. # The minimum caching time according to (Expires - Date)
  2559. # Headers Squid honors if the object can't be revalidated
  2560. # defaults to 60 seconds. In reverse proxy enorinments it
  2561. # might be desirable to honor shorter object lifetimes. It
  2562. # is most likely better to make your server return a
  2563. # meaningful Last-Modified header however.
  2564. #
  2565. #Default:
  2566. # minimum_expiry_time 60 seconds
  2567.  
  2568. # TAG: store_avg_object_size (kbytes)
  2569. # Average object size, used to estimate number of objects your
  2570. # cache can hold. The default is 13 KB.
  2571. #
  2572. #Default:
  2573. #store_avg_object_size 13KB
  2574.  
  2575. # TAG: store_objects_per_bucket
  2576. # Target number of objects per bucket in the store hash table.
  2577. # Lowering this value increases the total number of buckets and
  2578. # also the storage maintenance rate. The default is 20.
  2579. #
  2580. #Default:
  2581. # store_objects_per_bucket 20
  2582.  
  2583.  
  2584. # HTTP OPTIONS
  2585. # -----------------------------------------------------------------------------
  2586.  
  2587. # TAG: request_header_max_size (KB)
  2588. # This specifies the maximum size for HTTP headers in a request.
  2589. # Request headers are usually relatively small (about 512 bytes).
  2590. # Placing a limit on the request header size will catch certain
  2591. # bugs (for example with persistent connections) and possibly
  2592. # buffer-overflow or denial-of-service attacks.
  2593. #
  2594. #Default:
  2595. # request_header_max_size 20 KB
  2596.  
  2597. # TAG: reply_header_max_size (KB)
  2598. # This specifies the maximum size for HTTP headers in a reply.
  2599. # Reply headers are usually relatively small (about 512 bytes).
  2600. # Placing a limit on the reply header size will catch certain
  2601. # bugs (for example with persistent connections) and possibly
  2602. # buffer-overflow or denial-of-service attacks.
  2603. #
  2604. #Default:
  2605. # reply_header_max_size 20 KB
  2606.  
  2607. # TAG: request_body_max_size (KB)
  2608. # This specifies the maximum size for an HTTP request body.
  2609. # In other words, the maximum size of a PUT/POST request.
  2610. # A user who attempts to send a request with a body larger
  2611. # than this limit receives an "Invalid Request" error message.
  2612. # If you set this parameter to a zero (the default), there will
  2613. # be no limit imposed.
  2614. #
  2615. #Default:
  2616. # request_body_max_size 0 KB
  2617.  
  2618. # TAG: broken_posts
  2619. # A list of ACL elements which, if matched, causes Squid to send
  2620. # an extra CRLF pair after the body of a PUT/POST request.
  2621. #
  2622. # Some HTTP servers has broken implementations of PUT/POST,
  2623. # and rely on an extra CRLF pair sent by some WWW clients.
  2624. #
  2625. # Quote from RFC2616 section 4.1 on this matter:
  2626. #
  2627. # Note: certain buggy HTTP/1.0 client implementations generate an
  2628. # extra CRLF's after a POST request. To restate what is explicitly
  2629. # forbidden by the BNF, an HTTP/1.1 client must not preface or follow
  2630. # a request with an extra CRLF.
  2631. #
  2632. #Example:
  2633. # acl buggy_server url_regex ^http://....
  2634. # broken_posts allow buggy_server
  2635. #
  2636. #Default:
  2637. # none
  2638.  
  2639. # TAG: via on|off
  2640. # If set (default), Squid will include a Via header in requests and
  2641. # replies as required by RFC2616.
  2642. #
  2643. #Default:
  2644. # via on
  2645.  
  2646. # TAG: cache_vary
  2647. # When 'cache_vary' is set to off, response that have a
  2648. # Vary header will not be stored in the cache.
  2649. #
  2650. #Default:
  2651. # cache_vary on
  2652.  
  2653. # TAG: broken_vary_encoding
  2654. # Many servers have broken support for on-the-fly Content-Encoding,
  2655. # returning the same ETag on both plain and gzip:ed variants.
  2656. # Vary replies matching this access list will have the cache split
  2657. # on the Accept-Encoding header of the request and not trusting the
  2658. # ETag to be unique.
  2659. #
  2660. # Apache mod_gzip and mod_deflate known to be broken so don't trust
  2661. # Apache to signal ETag correctly on such responses
  2662. acl apache rep_header Server ^Apache
  2663. broken_vary_encoding allow apache
  2664.  
  2665. # TAG: collapsed_forwarding (on|off)
  2666. # This option enables multiple requests for the same URI to be
  2667. # processed as one request. Normally disabled to avoid increased
  2668. # latency on dynamic content, but there can be benefit from enabling
  2669. # this in accelerator setups where the web servers are the bottleneck
  2670. # and reliable and returns mostly cacheable information.
  2671. #
  2672. #Default:
  2673. # collapsed_forwarding off
  2674.  
  2675. # TAG: refresh_stale_hit (time)
  2676. # This option changes the refresh algorithm to allow concurrent
  2677. # requests while an object is being refreshed to be processed as
  2678. # cache hits if the object expired less than X seconds ago. Default
  2679. # is 0 to disable this feature. This option is mostly interesting
  2680. # in accelerator setups where a few objects is accessed very
  2681. # frequently.
  2682. #
  2683. #Default:
  2684. # refresh_stale_hit 0 seconds
  2685.  
  2686. # TAG: ie_refresh on|off
  2687. # Microsoft Internet Explorer up until version 5.5 Service
  2688. # Pack 1 has an issue with transparent proxies, wherein it
  2689. # is impossible to force a refresh. Turning this on provides
  2690. # a partial fix to the problem, by causing all IMS-REFRESH
  2691. # requests from older IE versions to check the origin server
  2692. # for fresh content. This reduces hit ratio by some amount
  2693. # (~10% in my experience), but allows users to actually get
  2694. # fresh content when they want it. Note because Squid
  2695. # cannot tell if the user is using 5.5 or 5.5SP1, the behavior
  2696. # of 5.5 is unchanged from old versions of Squid (i.e. a
  2697. # forced refresh is impossible). Newer versions of IE will,
  2698. # hopefully, continue to have the new behavior and will be
  2699. # handled based on that assumption. This option defaults to
  2700. # the old Squid behavior, which is better for hit ratios but
  2701. # worse for clients using IE, if they need to be able to
  2702. # force fresh content.
  2703. #
  2704. #Default:
  2705. # ie_refresh off
  2706.  
  2707. # TAG: vary_ignore_expire on|off
  2708. # Many HTTP servers supporting Vary gives such objects
  2709. # immediate expiry time with no cache-control header
  2710. # when requested by a HTTP/1.0 client. This option
  2711. # enables Squid to ignore such expiry times until
  2712. # HTTP/1.1 is fully implemented.
  2713. # WARNING: This may eventually cause some varying
  2714. # objects not intended for caching to get cached.
  2715. #
  2716. #Default:
  2717. # vary_ignore_expire off
  2718.  
  2719. # TAG: extension_methods
  2720. # Squid only knows about standardized HTTP request methods.
  2721. # You can add up to 20 additional "extension" methods here.
  2722. #
  2723. #Default:
  2724. # none
  2725.  
  2726. # TAG: request_entities
  2727. # Squid defaults to deny GET and HEAD requests with request entities,
  2728. # as the meaning of such requests are undefined in the HTTP standard
  2729. # even if not explicitly forbidden.
  2730. #
  2731. # Set this directive to on if you have clients which insists
  2732. # on sending request entities in GET or HEAD requests. But be warned
  2733. # that there is server software (both proxies and web servers) which
  2734. # can fail to properly process this kind of request which may make you
  2735. # vulnerable to cache pollution attacks if enabled.
  2736. #
  2737. #Default:
  2738. # request_entities off
  2739.  
  2740. # TAG: header_access
  2741. # Usage: header_access header_name allow|deny [!]aclname ...
  2742. #
  2743. # WARNING: Doing this VIOLATES the HTTP standard. Enabling
  2744. # this feature could make you liable for problems which it
  2745. # causes.
  2746. #
  2747. # This option replaces the old 'anonymize_headers' and the
  2748. # older 'http_anonymizer' option with something that is much
  2749. # more configurable. This new method creates a list of ACLs
  2750. # for each header, allowing you very fine-tuned header
  2751. # mangling.
  2752. #
  2753. # You can only specify known headers for the header name.
  2754. # Other headers are reclassified as 'Other'. You can also
  2755. # refer to all the headers with 'All'.
  2756. #
  2757. # For example, to achieve the same behavior as the old
  2758. # 'http_anonymizer standard' option, you should use:
  2759. #
  2760. # header_access From deny all
  2761. # header_access Referer deny all
  2762. # header_access Server deny all
  2763. # header_access User-Agent deny all
  2764. # header_access WWW-Authenticate deny all
  2765. # header_access Link deny all
  2766. #
  2767. # Or, to reproduce the old 'http_anonymizer paranoid' feature
  2768. # you should use:
  2769. #
  2770. # header_access Allow allow all
  2771. # header_access Authorization allow all
  2772. # header_access WWW-Authenticate allow all
  2773. # header_access Proxy-Authorization allow all
  2774. # header_access Proxy-Authenticate allow all
  2775. # header_access Cache-Control allow all
  2776. # header_access Content-Encoding allow all
  2777. # header_access Content-Length allow all
  2778. # header_access Content-Type allow all
  2779. # header_access Date allow all
  2780. # header_access Expires allow all
  2781. # header_access Host allow all
  2782. # header_access If-Modified-Since allow all
  2783. # header_access Last-Modified allow all
  2784. # header_access Location allow all
  2785. # header_access Pragma allow all
  2786. # header_access Accept allow all
  2787. # header_access Accept-Charset allow all
  2788. # header_access Accept-Encoding allow all
  2789. # header_access Accept-Language allow all
  2790. # header_access Content-Language allow all
  2791. # header_access Mime-Version allow all
  2792. # header_access Retry-After allow all
  2793. # header_access Title allow all
  2794. # header_access Connection allow all
  2795. # header_access Proxy-Connection allow all
  2796. # header_access All deny all
  2797. #
  2798. # By default, all headers are allowed (no anonymizing is
  2799. # performed).
  2800. #
  2801. #Default:
  2802. # none
  2803.  
  2804. # TAG: header_replace
  2805. # Usage: header_replace header_name message
  2806. # Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
  2807. #
  2808. # This option allows you to change the contents of headers
  2809. # denied with header_access above, by replacing them with
  2810. # some fixed string. This replaces the old fake_user_agent
  2811. # option.
  2812. #
  2813. # By default, headers are removed if denied.
  2814. #
  2815. #Default:
  2816. # none
  2817.  
  2818. # TAG: relaxed_header_parser on|off|warn
  2819. # In the default "on" setting Squid accepts certain forms
  2820. # of non-compliant HTTP messages where it is unambiguous
  2821. # what the sending application intended even if the message
  2822. # is not correctly formatted. The messages is then normalized
  2823. # to the correct form when forwarded by Squid.
  2824. #
  2825. # If set to "warn" then a warning will be emitted in cache.log
  2826. # each time such HTTP error is encountered.
  2827. #
  2828. # If set to "off" then such HTTP errors will cause the request
  2829. # or response to be rejected.
  2830. #
  2831. #Default:
  2832. # relaxed_header_parser on
  2833.  
  2834.  
  2835. # TIMEOUTS
  2836. # -----------------------------------------------------------------------------
  2837.  
  2838. # TAG: forward_timeout time-units
  2839. # This parameter specifies how long Squid should at most attempt in
  2840. # finding a forwarding path for the request before giving up.
  2841. #
  2842. #Default:
  2843. # forward_timeout 4 minutes
  2844.  
  2845. # TAG: connect_timeout time-units
  2846. # This parameter specifies how long to wait for the TCP connect to
  2847. # the requested server or peer to complete before Squid should
  2848. # attempt to find another path where to forward the request.
  2849. #
  2850. #Default:
  2851. # connect_timeout 1 minute
  2852.  
  2853. # TAG: peer_connect_timeout time-units
  2854. # This parameter specifies how long to wait for a pending TCP
  2855. # connection to a peer cache. The default is 30 seconds. You
  2856. # may also set different timeout values for individual neighbors
  2857. # with the 'connect-timeout' option on a 'cache_peer' line.
  2858. #
  2859. #Default:
  2860. # peer_connect_timeout 30 seconds
  2861.  
  2862. # TAG: read_timeout time-units
  2863. # The read_timeout is applied on server-side connections. After
  2864. # each successful read(), the timeout will be extended by this
  2865. # amount. If no data is read again after this amount of time,
  2866. # the request is aborted and logged with ERR_READ_TIMEOUT. The
  2867. # default is 15 minutes.
  2868. #
  2869. #Default:
  2870. # read_timeout 15 minutes
  2871.  
  2872. # TAG: request_timeout
  2873. # How long to wait for an HTTP request after initial
  2874. # connection establishment.
  2875. #
  2876. #Default:
  2877. # request_timeout 5 minutes
  2878.  
  2879. # TAG: persistent_request_timeout
  2880. # How long to wait for the next HTTP request on a persistent
  2881. # connection after the previous request completes.
  2882. #
  2883. #Default:
  2884. # persistent_request_timeout 2 minutes
  2885.  
  2886. # TAG: client_lifetime time-units
  2887. # The maximum amount of time a client (browser) is allowed to
  2888. # remain connected to the cache process. This protects the Cache
  2889. # from having a lot of sockets (and hence file descriptors) tied up
  2890. # in a CLOSE_WAIT state from remote clients that go away without
  2891. # properly shutting down (either because of a network failure or
  2892. # because of a poor client implementation). The default is one
  2893. # day, 1440 minutes.
  2894. #
  2895. # NOTE: The default value is intended to be much larger than any
  2896. # client would ever need to be connected to your cache. You
  2897. # should probably change client_lifetime only as a last resort.
  2898. # If you seem to have many client connections tying up
  2899. # filedescriptors, we recommend first tuning the read_timeout,
  2900. # request_timeout, persistent_request_timeout and quick_abort values.
  2901. #
  2902. #Default:
  2903. # client_lifetime 1 day
  2904.  
  2905. # TAG: half_closed_clients
  2906. # Some clients may shutdown the sending side of their TCP
  2907. # connections, while leaving their receiving sides open. Sometimes,
  2908. # Squid can not tell the difference between a half-closed and a
  2909. # fully-closed TCP connection. By default, half-closed client
  2910. # connections are kept open until a read(2) or write(2) on the
  2911. # socket returns an error. Change this option to 'off' and Squid
  2912. # will immediately close client connections when read(2) returns
  2913. # "no more data to read."
  2914. #
  2915. #Default:
  2916. # half_closed_clients on
  2917.  
  2918. # TAG: pconn_timeout
  2919. # Timeout for idle persistent connections to servers and other
  2920. # proxies.
  2921. #
  2922. #Default:
  2923. # pconn_timeout 1 minute
  2924.  
  2925. # TAG: ident_timeout
  2926. # Maximum time to wait for IDENT lookups to complete.
  2927. #
  2928. # If this is too high, and you enabled IDENT lookups from untrusted
  2929. # users, you might be susceptible to denial-of-service by having
  2930. # many ident requests going at once.
  2931. #
  2932. #Default:
  2933. # ident_timeout 10 seconds
  2934.  
  2935. # TAG: shutdown_lifetime time-units
  2936. # When SIGTERM or SIGHUP is received, the cache is put into
  2937. # "shutdown pending" mode until all active sockets are closed.
  2938. # This value is the lifetime to set for all open descriptors
  2939. # during shutdown mode. Any active clients after this many
  2940. # seconds will receive a 'timeout' message.
  2941. #
  2942. #Default:
  2943. # shutdown_lifetime 30 seconds
  2944.  
  2945.  
  2946. # ADMINISTRATIVE PARAMETERS
  2947. # -----------------------------------------------------------------------------
  2948.  
  2949. # TAG: cache_mgr
  2950. # Email-address of local cache manager who will receive
  2951. # mail if the cache dies. The default is "root".
  2952. #
  2953. #Default:
  2954. cache_mgr steseagal87@gmail.com
  2955.  
  2956. # TAG: mail_from
  2957. # From: email-address for mail sent when the cache dies.
  2958. # The default is to use 'appname@unique_hostname'.
  2959. # Default appname value is "squid", can be changed into
  2960. # src/globals.h before building squid.
  2961. #
  2962. #Default:
  2963. # none
  2964.  
  2965. # TAG: mail_program
  2966. # Email program used to send mail if the cache dies.
  2967. # The default is "mail". The specified program must comply
  2968. # with the standard Unix mail syntax:
  2969. # mail-program recipient < mailfile
  2970. #
  2971. # Optional command line options can be specified.
  2972. #
  2973. #Default:
  2974. # mail_program mail
  2975.  
  2976. # TAG: cache_effective_user
  2977. # If you start Squid as root, it will change its effective/real
  2978. # UID/GID to the user specified below. The default is to change
  2979. # to UID to "squid". If you define cache_effective_user, but not
  2980. # cache_effective_group, Squid sets the GID to the effective
  2981. # user's default group ID (taken from the password file) and
  2982. # supplementary group list from the from groups membership of
  2983. # cache_effective_user.
  2984. cache_effective_user squid
  2985. #
  2986. #Default:
  2987. # cache_effective_user squid
  2988.  
  2989. # TAG: cache_effective_group
  2990. # If you want Squid to run with a specific GID regardless of
  2991. # the group memberships of the effective user then set this
  2992. # to the group (or GID) you want Squid to run as. When set
  2993. # all other group privileges of the effective user is ignored
  2994. # and only this GID is effective. If Squid is not started as
  2995. # root the user starting Squid must be member of the specified
  2996. # group.
  2997. cache_effective_group squid
  2998. #
  2999. #Default:
  3000. # cache_effective_group squid
  3001.  
  3002. # TAG: httpd_suppress_version_string on|off
  3003. # Suppress Squid version string info in HTTP headers and HTML error pages.
  3004. #
  3005. #Default:
  3006. # httpd_suppress_version_string off
  3007.  
  3008. # TAG: visible_hostname
  3009. # If you want to present a special hostname in error messages, etc,
  3010. # define this. Otherwise, the return value of gethostname()
  3011. # will be used. If you have multiple caches in a cluster and
  3012. # get errors about IP-forwarding you must set them to have individual
  3013. # names with this setting.
  3014. #
  3015. #Default:
  3016. # none
  3017.  
  3018. # TAG: unique_hostname
  3019. # If you want to have multiple machines with the same
  3020. # 'visible_hostname' you must give each machine a different
  3021. # 'unique_hostname' so forwarding loops can be detected.
  3022. #
  3023. #Default:
  3024. # none
  3025.  
  3026. # TAG: hostname_aliases
  3027. # A list of other DNS names your cache has.
  3028. #
  3029. #Default:
  3030. # none
  3031.  
  3032. # TAG: umask
  3033. # Minimum umask which should be enforced while the proxy
  3034. # is running, in addition to the umask set at startup.
  3035. #
  3036. # Note: Should start with a 0 to indicate the normal octal
  3037. # representation of umasks
  3038. #
  3039. #Default:
  3040. # umask 027
  3041.  
  3042.  
  3043. # OPTIONS FOR THE CACHE REGISTRATION SERVICE
  3044. # -----------------------------------------------------------------------------
  3045. #
  3046. # This section contains parameters for the (optional) cache
  3047. # announcement service. This service is provided to help
  3048. # cache administrators locate one another in order to join or
  3049. # create cache hierarchies.
  3050. #
  3051. # An 'announcement' message is sent (via UDP) to the registration
  3052. # service by Squid. By default, the announcement message is NOT
  3053. # SENT unless you enable it with 'announce_period' below.
  3054. #
  3055. # The announcement message includes your hostname, plus the
  3056. # following information from this configuration file:
  3057. #
  3058. # http_port
  3059. # icp_port
  3060. # cache_mgr
  3061. #
  3062. # All current information is processed regularly and made
  3063. # available on the Web at http://www.ircache.net/Cache/Tracker/.
  3064.  
  3065. # TAG: announce_period
  3066. # This is how frequently to send cache announcements. The
  3067. # default is `0' which disables sending the announcement
  3068. # messages.
  3069. #
  3070. # To enable announcing your cache, just uncomment the line
  3071. # below.
  3072. #
  3073. #Default:
  3074. # announce_period 0
  3075. #
  3076. #To enable announcing your cache, just uncomment the line below.
  3077. #announce_period 1 day
  3078.  
  3079. # TAG: announce_host
  3080. # TAG: announce_file
  3081. # TAG: announce_port
  3082. # announce_host and announce_port set the hostname and port
  3083. # number where the registration message will be sent.
  3084. #
  3085. # Hostname will default to 'tracker.ircache.net' and port will
  3086. # default default to 3131. If the 'filename' argument is given,
  3087. # the contents of that file will be included in the announce
  3088. # message.
  3089. #
  3090. #Default:
  3091. # announce_host tracker.ircache.net
  3092. # announce_port 3131
  3093.  
  3094.  
  3095. # HTTPD-ACCELERATOR OPTIONS
  3096. # -----------------------------------------------------------------------------
  3097.  
  3098. # TAG: httpd_accel_no_pmtu_disc on|off
  3099. # In many setups of transparently intercepting proxies Path-MTU
  3100. # discovery can not work on traffic towards the clients. This is
  3101. # the case when the intercepting device does not fully track
  3102. # connections and fails to forward ICMP must fragment messages
  3103. # to the cache server.
  3104. #
  3105. # If you have such setup and experience that certain clients
  3106. # sporadically hang or never complete requests set this to on.
  3107. #
  3108. #Default:
  3109. # httpd_accel_no_pmtu_disc off
  3110.  
  3111.  
  3112. # DELAY POOL PARAMETERS
  3113. # -----------------------------------------------------------------------------
  3114.  
  3115. # TAG: delay_pools
  3116. # This represents the number of delay pools to be used. For example,
  3117. # if you have one class 2 delay pool and one class 3 delays pool, you
  3118. # have a total of 2 delay pools.
  3119. #
  3120. #Default:
  3121. # delay_pools 0
  3122.  
  3123. # TAG: delay_class
  3124. # This defines the class of each delay pool. There must be exactly one
  3125. # delay_class line for each delay pool. For example, to define two
  3126. # delay pools, one of class 2 and one of class 3, the settings above
  3127. # and here would be:
  3128. #
  3129. #Example:
  3130. # delay_pools 2 # 2 delay pools
  3131. # delay_class 1 2 # pool 1 is a class 2 pool
  3132. # delay_class 2 3 # pool 2 is a class 3 pool
  3133. #
  3134. # The delay pool classes are:
  3135. #
  3136. # class 1 Everything is limited by a single aggregate
  3137. # bucket.
  3138. #
  3139. # class 2 Everything is limited by a single aggregate
  3140. # bucket as well as an "individual" bucket chosen
  3141. # from bits 25 through 32 of the IP address.
  3142. #
  3143. # class 3 Everything is limited by a single aggregate
  3144. # bucket as well as a "network" bucket chosen
  3145. # from bits 17 through 24 of the IP address and a
  3146. # "individual" bucket chosen from bits 17 through
  3147. # 32 of the IP address.
  3148. #
  3149. # NOTE: If an IP address is a.b.c.d
  3150. # -> bits 25 through 32 are "d"
  3151. # -> bits 17 through 24 are "c"
  3152. # -> bits 17 through 32 are "c * 256 + d"
  3153. #
  3154. #Default:
  3155. # none
  3156.  
  3157. # TAG: delay_access
  3158. # This is used to determine which delay pool a request falls into.
  3159. #
  3160. # delay_access is sorted per pool and the matching starts with pool 1,
  3161. # then pool 2, ..., and finally pool N. The first delay pool where the
  3162. # request is allowed is selected for the request. If it does not allow
  3163. # the request to any pool then the request is not delayed (default).
  3164. #
  3165. # For example, if you want some_big_clients in delay
  3166. # pool 1 and lotsa_little_clients in delay pool 2:
  3167. #
  3168. #Example:
  3169. # delay_access 1 allow some_big_clients
  3170. # delay_access 1 deny all
  3171. # delay_access 2 allow lotsa_little_clients
  3172. # delay_access 2 deny all
  3173. #
  3174. #Default:
  3175. # none
  3176.  
  3177. # TAG: delay_parameters
  3178. # This defines the parameters for a delay pool. Each delay pool has
  3179. # a number of "buckets" associated with it, as explained in the
  3180. # description of delay_class. For a class 1 delay pool, the syntax is:
  3181. #
  3182. #delay_parameters pool aggregate
  3183. #
  3184. # For a class 2 delay pool:
  3185. #
  3186. #delay_parameters pool aggregate individual
  3187. #
  3188. # For a class 3 delay pool:
  3189. #
  3190. #delay_parameters pool aggregate network individual
  3191. #
  3192. # The variables here are:
  3193. #
  3194. # pool a pool number - ie, a number between 1 and the
  3195. # number specified in delay_pools as used in
  3196. # delay_class lines.
  3197. #
  3198. # aggregate the "delay parameters" for the aggregate bucket
  3199. # (class 1, 2, 3).
  3200. #
  3201. # individual the "delay parameters" for the individual
  3202. # buckets (class 2, 3).
  3203. #
  3204. # network the "delay parameters" for the network buckets
  3205. # (class 3).
  3206. #
  3207. # A pair of delay parameters is written restore/maximum, where restore is
  3208. # the number of bytes (not bits - modem and network speeds are usually
  3209. # quoted in bits) per second placed into the bucket, and maximum is the
  3210. # maximum number of bytes which can be in the bucket at any time.
  3211. #
  3212. # For example, if delay pool number 1 is a class 2 delay pool as in the
  3213. # above example, and is being used to strictly limit each host to 64kbps
  3214. # (plus overheads), with no overall limit, the line is:
  3215. #
  3216. #delay_parameters 1 -1/-1 8000/8000
  3217. #
  3218. # Note that the figure -1 is used to represent "unlimited".
  3219. #
  3220. # And, if delay pool number 2 is a class 3 delay pool as in the above
  3221. # example, and you want to limit it to a total of 256kbps (strict limit)
  3222. # with each 8-bit network permitted 64kbps (strict limit) and each
  3223. # individual host permitted 4800bps with a bucket maximum size of 64kb
  3224. # to permit a decent web page to be downloaded at a decent speed
  3225. # (if the network is not being limited due to overuse) but slow down
  3226. # large downloads more significantly:
  3227. #
  3228. #delay_parameters 2 32000/32000 8000/8000 600/8000
  3229. #
  3230. # There must be one delay_parameters line for each delay pool.
  3231. #
  3232. #Default:
  3233. # none
  3234.  
  3235. # TAG: delay_initial_bucket_level (percent, 0-100)
  3236. # The initial bucket percentage is used to determine how much is put
  3237. # in each bucket when squid starts, is reconfigured, or first notices
  3238. # a host accessing it (in class 2 and class 3, individual hosts and
  3239. # networks only have buckets associated with them once they have been
  3240. # "seen" by squid).
  3241. #
  3242. #Default:
  3243. # delay_initial_bucket_level 50
  3244.  
  3245.  
  3246. # WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
  3247. # -----------------------------------------------------------------------------
  3248.  
  3249. # TAG: wccp_router
  3250. # TAG: wccp2_router
  3251. # Use this option to define your WCCP ``home'' router for
  3252. # Squid.
  3253. #
  3254. # wccp_router supports a single WCCP(v1) router
  3255. #
  3256. # wccp2_router supports multiple WCCPv2 routers
  3257. #
  3258. # only one of the two may be used at the same time and defines
  3259. # which version of WCCP to use.
  3260. #
  3261. #Default:
  3262. # wccp_router 0.0.0.0
  3263.  
  3264. # TAG: wccp_version
  3265. # This directive is only relevant if you need to set up WCCP(v1)
  3266. # to some very old and end-of-life Cisco routers. In all other
  3267. # setups it must be left unset or at the default setting.
  3268. # It defines an internal version in the WCCP(v1) protocol,
  3269. # with version 4 being the officially documented protocol.
  3270. #
  3271. # According to some users, Cisco IOS 11.2 and earlier only
  3272. # support WCCP version 3. If you're using that or an earlier
  3273. # version of IOS, you may need to change this value to 3, otherwise
  3274. # do not specify this parameter.
  3275. #
  3276. #Default:
  3277. # wccp_version 4
  3278.  
  3279. # TAG: wccp2_rebuild_wait
  3280. # If this is enabled Squid will wait for the cache dir rebuild to finish
  3281. # before sending the first wccp2 HereIAm packet
  3282. #
  3283. #Default:
  3284. # wccp2_rebuild_wait on
  3285.  
  3286. # TAG: wccp2_forwarding_method
  3287. # WCCP2 allows the setting of forwarding methods between the
  3288. # router/switch and the cache. Valid values are as follows:
  3289. #
  3290. # 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3291. # 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3292. #
  3293. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3294. # Cisco switches only support the L2 redirect assignment method.
  3295. #
  3296. #Default:
  3297. # wccp2_forwarding_method 1
  3298.  
  3299. # TAG: wccp2_return_method
  3300. # WCCP2 allows the setting of return methods between the
  3301. # router/switch and the cache for packets that the cache
  3302. # decides not to handle. Valid values are as follows:
  3303. #
  3304. # 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
  3305. # 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
  3306. #
  3307. # Currently (as of IOS 12.4) cisco routers only support GRE.
  3308. # Cisco switches only support the L2 redirect assignment.
  3309. #
  3310. # If the "ip wccp redirect exclude in" command has been
  3311. # enabled on the cache interface, then it is still safe for
  3312. # the proxy server to use a l2 redirect method even if this
  3313. # option is set to GRE.
  3314. #
  3315. #Default:
  3316. # wccp2_return_method 1
  3317.  
  3318. # TAG: wccp2_assignment_method
  3319. # WCCP2 allows the setting of methods to assign the WCCP hash
  3320. # Valid values are as follows:
  3321. #
  3322. # 1 - Hash assignment
  3323. # 2 - Mask assignment
  3324. #
  3325. # As a general rule, cisco routers support the hash assignment method
  3326. # and cisco switches support the mask assignment method.
  3327. #
  3328. #Default:
  3329. # wccp2_assignment_method 1
  3330.  
  3331. # TAG: wccp2_service
  3332. # WCCP2 allows for multiple traffic services. There are two
  3333. # types: "standard" and "dynamic". The standard type defines
  3334. # one service id - http (id 0). The dynamic service ids can be from
  3335. # 51 to 255 inclusive. In order to use a dynamic service id
  3336. # one must define the type of traffic to be redirected; this is done
  3337. # using the wccp2_service_info option.
  3338. #
  3339. # The "standard" type does not require a wccp2_service_info option,
  3340. # just specifying the service id will suffice.
  3341. #
  3342. # MD5 service authentication can be enabled by adding
  3343. # "password=<password>" to the end of this service declaration.
  3344. #
  3345. # Examples:
  3346. #
  3347. # wccp2_service standard 0 # for the 'web-cache' standard service
  3348. # wccp2_service dynamic 80 # a dynamic service type which will be
  3349. # # fleshed out with subsequent options.
  3350. # wccp2_service standard 0 password=foo
  3351. #
  3352. #
  3353. #Default:
  3354. # wccp2_service standard 0
  3355.  
  3356. # TAG: wccp2_service_info
  3357. # Dynamic WCCPv2 services require further information to define the
  3358. # traffic you wish to have diverted.
  3359. #
  3360. # The format is:
  3361. #
  3362. # wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
  3363. # priority=<priority> ports=<port>,<port>..
  3364. #
  3365. # The relevant WCCPv2 flags:
  3366. # + src_ip_hash, dst_ip_hash
  3367. # + source_port_hash, dst_port_hash
  3368. # + src_ip_alt_hash, dst_ip_alt_hash
  3369. # + src_port_alt_hash, dst_port_alt_hash
  3370. # + ports_source
  3371. #
  3372. # The port list can be one to eight entries.
  3373. #
  3374. # Example:
  3375. #
  3376. # wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
  3377. # priority=240 ports=80
  3378. #
  3379. # Note: the service id must have been defined by a previous
  3380. # 'wccp2_service dynamic <id>' entry.
  3381. #
  3382. #Default:
  3383. # none
  3384.  
  3385. # TAG: wccp2_weight
  3386. # Each cache server gets assigned a set of the destination
  3387. # hash proportional to their weight.
  3388. #
  3389. #Default:
  3390. # wccp2_weight 10000
  3391.  
  3392. # TAG: wccp_address
  3393. # TAG: wccp2_address
  3394. # Use this option if you require WCCP to use a specific
  3395. # interface address.
  3396. #
  3397. # The default behavior is to not bind to any specific address.
  3398. #
  3399. #Default:
  3400. # wccp_address 0.0.0.0
  3401. # wccp2_address 0.0.0.0
  3402.  
  3403.  
  3404. # PERSISTENT CONNECTION HANDLING
  3405. # -----------------------------------------------------------------------------
  3406. #
  3407. # Also see "pconn_timeout" in the TIMEOUTS section
  3408.  
  3409. # TAG: client_persistent_connections
  3410. # TAG: server_persistent_connections
  3411. # Persistent connection support for clients and servers. By
  3412. # default, Squid uses persistent connections (when allowed)
  3413. # with its clients and servers. You can use these options to
  3414. # disable persistent connections with clients and/or servers.
  3415. #
  3416. #Default:
  3417. # client_persistent_connections on
  3418. # server_persistent_connections on
  3419.  
  3420. # TAG: persistent_connection_after_error
  3421. # With this directive the use of persistent connections after
  3422. # HTTP errors can be disabled. Useful if you have clients
  3423. # who fail to handle errors on persistent connections proper.
  3424. #
  3425. #Default:
  3426. # persistent_connection_after_error off
  3427.  
  3428. # TAG: detect_broken_pconn
  3429. # Some servers have been found to incorrectly signal the use
  3430. # of HTTP/1.0 persistent connections even on replies not
  3431. # compatible, causing significant delays. This server problem
  3432. # has mostly been seen on redirects.
  3433. #
  3434. # By enabling this directive Squid attempts to detect such
  3435. # broken replies and automatically assume the reply is finished
  3436. # after 10 seconds timeout.
  3437. #
  3438. #Default:
  3439. # detect_broken_pconn off
  3440.  
  3441.  
  3442. # CACHE DIGEST OPTIONS
  3443. # -----------------------------------------------------------------------------
  3444.  
  3445. # TAG: digest_generation
  3446. # This controls whether the server will generate a Cache Digest
  3447. # of its contents.
  3448. #
  3449. #Default:
  3450. # digest_generation on
  3451.  
  3452. # TAG: digest_bits_per_entry
  3453. # This is the number of bits of the server's Cache Digest which
  3454. # will be associated with the Digest entry for a given HTTP
  3455. # Method and URL (public key) combination. The default is 5.
  3456. #
  3457. #Default:
  3458. # digest_bits_per_entry 5
  3459.  
  3460. # TAG: digest_rebuild_period (seconds)
  3461. # This is the wait time between Cache Digest rebuilds.
  3462. #
  3463. #Default:
  3464. # digest_rebuild_period 1 hour
  3465.  
  3466. # TAG: digest_rewrite_period (seconds)
  3467. # This is the wait time between Cache Digest writes to disk.
  3468. #
  3469. #Default:
  3470. # digest_rewrite_period 1 hour
  3471.  
  3472. # TAG: digest_swapout_chunk_size (bytes)
  3473. # This is the number of bytes of the Cache Digest to write to
  3474. # disk at a time. It defaults to 4096 bytes (4KB), the Squid
  3475. # default swap page.
  3476. #
  3477. #Default:
  3478. # digest_swapout_chunk_size 4096 bytes
  3479.  
  3480. # TAG: digest_rebuild_chunk_percentage (percent, 0-100)
  3481. # This is the percentage of the Cache Digest to be scanned at a
  3482. # time. By default it is set to 10% of the Cache Digest.
  3483. #
  3484. #Default:
  3485. # digest_rebuild_chunk_percentage 10
  3486.  
  3487.  
  3488. # SNMP OPTIONS
  3489. # -----------------------------------------------------------------------------
  3490.  
  3491. # TAG: snmp_port
  3492. # Squid can now serve statistics and status information via SNMP.
  3493. # By default it listens to port 3401 on the machine. If you don't
  3494. # wish to use SNMP, set this to "0".
  3495. # A value of "0" disables SNMP support. If you wish to use SNMP,
  3496. # set this to "3401" to use the normal SNMP support.
  3497. #
  3498. #Default:
  3499. # snmp_port 0
  3500.  
  3501. # TAG: snmp_access
  3502. # Allowing or denying access to the SNMP port.
  3503. #
  3504. # All access to the agent is denied by default.
  3505. # usage:
  3506. #
  3507. # snmp_access allow|deny [!]aclname ...
  3508. #
  3509. #Example:
  3510. # snmp_access allow snmppublic localhost
  3511. # snmp_access deny all
  3512. #
  3513. #Default:
  3514. # snmp_access deny all
  3515.  
  3516. # TAG: snmp_incoming_address
  3517. # TAG: snmp_outgoing_address
  3518. # Just like 'udp_incoming_address' above, but for the SNMP port.
  3519. #
  3520. # snmp_incoming_address is used for the SNMP socket receiving
  3521. # messages from SNMP agents.
  3522. # snmp_outgoing_address is used for SNMP packets returned to SNMP
  3523. # agents.
  3524. #
  3525. # The default snmp_incoming_address (0.0.0.0) is to listen on all
  3526. # available network interfaces.
  3527. #
  3528. # If snmp_outgoing_address is set to 255.255.255.255 (the default)
  3529. # it will use the same socket as snmp_incoming_address. Only
  3530. # change this if you want to have SNMP replies sent using another
  3531. # address than where this Squid listens for SNMP queries.
  3532. #
  3533. # NOTE, snmp_incoming_address and snmp_outgoing_address can not have
  3534. # the same value since they both use port 3401.
  3535. #
  3536. #Default:
  3537. # snmp_incoming_address 0.0.0.0
  3538. # snmp_outgoing_address 255.255.255.255
  3539.  
  3540.  
  3541. # ICP OPTIONS
  3542. # -----------------------------------------------------------------------------
  3543.  
  3544. # TAG: icp_port
  3545. # The port number where Squid sends and receives ICP queries to
  3546. # and from neighbor caches. Default is 3130. To disable use
  3547. # "0". May be overridden with -u on the command line.
  3548. #
  3549. #Default:
  3550. # icp_port 3130
  3551.  
  3552. # TAG: htcp_port
  3553. # Note: This option is only available if Squid is rebuilt with the
  3554. # --enable-htcp option
  3555. #
  3556. # The port number where Squid sends and receives HTCP queries to
  3557. # and from neighbor caches. Default is 4827. To disable use
  3558. # "0".
  3559. #
  3560. #Default:
  3561. # htcp_port 4827
  3562.  
  3563. # TAG: log_icp_queries on|off
  3564. # If set, ICP queries are logged to access.log. You may wish
  3565. # do disable this if your ICP load is VERY high to speed things
  3566. # up or to simplify log analysis.
  3567. #
  3568. #Default:
  3569. # log_icp_queries on
  3570.  
  3571. # TAG: udp_incoming_address
  3572. # udp_incoming_address is used for UDP packets received from other
  3573. # caches.
  3574. #
  3575. # The default behavior is to not bind to any specific address.
  3576. #
  3577. # Only change this if you want to have all UDP queries received on
  3578. # a specific interface/address.
  3579. #
  3580. # NOTE: udp_incoming_address is used by the ICP, HTCP, and DNS
  3581. # modules. Altering it will affect all of them in the same manner.
  3582. #
  3583. # see also; udp_outgoing_address
  3584. #
  3585. # NOTE, udp_incoming_address and udp_outgoing_address can not
  3586. # have the same value since they both use the same port.
  3587. #
  3588. #Default:
  3589. # udp_incoming_address 0.0.0.0
  3590.  
  3591. # TAG: udp_outgoing_address
  3592. # udp_outgoing_address is used for UDP packets sent out to other
  3593. # caches.
  3594. #
  3595. # The default behavior is to not bind to any specific address.
  3596. #
  3597. # Instead it will use the same socket as udp_incoming_address.
  3598. # Only change this if you want to have UDP queries sent using another
  3599. # address than where this Squid listens for UDP queries from other
  3600. # caches.
  3601. #
  3602. # NOTE: udp_outgoing_address is used by the ICP, HTCP, and DNS
  3603. # modules. Altering it will affect all of them in the same manner.
  3604. #
  3605. # see also; udp_incoming_address
  3606. #
  3607. # NOTE, udp_incoming_address and udp_outgoing_address can not
  3608. # have the same value since they both use the same port.
  3609. #
  3610. #Default:
  3611. # udp_outgoing_address 255.255.255.255
  3612.  
  3613. # TAG: icp_hit_stale on|off
  3614. # If you want to return ICP_HIT for stale cache objects, set this
  3615. # option to 'on'. If you have sibling relationships with caches
  3616. # in other administrative domains, this should be 'off'. If you only
  3617. # have sibling relationships with caches under your control,
  3618. # it is probably okay to set this to 'on'.
  3619. # If set to 'on', your siblings should use the option "allow-miss"
  3620. # on their cache_peer lines for connecting to you.
  3621. #
  3622. #Default:
  3623. # icp_hit_stale off
  3624.  
  3625. # TAG: minimum_direct_hops
  3626. # If using the ICMP pinging stuff, do direct fetches for sites
  3627. # which are no more than this many hops away.
  3628. #
  3629. #Default:
  3630. # minimum_direct_hops 4
  3631.  
  3632. # TAG: minimum_direct_rtt
  3633. # If using the ICMP pinging stuff, do direct fetches for sites
  3634. # which are no more than this many rtt milliseconds away.
  3635. #
  3636. #Default:
  3637. # minimum_direct_rtt 400
  3638.  
  3639. # TAG: netdb_low
  3640. # TAG: netdb_high
  3641. # The low and high water marks for the ICMP measurement
  3642. # database. These are counts, not percents. The defaults are
  3643. # 900 and 1000. When the high water mark is reached, database
  3644. # entries will be deleted until the low mark is reached.
  3645. #
  3646. #Default:
  3647. # netdb_low 900
  3648. # netdb_high 1000
  3649.  
  3650. # TAG: netdb_ping_period
  3651. # The minimum period for measuring a site. There will be at
  3652. # least this much delay between successive pings to the same
  3653. # network. The default is five minutes.
  3654. #
  3655. #Default:
  3656. # netdb_ping_period 5 minutes
  3657.  
  3658. # TAG: query_icmp on|off
  3659. # If you want to ask your peers to include ICMP data in their ICP
  3660. # replies, enable this option.
  3661. #
  3662. # If your peer has configured Squid (during compilation) with
  3663. # '--enable-icmp' that peer will send ICMP pings to origin server
  3664. # sites of the URLs it receives. If you enable this option the
  3665. # ICP replies from that peer will include the ICMP data (if available).
  3666. # Then, when choosing a parent cache, Squid will choose the parent with
  3667. # the minimal RTT to the origin server. When this happens, the
  3668. # hierarchy field of the access.log will be
  3669. # "CLOSEST_PARENT_MISS". This option is off by default.
  3670. #
  3671. #Default:
  3672. # query_icmp off
  3673.  
  3674. # TAG: test_reachability on|off
  3675. # When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
  3676. # instead of ICP_MISS if the target host is NOT in the ICMP
  3677. # database, or has a zero RTT.
  3678. #
  3679. #Default:
  3680. # test_reachability off
  3681.  
  3682. # TAG: icp_query_timeout (msec)
  3683. # Normally Squid will automatically determine an optimal ICP
  3684. # query timeout value based on the round-trip-time of recent ICP
  3685. # queries. If you want to override the value determined by
  3686. # Squid, set this 'icp_query_timeout' to a non-zero value. This
  3687. # value is specified in MILLISECONDS, so, to use a 2-second
  3688. # timeout (the old default), you would write:
  3689. #
  3690. # icp_query_timeout 2000
  3691. #
  3692. #Default:
  3693. # icp_query_timeout 0
  3694.  
  3695. # TAG: maximum_icp_query_timeout (msec)
  3696. # Normally the ICP query timeout is determined dynamically. But
  3697. # sometimes it can lead to very large values (say 5 seconds).
  3698. # Use this option to put an upper limit on the dynamic timeout
  3699. # value. Do NOT use this option to always use a fixed (instead
  3700. # of a dynamic) timeout value. To set a fixed timeout see the
  3701. # 'icp_query_timeout' directive.
  3702. #
  3703. #Default:
  3704. # maximum_icp_query_timeout 2000
  3705.  
  3706. # TAG: minimum_icp_query_timeout (msec)
  3707. # Normally the ICP query timeout is determined dynamically. But
  3708. # sometimes it can lead to very small timeouts, even lower than
  3709. # the normal latency variance on your link due to traffic.
  3710. # Use this option to put an lower limit on the dynamic timeout
  3711. # value. Do NOT use this option to always use a fixed (instead
  3712. # of a dynamic) timeout value. To set a fixed timeout see the
  3713. # 'icp_query_timeout' directive.
  3714. #
  3715. #Default:
  3716. # minimum_icp_query_timeout 5
  3717.  
  3718.  
  3719. # MULTICAST ICP OPTIONS
  3720. # -----------------------------------------------------------------------------
  3721.  
  3722. # TAG: mcast_groups
  3723. # This tag specifies a list of multicast groups which your server
  3724. # should join to receive multicasted ICP queries.
  3725. #
  3726. # NOTE! Be very careful what you put here! Be sure you
  3727. # understand the difference between an ICP _query_ and an ICP
  3728. # _reply_. This option is to be set only if you want to RECEIVE
  3729. # multicast queries. Do NOT set this option to SEND multicast
  3730. # ICP (use cache_peer for that). ICP replies are always sent via
  3731. # unicast, so this option does not affect whether or not you will
  3732. # receive replies from multicast group members.
  3733. #
  3734. # You must be very careful to NOT use a multicast address which
  3735. # is already in use by another group of caches.
  3736. #
  3737. # If you are unsure about multicast, please read the Multicast
  3738. # chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
  3739. #
  3740. # Usage: mcast_groups 239.128.16.128 224.0.1.20
  3741. #
  3742. # By default, Squid doesn't listen on any multicast groups.
  3743. #
  3744. #Default:
  3745. # none
  3746.  
  3747. # TAG: mcast_miss_addr
  3748. # Note: This option is only available if Squid is rebuilt with the
  3749. # --enable-multicast-miss option
  3750. #
  3751. # If you enable this option, every "cache miss" URL will
  3752. # be sent out on the specified multicast address.
  3753. #
  3754. # Do not enable this option unless you are are absolutely
  3755. # certain you understand what you are doing.
  3756. #
  3757. #Default:
  3758. # mcast_miss_addr 255.255.255.255
  3759.  
  3760. # TAG: mcast_miss_ttl
  3761. # Note: This option is only available if Squid is rebuilt with the
  3762. # --enable-multicast-miss option
  3763. #
  3764. # This is the time-to-live value for packets multicasted
  3765. # when multicasting off cache miss URLs is enabled. By
  3766. # default this is set to 'site scope', i.e. 16.
  3767. #
  3768. #Default:
  3769. # mcast_miss_ttl 16
  3770.  
  3771. # TAG: mcast_miss_port
  3772. # Note: This option is only available if Squid is rebuilt with the
  3773. # --enable-multicast-miss option
  3774. #
  3775. # This is the port number to be used in conjunction with
  3776. # 'mcast_miss_addr'.
  3777. #
  3778. #Default:
  3779. # mcast_miss_port 3135
  3780.  
  3781. # TAG: mcast_miss_encode_key
  3782. # Note: This option is only available if Squid is rebuilt with the
  3783. # --enable-multicast-miss option
  3784. #
  3785. # The URLs that are sent in the multicast miss stream are
  3786. # encrypted. This is the encryption key.
  3787. #
  3788. #Default:
  3789. # mcast_miss_encode_key XXXXXXXXXXXXXXXX
  3790.  
  3791. # TAG: mcast_icp_query_timeout (msec)
  3792. # For multicast peers, Squid regularly sends out ICP "probes" to
  3793. # count how many other peers are listening on the given multicast
  3794. # address. This value specifies how long Squid should wait to
  3795. # count all the replies. The default is 2000 msec, or 2
  3796. # seconds.
  3797. #
  3798. #Default:
  3799. # mcast_icp_query_timeout 2000
  3800.  
  3801.  
  3802. # INTERNAL ICON OPTIONS
  3803. # -----------------------------------------------------------------------------
  3804.  
  3805. # TAG: icon_directory
  3806. # Where the icons are stored. These are normally kept in
  3807. # /usr/share/squid/icons
  3808. #
  3809. #Default:
  3810. # icon_directory /usr/share/squid/icons
  3811.  
  3812. # TAG: global_internal_static
  3813. # This directive controls is Squid should intercept all requests for
  3814. # /squid-internal-static/ no matter which host the URL is requesting
  3815. # (default on setting), or if nothing special should be done for
  3816. # such URLs (off setting). The purpose of this directive is to make
  3817. # icons etc work better in complex cache hierarchies where it may
  3818. # not always be possible for all corners in the cache mesh to reach
  3819. # the server generating a directory listing.
  3820. #
  3821. #Default:
  3822. # global_internal_static on
  3823.  
  3824. # TAG: short_icon_urls
  3825. # If this is enabled Squid will use short URLs for icons.
  3826. #
  3827. # If off the URLs for icons will always be absolute URLs
  3828. # including the proxy name and port.
  3829. #
  3830. #Default:
  3831. # short_icon_urls off
  3832.  
  3833.  
  3834. # ERROR PAGE OPTIONS
  3835. # -----------------------------------------------------------------------------
  3836.  
  3837. # TAG: error_directory
  3838. # If you wish to create your own versions of the default
  3839. # (English) error files, either to customize them to suit your
  3840. # language or company copy the template English files to another
  3841. # Directory where the error files are read from.
  3842. # /usr/lib/squid/errors contains sets of error files
  3843. # in different languages. The default error directory
  3844. # is /etc/squid/errors, which is a link to one of these
  3845. # error sets.
  3846. #
  3847. # If you wish to create your own versions of the error files,
  3848. # either to customize them to suit your language or company,
  3849. # copy the template English files to another
  3850. # directory and point this tag at them.
  3851. #
  3852. #error_directory /usr/share/squid/errors/English
  3853. #
  3854. #Default:
  3855. # error_directory /usr/share/squid/errors/English
  3856.  
  3857. # TAG: error_map
  3858. # Map errors to custom messages
  3859. #
  3860. # error_map message_url http_status ...
  3861. #
  3862. # http_status ... is a list of HTTP status codes or Squid error
  3863. # messages.
  3864. #
  3865. # Use in accelerators to substitute the error messages returned
  3866. # by servers with other custom errors.
  3867. #
  3868. # error_map http://your.server/error/404.shtml 404
  3869. #
  3870. # Requests for error messages is a GET request for the configured
  3871. # URL with the following special headers
  3872. #
  3873. # X-Error-Status: The received HTTP status code (i.e. 404)
  3874. # X-Request-URI: The requested URI where the error occurred
  3875. #
  3876. # In Addition the following headers are forwarded from the client
  3877. # request:
  3878. #
  3879. # User-Agent, Cookie, X-Forwarded-For, Via, Authorization,
  3880. # Accept, Referer
  3881. #
  3882. # And the following headers from the server reply:
  3883. #
  3884. # Server, Via, Location, Content-Location
  3885. #
  3886. # The reply returned to the client will carry the original HTTP
  3887. # headers from the real error message, but with the reply body
  3888. # of the configured error message.
  3889. #
  3890. #
  3891. #Default:
  3892. # none
  3893.  
  3894. # TAG: err_html_text
  3895. # HTML text to include in error messages. Make this a "mailto"
  3896. # URL to your admin address, or maybe just a link to your
  3897. # organizations Web page.
  3898. #
  3899. # To include this in your error messages, you must rewrite
  3900. # the error template files (found in the "errors" directory).
  3901. # Wherever you want the 'err_html_text' line to appear,
  3902. # insert a %L tag in the error template file.
  3903. #
  3904. #Default:
  3905. # none
  3906.  
  3907. # TAG: deny_info
  3908. # Usage: deny_info err_page_name acl
  3909. # or deny_info http://... acl
  3910. # Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
  3911. #
  3912. # This can be used to return a ERR_ page for requests which
  3913. # do not pass the 'http_access' rules. Squid remembers the last
  3914. # acl it evaluated in http_access, and if a 'deny_info' line exists
  3915. # for that ACL Squid returns a corresponding error page.
  3916. #
  3917. # The acl is typically the last acl on the http_access deny line which
  3918. # denied access. The exceptions to this rule are:
  3919. # - When Squid needs to request authentication credentials. It's then
  3920. # the first authentication related acl encountered
  3921. # - When none of the http_access lines matches. It's then the last
  3922. # acl processed on the last http_access line.
  3923. #
  3924. # You may use ERR_ pages that come with Squid or create your own pages
  3925. # and put them into the configured errors/ directory.
  3926. #
  3927. # Alternatively you can specify an error URL. The browsers will
  3928. # get redirected (302) to the specified URL. %s in the redirection
  3929. # URL will be replaced by the requested URL.
  3930. #
  3931. # Alternatively you can tell Squid to reset the TCP connection
  3932. # by specifying TCP_RESET.
  3933. #
  3934. #Default:
  3935. # none
  3936.  
  3937.  
  3938. # OPTIONS INFLUENCING REQUEST FORWARDING
  3939. # -----------------------------------------------------------------------------
  3940.  
  3941. # TAG: nonhierarchical_direct
  3942. # By default, Squid will send any non-hierarchical requests
  3943. # (matching hierarchy_stoplist or not cacheable request type) direct
  3944. # to origin servers.
  3945. #
  3946. # If you set this to off, Squid will prefer to send these
  3947. # requests to parents.
  3948. #
  3949. # Note that in most configurations, by turning this off you will only
  3950. # add latency to these request without any improvement in global hit
  3951. # ratio.
  3952. #
  3953. # If you are inside an firewall see never_direct instead of
  3954. # this directive.
  3955. #
  3956. #Default:
  3957. # nonhierarchical_direct on
  3958.  
  3959. # TAG: prefer_direct
  3960. # Normally Squid tries to use parents for most requests. If you for some
  3961. # reason like it to first try going direct and only use a parent if
  3962. # going direct fails set this to on.
  3963. #
  3964. # By combining nonhierarchical_direct off and prefer_direct on you
  3965. # can set up Squid to use a parent as a backup path if going direct
  3966. # fails.
  3967. #
  3968. # Note: If you want Squid to use parents for all requests see
  3969. # the never_direct directive. prefer_direct only modifies how Squid
  3970. # acts on cacheable requests.
  3971. #
  3972. #Default:
  3973. # prefer_direct off
  3974.  
  3975. # TAG: always_direct
  3976. # Usage: always_direct allow|deny [!]aclname ...
  3977. #
  3978. # Here you can use ACL elements to specify requests which should
  3979. # ALWAYS be forwarded by Squid to the origin servers without using
  3980. # any peers. For example, to always directly forward requests for
  3981. # local servers ignoring any parents or siblings you may have use
  3982. # something like:
  3983. #
  3984. # acl local-servers dstdomain my.domain.net
  3985. # always_direct allow local-servers
  3986. #
  3987. # To always forward FTP requests directly, use
  3988. #
  3989. # acl FTP proto FTP
  3990. # always_direct allow FTP
  3991. #
  3992. # NOTE: There is a similar, but opposite option named
  3993. # 'never_direct'. You need to be aware that "always_direct deny
  3994. # foo" is NOT the same thing as "never_direct allow foo". You
  3995. # may need to use a deny rule to exclude a more-specific case of
  3996. # some other rule. Example:
  3997. #
  3998. # acl local-external dstdomain external.foo.net
  3999. # acl local-servers dstdomain .foo.net
  4000. # always_direct deny local-external
  4001. # always_direct allow local-servers
  4002. #
  4003. # NOTE: If your goal is to make the client forward the request
  4004. # directly to the origin server bypassing Squid then this needs
  4005. # to be done in the client configuration. Squid configuration
  4006. # can only tell Squid how Squid should fetch the object.
  4007. #
  4008. # NOTE: This directive is not related to caching. The replies
  4009. # is cached as usual even if you use always_direct. To not cache
  4010. # the replies see no_cache.
  4011. #
  4012. # This option replaces some v1.1 options such as local_domain
  4013. # and local_ip.
  4014. #
  4015. #Default:
  4016. # none
  4017.  
  4018. # TAG: never_direct
  4019. # Usage: never_direct allow|deny [!]aclname ...
  4020. #
  4021. # never_direct is the opposite of always_direct. Please read
  4022. # the description for always_direct if you have not already.
  4023. #
  4024. # With 'never_direct' you can use ACL elements to specify
  4025. # requests which should NEVER be forwarded directly to origin
  4026. # servers. For example, to force the use of a proxy for all
  4027. # requests, except those in your local domain use something like:
  4028. #
  4029. # acl local-servers dstdomain .foo.net
  4030. # acl all src 0.0.0.0/0.0.0.0
  4031. # never_direct deny local-servers
  4032. # never_direct allow all
  4033. #
  4034. # or if Squid is inside a firewall and there are local intranet
  4035. # servers inside the firewall use something like:
  4036. #
  4037. # acl local-intranet dstdomain .foo.net
  4038. # acl local-external dstdomain external.foo.net
  4039. # always_direct deny local-external
  4040. # always_direct allow local-intranet
  4041. # never_direct allow all
  4042. #
  4043. # This option replaces some v1.1 options such as inside_firewall
  4044. # and firewall_ip.
  4045. #
  4046. #Default:
  4047. # none
  4048.  
  4049.  
  4050. # ADVANCED NETWORKING OPTIONS
  4051. # -----------------------------------------------------------------------------
  4052.  
  4053. # TAG: incoming_icp_average
  4054. # TAG: incoming_http_average
  4055. # TAG: incoming_dns_average
  4056. # TAG: min_icp_poll_cnt
  4057. # TAG: min_dns_poll_cnt
  4058. # TAG: min_http_poll_cnt
  4059. # Heavy voodoo here. I can't even believe you are reading this.
  4060. # Are you crazy? Don't even think about adjusting these unless
  4061. # you understand the algorithms in comm_select.c first!
  4062. #
  4063. #Default:
  4064. # incoming_icp_average 6
  4065. # incoming_http_average 4
  4066. # incoming_dns_average 4
  4067. # min_icp_poll_cnt 8
  4068. # min_dns_poll_cnt 8
  4069. # min_http_poll_cnt 8
  4070.  
  4071. # TAG: tcp_recv_bufsize (bytes)
  4072. # Size of receive buffer to set for TCP sockets. Probably just
  4073. # as easy to change your kernel's default. Set to zero to use
  4074. # the default buffer size.
  4075. #
  4076. #Default:
  4077. # tcp_recv_bufsize 0 bytes
  4078.  
  4079.  
  4080. # DNS OPTIONS
  4081. # -----------------------------------------------------------------------------
  4082.  
  4083. # TAG: check_hostnames
  4084. # For security and stability reasons Squid by default checks
  4085. # hostnames for Internet standard RFC compliance. If you do not want
  4086. # Squid to perform these checks then turn this directive off.
  4087. #
  4088. #Default:
  4089. # check_hostnames on
  4090.  
  4091. # TAG: allow_underscore
  4092. # Underscore characters is not strictly allowed in Internet hostnames
  4093. # but nevertheless used by many sites. Set this to off if you want
  4094. # Squid to be strict about the standard.
  4095. # This check is performed only when check_hostnames is set to on.
  4096. #
  4097. #Default:
  4098. # allow_underscore on
  4099.  
  4100. # TAG: cache_dns_program
  4101. # Note: This option is only available if Squid is rebuilt with the
  4102. # --disable-internal-dns option
  4103. #
  4104. # Specify the location of the executable for dnslookup process.
  4105. #
  4106. #Default:
  4107. # cache_dns_program /usr/lib/squid/dnsserver
  4108.  
  4109. # TAG: dns_children
  4110. # Note: This option is only available if Squid is rebuilt with the
  4111. # --disable-internal-dns option
  4112. #
  4113. # The number of processes spawn to service DNS name lookups.
  4114. # For heavily loaded caches on large servers, you should
  4115. # probably increase this value to at least 10. The maximum
  4116. # is 32. The default is 5.
  4117. #
  4118. # You must have at least one dnsserver process.
  4119. #
  4120. #Default:
  4121. # dns_children 5
  4122.  
  4123. # TAG: dns_retransmit_interval
  4124. # Initial retransmit interval for DNS queries. The interval is
  4125. # doubled each time all configured DNS servers have been tried.
  4126. #
  4127. #
  4128. #Default:
  4129. # dns_retransmit_interval 5 seconds
  4130.  
  4131. # TAG: dns_timeout
  4132. # DNS Query timeout. If no response is received to a DNS query
  4133. # within this time all DNS servers for the queried domain
  4134. # are assumed to be unavailable.
  4135. #
  4136. #Default:
  4137. # dns_timeout 2 minutes
  4138.  
  4139. # TAG: dns_defnames on|off
  4140. # Normally the RES_DEFNAMES resolver option is disabled
  4141. # (see res_init(3)). This prevents caches in a hierarchy
  4142. # from interpreting single-component hostnames locally. To allow
  4143. # Squid to handle single-component names, enable this option.
  4144. #
  4145. #Default:
  4146. # dns_defnames off
  4147.  
  4148. # TAG: dns_nameservers
  4149. # Use this if you want to specify a list of DNS name servers
  4150. # (IP addresses) to use instead of those given in your
  4151. # /etc/resolv.conf file.
  4152. # On Windows platforms, if no value is specified here or in
  4153. # the /etc/resolv.conf file, the list of DNS name servers are
  4154. # taken from the Windows registry, both static and dynamic DHCP
  4155. # configurations are supported.
  4156. #
  4157. # Example: dns_nameservers 10.0.0.1 192.172.0.4
  4158. #
  4159. #Default:
  4160. # none
  4161.  
  4162. # TAG: hosts_file
  4163. # Location of the host-local IP name-address associations
  4164. # database. Most Operating Systems have such a file on different
  4165. # default locations:
  4166. # - Un*X & Linux: /etc/hosts
  4167. # - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
  4168. # (%SystemRoot% value install default is c:\winnt)
  4169. # - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
  4170. # (%SystemRoot% value install default is c:\windows)
  4171. # - Windows 9x/Me: %windir%\hosts
  4172. # (%windir% value is usually c:\windows)
  4173. # - Cygwin: /etc/hosts
  4174. #
  4175. # The file contains newline-separated definitions, in the
  4176. # form ip_address_in_dotted_form name [name ...] names are
  4177. # whitespace-separated. Lines beginning with an hash (#)
  4178. # character are comments.
  4179. #
  4180. # The file is checked at startup and upon configuration.
  4181. # If set to 'none', it won't be checked.
  4182. # If append_domain is used, that domain will be added to
  4183. # domain-local (i.e. not containing any dot character) host
  4184. # definitions.
  4185. #
  4186. #Default:
  4187. # hosts_file /etc/hosts
  4188.  
  4189. # TAG: dns_testnames
  4190. # The DNS tests exit as soon as the first site is successfully looked up
  4191. #
  4192. # This test can be disabled with the -D command line option.
  4193. #
  4194. #Default:
  4195. # dns_testnames netscape.com internic.net nlanr.net microsoft.com
  4196.  
  4197. # TAG: append_domain
  4198. # Appends local domain name to hostnames without any dots in
  4199. # them. append_domain must begin with a period.
  4200. #
  4201. # Be warned there are now Internet names with no dots in
  4202. # them using only top-domain names, so setting this may
  4203. # cause some Internet sites to become unavailable.
  4204. #
  4205. #Example:
  4206. # append_domain .yourdomain.com
  4207. #
  4208. #Default:
  4209. # none
  4210.  
  4211. # TAG: ignore_unknown_nameservers
  4212. # By default Squid checks that DNS responses are received
  4213. # from the same IP addresses they are sent to. If they
  4214. # don't match, Squid ignores the response and writes a warning
  4215. # message to cache.log. You can allow responses from unknown
  4216. # nameservers by setting this option to 'off'.
  4217. #
  4218. #Default:
  4219. # ignore_unknown_nameservers on
  4220.  
  4221. # TAG: ipcache_size (number of entries)
  4222. # TAG: ipcache_low (percent)
  4223. # TAG: ipcache_high (percent)
  4224. # The size, low-, and high-water marks for the IP cache.
  4225. #
  4226. #Default:
  4227. # ipcache_size 1024
  4228. # ipcache_low 90
  4229. # ipcache_high 95
  4230.  
  4231. # TAG: fqdncache_size (number of entries)
  4232. # Maximum number of FQDN cache entries.
  4233. #
  4234. #Default:
  4235. # fqdncache_size 1024
  4236.  
  4237.  
  4238. # MISCELLANEOUS
  4239. # -----------------------------------------------------------------------------
  4240.  
  4241. # TAG: memory_pools on|off
  4242. # If set, Squid will keep pools of allocated (but unused) memory
  4243. # available for future use. If memory is a premium on your
  4244. # system and you believe your malloc library outperforms Squid
  4245. # routines, disable this.
  4246. #
  4247. #Default:
  4248. # memory_pools on
  4249.  
  4250. # TAG: memory_pools_limit (bytes)
  4251. # Used only with memory_pools on:
  4252. # memory_pools_limit 50 MB
  4253. #
  4254. # If set to a non-zero value, Squid will keep at most the specified
  4255. # limit of allocated (but unused) memory in memory pools. All free()
  4256. # requests that exceed this limit will be handled by your malloc
  4257. # library. Squid does not pre-allocate any memory, just safe-keeps
  4258. # objects that otherwise would be free()d. Thus, it is safe to set
  4259. # memory_pools_limit to a reasonably high value even if your
  4260. # configuration will use less memory.
  4261. #
  4262. # If set to zero, Squid will keep all memory it can. That is, there
  4263. # will be no limit on the total amount of memory used for safe-keeping.
  4264. #
  4265. # To disable memory allocation optimization, do not set
  4266. # memory_pools_limit to 0. Set memory_pools to "off" instead.
  4267. #
  4268. # An overhead for maintaining memory pools is not taken into account
  4269. # when the limit is checked. This overhead is close to four bytes per
  4270. # object kept. However, pools may actually _save_ memory because of
  4271. # reduced memory thrashing in your malloc library.
  4272. #
  4273. #Default:
  4274. # memory_pools_limit 5 MB
  4275.  
  4276. # TAG: forwarded_for on|off
  4277. # If set, Squid will include your system's IP address or name
  4278. # in the HTTP requests it forwards. By default it looks like
  4279. # this:
  4280. #
  4281. # X-Forwarded-For: 192.1.2.3
  4282. #
  4283. # If you disable this, it will appear as
  4284. #
  4285. # X-Forwarded-For: unknown
  4286. #
  4287. #Default:
  4288. # forwarded_for on
  4289.  
  4290. # TAG: cachemgr_passwd
  4291. # Specify passwords for cachemgr operations.
  4292. #
  4293. # Usage: cachemgr_passwd password action action ...
  4294. #
  4295. # Some valid actions are (see cache manager menu for a full list):
  4296. # 5min
  4297. # 60min
  4298. # asndb
  4299. # authenticator
  4300. # cbdata
  4301. # client_list
  4302. # comm_incoming
  4303. # config *
  4304. # counters
  4305. # delay
  4306. # digest_stats
  4307. # dns
  4308. # events
  4309. # filedescriptors
  4310. # fqdncache
  4311. # histograms
  4312. # http_headers
  4313. # info
  4314. # io
  4315. # ipcache
  4316. # mem
  4317. # menu
  4318. # netdb
  4319. # non_peers
  4320. # objects
  4321. # offline_toggle *
  4322. # pconn
  4323. # peer_select
  4324. # redirector
  4325. # refresh
  4326. # server_list
  4327. # shutdown *
  4328. # store_digest
  4329. # storedir
  4330. # utilization
  4331. # via_headers
  4332. # vm_objects
  4333. #
  4334. # * Indicates actions which will not be performed without a
  4335. # valid password, others can be performed if not listed here.
  4336. #
  4337. # To disable an action, set the password to "disable".
  4338. # To allow performing an action without a password, set the
  4339. # password to "none".
  4340. #
  4341. # Use the keyword "all" to set the same password for all actions.
  4342. #
  4343. #Example:
  4344. # cachemgr_passwd secret shutdown
  4345. # cachemgr_passwd lesssssssecret info stats/objects
  4346. # cachemgr_passwd disable all
  4347. #
  4348. #Default:
  4349. # none
  4350.  
  4351. # TAG: client_db on|off
  4352. # If you want to disable collecting per-client statistics,
  4353. # turn off client_db here.
  4354. #
  4355. #Default:
  4356. # client_db on
  4357.  
  4358. # TAG: reload_into_ims on|off
  4359. # When you enable this option, client no-cache or ``reload''
  4360. # requests will be changed to If-Modified-Since requests.
  4361. # Doing this VIOLATES the HTTP standard. Enabling this
  4362. # feature could make you liable for problems which it
  4363. # causes.
  4364. #
  4365. # see also refresh_pattern for a more selective approach.
  4366. #
  4367. #Default:
  4368. # reload_into_ims off
  4369.  
  4370. # TAG: maximum_single_addr_tries
  4371. # This sets the maximum number of connection attempts for a
  4372. # host that only has one address (for multiple-address hosts,
  4373. # each address is tried once).
  4374. #
  4375. # The default value is one attempt, the (not recommended)
  4376. # maximum is 255 tries. A warning message will be generated
  4377. # if it is set to a value greater than ten.
  4378. #
  4379. # Note: This is in addition to the request re-forwarding which
  4380. # takes place if Squid fails to get a satisfying response.
  4381. #
  4382. #Default:
  4383. # maximum_single_addr_tries 1
  4384.  
  4385. # TAG: retry_on_error
  4386. # If set to on Squid will automatically retry requests when
  4387. # receiving an error response. This is mainly useful if you
  4388. # are in a complex cache hierarchy to work around access
  4389. # control errors.
  4390. #
  4391. #Default:
  4392. # retry_on_error off
  4393.  
  4394. # TAG: as_whois_server
  4395. # WHOIS server to query for AS numbers. NOTE: AS numbers are
  4396. # queried only when Squid starts up, not for every request.
  4397. #
  4398. #Default:
  4399. # as_whois_server whois.ra.net
  4400. # as_whois_server whois.ra.net
  4401.  
  4402. # TAG: offline_mode
  4403. # Enable this option and Squid will never try to validate cached
  4404. # objects.
  4405. #
  4406. #Default:
  4407. # offline_mode off
  4408.  
  4409. # TAG: uri_whitespace
  4410. # What to do with requests that have whitespace characters in the
  4411. # URI. Options:
  4412. #
  4413. # strip: The whitespace characters are stripped out of the URL.
  4414. # This is the behavior recommended by RFC2396.
  4415. # deny: The request is denied. The user receives an "Invalid
  4416. # Request" message.
  4417. # allow: The request is allowed and the URI is not changed. The
  4418. # whitespace characters remain in the URI. Note the
  4419. # whitespace is passed to redirector processes if they
  4420. # are in use.
  4421. # encode: The request is allowed and the whitespace characters are
  4422. # encoded according to RFC1738. This could be considered
  4423. # a violation of the HTTP/1.1
  4424. # RFC because proxies are not allowed to rewrite URI's.
  4425. # chop: The request is allowed and the URI is chopped at the
  4426. # first whitespace. This might also be considered a
  4427. # violation.
  4428. #
  4429. #Default:
  4430. # uri_whitespace strip
  4431.  
  4432. # TAG: coredump_dir
  4433. # By default Squid leaves core files in the directory from where
  4434. # it was started. If you set 'coredump_dir' to a directory
  4435. # that exists, Squid will chdir() to that directory at startup
  4436. # and coredump files will be left there.
  4437. #
  4438. #Default:
  4439. # coredump_dir none
  4440. #
  4441. # Leave coredumps in the first cache dir
  4442. coredump_dir /var/spool/squid
  4443.  
  4444. # TAG: chroot
  4445. # Use this to have Squid do a chroot() while initializing. This
  4446. # also causes Squid to fully drop root privileges after
  4447. # initializing. This means, for example, if you use a HTTP
  4448. # port less than 1024 and try to reconfigure, you will may get an
  4449. # error saying that Squid can not open the port.
  4450. #
  4451. #Default:
  4452. # none
  4453.  
  4454. # TAG: balance_on_multiple_ip
  4455. # Some load balancing servers based on round robin DNS have been
  4456. # found not to preserve user session state across requests
  4457. # to different IP addresses.
  4458. #
  4459. # By default Squid rotates IP's per request. By disabling
  4460. # this directive only connection failure triggers rotation.
  4461. #
  4462. #Default:
  4463. # balance_on_multiple_ip on
  4464.  
  4465. # TAG: pipeline_prefetch
  4466. # To boost the performance of pipelined requests to closer
  4467. # match that of a non-proxied environment Squid can try to fetch
  4468. # up to two requests in parallel from a pipeline.
  4469. #
  4470. # Defaults to off for bandwidth management and access logging
  4471. # reasons.
  4472. #
  4473. #Default:
  4474. # pipeline_prefetch off
  4475.  
  4476. # TAG: high_response_time_warning (msec)
  4477. # If the one-minute median response time exceeds this value,
  4478. # Squid prints a WARNING with debug level 0 to get the
  4479. # administrators attention. The value is in milliseconds.
  4480. #
  4481. #Default:
  4482. # high_response_time_warning 0
  4483.  
  4484. # TAG: high_page_fault_warning
  4485. # If the one-minute average page fault rate exceeds this
  4486. # value, Squid prints a WARNING with debug level 0 to get
  4487. # the administrators attention. The value is in page faults
  4488. # per second.
  4489. #
  4490. #Default:
  4491. # high_page_fault_warning 0
  4492.  
  4493. # TAG: high_memory_warning
  4494. # If the memory usage (as determined by mallinfo) exceeds
  4495. # this amount, Squid prints a WARNING with debug level 0 to get
  4496. # the administrators attention.
  4497. #
  4498. #Default:
  4499. # high_memory_warning 0 KB
  4500.  
  4501. # TAG: sleep_after_fork (microseconds)
  4502. # When this is set to a non-zero value, the main Squid process
  4503. # sleeps the specified number of microseconds after a fork()
  4504. # system call. This sleep may help the situation where your
  4505. # system reports fork() failures due to lack of (virtual)
  4506. # memory. Note, however, if you have a lot of child
  4507. # processes, these sleep delays will add up and your
  4508. # Squid will not service requests for some amount of time
  4509. # until all the child processes have been started.
  4510. # On Windows value less then 1000 (1 milliseconds) are
  4511. # rounded to 1000.
  4512. #
  4513. #Default:
  4514. # sleep_after_fork 0
  4515.  
  4516. # TAG: max_filedesc
  4517. # The maximum number of open file descriptors.
  4518. #
  4519. # WARNING: Changes of this value isn't respected by reconfigure
  4520. # command. This value should be changed only if there isn't
  4521. # any active squid process.
  4522. #
  4523. # NOTE: This option is only supported by system with poll()
  4524. # or epoll(). You can set this value by --with-maxfd during
  4525. # compilation on system whith uses select().
  4526. #
  4527. # The maximum value for max_filedesc is set by --with-maxfd during
  4528. # compilation.
  4529. #
  4530. #Default:
  4531. # max_filedesc 1024
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement