【问题标题】:Error code: ssl_error_rx_record_too_long for https in nginx on ruby on rails application错误代码: ssl_error_rx_record_too_long for https in nginx on ruby​​ on rails application
【发布时间】:2013-12-14 06:12:36
【问题描述】:

我在我的应用程序中使用 rails 3.2 和 ruby​​ 1.9,必须在我的系统上以 https://welcome.com 之类的域名在 https 中运行应用程序。所以我通过为域名和 https 创建 ssl 证书来配置我的 nginx

ssl 的快照:

# HTTPS server
#
server {
    listen 443 ssl;
server_name welcome.com;

root html;
index index.html index.htm;

ssl on;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;

ssl_session_timeout 5m;
}

我可以通过致电welcome.com 和https://welcome.com 看到nginx 主页。无需运行 rails 应用程序

我的应用程序也在 443 端口成功运行,但在浏览器中查询后,如 https://welcome.com

Rails 终端显示错误:

 ERROR bad Request-Line `\x16\x03\x01\x00�\x01\x00\x00�\
 ERROR bad URI `._i\b8\x10�yA�^6�v�M|

在浏览器中抛出错误:

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

甚至尝试通过反复清除浏览器历史记录,但结果是一样的。

我不知道我做错了什么,有人可以帮助我吗?

我在创建证书时有什么错误吗?

【问题讨论】:

标签: ruby-on-rails ruby-on-rails-3 ssl nginx https


【解决方案1】:

你不能同时拥有listen 443 ssl; ssl on;,删除ssl on;这一行并重启nginx。

【讨论】:

    猜你喜欢
    • 2010-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-10
    • 2017-06-15
    • 2014-04-17
    相关资源
    最近更新 更多