]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/wordpress/templates/default/apache.erb
Switch wordpress sites to letsencrypt certificates
[chef.git] / cookbooks / wordpress / templates / default / apache.erb
index 200c500894c285c1a0743e4fe7c306c07d432990..6281fc2dbb859459cc887430d0ef31e304f375fd 100644 (file)
@@ -12,6 +12,7 @@
   ErrorLog /var/log/apache2/<%= @name %>-error.log
 
 <% if @ssl_enabled -%>
+  RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
   RedirectPermanent / https://<%= @name %>/
 </VirtualHost>
 
 
   ServerAdmin webmaster@openstreetmap.org
 
-  #
-  # Enable SSL
-  #
   SSLEngine on
-<% if @ssl_certificate -%>
-  SSLCertificateFile /etc/ssl/certs/<%= @ssl_certificate %>.pem
-  SSLCertificateKeyFile /etc/ssl/private/<%= @ssl_certificate %>.key
-<% end -%>
-<% if @ssl_certificate -%>
-  SSLCertificateChainFile /etc/ssl/certs/<%= @ssl_certificate_chain %>.pem
-<% end -%>
+  SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
+  SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
 
   CustomLog /var/log/apache2/<%= @name %>-access.log combined
   ErrorLog /var/log/apache2/<%= @name %>-error.log