简体   繁体   English

Cloudflare Rails SSL错误

[英]Cloudflare Rails SSL error

I had a fully working Rails app running on nginx in a ubuntu server. 我在ubuntu服务器上的nginx上运行了一个完全正常工作的Rails应用程序。 I added Cloudflare on my app. 我在我的应用上添加了Cloudflare。 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. 我还注意到,当它重定向到错误页面时,DNS成为URL上的IP地址,然后是相应的目录。

I am at a loss on where to look next. 我不知道接下来要去哪儿。

In addition, when I view site information on the URL, it says 此外,当我查看有关URL的网站信息时,它说

The identity of this website has not been verified.

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. 这是因为您网站的Nginx配置没有启用任何密码套件,CloudFlare可以使用这些密码套件连接到您的网站。 This will also likely mean your SSL configuration isn't secure. 这也可能意味着您的SSL配置不安全。

You should make your SSL configuration inline with that of CloudFlare, fortunately CloudFlare publish the ciphers they use in their Nginx configuration. 您应该使您的SSL配置与CloudFlare一致,幸运的是CloudFlare发布了他们在Nginx配置中使用的密码。 Simply add this to your Nginx SSL configuration, removing properties with the same name: 只需将其添加到您的Nginx SSL配置中,删除具有相同名称的属性:

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;

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

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