]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dns/templates/default/apache.erb
Enable SSL for dns.osm.org
[chef.git] / cookbooks / dns / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4         ServerName <%= @name %>
5         ServerAdmin webmaster@openstreetmap.org
6
7         CustomLog /var/log/apache2/<%= @name %>-access.log combined
8         ErrorLog /var/log/apache2/<%= @name %>-error.log
9
10         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
11         RedirectPermanent / https://<%= @name %>/
12 </VirtualHost>
13
14 <VirtualHost *:443>
15         ServerName <%= @name %>
16         ServerAdmin webmaster@openstreetmap.org
17
18         SSLEngine on
19         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
20         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
21
22         CustomLog /var/log/apache2/<%= @name %>-access.log combined
23         ErrorLog /var/log/apache2/<%= @name %>-error.log
24
25         DocumentRoot <%= @directory %>/html
26         Alias /json/ /var/lib/dns/json/
27 </VirtualHost>
28
29 <Directory <%= @directory %>/html>
30         Require all granted
31 </Directory>
32
33 <Directory /var/lib/dns/json>
34         Require all granted
35 </Directory>