]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dmca/templates/default/apache.erb
Configure the dmca form site on ridley
[chef.git] / cookbooks / dmca / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4   ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6   ServerAlias <%= alias_name %>
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   RedirectPermanent / https://<%= @name %>/
15 </VirtualHost>
16 <% unless @aliases.empty? -%>
17
18 <VirtualHost *:443>
19   ServerName <%= @aliases.first %>
20 <% @aliases.drop(1).each do |alias_name| -%>
21   ServerAlias <%= alias_name %>
22 <% end -%>
23   ServerAdmin webmaster@openstreetmap.org
24
25   SSLEngine on
26   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
27   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
28
29   CustomLog /var/log/apache2/<%= @name %>-access.log combined
30   ErrorLog /var/log/apache2/<%= @name %>-error.log
31
32   RedirectPermanent / https://<%= @name %>/
33 </VirtualHost>
34 <% end -%>
35
36 <VirtualHost *:443>
37   ServerName <%= @name %>
38   ServerAdmin webmaster@openstreetmap.org
39
40   SSLEngine on
41   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
42   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
43
44   CustomLog /var/log/apache2/<%= @name %>-access.log combined
45   ErrorLog /var/log/apache2/<%= @name %>-error.log
46
47   DocumentRoot <%= @directory %>/html
48
49   Options -Indexes
50 </VirtualHost>
51
52 <Directory <%= @directory %>/html>
53   Require all granted
54 </Directory>