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