我在 CentOS 上安装了 Apache,但没有启用 SSL,但我收到以下错误。
Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please. Hint:
https://192.168.1.50/ Apache/2.2.15 (CentOS) Server at 192.168.1.50
Port 443
我正在测试的页面是一个简单的 html 页面。
肉身安装的Apache我没有做太多改动。我唯一编辑的是 IPTABLES 配置文件以允许 LAN 访问端口 80 和 httpd.conf 文件以更改文档根目录。
我以前安装过 Apache(在 Fedora 上),但没有遇到这个问题。
谢谢。
最佳答案
我设法找到了问题所在。我找到了一个包含所有 SSL 配置行的 sll.conf 文件。默认情况下启用 SSL,这很奇怪。它位于/etc/httpd/conf.d/和一个简单的
<VirtualHost _default_:443>
SSLEngine off
</VirtualHost>
成功了。
关于Apache 全新安装 ssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17917243/