1 # DO NOT EDIT - This file is being maintained by Chef
3 <% [80, 443].each do |port| -%>
4 <VirtualHost *:<%= port %>>
5 ServerName nominatim.openstreetmap.org
6 ServerAdmin webmaster@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
20 CustomLog /var/log/apache2/nominatim.openstreetmap.org-access.log combined
21 ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
23 DocumentRoot <%= @directory %>/website
24 <Directory "<%= @directory %>/website/">
25 DirectoryIndex search.php
26 Options MultiViews FollowSymLinks
27 AddType text/html .php
28 AddType application/xml .phpx
29 AddType application/json .phpj
30 AddHandler fcgi:/var/run/php5-fpm-www.sock .php
31 AddHandler fcgi:/var/run/php5-fpm-www.sock .phpx
32 AddHandler fcgi:/var/run/php5-fpm-www.sock .phpj
35 <% @pools.each do |name,details| -%>
36 Alias /pool-<%= name %>/ "<%= @directory %>/website/"
37 <Location /pool-<%= name %>>
38 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .php
39 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpx
40 AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpj
44 Redirect 420 /pool-block/
45 ErrorDocument 420 /509.html
46 <Location /pool-block>
47 ErrorDocument 420 /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 ^/([sdr].*) /pool-${bulklist:%{REMOTE_ADDR}|www}/$1 [PT]