]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/templates/default/apache.backend.erb
Log SSL protocol and cipher details for web requests
[chef.git] / cookbooks / web / templates / default / apache.backend.erb
index cbe37f048e3fab893f156187c54cdd68bed00726..ea96d205f87baf882cd7c8b05ee0ceacb46ba7e7 100644 (file)
@@ -19,7 +19,7 @@
   #
   # Setup logging
   #
-  LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %Ts" combined_with_time
+  LogFormat "%a %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
 
   #
   RewriteEngine on
 
+  #
+  # Recover the unique ID from the request headers
+  #
+  SetEnvIf X-Request-Id ^(.*)$ UNIQUE_ID=$1
+
   #
   # Configure rails
   #
   RailsEnv production
   PassengerMinInstances 3
   PassengerMaxRequests 500
+<% if port == 443 -%>
+  PassengerPreStart https://www.openstreetmap.org/
+<% else -%>
   PassengerPreStart http://www.openstreetmap.org/
+<% end -%>
   SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
 
   #