]> git.openstreetmap.org Git - chef.git/blob - cookbooks/squid/templates/default/squid.conf.erb
tilecache: fix broken export acl
[chef.git] / cookbooks / squid / templates / default / squid.conf.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 #FIXME - configurable
4 cache_mem  <%= node[:squid][:cache_mem] %>
5
6 max_filedescriptors 65536
7
8 #used by squidclient / munin
9 http_port 3128
10 #ICP
11 icp_port 3130
12 log_icp_queries off
13
14 #FIXME - configurable
15 http_port 80 accel defaultsite=tile.openstreetmap.org tcpkeepalive=60,10,6 http11
16
17 cache_effective_user proxy
18 cache_effective_group proxy
19
20 #FIXME - configurable
21 cache_dir <%= node[:squid][:cache_dir] %>
22 cache_swap_log /var/spool/squid/%s
23
24 quick_abort_min 0 KB
25 quick_abort_max 0 KB
26
27 read_ahead_gap 64 KB
28
29 maximum_object_size 1048576 bytes
30 maximum_object_size_in_memory 64 KB
31
32 cache_replacement_policy heap LFUDA
33 memory_replacement_policy heap GDSF
34
35 server_persistent_connections on
36 persistent_request_timeout 1 minutes
37
38 negative_ttl 15 seconds
39 half_closed_clients off
40 pipeline_prefetch on
41
42 read_timeout 90 seconds
43 request_timeout 90 seconds
44 connect_timeout 20 seconds
45 client_lifetime 1 hours
46
47 collapsed_forwarding on
48 refresh_stale_hit 300 seconds
49
50 #Recommended minimum configuration:
51 #----------------------------------
52 acl all src all
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
69
70 http_access allow manager
71
72 http_access deny manager
73 http_access deny !Safe_ports
74 http_access deny CONNECT !SSL_ports
75 #----------------------------------
76
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
81
82 forwarded_for on
83
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
87
88 access_log <%= node[:squid][:access_log] %>
89 cache_log /var/log/squid/cache.log
90 cache_store_log none
91 buffered_logs on
92 client_db off
93 strip_query_terms off
94
95 digest_generation on
96
97 refresh_pattern .               0       20%     4320
98
99 #ZERO required for logrotate to work properly
100 logfile_rotate 0
101
102 <% Dir.glob("/etc/squid/squid.conf.d/*.conf") do |file| -%>
103 <%= File.read(file) %>
104 <% end -%>
105
106 #MUST BE LAST ACL
107 #--------------
108 http_access deny all
109 icp_access deny all
110 #--------------
111