]> git.openstreetmap.org Git - chef.git/commitdiff
Use cgimap for multi object fetches
authorTom Hughes <tom@compton.nu>
Wed, 9 Oct 2013 18:03:01 +0000 (19:03 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 9 Oct 2013 18:09:21 +0000 (19:09 +0100)
cookbooks/web/recipes/backend.rb
cookbooks/web/templates/default/apache.backend.erb

index fa13948d876a8c1ce39875df72f17fffa52d11be..ed80fd21d3852325114067ec6385723ff00f3594 100644 (file)
@@ -23,6 +23,7 @@ include_recipe "web::cgimap"
 
 apache_module "fastcgi-handler"
 apache_module "remoteip"
+apache_module "rewrite"
 
 apache_site "default" do
   action [ :disable ]
index 17200cab9f3d5a80029c77878c6c595e277abb8b..5cd50fb441ff7d9c513fb9bbc3e9a4b4318d85bf 100644 (file)
   CustomLog /var/log/apache2/access.log combined_with_time
   ErrorLog /var/log/apache2/error.log
 
+  #
+  # Turn on the rewrite engine
+  #
+  RewriteEngine on
+
   #
   # Configure rails
   #
@@ -31,9 +36,8 @@
   RemoteIPTrustedProxy 146.179.159.160/27
 
   #
-  # Pass map calls to cgimap
+  # Pass supported calls to cgimap
   #
-  <Location /api/0.6/map>
-    SetHandler fcgi:127.0.0.1:8000
-  </Location>
+  RewriteRule ^/api/0\.6/map$ - [H=fcgi:127.0.0.1:8000]
+  RewriteRule ^/api/0\.6/(nodes|ways|relations)$ - [H=fcgi:127.0.0.1:8000]
 </VirtualHost>