]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.frontend.erb
Update configuration for move from Imperial to Amsterdam
[chef.git] / cookbooks / web / templates / default / apache.frontend.erb
index 326418d8df8ed60ff0566da7e9f2d896337d40d9..6cbf8641808b4b6d9085e691091ac2d12b47e1c5 100644 (file)
   PassengerMaxRequests 5000
   PassengerMaxRequestQueueSize 250
   PassengerPreStart https://www.openstreetmap.org/
+  PassengerAppGroupName rails
   SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
   Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/favicons/favicon.ico
   Alias /openlayers <%= node[:web][:base_directory] %>/rails/vendor/assets/openlayers
   ProxyPass /api/0.6/amf/read balancer://backend/api/0.6/amf/read
   ProxyPass /api/0.6/swf/trackpoints balancer://backend/api/0.6/swf/trackpoints
   ProxyPassMatch ^(/api/0\.6/changeset/[0-9]+)$ balancer://backend$1
-  ProxyPassMatch ^(/api/0\.6/changeset/[0-9]+/upload)$ balancer://ic$1
+  ProxyPassMatch ^(/api/0\.6/changeset/[0-9]+/upload)$ balancer://bytemark$1
   ProxyPassMatch ^(/api/0\.6/changeset/[0-9]+/download)$ balancer://backend$1
   ProxyPassMatch ^(/api/0\.6/(node|way|relation)/[0-9]+)$ balancer://backend$1
   ProxyPassMatch ^(/api/0\.6/(node|way|relation)/[0-9]+/(full|history|search|ways))$ balancer://backend$1
   #
   # Define a load balancer for the IC backends
   #
-  <Proxy balancer://ic>
+  <Proxy balancer://ams>
     ProxySet lbmethod=bybusyness
-<% ["rails1.ic", "rails2.ic", "rails3.ic"].each do |backend| -%>
+<% ["rails1.ams", "rails2.ams", "rails3.ams"].each do |backend| -%>
+    BalancerMember https://<%= backend %> disablereuse=on
+<% end -%>
+  </Proxy>
+
+  #
+  # Define a load balancer for the Bytemark backends
+  #
+  <Proxy balancer://bytemark>
+    ProxySet lbmethod=bybusyness
+<% ["rails4.bm", "rails5.bm"].each do |backend| -%>
     BalancerMember https://<%= backend %> disablereuse=on
 <% end -%>
   </Proxy>
   RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
 
   RewriteCond %{REQUEST_URI} !^/server-status$
-  RewriteRule ^(.*)$ https://www.openstreetmap.org$1 [L,NE,R=permanent]
+  RewriteRule ^(.*)$ https://openstreetmap.org$1 [L,NE,R=permanent]
 </VirtualHost>
 
 <VirtualHost *:443>