X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/76a92a578930347d2e7ef6a99a9ed7731b62e8b0..26cf6103779739532340c4838555985479e76de6:/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 f250bb972..6b5d2c48e 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -1,9 +1,9 @@ # DO NOT EDIT - This file is being maintained by Chef upstream tile_cache_backend { - server 127.0.0.1:8080; + server 127.0.0.1; - keepalive 32; + keepalive 256; } # Rates table based on current cookie value @@ -53,6 +53,8 @@ server { proxy_connect_timeout 5s; + # 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. @@ -88,20 +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 _; - add_header Access-Control-Allow-Origin *; - return 301 https://$host$request_uri; -} - -server { - listen 80; - listen [::]:80; - server_name ~^(?(?:[a-d]\.)?tile)\.osm\.org$; - add_header Access-Control-Allow-Origin *; - return 301 https://$subdomain.openstreetmap.org$request_uri; -}