]> git.openstreetmap.org Git - chef.git/blob - cookbooks/tilecache/templates/default/squid.conf.erb
Disable TLSv1.3 for upstream connections from squid on Ubuntu 20.04
[chef.git] / cookbooks / tilecache / templates / default / squid.conf.erb
1 acl osmtile_thishost dstdomain <%= node.name %>
2 acl osmtile_sites dstdomain <%= node.name %> a.tile.openstreetmap.org b.tile.openstreetmap.org c.tile.openstreetmap.org tile.openstreetmap.org a.tile.osm.org b.tile.osm.org c.tile.osm.org tile.osm.org
3 acl osmtiles_png urlpath_regex .png$
4
5 acl whitelist_path urlpath_regex ^/cgi-bin/(export|debug)
6 acl blacklist_path urlpath_regex ^/cgi-bin/
7 acl blacklist_path urlpath_regex ^/MyAdmin/
8 acl blacklist_path urlpath_regex ^/myadmin/
9 acl blacklist_path urlpath_regex ^/pma/
10 acl blacklist_path urlpath_regex ^/phpmyadmin/
11 acl blacklist_path urlpath_regex ^/phpMyAdmin/
12 acl blacklist_path urlpath_regex ^/idssvc/
13 acl blacklist_path urlpath_regex ^/iesvc/
14 acl blacklist_path urlpath_regex ^/invoker/
15 acl blacklist_path urlpath_regex ^/jmx-console/
16 acl blacklist_path urlpath_regex ^/manager/
17 acl blacklist_path urlpath_regex ^/service/
18 acl blacklist_path urlpath_regex ^/web-console/
19 acl blacklist_path urlpath_regex ^/wstats/
20 acl blacklist_path urlpath_regex ^/zecmd/
21
22 http_access allow osmtile_sites whitelist_path
23 http_access deny blacklist_path
24
25 acl requestMethodGet method GET
26
27 http_access allow osmtile_sites requestMethodGet
28
29 acl osmtile_nocache_url urlpath_regex \.png/(status|dirty)$
30 cache deny osmtile_sites osmtile_nocache_url
31
32 <% @caches.each do |cache| -%>
33 <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
34 acl tile_caches src <%= address %>
35 <% end -%>
36 <% end -%>
37
38 # Primary Parent
39 <% if node[:squid][:version] < 4 -%>
40 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 ssl ssldomain=render.openstreetmap.org
41 <% elif node[:lsb][:release].to_f < 20.04 -%>
42 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 tls tlsdomain=render.openstreetmap.org
43 <% else -%>
44 cache_peer <%= node[:tilecache][:tile_parent] %> parent 443 0 no-query originserver name=osmtileAccel login=PASS connect-timeout=120 no-digest weight=1000 tls tlsdomain=render.openstreetmap.org tls-options=NORMAL:-VERS-TLS1.3
45 <% end -%>
46 cache_peer_access osmtileAccel allow osmtile_sites
47
48 # Backup Parents
49 <% @renders.each do |renders| -%>
50 <% if node[:squid][:version] < 4 -%>
51 cache_peer <%= renders[:hostname] %>.render.openstreetmap.org parent 443 0 no-query originserver name=osmtileAccelBackup<%= renders[:hostname] %> login=PASS connect-timeout=60 no-digest weight=10 ssl ssldomain=render.openstreetmap.org
52 <% elif node[:lsb][:release].to_f < 20.04 -%>
53 cache_peer <%= renders[:hostname] %>.render.openstreetmap.org parent 443 0 no-query originserver name=osmtileAccelBackup<%= renders[:hostname] %> login=PASS connect-timeout=60 no-digest weight=10 tls tlsdomain=render.openstreetmap.org
54 <% else -%>
55 cache_peer <%= renders[:hostname] %>.render.openstreetmap.org parent 443 0 no-query originserver name=osmtileAccelBackup<%= renders[:hostname] %> login=PASS connect-timeout=60 no-digest weight=10 tls tlsdomain=render.openstreetmap.org tls-options=NORMAL:-VERS-TLS1.3
56 <% end -%>
57 cache_peer_access osmtileAccelBackup<%= renders[:hostname] %> allow osmtile_sites
58 <% end -%>
59
60 # ----------------------------------
61
62 <% if node[:squid][:version] < 4 -%>
63
64 #Allow tile_caches HTCP access
65 htcp_access allow tile_caches
66
67 #Allow tile_caches ICP access
68 icp_access allow tile_caches
69 <% end %>
70
71 #----------------------------------