1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName <%= node[:fqdn] %>
5 ServerAlias <%= node[:overpass][:fqdn] %>
6 ServerAdmin webmaster@openstreetmap.org
8 CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined
9 ErrorLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-error.log
11 DocumentRoot <%= @directory %>
13 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
14 RedirectPermanent / https://<%= @name %>/
19 ServerName <%= node[:fqdn] %>
20 ServerAlias <%= node[:overpass][:fqdn] %>
21 ServerAdmin webmaster@openstreetmap.org
23 CustomLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-access.log combined
24 ErrorLog /var/log/apache2/<%= node[:overpass][:fqdn] %>-error.log
27 SSLCertificateFile /etc/ssl/certs/<%= node[:fqdn] %>.pem
28 SSLCertificateKeyFile /etc/ssl/private/<%= node[:fqdn] %>.key
30 DocumentRoot <%= @directory %>
32 RewriteMap totp prg:/srv/query.openstreetmap.org/apache/totp-filter
33 RewriteCond "${totp:%{HTTP_COOKIE}}" "0"
34 RewriteRule ^.*$ - [F,L]
36 <% if node[:overpass][:restricted_api] -%>
37 ScriptAlias /query-features <%= @script_directory %>/interpreter
38 SetEnvIf Origin "http.*(osm.org|openstreetmap.org).*" AccessControlAllowOrigin=$0
39 # Remove Origin so Overpass does not interfere.
40 RequestHeader unset Origin
41 Header always add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
43 ScriptAlias /api/ <%= @script_directory %>/
47 <Directory "<%= @directory %>">
51 <Directory "<%= @script_directory %>">
52 SetOutputFilter DEFLATE
55 Options +ExecCGI -MultiViews +FollowSymLinks