Cloudflare Rails SSL error

天涯浪子 提交于 2019-12-12 11:17:06

问题


I had a fully working Rails app running on nginx in a ubuntu server. I added Cloudflare on my app. Then, I am getting this error on pages that require sign in:

SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR

My site is accessible from the landing page and other non-interactive static pages.

I also noticed that when it redirects to the error page, the DNS becomes the IP address on the URL, followed by the appropriate directory afterwards.

I am at a loss on where to look next.

In addition, when I view site information on the URL, it says

The identity of this website has not been verified.


回答1:


This is because the Nginx configuration of your site doesn't have any cipher suites enabled which CloudFlare can use to connect to your site. This will also likely mean your SSL configuration isn't secure.

You should make your SSL configuration inline with that of CloudFlare, fortunately CloudFlare publish the ciphers they use in their Nginx configuration. Simply add this to your Nginx SSL configuration, removing properties with the same name:

ssl_protocols               TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers                 EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers   on;


来源:https://stackoverflow.com/questions/25782409/cloudflare-rails-ssl-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!