1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6 ServerAlias <%= alias_name %>
8 ServerAdmin webmaster@openstreetmap.org
11 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
12 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
14 CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
15 ErrorLog /var/log/apache2/<%= @name %>-error.log
17 DocumentRoot /srv/<%= @name %>/rails/public
20 PassengerAppGroupName <%= @application_name %>
22 SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
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"
28 # Force special MIME type for crossdomain.xml files
29 <Files crossdomain.xml>
30 ForceType text/x-cross-domain-policy
32 <% if @cgimap_enabled -%>
34 # Pass authentication related headers to cgimap
39 # Set a long timeout for proxying to cgimap
42 # Pass supported calls to cgimap
44 RewriteRule ^/api/0\.6/map(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
45 RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
46 RewriteRule ^/api/0\.6/(node|way|relation|changeset)/[0-9]+(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
47 RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+/history(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
48 RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+/relations(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
49 RewriteRule ^/api/0\.6/node/[0-9]+/ways(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
50 RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
51 RewriteRule ^/api/0\.6/(nodes|ways|relations)(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
52 RewriteRule ^/api/0\.6/changeset/[0-9]+/(upload|download)(\.json|\.xml)?$ unix:<%= @cgimap_socket %>|fcgi://127.0.0.1$0 [P]
57 ServerName <%= @name %>
58 <% @aliases.each do |alias_name| -%>
59 ServerAlias <%= alias_name %>
61 ServerAdmin webmaster@openstreetmap.org
63 CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
64 ErrorLog /var/log/apache2/<%= @name %>-error.log
66 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
67 RedirectPermanent / https://<%= @name %>/
69 # Ensure robots do not index dev site
70 # https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
71 Header set X-Robots-Tag "noindex, nofollow"
74 <Directory /srv/<%= @name %>/rails/public>
78 <Directory /srv/<%= @name %>/rails/app/assets>
82 <Directory /srv/<%= @name %>/rails/vendor/assets>