簡體   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