1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName <%= node[:fqdn] %>
5 ServerAlias nominatim.openstreetmap.org
6 ServerAlias nominatim.osm.org
7 ServerAlias nominatim.openstreetmap.com
8 ServerAlias nominatim.openstreetmap.net
9 ServerAlias nominatim.openstreetmaps.org
10 ServerAlias nominatim.openmaps.org
11 ServerAdmin webmaster@openstreetmap.org
16 SSLCertificateFile /etc/ssl/certs/nominatim.openstreetmap.org.pem
17 SSLCertificateKeyFile /etc/ssl/private/nominatim.openstreetmap.org.key
19 # Remove Proxy request header to mitigate https://httpoxy.org/
20 RequestHeader unset Proxy early
22 RequestReadTimeout header=15-30,MinRate=500 body=15-30,MinRate=500
24 CustomLog <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log combined
25 ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
27 DocumentRoot <%= @directory %>/website
28 <Directory "<%= @directory %>/website/">
29 DirectoryIndex search.php
30 Options FollowSymLinks
34 ProxyPassMatch ^/([^/]*\.php(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%><%= @directory %>/website/$1
36 <% @pools.each do |name,details| -%>
37 Alias /pool-<%= name %>/ "<%= @directory %>/website/"
38 <% node[:nominatim][:redirects].each do |url,host| -%>
39 ProxyPassMatch ^/pool-<%= name %>/(<%= url %>\.php(/.*)?) http<% if port == 443 -%>s<% end -%>://<%= host %>/pool-<%= name %>/$1
41 ProxyPassMatch ^/pool-<%= name %>/(.*\.php(/.*)?) fcgi://127.0.0.1:<%= details[:port ]%><%= @directory %>/website/$1
44 Redirect 429 /pool-block/
45 ErrorDocument 429 /509.html
46 <Location /pool-block>
47 ErrorDocument 429 /509.html
49 Redirect 403 /pool-ban/
51 ErrorDocument 403 /403.html
53 ErrorDocument 403 /403.html
58 Include <%= @directory %>/settings/apache_blocks.conf
60 # regular requests and autoblocks
61 RewriteMap bulklist txt:<%= @directory %>/settings/ip_blocks.map
62 RewriteRule ^/(search|reverse|lookup)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
63 RewriteRule ^/details(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|details}/details.php$2 [PT]
67 ServerName <%= node[:fqdn] %>
68 ServerAlias nominatim.openstreetmap.org
69 ServerAlias nominatim.osm.org
70 ServerAlias nominatim.openstreetmap.com
71 ServerAlias nominatim.openstreetmap.net
72 ServerAlias nominatim.openstreetmaps.org
73 ServerAlias nominatim.openmaps.org
74 ServerAdmin webmaster@openstreetmap.org
76 CustomLog <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log combined
77 ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
82 Include <%= @directory %>/settings/apache_blocks.conf
84 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
85 RedirectPermanent / https://nominatim.openstreetmap.org/