]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/subversion/templates/default/apache.erb
Switch svn to letsencrypt
[chef.git] / cookbooks / subversion / templates / default / apache.erb
index ae5c4031737577247ab2b8c3b21118a4d7011e07..2ae7d0a1951289b95733bae32ef9e70058c6e7fd 100644 (file)
@@ -1,13 +1,12 @@
 # DO NOT EDIT - This file is being maintained by Chef
-<% [80, 443].each do |port| -%>
 
-<VirtualHost *:<%= port %>>
+<VirtualHost *:443>
         ServerName <%= @name %>
         ServerAdmin webmaster@openstreetmap.org
-<% if port == 443 -%>
 
         SSLEngine on
-<% end -%>
+        SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+        SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
         CustomLog /var/log/apache2/<%= @name %>-access.log combined
         CustomLog /var/log/apache2/<%= @name %>-svn-access.log "%h %t %u %{SVN-ACTION}e" env=SVN-ACTION
                 </LimitExcept>
         </Location>
 </VirtualHost>
-<% end -%>
+
+<VirtualHost *:80>
+        ServerName <%= @name %>
+        ServerAdmin webmaster@openstreetmap.org
+
+        CustomLog /var/log/apache2/<%= @name %>-access.log combined
+        ErrorLog /var/log/apache2/<%= @name %>-error.log
+
+        RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+        RedirectPermanent / https://<%= @name %>/
+</VirtualHost>