繁体   English   中英

在安装SSL后,在生产模式中显示Rails开发样式错误

[英]Rails development-style errors showing in production mode after SSL installation

安装SSL证书后,我看到生产中出现了扩展的开发风格错误(而不是简单的“出错”)。 我在Varnish面前使用Apache和Varnish以及Apache作为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>

这里建议的解决方法有所帮助。 但是仍然不明白这是怎么回事。

在初始化程序中:

class ActionDispatch::Request
  def local?
   false
  end
end

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM