From: Tom Hughes Date: Wed, 9 May 2018 07:22:11 +0000 (+0100) Subject: Redirect http to https for planet X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/5924746a83a4bb0577a83412e6e4dc9a169cfb6a?ds=sidebyside Redirect http to https for planet --- diff --git a/cookbooks/planet/templates/default/apache.erb b/cookbooks/planet/templates/default/apache.erb index 8790c8032..a8a761a87 100644 --- a/cookbooks/planet/templates/default/apache.erb +++ b/cookbooks/planet/templates/default/apache.erb @@ -1,21 +1,16 @@ # 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 -%> + CustomLog /var/log/apache2/planet.openstreetmap.org-access.log combined + ErrorLog /var/log/apache2/planet.openstreetmap.org-error.log + 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 DocumentRoot /store/planet @@ -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/ +