]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/apache.erb
Luxembourg new new hillshade, reprojected
[chef.git] / cookbooks / nominatim / templates / default / apache.erb
index 123c758f5f085f7226f182f632385da62ed28577..46aa2d85e728ab7ba6eeb1761dda799080276456 100644 (file)
@@ -59,8 +59,7 @@
 
     # regular requests and autoblocks
     RewriteMap bulklist txt:<%= @directory %>/settings/ip_blocks.map
-    RewriteRule ^/(search|reverse|lookup)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
-    RewriteRule ^/details(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|details}/details.php$2 [PT]
+    RewriteRule ^/(search|reverse|lookup|details)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
 </VirtualHost>
 
 <VirtualHost *:80>
@@ -81,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>