]> git.openstreetmap.org Git - chef.git/blob - cookbooks/switch2osm/templates/default/apache.erb
switch2osm: add 404 handler page
[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 </VirtualHost>
21
22 <VirtualHost *:80>
23    ServerName <%= @name %>
24    ServerAlias www.switch2osm.org
25    ServerAlias switch2osm.com
26    ServerAlias www.switch2osm.com
27    ServerAdmin webmaster@openstreetmap.org
28
29    CustomLog /var/log/apache2/<%= @name %>-access.log combined
30    ErrorLog /var/log/apache2/<%= @name %>-error.log
31
32    RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
33    RedirectPermanent / https://<%= @name %>/
34 </VirtualHost>
35
36 <Directory <%= @directory %>>
37    Require all granted
38 </Directory>