]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/apache.erb
redirect reverse geocoding traffic to poldi
[chef.git] / cookbooks / nominatim / templates / default / apache.erb
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 -%>