X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/981b586040b3fe307a4855e58e846da75555aa05..ce4d234ef22e628fe216f93a552f7f31dcb0897d:/cookbooks/tilecache/templates/default/nginx_tile.conf.erb?ds=inline diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 149ddd001..d5207f465 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -1,17 +1,9 @@ # DO NOT EDIT - This file is being maintained by Chef upstream tile_cache_backend { - server 127.0.0.1:8080; - <% @caches.each do |cache| -%> - <% if cache[:hostname] != node[:hostname] -%> - #Server <%= cache[:hostname] %> - <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%> - server <%= address %> backup; - <% end -%> - <% end -%> - <% end -%> - - keepalive 32; + server 127.0.0.1; + + keepalive 256; } # Rates table based on current cookie value @@ -59,8 +51,10 @@ server { proxy_http_version 1.1; proxy_set_header Connection ''; - proxy_connect_timeout 5s; + proxy_connect_timeout 10s; + # Preserve host header. + proxy_set_header Host $host; # Do not pass cookies to backends. proxy_set_header Cookie ''; # Do not pass Accept-Encoding to backends. @@ -85,7 +79,7 @@ server { # Allow Higher Traffic Rate from Approved User-Agents which do not support cookies (uses nginx Map) if ($approved_scraper) { - set $limit_rate 32768; + set $limit_rate 65536; } # Strip any ?query parameters from urls @@ -96,11 +90,3 @@ server { proxy_set_header Pragma $limit_http_pragma; } } - -# Convert all http requests to https -server { - listen 80 default_server; - listen [::]:80 default_server; - server_name _; - return 301 https://$host$request_uri; -}