【问题标题】:Not able to access HTTPS link. Getting ssl connection error?无法访问 HTTPS 链接。获取 ssl 连接错误?
【发布时间】:2014-04-04 11:20:31
【问题描述】:

因为我在我的 ubuntu linux 服务器中启用了 default-ssl 站点。当我用谷歌浏览器加载网站时,我收到了这个错误:

SSL 连接错误
无法与服务器建立安全连接。这可能是服务器的问题,或者可能需要您没有的客户端身份验证证书。
错误 107 (net::ERR_SSL_PROTOCOL_ERROR):SSL 协议错误。

使用火狐:

SSL 收到了超过最大允许长度的记录。
(错误代码:ssl_error_rx_record_too_long)

因为我检查了 apache2 的日志文件。其中说 suhosin-path mod_ssl

[Fri Apr 04 16:29:33 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 mod_perl/2.0.5 Perl/v5.14.2 configured -- resuming normal operations

仅供参考, 当我运行命令“apachectl -S”时出现此错误

/usr/sbin/apachectl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:443                  127.0.1.1 (/etc/apache2/sites-enabled/default-ssl:2)
*:80                   is a NameVirtualHost
         default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
         port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
Syntax OK

如果我运行“apachectl configtest”

/usr/sbin/apachectl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Syntax OK

编辑 1
我也遇到了错误

Invalid method in request \x16\x03\x01

请帮帮我。

【问题讨论】:

  • 在 chrome 中它说:SSL 连接错误无法与服务器建立安全连接。这可能是服务器的问题,或者可能需要您没有的客户端身份验证证书。错误 107 (net::ERR_SSL_PROTOCOL_ERROR):SSL 协议错误。并且在 firefox 中:SSL 收到了超过最大允许长度的记录。 (错误代码:ssl_error_rx_record_too_long)

标签: linux apache apache2


【解决方案1】:

看起来您正在端口 443 上设置 HTTP 服务器,例如在通常用于 HTTPS 的端口上(HTTP 包装在 SSL 连接中)。您在服务器端获得的Invalid method in request \x16\x03\x01 是来自客户端的 SSL 握手的开始。并且因为客户端没有从它抱怨的服务器得到预期的答案。

我不知道你对这个设置的意图是什么,但是

  • 如果您只想使用 HTTP,请将监听器保留在端口 80 上并删除端口 443 上的监听器
  • 如果你想设置 HTTPS,你需要证书等(那里有足够的文档)

【讨论】:

    【解决方案2】:

    好的,这就是解决方案。

    由于我的域 (example.com) 配置为端口转发,并且它映射到我的本地服务器 通过 example.com
    访问我的本地服务器 是这样的:

    http://example.com:1234/project_name
    

    我正在为 https 配置我的本地服务器
    可以访问

    https://192.168.**.***/project_name
    

    但它给出了错误 (Invalid method in request \x16\x03\x01) for below url

    https://example.com:1234/project_name
    

    因为 example.com 没有为 ssl 配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-11
      • 2020-02-18
      • 1970-01-01
      • 2013-07-16
      • 2012-01-12
      • 2021-07-19
      • 1970-01-01
      • 2017-04-11
      相关资源
      最近更新 更多