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