我按照本指南的第 1B 部分创建了一个证书并自行签署并设置 Apache 以使用该证书,但是每当我尝试安全地查看我的网站时,Firefox 都会抛出此错误:
安全连接失败
连接到 animuson.com 时发生错误。
SSL 收到超过最大允许长度的记录。
(错误代码:ssl_error_rx_record_too_long)
我先用 4096 试了一下。然后,我没有使用指南中的 4096,而是使用了 1028(我认为这是正常使用的大小)。我在 CentOS 5 上使用 APache2 ...
来自“/etc/httpd/conf/extra/httpd-ssl.conf”(当然是压缩在一起的):
Listen 443
SSLEngine On
SSLCertificateFile "/etc/httpd/conf/ssl/server.crt"
SSLCertificateKeyFile "/etc/httpd/conf/ssl/server.key"
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我从他们默认的 ssl.key 和 ssl.crt 目录中移动了英里,我做了一些我不记得的事情,这似乎有效。它开始显示“添加例外”页面,我通过根证书安装到我的浏览器,现在它显示以下错误:
安全连接失败
连接到 animuson.com 时发生错误。
SSL 对等方无法协商可接受的安全参数集。
(错误代码:ssl_error_handshake_failure_alert)
我不知道这意味着什么,或者你可能需要什么信息来帮助我解决这个问题。
我以前从未遇到过这样的事情。如果确定 HTTPS 已关闭,我试图简单地将页面重定向到 HTTPS 版本,但它显示的是 HTML 页面而不是实际重定向;更奇怪的是,它将它显示为文本/纯文本!
VirtualHost 声明(排序):
ServerAdmin admin@example.com
DocumentRoot "/path/to/files"
ServerName example.com
SSLEngine On
SSLCertificateFile /etc/ssh/certify/example.com.crt
SSLCertificateKeyFile /etc/ssh/certify/example.com.key
SSLCertificateChainFile /etc/ssh/certify/sub.class1.server.ca.pem
<Directory "/path/to/files/">
AllowOverride All
Options +FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule .* https://example.com:6161 [R=301]
Run Code Online (Sandbox Code Playgroud)
页面输出:
ServerAdmin admin@example.com
DocumentRoot "/path/to/files"
ServerName example.com
SSLEngine On
SSLCertificateFile /etc/ssh/certify/example.com.crt
SSLCertificateKeyFile /etc/ssh/certify/example.com.key
SSLCertificateChainFile /etc/ssh/certify/sub.class1.server.ca.pem
<Directory "/path/to/files/">
AllowOverride All
Options +FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>
RewriteEngine On
RewriteCond …
Run Code Online (Sandbox Code Playgroud)