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 %>
33 RewriteMap totp prg:/srv/query.openstreetmap.org/apache/totp-filter
34 RewriteCond ${totp:%{HTTP_COOKIE}} =0
35 RewriteRule ^/query-features - [F,L]
37 <% if node[:overpass][:restricted_api] -%>
38 ScriptAlias /query-features <%= @script_directory %>/interpreter
39 SetEnvIf Origin "http.*(osm.org|openstreetmap.org).*" AccessControlAllowOrigin=$0
40 # Remove Origin so Overpass does not interfere.
41 RequestHeader unset Origin
42 Header always add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
43 Header always add Access-Control-Allow-Credentials true
45 ScriptAlias /api/ <%= @script_directory %>/
49 <Directory "<%= @directory %>">
53 <Directory "<%= @script_directory %>">
54 SetOutputFilter DEFLATE
57 Options +ExecCGI -MultiViews +FollowSymLinks