]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/apache.erb
nominatim: only redirect traffic for www pool
[chef.git] / cookbooks / nominatim / templates / default / apache.erb
index c71106d08324ab56cacd83e527b8d2397144af6b..517967f09fbc126daa8e1ce2ba459bf36576879c 100644 (file)
 
     <% @pools.each do |name,details| -%>
     Alias /pool-<%= name %>/ "<%= @directory %>/website/"
+    <% end -%>
     <% node[:nominatim][:redirects].each do |url,host| -%>
-    ProxyPassMatch ^/pool-<%= name %>/(<%= url %>\.php(/.*)?) http<% if port == 443 -%>s<% end -%>://<%= host %>/pool-<%= name %>/$1
+    ProxyPassMatch ^/pool-www/(<%= url %>\.php(/.*)?) http<% if port == 443 -%>s<% end -%>://<%= host %>/pool-www/$1
     <% end -%>
+    <% @pools.each do |name,details| -%>
     ProxyPassMatch ^/pool-<%= name %>/(.*\.php(/.*)?) fcgi://127.0.0.1:<%= details[:port ]%><%= @directory %>/website/$1
     <% end -%>
 
@@ -57,7 +59,7 @@
 
     # regular requests and autoblocks
     RewriteMap bulklist txt:<%= @directory %>/settings/ip_blocks.map
-    RewriteRule ^/(search|reverse|details)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
+    RewriteRule ^/(search|reverse|details|lookup)(\.php)?(/.*)? /pool-${bulklist:%{REMOTE_ADDR}|www}/$1.php$3 [PT]
 
 </VirtualHost>