Apache错误:已在使用的地址:make_sock:无法绑定到地址[::]:443

时间:2017-10-09 10:02:37

标签: apache ssl https apache2 httpd.conf

启动时出现Apache错误:

Address already in use: make_sock: could not bind to address [::]:443

*Executing start method ("/lib/svc/method/http-apache2 start") ]
(125)Address already in use: make_sock: could not bind to address [::]:443
no listening sockets available, shutting down
Unable to open logs*

Listen 443 is added in ssl.conf.
Listen 80 is added in httpd.conf.

HTTPD.conf文件:

DocumentRoot "/var/apache2/htdocs"
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory "/var/apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

还在error_log文件中收到以下错误:

configuration error:  couldn't perform authentication. AuthType not set!:index.html**
index.html's location : /var/apache2/htdocs

提前致谢

3 个答案:

答案 0 :(得分:1)

在侦听端口

后添加以下行
#You will have 
    Listen 443 https
#add NameVirtualHost entry after that,
NameVirtualHost *:443

并重新启动httpd服务器,希望这对您有用。

答案 1 :(得分:1)

  1. 在conf.d中定义的文件会在多个文件中多次将Listen端口视为443,这可能会导致此问题。
  2. 似乎端口443被其他一些进程使用,可以通过&#34; netstat -anp | grep:443&#34;来检查。

答案 2 :(得分:1)

我不得不注释掉

  

听443 https

升级到httpd版本 2.4.6-80 后,在/etc/.../conf.d/ssl.conf中的