]> git.openstreetmap.org Git - chef.git/blob - cookbooks/dev/templates/default/apache.rails.erb
c8f5f779d52d4a3e9170269a1dea3f6266b17181
[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         PassengerAppGroupName <%= @application_name %>
21
22         SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
23
24         # Ensure robots do not index dev site
25         # https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
26         Header set X-Robots-Tag "noindex, nofollow"
27
28         # Force special MIME type for crossdomain.xml files
29         <Files crossdomain.xml>
30                 ForceType text/x-cross-domain-policy
31         </Files>
32 </VirtualHost>
33
34 <VirtualHost *:80>
35         ServerName <%= @name %>
36 <% @aliases.each do |alias_name| -%>
37         ServerAlias <%= alias_name %>
38 <% end -%>
39         ServerAdmin webmaster@openstreetmap.org
40
41         CustomLog /var/log/apache2/<%= @name %>-access.log combined
42         ErrorLog /var/log/apache2/<%= @name %>-error.log
43
44         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
45         RedirectPermanent / https://<%= @name %>/
46
47         # Ensure robots do not index dev site
48         # https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
49         Header set X-Robots-Tag "noindex, nofollow"
50 </VirtualHost>
51
52 <Directory /srv/<%= @name %>/public>
53         Require all granted
54 </Directory>
55
56 <Directory /srv/<%= @name %>/app/assets>
57         Require all granted
58 </Directory>
59
60 <Directory /srv/<%= @name %>/vendor/assets>
61         Require all granted
62 </Directory>