在 CentOS 上安装 mod_ssl 后 Apache 无法启动

Ade*_*Ade 3 centos mod-ssl apache-2.2

我需要在服务器上的相同主机名上同时运行 http 和 https。我在 /etc/httpd/conf.d 目录中配置了主机的情况下在没有 SSL 的情况下运行了所有内容。

    System: CentOS release 5.6 (Final)
    Server: Apache/2.2.3
Run Code Online (Sandbox Code Playgroud)

我按照这里的说明操作:http : //shapeshed.com/journal/setting_up_mod_ssl_on_apache_centos_52/

但现在:

    sudo /etc/init.d/httpd restart
Run Code Online (Sandbox Code Playgroud)

回应:

    Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:443
    (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
    no listening sockets available, shutting down
    Unable to open logs
                                                       [FAILED]
Run Code Online (Sandbox Code Playgroud)

在 /etc/httpd/conf/httpd.conf 的底部,我有:

    NameVirtualHost *:80
Run Code Online (Sandbox Code Playgroud)

我尝试在其下方添加NameVirtualHost *:443,但没有帮助。

还有一件事:Webmin 之前已安装,并且已经在http://XXX.XXX.XXX.XXX:10000 上运行

这可能是一个因素吗?

任何帮助将不胜感激; 正如您可能会说我在谷歌飞来飞去,我以前没有这样做过。

谢谢!

Ade*_*Ade 5

解决了:

在安装 mod_ssl 之前,httpd.conf 包含:

    Listen 31.222.163.118:443
Run Code Online (Sandbox Code Playgroud)

并且 mod_ssl 安装程序已将此添加到自动创建的 ssl.conf(在 conf.d 中)

    Listen 443
Run Code Online (Sandbox Code Playgroud)

重复自然会引起冲突。我从 httpd.conf 中删除了该行,现在它可以正常启动。