1 # DO NOT EDIT - This file is being maintained by Chef
 
   5   # Basic server configuration
 
   7   ServerName <%= node[:fqdn] %>
 
   8   ServerAlias api.openstreetmap.org www.openstreetmap.org
 
   9   ServerAdmin webmaster@openstreetmap.org
 
  14   LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Ts" combined_with_time
 
  15   CustomLog /var/log/apache2/access.log combined_with_time
 
  16   ErrorLog /var/log/apache2/error.log
 
  19   # Turn on the rewrite engine
 
  26   DocumentRoot <%= node[:web][:base_directory] %>/rails/public
 
  28   PassengerMinInstances 3
 
  29   PassengerMaxRequests 500
 
  30   PassengerPreStart http://www.openstreetmap.org/
 
  33   # Get the real remote IP for requests via a trusted proxy
 
  35   RemoteIPHeader X-Forwarded-For
 
  36   RemoteIPTrustedProxy 146.179.159.160/27
 
  39   # Pass supported calls to cgimap
 
  41   RewriteRule ^/api/0\.6/map$ - [H=fcgi:127.0.0.1:8000]
 
  42   RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$
 
  43   RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+$ - [H=fcgi:127.0.0.1:8000]
 
  44   RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full$ - [H=fcgi:127.0.0.1:8000]
 
  45   RewriteRule ^/api/0\.6/(nodes|ways|relations)$ - [H=fcgi:127.0.0.1:8000]