X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/cb9f25913c9199b6daa6a9985ac109e4fd35dbf8..522d47be66d1f2d0e8b6f89913e2b45f89dd730e:/cookbooks/tilecache/templates/default/nginx_tile.conf.erb diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 4c99dfb0e..40b13c371 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -7,10 +7,12 @@ upstream tile_cache_backend { # Balancer: round-robin <% @caches.each do |cache| -%> <% if cache[:hostname] != node[:hostname] -%> +<% if node[:tilecache][:tile_siblings].include? cache[:fqdn] -%> <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%> server <%= address %> backup; # Server <%= cache[:hostname] %> <% end -%> <% end -%> +<% end -%> <% end -%> keepalive 256; @@ -46,6 +48,7 @@ map $http_user_agent $denied_scraper { default 0; # Not denied '~^Python\-urllib\/' 1; # Library Default '~^python\-requests\/' 1; # Library Default + '~^node\-fetch\/' 1; # Library Default '~^R$' 1; # Library Default '~^Java\/' 1; # Library Default '~^tiles$' 1; # Library Default @@ -96,7 +99,7 @@ server { proxy_http_version 1.1; proxy_set_header Connection ''; - proxy_connect_timeout 10s; + proxy_connect_timeout 5s; # Preserve host header. proxy_set_header Host $host;