]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/templates/default/apache.rails.erb
e431cf1a1cb49d1a84fc6fc73f1e630bb1e73fc4
[chef.git] / cookbooks / dev / templates / default / apache.rails.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:443>
4         ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6         ServerAlias <%= alias_name %>
7 <% end -%>
8         ServerAdmin webmaster@openstreetmap.org
9
10         SSLEngine on
11         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
12         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
13
14         CustomLog /var/log/apache2/<%= @name %>-access.log combined
15         ErrorLog /var/log/apache2/<%= @name %>-error.log
16
17         DocumentRoot /srv/<%= @name %>/public
18
19         RailsEnv production
20
21         SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
22
23         # Ensure robots do not index dev site
24         # https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
25         Header set X-Robots-Tag "noindex, nofollow"
26 </VirtualHost>
27
28 <VirtualHost *:80>
29         ServerName <%= @name %>
30 <% @aliases.each do |alias_name| -%>
31         ServerAlias <%= alias_name %>
32 <% end -%>
33         ServerAdmin webmaster@openstreetmap.org
34
35         CustomLog /var/log/apache2/<%= @name %>-access.log combined
36         ErrorLog /var/log/apache2/<%= @name %>-error.log
37
38         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
39         RedirectPermanent / https://<%= @name %>/
40
41         # Ensure robots do not index dev site
42         # https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
43         Header set X-Robots-Tag "noindex, nofollow"
44 </VirtualHost>
45
46 <Directory /srv/<%= @name %>/public>
47         Require all granted
48 </Directory>
49
50 <Directory /srv/<%= @name %>/app/assets>
51         Require all granted
52 </Directory>
53
54 <Directory /srv/<%= @name %>/vendor/assets>
55         Require all granted
56 </Directory>