Question

After I installed SSL-certificate, I see extended development-style errors in production (instead of simple "something went wrong"). I use Apache and Varnish and Apache as SSL terminator in front of Varnish. This is my virtual host file:

<VirtualHost *:443>
   ServerName my.domain
   ServerAlias www.my.domain
   SSLEngine On
   SSLProtocol all -SSLv2
   SSLCertificateFile /path/mydomain.crt
   SSLCertificateKeyFile /path/mydomain.key
   SSLCertificateChainFile /path/mydomain.ca-bundle

   ProxyRequests       Off
   ProxyPreserveHost On
   ProxyPass           /       http://localhost:80/
   ProxyPassReverse    /       http://localhost:80/
   RequestHeader set X-Forwarded-Proto 'https'
   SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
   SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

   DocumentRoot /path/to/public
   <Directory /path/to/public>
      Allow from all
      Options -MultiViews
   </Directory>
 </VirtualHost>
Was it helpful?

Solution

A workaround suggested here helped. Still don't understand what's the matter, though.

In an initializer:

class ActionDispatch::Request
  def local?
   false
  end
end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top