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 <% if node[:overpass][:restricted_api] -%>
33 ScriptAlias /query-features <%= @script_directory %>/interpreter
34 SetEnvIf Origin "http.*(osm.org|openstreetmap.org).*" AccessControlAllowOrigin=$0
35 # Remove Origin so Overpass does not interfere.
36 RequestHeader unset Origin
37 Header always add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
39 ScriptAlias /api/ <%= @script_directory %>/
43 <Directory "<%= @directory %>">
47 <Directory "<%= @script_directory %>">
48 SetOutputFilter DEFLATE
51 Options +ExecCGI -MultiViews +FollowSymLinks