SSL安装后,在生产模式下显示Rails开发风格的错误

3

在我安装了SSL证书之后,生产环境中显示了扩展的开发样式错误(而不是简单的“出了点问题”)。 我使用Apache和Varnish,以及Apache作为Varnish前端的SSL终止器。这是我的虚拟主机文件:

<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>
1个回答

1

这里提供的解决方法有所帮助。虽然仍不明白问题出在哪里。

在初始化器中:

class ActionDispatch::Request
  def local?
   false
  end
end

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接