1 # DO NOT EDIT - This file is being maintained by Chef
3 <% [80, 443].each do |port| -%>
4 <VirtualHost *:<%= port %>>
5 ServerName <%= node[:fqdn] %>
6 ServerAlias nominatim.openstreetmap.org
7 ServerAlias nominatim.osm.org
8 ServerAlias nominatim.openstreetmap.org
9 ServerAlias nominatim.openstreetmap.net
10 ServerAlias nominatim.openstreetmaps.org
11 ServerAlias nominatim.openmaps.org
12 ServerAdmin webmaster@openstreetmap.org
21 CustomLog /var/log/apache2/nominatim.openstreetmap.org-access.log combined
22 ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
24 DocumentRoot <%= @directory %>/website
25 <Directory "<%= @directory %>/website/">
26 DirectoryIndex search.php
27 Options MultiViews FollowSymLinks
28 AddType text/html .php
29 AddType application/xml .phpx
30 AddType application/json .phpj
31 <% if node[:lsb][:release].to_f >= 14.04 -%>
37 <% if node[:lsb][:release].to_f >= 14.04 -%>
38 ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/
39 ProxyPassMatch ^/(.*\.phpx(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/
40 ProxyPassMatch ^/(.*\.phpj(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/
42 AddHandler fcgi:/var/run/php5-fpm-www.sock .php
43 AddHandler fcgi:/var/run/php5-fpm-www.sock .phpx
44 AddHandler fcgi:/var/run/php5-fpm-www.sock .phpj
48 <% @pools.each do |name,details| -%>
49 Alias /pool-<%= name %>/ "<%= @directory %>/website/"
50 <Location /pool-<%= name %>>
51 <% if node[:lsb][:release].to_f >= 14.04 -%>
52 ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/
53 ProxyPassMatch ^/(.*\.phpx(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/
54 ProxyPassMatch ^/(.*\.phpj(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/
56 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .php
57 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpx
58 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpj
63 Redirect 420 /pool-block/
64 ErrorDocument 420 /509.html
65 <Location /pool-block>
66 ErrorDocument 420 /509.html
68 Redirect 403 /pool-ban/
70 ErrorDocument 403 /403.html
72 ErrorDocument 403 /403.html
77 Include <%= @directory %>/settings/apache_blocks.conf
79 # regular requests and autoblocks
80 RewriteMap bulklist txt:<%= @directory %>/settings/ip_blocks.map
81 RewriteRule ^/([sdr].*) /pool-${bulklist:%{REMOTE_ADDR}|www}/$1 [PT]