]> git.openstreetmap.org Git - chef.git/blob - cookbooks/taginfo/templates/default/apache.erb
Convert planet references to use https
[chef.git] / cookbooks / taginfo / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:443>
4         ServerName <%= @name %>
5         ServerAdmin webmaster@openstreetmap.org
6
7         SSLEngine on
8         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
9         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
10
11         CustomLog /var/log/apache2/<%= @name %>-access.log combined
12         ErrorLog /var/log/apache2/<%= @name %>-error.log
13
14         DocumentRoot <%= @directory %>
15         RackEnv production
16         PassengerMinInstances 10
17         PassengerPreStart http://<%= @name %>/
18
19         CacheEnable disk /api
20         CacheEnable disk /embed
21         CacheStaleOnError off
22
23         <Location /api>
24                 Header setifempty Access-Control-Allow-Origin *
25         </Location>
26 </VirtualHost>
27
28 <VirtualHost *:80>
29         ServerName <%= @name %>
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>