]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/dns/templates/default/apache.erb
Set statuscake authentication details for DNS scripts
[chef.git] / cookbooks / dns / templates / default / apache.erb
index 31f8eebaea189bf5af97c870db239c473d1b91f1..fd555e886cf67f7c92c815a789bbb927fe19f53f 100644 (file)
@@ -7,6 +7,21 @@
        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>
+
+<VirtualHost *:443>
+       ServerName <%= @name %>
+       ServerAdmin webmaster@openstreetmap.org
+
+        SSLEngine on
+        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
+
        DocumentRoot <%= @directory %>/html
        Alias /json/ /var/lib/dns/json/
 </VirtualHost>
@@ -14,3 +29,7 @@
 <Directory <%= @directory %>/html>
        Require all granted
 </Directory>
+
+<Directory /var/lib/dns/json>
+       Require all granted
+</Directory>