]> git.openstreetmap.org Git - chef.git/blob - cookbooks/squid/templates/default/squid.conf.erb
35b336cada2eed2794e54f9eeaf2ebe05f4d1802
[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 cache_mgr webmaster@openstreetmap.org
25
26 quick_abort_min 0 KB
27 quick_abort_max 0 KB
28
29 read_ahead_gap 64 KB
30
31 maximum_object_size 1048576 bytes
32 maximum_object_size_in_memory 64 KB
33
34 cache_replacement_policy heap LFUDA
35 memory_replacement_policy heap GDSF
36
37 server_persistent_connections on
38 persistent_request_timeout 1 minutes
39
40 negative_ttl 15 seconds
41 half_closed_clients off
42 pipeline_prefetch on
43
44 read_timeout 90 seconds
45 request_timeout 90 seconds
46 connect_timeout 20 seconds
47 client_lifetime 1 hours
48
49 collapsed_forwarding on
50 refresh_stale_hit 300 seconds
51
52 #Recommended minimum configuration:
53 #----------------------------------
54 acl all src all
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
71
72 http_access allow manager
73
74 http_access deny manager
75 http_access deny !Safe_ports
76 http_access deny CONNECT !SSL_ports
77 #----------------------------------
78
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
83
84 forwarded_for on
85 follow_x_forwarded_for allow localhost
86
87 #Loggin used for analysis
88 logformat zerelog %ts.%03tu %rp "%{Etag}<h" %>a "%{User-Agent}>h" %<st
89 access_log /var/log/squid/zere.log zerelog
90
91 access_log <%= node[:squid][:access_log] %>
92 cache_log /var/log/squid/cache.log
93 cache_store_log none
94 buffered_logs on
95 client_db off
96 strip_query_terms off
97
98 digest_generation on
99
100 refresh_pattern .               0       50%     8640
101
102 #ZERO required for logrotate to work properly
103 logfile_rotate 0
104
105 <% Dir.glob("/etc/squid/squid.conf.d/*.conf") do |file| -%>
106 <%= File.read(file) %>
107 <% end -%>
108
109 #MUST BE LAST ACL
110 #--------------
111 http_access deny all
112 icp_access deny all
113 #--------------
114