From 22c14f07fa7055967273e132d4438a4734c01519 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 13 Apr 2020 15:52:19 +0100 Subject: [PATCH] Don't redirect /server-status on nominatim servers --- cookbooks/nominatim/templates/default/apache.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cookbooks/nominatim/templates/default/apache.erb b/cookbooks/nominatim/templates/default/apache.erb index b739e7995..46aa2d85e 100644 --- a/cookbooks/nominatim/templates/default/apache.erb +++ b/cookbooks/nominatim/templates/default/apache.erb @@ -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] -- 2.39.5