]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.frontend.erb
Log SSL protocol and cipher details for web requests
[chef.git] / cookbooks / web / templates / default / apache.frontend.erb
index d82b7e1da951b3dc0f7cc3f8e4bbe61f1f9fc822..6525d1abe6a4bdb56594e824308239864ef6c272 100644 (file)
@@ -20,7 +20,7 @@
   #
   # Setup logging
   #
-  LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Ts" combined_with_time
+  LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Ts %{SSL_PROTOCOL}x %{SSL_CIPHER}x" combined_with_time
   CustomLog /var/log/apache2/access.log combined_with_time
   ErrorLog /var/log/apache2/error.log
 
   ExpiresActive On
   RewriteEngine on
 
+  #
+  # Add the unique ID to the request headers
+  #
+  RequestHeader set X-Request-Id %{UNIQUE_ID}e
+
   #
   # Block troublesome GPX data scrapping
   #
   RailsEnv production
   PassengerMinInstances 10
   PassengerMaxRequests 5000
+  PassengerMaxRequestQueueSize 250
+<% if port == 443 -%>
+  PassengerPreStart https://www.openstreetmap.org/
+<% else -%>
   PassengerPreStart http://www.openstreetmap.org/
+<% end -%>
   SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
-  Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/images/favicon.ico
+  Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/favicons/favicon.ico
   Alias /openlayers <%= node[:web][:base_directory] %>/rails/vendor/assets/openlayers
   Alias /stats /store/rails/stats
   Alias /user/image /store/rails/user/image
   #
   <Proxy balancer://backend>
     ProxySet lbmethod=bybusyness
+<% if port == 443 -%>
+    BalancerMember https://rails1 disablereuse=on
+    BalancerMember https://rails2 disablereuse=on
+    BalancerMember https://rails3 disablereuse=on
+<% else -%>
     BalancerMember http://rails1
     BalancerMember http://rails2
     BalancerMember http://rails3
+<% end -%>
   </Proxy>
 <% if port == 80 -%>
 
   RedirectPermanent /events.ics http://calendar.openstreetmap.org.uk/events.ics
   RedirectPermanent / http://www.openstreetmap.org/
 </VirtualHost>
-<% if node[:lsb][:release].to_f >= 14.04 -%>
 
 <Directory <%= node[:web][:base_directory] %>/rails/public>
   Require all granted
 <Directory /store/rails/attachments>
   Require all granted
 </Directory>
-<% end -%>