· 9 years ago · Jan 31, 2017, 04:12 PM
1
2# WELCOME TO SQUID 2
3# ------------------
4#
5# This is the default Squid configuration file. You may wish
6# to look at the Squid home page (http://www.squid-cache.org/)
7# for the FAQ and other documentation.
8#
9# The default Squid config file shows what the defaults for
10# various options happen to be. If you don't need to change the
11# default, you shouldn't uncomment the line. Doing so may cause
12# run-time problems. In some cases "none" refers to no default
13# setting at all, while in other cases it refers to a valid
14# option - the comments for that keyword indicate if this is the
15# case.
16#
17
18
19# NETWORK OPTIONS
20# -----------------------------------------------------------------------------
21
22# TAG: http_port
23# Usage: port
24# hostname:port
25# 1.2.3.4:port
26#
27# The socket addresses where Squid will listen for HTTP client
28# requests. You may specify multiple socket addresses.
29# There are three forms: port alone, hostname with port, and
30# IP address with port. If you specify a hostname or IP
31# address, then Squid binds the socket to that specific
32# address. This replaces the old 'tcp_incoming_address'
33# option. Most likely, you do not need to bind to a specific
34# address, so you can use the port number alone.
35#
36# The default port number is 3128.
37#
38# If you are running Squid in accelerator mode, then you
39# probably want to listen on port 80 also, or instead.
40#
41# The -a command line option will override the *first* port
42# number listed here. That option will NOT override an IP
43# address, however.
44#
45# You may specify multiple socket addresses on multiple lines.
46#
47# If you run Squid on a dual-homed machine with an internal
48# and an external interface then we recommend you to specify the
49# internal address:port in http_port. This way Squid will only be
50# visible on the internal address.
51#
52#Default:
53http_port 192.168.2.221:3128
54
55# TAG: https_port
56# Usage: [ip:]port cert=certificate.pem [key=key.pem] [options...]
57#
58# The socket address where Squid will listen for HTTPS client
59# requests.
60#
61# This is really only useful for situations where you are running
62# squid in accelerator mode and you want to do the SSL work at the
63# accelerator level.
64#
65# You may specify multiple socket addresses on multiple lines,
66# each with their own SSL certificate and/or options.
67#
68# Options:
69#
70# cert= Path to SSL certificate (PEM format)
71#
72# key= Path to SSL private key file (PEM format)
73# if not specified, the certificate file is
74# assumed to be a combined certificate and
75# key file
76#
77# version= The version of SSL/TLS supported
78# 1 automatic (default)
79# 2 SSLv2 only
80# 3 SSLv3 only
81# 4 TLSv1 only
82#
83# cipher= Colon separated list of supported ciphers
84#
85# options= Varions SSL engine options. The most important
86# being:
87# NO_SSLv2 Disallow the use of SSLv2
88# NO_SSLv3 Disallow the use of SSLv3
89# NO_TLSv1 Disallow the use of TLSv1
90# See src/ssl_support.c or OpenSSL documentation
91# for a more complete list.
92#
93#Default:
94# none
95
96# TAG: ssl_unclean_shutdown
97# Some browsers (especially MSIE) bugs out on SSL shutdown
98# messages.
99#
100#Default:
101# ssl_unclean_shutdown off
102
103# TAG: icp_port
104# The port number where Squid sends and receives ICP queries to
105# and from neighbor caches. Default is 3130. To disable use
106# "0". May be overridden with -u on the command line.
107#
108#Default:
109# icp_port 3130
110
111# TAG: htcp_port
112# Note: This option is only available if Squid is rebuilt with the
113# --enable-htcp option
114#
115# The port number where Squid sends and receives HTCP queries to
116# and from neighbor caches. Default is 4827. To disable use
117# "0".
118#
119#Default:
120# htcp_port 4827
121
122# TAG: mcast_groups
123# This tag specifies a list of multicast groups which your server
124# should join to receive multicasted ICP queries.
125#
126# NOTE! Be very careful what you put here! Be sure you
127# understand the difference between an ICP _query_ and an ICP
128# _reply_. This option is to be set only if you want to RECEIVE
129# multicast queries. Do NOT set this option to SEND multicast
130# ICP (use cache_peer for that). ICP replies are always sent via
131# unicast, so this option does not affect whether or not you will
132# receive replies from multicast group members.
133#
134# You must be very careful to NOT use a multicast address which
135# is already in use by another group of caches.
136#
137# If you are unsure about multicast, please read the Multicast
138# chapter in the Squid FAQ (http://www.squid-cache.org/FAQ/).
139#
140# Usage: mcast_groups 239.128.16.128 224.0.1.20
141#
142# By default, Squid doesn't listen on any multicast groups.
143#
144#Default:
145# none
146
147# TAG: udp_incoming_address
148# TAG: udp_outgoing_address
149# udp_incoming_address is used for the ICP socket receiving packets
150# from other caches.
151# udp_outgoing_address is used for ICP packets sent out to other
152# caches.
153#
154# The default behavior is to not bind to any specific address.
155#
156# A udp_incoming_address value of 0.0.0.0 indicates that Squid should
157# listen for UDP messages on all available interfaces.
158#
159# If udp_outgoing_address is set to 255.255.255.255 (the default)
160# then it will use the same socket as udp_incoming_address. Only
161# change this if you want to have ICP queries sent using another
162# address than where this Squid listens for ICP queries from other
163# caches.
164#
165# NOTE, udp_incoming_address and udp_outgoing_address can not
166# have the same value since they both use port 3130.
167#
168#Default:
169# udp_incoming_address 0.0.0.0
170# udp_outgoing_address 255.255.255.255
171
172
173# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
174# -----------------------------------------------------------------------------
175
176# TAG: cache_peer
177# To specify other caches in a hierarchy, use the format:
178#
179# cache_peer hostname type http_port icp_port
180#
181# For example,
182#
183# # proxy icp
184# # hostname type port port options
185# # -------------------- -------- ----- ----- -----------
186# cache_peer parent.foo.net parent 3128 3130 [proxy-only]
187# cache_peer sib1.foo.net sibling 3128 3130 [proxy-only]
188# cache_peer sib2.foo.net sibling 3128 3130 [proxy-only]
189#
190# type: either 'parent', 'sibling', or 'multicast'.
191#
192# proxy_port: The port number where the cache listens for proxy
193# requests.
194#
195# icp_port: Used for querying neighbor caches about
196# objects. To have a non-ICP neighbor
197# specify '7' for the ICP port and make sure the
198# neighbor machine has the UDP echo port
199# enabled in its /etc/inetd.conf file.
200#
201# options: proxy-only
202# weight=n
203# ttl=n
204# no-query
205# default
206# round-robin
207# multicast-responder
208# closest-only
209# no-digest
210# no-netdb-exchange
211# no-delay
212# login=user:password | PASS | *:password
213# connect-timeout=nn
214# digest-url=url
215# allow-miss
216# max-conn
217#
218# use 'proxy-only' to specify that objects fetched
219# from this cache should not be saved locally.
220#
221# use 'weight=n' to specify a weighted parent.
222# The weight must be an integer. The default weight
223# is 1, larger weights are favored more.
224#
225# use 'ttl=n' to specify a IP multicast TTL to use
226# when sending an ICP queries to this address.
227# Only useful when sending to a multicast group.
228# Because we don't accept ICP replies from random
229# hosts, you must configure other group members as
230# peers with the 'multicast-responder' option below.
231#
232# use 'no-query' to NOT send ICP queries to this
233# neighbor.
234#
235# use 'default' if this is a parent cache which can
236# be used as a "last-resort." You should probably
237# only use 'default' in situations where you cannot
238# use ICP with your parent cache(s).
239#
240# use 'round-robin' to define a set of parents which
241# should be used in a round-robin fashion in the
242# absence of any ICP queries.
243#
244# 'multicast-responder' indicates that the named peer
245# is a member of a multicast group. ICP queries will
246# not be sent directly to the peer, but ICP replies
247# will be accepted from it.
248#
249# 'closest-only' indicates that, for ICP_OP_MISS
250# replies, we'll only forward CLOSEST_PARENT_MISSes
251# and never FIRST_PARENT_MISSes.
252#
253# use 'no-digest' to NOT request cache digests from
254# this neighbor.
255#
256# 'no-netdb-exchange' disables requesting ICMP
257# RTT database (NetDB) from the neighbor.
258#
259# use 'no-delay' to prevent access to this neighbor
260# from influencing the delay pools.
261#
262# use 'login=user:password' if this is a personal/workgroup
263# proxy and your parent requires proxy authentication.
264# Note: The string can include URL escapes (i.e. %20 for
265# spaces). This also means that % must be written as %%.
266#
267# use 'login=PASS' if users must authenticate against
268# the upstream proxy. This will pass the users credentials
269# as they are to the peer proxy. This only works for the
270# Basic HTTP authentication sheme. Note: To combine this
271# with proxy_auth both proxies must share the same user
272# database as HTTP only allows for one proxy login.
273# Also be warned that this will expose your users proxy
274# password to the peer. USE WITH CAUTION
275#
276# use 'login=*:password' to pass the username to the
277# upstream cache, but with a fixed password. This is meant
278# to be used when the peer is in another administrative
279# domain, but it is still needed to identify each user.
280# The star can optionally be followed by some extra
281# information which is added to the username. This can
282# be used to identify this proxy to the peer, similar to
283# the login=username:password option above.
284#
285# use 'connect-timeout=nn' to specify a peer
286# specific connect timeout (also see the
287# peer_connect_timeout directive)
288#
289# use 'digest-url=url' to tell Squid to fetch the cache
290# digest (if digests are enabled) for this host from
291# the specified URL rather than the Squid default
292# location.
293#
294# use 'allow-miss' to disable Squid's use of only-if-cached
295# when forwarding requests to siblings. This is primarily
296# useful when icp_hit_stale is used by the sibling. To
297# extensive use of this option may result in forwarding
298# loops, and you should avoid having two-way peerings
299# with this option. (for example to deny peer usage on
300# requests from peer by denying cache_peer_access if the
301# source is a peer)
302#
303# use 'max-conn' to limit the amount of connections Squid
304# may open to this peer.
305#
306# NOTE: non-ICP neighbors must be specified as 'parent'.
307#
308#Default:
309# none
310
311# TAG: cache_peer_domain
312# Use to limit the domains for which a neighbor cache will be
313# queried. Usage:
314#
315# cache_peer_domain cache-host domain [domain ...]
316# cache_peer_domain cache-host !domain
317#
318# For example, specifying
319#
320# cache_peer_domain parent.foo.net .edu
321#
322# has the effect such that UDP query packets are sent to
323# 'bigserver' only when the requested object exists on a
324# server in the .edu domain. Prefixing the domainname
325# with '!' means that the cache will be queried for objects
326# NOT in that domain.
327#
328# NOTE: * Any number of domains may be given for a cache-host,
329# either on the same or separate lines.
330# * When multiple domains are given for a particular
331# cache-host, the first matched domain is applied.
332# * Cache hosts with no domain restrictions are queried
333# for all requests.
334# * There are no defaults.
335# * There is also a 'cache_peer_access' tag in the ACL
336# section.
337#
338#Default:
339# none
340
341# TAG: neighbor_type_domain
342# usage: neighbor_type_domain parent|sibling domain domain ...
343#
344# Modifying the neighbor type for specific domains is now
345# possible. You can treat some domains differently than the the
346# default neighbor type specified on the 'cache_peer' line.
347# Normally it should only be necessary to list domains which
348# should be treated differently because the default neighbor type
349# applies for hostnames which do not match domains listed here.
350#
351#EXAMPLE:
352# cache_peer parent cache.foo.org 3128 3130
353# neighbor_type_domain cache.foo.org sibling .com .net
354# neighbor_type_domain cache.foo.org sibling .au .de
355#
356#Default:
357# none
358
359# TAG: icp_query_timeout (msec)
360# Normally Squid will automatically determine an optimal ICP
361# query timeout value based on the round-trip-time of recent ICP
362# queries. If you want to override the value determined by
363# Squid, set this 'icp_query_timeout' to a non-zero value. This
364# value is specified in MILLISECONDS, so, to use a 2-second
365# timeout (the old default), you would write:
366#
367# icp_query_timeout 2000
368#
369#Default:
370# icp_query_timeout 0
371
372# TAG: maximum_icp_query_timeout (msec)
373# Normally the ICP query timeout is determined dynamically. But
374# sometimes it can lead to very large values (say 5 seconds).
375# Use this option to put an upper limit on the dynamic timeout
376# value. Do NOT use this option to always use a fixed (instead
377# of a dynamic) timeout value. To set a fixed timeout see the
378# 'icp_query_timeout' directive.
379#
380#Default:
381# maximum_icp_query_timeout 2000
382
383# TAG: mcast_icp_query_timeout (msec)
384# For Multicast peers, Squid regularly sends out ICP "probes" to
385# count how many other peers are listening on the given multicast
386# address. This value specifies how long Squid should wait to
387# count all the replies. The default is 2000 msec, or 2
388# seconds.
389#
390#Default:
391# mcast_icp_query_timeout 2000
392
393# TAG: dead_peer_timeout (seconds)
394# This controls how long Squid waits to declare a peer cache
395# as "dead." If there are no ICP replies received in this
396# amount of time, Squid will declare the peer dead and not
397# expect to receive any further ICP replies. However, it
398# continues to send ICP queries, and will mark the peer as
399# alive upon receipt of the first subsequent ICP reply.
400#
401# This timeout also affects when Squid expects to receive ICP
402# replies from peers. If more than 'dead_peer' seconds have
403# passed since the last ICP reply was received, Squid will not
404# expect to receive an ICP reply on the next query. Thus, if
405# your time between requests is greater than this timeout, you
406# will see a lot of requests sent DIRECT to origin servers
407# instead of to your parents.
408#
409#Default:
410# dead_peer_timeout 10 seconds
411
412# TAG: hierarchy_stoplist
413# A list of words which, if found in a URL, cause the object to
414# be handled directly by this cache. In other words, use this
415# to not query neighbor caches for certain objects. You may
416# list this option multiple times.
417#We recommend you to use at least the following line.
418hierarchy_stoplist cgi-bin ?
419
420# TAG: no_cache
421# A list of ACL elements which, if matched, cause the request to
422# not be satisfied from the cache and the reply to not be cached.
423# In other words, use this to force certain objects to never be cached.
424#
425# You must use the word 'DENY' to indicate the ACL names which should
426# NOT be cached.
427#
428#We recommend you to use the following two lines.
429acl QUERY urlpath_regex cgi-bin \?
430no_cache deny QUERY
431acl NOCACHE url_regex "/etc/squid/regras/direto.txt"
432no_cache deny NOCACHE
433
434
435# OPTIONS WHICH AFFECT THE CACHE SIZE
436# -----------------------------------------------------------------------------
437
438# TAG: cache_mem (bytes)
439# NOTE: THIS PARAMETER DOES NOT SPECIFY THE MAXIMUM PROCESS SIZE.
440# IT ONLY PLACES A LIMIT ON HOW MUCH ADDITIONAL MEMORY SQUID WILL
441# USE AS A MEMORY CACHE OF OBJECTS. SQUID USES MEMORY FOR OTHER
442# THINGS AS WELL. SEE THE SQUID FAQ SECTION 8 FOR DETAILS.
443#
444# 'cache_mem' specifies the ideal amount of memory to be used
445# for:
446# * In-Transit objects
447# * Hot Objects
448# * Negative-Cached objects
449#
450# Data for these objects are stored in 4 KB blocks. This
451# parameter specifies the ideal upper limit on the total size of
452# 4 KB blocks allocated. In-Transit objects take the highest
453# priority.
454#
455# In-transit objects have priority over the others. When
456# additional space is needed for incoming data, negative-cached
457# and hot objects will be released. In other words, the
458# negative-cached and hot objects will fill up any unused space
459# not needed for in-transit objects.
460#
461# If circumstances require, this limit will be exceeded.
462# Specifically, if your incoming request rate requires more than
463# 'cache_mem' of memory to hold in-transit objects, Squid will
464# exceed this limit to satisfy the new requests. When the load
465# decreases, blocks will be freed until the high-water mark is
466# reached. Thereafter, blocks will be used to store hot
467# objects.
468#
469#Default:
470# cache_mem 8 MB
471
472# TAG: cache_swap_low (percent, 0-100)
473# TAG: cache_swap_high (percent, 0-100)
474#
475# The low- and high-water marks for cache object replacement.
476# Replacement begins when the swap (disk) usage is above the
477# low-water mark and attempts to maintain utilization near the
478# low-water mark. As swap utilization gets close to high-water
479# mark object eviction becomes more aggressive. If utilization is
480# close to the low-water mark less replacement is done each time.
481#
482# Defaults are 90% and 95%. If you have a large cache, 5% could be
483# hundreds of MB. If this is the case you may wish to set these
484# numbers closer together.
485#
486#Default:
487# cache_swap_low 90
488# cache_swap_high 95
489
490# TAG: maximum_object_size (bytes)
491# Objects larger than this size will NOT be saved on disk. The
492# value is specified in kilobytes, and the default is 4MB. If
493# you wish to get a high BYTES hit ratio, you should probably
494# increase this (one 32 MB object hit counts for 3200 10KB
495# hits). If you wish to increase speed more than your want to
496# save bandwidth you should leave this low.
497#
498# NOTE: if using the LFUDA replacement policy you should increase
499# this value to maximize the byte hit rate improvement of LFUDA!
500# See replacement_policy below for a discussion of this policy.
501#
502#Default:
503# maximum_object_size 4096 KB
504
505# TAG: minimum_object_size (bytes)
506# Objects smaller than this size will NOT be saved on disk. The
507# value is specified in kilobytes, and the default is 0 KB, which
508# means there is no minimum.
509#
510#Default:
511# minimum_object_size 0 KB
512
513# TAG: maximum_object_size_in_memory (bytes)
514# Objects greater than this size will not be attempted to kept in
515# the memory cache. This should be set high enough to keep objects
516# accessed frequently in memory to improve performance whilst low
517# enough to keep larger objects from hoarding cache_mem .
518#
519#Default:
520# maximum_object_size_in_memory 8 KB
521
522# TAG: ipcache_size (number of entries)
523# TAG: ipcache_low (percent)
524# TAG: ipcache_high (percent)
525# The size, low-, and high-water marks for the IP cache.
526#
527#Default:
528# ipcache_size 1024
529# ipcache_low 90
530# ipcache_high 95
531
532# TAG: fqdncache_size (number of entries)
533# Maximum number of FQDN cache entries.
534#
535#Default:
536# fqdncache_size 1024
537
538# TAG: cache_replacement_policy
539# The cache replacement policy parameter determines which
540# objects are evicted (replaced) when disk space is needed.
541#
542# lru : Squid's original list based LRU policy
543# heap GDSF : Greedy-Dual Size Frequency
544# heap LFUDA: Least Frequently Used with Dynamic Aging
545# heap LRU : LRU policy implemented using a heap
546#
547# Applies to any cache_dir lines listed below this.
548#
549# The LRU policies keeps recently referenced objects.
550#
551# The heap GDSF policy optimizes object hit rate by keeping smaller
552# popular objects in cache so it has a better chance of getting a
553# hit. It achieves a lower byte hit rate than LFUDA though since
554# it evicts larger (possibly popular) objects.
555#
556# The heap LFUDA policy keeps popular objects in cache regardless of
557# their size and thus optimizes byte hit rate at the expense of
558# hit rate since one large, popular object will prevent many
559# smaller, slightly less popular objects from being cached.
560#
561# Both policies utilize a dynamic aging mechanism that prevents
562# cache pollution that can otherwise occur with frequency-based
563# replacement policies.
564#
565# NOTE: if using the LFUDA replacement policy you should increase
566# the value of maximum_object_size above its default of 4096 KB to
567# to maximize the potential byte hit rate improvement of LFUDA.
568#
569# For more information about the GDSF and LFUDA cache replacement
570# policies see http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html
571# and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html.
572#
573#Default:
574# cache_replacement_policy lru
575
576# TAG: memory_replacement_policy
577# The memory replacement policy parameter determines which
578# objects are purged from memory when memory space is needed.
579#
580# See cache_replacement_policy for details.
581#
582#Default:
583# memory_replacement_policy lru
584
585
586# LOGFILE PATHNAMES AND CACHE DIRECTORIES
587# -----------------------------------------------------------------------------
588
589# TAG: cache_dir
590# Usage:
591#
592# cache_dir Type Directory-Name Fs-specific-data [options]
593#
594# cache_dir diskd Maxobjsize Directory-Name MB L1 L2 Q1 Q2
595#
596# You can specify multiple cache_dir lines to spread the
597# cache among different disk partitions.
598#
599# Type specifies the kind of storage system to use. Only "ufs"
600# is built by default. To eanble any of the other storage systems
601# see the --enable-storeio configure option.
602#
603# 'Directory' is a top-level directory where cache swap
604# files will be stored. If you want to use an entire disk
605# for caching, then this can be the mount-point directory.
606# The directory must exist and be writable by the Squid
607# process. Squid will NOT create this directory for you.
608#
609# The ufs store type:
610#
611# "ufs" is the old well-known Squid storage format that has always
612# been there.
613#
614# cache_dir ufs Directory-Name Mbytes L1 L2 [options]
615#
616# 'Mbytes' is the amount of disk space (MB) to use under this
617# directory. The default is 100 MB. Change this to suit your
618# configuration. Do NOT put the size of your disk drive here.
619# Instead, if you want Squid to use the entire disk drive,
620# subtract 20% and use that value.
621#
622# 'Level-1' is the number of first-level subdirectories which
623# will be created under the 'Directory'. The default is 16.
624#
625# 'Level-2' is the number of second-level subdirectories which
626# will be created under each first-level directory. The default
627# is 256.
628#
629# The aufs store type:
630#
631# "aufs" uses the same storage format as "ufs", utilizing
632# POSIX-threads to avoid blocking the main Squid process on
633# disk-I/O. This was formerly known in Squid as async-io.
634#
635# cache_dir aufs Directory-Name Mbytes L1 L2 [options]
636#
637# see argument descriptions under ufs above
638#
639# The diskd store type:
640#
641# "diskd" uses the same storage format as "ufs", utilizing a
642# separate process to avoid blocking the main Squid process on
643# disk-I/O.
644#
645# cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
646#
647# see argument descriptions under ufs above
648#
649# Q1 specifies the number of unacknowledged I/O requests when Squid
650# stops opening new files. If this many messages are in the queues,
651# Squid won't open new files. Default is 64
652#
653# Q2 specifies the number of unacknowledged messages when Squid
654# starts blocking. If this many messages are in the queues,
655# Squid blocks until it recevies some replies. Default is 72
656#
657# Common options:
658#
659# read-only, this cache_dir is read only.
660#
661# max-size=n, refers to the max object size this storedir supports.
662# It is used to initially choose the storedir to dump the object.
663# Note: To make optimal use of the max-size limits you should order
664# the cache_dir lines with the smallest max-size value first and the
665# ones with no max-size specification last.
666#
667#Default:
668cache_dir aufs /var/spool/squid 100 16 256
669
670# TAG: cache_access_log
671# Logs the client request activity. Contains an entry for
672# every HTTP and ICP queries received. To disable, enter "none".
673#
674#Default:
675cache_access_log /var/log/squid/access.log
676
677# TAG: cache_log
678# Cache logging file. This is where general information about
679# your cache's behavior goes. You can increase the amount of data
680# logged to this file with the "debug_options" tag below.
681#
682#Default:
683cache_log /var/log/squid/cache.log
684
685# TAG: cache_store_log
686# Logs the activities of the storage manager. Shows which
687# objects are ejected from the cache, and which objects are
688# saved and for how long. To disable, enter "none". There are
689# not really utilities to analyze this data, so you can safely
690# disable it.
691#
692#Default:
693# cache_store_log /var/log/squid/store.log
694
695# TAG: cache_swap_log
696# Location for the cache "swap.log." This log file holds the
697# metadata of objects saved on disk. It is used to rebuild the
698# cache during startup. Normally this file resides in each
699# 'cache_dir' directory, but you may specify an alternate
700# pathname here. Note you must give a full filename, not just
701# a directory. Since this is the index for the whole object
702# list you CANNOT periodically rotate it!
703#
704# If %s can be used in the file name then it will be replaced with a
705# a representation of the cache_dir name where each / is replaced
706# with '.'. This is needed to allow adding/removing cache_dir
707# lines when cache_swap_log is being used.
708#
709# If have more than one 'cache_dir', and %s is not used in the name
710# then these swap logs will have names such as:
711#
712# cache_swap_log.00
713# cache_swap_log.01
714# cache_swap_log.02
715#
716# The numbered extension (which is added automatically)
717# corresponds to the order of the 'cache_dir' lines in this
718# configuration file. If you change the order of the 'cache_dir'
719# lines in this file, then these log files will NOT correspond to
720# the correct 'cache_dir' entry (unless you manually rename
721# them). We recommend that you do NOT use this option. It is
722# better to keep these log files in each 'cache_dir' directory.
723#
724#Default:
725# none
726
727# TAG: emulate_httpd_log on|off
728# The Cache can emulate the log file format which many 'httpd'
729# programs use. To disable/enable this emulation, set
730# emulate_httpd_log to 'off' or 'on'. The default
731# is to use the native log format since it includes useful
732# information that Squid-specific log analyzers use.
733#
734#Default:
735# emulate_httpd_log off
736
737# TAG: log_ip_on_direct on|off
738# Log the destination IP address in the hierarchy log tag when going
739# direct. Earlier Squid versions logged the hostname here. If you
740# prefer the old way set this to off.
741#
742#Default:
743# log_ip_on_direct on
744
745# TAG: mime_table
746# Pathname to Squid's MIME table. You shouldn't need to change
747# this, but the default file contains examples and formatting
748# information if you do.
749#
750#Default:
751# mime_table /etc/squid/mime.conf
752
753# TAG: log_mime_hdrs on|off
754# The Cache can record both the request and the response MIME
755# headers for each HTTP transaction. The headers are encoded
756# safely and will appear as two bracketed fields at the end of
757# the access log (for either the native or httpd-emulated log
758# formats). To enable this logging set log_mime_hdrs to 'on'.
759#
760#Default:
761# log_mime_hdrs off
762
763# TAG: useragent_log
764# Note: This option is only available if Squid is rebuilt with the
765# --enable-useragent-log option
766#
767# Squid will write the User-Agent field from HTTP requests
768# to the filename specified here. By default useragent_log
769# is disabled.
770#
771#Default:
772# none
773
774# TAG: referer_log
775# Note: This option is only available if Squid is rebuilt with the
776# --enable-referer-log option
777#
778# Squid will write the Referer field from HTTP requests to the
779# filename specified here. By default referer_log is disabled.
780#
781#Default:
782# none
783
784# TAG: pid_filename
785# A filename to write the process-id to. To disable, enter "none".
786#
787#Default:
788pid_filename /var/run/squid.pid
789
790# TAG: debug_options
791# Logging options are set as section,level where each source file
792# is assigned a unique section. Lower levels result in less
793# output, Full debugging (level 9) can result in a very large
794# log file, so be careful. The magic word "ALL" sets debugging
795# levels for all sections. We recommend normally running with
796# "ALL,1".
797#
798#Default:
799# debug_options ALL,1
800
801# TAG: log_fqdn on|off
802# Turn this on if you wish to log fully qualified domain names
803# in the access.log. To do this Squid does a DNS lookup of all
804# IP's connecting to it. This can (in some situations) increase
805# latency, which makes your cache seem slower for interactive
806# browsing.
807#
808#Default:
809# log_fqdn off
810
811# TAG: client_netmask
812# A netmask for client addresses in logfiles and cachemgr output.
813# Change this to protect the privacy of your cache clients.
814# A netmask of 255.255.255.0 will log all IP's in that range with
815# the last digit set to '0'.
816#
817#Default:
818# client_netmask 255.255.255.255
819
820
821# OPTIONS FOR EXTERNAL SUPPORT PROGRAMS
822# -----------------------------------------------------------------------------
823
824# TAG: ftp_user
825# If you want the anonymous login password to be more informative
826# (and enable the use of picky ftp servers), set this to something
827# reasonable for your domain, like wwwuser@somewhere.net
828#
829# The reason why this is domainless by default is that the
830# request can be made on the behalf of a user in any domain,
831# depending on how the cache is used.
832# Some ftp server also validate that the email address is valid
833# (for example perl.com).
834#
835#Default:
836# ftp_user Squid@
837
838# TAG: ftp_list_width
839# Sets the width of ftp listings. This should be set to fit in
840# the width of a standard browser. Setting this too small
841# can cut off long filenames when browsing ftp sites.
842#
843#Default:
844# ftp_list_width 32
845
846# TAG: ftp_passive
847# If your firewall does not allow Squid to use passive
848# connections, then turn off this option.
849#
850#Default:
851# ftp_passive on
852
853# TAG: ftp_sanitycheck
854# For security and data integrity reasons Squid by default performs
855# sanity checks of the addresses of FTP data connections ensure the
856# data connection is to the requested server. If you need to allow
857# FTP connections to servers using another IP address for the data
858# connection then turn this off.
859#
860#Default:
861# ftp_sanitycheck on
862
863# TAG: cache_dns_program
864# Note: This option is only available if Squid is rebuilt with the
865# --disable-internal-dns option
866#
867# Specify the location of the executable for dnslookup process.
868#
869#Default:
870# cache_dns_program /usr/lib/squid/
871
872# TAG: dns_children
873# Note: This option is only available if Squid is rebuilt with the
874# --disable-internal-dns option
875#
876# The number of processes spawn to service DNS name lookups.
877# For heavily loaded caches on large servers, you should
878# probably increase this value to at least 10. The maximum
879# is 32. The default is 5.
880#
881# You must have at least one dnsserver process.
882#
883#Default:
884# dns_children 5
885
886# TAG: dns_retransmit_interval
887# Initial retransmit interval for DNS queries. The interval is
888# doubled each time all configured DNS servers have been tried.
889#
890#
891#Default:
892# dns_retransmit_interval 5 seconds
893
894# TAG: dns_timeout
895# DNS Query timeout. If no response is received to a DNS query
896# within this time then all DNS servers for the queried domain
897# is assumed to be unavailable.
898#
899#Default:
900# dns_timeout 5 minutes
901
902# TAG: dns_defnames on|off
903# Note: This option is only available if Squid is rebuilt with the
904# --disable-internal-dns option
905#
906# Normally the 'dnsserver' disables the RES_DEFNAMES resolver
907# option (see res_init(3)). This prevents caches in a hierarchy
908# from interpreting single-component hostnames locally. To allow
909# dnsserver to handle single-component names, enable this
910# option.
911#
912#Default:
913# dns_defnames off
914
915# TAG: dns_nameservers
916# Use this if you want to specify a list of DNS name servers
917# (IP addresses) to use instead of those given in your
918# /etc/resolv.conf file.
919# On Windows platforms, if no value is specified here or in
920# the /etc/resolv.conf file, the list of DNS name servers are
921# taken from the Windows registry, both static and dynamic DHCP
922# configurations are supported.
923#
924# Example: dns_nameservers 10.0.0.1 192.172.0.4
925#
926#Default:
927# none
928
929# TAG: hosts_file
930# Location of the host-local IP name-address associations
931# database. Most Operating Systems have such a file: under
932# Un*X it's by default in /etc/hosts MS-Windows NT/2000 places
933# that in %SystemRoot%(by default
934# c:\winnt)\system32\drivers\etc\hosts, while Windows 9x/ME
935# places that in %windir%(usually c:\windows)\hosts
936#
937# The file contains newline-separated definitions, in the
938# form ip_address_in_dotted_form name [name ...] names are
939# whitespace-separated. lines beginnng with an hash (#)
940# character are comments.
941#
942# The file is checked at startup and upon configuration. If
943# set to 'none', it won't be checked. If append_domain is
944# used, that domain will be added to domain-local (i.e. not
945# containing any dot character) host definitions.
946#
947#Default:
948# hosts_file /etc/hosts
949
950# TAG: diskd_program
951# Specify the location of the diskd executable.
952# Note that this is only useful if you have compiled in
953# diskd as one of the store io modules.
954#
955#Default:
956# diskd_program /usr/lib/squid/diskd
957
958# TAG: unlinkd_program
959# Specify the location of the executable for file deletion process.
960#
961#Default:
962# unlinkd_program /usr/lib/squid/unlinkd
963
964# TAG: pinger_program
965# Note: This option is only available if Squid is rebuilt with the
966# --enable-icmp option
967#
968# Specify the location of the executable for the pinger process.
969#
970#Default:
971# pinger_program /usr/lib/squid/
972
973# TAG: redirect_program
974# Specify the location of the executable for the URL redirector.
975# Since they can perform almost any function there isn't one included.
976# See the FAQ (section 15) for information on how to write one.
977# By default, a redirector is not used.
978#
979#Default:
980# none
981
982# TAG: redirect_children
983# The number of redirector processes to spawn. If you start
984# too few Squid will have to wait for them to process a backlog of
985# URLs, slowing it down. If you start too many they will use RAM
986# and other system resources.
987#
988#Default:
989# redirect_children 5
990
991# TAG: redirect_rewrites_host_header
992# By default Squid rewrites any Host: header in redirected
993# requests. If you are running an accelerator then this may
994# not be a wanted effect of a redirector.
995#
996#Default:
997# redirect_rewrites_host_header on
998
999# TAG: redirector_access
1000# If defined, this access list specifies which requests are
1001# sent to the redirector processes. By default all requests
1002# are sent.
1003#
1004#Default:
1005# none
1006
1007# TAG: auth_param
1008# This is used to pass parameters to the various authentication
1009# schemes.
1010# format: auth_param scheme parameter [setting]
1011#
1012 auth_param basic program /usr/lib/squid/smb_auth -W ABCRFLORIPA -U 192.168.2.220
1013# auth_param basic program /usr/bin/ncsa_auth /usr/etc/passwd
1014# would tell the basic authentication scheme it's program parameter.
1015#
1016# The order that authentication prompts are presented to the client_agent
1017# is dependant on the order the scheme first appears in config file.
1018# IE has a bug (it's not rfc 2617 compliant) in that it will use the basic
1019# scheme if basic is the first entry presented, even if more secure schemes
1020# are presented. For now use the order in the file below. If other browsers
1021# have difficulties (don't recognise the schemes offered even if you are using
1022# basic) then either put basic first, or disable the other schemes (by commenting
1023# out their program entry).
1024#
1025# Once an authentication scheme is fully configured, it can only be shutdown
1026# by shutting squid down and restarting. Changes can be made on the fly and
1027# activated with a reconfigure. I.E. You can change to a different helper,
1028# but not unconfigure the helper completely.
1029#
1030# === Parameters for the basic scheme follow. ===
1031#
1032# "program" cmdline
1033# Specify the command for the external authenticator. Such a
1034# program reads a line containing "username password" and replies
1035# "OK" or "ERR" in an endless loop. If you use an authenticator,
1036# make sure you have 1 acl of type proxy_auth. By default, the
1037# authenticate_program is not used.
1038#
1039# If you want to use the traditional proxy authentication,
1040# jump over to the ../auth_modules/NCSA directory and
1041# type:
1042# % make
1043# % make install
1044#
1045# Then, set this line to something like
1046#
1047# auth_param basic program /usr/bin/ncsa_auth /usr/etc/passwd
1048#
1049# "children" numberofchildren
1050# The number of authenticator processes to spawn (no default).
1051# If you start too few Squid will have to wait for them to
1052# process a backlog of usercode/password verifications, slowing
1053# it down. When password verifications are done via a (slow)
1054# network you are likely to need lots of authenticator
1055# processes.
1056# auth_param basic children 5
1057#
1058# "realm" realmstring
1059# Specifies the realm name which is to be reported to the
1060# client for the basic proxy authentication scheme (part of
1061# the text the user will see when prompted their username and
1062# password). There is no default.
1063# auth_param basic realm Squid proxy-caching web server
1064#
1065# "credentialsttl" timetolive
1066# Specifies how long squid assumes an externally validated
1067# username:password pair is valid for - in other words how
1068# often the helper program is called for that user. Set this
1069# low to force revalidation with short lived passwords. Note
1070# that setting this high does not impact your susceptability
1071# to replay attacks unless you are using an one-time password
1072# system (such as SecureID). If you are using such a system,
1073# you will be vulnerable to replay attacks unless you also
1074# use the max_user_ip ACL in an http_access rule.
1075#
1076# === Parameters for the digest scheme follow ===
1077#
1078# "program" cmdline
1079# Specify the command for the external authenticator. Such
1080# a program reads a line containing "username":"realm" and
1081# replies with the appropriate H(A1) value base64 encoded.
1082# See rfc 2616 for the definition of H(A1). If you use an
1083# authenticator, make sure you have 1 acl of type proxy_auth.
1084# By default, authentication is not used.
1085#
1086# If you want to use build an authenticator,
1087# jump over to the ../digest_auth_modules directory and choose the
1088# authenticator to use. It it's directory type
1089# % make
1090# % make install
1091#
1092# Then, set this line to something like
1093#
1094# auth_param digest program /usr/bin/digest_auth_pw /usr/etc/digpass
1095#
1096#
1097# "children" numberofchildren
1098# The number of authenticator processes to spawn (no default).
1099# If you start too few Squid will have to wait for them to
1100# process a backlog of H(A1) calculations, slowing it down.
1101# When the H(A1) calculations are done via a (slow) network
1102# you are likely to need lots of authenticator processes.
1103# auth_param digest children 5
1104#
1105# "realm" realmstring
1106# Specifies the realm name which is to be reported to the
1107# client for the digest proxy authentication scheme (part of
1108# the text the user will see when prompted their username and
1109# password). There is no default.
1110# auth_param digest realm Squid proxy-caching web server
1111#
1112# "nonce_garbage_interval" timeinterval
1113# Specifies the interval that nonces that have been issued
1114# to client_agent's are checked for validity.
1115#
1116# "nonce_max_duration" timeinterval
1117# Specifies the maximum length of time a given nonce will be
1118# valid for.
1119#
1120# "nonce_max_count" number
1121# Specifies the maximum number of times a given nonce can be
1122# used.
1123#
1124# "nonce_strictness" on|off
1125# Determines if squid requires increment-by-1 behaviour for
1126# nonce counts (on - the default), or strictly incrementing
1127# (off - for use when useragents generate nonce counts that
1128# occasionally miss 1 (ie, 1,2,4,6)).
1129#
1130# === NTLM scheme options follow ===
1131#
1132# "program" cmdline
1133# Specify the command for the external ntlm authenticator.
1134# Such a program reads a line containing the uuencoded NEGOTIATE
1135# and replies with the ntlm CHALLENGE, then waits for the
1136# response and answers with "OK" or "ERR" in an endless loop.
1137# If you use an ntlm authenticator, make sure you have 1 acl
1138# of type proxy_auth. By default, the ntlm authenticator_program
1139# is not used.
1140#
1141# auth_param ntlm program /usr/bin/ntlm_auth
1142#
1143# "children" numberofchildren
1144# The number of authenticator processes to spawn (no default).
1145# If you start too few Squid will have to wait for them to
1146# process a backlog of credential verifications, slowing it
1147# down. When crendential verifications are done via a (slow)
1148# network you are likely to need lots of authenticator
1149# processes.
1150# auth_param ntlm children 5
1151#
1152# "max_challenge_reuses" number
1153# The maximum number of times a challenge given by a ntlm
1154# authentication helper can be reused. Increasing this number
1155# increases your exposure to replay attacks on your network.
1156# 0 means use the challenge only once. (disable challenge
1157# caching) See max_ntlm_challenge_lifetime for more information.
1158# auth_param ntlm max_challenge_reuses 0
1159#
1160# "max_challenge_lifetime" timespan
1161# The maximum time period that a ntlm challenge is reused
1162# over. The actual period will be the minimum of this time
1163# AND the number of reused challenges.
1164# auth_param ntlm max_challenge_lifetime 2 minutes
1165#
1166#Recommended minimum configuration:
1167#auth_param digest program <uncomment and complete this line>
1168#auth_param digest children 5
1169#auth_param digest realm Squid proxy-caching web server
1170#auth_param digest nonce_garbage_interval 5 minutes
1171#auth_param digest nonce_max_duration 30 minutes
1172#auth_param digest nonce_max_count 50
1173#auth_param ntlm program <uncomment and complete this line to activate>
1174#auth_param ntlm children 5
1175#auth_param ntlm max_challenge_reuses 0
1176#auth_param ntlm max_challenge_lifetime 2 minutes
1177#auth_param basic program <uncomment and complete this line>
1178auth_param basic children 5
1179#auth_param basic realm Squid proxy-caching web server
1180auth_param basic realm BEM VINDO A REDE LINUX
1181auth_param basic credentialsttl 2 hours
1182
1183# TAG: authenticate_cache_garbage_interval
1184# The time period between garbage collection across the
1185# username cache. This is a tradeoff between memory utilisation
1186# (long intervals - say 2 days) and CPU (short intervals -
1187# say 1 minute). Only change if you have good reason to.
1188#
1189#Default:
1190# authenticate_cache_garbage_interval 1 hour
1191
1192# TAG: authenticate_ttl
1193# The time a user & their credentials stay in the logged in
1194# user cache since their last request. When the garbage
1195# interval passes, all user credentials that have passed their
1196# TTL are removed from memory.
1197#
1198#Default:
1199# authenticate_ttl 1 hour
1200
1201# TAG: authenticate_ip_ttl
1202# If you use proxy authentication and the 'max_user_ip' ACL,
1203# this directive controls how long Squid remembers the IP
1204# addresses associated with each user. Use a small value
1205# (e.g., 60 seconds) if your users might change addresses
1206# quickly, as is the case with dialups. You might be safe
1207# using a larger value (e.g., 2 hours) in a corporate LAN
1208# environment with relatively static address assignments.
1209#
1210#Default:
1211# authenticate_ip_ttl 0 seconds
1212
1213# TAG: external_acl_type
1214# This option defines external acl classes using a helper program
1215# to look up the status
1216#
1217# external_acl_type name [options] FORMAT.. /path/to/helper [helper arguments..]
1218#
1219# Options:
1220#
1221# ttl=n TTL in seconds for cached results (defaults to 3600
1222# for 1 hour)
1223# negative_ttl=n
1224# TTL for cached negative lookups (default same
1225# as ttl)
1226# concurrency=n Concurrency level / number of processes spawn
1227# to service external acl lookups of this type.
1228# cache=n result cache size, 0 is unbounded (default)
1229#
1230# FORMAT specifications
1231#
1232# %LOGIN Authenticated user login name
1233# %IDENT Ident user name
1234# %SRC Client IP
1235# %DST Requested host
1236# %PROTO Requested protocol
1237# %PORT Requested port
1238# %METHOD Request method
1239# %{Header} HTTP request header
1240# %{Hdr:member} HTTP request header list member
1241# %{Hdr:;member}
1242# HTTP request header list member using ; as
1243# list separator. ; can be any non-alphanumeric
1244# character.
1245#
1246# In addition, any string specified in the referencing acl will
1247# also be included in the helper request line, after the specified
1248# formats (see the "acl external" directive)
1249#
1250# The helper receives lines per the above format specification,
1251# and returns lines starting with OK or ERR indicating the validity
1252# of the request and optionally followed by additional keywords with
1253# more details.
1254#
1255# General result syntax:
1256#
1257# OK/ERR keyword=value ...
1258#
1259# Defined keywords:
1260#
1261# user= The users name (login)
1262# error= Error description (only defined for ERR results)
1263#
1264# Keyword values need to be enclosed in quotes if they may contain
1265# whitespace, or the whitespace escaped using \. Any quotes or \
1266# characters within the keyword value must be \ escaped.
1267#
1268#Default:
1269# none
1270
1271
1272# OPTIONS FOR TUNING THE CACHE
1273# -----------------------------------------------------------------------------
1274
1275# TAG: wais_relay_host
1276# TAG: wais_relay_port
1277# Relay WAIS request to host (1st arg) at port (2 arg).
1278#
1279#Default:
1280# wais_relay_port 0
1281
1282# TAG: request_header_max_size (KB)
1283# This specifies the maximum size for HTTP headers in a request.
1284# Request headers are usually relatively small (about 512 bytes).
1285# Placing a limit on the request header size will catch certain
1286# bugs (for example with persistent connections) and possibly
1287# buffer-overflow or denial-of-service attacks.
1288#
1289#Default:
1290# request_header_max_size 10 KB
1291
1292# TAG: request_body_max_size (KB)
1293# This specifies the maximum size for an HTTP request body.
1294# In other words, the maximum size of a PUT/POST request.
1295# A user who attempts to send a request with a body larger
1296# than this limit receives an "Invalid Request" error message.
1297# If you set this parameter to a zero (the default), there will
1298# be no limit imposed.
1299#
1300#Default:
1301# request_body_max_size 0 KB
1302
1303# TAG: refresh_pattern
1304# usage: refresh_pattern [-i] regex min percent max [options]
1305#
1306# By default, regular expressions are CASE-SENSITIVE. To make
1307# them case-insensitive, use the -i option.
1308#
1309# 'Min' is the time (in minutes) an object without an explicit
1310# expiry time should be considered fresh. The recommended
1311# value is 0, any higher values may cause dynamic applications
1312# to be erroneously cached unless the application designer
1313# has taken the appropriate actions.
1314#
1315# 'Percent' is a percentage of the objects age (time since last
1316# modification age) an object without explicit expiry time
1317# will be considered fresh.
1318#
1319# 'Max' is an upper limit on how long objects without an explicit
1320# expiry time will be considered fresh.
1321#
1322# options: override-expire
1323# override-lastmod
1324# reload-into-ims
1325# ignore-reload
1326#
1327# override-expire enforces min age even if the server
1328# sent a Expires: header. Doing this VIOLATES the HTTP
1329# standard. Enabling this feature could make you liable
1330# for problems which it causes.
1331#
1332# override-lastmod enforces min age even on objects
1333# that was modified recently.
1334#
1335# reload-into-ims changes client no-cache or ``reload''
1336# to If-Modified-Since requests. Doing this VIOLATES the
1337# HTTP standard. Enabling this feature could make you
1338# liable for problems which it causes.
1339#
1340# ignore-reload ignores a client no-cache or ``reload''
1341# header. Doing this VIOLATES the HTTP standard. Enabling
1342# this feature could make you liable for problems which
1343# it causes.
1344#
1345# Basically a cached object is:
1346#
1347# FRESH if expires < now, else STALE
1348# STALE if age > max
1349# FRESH if lm-factor < percent, else STALE
1350# FRESH if age < min
1351# else STALE
1352#
1353# The refresh_pattern lines are checked in the order listed here.
1354# The first entry which matches is used. If none of the entries
1355# match, then the default will be used.
1356#
1357# Note, you must uncomment all the default lines if you want
1358# to change one. The default setting is only active if none is
1359# used.
1360#
1361#Suggested default:
1362refresh_pattern ^ftp: 1440 20% 10080
1363refresh_pattern ^gopher: 1440 0% 1440
1364refresh_pattern . 0 20% 4320
1365
1366# TAG: quick_abort_min (KB)
1367# TAG: quick_abort_max (KB)
1368# TAG: quick_abort_pct (percent)
1369# The cache by default continues downloading aborted requests
1370# which are almost completed (less than 16 KB remaining). This
1371# may be undesirable on slow (e.g. SLIP) links and/or very busy
1372# caches. Impatient users may tie up file descriptors and
1373# bandwidth by repeatedly requesting and immediately aborting
1374# downloads.
1375#
1376# When the user aborts a request, Squid will check the
1377# quick_abort values to the amount of data transfered until
1378# then.
1379#
1380# If the transfer has less than 'quick_abort_min' KB remaining,
1381# it will finish the retrieval.
1382#
1383# If the transfer has more than 'quick_abort_max' KB remaining,
1384# it will abort the retrieval.
1385#
1386# If more than 'quick_abort_pct' of the transfer has completed,
1387# it will finish the retrieval.
1388#
1389# If you do not want any retrieval to continue after the client
1390# has aborted, set both 'quick_abort_min' and 'quick_abort_max'
1391# to '0 KB'.
1392#
1393# If you want retrievals to always continue if they are being
1394# cached then set 'quick_abort_min' to '-1 KB'.
1395#
1396#Default:
1397# quick_abort_min 16 KB
1398# quick_abort_max 16 KB
1399# quick_abort_pct 95
1400
1401# TAG: negative_ttl time-units
1402# Time-to-Live (TTL) for failed requests. Certain types of
1403# failures (such as "connection refused" and "404 Not Found") are
1404# negatively-cached for a configurable amount of time. The
1405# default is 5 minutes. Note that this is different from
1406# negative caching of DNS lookups.
1407#
1408#Default:
1409# negative_ttl 5 minutes
1410
1411# TAG: positive_dns_ttl time-units
1412# Time-to-Live (TTL) for positive caching of successful DNS lookups.
1413# Default is 6 hours (360 minutes). If you want to minimize the
1414# use of Squid's ipcache, set this to 1, not 0.
1415#
1416#Default:
1417# positive_dns_ttl 6 hours
1418
1419# TAG: negative_dns_ttl time-units
1420# Time-to-Live (TTL) for negative caching of failed DNS lookups.
1421#
1422#Default:
1423# negative_dns_ttl 5 minutes
1424
1425# TAG: range_offset_limit (bytes)
1426# Sets a upper limit on how far into the the file a Range request
1427# may be to cause Squid to prefetch the whole file. If beyond this
1428# limit then Squid forwards the Range request as it is and the result
1429# is NOT cached.
1430#
1431# This is to stop a far ahead range request (lets say start at 17MB)
1432# from making Squid fetch the whole object up to that point before
1433# sending anything to the client.
1434#
1435# A value of -1 causes Squid to always fetch the object from the
1436# beginning so that it may cache the result. (2.0 style)
1437#
1438# A value of 0 causes Squid to never fetch more than the
1439# client requested. (default)
1440#
1441#Default:
1442# range_offset_limit 0 KB
1443
1444
1445# TIMEOUTS
1446# -----------------------------------------------------------------------------
1447
1448# TAG: connect_timeout time-units
1449# Some systems (notably Linux) can not be relied upon to properly
1450# time out connect(2) requests. Therefore the Squid process
1451# enforces its own timeout on server connections. This parameter
1452# specifies how long to wait for the connect to complete. The
1453# default is two minutes (120 seconds).
1454#
1455#Default:
1456# connect_timeout 2 minutes
1457
1458# TAG: peer_connect_timeout time-units
1459# This parameter specifies how long to wait for a pending TCP
1460# connection to a peer cache. The default is 30 seconds. You
1461# may also set different timeout values for individual neighbors
1462# with the 'connect-timeout' option on a 'cache_peer' line.
1463#
1464#Default:
1465# peer_connect_timeout 30 seconds
1466
1467# TAG: read_timeout time-units
1468# The read_timeout is applied on server-side connections. After
1469# each successful read(), the timeout will be extended by this
1470# amount. If no data is read again after this amount of time,
1471# the request is aborted and logged with ERR_READ_TIMEOUT. The
1472# default is 15 minutes.
1473#
1474#Default:
1475# read_timeout 15 minutes
1476
1477# TAG: request_timeout
1478# How long to wait for an HTTP request after initial
1479# connection establishment.
1480#
1481#Default:
1482# request_timeout 5 minutes
1483
1484# TAG: persistent_request_timeout
1485# How long to wait for the next HTTP request on a persistent
1486# connection after the previous request completes.
1487#
1488#Default:
1489# persistent_request_timeout 1 minute
1490
1491# TAG: client_lifetime time-units
1492# The maximum amount of time that a client (browser) is allowed to
1493# remain connected to the cache process. This protects the Cache
1494# from having a lot of sockets (and hence file descriptors) tied up
1495# in a CLOSE_WAIT state from remote clients that go away without
1496# properly shutting down (either because of a network failure or
1497# because of a poor client implementation). The default is one
1498# day, 1440 minutes.
1499#
1500# NOTE: The default value is intended to be much larger than any
1501# client would ever need to be connected to your cache. You
1502# should probably change client_lifetime only as a last resort.
1503# If you seem to have many client connections tying up
1504# filedescriptors, we recommend first tuning the read_timeout,
1505# request_timeout, persistent_request_timeout and quick_abort values.
1506#
1507#Default:
1508# client_lifetime 1 day
1509
1510# TAG: half_closed_clients
1511# Some clients may shutdown the sending side of their TCP
1512# connections, while leaving their receiving sides open. Sometimes,
1513# Squid can not tell the difference between a half-closed and a
1514# fully-closed TCP connection. By default, half-closed client
1515# connections are kept open until a read(2) or write(2) on the
1516# socket returns an error. Change this option to 'off' and Squid
1517# will immediately close client connections when read(2) returns
1518# "no more data to read."
1519#
1520#Default:
1521# half_closed_clients on
1522
1523# TAG: pconn_timeout
1524# Timeout for idle persistent connections to servers and other
1525# proxies.
1526#
1527#Default:
1528# pconn_timeout 120 seconds
1529
1530# TAG: ident_timeout
1531# Maximum time to wait for IDENT lookups to complete.
1532#
1533# If this is too high, and you enabled IDENT lookups from untrusted
1534# users, then you might be susceptible to denial-of-service by having
1535# many ident requests going at once.
1536#
1537#Default:
1538# ident_timeout 10 seconds
1539
1540# TAG: shutdown_lifetime time-units
1541# When SIGTERM or SIGHUP is received, the cache is put into
1542# "shutdown pending" mode until all active sockets are closed.
1543# This value is the lifetime to set for all open descriptors
1544# during shutdown mode. Any active clients after this many
1545# seconds will receive a 'timeout' message.
1546#
1547#Default:
1548# shutdown_lifetime 30 seconds
1549
1550
1551# ACCESS CONTROLS
1552# -----------------------------------------------------------------------------
1553
1554# TAG: acl
1555# Defining an Access List
1556#
1557# acl aclname acltype string1 ...
1558# acl aclname acltype "file" ...
1559#
1560# when using "file", the file should contain one item per line
1561#
1562# acltype is one of the types described below
1563#
1564# By default, regular expressions are CASE-SENSITIVE. To make
1565# them case-insensitive, use the -i option.
1566#
1567# acl aclname src ip-address/netmask ... (clients IP address)
1568# acl aclname src addr1-addr2/netmask ... (range of addresses)
1569# acl aclname dst ip-address/netmask ... (URL host's IP address)
1570# acl aclname myip ip-address/netmask ... (local socket IP address)
1571#
1572# acl aclname srcdomain .foo.com ... # reverse lookup, client IP
1573# acl aclname dstdomain .foo.com ... # Destination server from URL
1574# acl aclname srcdom_regex [-i] xxx ... # regex matching client name
1575# acl aclname dstdom_regex [-i] xxx ... # regex matching server
1576# # For dstdomain and dstdom_regex a reverse lookup is tried if a IP
1577# # based URL is used. The name "none" is used if the reverse lookup
1578# # fails.
1579#
1580# acl aclname time [day-abbrevs] [h1:m1-h2:m2]
1581# day-abbrevs:
1582# S - Sunday
1583# M - Monday
1584# T - Tuesday
1585# W - Wednesday
1586# H - Thursday
1587# F - Friday
1588# A - Saturday
1589# h1:m1 must be less than h2:m2
1590# acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
1591# acl aclname urlpath_regex [-i] \.gif$ ... # regex matching on URL path
1592# acl aclname port 80 70 21 ...
1593# acl aclname port 0-1024 ... # ranges allowed
1594# acl aclname myport 3128 ... # (local socket TCP port)
1595# acl aclname proto HTTP FTP ...
1596# acl aclname method GET POST ...
1597# acl aclname browser [-i] regexp ...
1598# # pattern match on User-Agent header
1599# acl aclname referer_regex [-i] regexp ...
1600# # pattern match on Referer header
1601# # Referer is highly unreliable, so use with care
1602# acl aclname ident username ...
1603# acl aclname ident_regex [-i] pattern ...
1604# # string match on ident output.
1605# # use REQUIRED to accept any non-null ident.
1606# acl aclname src_as number ...
1607# acl aclname dst_as number ...
1608# # Except for access control, AS numbers can be used for
1609# # routing of requests to specific caches. Here's an
1610# # example for routing all requests for AS#1241 and only
1611# # those to mycache.mydomain.net:
1612# # acl asexample dst_as 1241
1613# # cache_peer_access mycache.mydomain.net allow asexample
1614# # cache_peer_access mycache_mydomain.net deny all
1615#
1616# acl aclname proxy_auth username ...
1617# acl aclname proxy_auth_regex [-i] pattern ...
1618# # list of valid usernames
1619# # use REQUIRED to accept any valid username.
1620# #
1621# # NOTE: when a Proxy-Authentication header is sent but it is not
1622# # needed during ACL checking the username is NOT logged
1623# # in access.log.
1624# #
1625# # NOTE: proxy_auth requires a EXTERNAL authentication program
1626# # to check username/password combinations (see
1627# # authenticate_program).
1628# #
1629# # WARNING: proxy_auth can't be used in a transparent proxy. It
1630# # collides with any authentication done by origin servers. It may
1631# # seem like it works at first, but it doesn't.
1632#
1633# acl aclname snmp_community string ...
1634# # A community string to limit access to your SNMP Agent
1635# # Example:
1636# #
1637# # acl snmppublic snmp_community public
1638#
1639# acl aclname maxconn number
1640# # This will be matched when the client's IP address has
1641# # more than <number> HTTP connections established.
1642#
1643# acl aclname max_user_ip [-s] number
1644# # This will be matched when the user attempts to log in from more
1645# # than <number> different ip addresses. The authenticate_ip_ttl
1646# # parameter controls the timeout on the ip entries.
1647# # If -s is specified then the limit is strict, denying browsing
1648# # from any further IP addresses until the ttl has expired. Without
1649# # -s Squid will just annoy the user by "randomly" denying requests.
1650# # (the counter is then reset each time the limit is reached and a
1651# # request is denied)
1652# # NOTE: in acceleration mode or where there is mesh of child proxies,
1653# # clients may appear to come from multiple addresses if they are
1654# # going through proxy farms, so a limit of 1 may cause user problems.
1655#
1656# acl aclname req_mime_type mime-type1 ...
1657# # regex match agains the mime type of the request generated
1658# # by the client. Can be used to detect file upload or some
1659# # types HTTP tunelling requests.
1660# # NOTE: This does NOT match the reply. You cannot use this
1661# # to match the returned file type.
1662#
1663# acl aclname rep_mime_type mime-type1 ...
1664# # regex match against the mime type of the reply recieved by
1665# # squid. Can be used to detect file download or some
1666# # types HTTP tunelling requests.
1667# # NOTE: This has no effect in http_access rules. It only has
1668# # effect in rules that affect the reply data stream such as
1669# # http_reply_access.
1670#
1671# acl acl_name external class_name [arguments...]
1672# # external ACL lookup via a helper class defined by the
1673# # external_acl_type directive.
1674#
1675#Examples:
1676#acl myexample dst_as 1241
1677#acl password proxy_auth REQUIRED
1678#acl fileupload req_mime_type -i ^multipart/form-data$
1679#acl javascript rep_mime_type -i ^application/x-javascript$
1680#
1681#Recommended minimum configuration:
1682acl all src 0.0.0.0/0.0.0.0
1683acl manager proto cache_object
1684acl localhost src 127.0.0.1/255.255.255.255
1685acl to_localhost dst 127.0.0.0/8
1686acl SSL_ports port 443 563
1687acl Safe_ports port 80 # http
1688acl Safe_ports port 21 # ftp
1689acl Safe_ports port 443 563 # https, snews
1690acl Safe_ports port 70 # gopher
1691acl Safe_ports port 210 # wais
1692acl Safe_ports port 1025-65535 # unregistered ports
1693acl Safe_ports port 280 # http-mgmt
1694acl Safe_ports port 488 # gss-http
1695acl Safe_ports port 591 # filemaker
1696acl Safe_ports port 777 # multiling http
1697acl CONNECT method CONNECT
1698
1699acl libera_geral proxy_auth "/etc/squid/regras/libera_geral.cfg"
1700acl libera_site_proxy proxy_auth "/etc/squid/regras/libera_site_proxy.cfg"
1701acl libera_download proxy_auth "/etc/squid/regras/libera_download.cfg"
1702acl libera_restrito proxy_auth "/etc/squid/regras/libera_restrito.cfg"
1703acl libera_msn proxy_auth "/etc/squid/regras/libera_msn.cfg"
1704acl proibe_site url_regex "/etc/squid/regras/proibe_site.txt"
1705acl proibe_msn url_regex "/etc/squid/regras/proibe_msn.txt"
1706acl proibe_download url_regex "/etc/squid/regras/proibe_download.cfg"
1707acl libera_site url_regex "/etc/squid/regras/libera_site.txt"
1708acl autenticados proxy_auth REQUIRED
1709# TAG: http_access
1710# Allowing or Denying access based on defined access lists
1711#
1712# Access to the HTTP port:
1713# http_access allow|deny [!]aclname ...
1714#
1715# NOTE on default values:
1716#
1717# If there are no "access" lines present, the default is to deny
1718# the request.
1719#
1720# If none of the "access" lines cause a match, the default is the
1721# opposite of the last line in the list. If the last line was
1722# deny, then the default is allow. Conversely, if the last line
1723# is allow, the default will be deny. For these reasons, it is a
1724# good idea to have an "deny all" or "allow all" entry at the end
1725# of your access lists to avoid potential confusion.
1726#
1727#Default:
1728# http_access deny all
1729#
1730#Recommended minimum configuration:
1731#
1732# Only allow cachemgr access from localhost
1733http_access allow manager localhost
1734http_access deny manager
1735# Deny requests to unknown ports
1736http_access deny !Safe_ports
1737# Deny CONNECT to other than SSL ports
1738http_access deny CONNECT !SSL_ports
1739#
1740# We strongly recommend to uncomment the following to protect innocent
1741# web applications running on the proxy server who think that the only
1742# one who can access services on "localhost" is a local user
1743#http_access deny to_localhost
1744#
1745# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
1746
1747# Exampe rule allowing access from your local networks. Adapt
1748# to list your (internal) IP networks from where browsing should
1749# be allowed
1750#acl our_networks src 192.168.1.0/24 192.168.2.0/24
1751#http_access allow our_networks
1752
1753# And finally deny all other access to this proxy
1754http_access allow libera_site_proxy
1755http_access allow localhost
1756http_access allow libera_geral
1757http_access deny proibe_site !libera_geral !libera_site
1758http_access deny proibe_msn !libera_geral !libera_msn
1759http_access deny proibe_download !libera_geral !libera_download !libera_site
1760http_access allow libera_restrito
1761http_access deny autenticados
1762http_access deny all
1763
1764# TAG: http_reply_access
1765# Allow replies to client requests. This is complementary to http_access.
1766#
1767# http_reply_access allow|deny [!] aclname ...
1768#
1769# NOTE: if there are no access lines present, the default is to allow
1770# all replies
1771#
1772# If none of the access lines cause a match, then the opposite of the
1773# last line will apply. Thus it is good practice to end the rules
1774# with an "allow all" or "deny all" entry.
1775#
1776#Default:
1777# http_reply_access allow all
1778#
1779#Recommended minimum configuration:
1780#
1781# Insert your own rules here.
1782#
1783#
1784# and finally allow by default
1785http_reply_access allow all
1786
1787# TAG: icp_access
1788# Allowing or Denying access to the ICP port based on defined
1789# access lists
1790#
1791# icp_access allow|deny [!]aclname ...
1792#
1793# See http_access for details
1794#
1795#Default:
1796# icp_access deny all
1797#
1798#Allow ICP queries from everyone
1799icp_access allow all
1800
1801# TAG: miss_access
1802# Use to force your neighbors to use you as a sibling instead of
1803# a parent. For example:
1804#
1805# acl localclients src 172.16.0.0/16
1806# miss_access allow localclients
1807# miss_access deny !localclients
1808#
1809# This means that only your local clients are allowed to fetch
1810# MISSES and all other clients can only fetch HITS.
1811#
1812# By default, allow all clients who passed the http_access rules
1813# to fetch MISSES from us.
1814#
1815#Default setting:
1816# miss_access allow all
1817
1818# TAG: cache_peer_access
1819# Similar to 'cache_peer_domain' but provides more flexibility by
1820# using ACL elements.
1821#
1822# cache_peer_access cache-host allow|deny [!]aclname ...
1823#
1824# The syntax is identical to 'http_access' and the other lists of
1825# ACL elements. See the comments for 'http_access' below, or
1826# the Squid FAQ (http://www.squid-cache.org/FAQ/FAQ-10.html).
1827#
1828#Default:
1829# none
1830
1831# TAG: ident_lookup_access
1832# A list of ACL elements which, if matched, cause an ident
1833# (RFC 931) lookup to be performed for this request. For
1834# example, you might choose to always perform ident lookups
1835# for your main multi-user Unix boxes, but not for your Macs
1836# and PCs. By default, ident lookups are not performed for
1837# any requests.
1838#
1839# To enable ident lookups for specific client addresses, you
1840# can follow this example:
1841#
1842# acl ident_aware_hosts src 198.168.1.0/255.255.255.0
1843# ident_lookup_access allow ident_aware_hosts
1844# ident_lookup_access deny all
1845#
1846# Only src type ACL checks are fully supported. A src_domain
1847# ACL might work at times, but it will not always provide
1848# the correct result.
1849#
1850#Default:
1851# ident_lookup_access deny all
1852
1853# TAG: tcp_outgoing_tos
1854# Allows you to select a TOS/Diffserv value to mark outgoing
1855# connections with, based on the username or source address
1856# making the request.
1857#
1858# tcp_outgoing_tos ds-field [!]aclname ...
1859#
1860# Example where normal_service_net uses the TOS value 0x00
1861# and normal_service_net uses 0x20
1862#
1863# acl normal_service_net src 10.0.0.0/255.255.255.0
1864# acl good_service_net src 10.0.1.0/255.255.255.0
1865# tcp_outgoing_tos 0x00 normal_service_net 0x00
1866# tcp_outgoing_tos 0x20 good_service_net
1867#
1868# TOS/DSCP values really only have local significance - so you should
1869# know what you're specifying. For more, see RFC 2474
1870#
1871# The TOS/DSCP byte must be exactly that - a byte, value 0 - 255, or
1872# "default" to use whatever default your host has.
1873#
1874# Processing proceeds in the order specified, and stops at first fully
1875# matching line.
1876#
1877#Default:
1878# none
1879
1880# TAG: tcp_outgoing_address
1881# Allows you to map requests to different outgoing IP addresses
1882# based on the username or sourceaddress of the user making
1883# the request.
1884#
1885# tcp_outgoing_address ipaddr [[!]aclname] ...
1886#
1887# Example where requests from 10.0.0.0/24 will be forwareded
1888# with source address 10.1.0.1, 10.0.2.0/24 forwarded with
1889# source address 10.1.0.2 and the rest will be forwarded with
1890# source address 10.1.0.3.
1891#
1892# acl normal_service_net src 10.0.0.0/255.255.255.0
1893# acl good_service_net src 10.0.1.0/255.255.255.0
1894# tcp_outgoing_address 10.0.0.1 normal_service_net
1895# tcp_outgoing_address 10.0.0.2 good_service_net
1896# tcp_outgoing_address 10.0.0.3
1897#
1898# Processing proceeds in the order specified, and stops at first fully
1899# matching line.
1900#
1901#Default:
1902# none
1903
1904# TAG: reply_body_max_size bytes allow|deny acl acl...
1905# This option specifies the maximum size of a reply body. It
1906# can be used to prevent users from downloading very large files,
1907# such as MP3's and movies. When the reply headers are recieved,
1908# the reply_body_max_size lines are processed, and the first line with
1909# a result of "allow" is used as the maximum body size for this reply.
1910# This size is then checked twice. First when we get the reply headers,
1911# we check the content-length value. If the content length value exists
1912# and is larger than the allowed size, the request is denied and the
1913# user receives an error message that says "the request or reply
1914# is too large." If there is no content-length, and the reply
1915# size exceeds this limit, the client's connection is just closed
1916# and they will receive a partial reply.
1917#
1918# WARNING: downstream caches probably can not detect a partial reply
1919# if there is no content-length header, so they will cache
1920# partial responses and give them out as hits. You should NOT
1921# use this option if you have downstream caches.
1922#
1923# WARNING: A maximum size larger than the size of squid's error messages
1924# will cause an infinite loop and crash squid. Ensure that the smallest
1925# non-zero value you use is greater that the maximum header size plus
1926# the size of your largest error page.
1927#
1928# If you set this parameter to zero (the default), there will be
1929# no limit imposed.
1930#
1931#Default:
1932# reply_body_max_size 0 allow all
1933
1934
1935# ADMINISTRATIVE PARAMETERS
1936# -----------------------------------------------------------------------------
1937
1938# TAG: cache_mgr
1939# Email-address of local cache manager who will receive
1940# mail if the cache dies. The default is "webmaster."
1941#cache_mgr root
1942#
1943#Default:
1944# cache_mgr root
1945
1946# TAG: cache_effective_user
1947# TAG: cache_effective_group
1948#
1949# If the cache is run as root, it will change its effective/real
1950# UID/GID to the UID/GID specified below. The default is to
1951# change to UID to squid and GID to the default group of squid.
1952#
1953# If Squid is not started as root, the default is to keep the
1954# current UID/GID, and only the GID can be changed to any of
1955# the groups the user starting Squid is member of. Note that if
1956# Squid is not started as root then you cannot set http_port to
1957# a value lower than 1024.
1958#
1959#cache_effective_user squid
1960#cache_effective_group squid
1961#
1962#Default:
1963# cache_effective_user squid
1964# cache_effective_group squid
1965
1966# TAG: visible_hostname
1967# If you want to present a special hostname in error messages, etc,
1968# then define this. Otherwise, the return value of gethostname()
1969# will be used. If you have multiple caches in a cluster and
1970# get errors about IP-forwarding you must set them to have individual
1971# names with this setting.
1972#
1973#Default:
1974# none
1975visible_hostname fwserver
1976# TAG: unique_hostname
1977# If you want to have multiple machines with the same
1978# 'visible_hostname' then you must give each machine a different
1979# 'unique_hostname' so that forwarding loops can be detected.
1980#
1981#Default:
1982# none
1983
1984# TAG: hostname_aliases
1985# A list of other DNS names that your cache has.
1986#
1987#Default:
1988# none
1989
1990
1991# OPTIONS FOR THE CACHE REGISTRATION SERVICE
1992# -----------------------------------------------------------------------------
1993#
1994# This section contains parameters for the (optional) cache
1995# announcement service. This service is provided to help
1996# cache administrators locate one another in order to join or
1997# create cache hierarchies.
1998#
1999# An 'announcement' message is sent (via UDP) to the registration
2000# service by Squid. By default, the announcement message is NOT
2001# SENT unless you enable it with 'announce_period' below.
2002#
2003# The announcement message includes your hostname, plus the
2004# following information from this configuration file:
2005#
2006# http_port
2007# icp_port
2008# cache_mgr
2009#
2010# All current information is processed regularly and made
2011# available on the Web at http://www.ircache.net/Cache/Tracker/.
2012
2013# TAG: announce_period
2014# This is how frequently to send cache announcements. The
2015# default is `0' which disables sending the announcement
2016# messages.
2017#
2018# To enable announcing your cache, just uncomment the line
2019# below.
2020#
2021#Default:
2022# announce_period 0
2023#
2024#To enable announcing your cache, just uncomment the line below.
2025#announce_period 1 day
2026
2027# TAG: announce_host
2028# TAG: announce_file
2029# TAG: announce_port
2030# announce_host and announce_port set the hostname and port
2031# number where the registration message will be sent.
2032#
2033# Hostname will default to 'tracker.ircache.net' and port will
2034# default default to 3131. If the 'filename' argument is given,
2035# the contents of that file will be included in the announce
2036# message.
2037#
2038#Default:
2039# announce_host tracker.ircache.net
2040# announce_port 3131
2041
2042
2043# HTTPD-ACCELERATOR OPTIONS
2044# -----------------------------------------------------------------------------
2045
2046# TAG: httpd_accel_host
2047# TAG: httpd_accel_port
2048# If you want to run Squid as an httpd accelerator, define the
2049# host name and port number where the real HTTP server is.
2050#
2051# If you want IP based virtual host support then specify the
2052# hostname as "virtual". This will make Squid use the IP address
2053# where it accepted the request as hostname in the URL.
2054#
2055# If you want virtual port support then specify the port as "0".
2056#
2057# NOTE: enabling httpd_accel_host disables proxy-caching and
2058# ICP. If you want these features enabled also, then set
2059# the 'httpd_accel_with_proxy' option.
2060#
2061#Default:
2062# httpd_accel_port 80
2063
2064# TAG: httpd_accel_single_host on|off
2065# If you are running Squid as an accelerator and have a single backend
2066# server then set this to on. This causes Squid to forward the request
2067# to this server irregardles of what any redirectors or Host headers
2068# says.
2069#
2070# Leave this at off if you have multiple backend servers, and use a
2071# redirector (or host table or private DNS) to map the requests to the
2072# appropriate backend servers. Note that the mapping needs to be a
2073# 1-1 mapping between requested and backend (from redirector) domain
2074# names or caching will fail, as cacing is performed using the
2075# URL returned from the redirector.
2076#
2077# See also redirect_rewrites_host_header.
2078#
2079#Default:
2080# httpd_accel_single_host off
2081
2082# TAG: httpd_accel_with_proxy on|off
2083# If you want to use Squid as both a local httpd accelerator
2084# and as a proxy, change this to 'on'. Note however that your
2085# proxy users may have trouble to reach the accelerated domains
2086# unless their browsers are configured not to use this proxy for
2087# those domains (for example via the no_proxy browser configuration
2088# setting)
2089#
2090#Default:
2091# httpd_accel_with_proxy off
2092
2093# TAG: httpd_accel_uses_host_header on|off
2094# HTTP/1.1 requests include a Host: header which is basically the
2095# hostname from the URL. The Host: header is used for domain based
2096# virutal hosts. If your accelerator needs to provide domain based
2097# virtual hosts on the same IP address then you will need to turn this
2098# on.
2099#
2100# Note that Squid does NOT check the value of the Host header matches
2101# any of your accelerated server, so it may open a big security hole
2102# unless you take care to set up access controls proper. We recommend
2103# that this option remain disabled unless you are sure of what you
2104# are doing.
2105#
2106# However, you will need to enable this option if you run Squid
2107# as a transparent proxy. Otherwise, virtual servers which
2108# require the Host: header will not be properly cached.
2109#
2110#Default:
2111# httpd_accel_uses_host_header off
2112
2113
2114# MISCELLANEOUS
2115# -----------------------------------------------------------------------------
2116
2117# TAG: dns_testnames
2118# The DNS tests exit as soon as the first site is successfully looked up
2119#
2120# This test can be disabled with the -D command line option.
2121#
2122#Default:
2123# dns_testnames netscape.com internic.net nlanr.net microsoft.com
2124
2125# TAG: logfile_rotate
2126# Specifies the number of logfile rotations to make when you
2127# type 'squid -k rotate'. The default is 10, which will rotate
2128# with extensions 0 through 9. Setting logfile_rotate to 0 will
2129# disable the rotation, but the logfiles are still closed and
2130# re-opened. This will enable you to rename the logfiles
2131# yourself just before sending the rotate signal.
2132#
2133# Note, the 'squid -k rotate' command normally sends a USR1
2134# signal to the running squid process. In certain situations
2135# (e.g. on Linux with Async I/O), USR1 is used for other
2136# purposes, so -k rotate uses another signal. It is best to get
2137# in the habit of using 'squid -k rotate' instead of 'kill -USR1
2138# <pid>'.
2139#
2140#logfile_rotate 0
2141#
2142#Default:
2143# logfile_rotate 0
2144
2145# TAG: append_domain
2146# Appends local domain name to hostnames without any dots in
2147# them. append_domain must begin with a period.
2148#
2149# Be warned that there today is Internet names with no dots in
2150# them using only top-domain names, so setting this may
2151# cause some Internet sites to become unavailable.
2152#
2153#Example:
2154# append_domain .yourdomain.com
2155#
2156#Default:
2157# none
2158
2159# TAG: tcp_recv_bufsize (bytes)
2160# Size of receive buffer to set for TCP sockets. Probably just
2161# as easy to change your kernel's default. Set to zero to use
2162# the default buffer size.
2163#
2164#Default:
2165# tcp_recv_bufsize 0 bytes
2166
2167# TAG: err_html_text
2168# HTML text to include in error messages. Make this a "mailto"
2169# URL to your admin address, or maybe just a link to your
2170# organizations Web page.
2171#
2172# To include this in your error messages, you must rewrite
2173# the error template files (found in the "errors" directory).
2174# Wherever you want the 'err_html_text' line to appear,
2175# insert a %L tag in the error template file.
2176#
2177#Default:
2178# none
2179
2180# TAG: deny_info
2181# Usage: deny_info err_page_name acl
2182# Example: deny_info ERR_CUSTOM_ACCESS_DENIED bad_guys
2183#
2184# This can be used to return a ERR_ page for requests which
2185# do not pass the 'http_access' rules. A single ACL will cause
2186# the http_access check to fail. If a 'deny_info' line exists
2187# for that ACL then Squid returns a corresponding error page.
2188#
2189# You may use ERR_ pages that come with Squid or create your own pages
2190# and put them into the configured errors/ directory.
2191#
2192# Alternatively you can tell Squid to reset the TCP connection
2193# by specifying TCP_RESET.
2194#
2195#Default:
2196# none
2197
2198# TAG: memory_pools on|off
2199# If set, Squid will keep pools of allocated (but unused) memory
2200# available for future use. If memory is a premium on your
2201# system and you believe your malloc library outperforms Squid
2202# routines, disable this.
2203#
2204#Default:
2205# memory_pools on
2206
2207# TAG: memory_pools_limit (bytes)
2208# Used only with memory_pools on:
2209# memory_pools_limit 50 MB
2210#
2211# If set to a non-zero value, Squid will keep at most the specified
2212# limit of allocated (but unused) memory in memory pools. All free()
2213# requests that exceed this limit will be handled by your malloc
2214# library. Squid does not pre-allocate any memory, just safe-keeps
2215# objects that otherwise would be free()d. Thus, it is safe to set
2216# memory_pools_limit to a reasonably high value even if your
2217# configuration will use less memory.
2218#
2219# If not set (default) or set to zero, Squid will keep all memory it
2220# can. That is, there will be no limit on the total amount of memory
2221# used for safe-keeping.
2222#
2223# To disable memory allocation optimization, do not set
2224# memory_pools_limit to 0. Set memory_pools to "off" instead.
2225#
2226# An overhead for maintaining memory pools is not taken into account
2227# when the limit is checked. This overhead is close to four bytes per
2228# object kept. However, pools may actually _save_ memory because of
2229# reduced memory thrashing in your malloc library.
2230#
2231#Default:
2232# none
2233
2234# TAG: forwarded_for on|off
2235# If set, Squid will include your system's IP address or name
2236# in the HTTP requests it forwards. By default it looks like
2237# this:
2238#
2239# X-Forwarded-For: 192.1.2.3
2240#
2241# If you disable this, it will appear as
2242#
2243# X-Forwarded-For: unknown
2244#
2245#Default:
2246# forwarded_for on
2247
2248# TAG: log_icp_queries on|off
2249# If set, ICP queries are logged to access.log. You may wish
2250# do disable this if your ICP load is VERY high to speed things
2251# up or to simplify log analysis.
2252#
2253#Default:
2254# log_icp_queries on
2255
2256# TAG: icp_hit_stale on|off
2257# If you want to return ICP_HIT for stale cache objects, set this
2258# option to 'on'. If you have sibling relationships with caches
2259# in other administrative domains, this should be 'off'. If you only
2260# have sibling relationships with caches under your control, then
2261# it is probably okay to set this to 'on'.
2262# If set to 'on', then your siblings should use the option "allow-miss"
2263# on their cache_peer lines for connecting to you.
2264#
2265#Default:
2266# icp_hit_stale off
2267
2268# TAG: minimum_direct_hops
2269# If using the ICMP pinging stuff, do direct fetches for sites
2270# which are no more than this many hops away.
2271#
2272#Default:
2273# minimum_direct_hops 4
2274
2275# TAG: minimum_direct_rtt
2276# If using the ICMP pinging stuff, do direct fetches for sites
2277# which are no more than this many rtt milliseconds away.
2278#
2279#Default:
2280# minimum_direct_rtt 400
2281
2282# TAG: cachemgr_passwd
2283# Specify passwords for cachemgr operations.
2284#
2285# Usage: cachemgr_passwd password action action ...
2286#
2287# Some valid actions are (see cache manager menu for a full list):
2288# 5min
2289# 60min
2290# asndb
2291# authenticator
2292# cbdata
2293# client_list
2294# comm_incoming
2295# config *
2296# counters
2297# delay
2298# digest_stats
2299# dns
2300# events
2301# filedescriptors
2302# fqdncache
2303# histograms
2304# http_headers
2305# info
2306# io
2307# ipcache
2308# mem
2309# menu
2310# netdb
2311# non_peers
2312# objects
2313# pconn
2314# peer_select
2315# redirector
2316# refresh
2317# server_list
2318# shutdown *
2319# store_digest
2320# storedir
2321# utilization
2322# via_headers
2323# vm_objects
2324#
2325# * Indicates actions which will not be performed without a
2326# valid password, others can be performed if not listed here.
2327#
2328# To disable an action, set the password to "disable".
2329# To allow performing an action without a password, set the
2330# password to "none".
2331#
2332# Use the keyword "all" to set the same password for all actions.
2333#
2334#Example:
2335# cachemgr_passwd secret shutdown
2336# cachemgr_passwd lesssssssecret info stats/objects
2337# cachemgr_passwd disable all
2338#
2339#Default:
2340# none
2341
2342# TAG: store_avg_object_size (kbytes)
2343# Average object size, used to estimate number of objects your
2344# cache can hold. See doc/Release-Notes-1.1.txt. The default is
2345# 13 KB.
2346#
2347#Default:
2348# store_avg_object_size 13 KB
2349
2350# TAG: store_objects_per_bucket
2351# Target number of objects per bucket in the store hash table.
2352# Lowering this value increases the total number of buckets and
2353# also the storage maintenance rate. The default is 50.
2354#
2355#Default:
2356# store_objects_per_bucket 20
2357
2358# TAG: client_db on|off
2359# If you want to disable collecting per-client statistics, then
2360# turn off client_db here.
2361#
2362#Default:
2363# client_db on
2364
2365# TAG: netdb_low
2366# TAG: netdb_high
2367# The low and high water marks for the ICMP measurement
2368# database. These are counts, not percents. The defaults are
2369# 900 and 1000. When the high water mark is reached, database
2370# entries will be deleted until the low mark is reached.
2371#
2372#Default:
2373# netdb_low 900
2374# netdb_high 1000
2375
2376# TAG: netdb_ping_period
2377# The minimum period for measuring a site. There will be at
2378# least this much delay between successive pings to the same
2379# network. The default is five minutes.
2380#
2381#Default:
2382# netdb_ping_period 5 minutes
2383
2384# TAG: query_icmp on|off
2385# If you want to ask your peers to include ICMP data in their ICP
2386# replies, enable this option.
2387#
2388# If your peer has configured Squid (during compilation) with
2389# '--enable-icmp' then that peer will send ICMP pings to origin server
2390# sites of the URLs it receives. If you enable this option then the
2391# ICP replies from that peer will include the ICMP data (if available).
2392# Then, when choosing a parent cache, Squid will choose the parent with
2393# the minimal RTT to the origin server. When this happens, the
2394# hierarchy field of the access.log will be
2395# "CLOSEST_PARENT_MISS". This option is off by default.
2396#
2397#Default:
2398# query_icmp off
2399
2400# TAG: test_reachability on|off
2401# When this is 'on', ICP MISS replies will be ICP_MISS_NOFETCH
2402# instead of ICP_MISS if the target host is NOT in the ICMP
2403# database, or has a zero RTT.
2404#
2405#Default:
2406# test_reachability off
2407
2408# TAG: buffered_logs on|off
2409# cache.log log file is written with stdio functions, and as such
2410# it can be buffered or unbuffered. By default it will be unbuffered.
2411# Buffering it can speed up the writing slightly (though you are
2412# unlikely to need to worry unless you run with tons of debugging
2413# enabled in which case performance will suffer badly anyway..).
2414#
2415#Default:
2416# buffered_logs off
2417
2418# TAG: reload_into_ims on|off
2419# When you enable this option, client no-cache or ``reload''
2420# requests will be changed to If-Modified-Since requests.
2421# Doing this VIOLATES the HTTP standard. Enabling this
2422# feature could make you liable for problems which it
2423# causes.
2424#
2425# see also refresh_pattern for a more selective approach.
2426#
2427#Default:
2428# reload_into_ims off
2429
2430# TAG: always_direct
2431# Usage: always_direct allow|deny [!]aclname ...
2432#
2433# Here you can use ACL elements to specify requests which should
2434# ALWAYS be forwarded directly to origin servers. For example,
2435# to always directly forward requests for local servers use
2436# something like:
2437#
2438# acl local-servers dstdomain my.domain.net
2439# always_direct allow local-servers
2440#
2441# To always forward FTP requests directly, use
2442#
2443# acl FTP proto FTP
2444# always_direct allow FTP
2445#
2446# NOTE: There is a similar, but opposite option named
2447# 'never_direct'. You need to be aware that "always_direct deny
2448# foo" is NOT the same thing as "never_direct allow foo". You
2449# may need to use a deny rule to exclude a more-specific case of
2450# some other rule. Example:
2451#
2452# acl local-external dstdomain external.foo.net
2453# acl local-servers dstdomain .foo.net
2454# always_direct deny local-external
2455# always_direct allow local-servers
2456#
2457# This option replaces some v1.1 options such as local_domain
2458# and local_ip.
2459#
2460#Default:
2461# none
2462
2463# TAG: never_direct
2464# Usage: never_direct allow|deny [!]aclname ...
2465#
2466# never_direct is the opposite of always_direct. Please read
2467# the description for always_direct if you have not already.
2468#
2469# With 'never_direct' you can use ACL elements to specify
2470# requests which should NEVER be forwarded directly to origin
2471# servers. For example, to force the use of a proxy for all
2472# requests, except those in your local domain use something like:
2473#
2474# acl local-servers dstdomain .foo.net
2475# acl all src 0.0.0.0/0.0.0.0
2476# never_direct deny local-servers
2477# never_direct allow all
2478#
2479# or if squid is inside a firewall and there is local intranet
2480# servers inside the firewall then use something like:
2481#
2482# acl local-intranet dstdomain .foo.net
2483# acl local-external dstdomain external.foo.net
2484# always_direct deny local-external
2485# always_direct allow local-intranet
2486# never_direct allow all
2487#
2488# This option replaces some v1.1 options such as inside_firewall
2489# and firewall_ip.
2490#
2491#Default:
2492# none
2493
2494# TAG: header_access
2495# Usage: header_access header_name allow|deny [!]aclname ...
2496#
2497# WARNING: Doing this VIOLATES the HTTP standard. Enabling
2498# this feature could make you liable for problems which it
2499# causes.
2500#
2501# This option replaces the old 'anonymize_headers' and the
2502# older 'http_anonymizer' option with something that is much
2503# more configurable. This new method creates a list of ACLs
2504# for each header, allowing you very fine-tuned header
2505# mangling.
2506#
2507# You can only specify known headers for the header name.
2508# Other headers are reclassified as 'Other'. You can also
2509# refer to all the headers with 'All'.
2510#
2511# For example, to achieve the same behaviour as the old
2512# 'http_anonymizer standard' option, you should use:
2513#
2514# header_access From deny all
2515# header_access Referer deny all
2516# header_access Server deny all
2517# header_access User-Agent deny all
2518# header_access WWW-Authenticate deny all
2519# header_access Link deny all
2520#
2521# Or, to reproduce the old 'http_anonymizer paranoid' feature
2522# you should use:
2523#
2524# header_access Allow allow all
2525# header_access Authorization allow all
2526# header_access Cache-Control allow all
2527# header_access Content-Encoding allow all
2528# header_access Content-Length allow all
2529# header_access Content-Type allow all
2530# header_access Date allow all
2531# header_access Expires allow all
2532# header_access Host allow all
2533# header_access If-Modified-Since allow all
2534# header_access Last-Modified allow all
2535# header_access Location allow all
2536# header_access Pragma allow all
2537# header_access Accept allow all
2538# header_access Accept-Charset allow all
2539# header_access Accept-Encoding allow all
2540# header_access Accept-Language allow all
2541# header_access Content-Language allow all
2542# header_access Mime-Version allow all
2543# header_access Retry-After allow all
2544# header_access Title allow all
2545# header_access Connection allow all
2546# header_access Proxy-Connection allow all
2547# header_access All deny all
2548#
2549# By default, all headers are allowed (no anonymizing is
2550# performed).
2551#
2552#Default:
2553# none
2554
2555# TAG: header_replace
2556# Usage: header_replace header_name message
2557# Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
2558#
2559# This option allows you to change the contents of headers
2560# denied with header_access above, by replacing them with
2561# some fixed string. This replaces the old fake_user_agent
2562# option.
2563#
2564# By default, headers are removed if denied.
2565#
2566#Default:
2567# none
2568
2569# TAG: icon_directory
2570# Where the icons are stored. These are normally kept in
2571# /usr/share/squid/icons
2572#
2573#Default:
2574# icon_directory /usr/share/squid/icons
2575
2576# TAG: error_directory
2577# Directory where the error files are read from.
2578# /usr/lib/squid/errors contains sets of error files
2579# in different languages. The default error directory
2580# is /etc/squid/errors, which is a link to one of these
2581# error sets.
2582#
2583# If you wish to create your own versions of the error files,
2584# either to customize them to suit your language or company,
2585# copy the template English files to another
2586# directory and point this tag at them.
2587#
2588#error_directory /usr/share/squid/errors
2589#
2590#Default:
2591 error_directory /usr/share/squid/errors/Portuguese
2592
2593# TAG: minimum_retry_timeout (seconds)
2594# This specifies the minimum connect timeout, for when the
2595# connect timeout is reduced to compensate for the availability
2596# of multiple IP addresses.
2597#
2598# When a connection to a host is initiated, and that host has
2599# several IP addresses, the default connection timeout is reduced
2600# by dividing it by the number of addresses. So, a site with 15
2601# addresses would then have a timeout of 8 seconds for each
2602# address attempted. To avoid having the timeout reduced to the
2603# point where even a working host would not have a chance to
2604# respond, this setting is provided. The default, and the
2605# minimum value, is five seconds, and the maximum value is sixty
2606# seconds, or half of connect_timeout, whichever is greater and
2607# less than connect_timeout.
2608#
2609#Default:
2610# minimum_retry_timeout 5 seconds
2611
2612# TAG: maximum_single_addr_tries
2613# This sets the maximum number of connection attempts for a
2614# host that only has one address (for multiple-address hosts,
2615# each address is tried once).
2616#
2617# The default value is three tries, the (not recommended)
2618# maximum is 255 tries. A warning message will be generated
2619# if it is set to a value greater than ten.
2620#
2621#Default:
2622# maximum_single_addr_tries 3
2623
2624# TAG: snmp_port
2625# Squid can now serve statistics and status information via SNMP.
2626# A value of "0" disables SNMP support. If you wish to use SNMP,
2627# set this to "3401" to use the normal SNMP support.
2628#
2629#Default:
2630# snmp_port 0
2631
2632# TAG: snmp_access
2633# Allowing or denying access to the SNMP port.
2634#
2635# All access to the agent is denied by default.
2636# usage:
2637#
2638# snmp_access allow|deny [!]aclname ...
2639#
2640#Example:
2641# snmp_access allow snmppublic localhost
2642# snmp_access deny all
2643#
2644#Default:
2645# snmp_access deny all
2646
2647# TAG: snmp_incoming_address
2648# TAG: snmp_outgoing_address
2649# Just like 'udp_incoming_address' above, but for the SNMP port.
2650#
2651# snmp_incoming_address is used for the SNMP socket receiving
2652# messages from SNMP agents.
2653# snmp_outgoing_address is used for SNMP packets returned to SNMP
2654# agents.
2655#
2656# The default snmp_incoming_address (0.0.0.0) is to listen on all
2657# available network interfaces.
2658#
2659# If snmp_outgoing_address is set to 255.255.255.255 (the default)
2660# then it will use the same socket as snmp_incoming_address. Only
2661# change this if you want to have SNMP replies sent using another
2662# address than where this Squid listens for SNMP queries.
2663#
2664# NOTE, snmp_incoming_address and snmp_outgoing_address can not have
2665# the same value since they both use port 3401.
2666#
2667#Default:
2668# snmp_incoming_address 0.0.0.0
2669# snmp_outgoing_address 255.255.255.255
2670
2671# TAG: as_whois_server
2672# WHOIS server to query for AS numbers. NOTE: AS numbers are
2673# queried only when Squid starts up, not for every request.
2674#
2675#Default:
2676# as_whois_server whois.ra.net
2677# as_whois_server whois.ra.net
2678
2679# TAG: wccp_router
2680# Use this option to define your WCCP ``home'' router for
2681# Squid. Setting the 'wccp_router' to 0.0.0.0 (the default)
2682# disables WCCP.
2683#
2684#Default:
2685# wccp_router 0.0.0.0
2686
2687# TAG: wccp_version
2688# According to some users, Cisco IOS 11.2 only supports WCCP
2689# version 3. If you're using that version of IOS, change
2690# this value to 3.
2691#
2692#Default:
2693# wccp_version 4
2694
2695# TAG: wccp_incoming_address
2696# TAG: wccp_outgoing_address
2697# wccp_incoming_address Use this option if you require WCCP
2698# messages to be received on only one
2699# interface. Do NOT use this option if
2700# you're unsure how many interfaces you
2701# have, or if you know you have only one
2702# interface.
2703#
2704# wccp_outgoing_address Use this option if you require WCCP
2705# messages to be sent out on only one
2706# interface. Do NOT use this option if
2707# you're unsure how many interfaces you
2708# have, or if you know you have only one
2709# interface.
2710#
2711# The default behavior is to not bind to any specific address.
2712#
2713# NOTE, wccp_incoming_address and wccp_outgoing_address can not have
2714# the same value since they both use port 2048.
2715#
2716#Default:
2717# wccp_incoming_address 0.0.0.0
2718# wccp_outgoing_address 255.255.255.255
2719
2720
2721# DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option)
2722# -----------------------------------------------------------------------------
2723
2724# TAG: delay_pools
2725# This represents the number of delay pools to be used. For example,
2726# if you have one class 2 delay pool and one class 3 delays pool, you
2727# have a total of 2 delay pools.
2728#
2729#Default:
2730# delay_pools 0
2731
2732# TAG: delay_class
2733# This defines the class of each delay pool. There must be exactly one
2734# delay_class line for each delay pool. For example, to define two
2735# delay pools, one of class 2 and one of class 3, the settings above
2736# and here would be:
2737#
2738#Example:
2739# delay_pools 2 # 2 delay pools
2740# delay_class 1 2 # pool 1 is a class 2 pool
2741# delay_class 2 3 # pool 2 is a class 3 pool
2742#
2743# The delay pool classes are:
2744#
2745# class 1 Everything is limited by a single aggregate
2746# bucket.
2747#
2748# class 2 Everything is limited by a single aggregate
2749# bucket as well as an "individual" bucket chosen
2750# from bits 25 through 32 of the IP address.
2751#
2752# class 3 Everything is limited by a single aggregate
2753# bucket as well as a "network" bucket chosen
2754# from bits 17 through 24 of the IP address and a
2755# "individual" bucket chosen from bits 17 through
2756# 32 of the IP address.
2757#
2758# NOTE: If an IP address is a.b.c.d
2759# -> bits 25 through 32 are "d"
2760# -> bits 17 through 24 are "c"
2761# -> bits 17 through 32 are "c * 256 + d"
2762#
2763#Default:
2764# none
2765
2766# TAG: delay_access
2767# This is used to determine which delay pool a request falls into.
2768# The first matched delay pool is always used, i.e., if a request falls
2769# into delay pool number one, no more delay are checked, otherwise the
2770# rest are checked in order of their delay pool number until they have
2771# all been checked. For example, if you want some_big_clients in delay
2772# pool 1 and lotsa_little_clients in delay pool 2:
2773#
2774#Example:
2775# delay_access 1 allow some_big_clients
2776# delay_access 1 deny all
2777# delay_access 2 allow lotsa_little_clients
2778# delay_access 2 deny all
2779#
2780#Default:
2781# none
2782
2783# TAG: delay_parameters
2784# This defines the parameters for a delay pool. Each delay pool has
2785# a number of "buckets" associated with it, as explained in the
2786# description of delay_class. For a class 1 delay pool, the syntax is:
2787#
2788#delay_parameters pool aggregate
2789#
2790# For a class 2 delay pool:
2791#
2792#delay_parameters pool aggregate individual
2793#
2794# For a class 3 delay pool:
2795#
2796#delay_parameters pool aggregate network individual
2797#
2798# The variables here are:
2799#
2800# pool a pool number - ie, a number between 1 and the
2801# number specified in delay_pools as used in
2802# delay_class lines.
2803#
2804# aggregate the "delay parameters" for the aggregate bucket
2805# (class 1, 2, 3).
2806#
2807# individual the "delay parameters" for the individual
2808# buckets (class 2, 3).
2809#
2810# network the "delay parameters" for the network buckets
2811# (class 3).
2812#
2813# A pair of delay parameters is written restore/maximum, where restore is
2814# the number of bytes (not bits - modem and network speeds are usually
2815# quoted in bits) per second placed into the bucket, and maximum is the
2816# maximum number of bytes which can be in the bucket at any time.
2817#
2818# For example, if delay pool number 1 is a class 2 delay pool as in the
2819# above example, and is being used to strictly limit each host to 64kbps
2820# (plus overheads), with no overall limit, the line is:
2821#
2822#delay_parameters 1 -1/-1 8000/8000
2823#
2824# Note that the figure -1 is used to represent "unlimited".
2825#
2826# And, if delay pool number 2 is a class 3 delay pool as in the above
2827# example, and you want to limit it to a total of 256kbps (strict limit)
2828# with each 8-bit network permitted 64kbps (strict limit) and each
2829# individual host permitted 4800bps with a bucket maximum size of 64kb
2830# to permit a decent web page to be downloaded at a decent speed
2831# (if the network is not being limited due to overuse) but slow down
2832# large downloads more significantly:
2833#
2834#delay_parameters 2 32000/32000 8000/8000 600/64000
2835#
2836# There must be one delay_parameters line for each delay pool.
2837#
2838#Default:
2839# none
2840
2841# TAG: delay_initial_bucket_level (percent, 0-100)
2842# The initial bucket percentage is used to determine how much is put
2843# in each bucket when squid starts, is reconfigured, or first notices
2844# a host accessing it (in class 2 and class 3, individual hosts and
2845# networks only have buckets associated with them once they have been
2846# "seen" by squid).
2847#
2848#Default:
2849# delay_initial_bucket_level 50
2850
2851# TAG: incoming_icp_average
2852# TAG: incoming_http_average
2853# TAG: incoming_dns_average
2854# TAG: min_icp_poll_cnt
2855# TAG: min_dns_poll_cnt
2856# TAG: min_http_poll_cnt
2857# Heavy voodoo here. I can't even believe you are reading this.
2858# Are you crazy? Don't even think about adjusting these unless
2859# you understand the algorithms in comm_select.c first!
2860#
2861#Default:
2862# incoming_icp_average 6
2863# incoming_http_average 4
2864# incoming_dns_average 4
2865# min_icp_poll_cnt 8
2866# min_dns_poll_cnt 8
2867# min_http_poll_cnt 8
2868
2869# TAG: max_open_disk_fds
2870# To avoid having disk as the I/O bottleneck Squid can optionally
2871# bypass the on-disk cache if more than this amount of disk file
2872# descriptors are open.
2873#
2874# A value of 0 indicates no limit.
2875#
2876#Default:
2877# max_open_disk_fds 0
2878
2879# TAG: offline_mode
2880# Enable this option and Squid will never try to validate cached
2881# objects.
2882#
2883#Default:
2884# offline_mode off
2885
2886# TAG: uri_whitespace
2887# What to do with requests that have whitespace characters in the
2888# URI. Options:
2889#
2890# strip: The whitespace characters are stripped out of the URL.
2891# This is the behavior recommended by RFC2616.
2892# deny: The request is denied. The user receives an "Invalid
2893# Request" message.
2894# allow: The request is allowed and the URI is not changed. The
2895# whitespace characters remain in the URI. Note the
2896# whitespace is passed to redirector processes if they
2897# are in use.
2898# encode: The request is allowed and the whitespace characters are
2899# encoded according to RFC1738. This could be considered
2900# a violation of the HTTP/1.1
2901# RFC because proxies are not allowed to rewrite URI's.
2902# chop: The request is allowed and the URI is chopped at the
2903# first whitespace. This might also be considered a
2904# violation.
2905#
2906#Default:
2907# uri_whitespace strip
2908
2909# TAG: broken_posts
2910# A list of ACL elements which, if matched, causes Squid to send
2911# an extra CRLF pair after the body of a PUT/POST request.
2912#
2913# Some HTTP servers has broken implementations of PUT/POST,
2914# and rely on an extra CRLF pair sent by some WWW clients.
2915#
2916# Quote from RFC 2068 section 4.1 on this matter:
2917#
2918# Note: certain buggy HTTP/1.0 client implementations generate an
2919# extra CRLF's after a POST request. To restate what is explicitly
2920# forbidden by the BNF, an HTTP/1.1 client must not preface or follow
2921# a request with an extra CRLF.
2922#
2923#Example:
2924# acl buggy_server url_regex ^http://....
2925# broken_posts allow buggy_server
2926#
2927#Default:
2928# none
2929
2930# TAG: mcast_miss_addr
2931# Note: This option is only available if Squid is rebuilt with the
2932# -DMULTICAST_MISS_STREAM option
2933#
2934# If you enable this option, every "cache miss" URL will
2935# be sent out on the specified multicast address.
2936#
2937# Do not enable this option unless you are are absolutely
2938# certain you understand what you are doing.
2939#
2940#Default:
2941# mcast_miss_addr 255.255.255.255
2942
2943# TAG: mcast_miss_ttl
2944# Note: This option is only available if Squid is rebuilt with the
2945# -DMULTICAST_MISS_TTL option
2946#
2947# This is the time-to-live value for packets multicasted
2948# when multicasting off cache miss URLs is enabled. By
2949# default this is set to 'site scope', i.e. 16.
2950#
2951#Default:
2952# mcast_miss_ttl 16
2953
2954# TAG: mcast_miss_port
2955# Note: This option is only available if Squid is rebuilt with the
2956# -DMULTICAST_MISS_STREAM option
2957#
2958# This is the port number to be used in conjunction with
2959# 'mcast_miss_addr'.
2960#
2961#Default:
2962# mcast_miss_port 3135
2963
2964# TAG: mcast_miss_encode_key
2965# Note: This option is only available if Squid is rebuilt with the
2966# -DMULTICAST_MISS_STREAM option
2967#
2968# The URLs that are sent in the multicast miss stream are
2969# encrypted. This is the encryption key.
2970#
2971#Default:
2972# mcast_miss_encode_key XXXXXXXXXXXXXXXX
2973
2974# TAG: nonhierarchical_direct
2975# By default, Squid will send any non-hierarchical requests
2976# (matching hierarchy_stoplist or not cachable request type) direct
2977# to origin servers.
2978#
2979# If you set this to off, then Squid will prefer to send these
2980# requests to parents.
2981#
2982# Note that in most configurations, by turning this off you will only
2983# add latency to these request without any improvement in global hit
2984# ratio.
2985#
2986# If you are inside an firewall then see never_direct instead of
2987# this directive.
2988#
2989#Default:
2990# nonhierarchical_direct on
2991
2992# TAG: prefer_direct
2993# Normally Squid tries to use parents for most requests. If you by some
2994# reason like it to first try going direct and only use a parent if
2995# going direct fails then set this to on.
2996#
2997# By combining nonhierarchical_direct off and prefer_direct on you
2998# can set up Squid to use a parent as a backup path if going direct
2999# fails.
3000#
3001#Default:
3002# prefer_direct off
3003
3004# TAG: strip_query_terms
3005# By default, Squid strips query terms from requested URLs before
3006# logging. This protects your user's privacy.
3007#
3008#Default:
3009# strip_query_terms on
3010
3011# TAG: coredump_dir
3012# By default Squid leaves core files in the directory from where
3013# it was started. If you set 'coredump_dir' to a directory
3014# that exists, Squid will chdir() to that directory at startup
3015# and coredump files will be left there.
3016#
3017#Default:
3018# coredump_dir none
3019#
3020# Leave coredumps in the first cache dir
3021coredump_dir /var/spool/squid
3022
3023# TAG: redirector_bypass
3024# When this is 'on', a request will not go through the
3025# redirector if all redirectors are busy. If this is 'off'
3026# and the redirector queue grows too large, Squid will exit
3027# with a FATAL error and ask you to increase the number of
3028# redirectors. You should only enable this if the redirectors
3029# are not critical to your caching system. If you use
3030# redirectors for access control, and you enable this option,
3031# then users may have access to pages that they should not
3032# be allowed to request.
3033#
3034#Default:
3035# redirector_bypass off
3036
3037# TAG: ignore_unknown_nameservers
3038# By default Squid checks that DNS responses are received
3039# from the same IP addresses that they are sent to. If they
3040# don't match, Squid ignores the response and writes a warning
3041# message to cache.log. You can allow responses from unknown
3042# nameservers by setting this option to 'off'.
3043#
3044#Default:
3045# ignore_unknown_nameservers on
3046
3047# TAG: digest_generation
3048# Note: This option is only available if Squid is rebuilt with the
3049# --enable-cache-digests option
3050#
3051# This controls whether the server will generate a Cache Digest
3052# of its contents. By default, Cache Digest generation is
3053# enabled if Squid is compiled with USE_CACHE_DIGESTS defined.
3054#
3055#Default:
3056# digest_generation on
3057
3058# TAG: digest_bits_per_entry
3059# Note: This option is only available if Squid is rebuilt with the
3060# --enable-cache-digests option
3061#
3062# This is the number of bits of the server's Cache Digest which
3063# will be associated with the Digest entry for a given HTTP
3064# Method and URL (public key) combination. The default is 5.
3065#
3066#Default:
3067# digest_bits_per_entry 5
3068
3069# TAG: digest_rebuild_period (seconds)
3070# Note: This option is only available if Squid is rebuilt with the
3071# --enable-cache-digests option
3072#
3073# This is the number of seconds between Cache Digest rebuilds.
3074#
3075#Default:
3076# digest_rebuild_period 1 hour
3077
3078# TAG: digest_rewrite_period (seconds)
3079# Note: This option is only available if Squid is rebuilt with the
3080# --enable-cache-digests option
3081#
3082# This is the number of seconds between Cache Digest writes to
3083# disk.
3084#
3085#Default:
3086# digest_rewrite_period 1 hour
3087
3088# TAG: digest_swapout_chunk_size (bytes)
3089# Note: This option is only available if Squid is rebuilt with the
3090# --enable-cache-digests option
3091#
3092# This is the number of bytes of the Cache Digest to write to
3093# disk at a time. It defaults to 4096 bytes (4KB), the Squid
3094# default swap page.
3095#
3096#Default:
3097# digest_swapout_chunk_size 4096 bytes
3098
3099# TAG: digest_rebuild_chunk_percentage (percent, 0-100)
3100# Note: This option is only available if Squid is rebuilt with the
3101# --enable-cache-digests option
3102#
3103# This is the percentage of the Cache Digest to be scanned at a
3104# time. By default it is set to 10% of the Cache Digest.
3105#
3106#Default:
3107# digest_rebuild_chunk_percentage 10
3108
3109# TAG: chroot
3110# Use this to have Squid do a chroot() while initializing. This
3111# also causes Squid to fully drop root privileges after
3112# initializing. This means, for example, that if you use a HTTP
3113# port less than 1024 and try to reconfigure, you will get an
3114# error.
3115#
3116#Default:
3117# none
3118
3119# TAG: client_persistent_connections
3120# TAG: server_persistent_connections
3121# Persistent connection support for clients and servers. By
3122# default, Squid uses persistent connections (when allowed)
3123# with its clients and servers. You can use these options to
3124# disable persistent connections with clients and/or servers.
3125#
3126#Default:
3127# client_persistent_connections on
3128# server_persistent_connections on
3129
3130# TAG: pipeline_prefetch
3131# To boost the performance of pipelined requests to closer
3132# match that of a non-proxied environment Squid can try to fetch
3133# up to two requests in parallell from a pipeline.
3134#
3135# Defaults to off for bandwidth management and access logging
3136# reasons.
3137#
3138#Default:
3139# pipeline_prefetch off
3140
3141# TAG: extension_methods
3142# Squid only knows about standardized HTTP request methods.
3143# You can add up to 20 additional "extension" methods here.
3144#
3145#Default:
3146# none
3147
3148# TAG: request_entities
3149# Squid defaults to deny GET and HEAD requests with request entities,
3150# as the meaning of such requests are undefined in the HTTP standard
3151# even if not explicitly forbidden.
3152#
3153# Set this directive to on if you have clients which insists
3154# on sending request entities in GET or HEAD requests.
3155#
3156#Default:
3157# request_entities off
3158
3159# TAG: high_response_time_warning (msec)
3160# If the one-minute median response time exceeds this value,
3161# Squid prints a WARNING with debug level 0 to get the
3162# administrators attention. The value is in milliseconds.
3163#
3164#Default:
3165# high_response_time_warning 0
3166
3167# TAG: high_page_fault_warning
3168# If the one-minute average page fault rate exceeds this
3169# value, Squid prints a WARNING with debug level 0 to get
3170# the administrators attention. The value is in page faults
3171# per second.
3172#
3173#Default:
3174# high_page_fault_warning 0
3175
3176# TAG: high_memory_warning
3177# If the memory usage (as determined by mallinfo) exceeds
3178# value, Squid prints a WARNING with debug level 0 to get
3179# the administrators attention.
3180#
3181#Default:
3182# high_memory_warning 0
3183
3184# TAG: store_dir_select_algorithm
3185# Set this to 'round-robin' as an alternative.
3186#
3187#Default:
3188# store_dir_select_algorithm least-load
3189
3190# TAG: forward_log
3191# Note: This option is only available if Squid is rebuilt with the
3192# -DWIP_FWD_LOG option
3193#
3194# Logs the server-side requests.
3195#
3196# This is currently work in progress.
3197#
3198#Default:
3199# none
3200
3201# TAG: ie_refresh on|off
3202# Microsoft Internet Explorer up until version 5.5 Service
3203# Pack 1 has an issue with transparent proxies, wherein it
3204# is impossible to force a refresh. Turning this on provides
3205# a partial fix to the problem, by causing all IMS-REFRESH
3206# requests from older IE versions to check the origin server
3207# for fresh content. This reduces hit ratio by some amount
3208# (~10% in my experience), but allows users to actually get
3209# fresh content when they want it. Note that because Squid
3210# cannot tell if the user is using 5.5 or 5.5SP1, the behavior
3211# of 5.5 is unchanged from old versions of Squid (i.e. a
3212# forced refresh is impossible). Newer versions of IE will,
3213# hopefully, continue to have the new behavior and will be
3214# handled based on that assumption. This option defaults to
3215# the old Squid behavior, which is better for hit ratios but
3216# worse for clients using IE, if they need to be able to
3217# force fresh content.
3218#
3219#Default:
3220# ie_refresh off
3221
3222# TAG: vary_ignore_expire on|off
3223# Many HTTP servers supporting Vary gives such objects
3224# immediate expiry time with no cache-control header
3225# when requested by a HTTP/1.0 client. This option
3226# enables Squid to ignore such expiry times until
3227# HTTP/1.1 is fully implemented.
3228# WARNING: This may eventually cause some varying
3229# objects not intended for caching to get cached.
3230#
3231#Default:
3232# vary_ignore_expire off
3233
3234# TAG: sleep_after_fork (microseconds)
3235# When this is set to a non-zero value, the main Squid process
3236# sleeps the specified number of microseconds after a fork()
3237# system call. This sleep may help the situation where your
3238# system reports fork() failures due to lack of (virtual)
3239# memory. Note, however, that if you have a lot of child
3240# processes, then these sleep delays will add up and your
3241# Squid will not service requests for some amount of time
3242# until all the child processes have been started.
3243#
3244#Default:
3245# sleep_after_fork 0