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
9 http_port 127.0.0.1:3128
12 http_port 80 accel defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6 http11
14 cache_effective_user proxy
15 cache_effective_group proxy
18 cache_dir <%= node[:squid][:cache_dir] %>
19 cache_swap_log /var/spool/squid/%s
26 maximum_object_size 1048576 bytes
27 maximum_object_size_in_memory 64 KB
29 cache_replacement_policy heap LFUDA
30 memory_replacement_policy heap GDSF
32 server_persistent_connections on
33 persistent_request_timeout 1 minutes
35 negative_ttl 15 seconds
36 half_closed_clients off
39 read_timeout 90 seconds
40 request_timeout 90 seconds
41 connect_timeout 20 seconds
42 client_lifetime 1 hours
44 collapsed_forwarding on
45 refresh_stale_hit 300 seconds
47 #Recommended minimum configuration:
48 #----------------------------------
50 acl manager proto cache_object
51 acl localhost src 127.0.0.1/32
52 acl to_localhost dst 127.0.0.0/8
53 acl SSL_ports port 443
54 acl Safe_ports port 80 # http
55 acl Safe_ports port 21 # ftp
56 acl Safe_ports port 443 # https
57 acl Safe_ports port 70 # gopher
58 acl Safe_ports port 210 # wais
59 acl Safe_ports port 1025-65535 # unregistered ports
60 acl Safe_ports port 280 # http-mgmt
61 acl Safe_ports port 488 # gss-http
62 acl Safe_ports port 591 # filemaker
63 acl Safe_ports port 777 # multiling http
64 acl CONNECT method CONNECT
65 http_access allow manager localhost
67 http_access allow manager
69 http_access deny manager
70 http_access deny !Safe_ports
71 http_access deny CONNECT !SSL_ports
72 #----------------------------------
74 acl purge_hosts src 127.0.0.0/8
75 acl PURGE method purge
76 http_access allow purge purge_hosts
77 http_access deny purge
81 access_log <%= node[:squid][:access_log] %>
82 cache_log /var/log/squid/cache.log
90 refresh_pattern . 0 20% 4320
92 #ZERO required for logrotate to work properly
95 <% Dir.glob("/etc/squid/squid.conf.d/*.conf") do |file| -%>
96 <%= File.read(file) %>