# 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
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.
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;
-}
-
-server {
- listen 80;
- listen [::]:80;
- server_name ~^(?<subdomain>(?:[a-d]\.)?tile)\.osm\.org$;
- return 301 https://$subdomain.openstreetmap.org$request_uri;
-}