]> git.openstreetmap.org Git - chef.git/commitdiff
redirect reverse geocoding traffic to poldi
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 18 Jun 2015 21:14:17 +0000 (23:14 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 18 Jun 2015 21:14:17 +0000 (23:14 +0200)
cookbooks/nominatim/recipes/base.rb
cookbooks/nominatim/templates/default/apache.erb
roles/pummelzacken.rb

index 9dd0f1c1fcfd80d7bee959c9dc0f8cb865251794..69b5db1aec294612c399263c313d793021664627 100644 (file)
@@ -31,6 +31,7 @@ package "php-apc"
 apache_module "rewrite"
 apache_module "proxy"
 apache_module "proxy_fcgi"
+apache_module "proxy_http"
 
 home_directory = data_bag_item("accounts", "nominatim")["home"]
 source_directory = "#{home_directory}/nominatim"
index 230063643a46ebb815906796550cc1225ca27f6b..fb6acc76cdc9af0bdd69cc241fea7981ef4fea85 100644 (file)
@@ -32,6 +32,9 @@
 
     <% @pools.each do |name,details| -%>
     Alias /pool-<%= name %>/ "<%= @directory %>/website/"
+    <% node[:nominatim][:redirects].each do |url,host| -%>
+    ProxyPassMatch ^/pool-<%= name %>/(<%= url %>\.php(/.*)?) http<%= if port == 443 %>s<%= end %>://<%= host %>/pool-<%= name %>/$1
+    <% end -%>
     ProxyPassMatch ^/pool-<%= name %>/(.*\.php(/.*)?) fcgi://127.0.0.1:<%= details[:port ]%><%= @directory %>/website/$1
     <% end -%>
 
index 68eaefb133ba77a80a295c10f5bdeda94bc3226b..df54c29ec6c85d0fdf4c39f16a7afdb3720d0d5a 100644 (file)
@@ -49,6 +49,9 @@ default_attributes(
         :pm => "static",
         :max_children => "10"
       }
+    },
+    :redirects => {
+      :reverse => "poldi.openstreetmap.org"
     }
   }
 )