]> git.openstreetmap.org Git - chef.git/blob - cookbooks/switch2osm/templates/default/apache.erb
Merge remote-tracking branch 'github/pull/422'
[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
19    ErrorDocument 404 /404.html
20
21    ExpiresActive On
22    ExpiresDefault "access plus 10 minutes"
23 </VirtualHost>
24
25 <VirtualHost *:80>
26    ServerName <%= @name %>
27    ServerAlias www.switch2osm.org
28    ServerAlias switch2osm.com
29    ServerAlias www.switch2osm.com
30    ServerAdmin webmaster@openstreetmap.org
31
32    CustomLog /var/log/apache2/<%= @name %>-access.log combined
33    ErrorLog /var/log/apache2/<%= @name %>-error.log
34
35    RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
36    RedirectPermanent / https://<%= @name %>/
37 </VirtualHost>
38
39 <Directory <%= @directory %>>
40    Require all granted
41 </Directory>