title: How do I get Rails, SSL and Apache to play nice?
body: <p>Trying to get my Rails app submitting some sensitive form data with SSL and not having too much luck. The basic problem is that once I submit a form (this is on a POST request), it just hangs for a minute and then says the server is not responding. </p>
  
  <p>Here's what I'm working with:</p>
  
  <p>Apache 2.2.3
  Rails 2.3.8
  RedHat Linux (Rackspace server)</p>
  
  <p>Using the <strong>ssl_requirement</strong> plugin as follows:</p>
  
  <p>ApplicationController:</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    include SslRequirement
    helper :all # include all helpers, all the time
    protect_from_forgery # See ActionController::RequestForgeryProtection for details
  
    # Scrub sensitive parameters from your log
    filter_parameter_logging :password
  end
  </code></pre>
  
  <p>Controller I want to use SSL on an Action:</p>
  
  <pre><code>class RegistrationsController &lt; ApplicationController
    ssl_required :create
    ...
  end
  </code></pre>
  
  <p>My httpd.conf includes this line to grab ssl.conf:</p>
  
  <pre><code>Include conf.d/*.conf
  </code></pre>
  
  <p>And my SSL VHost (in the conf.d/ssl.conf file) looks like this:</p>
  
  <pre><code>&lt;VirtualHost XXX.XXX.XXX.XXX:443&gt;
     ServerName www.nameofmyapp.com
     ServerAlias nameofmyapp.com
     DocumentRoot /var/www/apps/myapp/current/public
     RailsEnv production
     RequestHeader set X_FORWARDED_PROTO 'https'
     SSLEngine on
     SSLCertificateFile /etc/pki/tls/certs/2012-nameofmyapp.com.crt
     SSLCertificateKeyFile /etc/pki/tls/private/2012-nameofmyapp.com.key
     SSLCACertificateFile /etc/pki/tls/certs/SecureSite_Bundle.pem
  &lt;/VirtualHost&gt;
  </code></pre>