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/<%= node[:fqdn] %>.pem
17 SSLCertificateKeyFile /etc/ssl/private/<%= node[:fqdn] %>.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|details)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
66 ServerName <%= node[:fqdn] %>
67 ServerAlias nominatim.openstreetmap.org
68 ServerAlias nominatim.osm.org
69 ServerAlias nominatim.openstreetmap.com
70 ServerAlias nominatim.openstreetmap.net
71 ServerAlias nominatim.openstreetmaps.org
72 ServerAlias nominatim.openmaps.org
73 ServerAdmin webmaster@openstreetmap.org
75 CustomLog <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log combined
76 ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
81 Include <%= @directory %>/settings/apache_blocks.conf
83 RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
85 RewriteCond %{REQUEST_URI} !^/server-status$
86 RewriteRule ^(.*)$ https://nominatim.openstreetmap.org$1 [L,NE,R=permanent]