From 31a516770ed279c68a6fb17ec9a498824becdcf3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 4 Jan 2018 19:21:15 +0000 Subject: [PATCH] Make planet redirect to https --- cookbooks/planet/templates/default/apache.erb | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/cookbooks/planet/templates/default/apache.erb b/cookbooks/planet/templates/default/apache.erb index 8790c8032..dd2c824e1 100644 --- a/cookbooks/planet/templates/default/apache.erb +++ b/cookbooks/planet/templates/default/apache.erb @@ -1,18 +1,13 @@ # DO NOT EDIT - This file is being maintained by Chef -<% [80, 443].each do |port| -%> -> + ServerName planet.openstreetmap.org ServerAlias planet.osm.org ServerAdmin webmaster@openstreetmap.org -<% if port == 443 -%> SSLEngine on SSLCertificateFile /etc/ssl/certs/planet.openstreetmap.org.pem SSLCertificateKeyFile /etc/ssl/private/planet.openstreetmap.org.key -<% else -%> - RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ -<% end -%> CustomLog /var/log/apache2/planet.openstreetmap.org-access.log combined ErrorLog /var/log/apache2/planet.openstreetmap.org-error.log @@ -63,4 +58,15 @@ RewriteRule ^(/planet/planet\-latest\.osm\.bz2)$ ${latestplanet:$1} [R,L] -<% end -%> + + + ServerName planet.openstreetmap.org + ServerAlias planet.osm.org + ServerAdmin webmaster@openstreetmap.org + + CustomLog /var/log/apache2/planet.openstreetmap.org-access.log combined + ErrorLog /var/log/apache2/planet.openstreetmap.org-error.log + + RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ + RedirectPermanent / https://planet.openstreetmap.org/ + -- 2.39.5