【问题标题】:Browser error ssl_error_rx_record_too_long (Firefox) and ERR_SSL_PROTOCOL_ERROR (Chrome) [closed]浏览器错误 ssl_error_rx_record_too_long (Firefox) 和 ERR_SSL_PROTOCOL_ERROR (Chrome) [关闭]
【发布时间】:2014-09-24 06:36:44
【问题描述】:

在 apache2.4 中找不到 SSL 错误的解决方案。在我的本地主机上,它是 Ubuntu LAMP 堆栈,它似乎在几天前才停止工作.. http://example.com 有效,但不是 https://example.com

Firefox 给我ssl_error_rx_record_too_long,Chrome 给我ERR_SSL_PROTOCOL_ERROR

我已生成新证书,并将它们设置为正确的域,但仍然失败。

ServerAdmin 网站管理员@localhost 服务器名称 example.dev
ServerAlias www.example.dev
DocumentRoot /var/www/example.com

 SSLEngine On
 SSLCertificateFile /etc/apache2/ssl/apache.crt
 SSLCertificateKeyFile /etc/apache2/ssl/apache.key

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined

 Include /etc/apache2/rules.conf

虚拟主机>

这很奇怪,也有点沮丧,谢谢你的帮助。

编辑: 我查看了 access.log 并收到以下错误:

127.0.0.1 - - [31/​​Jul/2014:23:07:47 -0700] "\x16\x03" 400 0 "-" "-"
127.0.0.1 - - [31/​​Jul/2014:23:07:51 -0700] "\x16\x03\x01" 400 0 "-" "-"
127.0.0.1 - - [31/​​Jul/2014:23:07:51 -0700] "\x16\x03\x01" 400 0 "-" "-"
127.0.0.1 - - [31/​​Jul/2014:23:07:51 -0700] "\x16\x03\x01" 400 0 "-" "-"
127.0.0.1 - - [31/​​Jul/2014:23:07:51 -0700] "\x16\x03\x01" 400 0 "-" "-"
127.0.0.1 - - [31/​​Jul/2014:23:07:51 -0700] "\x16\x03" 400 0 "-" "-"

【问题讨论】:

  • "\x16\x03\x01" 是 SSL/TLS 握手的开始。这意味着,浏览器正在尝试使用 HTTPS(SSL 中的 HTTP),但服务器不希望在此端口上使用 HTTPS,只有普通的 HTTP(没有 SSL)。有关 SSL 部分中的配置错误的信息,请检查服务器的 error.log。

标签: ubuntu ssl apache2.4


【解决方案1】:

谢谢你的帮助,我终于把default:443改为example.dev:443了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-17
    • 2013-05-15
    • 2019-09-14
    • 2011-01-20
    • 2012-07-21
    • 2014-11-08
    • 2019-02-03
    相关资源
    最近更新 更多