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
24 cache_mgr webmaster@openstreetmap.org
31 maximum_object_size 1048576 bytes
32 maximum_object_size_in_memory 64 KB
34 cache_replacement_policy heap LFUDA
35 memory_replacement_policy heap GDSF
37 server_persistent_connections on
38 persistent_request_timeout 1 minutes
40 negative_ttl 15 seconds
41 half_closed_clients off
44 read_timeout 90 seconds
45 request_timeout 90 seconds
46 connect_timeout 20 seconds
47 client_lifetime 1 hours
49 collapsed_forwarding on
50 refresh_stale_hit 300 seconds
52 #Recommended minimum configuration:
53 #----------------------------------
55 acl manager proto cache_object
56 acl localhost src 127.0.0.1/32
57 acl to_localhost dst 127.0.0.0/8
58 acl SSL_ports port 443
59 acl Safe_ports port 80 # http
60 acl Safe_ports port 21 # ftp
61 acl Safe_ports port 443 # https
62 acl Safe_ports port 70 # gopher
63 acl Safe_ports port 210 # wais
64 acl Safe_ports port 1025-65535 # unregistered ports
65 acl Safe_ports port 280 # http-mgmt
66 acl Safe_ports port 488 # gss-http
67 acl Safe_ports port 591 # filemaker
68 acl Safe_ports port 777 # multiling http
69 acl CONNECT method CONNECT
70 http_access allow manager localhost
72 http_access allow manager
74 http_access deny manager
75 http_access deny !Safe_ports
76 http_access deny CONNECT !SSL_ports
77 #----------------------------------
79 acl purge_hosts src 127.0.0.0/8
80 acl PURGE method purge
81 http_access allow purge purge_hosts
82 http_access deny purge
85 follow_x_forwarded_for allow localhost
87 logformat openstreetmap %ts.%03tu %tr %>a %Ss/%03Hs %<st %rm %rp %Sh/%<A %mt "%{Referer}>h" "%{User-Agent}>h"
88 access_log <%= node[:squid][:access_log] %>
89 cache_log /var/log/squid/cache.log
97 refresh_pattern . 0 50% 8640
99 #ZERO required for logrotate to work properly
102 <% Dir.glob("/etc/squid/squid.conf.d/*.conf") do |file| -%>
103 <%= File.read(file) %>