3 # $Id: cf.data.pre,v 1.446 2007/08/13 17:20:51 hno Exp $
5 # SQUID Web Proxy Cache http://www.squid-cache.org/
6 # ----------------------------------------------------------
8 # Squid is the result of efforts by numerous individuals from
9 # the Internet community; see the CONTRIBUTORS file for full
10 # details. Many organizations have provided support for Squid's
11 # development; see the SPONSORS file for full details. Squid is
12 # Copyrighted (C) 2000 by the Regents of the University of
13 # California; see the COPYRIGHT file for full details. Squid
14 # incorporates software developed and/or copyrighted by other
15 # sources; see the CREDITS file for full details.
17 # This program is free software; you can redistribute it and/or modify
18 # it under the terms of the GNU General Public License as published by
19 # the Free Software Foundation; either version 2 of the License, or
20 # (at your option) any later version.
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU General Public License for more details.
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
33 WELCOME TO SQUID @VERSION@
34 ----------------------------
36 This is the default Squid configuration file. You may wish
37 to look at the Squid home page (http://www.squid-cache.org/)
38 for the FAQ and other documentation.
40 The default Squid config file shows what the defaults for
41 various options happen to be. If you don't need to change the
42 default, you shouldn't uncomment the line. Doing so may cause
43 run-time problems. In some cases "none" refers to no default
44 setting at all, while in other cases it refers to a valid
45 option - the comments for that keyword indicate if this is the
52 -----------------------------------------------------------------------------
55 NAME: http_port ascii_port
58 LOC: Config.Sockaddr.http
61 hostname:port [options]
62 1.2.3.4:port [options]
64 The socket addresses where Squid will listen for HTTP client
65 requests. You may specify multiple socket addresses.
66 There are three forms: port alone, hostname with port, and
67 IP address with port. If you specify a hostname or IP
68 address, Squid binds the socket to that specific
69 address. This replaces the old 'tcp_incoming_address'
70 option. Most likely, you do not need to bind to a specific
71 address, so you can use the port number alone.
73 If you are running Squid in accelerator mode, you
74 probably want to listen on port 80 also, or instead.
76 The -a command line option may be used to specify additional
77 port(s) where Squid listens for proxy request. Such ports will
78 be plain proxy ports with no options.
80 You may specify multiple socket addresses on multiple lines.
84 transparent Support for transparent proxies
86 accel Accelerator mode. Also set implicit by the other
87 accelerator directives
89 vhost Accelerator mode using Host header for virtual
92 vport Accelerator with IP based virtual host support
94 vport=NN As above, but uses specified port number rather
95 than the http_port number
97 defaultsite= Main web site name for accelerators
99 protocol= Protocol to reconstruct accelerated requests with.
102 tproxy Support Linux TPROXY for spoofing
103 outgoing connections using the client
106 disable-pmtu-discovery=
107 Control Path-MTU discovery usage:
108 off lets OS decide on what to do (default).
109 transparent disable PMTU discovery when transparent
111 always disable always PMTU discovery.
113 In many setups of transparently intercepting proxies Path-MTU
114 discovery can not work on traffic towards the clients. This is
115 the case when the intercepting device does not fully track
116 connections and fails to forward ICMP must fragment messages
117 to the cache server. If you have such setup and experience that
118 certain clients sporadically hang or never complete requests set
119 disable-pmtu-discovery option to 'transparent'.
121 If you run Squid on a dual-homed machine with an internal
122 and an external interface we recommend you to specify the
123 internal address:port in http_port. This way Squid will only be
124 visible on the internal address.
127 # Squid normally listens to port 3128
128 http_port @DEFAULT_HTTP_PORT@
134 TYPE: https_port_list
136 LOC: Config.Sockaddr.https
138 Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
140 The socket address where Squid will listen for HTTPS client
143 This is really only useful for situations where you are running
144 squid in accelerator mode and you want to do the SSL work at the
147 You may specify multiple socket addresses on multiple lines,
148 each with their own SSL certificate and/or options.
152 accel Accelerator mode. Also needs at least one of
153 defaultsite or vhost.
155 defaultsite= The name of the https site presented on
156 this port. Implies accel.
158 vhost Accelerator mode using Host header for virtual
159 domain support. Implies accel.
161 protocol= Protocol to reconstruct accelerated requests with.
164 cert= Path to SSL certificate (PEM format)
166 key= Path to SSL private key file (PEM format)
167 if not specified, the certificate file is
168 assumed to be a combined certificate and
171 version= The version of SSL/TLS supported
172 1 automatic (default)
177 cipher= Colon separated list of supported ciphers
179 options= Various SSL engine options. The most important
181 NO_SSLv2 Disallow the use of SSLv2
182 NO_SSLv3 Disallow the use of SSLv3
183 NO_TLSv1 Disallow the use of TLSv1
184 SINGLE_DH_USE Always create a new key when using
185 temporary/ephemeral DH key exchanges
186 See src/ssl_support.c or OpenSSL SSL_CTX_set_options
187 documentation for a complete list of options
189 clientca= File containing the list of CAs to use when
190 requesting a client certificate
192 cafile= File containing additional CA certificates to
193 use when verifying client certificates. If unset
194 clientca will be used.
196 capath= Directory containing additional CA certificates
197 and CRL lists to use when verifying client certificates
199 crlfile= File of additional CRL lists to use when verifying
200 the client certificate, in addition to CRLs stored in
201 the capath. Implies VERIFY_CRL flag below.
203 dhparams= File containing DH parameters for temporary/ephemeral
206 sslflags= Various flags modifying the use of SSL:
208 Don't request client certificates
209 immediately, but wait until acl processing
210 requires a certificate (not yet implemented)
212 Don't use the default CA lists built in
215 Don't allow for session reuse. Each connection
216 will result in a new SSL session.
218 Verify CRL lists when accepting client
221 Verify CRL lists for all certificates in the
222 client certificate chain
224 sslcontext= SSL session ID context identifier.
226 vport Accelerator with IP based virtual host support
228 vport=NN As above, but uses specified port number rather
229 than the https_port number. Implies accel
233 NAME: ssl_unclean_shutdown
237 LOC: Config.SSL.unclean_shutdown
239 Some browsers (especially MSIE) bugs out on SSL shutdown
246 LOC: Config.SSL.ssl_engine
249 The OpenSSL engine to use. You will need to set this if you
250 would like to use hardware SSL acceleration for example.
253 NAME: sslproxy_client_certificate
256 LOC: Config.ssl_client.cert
259 Client SSL Certificate to use when proxying https:// URLs
262 NAME: sslproxy_client_key
265 LOC: Config.ssl_client.key
268 Client SSL Key to use when proxying https:// URLs
271 NAME: sslproxy_version
274 LOC: Config.ssl_client.version
277 SSL version level to use when proxying https:// URLs
280 NAME: sslproxy_options
283 LOC: Config.ssl_client.options
286 SSL engine options to use when proxying https:// URLs
289 NAME: sslproxy_cipher
292 LOC: Config.ssl_client.cipher
295 SSL cipher list to use when proxying https:// URLs
298 NAME: sslproxy_cafile
301 LOC: Config.ssl_client.cafile
304 file containing CA certificates to use when verifying server
305 certificates while proxying https:// URLs
308 NAME: sslproxy_capath
311 LOC: Config.ssl_client.capath
314 directory containing CA certificates to use when verifying
315 server certificates while proxying https:// URLs
321 LOC: Config.ssl_client.flags
324 Various flags modifying the use of SSL while proxying https:// URLs:
325 DONT_VERIFY_PEER Accept certificates even if they fail to
327 NO_DEFAULT_CA Don't use the default CA list built in
331 NAME: sslpassword_program
334 LOC: Config.Program.ssl_password
337 Specify a program used for entering SSL key passphrases
338 when using encrypted SSL certificate keys. If not specified
339 keys must either be unencrypted, or Squid started with the -N
340 option to allow it to query interactively for the passphrase.
343 NAME: icp_port udp_port
348 The port number where Squid sends and receives ICP queries to
349 and from neighbor caches. The standard UDP port for ICP is 3130.
350 Default is disabled (0).
352 icp_port @DEFAULT_ICP_PORT@
360 LOC: Config.Port.htcp
362 The port number where Squid sends and receives HTCP queries to
363 and from neighbor caches. Default is 4827. To disable use
369 LOC: Config.mcast_group_list
372 This tag specifies a list of multicast groups which your server
373 should join to receive multicasted ICP queries.
375 NOTE! Be very careful what you put here! Be sure you
376 understand the difference between an ICP _query_ and an ICP
377 _reply_. This option is to be set only if you want to RECEIVE
378 multicast queries. Do NOT set this option to SEND multicast
379 ICP (use cache_peer for that). ICP replies are always sent via
380 unicast, so this option does not affect whether or not you will
381 receive replies from multicast group members.
383 You must be very careful to NOT use a multicast address which
384 is already in use by another group of caches.
386 If you are unsure about multicast, please read the Multicast
387 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
389 Usage: mcast_groups 239.128.16.128 224.0.1.20
391 By default, Squid doesn't listen on any multicast groups.
394 NAME: udp_incoming_address
396 LOC:Config.Addrs.udp_incoming
400 NAME: udp_outgoing_address
402 LOC: Config.Addrs.udp_outgoing
403 DEFAULT: 255.255.255.255
405 udp_incoming_address is used for the ICP socket receiving packets
407 udp_outgoing_address is used for ICP packets sent out to other
410 The default behavior is to not bind to any specific address.
412 A udp_incoming_address value of 0.0.0.0 indicates Squid
413 should listen for UDP messages on all available interfaces.
415 If udp_outgoing_address is set to 255.255.255.255 (the default)
416 it will use the same socket as udp_incoming_address. Only
417 change this if you want to have ICP queries sent using another
418 address than where this Squid listens for ICP queries from other
421 NOTE, udp_incoming_address and udp_outgoing_address can not
422 have the same value since they both use port 3130.
426 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
427 -----------------------------------------------------------------------------
435 To specify other caches in a hierarchy, use the format:
437 cache_peer hostname type http_port icp_port [options]
442 # hostname type port port options
443 # -------------------- -------- ----- ----- -----------
444 cache_peer parent.foo.net parent 3128 3130 [proxy-only]
445 cache_peer sib1.foo.net sibling 3128 3130 [proxy-only]
446 cache_peer sib2.foo.net sibling 3128 3130 [proxy-only]
448 type: either 'parent', 'sibling', or 'multicast'.
450 proxy_port: The port number where the cache listens for proxy
453 icp_port: Used for querying neighbor caches about
454 objects. To have a non-ICP neighbor
455 specify '7' for the ICP port and make sure the
456 neighbor machine has the UDP echo port
457 enabled in its /etc/inetd.conf file.
474 login=user:password | PASS | *:password
485 sslcert=/path/to/ssl/certificate
486 sslkey=/path/to/ssl/key
490 front-end-https[=on|auto]
492 use 'proxy-only' to specify objects fetched
493 from this cache should not be saved locally.
495 use 'weight=n' to specify a weighted parent.
496 The weight must be an integer. The default weight
497 is 1, larger weights are favored more.
499 use 'basetime=n' to specify a base amount to
500 be subtracted from round trip times of parents.
501 It is subtracted before division by weight in calculating
502 which parent to fectch from. If the rtt is less than the
503 base time the rtt is set to a minimal value.
505 use 'ttl=n' to specify a IP multicast TTL to use
506 when sending an ICP queries to this address.
507 Only useful when sending to a multicast group.
508 Because we don't accept ICP replies from random
509 hosts, you must configure other group members as
510 peers with the 'multicast-responder' option below.
512 use 'no-query' to NOT send ICP queries to this
515 use 'background-ping' to only send ICP queries to this
516 neighbor infrequently. This is used to keep the neighbor
517 round trip time updated and is usually used in
518 conjunction with weighted-round-robin.
520 use 'default' if this is a parent cache which can
521 be used as a "last-resort." You should probably
522 only use 'default' in situations where you cannot
523 use ICP with your parent cache(s).
525 use 'round-robin' to define a set of parents which
526 should be used in a round-robin fashion in the
527 absence of any ICP queries.
529 use 'weighted-round-robin' to define a set of parents
530 which should be used in a round-robin fashion with the
531 frequency of each parent being based on the round trip
532 time. Closer parents are used more often.
533 Usually used for background-ping parents.
535 use 'carp' to define a set of parents which should
536 be used as a CARP array. The requests will be
537 distributed among the parents based on the CARP load
538 balancing hash function based on their weigth.
540 'multicast-responder' indicates the named peer
541 is a member of a multicast group. ICP queries will
542 not be sent directly to the peer, but ICP replies
543 will be accepted from it.
545 'closest-only' indicates that, for ICP_OP_MISS
546 replies, we'll only forward CLOSEST_PARENT_MISSes
547 and never FIRST_PARENT_MISSes.
549 use 'no-digest' to NOT request cache digests from
552 'no-netdb-exchange' disables requesting ICMP
553 RTT database (NetDB) from the neighbor.
555 use 'no-delay' to prevent access to this neighbor
556 from influencing the delay pools.
558 use 'login=user:password' if this is a personal/workgroup
559 proxy and your parent requires proxy authentication.
560 Note: The string can include URL escapes (i.e. %20 for
561 spaces). This also means % must be written as %%.
563 use 'login=PASS' if users must authenticate against
564 the upstream proxy or in the case of a reverse proxy
565 configuration, the origin web server. This will pass
566 the users credentials as they are to the peer.
567 This only works for the Basic HTTP authentication scheme.
568 Note: To combine this with proxy_auth both proxies must
569 share the same user database as HTTP only allows for
571 Also be warned this will expose your users proxy
572 password to the peer. USE WITH CAUTION
574 use 'login=*:password' to pass the username to the
575 upstream cache, but with a fixed password. This is meant
576 to be used when the peer is in another administrative
577 domain, but it is still needed to identify each user.
578 The star can optionally be followed by some extra
579 information which is added to the username. This can
580 be used to identify this proxy to the peer, similar to
581 the login=username:password option above.
583 use 'connect-timeout=nn' to specify a peer
584 specific connect timeout (also see the
585 peer_connect_timeout directive)
587 use 'digest-url=url' to tell Squid to fetch the cache
588 digest (if digests are enabled) for this host from
589 the specified URL rather than the Squid default
592 use 'allow-miss' to disable Squid's use of only-if-cached
593 when forwarding requests to siblings. This is primarily
594 useful when icp_hit_stale is used by the sibling. To
595 extensive use of this option may result in forwarding
596 loops, and you should avoid having two-way peerings
597 with this option. (for example to deny peer usage on
598 requests from peer by denying cache_peer_access if the
601 use 'max-conn' to limit the amount of connections Squid
602 may open to this peer.
604 use 'htcp' to send HTCP, instead of ICP, queries
605 to the neighbor. You probably also want to
606 set the "icp port" to 4827 instead of 3130.
608 use 'htcp-oldsquid' to send HTCP to old Squid versions
610 'originserver' causes this parent peer to be contacted as
611 a origin server. Meant to be used in accelerator setups.
613 use 'name=xxx' if you have multiple peers on the same
614 host but different ports. This name can be used to
615 differentiate the peers in cache_peer_access and similar
618 use 'forceddomain=name' to forcibly set the Host header
619 of requests forwarded to this peer. Useful in accelerator
620 setups where the server (peer) expects a certain domain
621 name and using redirectors to feed this domainname
624 use 'ssl' to indicate connections to this peer should
625 bs SSL/TLS encrypted.
627 use 'sslcert=/path/to/ssl/certificate' to specify a client
628 SSL certificate to use when connecting to this peer.
630 use 'sslkey=/path/to/ssl/key' to specify the private SSL
631 key corresponding to sslcert above. If 'sslkey' is not
632 specified 'sslcert' is assumed to reference a
633 combined file containing both the certificate and the key.
635 use sslversion=1|2|3|4 to specify the SSL version to use
636 when connecting to this peer
637 1 = automatic (default)
642 use sslcipher=... to specify the list of valid SSL chipers
643 to use when connecting to this peer
645 use ssloptions=... to specify various SSL engine options:
646 NO_SSLv2 Disallow the use of SSLv2
647 NO_SSLv3 Disallow the use of SSLv3
648 NO_TLSv1 Disallow the use of TLSv1
649 See src/ssl_support.c or the OpenSSL documentation for
650 a more complete list.
652 use cafile=... to specify a file containing additional
653 CA certificates to use when verifying the peer certificate
655 use capath=... to specify a directory containing additional
656 CA certificates to use when verifying the peer certificate
658 use sslflags=... to specify various flags modifying the
661 Accept certificates even if they fail to
664 Don't use the default CA list built in
667 Don't verify the peer certificate
668 matches the server name
670 use sslname= to specify the peer name as advertised
671 in it's certificate. Used for verifying the correctness
672 of the received peer certificate. If not specified the
673 peer hostname will be used.
675 use front-end-https to enable the "Front-End-Https: On"
676 header needed when using Squid as a SSL frontend infront
677 of Microsoft OWA. See MS KB document Q307347 for details
678 on this header. If set to auto the header will
679 only be added if the request is forwarded as a https://
682 NOTE: non-ICP neighbors must be specified as 'parent'.
685 NAME: cache_peer_domain cache_host_domain
690 Use to limit the domains for which a neighbor cache will be
693 cache_peer_domain cache-host domain [domain ...]
694 cache_peer_domain cache-host !domain
696 For example, specifying
698 cache_peer_domain parent.foo.net .edu
700 has the effect such that UDP query packets are sent to
701 'bigserver' only when the requested object exists on a
702 server in the .edu domain. Prefixing the domainname
703 with '!' means the cache will be queried for objects
706 NOTE: * Any number of domains may be given for a cache-host,
707 either on the same or separate lines.
708 * When multiple domains are given for a particular
709 cache-host, the first matched domain is applied.
710 * Cache hosts with no domain restrictions are queried
712 * There are no defaults.
713 * There is also a 'cache_peer_access' tag in the ACL
717 NAME: neighbor_type_domain
722 usage: neighbor_type_domain neighbor parent|sibling domain domain ...
724 Modifying the neighbor type for specific domains is now
725 possible. You can treat some domains differently than the the
726 default neighbor type specified on the 'cache_peer' line.
727 Normally it should only be necessary to list domains which
728 should be treated differently because the default neighbor type
729 applies for hostnames which do not match domains listed here.
732 cache_peer parent cache.foo.org 3128 3130
733 neighbor_type_domain cache.foo.org sibling .com .net
734 neighbor_type_domain cache.foo.org sibling .au .de
737 NAME: icp_query_timeout
741 LOC: Config.Timeout.icp_query
743 Normally Squid will automatically determine an optimal ICP
744 query timeout value based on the round-trip-time of recent ICP
745 queries. If you want to override the value determined by
746 Squid, set this 'icp_query_timeout' to a non-zero value. This
747 value is specified in MILLISECONDS, so, to use a 2-second
748 timeout (the old default), you would write:
750 icp_query_timeout 2000
753 NAME: maximum_icp_query_timeout
757 LOC: Config.Timeout.icp_query_max
759 Normally the ICP query timeout is determined dynamically. But
760 sometimes it can lead to very large values (say 5 seconds).
761 Use this option to put an upper limit on the dynamic timeout
762 value. Do NOT use this option to always use a fixed (instead
763 of a dynamic) timeout value. To set a fixed timeout see the
764 'icp_query_timeout' directive.
767 NAME: minimum_icp_query_timeout
771 LOC: Config.Timeout.icp_query_min
773 Normally the ICP query timeout is determined dynamically. But
774 sometimes it can lead to very small timeouts, even lower than
775 the normal latency variance on your link due to traffic.
776 Use this option to put an lower limit on the dynamic timeout
777 value. Do NOT use this option to always use a fixed (instead
778 of a dynamic) timeout value. To set a fixed timeout see the
779 'icp_query_timeout' directive.
782 NAME: mcast_icp_query_timeout
786 LOC: Config.Timeout.mcast_icp_query
788 For Multicast peers, Squid regularly sends out ICP "probes" to
789 count how many other peers are listening on the given multicast
790 address. This value specifies how long Squid should wait to
791 count all the replies. The default is 2000 msec, or 2
795 NAME: dead_peer_timeout
799 LOC: Config.Timeout.deadPeer
801 This controls how long Squid waits to declare a peer cache
802 as "dead." If there are no ICP replies received in this
803 amount of time, Squid will declare the peer dead and not
804 expect to receive any further ICP replies. However, it
805 continues to send ICP queries, and will mark the peer as
806 alive upon receipt of the first subsequent ICP reply.
808 This timeout also affects when Squid expects to receive ICP
809 replies from peers. If more than 'dead_peer' seconds have
810 passed since the last ICP reply was received, Squid will not
811 expect to receive an ICP reply on the next query. Thus, if
812 your time between requests is greater than this timeout, you
813 will see a lot of requests sent DIRECT to origin servers
814 instead of to your parents.
817 NAME: hierarchy_stoplist
820 LOC: Config.hierarchy_stoplist
822 A list of words which, if found in a URL, cause the object to
823 be handled directly by this cache. In other words, use this
824 to not query neighbor caches for certain objects. You may
825 list this option multiple times.
827 #We recommend you to use at least the following line.
828 hierarchy_stoplist cgi-bin ?
835 LOC: Config.accessList.noCache
837 A list of ACL elements which, if matched, cause the request to
838 not be satisfied from the cache and the reply to not be cached.
839 In other words, use this to force certain objects to never be cached.
841 You must use the word 'DENY' to indicate the ACL names which should
844 Default is to allow all to be cached
846 #We recommend you to use the following two lines.
847 acl QUERY urlpath_regex cgi-bin \?
852 NAME: background_ping_rate
856 LOC: Config.backgroundPingRate
858 Controls how often the ICP pings are sent to siblings that
859 have background-ping set.
863 OPTIONS WHICH AFFECT THE CACHE SIZE
864 -----------------------------------------------------------------------------
871 LOC: Config.memMaxSize
873 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
874 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
875 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
876 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
878 'cache_mem' specifies the ideal amount of memory to be used
882 * Negative-Cached objects
884 Data for these objects are stored in 4 KB blocks. This
885 parameter specifies the ideal upper limit on the total size of
886 4 KB blocks allocated. In-Transit objects take the highest
889 In-transit objects have priority over the others. When
890 additional space is needed for incoming data, negative-cached
891 and hot objects will be released. In other words, the
892 negative-cached and hot objects will fill up any unused space
893 not needed for in-transit objects.
895 If circumstances require, this limit will be exceeded.
896 Specifically, if your incoming request rate requires more than
897 'cache_mem' of memory to hold in-transit objects, Squid will
898 exceed this limit to satisfy the new requests. When the load
899 decreases, blocks will be freed until the high-water mark is
900 reached. Thereafter, blocks will be used to store hot
905 COMMENT: (percent, 0-100)
908 LOC: Config.Swap.lowWaterMark
911 NAME: cache_swap_high
912 COMMENT: (percent, 0-100)
915 LOC: Config.Swap.highWaterMark
918 The low- and high-water marks for cache object replacement.
919 Replacement begins when the swap (disk) usage is above the
920 low-water mark and attempts to maintain utilization near the
921 low-water mark. As swap utilization gets close to high-water
922 mark object eviction becomes more aggressive. If utilization is
923 close to the low-water mark less replacement is done each time.
925 Defaults are 90% and 95%. If you have a large cache, 5% could be
926 hundreds of MB. If this is the case you may wish to set these
927 numbers closer together.
930 NAME: maximum_object_size
934 LOC: Config.Store.maxObjectSize
936 Objects larger than this size will NOT be saved on disk. The
937 value is specified in kilobytes, and the default is 4MB. If
938 you wish to get a high BYTES hit ratio, you should probably
939 increase this (one 32 MB object hit counts for 3200 10KB
940 hits). If you wish to increase speed more than your want to
941 save bandwidth you should leave this low.
943 NOTE: if using the LFUDA replacement policy you should increase
944 this value to maximize the byte hit rate improvement of LFUDA!
945 See replacement_policy below for a discussion of this policy.
948 NAME: minimum_object_size
952 LOC: Config.Store.minObjectSize
954 Objects smaller than this size will NOT be saved on disk. The
955 value is specified in kilobytes, and the default is 0 KB, which
956 means there is no minimum.
959 NAME: maximum_object_size_in_memory
963 LOC: Config.Store.maxInMemObjSize
965 Objects greater than this size will not be attempted to kept in
966 the memory cache. This should be set high enough to keep objects
967 accessed frequently in memory to improve performance whilst low
968 enough to keep larger objects from hoarding cache_mem .
972 COMMENT: (number of entries)
975 LOC: Config.ipcache.size
982 LOC: Config.ipcache.low
989 LOC: Config.ipcache.high
991 The size, low-, and high-water marks for the IP cache.
995 COMMENT: (number of entries)
998 LOC: Config.fqdncache.size
1000 Maximum number of FQDN cache entries.
1003 NAME: cache_replacement_policy
1005 LOC: Config.replPolicy
1008 The cache replacement policy parameter determines which
1009 objects are evicted (replaced) when disk space is needed.
1011 lru : Squid's original list based LRU policy
1012 heap GDSF : Greedy-Dual Size Frequency
1013 heap LFUDA: Least Frequently Used with Dynamic Aging
1014 heap LRU : LRU policy implemented using a heap
1016 Applies to any cache_dir lines listed below this.
1018 The LRU policies keeps recently referenced objects.
1020 The heap GDSF policy optimizes object hit rate by keeping smaller
1021 popular objects in cache so it has a better chance of getting a
1022 hit. It achieves a lower byte hit rate than LFUDA though since
1023 it evicts larger (possibly popular) objects.
1025 The heap LFUDA policy keeps popular objects in cache regardless of
1026 their size and thus optimizes byte hit rate at the expense of
1027 hit rate since one large, popular object will prevent many
1028 smaller, slightly less popular objects from being cached.
1030 Both policies utilize a dynamic aging mechanism that prevents
1031 cache pollution that can otherwise occur with frequency-based
1032 replacement policies.
1034 NOTE: if using the LFUDA replacement policy you should increase
1035 the value of maximum_object_size above its default of 4096 KB to
1036 to maximize the potential byte hit rate improvement of LFUDA.
1038 For more information about the GDSF and LFUDA cache replacement
1039 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
1040 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
1043 NAME: memory_replacement_policy
1045 LOC: Config.memPolicy
1048 The memory replacement policy parameter determines which
1049 objects are purged from memory when memory space is needed.
1051 See cache_replacement_policy for details.
1055 LOGFILE PATHNAMES AND CACHE DIRECTORIES
1056 -----------------------------------------------------------------------------
1062 DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256
1063 LOC: Config.cacheSwap
1067 cache_dir Type Directory-Name Fs-specific-data [options]
1069 You can specify multiple cache_dir lines to spread the
1070 cache among different disk partitions.
1072 Type specifies the kind of storage system to use. Only "ufs"
1073 is built by default. To enable any of the other storage systems
1074 see the --enable-storeio configure option.
1076 'Directory' is a top-level directory where cache swap
1077 files will be stored. If you want to use an entire disk
1078 for caching, this can be the mount-point directory.
1079 The directory must exist and be writable by the Squid
1080 process. Squid will NOT create this directory for you.
1084 "ufs" is the old well-known Squid storage format that has always
1087 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
1089 'Mbytes' is the amount of disk space (MB) to use under this
1090 directory. The default is 100 MB. Change this to suit your
1091 configuration. Do NOT put the size of your disk drive here.
1092 Instead, if you want Squid to use the entire disk drive,
1093 subtract 20% and use that value.
1095 'Level-1' is the number of first-level subdirectories which
1096 will be created under the 'Directory'. The default is 16.
1098 'Level-2' is the number of second-level subdirectories which
1099 will be created under each first-level directory. The default
1102 The aufs store type:
1104 "aufs" uses the same storage format as "ufs", utilizing
1105 POSIX-threads to avoid blocking the main Squid process on
1106 disk-I/O. This was formerly known in Squid as async-io.
1108 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
1110 see argument descriptions under ufs above
1112 The diskd store type:
1114 "diskd" uses the same storage format as "ufs", utilizing a
1115 separate process to avoid blocking the main Squid process on
1118 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
1120 see argument descriptions under ufs above
1122 Q1 specifies the number of unacknowledged I/O requests when Squid
1123 stops opening new files. If this many messages are in the queues,
1124 Squid won't open new files. Default is 64
1126 Q2 specifies the number of unacknowledged messages when Squid
1127 starts blocking. If this many messages are in the queues,
1128 Squid blocks until it receives some replies. Default is 72
1130 When Q1 < Q2 (the default), the cache directory is optimized
1131 for lower response time at the expense of a decrease in hit
1132 ratio. If Q1 > Q2, the cache directory is optimized for
1133 higher hit ratio at the expense of an increase in response
1136 The coss store type:
1138 block-size=n defines the "block size" for COSS cache_dir's.
1139 Squid uses file numbers as block numbers. Since file numbers
1140 are limited to 24 bits, the block size determines the maximum
1141 size of the COSS partition. The default is 512 bytes, which
1142 leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
1143 you should not change the coss block size after Squid
1144 has written some objects to the cache_dir.
1146 The coss file store has changed from 2.5. Now it uses a file
1147 called 'stripe' in the directory names in the config - and
1148 this will be created by squid -z.
1152 no-store, no new objects should be stored to this cache_dir
1154 max-size=n, refers to the max object size this storedir supports.
1155 It is used to initially choose the storedir to dump the object.
1156 Note: To make optimal use of the max-size limits you should order
1157 the cache_dir lines with the smallest max-size value first and the
1158 ones with no max-size specification last.
1160 Note for coss, max-size must be less than COSS_MEMBUF_SZ,
1161 which can be changed with the --with-coss-membuf-size=N configure
1164 The null store type:
1166 no options are allowed or required
1171 LOC: Config.Log.logformats
1176 logformat <name> <format specification>
1178 Defines an access log format.
1180 The <format specification> is a string with embedded % format codes
1182 % format codes all follow the same basic structure where all but
1183 the formatcode is optional. Output strings are automatically escaped
1184 as required according to their context and the output format
1185 modifiers are usually not needed, but can be specified if an explicit
1186 output format is desired.
1188 % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
1190 " output in quoted string format
1191 [ output in squid text log format as used by log_mime_hdrs
1192 # output in URL quoted format
1196 width field width. If starting with 0 the
1197 output is zero padded
1198 {arg} argument such as header name etc
1202 >a Client source IP address
1204 >p Client source port
1205 <A Server IP address or peer name
1206 la Local IP address (http_port)
1207 lp Local port number (http_port)
1208 ts Seconds since epoch
1209 tu subsecond time (milliseconds)
1210 tl Local time. Optional strftime format argument
1211 default %d/%b/%Y:%H:%M:S %z
1212 tg GMT time. Optional strftime format argument
1213 default %d/%b/%Y:%H:%M:S %z
1214 tr Response time (milliseconds)
1215 >h Request header. Optional header name argument
1216 on the format header[:[separator]element]
1217 <h Reply header. Optional header name argument
1222 ue User from external acl
1224 Ss Squid request status (TCP_MISS etc)
1225 Sh Squid hierarchy status (DEFAULT_PARENT etc)
1226 mt MIME content type
1227 rm Request method (GET/POST etc)
1229 rp Request URL-Path excluding hostname
1230 rv Request protocol version
1231 et Tag returned by external acl
1232 ea Log string returned by external acl
1233 <st Reply size including HTTP headers
1234 <sH Reply high offset sent
1235 <sS Upstream object size
1236 % a literal % character
1238 logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
1239 logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
1240 logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
1241 logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
1244 NAME: access_log cache_access_log
1246 LOC: Config.Log.accesslogs
1248 DEFAULT_IF_NONE: @DEFAULT_ACCESS_LOG@
1250 These files log client request activities. Has a line every HTTP or
1251 ICP request. The format is:
1252 access_log <filepath> [<logformat name> [acl acl ...]]
1253 access_log none [acl acl ...]]
1255 Will log to the specified file using the specified format (which
1256 must be defined in a logformat directive) those entries which match
1257 ALL the acl's specified (which must be defined in acl clauses).
1258 If no acl is specified, all requests will be logged to this file.
1260 To disable logging of a request use the filepath "none", in which case
1261 a logformat name should not be specified.
1263 To log the request via syslog specify a filepath of "syslog":
1265 access_log syslog[:facility|priority] [format [acl1 [acl2 ....]]]
1266 where facility could be any of:
1267 LOG_AUTHPRIV, LOG_DAEMON, LOG_LOCAL0 .. LOG_LOCAL7 or LOG_USER.
1269 And priority could be any of:
1270 LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG.
1275 DEFAULT: @DEFAULT_CACHE_LOG@
1278 Cache logging file. This is where general information about
1279 your cache's behavior goes. You can increase the amount of data
1280 logged to this file with the "debug_options" tag below.
1283 NAME: cache_store_log
1285 DEFAULT: @DEFAULT_STORE_LOG@
1286 LOC: Config.Log.store
1288 Logs the activities of the storage manager. Shows which
1289 objects are ejected from the cache, and which objects are
1290 saved and for how long. To disable, enter "none". There are
1291 not really utilities to analyze this data, so you can safely
1295 NAME: cache_swap_state cache_swap_log
1297 LOC: Config.Log.swap
1300 Location for the cache "swap.state" file. This index file holds
1301 the metadata of objects saved on disk. It is used to rebuild
1302 the cache during startup. Normally this file resides in each
1303 'cache_dir' directory, but you may specify an alternate
1304 pathname here. Note you must give a full filename, not just
1305 a directory. Since this is the index for the whole object
1306 list you CANNOT periodically rotate it!
1308 If %s can be used in the file name it will be replaced with a
1309 a representation of the cache_dir name where each / is replaced
1310 with '.'. This is needed to allow adding/removing cache_dir
1311 lines when cache_swap_log is being used.
1313 If have more than one 'cache_dir', and %s is not used in the name
1314 these swap logs will have names such as:
1320 The numbered extension (which is added automatically)
1321 corresponds to the order of the 'cache_dir' lines in this
1322 configuration file. If you change the order of the 'cache_dir'
1323 lines in this file, these log files will NOT correspond to
1324 the correct 'cache_dir' entry (unless you manually rename
1325 them). We recommend you do NOT use this option. It is
1326 better to keep these log files in each 'cache_dir' directory.
1329 NAME: emulate_httpd_log
1333 LOC: Config.onoff.common_log
1335 The Cache can emulate the log file format which many 'httpd'
1336 programs use. To disable/enable this emulation, set
1337 emulate_httpd_log to 'off' or 'on'. The default
1338 is to use the native log format since it includes useful
1339 information Squid-specific log analyzers use.
1342 NAME: log_ip_on_direct
1346 LOC: Config.onoff.log_ip_on_direct
1348 Log the destination IP address in the hierarchy log tag when going
1349 direct. Earlier Squid versions logged the hostname here. If you
1350 prefer the old way set this to off.
1355 DEFAULT: @DEFAULT_MIME_TABLE@
1356 LOC: Config.mimeTablePathname
1358 Pathname to Squid's MIME table. You shouldn't need to change
1359 this, but the default file contains examples and formatting
1360 information if you do.
1366 LOC: Config.onoff.log_mime_hdrs
1369 The Cache can record both the request and the response MIME
1370 headers for each HTTP transaction. The headers are encoded
1371 safely and will appear as two bracketed fields at the end of
1372 the access log (for either the native or httpd-emulated log
1373 formats). To enable this logging set log_mime_hdrs to 'on'.
1378 LOC: Config.Log.useragent
1380 IFDEF: USE_USERAGENT_LOG
1382 Squid will write the User-Agent field from HTTP requests
1383 to the filename specified here. By default useragent_log
1389 LOC: Config.Log.referer
1391 IFDEF: USE_REFERER_LOG
1393 Squid will write the Referer field from HTTP requests to the
1394 filename specified here. By default referer_log is disabled.
1399 DEFAULT: @DEFAULT_PID_FILE@
1400 LOC: Config.pidFilename
1402 A filename to write the process-id to. To disable, enter "none".
1408 LOC: Config.debugOptions
1410 Logging options are set as section,level where each source file
1411 is assigned a unique section. Lower levels result in less
1412 output, Full debugging (level 9) can result in a very large
1413 log file, so be careful. The magic word "ALL" sets debugging
1414 levels for all sections. We recommend normally running with
1422 LOC: Config.onoff.log_fqdn
1424 Turn this on if you wish to log fully qualified domain names
1425 in the access.log. To do this Squid does a DNS lookup of all
1426 IP's connecting to it. This can (in some situations) increase
1427 latency, which makes your cache seem slower for interactive
1431 NAME: client_netmask
1433 LOC: Config.Addrs.client_netmask
1434 DEFAULT: 255.255.255.255
1436 A netmask for client addresses in logfiles and cachemgr output.
1437 Change this to protect the privacy of your cache clients.
1438 A netmask of 255.255.255.0 will log all IP's in that range with
1439 the last digit set to '0'.
1443 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
1444 -----------------------------------------------------------------------------
1450 LOC: Config.Ftp.anon_user
1452 If you want the anonymous login password to be more informative
1453 (and enable the use of picky ftp servers), set this to something
1454 reasonable for your domain, like wwwuser@somewhere.net
1456 The reason why this is domainless by default is the
1457 request can be made on the behalf of a user in any domain,
1458 depending on how the cache is used.
1459 Some ftp server also validate the email address is valid
1460 (for example perl.com).
1463 NAME: ftp_list_width
1466 LOC: Config.Ftp.list_width
1468 Sets the width of ftp listings. This should be set to fit in
1469 the width of a standard browser. Setting this too small
1470 can cut off long filenames when browsing ftp sites.
1476 LOC: Config.Ftp.passive
1478 If your firewall does not allow Squid to use passive
1479 connections, turn off this option.
1482 NAME: ftp_sanitycheck
1485 LOC: Config.Ftp.sanitycheck
1487 For security and data integrity reasons Squid by default performs
1488 sanity checks of the addresses of FTP data connections ensure the
1489 data connection is to the requested server. If you need to allow
1490 FTP connections to servers using another IP address for the data
1491 connection turn this off.
1494 NAME: ftp_telnet_protocol
1497 LOC: Config.Ftp.telnet
1499 The FTP protocol is officially defined to use the telnet protocol
1500 as transport channel for the control connection. However, many
1501 implementations are broken and does not respect this aspect of
1504 If you have trouble accessing files with ASCII code 255 in the
1505 path or similar problems involving this ASCII code you can
1506 try setting this directive to off. If that helps, report to the
1507 operator of the FTP server in question that their FTP server
1508 is broken and does not follow the FTP standard.
1511 NAME: check_hostnames
1514 LOC: Config.onoff.check_hostnames
1516 For security and stability reasons Squid can check
1517 hostnames for Internet standard RFC compliance. If you want
1518 Squid to perform these checks turn this directive on.
1521 NAME: allow_underscore
1524 LOC: Config.onoff.allow_underscore
1526 Underscore characers is not strictly allowed in Internet hostnames
1527 but nevertheless used by many sites. Set this to off if you want
1528 Squid to be strict about the standard.
1529 This check is performed only when check_hostnames is set to on.
1532 NAME: cache_dns_program
1534 IFDEF: USE_DNSSERVERS
1535 DEFAULT: @DEFAULT_DNSSERVER@
1536 LOC: Config.Program.dnsserver
1538 Specify the location of the executable for dnslookup process.
1543 IFDEF: USE_DNSSERVERS
1545 LOC: Config.dnsChildren
1547 The number of processes spawn to service DNS name lookups.
1548 For heavily loaded caches on large servers, you should
1549 probably increase this value to at least 10. The maximum
1550 is 32. The default is 5.
1552 You must have at least one dnsserver process.
1555 NAME: dns_retransmit_interval
1558 LOC: Config.Timeout.idns_retransmit
1559 IFDEF: !USE_DNSSERVERS
1561 Initial retransmit interval for DNS queries. The interval is
1562 doubled each time all configured DNS servers have been tried.
1569 LOC: Config.Timeout.idns_query
1570 IFDEF: !USE_DNSSERVERS
1572 DNS Query timeout. If no response is received to a DNS query
1573 within this time all DNS servers for the queried domain
1574 are assumed to be unavailable.
1581 LOC: Config.onoff.res_defnames
1583 Normally the RES_DEFNAMES resolver option is disabled
1584 (see res_init(3)). This prevents caches in a hierarchy
1585 from interpreting single-component hostnames locally. To allow
1586 Squid to handle single-component names, enable this option.
1589 NAME: dns_nameservers
1592 LOC: Config.dns_nameservers
1594 Use this if you want to specify a list of DNS name servers
1595 (IP addresses) to use instead of those given in your
1596 /etc/resolv.conf file.
1597 On Windows platforms, if no value is specified here or in
1598 the /etc/resolv.conf file, the list of DNS name servers are
1599 taken from the Windows registry, both static and dynamic DHCP
1600 configurations are supported.
1602 Example: dns_nameservers 10.0.0.1 192.172.0.4
1607 DEFAULT: @DEFAULT_HOSTS@
1608 LOC: Config.etcHostsPath
1610 Location of the host-local IP name-address associations
1611 database. Most Operating Systems have such a file on different
1613 - Un*X & Linux: /etc/hosts
1614 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
1615 (%SystemRoot% value install default is c:\winnt)
1616 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
1617 (%SystemRoot% value install default is c:\windows)
1618 - Windows 9x/Me: %windir%\hosts
1619 (%windir% value is usually c:\windows)
1620 - Cygwin: /etc/hosts
1622 The file contains newline-separated definitions, in the
1623 form ip_address_in_dotted_form name [name ...] names are
1624 whitespace-separated. Lines beginning with an hash (#)
1625 character are comments.
1627 The file is checked at startup and upon configuration.
1628 If set to 'none', it won't be checked.
1629 If append_domain is used, that domain will be added to
1630 domain-local (i.e. not containing any dot character) host
1636 DEFAULT: @DEFAULT_DISKD@
1637 LOC: Config.Program.diskd
1639 Specify the location of the diskd executable.
1640 Note this is only useful if you have compiled in
1641 diskd as one of the store io modules.
1644 NAME: unlinkd_program
1647 DEFAULT: @DEFAULT_UNLINKD@
1648 LOC: Config.Program.unlinkd
1650 Specify the location of the executable for file deletion process.
1653 NAME: pinger_program
1655 DEFAULT: @DEFAULT_PINGER@
1656 LOC: Config.Program.pinger
1659 Specify the location of the executable for the pinger process.
1662 NAME: url_rewrite_program redirect_program
1664 LOC: Config.Program.redirect
1667 Specify the location of the executable for the URL redirector.
1668 Since they can perform almost any function there isn't one included.
1669 See the FAQ (section 15) for information on how to write one.
1670 By default, a redirector is not used.
1673 NAME: url_rewrite_children redirect_children
1676 LOC: Config.redirectChildren
1678 The number of redirector processes to spawn. If you start
1679 too few Squid will have to wait for them to process a backlog of
1680 URLs, slowing it down. If you start too many they will use RAM
1681 and other system resources.
1684 NAME: url_rewrite_concurrency redirect_concurrency
1687 LOC: Config.redirectConcurrency
1689 The number of requests each redirector helper can handle in
1690 parallell. Defaults to 0 which indicates the redirector
1691 is a old-style singlethreaded redirector.
1694 NAME: url_rewrite_host_header redirect_rewrites_host_header
1697 LOC: Config.onoff.redir_rewrites_host
1699 By default Squid rewrites any Host: header in redirected
1700 requests. If you are running an accelerator this may
1701 not be a wanted effect of a redirector.
1703 WARNING: Entries are cached on the result of the URL rewriting
1704 process, so be careful if you have domain-virtual hosts.
1707 NAME: url_rewrite_access redirector_access
1710 LOC: Config.accessList.redirector
1712 If defined, this access list specifies which requests are
1713 sent to the redirector processes. By default all requests
1719 LOC: Config.authConfiguration
1722 This is used to pass parameters to the various authentication
1724 format: auth_param scheme parameter [setting]
1726 auth_param basic program @DEFAULT_PREFIX@/bin/ncsa_auth @DEFAULT_PREFIX@/etc/passwd
1727 would tell the basic authentication scheme it's program parameter.
1729 The order authentication prompts are presented to the client_agent
1730 is dependent on the order the scheme first appears in config file.
1731 IE has a bug (it's not rfc 2617 compliant) in that it will use the basic
1732 scheme if basic is the first entry presented, even if more secure schemes
1733 are presented. For now use the order in the file below. If other browsers
1734 have difficulties (don't recognize the schemes offered even if you are using
1735 basic) either put basic first, or disable the other schemes (by commenting
1736 out their program entry).
1738 Once an authentication scheme is fully configured, it can only be shutdown
1739 by shutting squid down and restarting. Changes can be made on the fly and
1740 activated with a reconfigure. I.E. You can change to a different helper,
1741 but not unconfigure the helper completely.
1743 === Parameters for the basic scheme follow. ===
1746 Specify the command for the external authenticator. Such a
1747 program reads a line containing "username password" and replies
1748 "ERR" in an endless loop. "ERR" responses may optionally be followed
1749 by a error description available as %m in the returned error page.
1750 If you use an authenticator, make sure you have 1 acl of type proxy_auth.
1751 By default, the basic authentication scheme is not used unless a program
1754 If you want to use the traditional proxy authentication,
1755 jump over to the ../helpers/basic_auth/NCSA directory and
1760 Then, set this line to something like
1762 auth_param basic program @DEFAULT_PREFIX@/libexec/ncsa_auth @DEFAULT_PREFIX@/etc/passwd
1764 "children" numberofchildren
1765 The number of authenticator processes to spawn (no default).
1766 If you start too few Squid will have to wait for them to
1767 process a backlog of usercode/password verifications, slowing
1768 it down. When password verifications are done via a (slow)
1769 network you are likely to need lots of authenticator
1771 auth_param basic children 5
1773 "concurrency" concurrency
1774 The number of concurrent requests the helper can process.
1775 The default of 0 is used for helpers who only supports
1776 one request at a time.
1777 auth_param basic concurrency 0
1780 Specifies the realm name which is to be reported to the
1781 client for the basic proxy authentication scheme (part of
1782 the text the user will see when prompted their username and
1783 password). There is no default.
1784 auth_param basic realm Squid proxy-caching web server
1786 "credentialsttl" timetolive
1787 Specifies how long squid assumes an externally validated
1788 username:password pair is valid for - in other words how
1789 often the helper program is called for that user. Set this
1790 low to force revalidation with short lived passwords. Note
1791 setting this high does not impact your susceptibility
1792 to replay attacks unless you are using an one-time password
1793 system (such as SecureID). If you are using such a system,
1794 you will be vulnerable to replay attacks unless you also
1795 use the max_user_ip ACL in an http_access rule.
1797 "casesensitive" on|off
1798 Specifies if usernames are case sensitive. Most user databases are
1799 case insensitive allowing the same username to be spelled using both
1800 lower and upper case letters, but some are case sensitive. This
1801 makes a big difference for user_max_ip ACL processing and similar.
1802 auth_param basic casesensitive off
1804 === Parameters for the digest scheme follow ===
1807 Specify the command for the external authenticator. Such
1808 a program reads a line containing "username":"realm" and
1809 replies with the appropriate H(A1) value hex encoded or
1810 ERR if the user (or his H(A1) hash) does not exists.
1811 See rfc 2616 for the definition of H(A1).
1812 "ERR" responses may optionally be followed by a error description
1813 available as %m in the returned error page.
1815 By default, the digest authentication is not used unless a
1816 program is specified.
1818 If you want to use a digest authenticator, jump over to the
1819 helpers/digest_auth/ directory and choose the authenticator
1820 to use. In it's directory type
1824 Then, set this line to something like
1826 auth_param digest program @DEFAULT_PREFIX@/bin/digest_auth_pw @DEFAULT_PREFIX@/etc/digpass
1828 "children" numberofchildren
1829 The number of authenticator processes to spawn (no default).
1830 If you start too few Squid will have to wait for them to
1831 process a backlog of H(A1) calculations, slowing it down.
1832 When the H(A1) calculations are done via a (slow) network
1833 you are likely to need lots of authenticator processes.
1834 auth_param digest children 5
1837 Specifies the realm name which is to be reported to the
1838 client for the digest proxy authentication scheme (part of
1839 the text the user will see when prompted their username and
1840 password). There is no default.
1841 auth_param digest realm Squid proxy-caching web server
1843 "nonce_garbage_interval" timeinterval
1844 Specifies the interval that nonces that have been issued
1845 to client_agent's are checked for validity.
1847 "nonce_max_duration" timeinterval
1848 Specifies the maximum length of time a given nonce will be
1851 "nonce_max_count" number
1852 Specifies the maximum number of times a given nonce can be
1855 "nonce_strictness" on|off
1856 Determines if squid requires strict increment-by-1 behavior
1857 for nonce counts, or just incrementing (off - for use when
1858 useragents generate nonce counts that occasionally miss 1
1859 (ie, 1,2,4,6)). Default off.
1861 "check_nonce_count" on|off
1862 This directive if set to off can disable the nonce count check
1863 completely to work around buggy digest qop implementations in
1864 certain mainstream browser versions. Default on to check the
1865 nonce count to protect from authentication replay attacks.
1867 "post_workaround" on|off
1868 This is a workaround to certain buggy browsers who sends
1869 an incorrect request digest in POST requests when reusing
1870 the same nonce as acquired earlier on a GET request.
1872 === NTLM scheme options follow ===
1875 Specify the command for the external NTLM authenticator.
1876 Such a program reads exchanged NTLMSSP packets with
1877 the browser via Squid until authentication is completed.
1878 If you use an NTLM authenticator, make sure you have 1 acl
1879 of type proxy_auth. By default, the NTLM authenticator_program
1882 auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth
1884 "children" numberofchildren
1885 The number of authenticator processes to spawn (no default).
1886 If you start too few Squid will have to wait for them to
1887 process a backlog of credential verifications, slowing it
1888 down. When credential verifications are done via a (slow)
1889 network you are likely to need lots of authenticator
1892 auth_param ntlm children 5
1895 If you experience problems with PUT/POST requests when using the
1896 Negotiate authentication scheme then you can try setting this to
1897 off. This will cause Squid to forcibly close the connection on
1898 the initial requests where the browser asks which schemes are
1899 supported by the proxy.
1901 auth_param ntlm keep_alive on
1903 === Options for configuring the NEGOTIATE auth-scheme follow ===
1906 Specify the command for the external Negotiate authenticator.
1907 This protocol is used in Microsoft Active-Directory enabled setups with
1908 the Microsoft Internet Explorer or Mozilla Firefox browsers.
1909 Its main purpose is to exchange credentials with the Squid proxy
1910 using the Kerberos mechanisms.
1911 If you use a Negotiate authenticator, make sure you have at least one acl
1912 of type proxy_auth active. By default, the negotiate authenticator_program
1914 The only supported program for this role is the ntlm_auth
1915 program distributed as part of Samba, version 4 or later.
1917 auth_param negotiate program @DEFAULT_PREFIX@/bin/ntlm_auth --helper-protocol=gss-spnego
1919 "children" numberofchildren
1920 The number of authenticator processes to spawn (no default).
1921 If you start too few Squid will have to wait for them to
1922 process a backlog of credential verifications, slowing it
1923 down. When crendential verifications are done via a (slow)
1924 network you are likely to need lots of authenticator
1926 auth_param negotiate children 5
1929 If you experience problems with PUT/POST requests when using the
1930 Negotiate authentication scheme then you can try setting this to
1931 off. This will cause Squid to forcibly close the connection on
1932 the initial requests where the browser asks which schemes are
1933 supported by the proxy.
1935 auth_param negotiate keep_alive on
1938 #Recommended minimum configuration per scheme:
1939 #auth_param negotiate program <uncomment and complete this line to activate>
1940 #auth_param negotiate children 5
1941 #auth_param negotiate keep_alive on
1942 #auth_param ntlm program <uncomment and complete this line to activate>
1943 #auth_param ntlm children 5
1944 #auth_param ntlm keep_alive on
1945 #auth_param digest program <uncomment and complete this line>
1946 #auth_param digest children 5
1947 #auth_param digest realm Squid proxy-caching web server
1948 #auth_param digest nonce_garbage_interval 5 minutes
1949 #auth_param digest nonce_max_duration 30 minutes
1950 #auth_param digest nonce_max_count 50
1951 #auth_param basic program <uncomment and complete this line>
1952 #auth_param basic children 5
1953 #auth_param basic realm Squid proxy-caching web server
1954 #auth_param basic credentialsttl 2 hours
1958 NAME: authenticate_cache_garbage_interval
1961 LOC: Config.authenticateGCInterval
1963 The time period between garbage collection across the
1964 username cache. This is a tradeoff between memory utilization
1965 (long intervals - say 2 days) and CPU (short intervals -
1966 say 1 minute). Only change if you have good reason to.
1969 NAME: authenticate_ttl
1972 LOC: Config.authenticateTTL
1974 The time a user & their credentials stay in the logged in
1975 user cache since their last request. When the garbage
1976 interval passes, all user credentials that have passed their
1977 TTL are removed from memory.
1980 NAME: authenticate_ip_ttl
1982 LOC: Config.authenticateIpTTL
1985 If you use proxy authentication and the 'max_user_ip' ACL,
1986 this directive controls how long Squid remembers the IP
1987 addresses associated with each user. Use a small value
1988 (e.g., 60 seconds) if your users might change addresses
1989 quickly, as is the case with dialups. You might be safe
1990 using a larger value (e.g., 2 hours) in a corporate LAN
1991 environment with relatively static address assignments.
1994 NAME: external_acl_type
1995 TYPE: externalAclHelper
1996 LOC: Config.externalAclHelperList
1999 This option defines external acl classes using a helper program
2000 to look up the status
2002 external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
2006 ttl=n TTL in seconds for cached results (defaults to 3600
2009 TTL for cached negative lookups (default same
2011 children=n Number of acl helper processes spawn to service
2012 external acl lookups of this type.
2013 concurrency=n concurrency level per process. Use 0 for old style
2014 helpers who can only process a single request at a
2016 cache=n result cache size, 0 is unbounded (default)
2017 grace=n Percentage remaining of TTL where a refresh of a
2018 cached entry should be initiated without needing to
2019 wait for a new reply. (default 0 for no grace period)
2020 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
2022 FORMAT specifications
2024 %LOGIN Authenticated user login name
2025 %EXT_USER Username from external acl
2026 %IDENT Ident user name
2028 %SRCPORT Client source port
2031 %PROTO Requested protocol
2032 %PORT Requested port
2033 %PATH Requested URL path
2034 %METHOD Request method
2035 %MYADDR Squid interface address
2036 %MYPORT Squid http_port number
2037 %USER_CERT SSL User certificate in PEM format
2038 %USER_CERTCHAIN SSL User certificate chain in PEM format
2039 %USER_CERT_xx SSL User certificate subject attribute xx
2040 %USER_CA_xx SSL User certificate issuer attribute xx
2041 %{Header} HTTP request header
2042 %{Hdr:member} HTTP request header list member
2044 HTTP request header list member using ; as
2045 list separator. ; can be any non-alphanumeric
2048 In addition, any string specified in the referencing acl will
2049 also be included in the helper request line, after the specified
2050 formats (see the "acl external" directive)
2052 The helper receives lines per the above format specification,
2053 and returns lines starting with OK or ERR indicating the validity
2054 of the request and optionally followed by additional keywords with
2055 more details. To protect from odd characters the data is URL
2058 General result syntax:
2060 OK/ERR keyword=value ...
2064 user= The users name (login)
2065 password= The users password (for login= cache_peer option)
2066 message= Message describing the reason. Available as %o
2068 tag= Apply a tag to a request (for both ERR and OK results)
2069 Only sets a tag, does not alter existing tags.
2070 log= String to be logged in access.log. Available as
2071 %ea in logformat specifications
2073 Keyword values need to be URL escaped if they may contain
2074 contain whitespace or quotes.
2076 In Squid-2.5 compatibility mode quoting using " and \ is used
2077 instead of URL escaping.
2081 OPTIONS FOR TUNING THE CACHE
2082 -----------------------------------------------------------------------------
2085 NAME: request_header_max_size
2089 LOC: Config.maxRequestHeaderSize
2091 This specifies the maximum size for HTTP headers in a request.
2092 Request headers are usually relatively small (about 512 bytes).
2093 Placing a limit on the request header size will catch certain
2094 bugs (for example with persistent connections) and possibly
2095 buffer-overflow or denial-of-service attacks.
2098 NAME: request_body_max_size
2102 LOC: Config.maxRequestBodySize
2104 This specifies the maximum size for an HTTP request body.
2105 In other words, the maximum size of a PUT/POST request.
2106 A user who attempts to send a request with a body larger
2107 than this limit receives an "Invalid Request" error message.
2108 If you set this parameter to a zero (the default), there will
2109 be no limit imposed.
2112 NAME: refresh_pattern
2113 TYPE: refreshpattern
2117 usage: refresh_pattern [-i] regex min percent max [options]
2119 By default, regular expressions are CASE-SENSITIVE. To make
2120 them case-insensitive, use the -i option.
2122 'Min' is the time (in minutes) an object without an explicit
2123 expiry time should be considered fresh. The recommended
2124 value is 0, any higher values may cause dynamic applications
2125 to be erroneously cached unless the application designer
2126 has taken the appropriate actions.
2128 'Percent' is a percentage of the objects age (time since last
2129 modification age) an object without explicit expiry time
2130 will be considered fresh.
2132 'Max' is an upper limit on how long objects without an explicit
2133 expiry time will be considered fresh.
2135 options: override-expire
2145 override-expire enforces min age even if the server
2146 sent a Expires: header. Doing this VIOLATES the HTTP
2147 standard. Enabling this feature could make you liable
2148 for problems which it causes.
2150 override-lastmod enforces min age even on objects
2151 that were modified recently.
2153 reload-into-ims changes client no-cache or ``reload''
2154 to If-Modified-Since requests. Doing this VIOLATES the
2155 HTTP standard. Enabling this feature could make you
2156 liable for problems which it causes.
2158 ignore-reload ignores a client no-cache or ``reload''
2159 header. Doing this VIOLATES the HTTP standard. Enabling
2160 this feature could make you liable for problems which
2163 ignore-no-cache ignores any ``Pragma: no-cache'' and
2164 ``Cache-control: no-cache'' headers received from a server.
2165 The HTTP RFC never allows the use of this (Pragma) header
2166 from a server, only a client, though plenty of servers
2169 ignore-no-store ignores any ``Cache-control: no-store''
2170 headers received from a server. Doing this VIOLATES
2171 the HTTP standard. Enabling this feature could make you
2172 liable for problems which it causes.
2174 ignore-private ignores any ``Cache-control: private''
2175 headers received from a server. Doing this VIOLATES
2176 the HTTP standard. Enabling this feature could make you
2177 liable for problems which it causes.
2179 ignore-auth caches responses to requests with authorization,
2180 irrespective of ``Cache-control'' headers received from
2181 a server. Doing this VIOLATES the HTTP standard. Enabling
2182 this feature could make you liable for problems which
2185 refresh-ims causes squid to contact the origin server
2186 when a client issues an If-Modified-Since request. This
2187 ensures that the client will receive an updated version
2188 if one is available.
2190 Basically a cached object is:
2192 FRESH if expires < now, else STALE
2194 FRESH if lm-factor < percent, else STALE
2198 The refresh_pattern lines are checked in the order listed here.
2199 The first entry which matches is used. If none of the entries
2200 match the default will be used.
2202 Note, you must uncomment all the default lines if you want
2203 to change one. The default setting is only active if none is
2208 refresh_pattern ^ftp: 1440 20% 10080
2209 refresh_pattern ^gopher: 1440 0% 1440
2210 refresh_pattern . 0 20% 4320
2214 NAME: quick_abort_min
2218 LOC: Config.quickAbort.min
2221 NAME: quick_abort_max
2225 LOC: Config.quickAbort.max
2228 NAME: quick_abort_pct
2232 LOC: Config.quickAbort.pct
2234 The cache by default continues downloading aborted requests
2235 which are almost completed (less than 16 KB remaining). This
2236 may be undesirable on slow (e.g. SLIP) links and/or very busy
2237 caches. Impatient users may tie up file descriptors and
2238 bandwidth by repeatedly requesting and immediately aborting
2241 When the user aborts a request, Squid will check the
2242 quick_abort values to the amount of data transfered until
2245 If the transfer has less than 'quick_abort_min' KB remaining,
2246 it will finish the retrieval.
2248 If the transfer has more than 'quick_abort_max' KB remaining,
2249 it will abort the retrieval.
2251 If more than 'quick_abort_pct' of the transfer has completed,
2252 it will finish the retrieval.
2254 If you do not want any retrieval to continue after the client
2255 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
2258 If you want retrievals to always continue if they are being
2259 cached set 'quick_abort_min' to '-1 KB'.
2262 NAME: read_ahead_gap
2263 COMMENT: buffer-size
2265 LOC: Config.readAheadGap
2268 The amount of data the cache will buffer ahead of what has been
2269 sent to the client when retrieving an object from another server.
2275 LOC: Config.negativeTtl
2278 Time-to-Live (TTL) for failed requests. Certain types of
2279 failures (such as "connection refused" and "404 Not Found") are
2280 negatively-cached for a configurable amount of time. The
2281 default is 5 minutes. Note that this is different from
2282 negative caching of DNS lookups.
2285 NAME: positive_dns_ttl
2288 LOC: Config.positiveDnsTtl
2291 Time-to-Live (TTL) for positive caching of successful DNS lookups.
2292 Default is 6 hours (360 minutes). If you want to minimize the
2293 use of Squid's ipcache, set this to 1, not 0.
2296 NAME: negative_dns_ttl
2299 LOC: Config.negativeDnsTtl
2302 Time-to-Live (TTL) for negative caching of failed DNS lookups.
2305 NAME: range_offset_limit
2308 LOC: Config.rangeOffsetLimit
2311 Sets a upper limit on how far into the the file a Range request
2312 may be to cause Squid to prefetch the whole file. If beyond this
2313 limit Squid forwards the Range request as it is and the result
2316 This is to stop a far ahead range request (lets say start at 17MB)
2317 from making Squid fetch the whole object up to that point before
2318 sending anything to the client.
2320 A value of -1 causes Squid to always fetch the object from the
2321 beginning so it may cache the result. (2.0 style)
2323 A value of 0 causes Squid to never fetch more than the
2324 client requested. (default)
2329 -----------------------------------------------------------------------------
2332 NAME: forward_timeout
2335 LOC: Config.Timeout.forward
2338 This parameter specifies how long Squid should at most attempt in
2339 finding a forwarding path for the request before giving up.
2342 NAME: connect_timeout
2345 LOC: Config.Timeout.connect
2348 This parameter specifies how long to wait for the TCP connect to
2349 the requested server or peer to complete before Squid should
2350 attempt to find another path where to forward the request.
2353 NAME: peer_connect_timeout
2356 LOC: Config.Timeout.peer_connect
2359 This parameter specifies how long to wait for a pending TCP
2360 connection to a peer cache. The default is 30 seconds. You
2361 may also set different timeout values for individual neighbors
2362 with the 'connect-timeout' option on a 'cache_peer' line.
2368 LOC: Config.Timeout.read
2371 The read_timeout is applied on server-side connections. After
2372 each successful read(), the timeout will be extended by this
2373 amount. If no data is read again after this amount of time,
2374 the request is aborted and logged with ERR_READ_TIMEOUT. The
2375 default is 15 minutes.
2378 NAME: request_timeout
2380 LOC: Config.Timeout.request
2383 How long to wait for an HTTP request after initial
2384 connection establishment.
2387 NAME: persistent_request_timeout
2389 LOC: Config.Timeout.persistent_request
2392 How long to wait for the next HTTP request on a persistent
2393 connection after the previous request completes.
2396 NAME: client_lifetime
2399 LOC: Config.Timeout.lifetime
2402 The maximum amount of time a client (browser) is allowed to
2403 remain connected to the cache process. This protects the Cache
2404 from having a lot of sockets (and hence file descriptors) tied up
2405 in a CLOSE_WAIT state from remote clients that go away without
2406 properly shutting down (either because of a network failure or
2407 because of a poor client implementation). The default is one
2410 NOTE: The default value is intended to be much larger than any
2411 client would ever need to be connected to your cache. You
2412 should probably change client_lifetime only as a last resort.
2413 If you seem to have many client connections tying up
2414 filedescriptors, we recommend first tuning the read_timeout,
2415 request_timeout, persistent_request_timeout and quick_abort values.
2418 NAME: half_closed_clients
2420 LOC: Config.onoff.half_closed_clients
2423 Some clients may shutdown the sending side of their TCP
2424 connections, while leaving their receiving sides open. Sometimes,
2425 Squid can not tell the difference between a half-closed and a
2426 fully-closed TCP connection. By default, half-closed client
2427 connections are kept open until a read(2) or write(2) on the
2428 socket returns an error. Change this option to 'off' and Squid
2429 will immediately close client connections when read(2) returns
2430 "no more data to read."
2435 LOC: Config.Timeout.pconn
2436 DEFAULT: 120 seconds
2438 Timeout for idle persistent connections to servers and other
2445 LOC: Config.Timeout.ident
2448 Maximum time to wait for IDENT lookups to complete.
2450 If this is too high, and you enabled IDENT lookups from untrusted
2451 users, you might be susceptible to denial-of-service by having
2452 many ident requests going at once.
2455 NAME: shutdown_lifetime
2458 LOC: Config.shutdownLifetime
2461 When SIGTERM or SIGHUP is received, the cache is put into
2462 "shutdown pending" mode until all active sockets are closed.
2463 This value is the lifetime to set for all open descriptors
2464 during shutdown mode. Any active clients after this many
2465 seconds will receive a 'timeout' message.
2470 -----------------------------------------------------------------------------
2478 Defining an Access List
2480 acl aclname acltype string1 ...
2481 acl aclname acltype "file" ...
2483 when using "file", the file should contain one item per line
2485 acltype is one of the types described below
2487 By default, regular expressions are CASE-SENSITIVE. To make
2488 them case-insensitive, use the -i option.
2490 acl aclname src ip-address/netmask ... (clients IP address)
2491 acl aclname src addr1-addr2/netmask ... (range of addresses)
2492 acl aclname dst ip-address/netmask ... (URL host's IP address)
2493 acl aclname myip ip-address/netmask ... (local socket IP address)
2495 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
2496 # The arp ACL requires the special configure option --enable-arp-acl.
2497 # Furthermore, the ARP ACL code is not portable to all operating systems.
2498 # It works on Linux, Solaris, Windows, FreeBSD, and some other *BSD variants.
2500 # NOTE: Squid can only determine the MAC address for clients that are on
2501 # the same subnet. If the client is on a different subnet, then Squid cannot
2502 # find out its MAC address.
2504 acl aclname srcdomain .foo.com ... # reverse lookup, client IP
2505 acl aclname dstdomain .foo.com ... # Destination server from URL
2506 acl aclname srcdom_regex [-i] xxx ... # regex matching client name
2507 acl aclname dstdom_regex [-i] xxx ... # regex matching server
2508 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
2509 # based URL is used and no match is found. The name "none" is used
2510 # if the reverse lookup fails.
2512 acl aclname http_status 200 301 500- 400-403 ... # status code in reply
2514 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
2523 h1:m1 must be less than h2:m2
2524 acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
2525 acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path
2526 acl aclname port 80 70 21 ...
2527 acl aclname port 0-1024 ... # ranges allowed
2528 acl aclname myport 3128 ... # (local socket TCP port)
2529 acl aclname proto HTTP FTP ...
2530 acl aclname method GET POST ...
2531 acl aclname browser [-i] regexp ...
2532 # pattern match on User-Agent header (see also req_header below)
2533 acl aclname referer_regex [-i] regexp ...
2534 # pattern match on Referer header
2535 # Referer is highly unreliable, so use with care
2536 acl aclname ident username ...
2537 acl aclname ident_regex [-i] pattern ...
2538 # string match on ident output.
2539 # use REQUIRED to accept any non-null ident.
2540 acl aclname src_as number ...
2541 acl aclname dst_as number ...
2542 # Except for access control, AS numbers can be used for
2543 # routing of requests to specific caches. Here's an
2544 # example for routing all requests for AS#1241 and only
2545 # those to mycache.mydomain.net:
2546 # acl asexample dst_as 1241
2547 # cache_peer_access mycache.mydomain.net allow asexample
2548 # cache_peer_access mycache_mydomain.net deny all
2550 acl aclname proxy_auth [-i] username ...
2551 acl aclname proxy_auth_regex [-i] pattern ...
2552 # list of valid usernames
2553 # use REQUIRED to accept any valid username.
2555 # NOTE: when a Proxy-Authentication header is sent but it is not
2556 # needed during ACL checking the username is NOT logged
2559 # NOTE: proxy_auth requires a EXTERNAL authentication program
2560 # to check username/password combinations (see
2561 # auth_param directive).
2563 # NOTE: proxy_auth can't be used in a transparent proxy as
2564 # the browser needs to be configured for using a proxy in order
2565 # to respond to proxy authentication.
2567 acl aclname snmp_community string ...
2568 # A community string to limit access to your SNMP Agent
2571 # acl snmppublic snmp_community public
2573 acl aclname maxconn number
2574 # This will be matched when the client's IP address has
2575 # more than <number> HTTP connections established.
2577 acl aclname max_user_ip [-s] number
2578 # This will be matched when the user attempts to log in from more
2579 # than <number> different ip addresses. The authenticate_ip_ttl
2580 # parameter controls the timeout on the ip entries.
2581 # If -s is specified the limit is strict, denying browsing
2582 # from any further IP addresses until the ttl has expired. Without
2583 # -s Squid will just annoy the user by "randomly" denying requests.
2584 # (the counter is reset each time the limit is reached and a
2585 # request is denied)
2586 # NOTE: in acceleration mode or where there is mesh of child proxies,
2587 # clients may appear to come from multiple addresses if they are
2588 # going through proxy farms, so a limit of 1 may cause user problems.
2590 acl aclname rep_mime_type mime-type1 ...
2591 # regex match against the mime type of the reply received by
2592 # squid. Can be used to detect file download or some
2593 # types HTTP tunneling requests.
2594 # NOTE: This has no effect in http_access rules. It only has
2595 # effect in rules that affect the reply data stream such as
2596 # http_reply_access.
2598 acl aclname rep_header header-name [-i] any\.regex\.here
2599 # regex match against any of the known reply headers. May be
2600 # thought of as a superset of "browser", "referer" and "mime-type"
2603 acl aclname req_mime_type mime-type1 ...
2604 # regex match agains the mime type of the request generated
2605 # by the client. Can be used to detect file upload or some
2606 # types HTTP tunneling requests.
2607 # NOTE: This does NOT match the reply. You cannot use this
2608 # to match the returned file type.
2610 acl aclname req_header header-name [-i] any\.regex\.here
2611 # regex match against any of the known request headers. May be
2612 # thought of as a superset of "browser", "referer" and "mime-type"
2615 acl acl_name external class_name [arguments...]
2616 # external ACL lookup via a helper class defined by the
2617 # external_acl_type directive.
2619 acl aclname user_cert attribute values...
2620 # match against attributes in a user SSL certificate
2621 # attribute is one of DN/C/O/CN/L/ST
2623 acl aclname ca_cert attribute values...
2624 # match against attributes a users issuing CA SSL certificate
2625 # attribute is one of DN/C/O/CN/L/ST
2627 acl aclname ext_user username ...
2628 acl aclname ext_user_regex [-i] pattern ...
2629 # string match on username returned by external acl processing
2630 # use REQUIRED to accept any non-null user name.
2633 acl macaddress arp 09:00:2b:23:45:67
2634 acl myexample dst_as 1241
2635 acl password proxy_auth REQUIRED
2636 acl fileupload req_mime_type -i ^multipart/form-data$
2637 acl javascript rep_mime_type -i ^application/x-javascript$
2640 #Recommended minimum configuration:
2641 acl all src 0.0.0.0/0.0.0.0
2642 acl manager proto cache_object
2643 acl localhost src 127.0.0.1/255.255.255.255
2644 acl to_localhost dst 127.0.0.0/8
2645 acl SSL_ports port 443
2646 acl Safe_ports port 80 # http
2647 acl Safe_ports port 21 # ftp
2648 acl Safe_ports port 443 # https
2649 acl Safe_ports port 70 # gopher
2650 acl Safe_ports port 210 # wais
2651 acl Safe_ports port 1025-65535 # unregistered ports
2652 acl Safe_ports port 280 # http-mgmt
2653 acl Safe_ports port 488 # gss-http
2654 acl Safe_ports port 591 # filemaker
2655 acl Safe_ports port 777 # multiling http
2656 acl CONNECT method CONNECT
2662 LOC: Config.accessList.http
2664 DEFAULT_IF_NONE: deny all
2666 Allowing or Denying access based on defined access lists
2668 Access to the HTTP port:
2669 http_access allow|deny [!]aclname ...
2671 NOTE on default values:
2673 If there are no "access" lines present, the default is to deny
2676 If none of the "access" lines cause a match, the default is the
2677 opposite of the last line in the list. If the last line was
2678 deny, the default is allow. Conversely, if the last line
2679 is allow, the default will be deny. For these reasons, it is a
2680 good idea to have an "deny all" or "allow all" entry at the end
2681 of your access lists to avoid potential confusion.
2684 #Recommended minimum configuration:
2686 # Only allow cachemgr access from localhost
2687 http_access allow manager localhost
2688 http_access deny manager
2689 # Deny requests to unknown ports
2690 http_access deny !Safe_ports
2691 # Deny CONNECT to other than SSL ports
2692 http_access deny CONNECT !SSL_ports
2694 # We strongly recommend the following be uncommented to protect innocent
2695 # web applications running on the proxy server who think the only
2696 # one who can access services on "localhost" is a local user
2697 #http_access deny to_localhost
2699 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
2701 # Example rule allowing access from your local networks. Adapt
2702 # to list your (internal) IP networks from where browsing should
2704 #acl our_networks src 192.168.1.0/24 192.168.2.0/24
2705 #http_access allow our_networks
2707 # And finally deny all other access to this proxy
2708 http_access deny all
2712 NAME: http_reply_access
2714 LOC: Config.accessList.reply
2716 DEFAULT_IF_NONE: allow all
2718 Allow replies to client requests. This is complementary to http_access.
2720 http_reply_access allow|deny [!] aclname ...
2722 NOTE: if there are no access lines present, the default is to allow
2725 If none of the access lines cause a match the opposite of the
2726 last line will apply. Thus it is good practice to end the rules
2727 with an "allow all" or "deny all" entry.
2732 LOC: Config.accessList.icp
2734 DEFAULT_IF_NONE: deny all
2736 Allowing or Denying access to the ICP port based on defined
2739 icp_access allow|deny [!]aclname ...
2741 See http_access for details
2744 #Allow ICP queries from everyone
2745 icp_access allow all
2752 LOC: Config.accessList.htcp
2754 DEFAULT_IF_NONE: deny all
2756 Allowing or Denying access to the HTCP port based on defined
2759 htcp_access allow|deny [!]aclname ...
2761 See http_access for details
2763 #Allow HTCP queries from everyone
2764 htcp_access allow all
2767 NAME: htcp_clr_access
2770 LOC: Config.accessList.htcp_clr
2772 DEFAULT_IF_NONE: deny all
2774 Allowing or Denying access to purge content using HTCP based
2775 on defined access lists
2777 htcp_clr_access allow|deny [!]aclname ...
2779 See http_access for details
2781 #Allow HTCP CLR requests from trusted peers
2782 acl htcp_clr_peer src 172.16.1.2
2783 htcp_clr_access allow htcp_clr_peer
2788 LOC: Config.accessList.miss
2791 Use to force your neighbors to use you as a sibling instead of
2792 a parent. For example:
2794 acl localclients src 172.16.0.0/16
2795 miss_access allow localclients
2796 miss_access deny !localclients
2798 This means only your local clients are allowed to fetch
2799 MISSES and all other clients can only fetch HITS.
2801 By default, allow all clients who passed the http_access rules
2802 to fetch MISSES from us.
2806 # miss_access allow all
2810 NAME: cache_peer_access
2815 Similar to 'cache_peer_domain' but provides more flexibility by
2818 cache_peer_access cache-host allow|deny [!]aclname ...
2820 The syntax is identical to 'http_access' and the other lists of
2821 ACL elements. See the comments for 'http_access' below, or
2822 the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
2825 NAME: ident_lookup_access
2829 DEFAULT_IF_NONE: deny all
2830 LOC: Config.accessList.identLookup
2832 A list of ACL elements which, if matched, cause an ident
2833 (RFC 931) lookup to be performed for this request. For
2834 example, you might choose to always perform ident lookups
2835 for your main multi-user Unix boxes, but not for your Macs
2836 and PCs. By default, ident lookups are not performed for
2839 To enable ident lookups for specific client addresses, you
2840 can follow this example:
2842 acl ident_aware_hosts src 198.168.1.0/255.255.255.0
2843 ident_lookup_access allow ident_aware_hosts
2844 ident_lookup_access deny all
2846 Only src type ACL checks are fully supported. A src_domain
2847 ACL might work at times, but it will not always provide
2851 NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
2854 LOC: Config.accessList.outgoing_tos
2856 Allows you to select a TOS/Diffserv value to mark outgoing
2857 connections with, based on the username or source address
2860 tcp_outgoing_tos ds-field [!]aclname ...
2862 Example where normal_service_net uses the TOS value 0x00
2863 and normal_service_net uses 0x20
2865 acl normal_service_net src 10.0.0.0/255.255.255.0
2866 acl good_service_net src 10.0.1.0/255.255.255.0
2867 tcp_outgoing_tos 0x00 normal_service_net 0x00
2868 tcp_outgoing_tos 0x20 good_service_net
2870 TOS/DSCP values really only have local significance - so you should
2871 know what you're specifying. For more, see RFC 2474
2873 The TOS/DSCP byte must be exactly that - a byte, value 0 - 255, or
2874 "default" to use whatever default your host has.
2876 Processing proceeds in the order specified, and stops at first fully
2880 NAME: clientside_tos
2883 LOC: Config.accessList.clientside_tos
2885 Allows you to select a TOS/Diffserv value to mark client-side
2886 connections with, based on the username or source address
2890 NAME: tcp_outgoing_address
2893 LOC: Config.accessList.outgoing_address
2895 Allows you to map requests to different outgoing IP addresses
2896 based on the username or sourceaddress of the user making
2899 tcp_outgoing_address ipaddr [[!]aclname] ...
2901 Example where requests from 10.0.0.0/24 will be forwarded
2902 with source address 10.1.0.1, 10.0.2.0/24 forwarded with
2903 source address 10.1.0.2 and the rest will be forwarded with
2904 source address 10.1.0.3.
2906 acl normal_service_net src 10.0.0.0/255.255.255.0
2907 acl good_service_net src 10.0.1.0/255.255.255.0
2908 tcp_outgoing_address 10.0.0.1 normal_service_net
2909 tcp_outgoing_address 10.0.0.2 good_service_net
2910 tcp_outgoing_address 10.0.0.3
2912 Processing proceeds in the order specified, and stops at first fully
2916 NAME: reply_header_max_size
2920 LOC: Config.maxReplyHeaderSize
2922 This specifies the maximum size for HTTP headers in a reply.
2923 Reply headers are usually relatively small (about 512 bytes).
2924 Placing a limit on the reply header size will catch certain
2925 bugs (for example with persistent connections) and possibly
2926 buffer-overflow or denial-of-service attacks.
2929 NAME: reply_body_max_size
2930 COMMENT: size [acl acl...]
2933 LOC: Config.ReplyBodySize
2935 This option specifies the maximum size of a reply body. It can be
2936 used to prevent users from downloading very large files, such as
2937 MP3's and movies. When the reply headers are received, the
2938 reply_body_max_size lines are processed, and the first line where
2939 all (if any) listed ACLs are true is used as the maximum body size
2942 This size is checked twice. First when we get the reply headers,
2943 we check the content-length value. If the content length value exists
2944 and is larger than the allowed size, the request is denied and the
2945 user receives an error message that says "the request or reply
2946 is too large." If there is no content-length, and the reply
2947 size exceeds this limit, the client's connection is just closed
2948 and they will receive a partial reply.
2950 WARNING: downstream caches probably can not detect a partial reply
2951 if there is no content-length header, so they will cache
2952 partial responses and give them out as hits. You should NOT
2953 use this option if you have downstream caches.
2955 WARNING: A maximum size smaller than the size of squid's error messages
2956 will cause an infinite loop and crash squid. Ensure that the smallest
2957 non-zero value you use is greater that the maximum header size plus
2958 the size of your largest error page.
2960 If you set this parameter none (the default), there will be
2966 LOC: Config.accessList.log
2968 COMMENT: allow|deny acl acl...
2970 This options allows you to control which requests gets logged
2971 to access.log (see access_log directive). Requests denied for
2972 logging will also not be accounted for in performance counters.
2976 ADMINISTRATIVE PARAMETERS
2977 -----------------------------------------------------------------------------
2983 LOC: Config.adminEmail
2985 Email-address of local cache manager who will receive
2986 mail if the cache dies. The default is "webmaster."
2992 LOC: Config.EmailFrom
2994 From: email-address for mail sent when the cache dies.
2995 The default is to use 'appname@unique_hostname'.
2996 Default appname value is "squid", can be changed into
2997 src/globals.h before building squid.
3003 LOC: Config.EmailProgram
3005 Email program used to send mail if the cache dies.
3006 The default is "mail". The specified program must complain
3007 with the standard Unix mail syntax:
3008 mail_program recipient < mailfile
3009 Optional command line options can be specified.
3012 NAME: cache_effective_user
3015 LOC: Config.effectiveUser
3017 If you start Squid as root, it will change its effective/real
3018 UID/GID to the user specified below. The default is to change
3019 to UID to nobody. If you define cache_effective_user, but not
3020 cache_effective_group, Squid sets the GID to the effective
3021 user's default group ID (taken from the password file) and
3022 supplementary group list from the from groups membership of
3023 cache_effective_user.
3026 NAME: cache_effective_group
3029 LOC: Config.effectiveGroup
3031 If you want Squid to run with a specific GID regardless of
3032 the group memberships of the effective user then set this
3033 to the group (or GID) you want Squid to run as. When set
3034 all other group privileges of the effective user is ignored
3035 and only this GID is effective. If Squid is not started as
3036 root the user starting Squid must be member of the specified
3040 NAME: httpd_suppress_version_string
3044 LOC: Config.onoff.httpd_suppress_version_string
3046 Suppress Squid version string info in HTTP headers and HTML error pages.
3049 NAME: visible_hostname
3051 LOC: Config.visibleHostname
3054 If you want to present a special hostname in error messages, etc,
3055 define this. Otherwise, the return value of gethostname()
3056 will be used. If you have multiple caches in a cluster and
3057 get errors about IP-forwarding you must set them to have individual
3058 names with this setting.
3061 NAME: unique_hostname
3063 LOC: Config.uniqueHostname
3066 If you want to have multiple machines with the same
3067 'visible_hostname' you must give each machine a different
3068 'unique_hostname' so forwarding loops can be detected.
3071 NAME: hostname_aliases
3073 LOC: Config.hostnameAliases
3076 A list of other DNS names your cache has.
3080 OPTIONS FOR THE CACHE REGISTRATION SERVICE
3081 -----------------------------------------------------------------------------
3083 This section contains parameters for the (optional) cache
3084 announcement service. This service is provided to help
3085 cache administrators locate one another in order to join or
3086 create cache hierarchies.
3088 An 'announcement' message is sent (via UDP) to the registration
3089 service by Squid. By default, the announcement message is NOT
3090 SENT unless you enable it with 'announce_period' below.
3092 The announcement message includes your hostname, plus the
3093 following information from this configuration file:
3099 All current information is processed regularly and made
3100 available on the Web at http://www.ircache.net/Cache/Tracker/.
3103 NAME: announce_period
3105 LOC: Config.Announce.period
3108 This is how frequently to send cache announcements. The
3109 default is `0' which disables sending the announcement
3112 To enable announcing your cache, just uncomment the line
3116 #To enable announcing your cache, just uncomment the line below.
3117 #announce_period 1 day
3123 DEFAULT: tracker.ircache.net
3124 LOC: Config.Announce.host
3130 LOC: Config.Announce.file
3136 LOC: Config.Announce.port
3138 announce_host and announce_port set the hostname and port
3139 number where the registration message will be sent.
3141 Hostname will default to 'tracker.ircache.net' and port will
3142 default default to 3131. If the 'filename' argument is given,
3143 the contents of that file will be included in the announce
3148 HTTPD-ACCELERATOR OPTIONS
3149 -----------------------------------------------------------------------------
3152 NAME: httpd_accel_surrogate_id
3155 LOC: Config.Accel.surrogate_id
3158 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
3159 need an identification token to allow control targeting. Because
3160 a farm of surrogates may all perform the same tasks, they may share
3161 an identification token.
3164 NAME: http_accel_surrogate_remote
3169 LOC: Config.onoff.surrogate_is_remote
3171 Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
3172 Set this to on to have squid behave as a remote surrogate.
3177 COMMENT: libxml2|expat|custom
3179 LOC: ESIParser::Type
3182 ESI markup is not strictly XML compatible. The custom ESI parser
3183 will give higher performance, but cannot handle non ASCII character
3188 DELAY POOL PARAMETERS
3189 -----------------------------------------------------------------------------
3193 TYPE: delay_pool_count
3198 This represents the number of delay pools to be used. For example,
3199 if you have one class 2 delay pool and one class 3 delays pool, you
3200 have a total of 2 delay pools.
3204 TYPE: delay_pool_class
3209 This defines the class of each delay pool. There must be exactly one
3210 delay_class line for each delay pool. For example, to define two
3211 delay pools, one of class 2 and one of class 3, the settings above
3215 delay_pools 4 # 4 delay pools
3216 delay_class 1 2 # pool 1 is a class 2 pool
3217 delay_class 2 3 # pool 2 is a class 3 pool
3218 delay_class 3 4 # pool 3 is a class 4 pool
3219 delay_class 4 5 # pool 4 is a class 5 pool
3221 The delay pool classes are:
3223 class 1 Everything is limited by a single aggregate
3226 class 2 Everything is limited by a single aggregate
3227 bucket as well as an "individual" bucket chosen
3228 from bits 25 through 32 of the IP address.
3230 class 3 Everything is limited by a single aggregate
3231 bucket as well as a "network" bucket chosen
3232 from bits 17 through 24 of the IP address and a
3233 "individual" bucket chosen from bits 17 through
3234 32 of the IP address.
3236 class 4 Everything in a class 3 delay pool, with an
3237 additional limit on a per user basis. This
3238 only takes effect if the username is established
3239 in advance - by forcing authentication in your
3242 class 5 Requests are grouped according their tag (see
3243 external_acl's tag= reply).
3245 NOTE: If an IP address is a.b.c.d
3246 -> bits 25 through 32 are "d"
3247 -> bits 17 through 24 are "c"
3248 -> bits 17 through 32 are "c * 256 + d"
3252 TYPE: delay_pool_access
3257 This is used to determine which delay pool a request falls into.
3259 delay_access is sorted per pool and the matching starts with pool 1,
3260 then pool 2, ..., and finally pool N. The first delay pool where the
3261 request is allowed is selected for the request. If it does not allow
3262 the request to any pool then the request is not delayed (default).
3264 For example, if you want some_big_clients in delay
3265 pool 1 and lotsa_little_clients in delay pool 2:
3268 delay_access 1 allow some_big_clients
3269 delay_access 1 deny all
3270 delay_access 2 allow lotsa_little_clients
3271 delay_access 2 deny all
3272 delay_access 3 allow authenticated_clients
3275 NAME: delay_parameters
3276 TYPE: delay_pool_rates
3281 This defines the parameters for a delay pool. Each delay pool has
3282 a number of "buckets" associated with it, as explained in the
3283 description of delay_class. For a class 1 delay pool, the syntax is:
3285 delay_parameters pool aggregate
3287 For a class 2 delay pool:
3289 delay_parameters pool aggregate individual
3291 For a class 3 delay pool:
3293 delay_parameters pool aggregate network individual
3295 For a class 4 delay pool:
3297 delay_parameters pool aggregate network individual user
3299 For a class 5 delay pool:
3301 delay_parameters pool tag
3303 The variables here are:
3305 pool a pool number - ie, a number between 1 and the
3306 number specified in delay_pools as used in
3309 aggregate the "delay parameters" for the aggregate bucket
3312 individual the "delay parameters" for the individual
3313 buckets (class 2, 3).
3315 network the "delay parameters" for the network buckets
3318 user the delay parameters for the user buckets
3321 tag the delay parameters for the tag buckets
3324 A pair of delay parameters is written restore/maximum, where restore is
3325 the number of bytes (not bits - modem and network speeds are usually
3326 quoted in bits) per second placed into the bucket, and maximum is the
3327 maximum number of bytes which can be in the bucket at any time.
3329 For example, if delay pool number 1 is a class 2 delay pool as in the
3330 above example, and is being used to strictly limit each host to 64kbps
3331 (plus overheads), with no overall limit, the line is:
3333 delay_parameters 1 -1/-1 8000/8000
3335 Note that the figure -1 is used to represent "unlimited".
3337 And, if delay pool number 2 is a class 3 delay pool as in the above
3338 example, and you want to limit it to a total of 256kbps (strict limit)
3339 with each 8-bit network permitted 64kbps (strict limit) and each
3340 individual host permitted 4800bps with a bucket maximum size of 64kb
3341 to permit a decent web page to be downloaded at a decent speed
3342 (if the network is not being limited due to overuse) but slow down
3343 large downloads more significantly:
3345 delay_parameters 2 32000/32000 8000/8000 600/8000
3347 There must be one delay_parameters line for each delay pool.
3349 Finally, for a class 4 delay pool as in the example - each user will
3350 be limited to 128Kb no matter how many workstations they are logged into.:
3352 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
3355 NAME: delay_initial_bucket_level
3356 COMMENT: (percent, 0-100)
3360 LOC: Config.Delay.initial
3362 The initial bucket percentage is used to determine how much is put
3363 in each bucket when squid starts, is reconfigured, or first notices
3364 a host accessing it (in class 2 and class 3, individual hosts and
3365 networks only have buckets associated with them once they have been
3370 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
3371 -----------------------------------------------------------------------------
3376 LOC: Config.Wccp.router
3381 TYPE: sockaddr_in_list
3382 LOC: Config.Wccp2.router
3386 Use this option to define your WCCP ``home'' router for
3389 wccp_router supports a single WCCP(v1) router
3391 wccp2_router supports multiple WCCPv2 routers
3393 only one of the two may be used at the same time and defines
3394 which version of WCCP to use.
3399 LOC: Config.Wccp.version
3403 This directive is only relevant if you need to set up WCCP(v1)
3404 to some very old and end-of-life Cisco routers. In all other
3405 setups it must be left unset or at the default setting.
3406 It defines an internal version in the WCCP(v1) protocol,
3407 with version 4 being the officially documented protocol.
3409 According to some users, Cisco IOS 11.2 and earlier only
3410 support WCCP version 3. If you're using that or an earlier
3411 version of IOS, you may need to change this value to 3, otherwise
3412 do not specify this parameter.
3415 NAME: wccp2_rebuild_wait
3417 LOC: Config.Wccp2.rebuildwait
3421 If this is enabled Squid will wait for the cache dir rebuild to finish
3422 before sending the first wccp2 HereIAm packet
3425 NAME: wccp2_forwarding_method
3427 LOC: Config.Wccp2.forwarding_method
3431 WCCP2 allows the setting of forwarding methods between the
3432 router/switch and the cache. Valid values are as follows:
3434 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
3435 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
3437 Currently (as of IOS 12.4) cisco routers only support GRE.
3438 Cisco switches only support the L2 redirect assignment method.
3441 NAME: wccp2_return_method
3443 LOC: Config.Wccp2.return_method
3447 WCCP2 allows the setting of return methods between the
3448 router/switch and the cache for packets that the cache
3449 decides not to handle. Valid values are as follows:
3451 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
3452 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
3454 Currently (as of IOS 12.4) cisco routers only support GRE.
3455 Cisco switches only support the L2 redirect assignment.
3457 If the "ip wccp redirect exclude in" command has been
3458 enabled on the cache interface, then it is still safe for
3459 the proxy server to use a l2 redirect method even if this
3460 option is set to GRE.
3463 NAME: wccp2_assignment_method
3465 LOC: Config.Wccp2.assignment_method
3469 WCCP2 allows the setting of methods to assign the WCCP hash
3470 Valid values are as follows:
3475 As a general rule, cisco routers support the hash assignment method
3476 and cisco switches support the mask assignment method.
3481 LOC: Config.Wccp2.info
3483 DEFAULT_IF_NONE: standard 0
3486 WCCP2 allows for multiple traffic services. There are two
3487 types: "standard" and "dynamic". The standard type defines
3488 one service id - http (id 0). The dynamic service ids can be from
3489 51 to 255 inclusive. In order to use a dynamic service id
3490 one must define the type of traffic to be redirected; this is done
3491 using the wccp2_service_info option.
3493 The "standard" type does not require a wccp2_service_info option,
3494 just specifying the service id will suffice.
3496 MD5 service authentication can be enabled by adding
3497 "password=<password>" to the end of this service declaration.
3501 wccp2_service standard 0 # for the 'web-cache' standard service
3502 wccp2_service dynamic 80 # a dynamic service type which will be
3503 # fleshed out with subsequent options.
3504 wccp2_service standard 0 password=foo
3508 NAME: wccp2_service_info
3509 TYPE: wccp2_service_info
3510 LOC: Config.Wccp2.info
3514 Dynamic WCCPv2 services require further information to define the
3515 traffic you wish to have diverted.
3519 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
3520 priority=<priority> ports=<port>,<port>..
3522 The relevant WCCPv2 flags:
3523 + src_ip_hash, dst_ip_hash
3524 + source_port_hash, dest_port_hash
3525 + src_ip_alt_hash, dst_ip_alt_hash
3526 + src_port_alt_hash, dst_port_alt_hash
3529 The port list can be one to eight entries.
3533 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
3534 priority=240 ports=80
3536 Note: the service id must have been defined by a previous
3537 'wccp2_service dynamic <id>' entry.
3542 LOC: Config.Wccp2.weight
3546 Each cache server gets assigned a set of the destination
3547 hash proportional to their weight.
3552 LOC: Config.Wccp.address
3558 LOC: Config.Wccp2.address
3562 Use this option if you require WCCP to use a specific
3565 The default behavior is to not bind to any specific address.
3569 PERSISTENT CONNECTION HANDLING
3570 -----------------------------------------------------------------------------
3572 Also see "pconn_timeout" in the TIMEOUTS section
3575 NAME: client_persistent_connections
3577 LOC: Config.onoff.client_pconns
3581 NAME: server_persistent_connections
3583 LOC: Config.onoff.server_pconns
3586 Persistent connection support for clients and servers. By
3587 default, Squid uses persistent connections (when allowed)
3588 with its clients and servers. You can use these options to
3589 disable persistent connections with clients and/or servers.
3592 NAME: persistent_connection_after_error
3594 LOC: Config.onoff.error_pconns
3597 With this directive the use of persistent connections after
3598 HTTP errors can be disabled. Useful if you have clients
3599 who fail to handle errors on persistent connections proper.
3602 NAME: detect_broken_pconn
3604 LOC: Config.onoff.detect_broken_server_pconns
3607 Some servers have been found to incorrectly signal the use
3608 of HTTP/1.0 persistent connections even on replies not
3609 compatible, causing significant delays. This server problem
3610 has mostly been seen on redirects.
3612 By enabling this directive Squid attempts to detect such
3613 broken replies and automatically assume the reply is finished
3614 after 10 seconds timeout.
3618 CACHE DIGEST OPTIONS
3619 -----------------------------------------------------------------------------
3622 NAME: digest_generation
3623 IFDEF: USE_CACHE_DIGESTS
3625 LOC: Config.onoff.digest_generation
3628 This controls whether the server will generate a Cache Digest
3629 of its contents. By default, Cache Digest generation is
3630 enabled if Squid is compiled with USE_CACHE_DIGESTS defined.
3633 NAME: digest_bits_per_entry
3634 IFDEF: USE_CACHE_DIGESTS
3636 LOC: Config.digest.bits_per_entry
3639 This is the number of bits of the server's Cache Digest which
3640 will be associated with the Digest entry for a given HTTP
3641 Method and URL (public key) combination. The default is 5.
3644 NAME: digest_rebuild_period
3645 IFDEF: USE_CACHE_DIGESTS
3648 LOC: Config.digest.rebuild_period
3651 This is the number of seconds between Cache Digest rebuilds.
3654 NAME: digest_rewrite_period
3656 IFDEF: USE_CACHE_DIGESTS
3658 LOC: Config.digest.rewrite_period
3661 This is the number of seconds between Cache Digest writes to
3665 NAME: digest_swapout_chunk_size
3668 IFDEF: USE_CACHE_DIGESTS
3669 LOC: Config.digest.swapout_chunk_size
3672 This is the number of bytes of the Cache Digest to write to
3673 disk at a time. It defaults to 4096 bytes (4KB), the Squid
3677 NAME: digest_rebuild_chunk_percentage
3678 COMMENT: (percent, 0-100)
3679 IFDEF: USE_CACHE_DIGESTS
3681 LOC: Config.digest.rebuild_chunk_percentage
3684 This is the percentage of the Cache Digest to be scanned at a
3685 time. By default it is set to 10% of the Cache Digest.
3689 ERROR PAGE CUSTOMISATION
3690 -----------------------------------------------------------------------------
3695 LOC: Config.denyInfoList
3698 Usage: deny_info err_page_name acl
3699 or deny_info http://... acl
3700 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
3702 This can be used to return a ERR_ page for requests which
3703 do not pass the 'http_access' rules. A single ACL will cause
3704 the http_access check to fail. If a 'deny_info' line exists
3705 for that ACL Squid returns a corresponding error page.
3707 You may use ERR_ pages that come with Squid or create your own pages
3708 and put them into the configured errors/ directory.
3710 Alternatively you can specify an error URL. The browsers will
3711 get redirected (302) to the specified URL. %s in the redirection
3712 URL will be replaced by the requested URL.
3714 Alternatively you can tell Squid to reset the TCP connection
3715 by specifying TCP_RESET.
3718 NAME: error_directory
3720 LOC: Config.errorDirectory
3721 DEFAULT: @DEFAULT_ERROR_DIR@
3723 If you wish to create your own versions of the default
3724 (English) error files, either to customize them to suit your
3725 language or company copy the template English files to another
3726 directory and point this tag at them.
3728 The squid developers are interested in making squid available in
3729 a wide variety of languages. If you are making translations for a
3730 langauge that Squid does not currently provide please consider
3731 contributing your translation back to the project.
3736 LOC: Config.errHtmlText
3739 HTML text to include in error messages. Make this a "mailto"
3740 URL to your admin address, or maybe just a link to your
3741 organizations Web page.
3743 To include this in your error messages, you must rewrite
3744 the error template files (found in the "errors" directory).
3745 Wherever you want the 'err_html_text' line to appear,
3746 insert a %L tag in the error template file.
3749 NAME: email_err_data
3752 LOC: Config.onoff.emailErrData
3755 If enabled, information about the occurred error will be
3756 included in the mailto links of the ERR pages (if %W is set)
3757 so that the email body contains the data.
3758 Syntax is <A HREF="mailto:%w%W">%w</A>
3763 -----------------------------------------------------------------------------
3768 LOC: Config.dns_testname_list
3770 DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com
3772 The DNS tests exit as soon as the first site is successfully looked up
3774 This test can be disabled with the -D command line option.
3777 NAME: logfile_rotate
3780 LOC: Config.Log.rotateNumber
3782 Specifies the number of logfile rotations to make when you
3783 type 'squid -k rotate'. The default is 10, which will rotate
3784 with extensions 0 through 9. Setting logfile_rotate to 0 will
3785 disable the file name rotation, but the logfiles are still closed
3786 and re-opened. This will enable you to rename the logfiles
3787 yourself just before sending the rotate signal.
3789 Note, the 'squid -k rotate' command normally sends a USR1
3790 signal to the running squid process. In certain situations
3791 (e.g. on Linux with Async I/O), USR1 is used for other
3792 purposes, so -k rotate uses another signal. It is best to get
3793 in the habit of using 'squid -k rotate' instead of 'kill -USR1
3799 LOC: Config.appendDomain
3802 Appends local domain name to hostnames without any dots in
3803 them. append_domain must begin with a period.
3805 Be warned there are now Internet names with no dots in
3806 them using only top-domain names, so setting this may
3807 cause some Internet sites to become unavailable.
3810 append_domain .yourdomain.com
3813 NAME: tcp_recv_bufsize
3817 LOC: Config.tcpRcvBufsz
3819 Size of receive buffer to set for TCP sockets. Probably just
3820 as easy to change your kernel's default. Set to zero to use
3821 the default buffer size.
3828 LOC: Config.onoff.mem_pools
3830 If set, Squid will keep pools of allocated (but unused) memory
3831 available for future use. If memory is a premium on your
3832 system and you believe your malloc library outperforms Squid
3833 routines, disable this.
3836 NAME: memory_pools_limit
3840 LOC: Config.MemPools.limit
3842 Used only with memory_pools on:
3843 memory_pools_limit 50 MB
3845 If set to a non-zero value, Squid will keep at most the specified
3846 limit of allocated (but unused) memory in memory pools. All free()
3847 requests that exceed this limit will be handled by your malloc
3848 library. Squid does not pre-allocate any memory, just safe-keeps
3849 objects that otherwise would be free()d. Thus, it is safe to set
3850 memory_pools_limit to a reasonably high value even if your
3851 configuration will use less memory.
3853 If set to zero, Squid will keep all memory it can. That is, there
3854 will be no limit on the total amount of memory used for safe-keeping.
3856 To disable memory allocation optimization, do not set
3857 memory_pools_limit to 0. Set memory_pools to "off" instead.
3859 An overhead for maintaining memory pools is not taken into account
3860 when the limit is checked. This overhead is close to four bytes per
3861 object kept. However, pools may actually _save_ memory because of
3862 reduced memory thrashing in your malloc library.
3866 IFDEF: HTTP_VIOLATIONS
3870 LOC: Config.onoff.via
3872 If set (default), Squid will include a Via header in requests and
3873 replies as required by RFC2616.
3880 LOC: opt_forwarded_for
3882 If set, Squid will include your system's IP address or name
3883 in the HTTP requests it forwards. By default it looks like
3886 X-Forwarded-For: 192.1.2.3
3888 If you disable this, it will appear as
3890 X-Forwarded-For: unknown
3893 NAME: log_icp_queries
3897 LOC: Config.onoff.log_udp
3899 If set, ICP queries are logged to access.log. You may wish
3900 do disable this if your ICP load is VERY high to speed things
3901 up or to simplify log analysis.
3908 LOC: Config.onoff.icp_hit_stale
3910 If you want to return ICP_HIT for stale cache objects, set this
3911 option to 'on'. If you have sibling relationships with caches
3912 in other administrative domains, this should be 'off'. If you only
3913 have sibling relationships with caches under your control,
3914 it is probably okay to set this to 'on'.
3915 If set to 'on', your siblings should use the option "allow-miss"
3916 on their cache_peer lines for connecting to you.
3919 NAME: minimum_direct_hops
3922 LOC: Config.minDirectHops
3924 If using the ICMP pinging stuff, do direct fetches for sites
3925 which are no more than this many hops away.
3928 NAME: minimum_direct_rtt
3931 LOC: Config.minDirectRtt
3933 If using the ICMP pinging stuff, do direct fetches for sites
3934 which are no more than this many rtt milliseconds away.
3937 NAME: cachemgr_passwd
3938 TYPE: cachemgrpasswd
3940 LOC: Config.passwd_list
3942 Specify passwords for cachemgr operations.
3944 Usage: cachemgr_passwd password action action ...
3946 Some valid actions are (see cache manager menu for a full list):
3985 * Indicates actions which will not be performed without a
3986 valid password, others can be performed if not listed here.
3988 To disable an action, set the password to "disable".
3989 To allow performing an action without a password, set the
3992 Use the keyword "all" to set the same password for all actions.
3995 cachemgr_passwd secret shutdown
3996 cachemgr_passwd lesssssssecret info stats/objects
3997 cachemgr_passwd disable all
4000 NAME: store_avg_object_size
4004 LOC: Config.Store.avgObjectSize
4006 Average object size, used to estimate number of objects your
4007 cache can hold. See doc/Release-Notes-1.1.txt. The default is
4011 NAME: store_objects_per_bucket
4014 LOC: Config.Store.objectsPerBucket
4016 Target number of objects per bucket in the store hash table.
4017 Lowering this value increases the total number of buckets and
4018 also the storage maintenance rate. The default is 20.
4025 LOC: Config.onoff.client_db
4027 If you want to disable collecting per-client statistics,
4028 turn off client_db here.
4034 LOC: Config.Netdb.low
4040 LOC: Config.Netdb.high
4042 The low and high water marks for the ICMP measurement
4043 database. These are counts, not percents. The defaults are
4044 900 and 1000. When the high water mark is reached, database
4045 entries will be deleted until the low mark is reached.
4048 NAME: netdb_ping_period
4050 LOC: Config.Netdb.period
4053 The minimum period for measuring a site. There will be at
4054 least this much delay between successive pings to the same
4055 network. The default is five minutes.
4062 LOC: Config.onoff.query_icmp
4064 If you want to ask your peers to include ICMP data in their ICP
4065 replies, enable this option.
4067 If your peer has configured Squid (during compilation) with
4068 '--enable-icmp' that peer will send ICMP pings to origin server
4069 sites of the URLs it receives. If you enable this option the
4070 ICP replies from that peer will include the ICMP data (if available).
4071 Then, when choosing a parent cache, Squid will choose the parent with
4072 the minimal RTT to the origin server. When this happens, the
4073 hierarchy field of the access.log will be
4074 "CLOSEST_PARENT_MISS". This option is off by default.
4077 NAME: test_reachability
4081 LOC: Config.onoff.test_reachability
4083 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
4084 instead of ICP_MISS if the target host is NOT in the ICMP
4085 database, or has a zero RTT.
4092 LOC: Config.onoff.buffered_logs
4094 cache.log log file is written with stdio functions, and as such
4095 it can be buffered or unbuffered. By default it will be unbuffered.
4096 Buffering it can speed up the writing slightly (though you are
4097 unlikely to need to worry unless you run with tons of debugging
4098 enabled in which case performance will suffer badly anyway..).
4101 NAME: refresh_all_ims
4105 LOC: Config.onoff.refresh_all_ims
4107 When you enable this option, squid will always check
4108 the origin server for an update when a client sends an
4109 If-Modified-Since request. Many browsers use IMS
4110 requests when the user requests a reload, and this
4111 ensures those clients receive the latest version.
4113 By default (off), squid may return a Not Modified response
4114 based on the age of the cached version.
4117 NAME: reload_into_ims
4118 IFDEF: HTTP_VIOLATIONS
4122 LOC: Config.onoff.reload_into_ims
4124 When you enable this option, client no-cache or ``reload''
4125 requests will be changed to If-Modified-Since requests.
4126 Doing this VIOLATES the HTTP standard. Enabling this
4127 feature could make you liable for problems which it
4130 see also refresh_pattern for a more selective approach.
4135 LOC: Config.accessList.AlwaysDirect
4138 Usage: always_direct allow|deny [!]aclname ...
4140 Here you can use ACL elements to specify requests which should
4141 ALWAYS be forwarded directly to origin servers. For example,
4142 to always directly forward requests for local servers use
4145 acl local-servers dstdomain my.domain.net
4146 always_direct allow local-servers
4148 To always forward FTP requests directly, use
4151 always_direct allow FTP
4153 NOTE: There is a similar, but opposite option named
4154 'never_direct'. You need to be aware that "always_direct deny
4155 foo" is NOT the same thing as "never_direct allow foo". You
4156 may need to use a deny rule to exclude a more-specific case of
4157 some other rule. Example:
4159 acl local-external dstdomain external.foo.net
4160 acl local-servers dstdomain .foo.net
4161 always_direct deny local-external
4162 always_direct allow local-servers
4164 This option replaces some v1.1 options such as local_domain
4170 LOC: Config.accessList.NeverDirect
4173 Usage: never_direct allow|deny [!]aclname ...
4175 never_direct is the opposite of always_direct. Please read
4176 the description for always_direct if you have not already.
4178 With 'never_direct' you can use ACL elements to specify
4179 requests which should NEVER be forwarded directly to origin
4180 servers. For example, to force the use of a proxy for all
4181 requests, except those in your local domain use something like:
4183 acl local-servers dstdomain .foo.net
4184 acl all src 0.0.0.0/0.0.0.0
4185 never_direct deny local-servers
4186 never_direct allow all
4188 or if Squid is inside a firewall and there are local intranet
4189 servers inside the firewall use something like:
4191 acl local-intranet dstdomain .foo.net
4192 acl local-external dstdomain external.foo.net
4193 always_direct deny local-external
4194 always_direct allow local-intranet
4195 never_direct allow all
4197 This option replaces some v1.1 options such as inside_firewall
4201 NAME: request_header_access
4202 IFDEF: HTTP_VIOLATIONS
4203 TYPE: http_header_access[]
4204 LOC: Config.request_header_access
4207 Usage: request_header_access header_name allow|deny [!]aclname ...
4209 WARNING: Doing this VIOLATES the HTTP standard. Enabling
4210 this feature could make you liable for problems which it
4213 This option replaces the old 'anonymize_headers' and the
4214 older 'http_anonymizer' option with something that is much
4215 more configurable. This new method creates a list of ACLs
4216 for each header, allowing you very fine-tuned header
4219 This option only applies to request headers, i.e., from the
4220 client to the server.
4222 You can only specify known headers for the header name.
4223 Other headers are reclassified as 'Other'. You can also
4224 refer to all the headers with 'All'.
4226 For example, to achieve the same behavior as the old
4227 'http_anonymizer standard' option, you should use:
4229 request_header_access From deny all
4230 request_header_access Referer deny all
4231 request_header_access Server deny all
4232 request_header_access User-Agent deny all
4233 request_header_access WWW-Authenticate deny all
4234 request_header_access Link deny all
4236 Or, to reproduce the old 'http_anonymizer paranoid' feature
4239 request_header_access Allow allow all
4240 request_header_access Authorization allow all
4241 request_header_access WWW-Authenticate allow all
4242 request_header_access Proxy-Authorization allow all
4243 request_header_access Proxy-Authenticate allow all
4244 request_header_access Cache-Control allow all
4245 request_header_access Content-Encoding allow all
4246 request_header_access Content-Length allow all
4247 request_header_access Content-Type allow all
4248 request_header_access Date allow all
4249 request_header_access Expires allow all
4250 request_header_access Host allow all
4251 request_header_access If-Modified-Since allow all
4252 request_header_access Last-Modified allow all
4253 request_header_access Location allow all
4254 request_header_access Pragma allow all
4255 request_header_access Accept allow all
4256 request_header_access Accept-Charset allow all
4257 request_header_access Accept-Encoding allow all
4258 request_header_access Accept-Language allow all
4259 request_header_access Content-Language allow all
4260 request_header_access Mime-Version allow all
4261 request_header_access Retry-After allow all
4262 request_header_access Title allow all
4263 request_header_access Connection allow all
4264 request_header_access Proxy-Connection allow all
4265 request_header_access All deny all
4267 although many of those are HTTP reply headers, and so should be
4268 controlled with the reply_header_access directive.
4270 By default, all headers are allowed (no anonymizing is
4274 NAME: reply_header_access
4275 IFDEF: HTTP_VIOLATIONS
4276 TYPE: http_header_access[]
4277 LOC: Config.reply_header_access
4280 Usage: reply_header_access header_name allow|deny [!]aclname ...
4282 WARNING: Doing this VIOLATES the HTTP standard. Enabling
4283 this feature could make you liable for problems which it
4286 This option only applies to reply headers, i.e., from the
4287 server to the client.
4289 This is the same as request_header_access, but in the other
4292 This option replaces the old 'anonymize_headers' and the
4293 older 'http_anonymizer' option with something that is much
4294 more configurable. This new method creates a list of ACLs
4295 for each header, allowing you very fine-tuned header
4298 You can only specify known headers for the header name.
4299 Other headers are reclassified as 'Other'. You can also
4300 refer to all the headers with 'All'.
4302 For example, to achieve the same behavior as the old
4303 'http_anonymizer standard' option, you should use:
4305 reply_header_access From deny all
4306 reply_header_access Referer deny all
4307 reply_header_access Server deny all
4308 reply_header_access User-Agent deny all
4309 reply_header_access WWW-Authenticate deny all
4310 reply_header_access Link deny all
4312 Or, to reproduce the old 'http_anonymizer paranoid' feature
4315 reply_header_access Allow allow all
4316 reply_header_access Authorization allow all
4317 reply_header_access WWW-Authenticate allow all
4318 reply_header_access Proxy-Authorization allow all
4319 reply_header_access Proxy-Authenticate allow all
4320 reply_header_access Cache-Control allow all
4321 reply_header_access Content-Encoding allow all
4322 reply_header_access Content-Length allow all
4323 reply_header_access Content-Type allow all
4324 reply_header_access Date allow all
4325 reply_header_access Expires allow all
4326 reply_header_access Host allow all
4327 reply_header_access If-Modified-Since allow all
4328 reply_header_access Last-Modified allow all
4329 reply_header_access Location allow all
4330 reply_header_access Pragma allow all
4331 reply_header_access Accept allow all
4332 reply_header_access Accept-Charset allow all
4333 reply_header_access Accept-Encoding allow all
4334 reply_header_access Accept-Language allow all
4335 reply_header_access Content-Language allow all
4336 reply_header_access Mime-Version allow all
4337 reply_header_access Retry-After allow all
4338 reply_header_access Title allow all
4339 reply_header_access Connection allow all
4340 reply_header_access Proxy-Connection allow all
4341 reply_header_access All deny all
4343 although the HTTP request headers won't be usefully controlled
4344 by this directive -- see request_header_access for details.
4346 By default, all headers are allowed (no anonymizing is
4350 NAME: header_replace
4351 IFDEF: HTTP_VIOLATIONS
4352 TYPE: http_header_replace[]
4353 LOC: Config.request_header_access
4356 Usage: header_replace header_name message
4357 Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
4359 This option allows you to change the contents of headers
4360 denied with header_access above, by replacing them with
4361 some fixed string. This replaces the old fake_user_agent
4364 This only applies to request headers, not reply headers.
4366 By default, headers are removed if denied.
4369 NAME: icon_directory
4371 LOC: Config.icons.directory
4372 DEFAULT: @DEFAULT_ICON_DIR@
4374 Where the icons are stored. These are normally kept in
4378 NAME: global_internal_static
4380 LOC: Config.onoff.global_internal_static
4383 This directive controls is Squid should intercept all requests for
4384 /squid-internal-static/ no matter which host the URL is requesting
4385 (default on setting), or if nothing special should be done for
4386 such URLs (off setting). The purpose of this directive is to make
4387 icons etc work better in complex cache hierarchies where it may
4388 not always be possible for all corners in the cache mesh to reach
4389 the server generating a directory listing.
4392 NAME: short_icon_urls
4394 LOC: Config.icons.use_short_names
4397 If this is enabled Squid will use short URLs for icons.
4398 If disabled it will revert to the old behavior of including
4399 it's own name and port in the URL.
4401 If you run a complex cache hierarchy with a mix of Squid and
4402 other proxies you may need to disable this directive.
4405 NAME: maximum_single_addr_tries
4407 LOC: Config.retry.maxtries
4410 This sets the maximum number of connection attempts for a
4411 host that only has one address (for multiple-address hosts,
4412 each address is tried once).
4414 The default value is one attempt, the (not recommended)
4415 maximum is 255 tries. A warning message will be generated
4416 if it is set to a value greater than ten.
4418 Note: This is in addition to the request re-forwarding which
4419 takes place if Squid fails to get a satisfying response.
4422 NAME: retry_on_error
4424 LOC: Config.retry.onerror
4427 If set to on Squid will automatically retry requests when
4428 receiving an error response. This is mainly useful if you
4429 are in a complex cache hierarchy to work around access
4435 LOC: Config.Port.snmp
4439 Squid can now serve statistics and status information via SNMP.
4440 By default it listens to port 3401 on the machine. If you don't
4441 wish to use SNMP, set this to "0".
4443 Note: If you want Squid to use parents for all requests see
4444 the never_direct directive. prefer_direct only modifies how Squid
4445 acts on cachable requests.
4450 LOC: Config.accessList.snmp
4452 DEFAULT_IF_NONE: deny all
4455 Allowing or denying access to the SNMP port.
4457 All access to the agent is denied by default.
4460 snmp_access allow|deny [!]aclname ...
4463 snmp_access allow snmppublic localhost
4464 snmp_access deny all
4467 NAME: snmp_incoming_address
4469 LOC: Config.Addrs.snmp_incoming
4473 NAME: snmp_outgoing_address
4475 LOC: Config.Addrs.snmp_outgoing
4476 DEFAULT: 255.255.255.255
4479 Just like 'udp_incoming_address' above, but for the SNMP port.
4481 snmp_incoming_address is used for the SNMP socket receiving
4482 messages from SNMP agents.
4483 snmp_outgoing_address is used for SNMP packets returned to SNMP
4486 The default snmp_incoming_address (0.0.0.0) is to listen on all
4487 available network interfaces.
4489 If snmp_outgoing_address is set to 255.255.255.255 (the default)
4490 it will use the same socket as snmp_incoming_address. Only
4491 change this if you want to have SNMP replies sent using another
4492 address than where this Squid listens for SNMP queries.
4494 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
4495 the same value since they both use port 3401.
4498 NAME: as_whois_server
4500 LOC: Config.as_whois_server
4501 DEFAULT: whois.ra.net
4502 DEFAULT_IF_NONE: whois.ra.net
4504 WHOIS server to query for AS numbers. NOTE: AS numbers are
4505 queried only when Squid starts up, not for every request.
4508 NAME: incoming_icp_average
4511 LOC: Config.comm_incoming.icp_average
4514 NAME: incoming_http_average
4517 LOC: Config.comm_incoming.http_average
4520 NAME: incoming_dns_average
4523 LOC: Config.comm_incoming.dns_average
4526 NAME: min_icp_poll_cnt
4529 LOC: Config.comm_incoming.icp_min_poll
4532 NAME: min_dns_poll_cnt
4535 LOC: Config.comm_incoming.dns_min_poll
4538 NAME: min_http_poll_cnt
4541 LOC: Config.comm_incoming.http_min_poll
4543 Heavy voodoo here. I can't even believe you are reading this.
4544 Are you crazy? Don't even think about adjusting these unless
4545 you understand the algorithms in comm_select.c first!
4548 NAME: max_open_disk_fds
4550 LOC: Config.max_open_disk_fds
4553 To avoid having disk as the I/O bottleneck Squid can optionally
4554 bypass the on-disk cache if more than this amount of disk file
4555 descriptors are open.
4557 A value of 0 indicates no limit.
4562 LOC: Config.onoff.offline
4565 Enable this option and Squid will never try to validate cached
4569 NAME: uri_whitespace
4570 TYPE: uri_whitespace
4571 LOC: Config.uri_whitespace
4574 What to do with requests that have whitespace characters in the
4577 strip: The whitespace characters are stripped out of the URL.
4578 This is the behavior recommended by RFC2396.
4579 deny: The request is denied. The user receives an "Invalid
4581 allow: The request is allowed and the URI is not changed. The
4582 whitespace characters remain in the URI. Note the
4583 whitespace is passed to redirector processes if they
4585 encode: The request is allowed and the whitespace characters are
4586 encoded according to RFC1738. This could be considered
4587 a violation of the HTTP/1.1
4588 RFC because proxies are not allowed to rewrite URI's.
4589 chop: The request is allowed and the URI is chopped at the
4590 first whitespace. This might also be considered a
4597 LOC: Config.accessList.brokenPosts
4599 A list of ACL elements which, if matched, causes Squid to send
4600 an extra CRLF pair after the body of a PUT/POST request.
4602 Some HTTP servers has broken implementations of PUT/POST,
4603 and rely on an extra CRLF pair sent by some WWW clients.
4605 Quote from RFC 2068 section 4.1 on this matter:
4607 Note: certain buggy HTTP/1.0 client implementations generate an
4608 extra CRLF's after a POST request. To restate what is explicitly
4609 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
4610 a request with an extra CRLF.
4613 acl buggy_server url_regex ^http://....
4614 broken_posts allow buggy_server
4617 NAME: mcast_miss_addr
4618 IFDEF: MULTICAST_MISS_STREAM
4620 LOC: Config.mcast_miss.addr
4621 DEFAULT: 255.255.255.255
4623 If you enable this option, every "cache miss" URL will
4624 be sent out on the specified multicast address.
4626 Do not enable this option unless you are are absolutely
4627 certain you understand what you are doing.
4630 NAME: mcast_miss_ttl
4631 IFDEF: MULTICAST_MISS_STREAM
4633 LOC: Config.mcast_miss.ttl
4636 This is the time-to-live value for packets multicasted
4637 when multicasting off cache miss URLs is enabled. By
4638 default this is set to 'site scope', i.e. 16.
4641 NAME: mcast_miss_port
4642 IFDEF: MULTICAST_MISS_STREAM
4644 LOC: Config.mcast_miss.port
4647 This is the port number to be used in conjunction with
4651 NAME: mcast_miss_encode_key
4652 IFDEF: MULTICAST_MISS_STREAM
4654 LOC: Config.mcast_miss.encode_key
4655 DEFAULT: XXXXXXXXXXXXXXXX
4657 The URLs that are sent in the multicast miss stream are
4658 encrypted. This is the encryption key.
4661 NAME: nonhierarchical_direct
4663 LOC: Config.onoff.nonhierarchical_direct
4666 By default, Squid will send any non-hierarchical requests
4667 (matching hierarchy_stoplist or not cachable request type) direct
4670 If you set this to off, Squid will prefer to send these
4671 requests to parents.
4673 Note that in most configurations, by turning this off you will only
4674 add latency to these request without any improvement in global hit
4677 If you are inside an firewall see never_direct instead of
4683 LOC: Config.onoff.prefer_direct
4686 Normally Squid tries to use parents for most requests. If you for some
4687 reason like it to first try going direct and only use a parent if
4688 going direct fails set this to on.
4690 By combining nonhierarchical_direct off and prefer_direct on you
4691 can set up Squid to use a parent as a backup path if going direct
4695 NAME: strip_query_terms
4697 LOC: Config.onoff.strip_query_terms
4700 By default, Squid strips query terms from requested URLs before
4701 logging. This protects your user's privacy.
4706 LOC: Config.coredump_dir
4708 DEFAULT_IF_NONE: none
4710 By default Squid leaves core files in the directory from where
4711 it was started. If you set 'coredump_dir' to a directory
4712 that exists, Squid will chdir() to that directory at startup
4713 and coredump files will be left there.
4716 # Leave coredumps in the first cache dir
4717 coredump_dir @DEFAULT_SWAP_DIR@
4721 NAME: redirector_bypass
4723 LOC: Config.onoff.redirector_bypass
4726 When this is 'on', a request will not go through the
4727 redirector if all redirectors are busy. If this is 'off'
4728 and the redirector queue grows too large, Squid will exit
4729 with a FATAL error and ask you to increase the number of
4730 redirectors. You should only enable this if the redirectors
4731 are not critical to your caching system. If you use
4732 redirectors for access control, and you enable this option,
4733 users may have access to pages they should not
4734 be allowed to request.
4737 NAME: ignore_unknown_nameservers
4739 LOC: Config.onoff.ignore_unknown_nameservers
4742 By default Squid checks that DNS responses are received
4743 from the same IP addresses they are sent to. If they
4744 don't match, Squid ignores the response and writes a warning
4745 message to cache.log. You can allow responses from unknown
4746 nameservers by setting this option to 'off'.
4751 LOC: Config.chroot_dir
4754 Use this to have Squid do a chroot() while initializing. This
4755 also causes Squid to fully drop root privileges after
4756 initializing. This means, for example, if you use a HTTP
4757 port less than 1024 and try to reconfigure, you will get an
4761 NAME: balance_on_multiple_ip
4763 LOC: Config.onoff.balance_on_multiple_ip
4766 Some load balancing servers based on round robin DNS have been
4767 found not to preserve user session state across requests
4768 to different IP addresses.
4770 By default Squid rotates IP's per request. By disabling
4771 this directive only connection failure triggers rotation.
4774 NAME: pipeline_prefetch
4776 LOC: Config.onoff.pipeline_prefetch
4779 To boost the performance of pipelined requests to closer
4780 match that of a non-proxied environment Squid can try to fetch
4781 up to two requests in parallel from a pipeline.
4783 Defaults to off for bandwidth management and access logging
4787 NAME: extension_methods
4789 LOC: Config.ext_methods
4792 Squid only knows about standardized HTTP request methods.
4793 You can add up to 20 additional "extension" methods here.
4796 NAME: request_entities
4798 LOC: Config.onoff.request_entities
4801 Squid defaults to deny GET and HEAD requests with request entities,
4802 as the meaning of such requests are undefined in the HTTP standard
4803 even if not explicitly forbidden.
4805 Set this directive to on if you have clients which insists
4806 on sending request entities in GET or HEAD requests.
4809 NAME: high_response_time_warning
4812 LOC: Config.warnings.high_rptm
4815 If the one-minute median response time exceeds this value,
4816 Squid prints a WARNING with debug level 0 to get the
4817 administrators attention. The value is in milliseconds.
4820 NAME: high_page_fault_warning
4822 LOC: Config.warnings.high_pf
4825 If the one-minute average page fault rate exceeds this
4826 value, Squid prints a WARNING with debug level 0 to get
4827 the administrators attention. The value is in page faults
4831 NAME: high_memory_warning
4833 LOC: Config.warnings.high_memory
4836 If the memory usage (as determined by mallinfo) exceeds
4837 value, Squid prints a WARNING with debug level 0 to get
4838 the administrators attention.
4841 NAME: store_dir_select_algorithm
4843 LOC: Config.store_dir_select_algorithm
4846 Set this to 'round-robin' as an alternative.
4853 LOC: Config.Log.forward
4855 Logs the server-side requests.
4857 This is currently work in progress.
4863 LOC: Config.onoff.ie_refresh
4866 Microsoft Internet Explorer up until version 5.5 Service
4867 Pack 1 has an issue with transparent proxies, wherein it
4868 is impossible to force a refresh. Turning this on provides
4869 a partial fix to the problem, by causing all IMS-REFRESH
4870 requests from older IE versions to check the origin server
4871 for fresh content. This reduces hit ratio by some amount
4872 (~10% in my experience), but allows users to actually get
4873 fresh content when they want it. Note because Squid
4874 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
4875 of 5.5 is unchanged from old versions of Squid (i.e. a
4876 forced refresh is impossible). Newer versions of IE will,
4877 hopefully, continue to have the new behavior and will be
4878 handled based on that assumption. This option defaults to
4879 the old Squid behavior, which is better for hit ratios but
4880 worse for clients using IE, if they need to be able to
4881 force fresh content.
4884 NAME: vary_ignore_expire
4887 LOC: Config.onoff.vary_ignore_expire
4890 Many HTTP servers supporting Vary gives such objects
4891 immediate expiry time with no cache-control header
4892 when requested by a HTTP/1.0 client. This option
4893 enables Squid to ignore such expiry times until
4894 HTTP/1.1 is fully implemented.
4895 WARNING: This may eventually cause some varying
4896 objects not intended for caching to get cached.
4899 NAME: sleep_after_fork
4900 COMMENT: (microseconds)
4902 LOC: Config.sleep_after_fork
4905 When this is set to a non-zero value, the main Squid process
4906 sleeps the specified number of microseconds after a fork()
4907 system call. This sleep may help the situation where your
4908 system reports fork() failures due to lack of (virtual)
4909 memory. Note, however, if you have a lot of child
4910 processes, these sleep delays will add up and your
4911 Squid will not service requests for some amount of time
4912 until all the child processes have been started.
4913 On Windows value less then 1000 (1 millisencond) are
4917 NAME: minimum_expiry_time
4920 LOC: Config.minimum_expiry_time
4923 The minimum caching time according to (Expires - Date)
4924 Headers Squid honors if the object can't be revalidated
4925 defaults to 60 seconds. In reverse proxy enorinments it
4926 might be desirable to honor shorter object lifetimes. It
4927 is most likely better to make your server return a
4928 meaningful Last-Modified header however. In ESI environments
4929 where page fragments often have short lifetimes, this will
4930 often be best set to 0.
4933 NAME: relaxed_header_parser
4934 COMMENT: on|off|warn
4936 LOC: Config.onoff.relaxed_header_parser
4939 In the default "on" setting Squid accepts certain forms
4940 of non-compliant HTTP messages where it is unambiguous
4941 what the sending application intended even if the message
4942 is not correctly formatted. The messages is then normalized
4943 to the correct form when forwarded by Squid.
4945 If set to "warn" then a warning will be emitted in cache.log
4946 each time such HTTP error is encountered.
4948 If set to "off" then such HTTP errors will cause the request
4949 or response to be rejected.
4954 -----------------------------------------------------------------------------
4961 LOC: TheICAPConfig.onoff
4964 If you want to enable the ICAP module support, set this to on.
4967 NAME: icap_connect_timeout
4970 LOC: TheICAPConfig.connect_timeout_raw
4973 This parameter specifies how long to wait for the TCP connect to
4974 the requested ICAP server to complete before giving up and either
4975 terminating the HTTP transaction or bypassing the failure.
4977 The default for optional services is peer_connect_timeout.
4978 The default for essential services is connect_timeout.
4979 If this option is explicitly set, its value applies to all services.
4982 NAME: icap_io_timeout
4986 LOC: TheICAPConfig.io_timeout_raw
4989 This parameter specifies how long to wait for an I/O activity on
4990 an established, active ICAP connection before giving up and
4991 either terminating the HTTP transaction or bypassing the
4994 The default is read_timeout.
4997 NAME: icap_service_failure_limit
5000 LOC: TheICAPConfig.service_failure_limit
5003 The limit specifies the number of failures that Squid tolerates
5004 when establishing a new TCP connection with an ICAP service. If
5005 the number of failures exceeds the limit, the ICAP service is
5006 not used for new ICAP requests until it is time to refresh its
5007 OPTIONS. The per-service failure counter is reset to zero each
5008 time Squid fetches new service OPTIONS.
5010 A negative value disables the limit. Without the limit, an ICAP
5011 service will not be considered down due to connectivity failures
5012 between ICAP OPTIONS requests.
5015 NAME: icap_service_revival_delay
5018 LOC: TheICAPConfig.service_revival_delay
5021 The delay specifies the number of seconds to wait after an ICAP
5022 OPTIONS request failure before requesting the options again. The
5023 failed ICAP service is considered "down" until fresh OPTIONS are
5026 The actual delay cannot be smaller than the hardcoded minimum
5027 delay of 30 seconds.
5030 NAME: icap_preview_enable
5034 LOC: TheICAPConfig.preview_enable
5037 Set this to 'on' if you want to enable the ICAP preview
5041 NAME: icap_preview_size
5044 LOC: TheICAPConfig.preview_size
5047 The default size of preview data to be sent to the ICAP server.
5048 -1 means no preview. This value might be overwritten on a per server
5049 basis by OPTIONS requests.
5052 NAME: icap_default_options_ttl
5055 LOC: TheICAPConfig.default_options_ttl
5058 The default TTL value for ICAP OPTIONS responses that don't have
5059 an Options-TTL header.
5062 NAME: icap_persistent_connections
5066 LOC: TheICAPConfig.reuse_connections
5069 Whether or not Squid should use persistent connections to
5073 NAME: icap_send_client_ip
5077 LOC: TheICAPConfig.send_client_ip
5080 This adds the header "X-Client-IP" to ICAP requests.
5083 NAME: icap_send_client_username
5087 LOC: TheICAPConfig.send_client_username
5090 This sends authenticated HTTP client username (if available) to
5091 the ICAP service. The username value is encoded based on the
5092 icap_client_username_encode option and is sent using the header
5093 specified by the icap_client_username_header option.
5096 NAME: icap_client_username_header
5099 LOC: TheICAPConfig.client_username_header
5100 DEFAULT: X-Client-Username
5102 ICAP request header name to use for send_client_username.
5105 NAME: icap_client_username_encode
5109 LOC: TheICAPConfig.client_username_encode
5112 Whether to base64 encode the authenticated client username.
5116 TYPE: icap_service_type
5121 Defines a single ICAP service
5123 icap_service servicename vectoring_point bypass service_url
5125 vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
5126 This specifies at which point of request processing the ICAP
5127 service should be plugged in.
5129 If set to 1 and the ICAP server cannot be reached, the request will go
5130 through without being processed by an ICAP server
5131 service_url = icap://servername:port/service
5133 Note: reqmod_precache and respmod_postcache is not yet implemented
5136 icap_service service_1 reqmod_precache 0 icap://icap1.mydomain.net:1344/reqmod
5137 icap_service service_2 respmod_precache 0 icap://icap2.mydomain.net:1344/respmod
5141 TYPE: icap_class_type
5146 Defines an ICAP service chain. If there are multiple services per
5147 vectoring point, they are processed in the specified order.
5149 icap_class classname servicename...
5152 icap_class class_1 service_1 service_2
5153 icap class class_2 service_1 service_3
5157 TYPE: icap_access_type
5162 Redirects a request through an ICAP service class, depending
5165 icap_access classname allow|deny [!]aclname...
5167 The icap_access statements are processed in the order they appear in
5168 this configuration file. If an access list matches, the processing stops.
5169 For an "allow" rule, the specified class is used for the request. A "deny"
5170 rule simply stops processing without using the class. You can also use the
5171 special classname "None".
5173 For backward compatibility, it is also possible to use services
5176 icap_access class_1 allow all
5180 IFDEF: SO_ACCEPTFILTER
5183 LOC: Config.accept_filter
5185 The name of an accept(2) filter to install on Squid's
5186 listen socket(s). This feature is perhaps specific to
5187 FreeBSD and requires support in the kernel.
5189 The 'httpready' filter delays delivering new connections
5190 to Squid until a full HTTP request has been recieved.
5191 See the accf_http(9) man page.
5194 accept_filter httpready