]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/planet/templates/default/apache.erb
Allow planet redirector to handle any links under the webroot
[chef.git] / cookbooks / planet / templates / default / apache.erb
index dddd5de9fdfe55bdbc1bf985263e5eeda39ea4c0..a8a761a879808f4e7ecddc5c8732165a6f7acad9 100644 (file)
@@ -1,18 +1,17 @@
 # DO NOT EDIT - This file is being maintained by Chef
-<% [80, 443].each do |port| -%>
    
-<VirtualHost *:<%= port %>>
+<VirtualHost *:443>
         ServerName planet.openstreetmap.org
         ServerAlias planet.osm.org
         ServerAdmin webmaster@openstreetmap.org
-<% if port == 443 -%>
-
-        SSLEngine on
-<% end -%>
 
         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
+
         DocumentRoot /store/planet
 
         <Directory /store/planet>
@@ -30,8 +29,7 @@
         ProxyPass /replication/streaming http://127.0.0.1:8080
 
         <Location /replication/steaming>
-                Order deny,allow
-                Allow from all
+                Require all granted
         </Location>
 
         Redirect /pbf-experimental/    /pbf/
 
         RewriteRule     ^(/planet/planet\-latest\.osm\.bz2)$    ${latestplanet:$1}      [R,L]
 </VirtualHost>
-<% end -%>
+
+<VirtualHost *:80>
+        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/
+</VirtualHost>