我错误地启动了命令
sudo yum install httpd
在我的服务器的命令行中。 由于 httpd 已经安装,此命令已重新安装/更新了 httpd 但之后我无法再启动 httpd:启动命令
sudo /etc/init.d/httpd restart
我收到错误:
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 no listening sockets available, shutting down
深入查看配置文件,我发现
Listen 443
同时在conf/httpd.conf和conf.d/ssl.conf中。 评论其中一个 httpd 服务正确启动,但似乎 SSL 无法正常工作,因为如果我访问一些我知道受 SSL 保护的页面,我会收到一个
404 Not found
有人知道我可能因该更新而损坏了哪些配置吗? 我该如何修复它?
最佳答案
我明白了。 有两个 _VirtualHost default:443(一个来自 httpd.conf,一个来自 ssl.conf)。
删除其中之一(我建议删除 httpd.conf 的一个,将所有 ssl 配置保留在 ssl.conf 文件中),一切都会重新正常工作。
关于apache - centos 更新 httpd 后 SSL 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39979377/