1 # DO NOT EDIT - This file is being maintained by Chef
4 cache_mem <%= node[:squid][:cache_mem] %>
6 max_filedescriptors 65536
8 #used by squidclient / munin
15 http_port 80 accel defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6 http11
17 cache_effective_user proxy
18 cache_effective_group proxy
21 cache_dir <%= node[:squid][:cache_dir] %>
22 cache_swap_log /var/spool/squid/%s
29 maximum_object_size 1048576 bytes
30 maximum_object_size_in_memory 64 KB
32 cache_replacement_policy heap LFUDA
33 memory_replacement_policy heap GDSF
35 server_persistent_connections on
36 persistent_request_timeout 1 minutes
38 negative_ttl 15 seconds
39 half_closed_clients off
42 read_timeout 90 seconds
43 request_timeout 90 seconds
44 connect_timeout 20 seconds
45 client_lifetime 1 hours
47 collapsed_forwarding on
48 refresh_stale_hit 300 seconds
50 #Recommended minimum configuration:
51 #----------------------------------
53 acl manager proto cache_object
54 acl localhost src 127.0.0.1/32
55 acl to_localhost dst 127.0.0.0/8
56 acl SSL_ports port 443
57 acl Safe_ports port 80 # http
58 acl Safe_ports port 21 # ftp
59 acl Safe_ports port 443 # https
60 acl Safe_ports port 70 # gopher
61 acl Safe_ports port 210 # wais
62 acl Safe_ports port 1025-65535 # unregistered ports
63 acl Safe_ports port 280 # http-mgmt
64 acl Safe_ports port 488 # gss-http
65 acl Safe_ports port 591 # filemaker
66 acl Safe_ports port 777 # multiling http
67 acl CONNECT method CONNECT
68 http_access allow manager localhost
70 http_access allow manager
72 http_access deny manager
73 http_access deny !Safe_ports
74 http_access deny CONNECT !SSL_ports
75 #----------------------------------
77 acl purge_hosts src 127.0.0.0/8
78 acl PURGE method purge
79 http_access allow purge purge_hosts
80 http_access deny purge
84 #Loggin used for analysis
85 logformat zerelog %ts.%03tu %rp "%{Etag}<h" %>a "%{User-Agent}>h"
86 access_log /var/log/squid/zere.log zerelog
88 access_log <%= node[:squid][:access_log] %>
89 cache_log /var/log/squid/cache.log
97 refresh_pattern . 0 20% 4320
99 #ZERO required for logrotate to work properly
102 <% Dir.glob("/etc/squid/squid.conf.d/*.conf") do |file| -%>
103 <%= File.read(file) %>