]> git.openstreetmap.org Git - chef.git/blob - cookbooks/exim/templates/default/apache-mta-sts.erb
Allow access to MTA-STS policy files
[chef.git] / cookbooks / exim / templates / default / apache-mta-sts.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4   ServerName <%= @name %>
5 <% @domains.drop(1).each do |domain| -%>
6   ServerAlias mta-sts.<%= domain %>
7 <% end -%>
8   ServerAdmin webmaster@openstreetmap.org
9
10   CustomLog /var/log/apache2/<%= @name %>-access.log combined
11   ErrorLog /var/log/apache2/<%= @name %>-error.log
12
13   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
14 </VirtualHost>
15 <% @domains.each do |domain| -%>
16
17 <VirtualHost *:443>
18   ServerName mta-sts.<%= domain %>
19   ServerAdmin webmaster@openstreetmap.org
20
21   SSLEngine on
22   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
23   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
24
25   CustomLog /var/log/apache2/<%= @name %>-access.log combined
26   ErrorLog /var/log/apache2/<%= @name %>-error.log
27
28   Alias /.well-known/mta-sts.txt <%= @directory %>/<%= domain %>.txt
29 </VirtualHost>
30 <% end -%>
31
32 <Directory <%= @directory %>>
33   Require all granted
34 </Directory>