From b11f888a94a141f24b709819e32bf8d5b76a3ffe Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 25 Nov 2019 22:19:11 +0000 Subject: [PATCH] tilecache: allow nginx to fallback to other caches --- .../tilecache/templates/default/nginx_tile.conf.erb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index eb7cb6771..76b3f26f5 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -1,18 +1,15 @@ # DO NOT EDIT - This file is being maintained by Chef upstream tile_cache_backend { - server 127.0.0.1; - server 127.0.0.2; - server 127.0.0.3; + server 127.0.0.1:80; + server 127.0.0.2:80; # Add the other caches to relieve pressure if local squid failing # 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 -%> + server <%= address %>:80 backup; # Server <%= cache[:hostname] %> <% end -%> <% end -%> <% end -%> -- 2.43.2