Redirect http://tile.osm.org to https://tile.openstreetmap.org
authorTom Hughes <tom@compton.nu>
Mon, 4 Jun 2018 07:29:29 +0000 (08:29 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 4 Jun 2018 07:29:29 +0000 (08:29 +0100)
cookbooks/tilecache/templates/default/nginx_tile.conf.erb

index 149ddd0..ce2b23b 100644 (file)
@@ -104,3 +104,10 @@ 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;
+}