我在使用 apache2 运行 SSL 时遇到问题。
我阅读了许多有用的文章:
将 /etc/apache2/sites-enabled 中的conf文件启用为000-default-ssl
NameVirtualHost my.i.p.address
<VirtualHost my.i.p.address:443>
DocumentRoot /var/www
SSLEngine on
#SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
ServerAdmin you@example.com
ErrorLog /var/log/ssl_error_log
TransferLog /var/log/ssl_access_log
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)我在启用站点 (000-default-ssl) 中生成了一个指向可用站点中的默认 ssl conf 文件的符号链接
我在 Firefox 中收到以下错误: ssl_error_rx_record_too_long 我的 apache 错误日志有一行:请求 \x16\x03 中的方法无效
端口 443 已打开并正在侦听,因为我可以毫无错误地访问http://my.IP.Address:443 。
所以看起来我的服务器正在侦听端口 443,但它提供的内容不安全(HTTP),这让我相信我的 VirtualHost 配置中有错误,但我找不到它。
有什么建议么?