]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.frontend.erb
Disable gpximport, statistics and cleanup roles on spike-04
[chef.git] / cookbooks / web / templates / default / apache.frontend.erb
index 0989ea791c71cb147d51e59e9497288ba7f26c4d..71d840c34b6cc5a35099fd3d5da4edf40d9c3451 100644 (file)
   RewriteCond %{HTTP_USER_AGENT} tilesAtHome
   RewriteRule . - [F,L]
 
+  #
+  # Block changeset scraper
+  #
+  RewriteCond %{HTTP_USER_AGENT} "OSMApp Tuner"
+  RewriteRule . - [F,L]  
+
   #
   # Block requests for the old 404 map tile
   #
   # Allow all proxy requests
   #
   <Proxy *>
-    Allow from all
+    Require all granted
   </Proxy>
 
   #
   #
   <Proxy balancer://backend>
     ProxySet lbmethod=bybusyness
+<% node[:web][:backends].each do |backend| -%>
 <% if port == 443 -%>
-    BalancerMember https://rails1 disablereuse=on
-    BalancerMember https://rails2 disablereuse=on
-    BalancerMember https://rails3 disablereuse=on
+    BalancerMember https://<%= backend %> disablereuse=on
 <% else -%>
-    BalancerMember http://rails1
-    BalancerMember http://rails2
-    BalancerMember http://rails3
+    BalancerMember http://<%= backend %>
+<% end -%>
 <% end -%>
   </Proxy>
 <% if port == 80 -%>