title: Rails SSL issue: (https://example.com) didn't match request.base_url (http://example.com)
body: <p>I just installed an SSL certificate on my site. Unfortunately it has broken the login functionality. After submitting the login form on the site it just redirects to the home page. Checking the rails log shows this error:</p>
  
  <pre><code>(https://example.com) didn't match request.base_url (http://example.com)
  </code></pre>
  
  <p>Here is my virtualhosts file. I guess I need to force SSL somehow?</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     ServerName example.com
     ServerAlias www.example.com
     Redirect permanent / https://example.com/
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost *:443&gt;
     ServerAdmin hello@example.com
     ServerName example.com
     ServerAlias www.example.com
     SSLEngine on
     SSLCertificateFile /home/user/sharetribe/lib/certificates/www_example_com.crt
     SSLCertificateKeyFile /home/user/sharetribe/lib/certificates/example.com.key
     SSLCertificateChainFile /home/user/sharetribe/lib/certificates/www_example_com.ca-bundle
  
     ProxyRequests Off
     &lt;Proxy *&gt;
        Order deny,allow
        Allow from all
     &lt;/Proxy&gt;
     ProxyPass / http://localhost:3000/
     ProxyPassReverse / http://localhost:3000/
  &lt;/VirtualHost&gt;
  </code></pre>