3 # $Id: cf.data.pre,v 1.463 2007/08/30 13:03:42 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 interception of
85 outgoing requests without browser settings.
87 tproxy Support Linux TPROXY for spoofing outgoing
88 connections using the client IP address.
90 accel Accelerator mode. Also needs at least one of
91 vhost / vport / defaultsite.
93 defaultsite=domainname
94 What to use for the Host: header if it is not present
95 in a request. Determines what site (not origin server)
96 accelerators should consider the default.
99 vhost Accelerator mode using Host header for virtual
100 domain support. Implies accel.
102 vport Accelerator with IP based virtual host support.
105 vport=NN As above, but uses specified port number rather
106 than the http_port number. Implies accel.
108 protocol= Protocol to reconstruct accelerated requests with.
111 disable-pmtu-discovery=
112 Control Path-MTU discovery usage:
113 off lets OS decide on what to do (default).
114 transparent disable PMTU discovery when transparent
116 always disable always PMTU discovery.
118 In many setups of transparently intercepting proxies
119 Path-MTU discovery can not work on traffic towards the
120 clients. This is the case when the intercepting device
121 does not fully track connections and fails to forward
122 ICMP must fragment messages to the cache server. If you
123 have such setup and experience that certain clients
124 sporadically hang or never complete requests set
125 disable-pmtu-discovery option to 'transparent'.
127 If you run Squid on a dual-homed machine with an internal
128 and an external interface we recommend you to specify the
129 internal address:port in http_port. This way Squid will only be
130 visible on the internal address.
133 # Squid normally listens to port 3128
134 http_port @DEFAULT_HTTP_PORT@
140 TYPE: https_port_list
142 LOC: Config.Sockaddr.https
144 Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
146 The socket address where Squid will listen for HTTPS client
149 This is really only useful for situations where you are running
150 squid in accelerator mode and you want to do the SSL work at the
153 You may specify multiple socket addresses on multiple lines,
154 each with their own SSL certificate and/or options.
158 accel Accelerator mode. Also needs at least one of
159 defaultsite or vhost.
161 defaultsite= The name of the https site presented on
162 this port. Implies accel.
164 vhost Accelerator mode using Host header for virtual
165 domain support. Requires a wildcard certificate
166 or other certificate valid for more than one domain.
169 protocol= Protocol to reconstruct accelerated requests with.
172 cert= Path to SSL certificate (PEM format).
174 key= Path to SSL private key file (PEM format)
175 if not specified, the certificate file is
176 assumed to be a combined certificate and
179 version= The version of SSL/TLS supported
180 1 automatic (default)
185 cipher= Colon separated list of supported ciphers.
187 options= Various SSL engine options. The most important
189 NO_SSLv2 Disallow the use of SSLv2
190 NO_SSLv3 Disallow the use of SSLv3
191 NO_TLSv1 Disallow the use of TLSv1
192 SINGLE_DH_USE Always create a new key when using
193 temporary/ephemeral DH key exchanges
194 See src/ssl_support.c or OpenSSL SSL_CTX_set_options
195 documentation for a complete list of options.
197 clientca= File containing the list of CAs to use when
198 requesting a client certificate.
200 cafile= File containing additional CA certificates to
201 use when verifying client certificates. If unset
202 clientca will be used.
204 capath= Directory containing additional CA certificates
205 and CRL lists to use when verifying client certificates.
207 crlfile= File of additional CRL lists to use when verifying
208 the client certificate, in addition to CRLs stored in
209 the capath. Implies VERIFY_CRL flag below.
211 dhparams= File containing DH parameters for temporary/ephemeral
214 sslflags= Various flags modifying the use of SSL:
216 Don't request client certificates
217 immediately, but wait until acl processing
218 requires a certificate (not yet implemented).
220 Don't use the default CA lists built in
223 Don't allow for session reuse. Each connection
224 will result in a new SSL session.
226 Verify CRL lists when accepting client
229 Verify CRL lists for all certificates in the
230 client certificate chain.
232 sslcontext= SSL session ID context identifier.
234 vport Accelerator with IP based virtual host support.
236 vport=NN As above, but uses specified port number rather
237 than the https_port number. Implies accel.
243 -----------------------------------------------------------------------------
246 NAME: ssl_unclean_shutdown
250 LOC: Config.SSL.unclean_shutdown
252 Some browsers (especially MSIE) bugs out on SSL shutdown
259 LOC: Config.SSL.ssl_engine
262 The OpenSSL engine to use. You will need to set this if you
263 would like to use hardware SSL acceleration for example.
266 NAME: sslproxy_client_certificate
269 LOC: Config.ssl_client.cert
272 Client SSL Certificate to use when proxying https:// URLs
275 NAME: sslproxy_client_key
278 LOC: Config.ssl_client.key
281 Client SSL Key to use when proxying https:// URLs
284 NAME: sslproxy_version
287 LOC: Config.ssl_client.version
290 SSL version level to use when proxying https:// URLs
293 NAME: sslproxy_options
296 LOC: Config.ssl_client.options
299 SSL engine options to use when proxying https:// URLs
302 NAME: sslproxy_cipher
305 LOC: Config.ssl_client.cipher
308 SSL cipher list to use when proxying https:// URLs
311 NAME: sslproxy_cafile
314 LOC: Config.ssl_client.cafile
317 file containing CA certificates to use when verifying server
318 certificates while proxying https:// URLs
321 NAME: sslproxy_capath
324 LOC: Config.ssl_client.capath
327 directory containing CA certificates to use when verifying
328 server certificates while proxying https:// URLs
334 LOC: Config.ssl_client.flags
337 Various flags modifying the use of SSL while proxying https:// URLs:
338 DONT_VERIFY_PEER Accept certificates even if they fail to
340 NO_DEFAULT_CA Don't use the default CA list built in
344 NAME: sslpassword_program
347 LOC: Config.Program.ssl_password
350 Specify a program used for entering SSL key passphrases
351 when using encrypted SSL certificate keys. If not specified
352 keys must either be unencrypted, or Squid started with the -N
353 option to allow it to query interactively for the passphrase.
357 OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
358 -----------------------------------------------------------------------------
366 To specify other caches in a hierarchy, use the format:
368 cache_peer hostname type http-port icp-port [options]
373 # hostname type port port options
374 # -------------------- -------- ----- ----- -----------
375 cache_peer parent.foo.net parent 3128 3130 proxy-only default
376 cache_peer sib1.foo.net sibling 3128 3130 proxy-only
377 cache_peer sib2.foo.net sibling 3128 3130 proxy-only
379 type: either 'parent', 'sibling', or 'multicast'.
381 proxy-port: The port number where the cache listens for proxy
384 icp-port: Used for querying neighbor caches about
385 objects. To have a non-ICP neighbor
386 specify '7' for the ICP port and make sure the
387 neighbor machine has the UDP echo port
388 enabled in its /etc/inetd.conf file.
389 NOTE: Also requires icp_port option enabled to send/receive
390 requests via this method.
407 login=user:password | PASS | *:password
418 sslcert=/path/to/ssl/certificate
419 sslkey=/path/to/ssl/key
423 front-end-https[=on|auto]
425 use 'proxy-only' to specify objects fetched
426 from this cache should not be saved locally.
428 use 'weight=n' to affect the selection of a peer
429 during any weighted peer-selection mechanisms.
430 The weight must be an integer; default is 1,
431 larger weights are favored more.
432 This option does not affect parent selection if a peering
433 protocol is not in use.
435 use 'basetime=n' to specify a base amount to
436 be subtracted from round trip times of parents.
437 It is subtracted before division by weight in calculating
438 which parent to fectch from. If the rtt is less than the
439 base time the rtt is set to a minimal value.
441 use 'ttl=n' to specify a IP multicast TTL to use
442 when sending an ICP queries to this address.
443 Only useful when sending to a multicast group.
444 Because we don't accept ICP replies from random
445 hosts, you must configure other group members as
446 peers with the 'multicast-responder' option below.
448 use 'no-query' to NOT send ICP queries to this
451 use 'background-ping' to only send ICP queries to this
452 neighbor infrequently. This is used to keep the neighbor
453 round trip time updated and is usually used in
454 conjunction with weighted-round-robin.
456 use 'default' if this is a parent cache which can
457 be used as a "last-resort" if a peer cannot be located
458 by any of the peer-selection mechanisms.
459 If specified more than once, only the first is used.
461 use 'round-robin' to define a set of parents which
462 should be used in a round-robin fashion in the
463 absence of any ICP queries.
465 use 'weighted-round-robin' to define a set of parents
466 which should be used in a round-robin fashion with the
467 frequency of each parent being based on the round trip
468 time. Closer parents are used more often.
469 Usually used for background-ping parents.
471 use 'carp' to define a set of parents which should
472 be used as a CARP array. The requests will be
473 distributed among the parents based on the CARP load
474 balancing hash function based on their weigth.
476 'multicast-responder' indicates the named peer
477 is a member of a multicast group. ICP queries will
478 not be sent directly to the peer, but ICP replies
479 will be accepted from it.
481 'closest-only' indicates that, for ICP_OP_MISS
482 replies, we'll only forward CLOSEST_PARENT_MISSes
483 and never FIRST_PARENT_MISSes.
485 use 'no-digest' to NOT request cache digests from
488 'no-netdb-exchange' disables requesting ICMP
489 RTT database (NetDB) from the neighbor.
491 use 'no-delay' to prevent access to this neighbor
492 from influencing the delay pools.
494 use 'login=user:password' if this is a personal/workgroup
495 proxy and your parent requires proxy authentication.
496 Note: The string can include URL escapes (i.e. %20 for
497 spaces). This also means % must be written as %%.
499 use 'login=PASS' if users must authenticate against
500 the upstream proxy or in the case of a reverse proxy
501 configuration, the origin web server. This will pass
502 the users credentials as they are to the peer.
503 This only works for the Basic HTTP authentication scheme.
504 Note: To combine this with proxy_auth both proxies must
505 share the same user database as HTTP only allows for
506 a single login (one for proxy, one for origin server).
507 Also be warned this will expose your users proxy
508 password to the peer. USE WITH CAUTION
510 use 'login=*:password' to pass the username to the
511 upstream cache, but with a fixed password. This is meant
512 to be used when the peer is in another administrative
513 domain, but it is still needed to identify each user.
514 The star can optionally be followed by some extra
515 information which is added to the username. This can
516 be used to identify this proxy to the peer, similar to
517 the login=username:password option above.
519 use 'connect-timeout=nn' to specify a peer
520 specific connect timeout (also see the
521 peer_connect_timeout directive)
523 use 'digest-url=url' to tell Squid to fetch the cache
524 digest (if digests are enabled) for this host from
525 the specified URL rather than the Squid default
528 use 'allow-miss' to disable Squid's use of only-if-cached
529 when forwarding requests to siblings. This is primarily
530 useful when icp_hit_stale is used by the sibling. To
531 extensive use of this option may result in forwarding
532 loops, and you should avoid having two-way peerings
533 with this option. (for example to deny peer usage on
534 requests from peer by denying cache_peer_access if the
537 use 'max-conn=n' to limit the amount of connections Squid
538 may open to this peer.
540 use 'htcp' to send HTCP, instead of ICP, queries
541 to the neighbor. You probably also want to
542 set the "icp port" to 4827 instead of 3130.
544 use 'htcp-oldsquid' to send HTCP to old Squid versions
546 'originserver' causes this parent peer to be contacted as
547 a origin server. Meant to be used in accelerator setups.
549 use 'name=xxx' if you have multiple peers on the same
550 host but different ports. This name can be used to
551 differentiate the peers in cache_peer_access and similar
554 use 'forceddomain=name' to forcibly set the Host header
555 of requests forwarded to this peer. Useful in accelerator
556 setups where the server (peer) expects a certain domain
557 name and using redirectors to feed this domain name
560 use 'ssl' to indicate connections to this peer should
561 be SSL/TLS encrypted.
563 use 'sslcert=/path/to/ssl/certificate' to specify a client
564 SSL certificate to use when connecting to this peer.
566 use 'sslkey=/path/to/ssl/key' to specify the private SSL
567 key corresponding to sslcert above. If 'sslkey' is not
568 specified 'sslcert' is assumed to reference a
569 combined file containing both the certificate and the key.
571 use sslversion=1|2|3|4 to specify the SSL version to use
572 when connecting to this peer
573 1 = automatic (default)
578 use sslcipher=... to specify the list of valid SSL ciphers
579 to use when connecting to this peer.
581 use ssloptions=... to specify various SSL engine options:
582 NO_SSLv2 Disallow the use of SSLv2
583 NO_SSLv3 Disallow the use of SSLv3
584 NO_TLSv1 Disallow the use of TLSv1
585 See src/ssl_support.c or the OpenSSL documentation for
586 a more complete list.
588 use sslcafile=... to specify a file containing
589 additional CA certificates to use when verifying the
592 use sslcapath=... to specify a directory containing
593 additional CA certificates to use when verifying the
596 use sslcrlfile=... to specify a certificate revocation
597 list file to use when verifying the peer certificate.
599 use sslflags=... to specify various flags modifying the
602 Accept certificates even if they fail to
605 Don't use the default CA list built in
608 Don't verify the peer certificate
609 matches the server name
611 use ssldomain= to specify the peer name as advertised
612 in it's certificate. Used for verifying the correctness
613 of the received peer certificate. If not specified the
614 peer hostname will be used.
616 use front-end-https to enable the "Front-End-Https: On"
617 header needed when using Squid as a SSL frontend in front
618 of Microsoft OWA. See MS KB document Q307347 for details
619 on this header. If set to auto the header will
620 only be added if the request is forwarded as a https://
624 NAME: cache_peer_domain cache_host_domain
629 Use to limit the domains for which a neighbor cache will be
632 cache_peer_domain cache-host domain [domain ...]
633 cache_peer_domain cache-host !domain
635 For example, specifying
637 cache_peer_domain parent.foo.net .edu
639 has the effect such that UDP query packets are sent to
640 'bigserver' only when the requested object exists on a
641 server in the .edu domain. Prefixing the domainname
642 with '!' means the cache will be queried for objects
645 NOTE: * Any number of domains may be given for a cache-host,
646 either on the same or separate lines.
647 * When multiple domains are given for a particular
648 cache-host, the first matched domain is applied.
649 * Cache hosts with no domain restrictions are queried
651 * There are no defaults.
652 * There is also a 'cache_peer_access' tag in the ACL
656 NAME: neighbor_type_domain
661 usage: neighbor_type_domain neighbor parent|sibling domain domain ...
663 Modifying the neighbor type for specific domains is now
664 possible. You can treat some domains differently than the the
665 default neighbor type specified on the 'cache_peer' line.
666 Normally it should only be necessary to list domains which
667 should be treated differently because the default neighbor type
668 applies for hostnames which do not match domains listed here.
671 cache_peer parent cache.foo.org 3128 3130
672 neighbor_type_domain cache.foo.org sibling .com .net
673 neighbor_type_domain cache.foo.org sibling .au .de
676 NAME: dead_peer_timeout
680 LOC: Config.Timeout.deadPeer
682 This controls how long Squid waits to declare a peer cache
683 as "dead." If there are no ICP replies received in this
684 amount of time, Squid will declare the peer dead and not
685 expect to receive any further ICP replies. However, it
686 continues to send ICP queries, and will mark the peer as
687 alive upon receipt of the first subsequent ICP reply.
689 This timeout also affects when Squid expects to receive ICP
690 replies from peers. If more than 'dead_peer' seconds have
691 passed since the last ICP reply was received, Squid will not
692 expect to receive an ICP reply on the next query. Thus, if
693 your time between requests is greater than this timeout, you
694 will see a lot of requests sent DIRECT to origin servers
695 instead of to your parents.
698 NAME: hierarchy_stoplist
701 LOC: Config.hierarchy_stoplist
703 A list of words which, if found in a URL, cause the object to
704 be handled directly by this cache. In other words, use this
705 to not query neighbor caches for certain objects. You may
706 list this option multiple times.
707 Note: never_direct overrides this option.
709 #We recommend you to use at least the following line.
710 hierarchy_stoplist cgi-bin ?
717 LOC: Config.accessList.noCache
719 A list of ACL elements which, if matched, cause the request to
720 not be satisfied from the cache and the reply to not be cached.
721 In other words, use this to force certain objects to never be cached.
723 You must use the word 'DENY' to indicate the ACL names which should
726 Default is to allow all to be cached
728 #We recommend you to use the following two lines.
729 acl QUERY urlpath_regex cgi-bin \?
736 -----------------------------------------------------------------------------
743 LOC: Config.memMaxSize
745 NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
746 IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
747 USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
748 THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
750 'cache_mem' specifies the ideal amount of memory to be used
754 * Negative-Cached objects
756 Data for these objects are stored in 4 KB blocks. This
757 parameter specifies the ideal upper limit on the total size of
758 4 KB blocks allocated. In-Transit objects take the highest
761 In-transit objects have priority over the others. When
762 additional space is needed for incoming data, negative-cached
763 and hot objects will be released. In other words, the
764 negative-cached and hot objects will fill up any unused space
765 not needed for in-transit objects.
767 If circumstances require, this limit will be exceeded.
768 Specifically, if your incoming request rate requires more than
769 'cache_mem' of memory to hold in-transit objects, Squid will
770 exceed this limit to satisfy the new requests. When the load
771 decreases, blocks will be freed until the high-water mark is
772 reached. Thereafter, blocks will be used to store hot
776 NAME: maximum_object_size_in_memory
780 LOC: Config.Store.maxInMemObjSize
782 Objects greater than this size will not be attempted to kept in
783 the memory cache. This should be set high enough to keep objects
784 accessed frequently in memory to improve performance whilst low
785 enough to keep larger objects from hoarding cache_mem.
788 NAME: memory_replacement_policy
790 LOC: Config.memPolicy
793 The memory replacement policy parameter determines which
794 objects are purged from memory when memory space is needed.
796 See cache_replacement_policy for details.
801 -----------------------------------------------------------------------------
807 DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256
808 LOC: Config.cacheSwap
812 cache_dir Type Directory-Name Fs-specific-data [options]
814 You can specify multiple cache_dir lines to spread the
815 cache among different disk partitions.
817 Type specifies the kind of storage system to use. Only "ufs"
818 is built by default. To enable any of the other storage systems
819 see the --enable-storeio configure option.
821 'Directory' is a top-level directory where cache swap
822 files will be stored. If you want to use an entire disk
823 for caching, this can be the mount-point directory.
824 The directory must exist and be writable by the Squid
825 process. Squid will NOT create this directory for you.
829 "ufs" is the old well-known Squid storage format that has always
832 cache_dir ufs Directory-Name Mbytes L1 L2 [options]
834 'Mbytes' is the amount of disk space (MB) to use under this
835 directory. The default is 100 MB. Change this to suit your
836 configuration. Do NOT put the size of your disk drive here.
837 Instead, if you want Squid to use the entire disk drive,
838 subtract 20% and use that value.
840 'Level-1' is the number of first-level subdirectories which
841 will be created under the 'Directory'. The default is 16.
843 'Level-2' is the number of second-level subdirectories which
844 will be created under each first-level directory. The default
849 "aufs" uses the same storage format as "ufs", utilizing
850 POSIX-threads to avoid blocking the main Squid process on
851 disk-I/O. This was formerly known in Squid as async-io.
853 cache_dir aufs Directory-Name Mbytes L1 L2 [options]
855 see argument descriptions under ufs above
857 The diskd store type:
859 "diskd" uses the same storage format as "ufs", utilizing a
860 separate process to avoid blocking the main Squid process on
863 cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
865 see argument descriptions under ufs above
867 Q1 specifies the number of unacknowledged I/O requests when Squid
868 stops opening new files. If this many messages are in the queues,
869 Squid won't open new files. Default is 64
871 Q2 specifies the number of unacknowledged messages when Squid
872 starts blocking. If this many messages are in the queues,
873 Squid blocks until it receives some replies. Default is 72
875 When Q1 < Q2 (the default), the cache directory is optimized
876 for lower response time at the expense of a decrease in hit
877 ratio. If Q1 > Q2, the cache directory is optimized for
878 higher hit ratio at the expense of an increase in response
883 block-size=n defines the "block size" for COSS cache_dir's.
884 Squid uses file numbers as block numbers. Since file numbers
885 are limited to 24 bits, the block size determines the maximum
886 size of the COSS partition. The default is 512 bytes, which
887 leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
888 you should not change the coss block size after Squid
889 has written some objects to the cache_dir.
891 The coss file store has changed from 2.5. Now it uses a file
892 called 'stripe' in the directory names in the config - and
893 this will be created by squid -z.
897 no options are allowed or required
901 no-store, no new objects should be stored to this cache_dir
903 max-size=n, refers to the max object size this storedir supports.
904 It is used to initially choose the storedir to dump the object.
905 Note: To make optimal use of the max-size limits you should order
906 the cache_dir lines with the smallest max-size value first and the
907 ones with no max-size specification last.
909 Note for coss, max-size must be less than COSS_MEMBUF_SZ,
910 which can be changed with the --with-coss-membuf-size=N configure
914 NAME: store_dir_select_algorithm
916 LOC: Config.store_dir_select_algorithm
919 Set this to 'round-robin' as an alternative.
922 NAME: max_open_disk_fds
924 LOC: Config.max_open_disk_fds
927 To avoid having disk as the I/O bottleneck Squid can optionally
928 bypass the on-disk cache if more than this amount of disk file
929 descriptors are open.
931 A value of 0 indicates no limit.
934 NAME: cache_replacement_policy
936 LOC: Config.replPolicy
939 The cache replacement policy parameter determines which
940 objects are evicted (replaced) when disk space is needed.
942 lru : Squid's original list based LRU policy
943 heap GDSF : Greedy-Dual Size Frequency
944 heap LFUDA: Least Frequently Used with Dynamic Aging
945 heap LRU : LRU policy implemented using a heap
947 Applies to any cache_dir lines listed below this.
949 The LRU policies keeps recently referenced objects.
951 The heap GDSF policy optimizes object hit rate by keeping smaller
952 popular objects in cache so it has a better chance of getting a
953 hit. It achieves a lower byte hit rate than LFUDA though since
954 it evicts larger (possibly popular) objects.
956 The heap LFUDA policy keeps popular objects in cache regardless of
957 their size and thus optimizes byte hit rate at the expense of
958 hit rate since one large, popular object will prevent many
959 smaller, slightly less popular objects from being cached.
961 Both policies utilize a dynamic aging mechanism that prevents
962 cache pollution that can otherwise occur with frequency-based
963 replacement policies.
965 NOTE: if using the LFUDA replacement policy you should increase
966 the value of maximum_object_size above its default of 4096 KB to
967 to maximize the potential byte hit rate improvement of LFUDA.
969 For more information about the GDSF and LFUDA cache replacement
970 policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
971 and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
974 NAME: minimum_object_size
978 LOC: Config.Store.minObjectSize
980 Objects smaller than this size will NOT be saved on disk. The
981 value is specified in kilobytes, and the default is 0 KB, which
982 means there is no minimum.
985 NAME: maximum_object_size
989 LOC: Config.Store.maxObjectSize
991 Objects larger than this size will NOT be saved on disk. The
992 value is specified in kilobytes, and the default is 4MB. If
993 you wish to get a high BYTES hit ratio, you should probably
994 increase this (one 32 MB object hit counts for 3200 10KB
995 hits). If you wish to increase speed more than your want to
996 save bandwidth you should leave this low.
998 NOTE: if using the LFUDA replacement policy you should increase
999 this value to maximize the byte hit rate improvement of LFUDA!
1000 See replacement_policy below for a discussion of this policy.
1003 NAME: cache_swap_low
1004 COMMENT: (percent, 0-100)
1007 LOC: Config.Swap.lowWaterMark
1010 NAME: cache_swap_high
1011 COMMENT: (percent, 0-100)
1014 LOC: Config.Swap.highWaterMark
1017 The low- and high-water marks for cache object replacement.
1018 Replacement begins when the swap (disk) usage is above the
1019 low-water mark and attempts to maintain utilization near the
1020 low-water mark. As swap utilization gets close to high-water
1021 mark object eviction becomes more aggressive. If utilization is
1022 close to the low-water mark less replacement is done each time.
1024 Defaults are 90% and 95%. If you have a large cache, 5% could be
1025 hundreds of MB. If this is the case you may wish to set these
1026 numbers closer together.
1031 -----------------------------------------------------------------------------
1036 LOC: Config.Log.logformats
1041 logformat <name> <format specification>
1043 Defines an access log format.
1045 The <format specification> is a string with embedded % format codes
1047 % format codes all follow the same basic structure where all but
1048 the formatcode is optional. Output strings are automatically escaped
1049 as required according to their context and the output format
1050 modifiers are usually not needed, but can be specified if an explicit
1051 output format is desired.
1053 % ["|[|'|#] [-] [[0]width] [{argument}] formatcode
1055 " output in quoted string format
1056 [ output in squid text log format as used by log_mime_hdrs
1057 # output in URL quoted format
1061 width field width. If starting with 0 the
1062 output is zero padded
1063 {arg} argument such as header name etc
1067 >a Client source IP address
1069 >p Client source port
1070 <A Server IP address or peer name
1071 la Local IP address (http_port)
1072 lp Local port number (http_port)
1073 ts Seconds since epoch
1074 tu subsecond time (milliseconds)
1075 tl Local time. Optional strftime format argument
1076 default %d/%b/%Y:%H:%M:%S %z
1077 tg GMT time. Optional strftime format argument
1078 default %d/%b/%Y:%H:%M:%S %z
1079 tr Response time (milliseconds)
1080 >h Request header. Optional header name argument
1081 on the format header[:[separator]element]
1082 <h Reply header. Optional header name argument
1085 ul User name from authentication
1086 ui User name from ident
1087 us User name from SSL
1088 ue User name from external acl helper
1090 Ss Squid request status (TCP_MISS etc)
1091 Sh Squid hierarchy status (DEFAULT_PARENT etc)
1092 mt MIME content type
1093 rm Request method (GET/POST etc)
1095 rp Request URL-Path excluding hostname
1096 rv Request protocol version
1097 et Tag returned by external acl
1098 ea Log string returned by external acl
1099 <st Reply size including HTTP headers
1100 <sH Reply high offset sent
1101 <sS Upstream object size
1102 % a literal % character
1104 logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt
1105 logformat squidmime %ts.%03tu %6tr %>a %Ss/%03Hs %<st %rm %ru %un %Sh/%<A %mt [%>h] [%<h]
1106 logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh
1107 logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
1110 NAME: access_log cache_access_log
1112 LOC: Config.Log.accesslogs
1115 These files log client request activities. Has a line every HTTP or
1116 ICP request. The format is:
1117 access_log <filepath> [<logformat name> [acl acl ...]]
1118 access_log none [acl acl ...]]
1120 Will log to the specified file using the specified format (which
1121 must be defined in a logformat directive) those entries which match
1122 ALL the acl's specified (which must be defined in acl clauses).
1123 If no acl is specified, all requests will be logged to this file.
1125 To disable logging of a request use the filepath "none", in which case
1126 a logformat name should not be specified.
1128 To log the request via syslog specify a filepath of "syslog":
1130 access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
1131 where facility could be any of:
1132 authpriv, daemon, local0 .. local7 or user.
1134 And priority could be any of:
1135 err, warning, notice, info, debug.
1137 access_log @DEFAULT_ACCESS_LOG@ squid
1143 DEFAULT: @DEFAULT_CACHE_LOG@
1146 Cache logging file. This is where general information about
1147 your cache's behavior goes. You can increase the amount of data
1148 logged to this file with the "debug_options" tag below.
1151 NAME: cache_store_log
1153 DEFAULT: @DEFAULT_STORE_LOG@
1154 LOC: Config.Log.store
1156 Logs the activities of the storage manager. Shows which
1157 objects are ejected from the cache, and which objects are
1158 saved and for how long. To disable, enter "none". There are
1159 not really utilities to analyze this data, so you can safely
1163 NAME: cache_swap_state cache_swap_log
1165 LOC: Config.Log.swap
1168 Location for the cache "swap.state" file. This index file holds
1169 the metadata of objects saved on disk. It is used to rebuild
1170 the cache during startup. Normally this file resides in each
1171 'cache_dir' directory, but you may specify an alternate
1172 pathname here. Note you must give a full filename, not just
1173 a directory. Since this is the index for the whole object
1174 list you CANNOT periodically rotate it!
1176 If %s can be used in the file name it will be replaced with a
1177 a representation of the cache_dir name where each / is replaced
1178 with '.'. This is needed to allow adding/removing cache_dir
1179 lines when cache_swap_log is being used.
1181 If have more than one 'cache_dir', and %s is not used in the name
1182 these swap logs will have names such as:
1188 The numbered extension (which is added automatically)
1189 corresponds to the order of the 'cache_dir' lines in this
1190 configuration file. If you change the order of the 'cache_dir'
1191 lines in this file, these index files will NOT correspond to
1192 the correct 'cache_dir' entry (unless you manually rename
1193 them). We recommend you do NOT use this option. It is
1194 better to keep these index files in each 'cache_dir' directory.
1197 NAME: logfile_rotate
1200 LOC: Config.Log.rotateNumber
1202 Specifies the number of logfile rotations to make when you
1203 type 'squid -k rotate'. The default is 10, which will rotate
1204 with extensions 0 through 9. Setting logfile_rotate to 0 will
1205 disable the file name rotation, but the logfiles are still closed
1206 and re-opened. This will enable you to rename the logfiles
1207 yourself just before sending the rotate signal.
1209 Note, the 'squid -k rotate' command normally sends a USR1
1210 signal to the running squid process. In certain situations
1211 (e.g. on Linux with Async I/O), USR1 is used for other
1212 purposes, so -k rotate uses another signal. It is best to get
1213 in the habit of using 'squid -k rotate' instead of 'kill -USR1
1217 NAME: emulate_httpd_log
1221 LOC: Config.onoff.common_log
1223 The Cache can emulate the log file format which many 'httpd'
1224 programs use. To disable/enable this emulation, set
1225 emulate_httpd_log to 'off' or 'on'. The default
1226 is to use the native log format since it includes useful
1227 information Squid-specific log analyzers use.
1230 NAME: log_ip_on_direct
1234 LOC: Config.onoff.log_ip_on_direct
1236 Log the destination IP address in the hierarchy log tag when going
1237 direct. Earlier Squid versions logged the hostname here. If you
1238 prefer the old way set this to off.
1243 DEFAULT: @DEFAULT_MIME_TABLE@
1244 LOC: Config.mimeTablePathname
1246 Pathname to Squid's MIME table. You shouldn't need to change
1247 this, but the default file contains examples and formatting
1248 information if you do.
1254 LOC: Config.onoff.log_mime_hdrs
1257 The Cache can record both the request and the response MIME
1258 headers for each HTTP transaction. The headers are encoded
1259 safely and will appear as two bracketed fields at the end of
1260 the access log (for either the native or httpd-emulated log
1261 formats). To enable this logging set log_mime_hdrs to 'on'.
1266 LOC: Config.Log.useragent
1268 IFDEF: USE_USERAGENT_LOG
1270 Squid will write the User-Agent field from HTTP requests
1271 to the filename specified here. By default useragent_log
1275 NAME: referer_log referrer_log
1277 LOC: Config.Log.referer
1279 IFDEF: USE_REFERER_LOG
1281 Squid will write the Referer field from HTTP requests to the
1282 filename specified here. By default referer_log is disabled.
1283 Note that "referer" is actually a misspelling of "referrer"
1284 however the misspelt version has been accepted into the HTTP RFCs
1290 DEFAULT: @DEFAULT_PID_FILE@
1291 LOC: Config.pidFilename
1293 A filename to write the process-id to. To disable, enter "none".
1299 LOC: Config.debugOptions
1301 Logging options are set as section,level where each source file
1302 is assigned a unique section. Lower levels result in less
1303 output, Full debugging (level 9) can result in a very large
1304 log file, so be careful. The magic word "ALL" sets debugging
1305 levels for all sections. We recommend normally running with
1313 LOC: Config.onoff.log_fqdn
1315 Turn this on if you wish to log fully qualified domain names
1316 in the access.log. To do this Squid does a DNS lookup of all
1317 IP's connecting to it. This can (in some situations) increase
1318 latency, which makes your cache seem slower for interactive
1322 NAME: client_netmask
1324 LOC: Config.Addrs.client_netmask
1325 DEFAULT: 255.255.255.255
1327 A netmask for client addresses in logfiles and cachemgr output.
1328 Change this to protect the privacy of your cache clients.
1329 A netmask of 255.255.255.0 will log all IP's in that range with
1330 the last digit set to '0'.
1337 LOC: Config.Log.forward
1339 Logs the server-side requests.
1341 This is currently work in progress.
1344 NAME: strip_query_terms
1346 LOC: Config.onoff.strip_query_terms
1349 By default, Squid strips query terms from requested URLs before
1350 logging. This protects your user's privacy.
1357 LOC: Config.onoff.buffered_logs
1359 cache.log log file is written with stdio functions, and as such
1360 it can be buffered or unbuffered. By default it will be unbuffered.
1361 Buffering it can speed up the writing slightly (though you are
1362 unlikely to need to worry unless you run with tons of debugging
1363 enabled in which case performance will suffer badly anyway..).
1367 OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
1368 -----------------------------------------------------------------------------
1374 LOC: Config.Ftp.anon_user
1376 If you want the anonymous login password to be more informative
1377 (and enable the use of picky ftp servers), set this to something
1378 reasonable for your domain, like wwwuser@somewhere.net
1380 The reason why this is domainless by default is the
1381 request can be made on the behalf of a user in any domain,
1382 depending on how the cache is used.
1383 Some ftp server also validate the email address is valid
1384 (for example perl.com).
1387 NAME: ftp_list_width
1390 LOC: Config.Ftp.list_width
1392 Sets the width of ftp listings. This should be set to fit in
1393 the width of a standard browser. Setting this too small
1394 can cut off long filenames when browsing ftp sites.
1400 LOC: Config.Ftp.passive
1402 If your firewall does not allow Squid to use passive
1403 connections, turn off this option.
1406 NAME: ftp_sanitycheck
1409 LOC: Config.Ftp.sanitycheck
1411 For security and data integrity reasons Squid by default performs
1412 sanity checks of the addresses of FTP data connections ensure the
1413 data connection is to the requested server. If you need to allow
1414 FTP connections to servers using another IP address for the data
1415 connection turn this off.
1418 NAME: ftp_telnet_protocol
1421 LOC: Config.Ftp.telnet
1423 The FTP protocol is officially defined to use the telnet protocol
1424 as transport channel for the control connection. However, many
1425 implementations are broken and does not respect this aspect of
1428 If you have trouble accessing files with ASCII code 255 in the
1429 path or similar problems involving this ASCII code you can
1430 try setting this directive to off. If that helps, report to the
1431 operator of the FTP server in question that their FTP server
1432 is broken and does not follow the FTP standard.
1437 DEFAULT: @DEFAULT_DISKD@
1438 LOC: Config.Program.diskd
1440 Specify the location of the diskd executable.
1441 Note this is only useful if you have compiled in
1442 diskd as one of the store io modules.
1445 NAME: unlinkd_program
1448 DEFAULT: @DEFAULT_UNLINKD@
1449 LOC: Config.Program.unlinkd
1451 Specify the location of the executable for file deletion process.
1454 NAME: pinger_program
1456 DEFAULT: @DEFAULT_PINGER@
1457 LOC: Config.Program.pinger
1460 Specify the location of the executable for the pinger process.
1463 NAME: url_rewrite_program redirect_program
1465 LOC: Config.Program.redirect
1468 Specify the location of the executable for the URL rewriter.
1469 Since they can perform almost any function there isn't one included.
1471 For each requested URL rewriter will receive on line with the format
1473 URL <SP> client_ip "/" fqdn <SP> user <SP> method <NL>
1475 And the rewriter may return a rewritten URL. The other components of
1476 the request line does not need to be returned (ignored if they are).
1478 The rewriter can also indicate that a client-side redirect should
1479 be performed to the new URL. This is done by prefixing the returned
1480 URL with "301:" (moved permanently) or 302: (moved temporarily).
1482 By default, a URL rewriter is not used.
1485 NAME: url_rewrite_children redirect_children
1488 LOC: Config.redirectChildren
1490 The number of redirector processes to spawn. If you start
1491 too few Squid will have to wait for them to process a backlog of
1492 URLs, slowing it down. If you start too many they will use RAM
1493 and other system resources.
1496 NAME: url_rewrite_concurrency redirect_concurrency
1499 LOC: Config.redirectConcurrency
1501 The number of requests each redirector helper can handle in
1502 parallel. Defaults to 0 which indicates the redirector
1503 is a old-style single threaded redirector.
1506 NAME: url_rewrite_host_header redirect_rewrites_host_header
1509 LOC: Config.onoff.redir_rewrites_host
1511 By default Squid rewrites any Host: header in redirected
1512 requests. If you are running an accelerator this may
1513 not be a wanted effect of a redirector.
1515 WARNING: Entries are cached on the result of the URL rewriting
1516 process, so be careful if you have domain-virtual hosts.
1519 NAME: url_rewrite_access redirector_access
1522 LOC: Config.accessList.redirector
1524 If defined, this access list specifies which requests are
1525 sent to the redirector processes. By default all requests
1531 LOC: Config.authConfiguration
1534 This is used to define parameters for the various authentication
1535 schemes supported by Squid.
1537 format: auth_param scheme parameter [setting]
1539 The order in which authentication schemes are presented to the client is
1540 dependent on the order the scheme first appears in config file. IE
1541 has a bug (it's not RFC 2617 compliant) in that it will use the basic
1542 scheme if basic is the first entry presented, even if more secure
1543 schemes are presented. For now use the order in the recommended
1544 settings section below. If other browsers have difficulties (don't
1545 recognize the schemes offered even if you are using basic) either
1546 put basic first, or disable the other schemes (by commenting out their
1549 Once an authentication scheme is fully configured, it can only be
1550 shutdown by shutting squid down and restarting. Changes can be made on
1551 the fly and activated with a reconfigure. I.E. You can change to a
1552 different helper, but not unconfigure the helper completely.
1554 Please note that while this directive defines how Squid processes
1555 authentication it does not automatically activate authentication.
1556 To use authentication you must in addition make use of ACLs based
1557 on login name in http_access (proxy_auth, proxy_auth_regex or
1558 external with %LOGIN used in the format tag). The browser will be
1559 challenged for authentication on the first such acl encountered
1560 in http_access processing and will also be re-challenged for new
1561 login credentials if the request is being denied by a proxy_auth
1564 WARNING: authentication can't be used in a transparently intercepting
1565 proxy as the client then thinks it is talking to an origin server and
1566 not the proxy. This is a limitation of bending the TCP/IP protocol to
1567 transparently intercepting port 80, not a limitation in Squid.
1569 === Parameters for the basic scheme follow. ===
1572 Specify the command for the external authenticator. Such a program
1573 reads a line containing "username password" and replies "OK" or
1574 "ERR" in an endless loop. "ERR" responses may optionally be followed
1575 by a error description available as %m in the returned error page.
1576 If you use an authenticator, make sure you have 1 acl of type proxy_auth.
1578 By default, the basic authentication scheme is not used unless a
1579 program is specified.
1581 If you want to use the traditional NCSA proxy authentication, set
1582 this line to something like
1584 auth_param basic program @DEFAULT_PREFIX@/libexec/ncsa_auth @DEFAULT_PREFIX@/etc/passwd
1586 "children" numberofchildren
1587 The number of authenticator processes to spawn. If you start too few
1588 Squid will have to wait for them to process a backlog of credential
1589 verifications, slowing it down. When password verifications are
1590 done via a (slow) network you are likely to need lots of
1591 authenticator processes.
1592 auth_param basic children 5
1594 "concurrency" concurrency
1595 The number of concurrent requests the helper can process.
1596 The default of 0 is used for helpers who only supports
1597 one request at a time. Setting this changes the protocol used to
1598 include a channel number first on the request/response line, allowing
1599 multiple requests to be sent to the same helper in parallell without
1600 wating for the response.
1601 Must not be set unless it's known the helper supports this.
1602 auth_param basic concurrency 0
1605 Specifies the realm name which is to be reported to the
1606 client for the basic proxy authentication scheme (part of
1607 the text the user will see when prompted their username and
1608 password). There is no default.
1609 auth_param basic realm Squid proxy-caching web server
1611 "credentialsttl" timetolive
1612 Specifies how long squid assumes an externally validated
1613 username:password pair is valid for - in other words how
1614 often the helper program is called for that user. Set this
1615 low to force revalidation with short lived passwords. Note
1616 setting this high does not impact your susceptibility
1617 to replay attacks unless you are using an one-time password
1618 system (such as SecureID). If you are using such a system,
1619 you will be vulnerable to replay attacks unless you also
1620 use the max_user_ip ACL in an http_access rule.
1622 "casesensitive" on|off
1623 Specifies if usernames are case sensitive. Most user databases are
1624 case insensitive allowing the same username to be spelled using both
1625 lower and upper case letters, but some are case sensitive. This
1626 makes a big difference for user_max_ip ACL processing and similar.
1627 auth_param basic casesensitive off
1629 === Parameters for the digest scheme follow ===
1632 Specify the command for the external authenticator. Such
1633 a program reads a line containing "username":"realm" and
1634 replies with the appropriate H(A1) value hex encoded or
1635 ERR if the user (or his H(A1) hash) does not exists.
1636 See rfc 2616 for the definition of H(A1).
1637 "ERR" responses may optionally be followed by a error description
1638 available as %m in the returned error page.
1640 By default, the digest authentication scheme is not used unless a
1641 program is specified.
1643 If you want to use a digest authenticator, set this line to
1646 auth_param digest program @DEFAULT_PREFIX@/bin/digest_auth_pw @DEFAULT_PREFIX@/etc/digpass
1648 "children" numberofchildren
1649 The number of authenticator processes to spawn (no default).
1650 If you start too few Squid will have to wait for them to
1651 process a backlog of H(A1) calculations, slowing it down.
1652 When the H(A1) calculations are done via a (slow) network
1653 you are likely to need lots of authenticator processes.
1654 auth_param digest children 5
1657 Specifies the realm name which is to be reported to the
1658 client for the digest proxy authentication scheme (part of
1659 the text the user will see when prompted their username and
1660 password). There is no default.
1661 auth_param digest realm Squid proxy-caching web server
1663 "nonce_garbage_interval" timeinterval
1664 Specifies the interval that nonces that have been issued
1665 to client_agent's are checked for validity.
1667 "nonce_max_duration" timeinterval
1668 Specifies the maximum length of time a given nonce will be
1671 "nonce_max_count" number
1672 Specifies the maximum number of times a given nonce can be
1675 "nonce_strictness" on|off
1676 Determines if squid requires strict increment-by-1 behavior
1677 for nonce counts, or just incrementing (off - for use when
1678 useragents generate nonce counts that occasionally miss 1
1679 (ie, 1,2,4,6)). Default off.
1681 "check_nonce_count" on|off
1682 This directive if set to off can disable the nonce count check
1683 completely to work around buggy digest qop implementations in
1684 certain mainstream browser versions. Default on to check the
1685 nonce count to protect from authentication replay attacks.
1687 "post_workaround" on|off
1688 This is a workaround to certain buggy browsers who sends
1689 an incorrect request digest in POST requests when reusing
1690 the same nonce as acquired earlier on a GET request.
1692 === NTLM scheme options follow ===
1695 Specify the command for the external NTLM authenticator.
1696 Such a program reads exchanged NTLMSSP packets with
1697 the browser via Squid until authentication is completed.
1698 If you use an NTLM authenticator, make sure you have 1 acl
1699 of type proxy_auth. By default, the NTLM authenticator_program
1702 auth_param ntlm program @DEFAULT_PREFIX@/bin/ntlm_auth
1704 "children" numberofchildren
1705 The number of authenticator processes to spawn (no default).
1706 If you start too few Squid will have to wait for them to
1707 process a backlog of credential verifications, slowing it
1708 down. When credential verifications are done via a (slow)
1709 network you are likely to need lots of authenticator
1712 auth_param ntlm children 5
1715 If you experience problems with PUT/POST requests when using the
1716 Negotiate authentication scheme then you can try setting this to
1717 off. This will cause Squid to forcibly close the connection on
1718 the initial requests where the browser asks which schemes are
1719 supported by the proxy.
1721 auth_param ntlm keep_alive on
1723 === Options for configuring the NEGOTIATE auth-scheme follow ===
1726 Specify the command for the external Negotiate authenticator.
1727 This protocol is used in Microsoft Active-Directory enabled setups with
1728 the Microsoft Internet Explorer or Mozilla Firefox browsers.
1729 Its main purpose is to exchange credentials with the Squid proxy
1730 using the Kerberos mechanisms.
1731 If you use a Negotiate authenticator, make sure you have at least one acl
1732 of type proxy_auth active. By default, the negotiate authenticator_program
1734 The only supported program for this role is the ntlm_auth
1735 program distributed as part of Samba, version 4 or later.
1737 auth_param negotiate program @DEFAULT_PREFIX@/bin/ntlm_auth --helper-protocol=gss-spnego
1739 "children" numberofchildren
1740 The number of authenticator processes to spawn (no default).
1741 If you start too few Squid will have to wait for them to
1742 process a backlog of credential verifications, slowing it
1743 down. When crendential verifications are done via a (slow)
1744 network you are likely to need lots of authenticator
1746 auth_param negotiate children 5
1749 If you experience problems with PUT/POST requests when using the
1750 Negotiate authentication scheme then you can try setting this to
1751 off. This will cause Squid to forcibly close the connection on
1752 the initial requests where the browser asks which schemes are
1753 supported by the proxy.
1755 auth_param negotiate keep_alive on
1758 #Recommended minimum configuration per scheme:
1759 #auth_param negotiate program <uncomment and complete this line to activate>
1760 #auth_param negotiate children 5
1761 #auth_param negotiate keep_alive on
1762 #auth_param ntlm program <uncomment and complete this line to activate>
1763 #auth_param ntlm children 5
1764 #auth_param ntlm keep_alive on
1765 #auth_param digest program <uncomment and complete this line>
1766 #auth_param digest children 5
1767 #auth_param digest realm Squid proxy-caching web server
1768 #auth_param digest nonce_garbage_interval 5 minutes
1769 #auth_param digest nonce_max_duration 30 minutes
1770 #auth_param digest nonce_max_count 50
1771 #auth_param basic program <uncomment and complete this line>
1772 #auth_param basic children 5
1773 #auth_param basic realm Squid proxy-caching web server
1774 #auth_param basic credentialsttl 2 hours
1778 NAME: authenticate_cache_garbage_interval
1781 LOC: Config.authenticateGCInterval
1783 The time period between garbage collection across the username cache.
1784 This is a tradeoff between memory utilization (long intervals - say
1785 2 days) and CPU (short intervals - say 1 minute). Only change if you
1786 have good reason to.
1789 NAME: authenticate_ttl
1792 LOC: Config.authenticateTTL
1794 The time a user & their credentials stay in the logged in
1795 user cache since their last request. When the garbage
1796 interval passes, all user credentials that have passed their
1797 TTL are removed from memory.
1800 NAME: authenticate_ip_ttl
1802 LOC: Config.authenticateIpTTL
1805 If you use proxy authentication and the 'max_user_ip' ACL,
1806 this directive controls how long Squid remembers the IP
1807 addresses associated with each user. Use a small value
1808 (e.g., 60 seconds) if your users might change addresses
1809 quickly, as is the case with dialups. You might be safe
1810 using a larger value (e.g., 2 hours) in a corporate LAN
1811 environment with relatively static address assignments.
1814 NAME: external_acl_type
1815 TYPE: externalAclHelper
1816 LOC: Config.externalAclHelperList
1819 This option defines external acl classes using a helper program
1820 to look up the status
1822 external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
1826 ttl=n TTL in seconds for cached results (defaults to 3600
1829 TTL for cached negative lookups (default same
1831 children=n Number of acl helper processes spawn to service
1832 external acl lookups of this type. (default 5)
1833 concurrency=n concurrency level per process. Only used with helpers
1834 capable of processing more than one query at a time.
1835 cache=n result cache size, 0 is unbounded (default)
1836 grace=n Percentage remaining of TTL where a refresh of a
1837 cached entry should be initiated without needing to
1838 wait for a new reply. (default 0 for no grace period)
1839 protocol=2.5 Compatibility mode for Squid-2.5 external acl helpers
1841 FORMAT specifications
1843 %LOGIN Authenticated user login name
1844 %EXT_USER Username from external acl
1845 %IDENT Ident user name
1847 %SRCPORT Client source port
1850 %PROTO Requested protocol
1851 %PORT Requested port
1852 %PATH Requested URL path
1853 %METHOD Request method
1854 %MYADDR Squid interface address
1855 %MYPORT Squid http_port number
1856 %PATH Requested URL-path (including query-string if any)
1857 %USER_CERT SSL User certificate in PEM format
1858 %USER_CERTCHAIN SSL User certificate chain in PEM format
1859 %USER_CERT_xx SSL User certificate subject attribute xx
1860 %USER_CA_xx SSL User certificate issuer attribute xx
1861 %{Header} HTTP request header
1862 %{Hdr:member} HTTP request header list member
1864 HTTP request header list member using ; as
1865 list separator. ; can be any non-alphanumeric
1868 In addition to the above, any string specified in the referencing
1869 acl will also be included in the helper request line, after the
1870 specified formats (see the "acl external" directive)
1872 The helper receives lines per the above format specification,
1873 and returns lines starting with OK or ERR indicating the validity
1874 of the request and optionally followed by additional keywords with
1877 General result syntax:
1879 OK/ERR keyword=value ...
1883 user= The users name (login)
1884 password= The users password (for login= cache_peer option)
1885 message= Message describing the reason. Available as %o
1887 tag= Apply a tag to a request (for both ERR and OK results)
1888 Only sets a tag, does not alter existing tags.
1889 log= String to be logged in access.log. Available as
1890 %ea in logformat specifications
1892 If protocol=3.0 (the default) then URL escaping is used to protect
1893 each value in both requests and responses.
1895 If using protocol=2.5 then all values need to be enclosed in quotes
1896 if they may contain whitespace, or the whitespace escaped using \.
1897 And quotes or \ characters within the keyword value must be \ escaped.
1899 When using the concurrency= option the protocol is changed by
1900 introducing a query channel tag infront of the request/response.
1901 The query channel tag is a number between 0 and concurrency-1.
1905 OPTIONS FOR TUNING THE CACHE
1906 -----------------------------------------------------------------------------
1909 NAME: request_header_max_size
1913 LOC: Config.maxRequestHeaderSize
1915 This specifies the maximum size for HTTP headers in a request.
1916 Request headers are usually relatively small (about 512 bytes).
1917 Placing a limit on the request header size will catch certain
1918 bugs (for example with persistent connections) and possibly
1919 buffer-overflow or denial-of-service attacks.
1922 NAME: request_body_max_size
1926 LOC: Config.maxRequestBodySize
1928 This specifies the maximum size for an HTTP request body.
1929 In other words, the maximum size of a PUT/POST request.
1930 A user who attempts to send a request with a body larger
1931 than this limit receives an "Invalid Request" error message.
1932 If you set this parameter to a zero (the default), there will
1933 be no limit imposed.
1936 NAME: refresh_pattern
1937 TYPE: refreshpattern
1941 usage: refresh_pattern [-i] regex min percent max [options]
1943 By default, regular expressions are CASE-SENSITIVE. To make
1944 them case-insensitive, use the -i option.
1946 'Min' is the time (in minutes) an object without an explicit
1947 expiry time should be considered fresh. The recommended
1948 value is 0, any higher values may cause dynamic applications
1949 to be erroneously cached unless the application designer
1950 has taken the appropriate actions.
1952 'Percent' is a percentage of the objects age (time since last
1953 modification age) an object without explicit expiry time
1954 will be considered fresh.
1956 'Max' is an upper limit on how long objects without an explicit
1957 expiry time will be considered fresh.
1959 options: override-expire
1969 override-expire enforces min age even if the server
1970 sent a Expires: header. Doing this VIOLATES the HTTP
1971 standard. Enabling this feature could make you liable
1972 for problems which it causes.
1974 override-lastmod enforces min age even on objects
1975 that were modified recently.
1977 reload-into-ims changes client no-cache or ``reload''
1978 to If-Modified-Since requests. Doing this VIOLATES the
1979 HTTP standard. Enabling this feature could make you
1980 liable for problems which it causes.
1982 ignore-reload ignores a client no-cache or ``reload''
1983 header. Doing this VIOLATES the HTTP standard. Enabling
1984 this feature could make you liable for problems which
1987 ignore-no-cache ignores any ``Pragma: no-cache'' and
1988 ``Cache-control: no-cache'' headers received from a server.
1989 The HTTP RFC never allows the use of this (Pragma) header
1990 from a server, only a client, though plenty of servers
1993 ignore-no-store ignores any ``Cache-control: no-store''
1994 headers received from a server. Doing this VIOLATES
1995 the HTTP standard. Enabling this feature could make you
1996 liable for problems which it causes.
1998 ignore-private ignores any ``Cache-control: private''
1999 headers received from a server. Doing this VIOLATES
2000 the HTTP standard. Enabling this feature could make you
2001 liable for problems which it causes.
2003 ignore-auth caches responses to requests with authorization,
2004 as if the originserver had sent ``Cache-control: public''
2005 in the response header. Doing this VIOLATES the HTTP standard.
2006 Enabling this feature could make you liable for problems which
2009 refresh-ims causes squid to contact the origin server
2010 when a client issues an If-Modified-Since request. This
2011 ensures that the client will receive an updated version
2012 if one is available.
2014 Basically a cached object is:
2016 FRESH if expires < now, else STALE
2018 FRESH if lm-factor < percent, else STALE
2022 The refresh_pattern lines are checked in the order listed here.
2023 The first entry which matches is used. If none of the entries
2024 match the default will be used.
2026 Note, you must uncomment all the default lines if you want
2027 to change one. The default setting is only active if none is
2032 refresh_pattern ^ftp: 1440 20% 10080
2033 refresh_pattern ^gopher: 1440 0% 1440
2034 refresh_pattern . 0 20% 4320
2038 NAME: quick_abort_min
2042 LOC: Config.quickAbort.min
2045 NAME: quick_abort_max
2049 LOC: Config.quickAbort.max
2052 NAME: quick_abort_pct
2056 LOC: Config.quickAbort.pct
2058 The cache by default continues downloading aborted requests
2059 which are almost completed (less than 16 KB remaining). This
2060 may be undesirable on slow (e.g. SLIP) links and/or very busy
2061 caches. Impatient users may tie up file descriptors and
2062 bandwidth by repeatedly requesting and immediately aborting
2065 When the user aborts a request, Squid will check the
2066 quick_abort values to the amount of data transfered until
2069 If the transfer has less than 'quick_abort_min' KB remaining,
2070 it will finish the retrieval.
2072 If the transfer has more than 'quick_abort_max' KB remaining,
2073 it will abort the retrieval.
2075 If more than 'quick_abort_pct' of the transfer has completed,
2076 it will finish the retrieval.
2078 If you do not want any retrieval to continue after the client
2079 has aborted, set both 'quick_abort_min' and 'quick_abort_max'
2082 If you want retrievals to always continue if they are being
2083 cached set 'quick_abort_min' to '-1 KB'.
2086 NAME: read_ahead_gap
2087 COMMENT: buffer-size
2089 LOC: Config.readAheadGap
2092 The amount of data the cache will buffer ahead of what has been
2093 sent to the client when retrieving an object from another server.
2099 LOC: Config.negativeTtl
2102 Time-to-Live (TTL) for failed requests. Certain types of
2103 failures (such as "connection refused" and "404 Not Found") are
2104 negatively-cached for a configurable amount of time. The
2105 default is 5 minutes. Note that this is different from
2106 negative caching of DNS lookups.
2109 NAME: positive_dns_ttl
2112 LOC: Config.positiveDnsTtl
2115 Upper limit on how long Squid will cache positive DNS responses.
2116 Default is 6 hours (360 minutes). This directive must be set
2117 larger than negative_dns_ttl.
2120 NAME: negative_dns_ttl
2123 LOC: Config.negativeDnsTtl
2126 Time-to-Live (TTL) for negative caching of failed DNS lookups.
2127 This also sets the lower cache limit on positive lookups.
2128 Minimum value is 1 second, and it is not recommendable to go
2129 much below 10 seconds.
2132 NAME: range_offset_limit
2135 LOC: Config.rangeOffsetLimit
2138 Sets a upper limit on how far into the the file a Range request
2139 may be to cause Squid to prefetch the whole file. If beyond this
2140 limit Squid forwards the Range request as it is and the result
2143 This is to stop a far ahead range request (lets say start at 17MB)
2144 from making Squid fetch the whole object up to that point before
2145 sending anything to the client.
2147 A value of -1 causes Squid to always fetch the object from the
2148 beginning so it may cache the result. (2.0 style)
2150 A value of 0 causes Squid to never fetch more than the
2151 client requested. (default)
2154 NAME: minimum_expiry_time
2157 LOC: Config.minimum_expiry_time
2160 The minimum caching time according to (Expires - Date)
2161 Headers Squid honors if the object can't be revalidated
2162 defaults to 60 seconds. In reverse proxy enorinments it
2163 might be desirable to honor shorter object lifetimes. It
2164 is most likely better to make your server return a
2165 meaningful Last-Modified header however. In ESI environments
2166 where page fragments often have short lifetimes, this will
2167 often be best set to 0.
2170 NAME: store_avg_object_size
2174 LOC: Config.Store.avgObjectSize
2176 Average object size, used to estimate number of objects your
2177 cache can hold. The default is 13 KB.
2180 NAME: store_objects_per_bucket
2183 LOC: Config.Store.objectsPerBucket
2185 Target number of objects per bucket in the store hash table.
2186 Lowering this value increases the total number of buckets and
2187 also the storage maintenance rate. The default is 20.
2192 -----------------------------------------------------------------------------
2198 LOC: Config.accessList.brokenPosts
2200 A list of ACL elements which, if matched, causes Squid to send
2201 an extra CRLF pair after the body of a PUT/POST request.
2203 Some HTTP servers has broken implementations of PUT/POST,
2204 and rely on an extra CRLF pair sent by some WWW clients.
2206 Quote from RFC2616 section 4.1 on this matter:
2208 Note: certain buggy HTTP/1.0 client implementations generate an
2209 extra CRLF's after a POST request. To restate what is explicitly
2210 forbidden by the BNF, an HTTP/1.1 client must not preface or follow
2211 a request with an extra CRLF.
2214 acl buggy_server url_regex ^http://....
2215 broken_posts allow buggy_server
2219 IFDEF: HTTP_VIOLATIONS
2223 LOC: Config.onoff.via
2225 If set (default), Squid will include a Via header in requests and
2226 replies as required by RFC2616.
2232 LOC: Config.onoff.ie_refresh
2235 Microsoft Internet Explorer up until version 5.5 Service
2236 Pack 1 has an issue with transparent proxies, wherein it
2237 is impossible to force a refresh. Turning this on provides
2238 a partial fix to the problem, by causing all IMS-REFRESH
2239 requests from older IE versions to check the origin server
2240 for fresh content. This reduces hit ratio by some amount
2241 (~10% in my experience), but allows users to actually get
2242 fresh content when they want it. Note because Squid
2243 cannot tell if the user is using 5.5 or 5.5SP1, the behavior
2244 of 5.5 is unchanged from old versions of Squid (i.e. a
2245 forced refresh is impossible). Newer versions of IE will,
2246 hopefully, continue to have the new behavior and will be
2247 handled based on that assumption. This option defaults to
2248 the old Squid behavior, which is better for hit ratios but
2249 worse for clients using IE, if they need to be able to
2250 force fresh content.
2253 NAME: vary_ignore_expire
2256 LOC: Config.onoff.vary_ignore_expire
2259 Many HTTP servers supporting Vary gives such objects
2260 immediate expiry time with no cache-control header
2261 when requested by a HTTP/1.0 client. This option
2262 enables Squid to ignore such expiry times until
2263 HTTP/1.1 is fully implemented.
2264 WARNING: This may eventually cause some varying
2265 objects not intended for caching to get cached.
2268 NAME: extension_methods
2270 LOC: Config.ext_methods
2273 Squid only knows about standardized HTTP request methods.
2274 You can add up to 20 additional "extension" methods here.
2277 NAME: request_entities
2279 LOC: Config.onoff.request_entities
2282 Squid defaults to deny GET and HEAD requests with request entities,
2283 as the meaning of such requests are undefined in the HTTP standard
2284 even if not explicitly forbidden.
2286 Set this directive to on if you have clients which insists
2287 on sending request entities in GET or HEAD requests. But be warned
2288 that there is server software (both proxies and web servers) which
2289 can fail to properly process this kind of request which may make you
2290 vulnerable to cache pollution attacks if enabled.
2293 NAME: request_header_access
2294 IFDEF: HTTP_VIOLATIONS
2295 TYPE: http_header_access[]
2296 LOC: Config.request_header_access
2299 Usage: request_header_access header_name allow|deny [!]aclname ...
2301 WARNING: Doing this VIOLATES the HTTP standard. Enabling
2302 this feature could make you liable for problems which it
2305 This option replaces the old 'anonymize_headers' and the
2306 older 'http_anonymizer' option with something that is much
2307 more configurable. This new method creates a list of ACLs
2308 for each header, allowing you very fine-tuned header
2311 This option only applies to request headers, i.e., from the
2312 client to the server.
2314 You can only specify known headers for the header name.
2315 Other headers are reclassified as 'Other'. You can also
2316 refer to all the headers with 'All'.
2318 For example, to achieve the same behavior as the old
2319 'http_anonymizer standard' option, you should use:
2321 request_header_access From deny all
2322 request_header_access Referer deny all
2323 request_header_access Server deny all
2324 request_header_access User-Agent deny all
2325 request_header_access WWW-Authenticate deny all
2326 request_header_access Link deny all
2328 Or, to reproduce the old 'http_anonymizer paranoid' feature
2331 request_header_access Allow allow all
2332 request_header_access Authorization allow all
2333 request_header_access WWW-Authenticate allow all
2334 request_header_access Proxy-Authorization allow all
2335 request_header_access Proxy-Authenticate allow all
2336 request_header_access Cache-Control allow all
2337 request_header_access Content-Encoding allow all
2338 request_header_access Content-Length allow all
2339 request_header_access Content-Type allow all
2340 request_header_access Date allow all
2341 request_header_access Expires allow all
2342 request_header_access Host allow all
2343 request_header_access If-Modified-Since allow all
2344 request_header_access Last-Modified allow all
2345 request_header_access Location allow all
2346 request_header_access Pragma allow all
2347 request_header_access Accept allow all
2348 request_header_access Accept-Charset allow all
2349 request_header_access Accept-Encoding allow all
2350 request_header_access Accept-Language allow all
2351 request_header_access Content-Language allow all
2352 request_header_access Mime-Version allow all
2353 request_header_access Retry-After allow all
2354 request_header_access Title allow all
2355 request_header_access Connection allow all
2356 request_header_access Proxy-Connection allow all
2357 request_header_access All deny all
2359 although many of those are HTTP reply headers, and so should be
2360 controlled with the reply_header_access directive.
2362 By default, all headers are allowed (no anonymizing is
2366 NAME: reply_header_access
2367 IFDEF: HTTP_VIOLATIONS
2368 TYPE: http_header_access[]
2369 LOC: Config.reply_header_access
2372 Usage: reply_header_access header_name allow|deny [!]aclname ...
2374 WARNING: Doing this VIOLATES the HTTP standard. Enabling
2375 this feature could make you liable for problems which it
2378 This option only applies to reply headers, i.e., from the
2379 server to the client.
2381 This is the same as request_header_access, but in the other
2384 This option replaces the old 'anonymize_headers' and the
2385 older 'http_anonymizer' option with something that is much
2386 more configurable. This new method creates a list of ACLs
2387 for each header, allowing you very fine-tuned header
2390 You can only specify known headers for the header name.
2391 Other headers are reclassified as 'Other'. You can also
2392 refer to all the headers with 'All'.
2394 For example, to achieve the same behavior as the old
2395 'http_anonymizer standard' option, you should use:
2397 reply_header_access From deny all
2398 reply_header_access Referer deny all
2399 reply_header_access Server deny all
2400 reply_header_access User-Agent deny all
2401 reply_header_access WWW-Authenticate deny all
2402 reply_header_access Link deny all
2404 Or, to reproduce the old 'http_anonymizer paranoid' feature
2407 reply_header_access Allow allow all
2408 reply_header_access Authorization allow all
2409 reply_header_access WWW-Authenticate allow all
2410 reply_header_access Proxy-Authorization allow all
2411 reply_header_access Proxy-Authenticate allow all
2412 reply_header_access Cache-Control allow all
2413 reply_header_access Content-Encoding allow all
2414 reply_header_access Content-Length allow all
2415 reply_header_access Content-Type allow all
2416 reply_header_access Date allow all
2417 reply_header_access Expires allow all
2418 reply_header_access Host allow all
2419 reply_header_access If-Modified-Since allow all
2420 reply_header_access Last-Modified allow all
2421 reply_header_access Location allow all
2422 reply_header_access Pragma allow all
2423 reply_header_access Accept allow all
2424 reply_header_access Accept-Charset allow all
2425 reply_header_access Accept-Encoding allow all
2426 reply_header_access Accept-Language allow all
2427 reply_header_access Content-Language allow all
2428 reply_header_access Mime-Version allow all
2429 reply_header_access Retry-After allow all
2430 reply_header_access Title allow all
2431 reply_header_access Connection allow all
2432 reply_header_access Proxy-Connection allow all
2433 reply_header_access All deny all
2435 although the HTTP request headers won't be usefully controlled
2436 by this directive -- see request_header_access for details.
2438 By default, all headers are allowed (no anonymizing is
2442 NAME: header_replace
2443 IFDEF: HTTP_VIOLATIONS
2444 TYPE: http_header_replace[]
2445 LOC: Config.request_header_access
2448 Usage: header_replace header_name message
2449 Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
2451 This option allows you to change the contents of headers
2452 denied with header_access above, by replacing them with
2453 some fixed string. This replaces the old fake_user_agent
2456 This only applies to request headers, not reply headers.
2458 By default, headers are removed if denied.
2461 NAME: relaxed_header_parser
2462 COMMENT: on|off|warn
2464 LOC: Config.onoff.relaxed_header_parser
2467 In the default "on" setting Squid accepts certain forms
2468 of non-compliant HTTP messages where it is unambiguous
2469 what the sending application intended even if the message
2470 is not correctly formatted. The messages is then normalized
2471 to the correct form when forwarded by Squid.
2473 If set to "warn" then a warning will be emitted in cache.log
2474 each time such HTTP error is encountered.
2476 If set to "off" then such HTTP errors will cause the request
2477 or response to be rejected.
2482 -----------------------------------------------------------------------------
2485 NAME: forward_timeout
2488 LOC: Config.Timeout.forward
2491 This parameter specifies how long Squid should at most attempt in
2492 finding a forwarding path for the request before giving up.
2495 NAME: connect_timeout
2498 LOC: Config.Timeout.connect
2501 This parameter specifies how long to wait for the TCP connect to
2502 the requested server or peer to complete before Squid should
2503 attempt to find another path where to forward the request.
2506 NAME: peer_connect_timeout
2509 LOC: Config.Timeout.peer_connect
2512 This parameter specifies how long to wait for a pending TCP
2513 connection to a peer cache. The default is 30 seconds. You
2514 may also set different timeout values for individual neighbors
2515 with the 'connect-timeout' option on a 'cache_peer' line.
2521 LOC: Config.Timeout.read
2524 The read_timeout is applied on server-side connections. After
2525 each successful read(), the timeout will be extended by this
2526 amount. If no data is read again after this amount of time,
2527 the request is aborted and logged with ERR_READ_TIMEOUT. The
2528 default is 15 minutes.
2531 NAME: request_timeout
2533 LOC: Config.Timeout.request
2536 How long to wait for an HTTP request after initial
2537 connection establishment.
2540 NAME: persistent_request_timeout
2542 LOC: Config.Timeout.persistent_request
2545 How long to wait for the next HTTP request on a persistent
2546 connection after the previous request completes.
2549 NAME: client_lifetime
2552 LOC: Config.Timeout.lifetime
2555 The maximum amount of time a client (browser) is allowed to
2556 remain connected to the cache process. This protects the Cache
2557 from having a lot of sockets (and hence file descriptors) tied up
2558 in a CLOSE_WAIT state from remote clients that go away without
2559 properly shutting down (either because of a network failure or
2560 because of a poor client implementation). The default is one
2563 NOTE: The default value is intended to be much larger than any
2564 client would ever need to be connected to your cache. You
2565 should probably change client_lifetime only as a last resort.
2566 If you seem to have many client connections tying up
2567 filedescriptors, we recommend first tuning the read_timeout,
2568 request_timeout, persistent_request_timeout and quick_abort values.
2571 NAME: half_closed_clients
2573 LOC: Config.onoff.half_closed_clients
2576 Some clients may shutdown the sending side of their TCP
2577 connections, while leaving their receiving sides open. Sometimes,
2578 Squid can not tell the difference between a half-closed and a
2579 fully-closed TCP connection. By default, half-closed client
2580 connections are kept open until a read(2) or write(2) on the
2581 socket returns an error. Change this option to 'off' and Squid
2582 will immediately close client connections when read(2) returns
2583 "no more data to read."
2588 LOC: Config.Timeout.pconn
2589 DEFAULT: 120 seconds
2591 Timeout for idle persistent connections to servers and other
2598 LOC: Config.Timeout.ident
2601 Maximum time to wait for IDENT lookups to complete.
2603 If this is too high, and you enabled IDENT lookups from untrusted
2604 users, you might be susceptible to denial-of-service by having
2605 many ident requests going at once.
2608 NAME: shutdown_lifetime
2611 LOC: Config.shutdownLifetime
2614 When SIGTERM or SIGHUP is received, the cache is put into
2615 "shutdown pending" mode until all active sockets are closed.
2616 This value is the lifetime to set for all open descriptors
2617 during shutdown mode. Any active clients after this many
2618 seconds will receive a 'timeout' message.
2623 -----------------------------------------------------------------------------
2631 Defining an Access List
2633 acl aclname acltype string1 ...
2634 acl aclname acltype "file" ...
2636 when using "file", the file should contain one item per line
2638 acltype is one of the types described below
2640 By default, regular expressions are CASE-SENSITIVE. To make
2641 them case-insensitive, use the -i option.
2643 acl aclname src ip-address/netmask ... (clients IP address)
2644 acl aclname src addr1-addr2/netmask ... (range of addresses)
2645 acl aclname dst ip-address/netmask ... (URL host's IP address)
2646 acl aclname myip ip-address/netmask ... (local socket IP address)
2648 acl aclname arp mac-address ... (xx:xx:xx:xx:xx:xx notation)
2649 # The arp ACL requires the special configure option --enable-arp-acl.
2650 # Furthermore, the ARP ACL code is not portable to all operating systems.
2651 # It works on Linux, Solaris, Windows, FreeBSD, and some other *BSD variants.
2653 # NOTE: Squid can only determine the MAC address for clients that are on
2654 # the same subnet. If the client is on a different subnet, then Squid cannot
2655 # find out its MAC address.
2657 acl aclname srcdomain .foo.com ... # reverse lookup, client IP
2658 acl aclname dstdomain .foo.com ... # Destination server from URL
2659 acl aclname srcdom_regex [-i] xxx ... # regex matching client name
2660 acl aclname dstdom_regex [-i] xxx ... # regex matching server
2661 # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
2662 # based URL is used and no match is found. The name "none" is used
2663 # if the reverse lookup fails.
2665 acl aclname http_status 200 301 500- 400-403 ... # status code in reply
2667 acl aclname time [day-abbrevs] [h1:m1-h2:m2]
2676 h1:m1 must be less than h2:m2
2677 acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
2678 acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path
2679 acl aclname port 80 70 21 ...
2680 acl aclname port 0-1024 ... # ranges allowed
2681 acl aclname myport 3128 ... # (local socket TCP port)
2682 acl aclname proto HTTP FTP ...
2683 acl aclname method GET POST ...
2684 acl aclname browser [-i] regexp ...
2685 # pattern match on User-Agent header (see also req_header below)
2686 acl aclname referer_regex [-i] regexp ...
2687 # pattern match on Referer header
2688 # Referer is highly unreliable, so use with care
2689 acl aclname ident username ...
2690 acl aclname ident_regex [-i] pattern ...
2691 # string match on ident output.
2692 # use REQUIRED to accept any non-null ident.
2693 acl aclname src_as number ...
2694 acl aclname dst_as number ...
2695 # Except for access control, AS numbers can be used for
2696 # routing of requests to specific caches. Here's an
2697 # example for routing all requests for AS#1241 and only
2698 # those to mycache.mydomain.net:
2699 # acl asexample dst_as 1241
2700 # cache_peer_access mycache.mydomain.net allow asexample
2701 # cache_peer_access mycache_mydomain.net deny all
2703 acl aclname proxy_auth [-i] username ...
2704 acl aclname proxy_auth_regex [-i] pattern ...
2705 # list of valid usernames
2706 # use REQUIRED to accept any valid username.
2708 # NOTE: when a Proxy-Authentication header is sent but it is not
2709 # needed during ACL checking the username is NOT logged
2712 # NOTE: proxy_auth requires a EXTERNAL authentication program
2713 # to check username/password combinations (see
2714 # auth_param directive).
2716 # NOTE: proxy_auth can't be used in a transparent proxy as
2717 # the browser needs to be configured for using a proxy in order
2718 # to respond to proxy authentication.
2720 acl aclname snmp_community string ...
2721 # A community string to limit access to your SNMP Agent
2724 # acl snmppublic snmp_community public
2726 acl aclname maxconn number
2727 # This will be matched when the client's IP address has
2728 # more than <number> HTTP connections established.
2730 acl aclname max_user_ip [-s] number
2731 # This will be matched when the user attempts to log in from more
2732 # than <number> different ip addresses. The authenticate_ip_ttl
2733 # parameter controls the timeout on the ip entries.
2734 # If -s is specified the limit is strict, denying browsing
2735 # from any further IP addresses until the ttl has expired. Without
2736 # -s Squid will just annoy the user by "randomly" denying requests.
2737 # (the counter is reset each time the limit is reached and a
2738 # request is denied)
2739 # NOTE: in acceleration mode or where there is mesh of child proxies,
2740 # clients may appear to come from multiple addresses if they are
2741 # going through proxy farms, so a limit of 1 may cause user problems.
2743 acl aclname req_mime_type mime-type1 ...
2744 # regex match against the mime type of the request generated
2745 # by the client. Can be used to detect file upload or some
2746 # types HTTP tunneling requests.
2747 # NOTE: This does NOT match the reply. You cannot use this
2748 # to match the returned file type.
2750 acl aclname req_header header-name [-i] any\.regex\.here
2751 # regex match against any of the known request headers. May be
2752 # thought of as a superset of "browser", "referer" and "mime-type"
2755 acl aclname rep_mime_type mime-type1 ...
2756 # regex match against the mime type of the reply received by
2757 # squid. Can be used to detect file download or some
2758 # types HTTP tunneling requests.
2759 # NOTE: This has no effect in http_access rules. It only has
2760 # effect in rules that affect the reply data stream such as
2761 # http_reply_access.
2763 acl aclname rep_header header-name [-i] any\.regex\.here
2764 # regex match against any of the known reply headers. May be
2765 # thought of as a superset of "browser", "referer" and "mime-type"
2768 acl acl_name external class_name [arguments...]
2769 # external ACL lookup via a helper class defined by the
2770 # external_acl_type directive.
2772 acl aclname user_cert attribute values...
2773 # match against attributes in a user SSL certificate
2774 # attribute is one of DN/C/O/CN/L/ST
2776 acl aclname ca_cert attribute values...
2777 # match against attributes a users issuing CA SSL certificate
2778 # attribute is one of DN/C/O/CN/L/ST
2780 acl aclname ext_user username ...
2781 acl aclname ext_user_regex [-i] pattern ...
2782 # string match on username returned by external acl helper
2783 # use REQUIRED to accept any non-null user name.
2786 acl macaddress arp 09:00:2b:23:45:67
2787 acl myexample dst_as 1241
2788 acl password proxy_auth REQUIRED
2789 acl fileupload req_mime_type -i ^multipart/form-data$
2790 acl javascript rep_mime_type -i ^application/x-javascript$
2793 #Recommended minimum configuration:
2794 acl all src 0.0.0.0/0.0.0.0
2795 acl manager proto cache_object
2796 acl localhost src 127.0.0.1/255.255.255.255
2797 acl to_localhost dst 127.0.0.0/8
2798 acl SSL_ports port 443
2799 acl Safe_ports port 80 # http
2800 acl Safe_ports port 21 # ftp
2801 acl Safe_ports port 443 # https
2802 acl Safe_ports port 70 # gopher
2803 acl Safe_ports port 210 # wais
2804 acl Safe_ports port 1025-65535 # unregistered ports
2805 acl Safe_ports port 280 # http-mgmt
2806 acl Safe_ports port 488 # gss-http
2807 acl Safe_ports port 591 # filemaker
2808 acl Safe_ports port 777 # multiling http
2809 acl CONNECT method CONNECT
2815 LOC: Config.accessList.http
2817 DEFAULT_IF_NONE: deny all
2819 Allowing or Denying access based on defined access lists
2821 Access to the HTTP port:
2822 http_access allow|deny [!]aclname ...
2824 NOTE on default values:
2826 If there are no "access" lines present, the default is to deny
2829 If none of the "access" lines cause a match, the default is the
2830 opposite of the last line in the list. If the last line was
2831 deny, the default is allow. Conversely, if the last line
2832 is allow, the default will be deny. For these reasons, it is a
2833 good idea to have an "deny all" or "allow all" entry at the end
2834 of your access lists to avoid potential confusion.
2837 #Recommended minimum configuration:
2839 # Only allow cachemgr access from localhost
2840 http_access allow manager localhost
2841 http_access deny manager
2842 # Deny requests to unknown ports
2843 http_access deny !Safe_ports
2844 # Deny CONNECT to other than SSL ports
2845 http_access deny CONNECT !SSL_ports
2847 # We strongly recommend the following be uncommented to protect innocent
2848 # web applications running on the proxy server who think the only
2849 # one who can access services on "localhost" is a local user
2850 #http_access deny to_localhost
2852 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
2854 # Example rule allowing access from your local networks. Adapt
2855 # to list your (internal) IP networks from where browsing should
2857 #acl our_networks src 192.168.1.0/24 192.168.2.0/24
2858 #http_access allow our_networks
2860 # And finally deny all other access to this proxy
2861 http_access deny all
2865 NAME: http_reply_access
2867 LOC: Config.accessList.reply
2870 Allow replies to client requests. This is complementary to http_access.
2872 http_reply_access allow|deny [!] aclname ...
2874 NOTE: if there are no access lines present, the default is to allow
2877 If none of the access lines cause a match the opposite of the
2878 last line will apply. Thus it is good practice to end the rules
2879 with an "allow all" or "deny all" entry.
2884 LOC: Config.accessList.icp
2886 DEFAULT_IF_NONE: deny all
2888 Allowing or Denying access to the ICP port based on defined
2891 icp_access allow|deny [!]aclname ...
2893 See http_access for details
2896 #Allow ICP queries from everyone
2897 icp_access allow all
2904 LOC: Config.accessList.htcp
2906 DEFAULT_IF_NONE: deny all
2908 Allowing or Denying access to the HTCP port based on defined
2911 htcp_access allow|deny [!]aclname ...
2913 See http_access for details
2915 #Allow HTCP queries from everyone
2916 htcp_access allow all
2919 NAME: htcp_clr_access
2922 LOC: Config.accessList.htcp_clr
2924 DEFAULT_IF_NONE: deny all
2926 Allowing or Denying access to purge content using HTCP based
2927 on defined access lists
2929 htcp_clr_access allow|deny [!]aclname ...
2931 See http_access for details
2933 #Allow HTCP CLR requests from trusted peers
2934 acl htcp_clr_peer src 172.16.1.2
2935 htcp_clr_access allow htcp_clr_peer
2940 LOC: Config.accessList.miss
2943 Use to force your neighbors to use you as a sibling instead of
2944 a parent. For example:
2946 acl localclients src 172.16.0.0/16
2947 miss_access allow localclients
2948 miss_access deny !localclients
2950 This means only your local clients are allowed to fetch
2951 MISSES and all other clients can only fetch HITS.
2953 By default, allow all clients who passed the http_access rules
2954 to fetch MISSES from us.
2958 # miss_access allow all
2962 NAME: cache_peer_access
2967 Similar to 'cache_peer_domain' but provides more flexibility by
2970 cache_peer_access cache-host allow|deny [!]aclname ...
2972 The syntax is identical to 'http_access' and the other lists of
2973 ACL elements. See the comments for 'http_access' below, or
2974 the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
2977 NAME: ident_lookup_access
2981 DEFAULT_IF_NONE: deny all
2982 LOC: Config.accessList.identLookup
2984 A list of ACL elements which, if matched, cause an ident
2985 (RFC 931) lookup to be performed for this request. For
2986 example, you might choose to always perform ident lookups
2987 for your main multi-user Unix boxes, but not for your Macs
2988 and PCs. By default, ident lookups are not performed for
2991 To enable ident lookups for specific client addresses, you
2992 can follow this example:
2994 acl ident_aware_hosts src 198.168.1.0/255.255.255.0
2995 ident_lookup_access allow ident_aware_hosts
2996 ident_lookup_access deny all
2998 Only src type ACL checks are fully supported. A src_domain
2999 ACL might work at times, but it will not always provide
3003 NAME: tcp_outgoing_tos tcp_outgoing_ds tcp_outgoing_dscp
3006 LOC: Config.accessList.outgoing_tos
3008 Allows you to select a TOS/Diffserv value to mark outgoing
3009 connections with, based on the username or source address
3012 tcp_outgoing_tos ds-field [!]aclname ...
3014 Example where normal_service_net uses the TOS value 0x00
3015 and normal_service_net uses 0x20
3017 acl normal_service_net src 10.0.0.0/255.255.255.0
3018 acl good_service_net src 10.0.1.0/255.255.255.0
3019 tcp_outgoing_tos 0x00 normal_service_net 0x00
3020 tcp_outgoing_tos 0x20 good_service_net
3022 TOS/DSCP values really only have local significance - so you should
3023 know what you're specifying. For more information, see RFC2474 and
3026 The TOS/DSCP byte must be exactly that - a octet value 0 - 255, or
3027 "default" to use whatever default your host has. Note that in
3028 practice often only values 0 - 63 is usable as the two highest bits
3029 have been redefined for use by ECN (RFC3168).
3031 Processing proceeds in the order specified, and stops at first fully
3034 Note: The use of this directive using client dependent ACLs is
3035 incompatible with the use of server side persistent connections. To
3036 ensure correct results it is best to set server_persisten_connections
3037 to off when using this directive in such configurations.
3040 NAME: clientside_tos
3043 LOC: Config.accessList.clientside_tos
3045 Allows you to select a TOS/Diffserv value to mark client-side
3046 connections with, based on the username or source address
3050 NAME: tcp_outgoing_address
3053 LOC: Config.accessList.outgoing_address
3055 Allows you to map requests to different outgoing IP addresses
3056 based on the username or source address of the user making
3059 tcp_outgoing_address ipaddr [[!]aclname] ...
3061 Example where requests from 10.0.0.0/24 will be forwarded
3062 with source address 10.1.0.1, 10.0.2.0/24 forwarded with
3063 source address 10.1.0.2 and the rest will be forwarded with
3064 source address 10.1.0.3.
3066 acl normal_service_net src 10.0.0.0/255.255.255.0
3067 acl good_service_net src 10.0.1.0/255.255.255.0
3068 tcp_outgoing_address 10.0.0.1 normal_service_net
3069 tcp_outgoing_address 10.0.0.2 good_service_net
3070 tcp_outgoing_address 10.0.0.3
3072 Processing proceeds in the order specified, and stops at first fully
3075 Note: The use of this directive using client dependent ACLs is
3076 incompatible with the use of server side persistent connections. To
3077 ensure correct results it is best to set server_persistent_connections
3078 to off when using this directive in such configurations.
3081 NAME: reply_header_max_size
3085 LOC: Config.maxReplyHeaderSize
3087 This specifies the maximum size for HTTP headers in a reply.
3088 Reply headers are usually relatively small (about 512 bytes).
3089 Placing a limit on the reply header size will catch certain
3090 bugs (for example with persistent connections) and possibly
3091 buffer-overflow or denial-of-service attacks.
3094 NAME: reply_body_max_size
3095 COMMENT: size [acl acl...]
3098 LOC: Config.ReplyBodySize
3100 This option specifies the maximum size of a reply body. It can be
3101 used to prevent users from downloading very large files, such as
3102 MP3's and movies. When the reply headers are received, the
3103 reply_body_max_size lines are processed, and the first line where
3104 all (if any) listed ACLs are true is used as the maximum body size
3107 This size is checked twice. First when we get the reply headers,
3108 we check the content-length value. If the content length value exists
3109 and is larger than the allowed size, the request is denied and the
3110 user receives an error message that says "the request or reply
3111 is too large." If there is no content-length, and the reply
3112 size exceeds this limit, the client's connection is just closed
3113 and they will receive a partial reply.
3115 WARNING: downstream caches probably can not detect a partial reply
3116 if there is no content-length header, so they will cache
3117 partial responses and give them out as hits. You should NOT
3118 use this option if you have downstream caches.
3120 WARNING: A maximum size smaller than the size of squid's error messages
3121 will cause an infinite loop and crash squid. Ensure that the smallest
3122 non-zero value you use is greater that the maximum header size plus
3123 the size of your largest error page.
3125 If you set this parameter none (the default), there will be
3131 LOC: Config.accessList.log
3133 COMMENT: allow|deny acl acl...
3135 This options allows you to control which requests gets logged
3136 to access.log (see access_log directive). Requests denied for
3137 logging will also not be accounted for in performance counters.
3141 ADMINISTRATIVE PARAMETERS
3142 -----------------------------------------------------------------------------
3148 LOC: Config.adminEmail
3150 Email-address of local cache manager who will receive
3151 mail if the cache dies. The default is "webmaster."
3157 LOC: Config.EmailFrom
3159 From: email-address for mail sent when the cache dies.
3160 The default is to use 'appname@unique_hostname'.
3161 Default appname value is "squid", can be changed into
3162 src/globals.h before building squid.
3168 LOC: Config.EmailProgram
3170 Email program used to send mail if the cache dies.
3171 The default is "mail". The specified program must complain
3172 with the standard Unix mail syntax:
3173 mail_program recipient < mailfile
3174 Optional command line options can be specified.
3177 NAME: cache_effective_user
3179 DEFAULT: @DEFAULT_CACHE_EFFECTIVE_USER@
3180 LOC: Config.effectiveUser
3182 If you start Squid as root, it will change its effective/real
3183 UID/GID to the user specified below. The default is to change
3184 to UID of @DEFAULT_CACHE_EFFECTIVE_USER@.
3185 see also; cache_effective_group
3188 NAME: cache_effective_group
3191 LOC: Config.effectiveGroup
3193 Squid sets the GID to the effective user's default group ID
3194 (taken from the password file) and supplementary group list
3195 from the groups membership.
3197 If you want Squid to run with a specific GID regardless of
3198 the group memberships of the effective user then set this
3199 to the group (or GID) you want Squid to run as. When set
3200 all other group privileges of the effective user are ignored
3201 and only this GID is effective. If Squid is not started as
3202 root the user starting Squid MUST be member of the specified
3205 This option is not recommended by the Squid Team.
3206 Our preference is for administrators to configure a secure
3207 user account for squid with UID/GID matching system policies.
3210 NAME: httpd_suppress_version_string
3214 LOC: Config.onoff.httpd_suppress_version_string
3216 Suppress Squid version string info in HTTP headers and HTML error pages.
3219 NAME: visible_hostname
3221 LOC: Config.visibleHostname
3224 If you want to present a special hostname in error messages, etc,
3225 define this. Otherwise, the return value of gethostname()
3226 will be used. If you have multiple caches in a cluster and
3227 get errors about IP-forwarding you must set them to have individual
3228 names with this setting.
3231 NAME: unique_hostname
3233 LOC: Config.uniqueHostname
3236 If you want to have multiple machines with the same
3237 'visible_hostname' you must give each machine a different
3238 'unique_hostname' so forwarding loops can be detected.
3241 NAME: hostname_aliases
3243 LOC: Config.hostnameAliases
3246 A list of other DNS names your cache has.
3250 OPTIONS FOR THE CACHE REGISTRATION SERVICE
3251 -----------------------------------------------------------------------------
3253 This section contains parameters for the (optional) cache
3254 announcement service. This service is provided to help
3255 cache administrators locate one another in order to join or
3256 create cache hierarchies.
3258 An 'announcement' message is sent (via UDP) to the registration
3259 service by Squid. By default, the announcement message is NOT
3260 SENT unless you enable it with 'announce_period' below.
3262 The announcement message includes your hostname, plus the
3263 following information from this configuration file:
3269 All current information is processed regularly and made
3270 available on the Web at http://www.ircache.net/Cache/Tracker/.
3273 NAME: announce_period
3275 LOC: Config.Announce.period
3278 This is how frequently to send cache announcements. The
3279 default is `0' which disables sending the announcement
3282 To enable announcing your cache, just uncomment the line
3286 #To enable announcing your cache, just uncomment the line below.
3287 #announce_period 1 day
3293 DEFAULT: tracker.ircache.net
3294 LOC: Config.Announce.host
3300 LOC: Config.Announce.file
3306 LOC: Config.Announce.port
3308 announce_host and announce_port set the hostname and port
3309 number where the registration message will be sent.
3311 Hostname will default to 'tracker.ircache.net' and port will
3312 default default to 3131. If the 'filename' argument is given,
3313 the contents of that file will be included in the announce
3318 HTTPD-ACCELERATOR OPTIONS
3319 -----------------------------------------------------------------------------
3322 NAME: httpd_accel_surrogate_id
3325 LOC: Config.Accel.surrogate_id
3328 Surrogates (http://www.esi.org/architecture_spec_1.0.html)
3329 need an identification token to allow control targeting. Because
3330 a farm of surrogates may all perform the same tasks, they may share
3331 an identification token.
3334 NAME: http_accel_surrogate_remote
3339 LOC: Config.onoff.surrogate_is_remote
3341 Remote surrogates (such as those in a CDN) honour Surrogate-Control: no-store-remote.
3342 Set this to on to have squid behave as a remote surrogate.
3347 COMMENT: libxml2|expat|custom
3349 LOC: ESIParser::Type
3352 ESI markup is not strictly XML compatible. The custom ESI parser
3353 will give higher performance, but cannot handle non ASCII character
3358 DELAY POOL PARAMETERS
3359 -----------------------------------------------------------------------------
3363 TYPE: delay_pool_count
3368 This represents the number of delay pools to be used. For example,
3369 if you have one class 2 delay pool and one class 3 delays pool, you
3370 have a total of 2 delay pools.
3374 TYPE: delay_pool_class
3379 This defines the class of each delay pool. There must be exactly one
3380 delay_class line for each delay pool. For example, to define two
3381 delay pools, one of class 2 and one of class 3, the settings above
3385 delay_pools 4 # 4 delay pools
3386 delay_class 1 2 # pool 1 is a class 2 pool
3387 delay_class 2 3 # pool 2 is a class 3 pool
3388 delay_class 3 4 # pool 3 is a class 4 pool
3389 delay_class 4 5 # pool 4 is a class 5 pool
3391 The delay pool classes are:
3393 class 1 Everything is limited by a single aggregate
3396 class 2 Everything is limited by a single aggregate
3397 bucket as well as an "individual" bucket chosen
3398 from bits 25 through 32 of the IP address.
3400 class 3 Everything is limited by a single aggregate
3401 bucket as well as a "network" bucket chosen
3402 from bits 17 through 24 of the IP address and a
3403 "individual" bucket chosen from bits 17 through
3404 32 of the IP address.
3406 class 4 Everything in a class 3 delay pool, with an
3407 additional limit on a per user basis. This
3408 only takes effect if the username is established
3409 in advance - by forcing authentication in your
3412 class 5 Requests are grouped according their tag (see
3413 external_acl's tag= reply).
3415 NOTE: If an IP address is a.b.c.d
3416 -> bits 25 through 32 are "d"
3417 -> bits 17 through 24 are "c"
3418 -> bits 17 through 32 are "c * 256 + d"
3422 TYPE: delay_pool_access
3427 This is used to determine which delay pool a request falls into.
3429 delay_access is sorted per pool and the matching starts with pool 1,
3430 then pool 2, ..., and finally pool N. The first delay pool where the
3431 request is allowed is selected for the request. If it does not allow
3432 the request to any pool then the request is not delayed (default).
3434 For example, if you want some_big_clients in delay
3435 pool 1 and lotsa_little_clients in delay pool 2:
3438 delay_access 1 allow some_big_clients
3439 delay_access 1 deny all
3440 delay_access 2 allow lotsa_little_clients
3441 delay_access 2 deny all
3442 delay_access 3 allow authenticated_clients
3445 NAME: delay_parameters
3446 TYPE: delay_pool_rates
3451 This defines the parameters for a delay pool. Each delay pool has
3452 a number of "buckets" associated with it, as explained in the
3453 description of delay_class. For a class 1 delay pool, the syntax is:
3455 delay_parameters pool aggregate
3457 For a class 2 delay pool:
3459 delay_parameters pool aggregate individual
3461 For a class 3 delay pool:
3463 delay_parameters pool aggregate network individual
3465 For a class 4 delay pool:
3467 delay_parameters pool aggregate network individual user
3469 For a class 5 delay pool:
3471 delay_parameters pool tag
3473 The variables here are:
3475 pool a pool number - ie, a number between 1 and the
3476 number specified in delay_pools as used in
3479 aggregate the "delay parameters" for the aggregate bucket
3482 individual the "delay parameters" for the individual
3483 buckets (class 2, 3).
3485 network the "delay parameters" for the network buckets
3488 user the delay parameters for the user buckets
3491 tag the delay parameters for the tag buckets
3494 A pair of delay parameters is written restore/maximum, where restore is
3495 the number of bytes (not bits - modem and network speeds are usually
3496 quoted in bits) per second placed into the bucket, and maximum is the
3497 maximum number of bytes which can be in the bucket at any time.
3499 For example, if delay pool number 1 is a class 2 delay pool as in the
3500 above example, and is being used to strictly limit each host to 64kbps
3501 (plus overheads), with no overall limit, the line is:
3503 delay_parameters 1 -1/-1 8000/8000
3505 Note that the figure -1 is used to represent "unlimited".
3507 And, if delay pool number 2 is a class 3 delay pool as in the above
3508 example, and you want to limit it to a total of 256kbps (strict limit)
3509 with each 8-bit network permitted 64kbps (strict limit) and each
3510 individual host permitted 4800bps with a bucket maximum size of 64kb
3511 to permit a decent web page to be downloaded at a decent speed
3512 (if the network is not being limited due to overuse) but slow down
3513 large downloads more significantly:
3515 delay_parameters 2 32000/32000 8000/8000 600/8000
3517 There must be one delay_parameters line for each delay pool.
3519 Finally, for a class 4 delay pool as in the example - each user will
3520 be limited to 128Kb no matter how many workstations they are logged into.:
3522 delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000
3525 NAME: delay_initial_bucket_level
3526 COMMENT: (percent, 0-100)
3530 LOC: Config.Delay.initial
3532 The initial bucket percentage is used to determine how much is put
3533 in each bucket when squid starts, is reconfigured, or first notices
3534 a host accessing it (in class 2 and class 3, individual hosts and
3535 networks only have buckets associated with them once they have been
3540 WCCPv1 AND WCCPv2 CONFIGURATION OPTIONS
3541 -----------------------------------------------------------------------------
3546 LOC: Config.Wccp.router
3551 TYPE: sockaddr_in_list
3552 LOC: Config.Wccp2.router
3556 Use this option to define your WCCP ``home'' router for
3559 wccp_router supports a single WCCP(v1) router
3561 wccp2_router supports multiple WCCPv2 routers
3563 only one of the two may be used at the same time and defines
3564 which version of WCCP to use.
3569 LOC: Config.Wccp.version
3573 This directive is only relevant if you need to set up WCCP(v1)
3574 to some very old and end-of-life Cisco routers. In all other
3575 setups it must be left unset or at the default setting.
3576 It defines an internal version in the WCCP(v1) protocol,
3577 with version 4 being the officially documented protocol.
3579 According to some users, Cisco IOS 11.2 and earlier only
3580 support WCCP version 3. If you're using that or an earlier
3581 version of IOS, you may need to change this value to 3, otherwise
3582 do not specify this parameter.
3585 NAME: wccp2_rebuild_wait
3587 LOC: Config.Wccp2.rebuildwait
3591 If this is enabled Squid will wait for the cache dir rebuild to finish
3592 before sending the first wccp2 HereIAm packet
3595 NAME: wccp2_forwarding_method
3597 LOC: Config.Wccp2.forwarding_method
3601 WCCP2 allows the setting of forwarding methods between the
3602 router/switch and the cache. Valid values are as follows:
3604 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
3605 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
3607 Currently (as of IOS 12.4) cisco routers only support GRE.
3608 Cisco switches only support the L2 redirect assignment method.
3611 NAME: wccp2_return_method
3613 LOC: Config.Wccp2.return_method
3617 WCCP2 allows the setting of return methods between the
3618 router/switch and the cache for packets that the cache
3619 decides not to handle. Valid values are as follows:
3621 1 - GRE encapsulation (forward the packet in a GRE/WCCP tunnel)
3622 2 - L2 redirect (forward the packet using Layer 2/MAC rewriting)
3624 Currently (as of IOS 12.4) cisco routers only support GRE.
3625 Cisco switches only support the L2 redirect assignment.
3627 If the "ip wccp redirect exclude in" command has been
3628 enabled on the cache interface, then it is still safe for
3629 the proxy server to use a l2 redirect method even if this
3630 option is set to GRE.
3633 NAME: wccp2_assignment_method
3635 LOC: Config.Wccp2.assignment_method
3639 WCCP2 allows the setting of methods to assign the WCCP hash
3640 Valid values are as follows:
3645 As a general rule, cisco routers support the hash assignment method
3646 and cisco switches support the mask assignment method.
3651 LOC: Config.Wccp2.info
3653 DEFAULT_IF_NONE: standard 0
3656 WCCP2 allows for multiple traffic services. There are two
3657 types: "standard" and "dynamic". The standard type defines
3658 one service id - http (id 0). The dynamic service ids can be from
3659 51 to 255 inclusive. In order to use a dynamic service id
3660 one must define the type of traffic to be redirected; this is done
3661 using the wccp2_service_info option.
3663 The "standard" type does not require a wccp2_service_info option,
3664 just specifying the service id will suffice.
3666 MD5 service authentication can be enabled by adding
3667 "password=<password>" to the end of this service declaration.
3671 wccp2_service standard 0 # for the 'web-cache' standard service
3672 wccp2_service dynamic 80 # a dynamic service type which will be
3673 # fleshed out with subsequent options.
3674 wccp2_service standard 0 password=foo
3678 NAME: wccp2_service_info
3679 TYPE: wccp2_service_info
3680 LOC: Config.Wccp2.info
3684 Dynamic WCCPv2 services require further information to define the
3685 traffic you wish to have diverted.
3689 wccp2_service_info <id> protocol=<protocol> flags=<flag>,<flag>..
3690 priority=<priority> ports=<port>,<port>..
3692 The relevant WCCPv2 flags:
3693 + src_ip_hash, dst_ip_hash
3694 + source_port_hash, dest_port_hash
3695 + src_ip_alt_hash, dst_ip_alt_hash
3696 + src_port_alt_hash, dst_port_alt_hash
3699 The port list can be one to eight entries.
3703 wccp2_service_info 80 protocol=tcp flags=src_ip_hash,ports_source
3704 priority=240 ports=80
3706 Note: the service id must have been defined by a previous
3707 'wccp2_service dynamic <id>' entry.
3712 LOC: Config.Wccp2.weight
3716 Each cache server gets assigned a set of the destination
3717 hash proportional to their weight.
3722 LOC: Config.Wccp.address
3728 LOC: Config.Wccp2.address
3732 Use this option if you require WCCP to use a specific
3735 The default behavior is to not bind to any specific address.
3739 PERSISTENT CONNECTION HANDLING
3740 -----------------------------------------------------------------------------
3742 Also see "pconn_timeout" in the TIMEOUTS section
3745 NAME: client_persistent_connections
3747 LOC: Config.onoff.client_pconns
3751 NAME: server_persistent_connections
3753 LOC: Config.onoff.server_pconns
3756 Persistent connection support for clients and servers. By
3757 default, Squid uses persistent connections (when allowed)
3758 with its clients and servers. You can use these options to
3759 disable persistent connections with clients and/or servers.
3762 NAME: persistent_connection_after_error
3764 LOC: Config.onoff.error_pconns
3767 With this directive the use of persistent connections after
3768 HTTP errors can be disabled. Useful if you have clients
3769 who fail to handle errors on persistent connections proper.
3772 NAME: detect_broken_pconn
3774 LOC: Config.onoff.detect_broken_server_pconns
3777 Some servers have been found to incorrectly signal the use
3778 of HTTP/1.0 persistent connections even on replies not
3779 compatible, causing significant delays. This server problem
3780 has mostly been seen on redirects.
3782 By enabling this directive Squid attempts to detect such
3783 broken replies and automatically assume the reply is finished
3784 after 10 seconds timeout.
3788 CACHE DIGEST OPTIONS
3789 -----------------------------------------------------------------------------
3792 NAME: digest_generation
3793 IFDEF: USE_CACHE_DIGESTS
3795 LOC: Config.onoff.digest_generation
3798 This controls whether the server will generate a Cache Digest
3799 of its contents. By default, Cache Digest generation is
3800 enabled if Squid is compiled with USE_CACHE_DIGESTS defined.
3803 NAME: digest_bits_per_entry
3804 IFDEF: USE_CACHE_DIGESTS
3806 LOC: Config.digest.bits_per_entry
3809 This is the number of bits of the server's Cache Digest which
3810 will be associated with the Digest entry for a given HTTP
3811 Method and URL (public key) combination. The default is 5.
3814 NAME: digest_rebuild_period
3815 IFDEF: USE_CACHE_DIGESTS
3818 LOC: Config.digest.rebuild_period
3821 This is the number of seconds between Cache Digest rebuilds.
3824 NAME: digest_rewrite_period
3826 IFDEF: USE_CACHE_DIGESTS
3828 LOC: Config.digest.rewrite_period
3831 This is the number of seconds between Cache Digest writes to
3835 NAME: digest_swapout_chunk_size
3838 IFDEF: USE_CACHE_DIGESTS
3839 LOC: Config.digest.swapout_chunk_size
3842 This is the number of bytes of the Cache Digest to write to
3843 disk at a time. It defaults to 4096 bytes (4KB), the Squid
3847 NAME: digest_rebuild_chunk_percentage
3848 COMMENT: (percent, 0-100)
3849 IFDEF: USE_CACHE_DIGESTS
3851 LOC: Config.digest.rebuild_chunk_percentage
3854 This is the percentage of the Cache Digest to be scanned at a
3855 time. By default it is set to 10% of the Cache Digest.
3860 -----------------------------------------------------------------------------
3865 LOC: Config.Port.snmp
3869 The port number where Squid listens for SNMP requests. To enable
3870 SNMP support set this to a suitable port number. Port number
3871 3401 is often used for the Squid SNMP agent. By default it's
3872 set to "0" (disabled)
3880 LOC: Config.accessList.snmp
3882 DEFAULT_IF_NONE: deny all
3885 Allowing or denying access to the SNMP port.
3887 All access to the agent is denied by default.
3890 snmp_access allow|deny [!]aclname ...
3893 snmp_access allow snmppublic localhost
3894 snmp_access deny all
3897 NAME: snmp_incoming_address
3899 LOC: Config.Addrs.snmp_incoming
3903 NAME: snmp_outgoing_address
3905 LOC: Config.Addrs.snmp_outgoing
3906 DEFAULT: 255.255.255.255
3909 Just like 'udp_incoming_address' above, but for the SNMP port.
3911 snmp_incoming_address is used for the SNMP socket receiving
3912 messages from SNMP agents.
3913 snmp_outgoing_address is used for SNMP packets returned to SNMP
3916 The default snmp_incoming_address (0.0.0.0) is to listen on all
3917 available network interfaces.
3919 If snmp_outgoing_address is set to 255.255.255.255 (the default)
3920 it will use the same socket as snmp_incoming_address. Only
3921 change this if you want to have SNMP replies sent using another
3922 address than where this Squid listens for SNMP queries.
3924 NOTE, snmp_incoming_address and snmp_outgoing_address can not have
3925 the same value since they both use port 3401.
3930 -----------------------------------------------------------------------------
3933 NAME: icp_port udp_port
3936 LOC: Config.Port.icp
3938 The port number where Squid sends and receives ICP queries to
3939 and from neighbor caches. The standard UDP port for ICP is 3130.
3940 Default is disabled (0).
3942 icp_port @DEFAULT_ICP_PORT@
3950 LOC: Config.Port.htcp
3952 The port number where Squid sends and receives HTCP queries to
3953 and from neighbor caches. To turn it on you want to set it to
3954 4827. By default it is set to "0" (disabled).
3960 NAME: log_icp_queries
3964 LOC: Config.onoff.log_udp
3966 If set, ICP queries are logged to access.log. You may wish
3967 do disable this if your ICP load is VERY high to speed things
3968 up or to simplify log analysis.
3971 NAME: udp_incoming_address
3973 LOC:Config.Addrs.udp_incoming
3977 NAME: udp_outgoing_address
3979 LOC: Config.Addrs.udp_outgoing
3980 DEFAULT: 255.255.255.255
3982 udp_incoming_address is used for the ICP socket receiving packets
3984 udp_outgoing_address is used for ICP packets sent out to other
3987 The default behavior is to not bind to any specific address.
3989 A udp_incoming_address value of 0.0.0.0 indicates Squid
3990 should listen for UDP messages on all available interfaces.
3992 If udp_outgoing_address is set to 255.255.255.255 (the default)
3993 it will use the same socket as udp_incoming_address. Only
3994 change this if you want to have ICP queries sent using another
3995 address than where this Squid listens for ICP queries from other
3998 NOTE, udp_incoming_address and udp_outgoing_address can not
3999 have the same value since they both use port 3130.
4002 NAME: minimum_direct_hops
4005 LOC: Config.minDirectHops
4007 If using the ICMP pinging stuff, do direct fetches for sites
4008 which are no more than this many hops away.
4011 NAME: minimum_direct_rtt
4014 LOC: Config.minDirectRtt
4016 If using the ICMP pinging stuff, do direct fetches for sites
4017 which are no more than this many rtt milliseconds away.
4023 LOC: Config.Netdb.low
4029 LOC: Config.Netdb.high
4031 The low and high water marks for the ICMP measurement
4032 database. These are counts, not percents. The defaults are
4033 900 and 1000. When the high water mark is reached, database
4034 entries will be deleted until the low mark is reached.
4037 NAME: netdb_ping_period
4039 LOC: Config.Netdb.period
4042 The minimum period for measuring a site. There will be at
4043 least this much delay between successive pings to the same
4044 network. The default is five minutes.
4051 LOC: Config.onoff.query_icmp
4053 If you want to ask your peers to include ICMP data in their ICP
4054 replies, enable this option.
4056 If your peer has configured Squid (during compilation) with
4057 '--enable-icmp' that peer will send ICMP pings to origin server
4058 sites of the URLs it receives. If you enable this option the
4059 ICP replies from that peer will include the ICMP data (if available).
4060 Then, when choosing a parent cache, Squid will choose the parent with
4061 the minimal RTT to the origin server. When this happens, the
4062 hierarchy field of the access.log will be
4063 "CLOSEST_PARENT_MISS". This option is off by default.
4066 NAME: test_reachability
4070 LOC: Config.onoff.test_reachability
4072 When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
4073 instead of ICP_MISS if the target host is NOT in the ICMP
4074 database, or has a zero RTT.
4077 NAME: icp_query_timeout
4081 LOC: Config.Timeout.icp_query
4083 Normally Squid will automatically determine an optimal ICP
4084 query timeout value based on the round-trip-time of recent ICP
4085 queries. If you want to override the value determined by
4086 Squid, set this 'icp_query_timeout' to a non-zero value. This
4087 value is specified in MILLISECONDS, so, to use a 2-second
4088 timeout (the old default), you would write:
4090 icp_query_timeout 2000
4093 NAME: maximum_icp_query_timeout
4097 LOC: Config.Timeout.icp_query_max
4099 Normally the ICP query timeout is determined dynamically. But
4100 sometimes it can lead to very large values (say 5 seconds).
4101 Use this option to put an upper limit on the dynamic timeout
4102 value. Do NOT use this option to always use a fixed (instead
4103 of a dynamic) timeout value. To set a fixed timeout see the
4104 'icp_query_timeout' directive.
4107 NAME: minimum_icp_query_timeout
4111 LOC: Config.Timeout.icp_query_min
4113 Normally the ICP query timeout is determined dynamically. But
4114 sometimes it can lead to very small timeouts, even lower than
4115 the normal latency variance on your link due to traffic.
4116 Use this option to put an lower limit on the dynamic timeout
4117 value. Do NOT use this option to always use a fixed (instead
4118 of a dynamic) timeout value. To set a fixed timeout see the
4119 'icp_query_timeout' directive.
4122 NAME: background_ping_rate
4126 LOC: Config.backgroundPingRate
4128 Controls how often the ICP pings are sent to siblings that
4129 have background-ping set.
4136 LOC: Config.onoff.icp_hit_stale
4138 If you want to return ICP_HIT for stale cache objects, set this
4139 option to 'on'. If you have sibling relationships with caches
4140 in other administrative domains, this should be 'off'. If you only
4141 have sibling relationships with caches under your control,
4142 it is probably okay to set this to 'on'.
4143 If set to 'on', your siblings should use the option "allow-miss"
4144 on their cache_peer lines for connecting to you.
4148 MULTICAST ICP OPTIONS
4149 -----------------------------------------------------------------------------
4154 LOC: Config.mcast_group_list
4157 This tag specifies a list of multicast groups which your server
4158 should join to receive multicasted ICP queries.
4160 NOTE! Be very careful what you put here! Be sure you
4161 understand the difference between an ICP _query_ and an ICP
4162 _reply_. This option is to be set only if you want to RECEIVE
4163 multicast queries. Do NOT set this option to SEND multicast
4164 ICP (use cache_peer for that). ICP replies are always sent via
4165 unicast, so this option does not affect whether or not you will
4166 receive replies from multicast group members.
4168 You must be very careful to NOT use a multicast address which
4169 is already in use by another group of caches.
4171 If you are unsure about multicast, please read the Multicast
4172 chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
4174 Usage: mcast_groups 239.128.16.128 224.0.1.20
4176 By default, Squid doesn't listen on any multicast groups.
4179 NAME: mcast_miss_addr
4180 IFDEF: MULTICAST_MISS_STREAM
4182 LOC: Config.mcast_miss.addr
4183 DEFAULT: 255.255.255.255
4185 If you enable this option, every "cache miss" URL will
4186 be sent out on the specified multicast address.
4188 Do not enable this option unless you are are absolutely
4189 certain you understand what you are doing.
4192 NAME: mcast_miss_ttl
4193 IFDEF: MULTICAST_MISS_STREAM
4195 LOC: Config.mcast_miss.ttl
4198 This is the time-to-live value for packets multicasted
4199 when multicasting off cache miss URLs is enabled. By
4200 default this is set to 'site scope', i.e. 16.
4203 NAME: mcast_miss_port
4204 IFDEF: MULTICAST_MISS_STREAM
4206 LOC: Config.mcast_miss.port
4209 This is the port number to be used in conjunction with
4213 NAME: mcast_miss_encode_key
4214 IFDEF: MULTICAST_MISS_STREAM
4216 LOC: Config.mcast_miss.encode_key
4217 DEFAULT: XXXXXXXXXXXXXXXX
4219 The URLs that are sent in the multicast miss stream are
4220 encrypted. This is the encryption key.
4223 NAME: mcast_icp_query_timeout
4227 LOC: Config.Timeout.mcast_icp_query
4229 For multicast peers, Squid regularly sends out ICP "probes" to
4230 count how many other peers are listening on the given multicast
4231 address. This value specifies how long Squid should wait to
4232 count all the replies. The default is 2000 msec, or 2
4237 INTERNAL ICON OPTIONS
4238 -----------------------------------------------------------------------------
4241 NAME: icon_directory
4243 LOC: Config.icons.directory
4244 DEFAULT: @DEFAULT_ICON_DIR@
4246 Where the icons are stored. These are normally kept in
4250 NAME: global_internal_static
4252 LOC: Config.onoff.global_internal_static
4255 This directive controls is Squid should intercept all requests for
4256 /squid-internal-static/ no matter which host the URL is requesting
4257 (default on setting), or if nothing special should be done for
4258 such URLs (off setting). The purpose of this directive is to make
4259 icons etc work better in complex cache hierarchies where it may
4260 not always be possible for all corners in the cache mesh to reach
4261 the server generating a directory listing.
4264 NAME: short_icon_urls
4266 LOC: Config.icons.use_short_names
4269 If this is enabled Squid will use short URLs for icons.
4270 If disabled it will revert to the old behavior of including
4271 it's own name and port in the URL.
4273 If you run a complex cache hierarchy with a mix of Squid and
4274 other proxies you may need to disable this directive.
4279 -----------------------------------------------------------------------------
4282 NAME: error_directory
4284 LOC: Config.errorDirectory
4285 DEFAULT: @DEFAULT_ERROR_DIR@
4287 If you wish to create your own versions of the default
4288 (English) error files, either to customize them to suit your
4289 language or company copy the template English files to another
4290 directory and point this tag at them.
4292 The squid developers are interested in making squid available in
4293 a wide variety of languages. If you are making translations for a
4294 langauge that Squid does not currently provide please consider
4295 contributing your translation back to the project.
4300 LOC: Config.errHtmlText
4303 HTML text to include in error messages. Make this a "mailto"
4304 URL to your admin address, or maybe just a link to your
4305 organizations Web page.
4307 To include this in your error messages, you must rewrite
4308 the error template files (found in the "errors" directory).
4309 Wherever you want the 'err_html_text' line to appear,
4310 insert a %L tag in the error template file.
4313 NAME: email_err_data
4316 LOC: Config.onoff.emailErrData
4319 If enabled, information about the occurred error will be
4320 included in the mailto links of the ERR pages (if %W is set)
4321 so that the email body contains the data.
4322 Syntax is <A HREF="mailto:%w%W">%w</A>
4327 LOC: Config.denyInfoList
4330 Usage: deny_info err_page_name acl
4331 or deny_info http://... acl
4332 Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
4334 This can be used to return a ERR_ page for requests which
4335 do not pass the 'http_access' rules. Squid remembers the last
4336 acl it evaluated in http_access, and if a 'deny_info' line exists
4337 for that ACL Squid returns a corresponding error page.
4339 The acl is typically the last acl on the http_access deny line which
4340 denied access. The exceptions to this rule are:
4341 - When Squid needs to request authentication credentials. It's then
4342 the first authentication related acl encountered
4343 - When none of the http_access lines matches. It's then the last
4344 acl processed on the last http_access line.
4346 You may use ERR_ pages that come with Squid or create your own pages
4347 and put them into the configured errors/ directory.
4349 Alternatively you can specify an error URL. The browsers will
4350 get redirected (302) to the specified URL. %s in the redirection
4351 URL will be replaced by the requested URL.
4353 Alternatively you can tell Squid to reset the TCP connection
4354 by specifying TCP_RESET.
4358 OPTIONS INFLUENCING REQUEST FORWARDING
4359 -----------------------------------------------------------------------------
4362 NAME: nonhierarchical_direct
4364 LOC: Config.onoff.nonhierarchical_direct
4367 By default, Squid will send any non-hierarchical requests
4368 (matching hierarchy_stoplist or not cacheable request type) direct
4371 If you set this to off, Squid will prefer to send these
4372 requests to parents.
4374 Note that in most configurations, by turning this off you will only
4375 add latency to these request without any improvement in global hit
4378 If you are inside an firewall see never_direct instead of
4384 LOC: Config.onoff.prefer_direct
4387 Normally Squid tries to use parents for most requests. If you for some
4388 reason like it to first try going direct and only use a parent if
4389 going direct fails set this to on.
4391 By combining nonhierarchical_direct off and prefer_direct on you
4392 can set up Squid to use a parent as a backup path if going direct
4395 Note: If you want Squid to use parents for all requests see
4396 the never_direct directive. prefer_direct only modifies how Squid
4397 acts on cacheable requests.
4402 LOC: Config.accessList.AlwaysDirect
4405 Usage: always_direct allow|deny [!]aclname ...
4407 Here you can use ACL elements to specify requests which should
4408 ALWAYS be forwarded by Squid to the origin servers without using
4409 any peers. For example, to always directly forward requests for
4410 local servers ignoring any parents or siblings you may have use
4413 acl local-servers dstdomain my.domain.net
4414 always_direct allow local-servers
4416 To always forward FTP requests directly, use
4419 always_direct allow FTP
4421 NOTE: There is a similar, but opposite option named
4422 'never_direct'. You need to be aware that "always_direct deny
4423 foo" is NOT the same thing as "never_direct allow foo". You
4424 may need to use a deny rule to exclude a more-specific case of
4425 some other rule. Example:
4427 acl local-external dstdomain external.foo.net
4428 acl local-servers dstdomain .foo.net
4429 always_direct deny local-external
4430 always_direct allow local-servers
4432 NOTE: If your goal is to make the client forward the request
4433 directly to the origin server bypassing Squid then this needs
4434 to be done in the client configuration. Squid configuration
4435 can only tell Squid how Squid should fetch the object.
4437 NOTE: This directive is not related to caching. The replies
4438 is cached as usual even if you use always_direct. To not cache
4439 the replies see no_cache.
4441 This option replaces some v1.1 options such as local_domain
4447 LOC: Config.accessList.NeverDirect
4450 Usage: never_direct allow|deny [!]aclname ...
4452 never_direct is the opposite of always_direct. Please read
4453 the description for always_direct if you have not already.
4455 With 'never_direct' you can use ACL elements to specify
4456 requests which should NEVER be forwarded directly to origin
4457 servers. For example, to force the use of a proxy for all
4458 requests, except those in your local domain use something like:
4460 acl local-servers dstdomain .foo.net
4461 acl all src 0.0.0.0/0.0.0.0
4462 never_direct deny local-servers
4463 never_direct allow all
4465 or if Squid is inside a firewall and there are local intranet
4466 servers inside the firewall use something like:
4468 acl local-intranet dstdomain .foo.net
4469 acl local-external dstdomain external.foo.net
4470 always_direct deny local-external
4471 always_direct allow local-intranet
4472 never_direct allow all
4474 This option replaces some v1.1 options such as inside_firewall
4479 ADVANCED NETWORKING OPTIONS
4480 -----------------------------------------------------------------------------
4483 NAME: incoming_icp_average
4486 LOC: Config.comm_incoming.icp_average
4489 NAME: incoming_http_average
4492 LOC: Config.comm_incoming.http_average
4495 NAME: incoming_dns_average
4498 LOC: Config.comm_incoming.dns_average
4501 NAME: min_icp_poll_cnt
4504 LOC: Config.comm_incoming.icp_min_poll
4507 NAME: min_dns_poll_cnt
4510 LOC: Config.comm_incoming.dns_min_poll
4513 NAME: min_http_poll_cnt
4516 LOC: Config.comm_incoming.http_min_poll
4518 Heavy voodoo here. I can't even believe you are reading this.
4519 Are you crazy? Don't even think about adjusting these unless
4520 you understand the algorithms in comm_select.c first!
4524 IFDEF: SO_ACCEPTFILTER
4527 LOC: Config.accept_filter
4529 The name of an accept(2) filter to install on Squid's
4530 listen socket(s). This feature is perhaps specific to
4531 FreeBSD and requires support in the kernel.
4533 The 'httpready' filter delays delivering new connections
4534 to Squid until a full HTTP request has been received.
4535 See the accf_http(9) man page.
4538 accept_filter httpready
4541 NAME: tcp_recv_bufsize
4545 LOC: Config.tcpRcvBufsz
4547 Size of receive buffer to set for TCP sockets. Probably just
4548 as easy to change your kernel's default. Set to zero to use
4549 the default buffer size.
4554 -----------------------------------------------------------------------------
4561 LOC: TheICAPConfig.onoff
4564 If you want to enable the ICAP module support, set this to on.
4567 NAME: icap_connect_timeout
4570 LOC: TheICAPConfig.connect_timeout_raw
4573 This parameter specifies how long to wait for the TCP connect to
4574 the requested ICAP server to complete before giving up and either
4575 terminating the HTTP transaction or bypassing the failure.
4577 The default for optional services is peer_connect_timeout.
4578 The default for essential services is connect_timeout.
4579 If this option is explicitly set, its value applies to all services.
4582 NAME: icap_io_timeout
4586 LOC: TheICAPConfig.io_timeout_raw
4589 This parameter specifies how long to wait for an I/O activity on
4590 an established, active ICAP connection before giving up and
4591 either terminating the HTTP transaction or bypassing the
4594 The default is read_timeout.
4597 NAME: icap_service_failure_limit
4600 LOC: TheICAPConfig.service_failure_limit
4603 The limit specifies the number of failures that Squid tolerates
4604 when establishing a new TCP connection with an ICAP service. If
4605 the number of failures exceeds the limit, the ICAP service is
4606 not used for new ICAP requests until it is time to refresh its
4607 OPTIONS. The per-service failure counter is reset to zero each
4608 time Squid fetches new service OPTIONS.
4610 A negative value disables the limit. Without the limit, an ICAP
4611 service will not be considered down due to connectivity failures
4612 between ICAP OPTIONS requests.
4615 NAME: icap_service_revival_delay
4618 LOC: TheICAPConfig.service_revival_delay
4621 The delay specifies the number of seconds to wait after an ICAP
4622 OPTIONS request failure before requesting the options again. The
4623 failed ICAP service is considered "down" until fresh OPTIONS are
4626 The actual delay cannot be smaller than the hardcoded minimum
4627 delay of 30 seconds.
4630 NAME: icap_preview_enable
4634 LOC: TheICAPConfig.preview_enable
4637 Set this to 'on' if you want to enable the ICAP preview
4641 NAME: icap_preview_size
4644 LOC: TheICAPConfig.preview_size
4647 The default size of preview data to be sent to the ICAP server.
4648 -1 means no preview. This value might be overwritten on a per server
4649 basis by OPTIONS requests.
4652 NAME: icap_default_options_ttl
4655 LOC: TheICAPConfig.default_options_ttl
4658 The default TTL value for ICAP OPTIONS responses that don't have
4659 an Options-TTL header.
4662 NAME: icap_persistent_connections
4666 LOC: TheICAPConfig.reuse_connections
4669 Whether or not Squid should use persistent connections to
4673 NAME: icap_send_client_ip
4677 LOC: TheICAPConfig.send_client_ip
4680 This adds the header "X-Client-IP" to ICAP requests.
4683 NAME: icap_send_client_username
4687 LOC: TheICAPConfig.send_client_username
4690 This sends authenticated HTTP client username (if available) to
4691 the ICAP service. The username value is encoded based on the
4692 icap_client_username_encode option and is sent using the header
4693 specified by the icap_client_username_header option.
4696 NAME: icap_client_username_header
4699 LOC: TheICAPConfig.client_username_header
4700 DEFAULT: X-Client-Username
4702 ICAP request header name to use for send_client_username.
4705 NAME: icap_client_username_encode
4709 LOC: TheICAPConfig.client_username_encode
4712 Whether to base64 encode the authenticated client username.
4716 TYPE: icap_service_type
4721 Defines a single ICAP service
4723 icap_service servicename vectoring_point bypass service_url
4725 vectoring_point = reqmod_precache|reqmod_postcache|respmod_precache|respmod_postcache
4726 This specifies at which point of request processing the ICAP
4727 service should be plugged in.
4729 If set to 1 and the ICAP server cannot be reached, the request will go
4730 through without being processed by an ICAP server
4731 service_url = icap://servername:port/service
4733 Note: reqmod_precache and respmod_postcache is not yet implemented
4736 icap_service service_1 reqmod_precache 0 icap://icap1.mydomain.net:1344/reqmod
4737 icap_service service_2 respmod_precache 0 icap://icap2.mydomain.net:1344/respmod
4741 TYPE: icap_class_type
4746 Defines an ICAP service chain. If there are multiple services per
4747 vectoring point, they are processed in the specified order.
4749 icap_class classname servicename...
4752 icap_class class_1 service_1 service_2
4753 icap class class_2 service_1 service_3
4757 TYPE: icap_access_type
4762 Redirects a request through an ICAP service class, depending
4765 icap_access classname allow|deny [!]aclname...
4767 The icap_access statements are processed in the order they appear in
4768 this configuration file. If an access list matches, the processing stops.
4769 For an "allow" rule, the specified class is used for the request. A "deny"
4770 rule simply stops processing without using the class. You can also use the
4771 special classname "None".
4773 For backward compatibility, it is also possible to use services
4776 icap_access class_1 allow all
4781 -----------------------------------------------------------------------------
4784 NAME: check_hostnames
4787 LOC: Config.onoff.check_hostnames
4789 For security and stability reasons Squid can check
4790 hostnames for Internet standard RFC compliance. If you want
4791 Squid to perform these checks turn this directive on.
4794 NAME: allow_underscore
4797 LOC: Config.onoff.allow_underscore
4799 Underscore characters is not strictly allowed in Internet hostnames
4800 but nevertheless used by many sites. Set this to off if you want
4801 Squid to be strict about the standard.
4802 This check is performed only when check_hostnames is set to on.
4805 NAME: cache_dns_program
4807 IFDEF: USE_DNSSERVERS
4808 DEFAULT: @DEFAULT_DNSSERVER@
4809 LOC: Config.Program.dnsserver
4811 Specify the location of the executable for dnslookup process.
4816 IFDEF: USE_DNSSERVERS
4818 LOC: Config.dnsChildren
4820 The number of processes spawn to service DNS name lookups.
4821 For heavily loaded caches on large servers, you should
4822 probably increase this value to at least 10. The maximum
4823 is 32. The default is 5.
4825 You must have at least one dnsserver process.
4828 NAME: dns_retransmit_interval
4831 LOC: Config.Timeout.idns_retransmit
4832 IFDEF: !USE_DNSSERVERS
4834 Initial retransmit interval for DNS queries. The interval is
4835 doubled each time all configured DNS servers have been tried.
4842 LOC: Config.Timeout.idns_query
4843 IFDEF: !USE_DNSSERVERS
4845 DNS Query timeout. If no response is received to a DNS query
4846 within this time all DNS servers for the queried domain
4847 are assumed to be unavailable.
4854 LOC: Config.onoff.res_defnames
4856 Normally the RES_DEFNAMES resolver option is disabled
4857 (see res_init(3)). This prevents caches in a hierarchy
4858 from interpreting single-component hostnames locally. To allow
4859 Squid to handle single-component names, enable this option.
4862 NAME: dns_nameservers
4865 LOC: Config.dns_nameservers
4867 Use this if you want to specify a list of DNS name servers
4868 (IP addresses) to use instead of those given in your
4869 /etc/resolv.conf file.
4870 On Windows platforms, if no value is specified here or in
4871 the /etc/resolv.conf file, the list of DNS name servers are
4872 taken from the Windows registry, both static and dynamic DHCP
4873 configurations are supported.
4875 Example: dns_nameservers 10.0.0.1 192.172.0.4
4880 DEFAULT: @DEFAULT_HOSTS@
4881 LOC: Config.etcHostsPath
4883 Location of the host-local IP name-address associations
4884 database. Most Operating Systems have such a file on different
4886 - Un*X & Linux: /etc/hosts
4887 - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
4888 (%SystemRoot% value install default is c:\winnt)
4889 - Windows XP/2003: %SystemRoot%\system32\drivers\etc\hosts
4890 (%SystemRoot% value install default is c:\windows)
4891 - Windows 9x/Me: %windir%\hosts
4892 (%windir% value is usually c:\windows)
4893 - Cygwin: /etc/hosts
4895 The file contains newline-separated definitions, in the
4896 form ip_address_in_dotted_form name [name ...] names are
4897 whitespace-separated. Lines beginning with an hash (#)
4898 character are comments.
4900 The file is checked at startup and upon configuration.
4901 If set to 'none', it won't be checked.
4902 If append_domain is used, that domain will be added to
4903 domain-local (i.e. not containing any dot character) host
4909 LOC: Config.dns_testname_list
4911 DEFAULT_IF_NONE: netscape.com internic.net nlanr.net microsoft.com
4913 The DNS tests exit as soon as the first site is successfully looked up
4915 This test can be disabled with the -D command line option.
4920 LOC: Config.appendDomain
4923 Appends local domain name to hostnames without any dots in
4924 them. append_domain must begin with a period.
4926 Be warned there are now Internet names with no dots in
4927 them using only top-domain names, so setting this may
4928 cause some Internet sites to become unavailable.
4931 append_domain .yourdomain.com
4934 NAME: ignore_unknown_nameservers
4936 LOC: Config.onoff.ignore_unknown_nameservers
4939 By default Squid checks that DNS responses are received
4940 from the same IP addresses they are sent to. If they
4941 don't match, Squid ignores the response and writes a warning
4942 message to cache.log. You can allow responses from unknown
4943 nameservers by setting this option to 'off'.
4947 COMMENT: (number of entries)
4950 LOC: Config.ipcache.size
4957 LOC: Config.ipcache.low
4964 LOC: Config.ipcache.high
4966 The size, low-, and high-water marks for the IP cache.
4969 NAME: fqdncache_size
4970 COMMENT: (number of entries)
4973 LOC: Config.fqdncache.size
4975 Maximum number of FQDN cache entries.
4980 -----------------------------------------------------------------------------
4987 LOC: Config.onoff.mem_pools
4989 If set, Squid will keep pools of allocated (but unused) memory
4990 available for future use. If memory is a premium on your
4991 system and you believe your malloc library outperforms Squid
4992 routines, disable this.
4995 NAME: memory_pools_limit
4999 LOC: Config.MemPools.limit
5001 Used only with memory_pools on:
5002 memory_pools_limit 50 MB
5004 If set to a non-zero value, Squid will keep at most the specified
5005 limit of allocated (but unused) memory in memory pools. All free()
5006 requests that exceed this limit will be handled by your malloc
5007 library. Squid does not pre-allocate any memory, just safe-keeps
5008 objects that otherwise would be free()d. Thus, it is safe to set
5009 memory_pools_limit to a reasonably high value even if your
5010 configuration will use less memory.
5012 If set to zero, Squid will keep all memory it can. That is, there
5013 will be no limit on the total amount of memory used for safe-keeping.
5015 To disable memory allocation optimization, do not set
5016 memory_pools_limit to 0. Set memory_pools to "off" instead.
5018 An overhead for maintaining memory pools is not taken into account
5019 when the limit is checked. This overhead is close to four bytes per
5020 object kept. However, pools may actually _save_ memory because of
5021 reduced memory thrashing in your malloc library.
5028 LOC: opt_forwarded_for
5030 If set, Squid will include your system's IP address or name
5031 in the HTTP requests it forwards. By default it looks like
5034 X-Forwarded-For: 192.1.2.3
5036 If you disable this, it will appear as
5038 X-Forwarded-For: unknown
5041 NAME: cachemgr_passwd
5042 TYPE: cachemgrpasswd
5044 LOC: Config.passwd_list
5046 Specify passwords for cachemgr operations.
5048 Usage: cachemgr_passwd password action action ...
5050 Some valid actions are (see cache manager menu for a full list):
5089 * Indicates actions which will not be performed without a
5090 valid password, others can be performed if not listed here.
5092 To disable an action, set the password to "disable".
5093 To allow performing an action without a password, set the
5096 Use the keyword "all" to set the same password for all actions.
5099 cachemgr_passwd secret shutdown
5100 cachemgr_passwd lesssssssecret info stats/objects
5101 cachemgr_passwd disable all
5108 LOC: Config.onoff.client_db
5110 If you want to disable collecting per-client statistics,
5111 turn off client_db here.
5114 NAME: refresh_all_ims
5118 LOC: Config.onoff.refresh_all_ims
5120 When you enable this option, squid will always check
5121 the origin server for an update when a client sends an
5122 If-Modified-Since request. Many browsers use IMS
5123 requests when the user requests a reload, and this
5124 ensures those clients receive the latest version.
5126 By default (off), squid may return a Not Modified response
5127 based on the age of the cached version.
5130 NAME: reload_into_ims
5131 IFDEF: HTTP_VIOLATIONS
5135 LOC: Config.onoff.reload_into_ims
5137 When you enable this option, client no-cache or ``reload''
5138 requests will be changed to If-Modified-Since requests.
5139 Doing this VIOLATES the HTTP standard. Enabling this
5140 feature could make you liable for problems which it
5143 see also refresh_pattern for a more selective approach.
5146 NAME: maximum_single_addr_tries
5148 LOC: Config.retry.maxtries
5151 This sets the maximum number of connection attempts for a
5152 host that only has one address (for multiple-address hosts,
5153 each address is tried once).
5155 The default value is one attempt, the (not recommended)
5156 maximum is 255 tries. A warning message will be generated
5157 if it is set to a value greater than ten.
5159 Note: This is in addition to the request re-forwarding which
5160 takes place if Squid fails to get a satisfying response.
5163 NAME: retry_on_error
5165 LOC: Config.retry.onerror
5168 If set to on Squid will automatically retry requests when
5169 receiving an error response. This is mainly useful if you
5170 are in a complex cache hierarchy to work around access
5174 NAME: as_whois_server
5176 LOC: Config.as_whois_server
5177 DEFAULT: whois.ra.net
5178 DEFAULT_IF_NONE: whois.ra.net
5180 WHOIS server to query for AS numbers. NOTE: AS numbers are
5181 queried only when Squid starts up, not for every request.
5186 LOC: Config.onoff.offline
5189 Enable this option and Squid will never try to validate cached
5193 NAME: uri_whitespace
5194 TYPE: uri_whitespace
5195 LOC: Config.uri_whitespace
5198 What to do with requests that have whitespace characters in the
5201 strip: The whitespace characters are stripped out of the URL.
5202 This is the behavior recommended by RFC2396.
5203 deny: The request is denied. The user receives an "Invalid
5205 allow: The request is allowed and the URI is not changed. The
5206 whitespace characters remain in the URI. Note the
5207 whitespace is passed to redirector processes if they
5209 encode: The request is allowed and the whitespace characters are
5210 encoded according to RFC1738. This could be considered
5211 a violation of the HTTP/1.1
5212 RFC because proxies are not allowed to rewrite URI's.
5213 chop: The request is allowed and the URI is chopped at the
5214 first whitespace. This might also be considered a
5220 LOC: Config.coredump_dir
5222 DEFAULT_IF_NONE: none
5224 By default Squid leaves core files in the directory from where
5225 it was started. If you set 'coredump_dir' to a directory
5226 that exists, Squid will chdir() to that directory at startup
5227 and coredump files will be left there.
5230 # Leave coredumps in the first cache dir
5231 coredump_dir @DEFAULT_SWAP_DIR@
5235 NAME: redirector_bypass
5237 LOC: Config.onoff.redirector_bypass
5240 When this is 'on', a request will not go through the
5241 redirector if all redirectors are busy. If this is 'off'
5242 and the redirector queue grows too large, Squid will exit
5243 with a FATAL error and ask you to increase the number of
5244 redirectors. You should only enable this if the redirectors
5245 are not critical to your caching system. If you use
5246 redirectors for access control, and you enable this option,
5247 users may have access to pages they should not
5248 be allowed to request.
5253 LOC: Config.chroot_dir
5256 Use this to have Squid do a chroot() while initializing. This
5257 also causes Squid to fully drop root privileges after
5258 initializing. This means, for example, if you use a HTTP
5259 port less than 1024 and try to reconfigure, you will may get an
5260 error saying that Squid can not open the port.
5263 NAME: balance_on_multiple_ip
5265 LOC: Config.onoff.balance_on_multiple_ip
5268 Some load balancing servers based on round robin DNS have been
5269 found not to preserve user session state across requests
5270 to different IP addresses.
5272 By default Squid rotates IP's per request. By disabling
5273 this directive only connection failure triggers rotation.
5276 NAME: pipeline_prefetch
5278 LOC: Config.onoff.pipeline_prefetch
5281 To boost the performance of pipelined requests to closer
5282 match that of a non-proxied environment Squid can try to fetch
5283 up to two requests in parallel from a pipeline.
5285 Defaults to off for bandwidth management and access logging
5289 NAME: high_response_time_warning
5292 LOC: Config.warnings.high_rptm
5295 If the one-minute median response time exceeds this value,
5296 Squid prints a WARNING with debug level 0 to get the
5297 administrators attention. The value is in milliseconds.
5300 NAME: high_page_fault_warning
5302 LOC: Config.warnings.high_pf
5305 If the one-minute average page fault rate exceeds this
5306 value, Squid prints a WARNING with debug level 0 to get
5307 the administrators attention. The value is in page faults
5311 NAME: high_memory_warning
5313 LOC: Config.warnings.high_memory
5316 If the memory usage (as determined by mallinfo) exceeds
5317 value, Squid prints a WARNING with debug level 0 to get
5318 the administrators attention.
5321 NAME: sleep_after_fork
5322 COMMENT: (microseconds)
5324 LOC: Config.sleep_after_fork
5327 When this is set to a non-zero value, the main Squid process
5328 sleeps the specified number of microseconds after a fork()
5329 system call. This sleep may help the situation where your
5330 system reports fork() failures due to lack of (virtual)
5331 memory. Note, however, if you have a lot of child
5332 processes, these sleep delays will add up and your
5333 Squid will not service requests for some amount of time
5334 until all the child processes have been started.
5335 On Windows value less then 1000 (1 milliseconds) are