]> git.openstreetmap.org Git - chef.git/commitdiff
Don't redirect /server-status on nominatim servers
authorTom Hughes <tom@compton.nu>
Mon, 13 Apr 2020 14:52:19 +0000 (15:52 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 13 Apr 2020 14:52:19 +0000 (15:52 +0100)
cookbooks/nominatim/templates/default/apache.erb

index b739e7995a18278f357820fa2bc509f78c18a32e..46aa2d85e728ab7ba6eeb1761dda799080276456 100644 (file)
@@ -80,6 +80,8 @@
     # manual blocks
     Include <%= @directory %>/settings/apache_blocks.conf
 
-    RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
-    RedirectPermanent / https://nominatim.openstreetmap.org/
+    RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
+
+    RewriteCond %{REQUEST_URI} !^/server-status$
+    RewriteRule ^(.*)$ https://nominatim.openstreetmap.org$1 [L,NE,R=permanent]
 </VirtualHost>