问题
Apache error while starting:
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 file:
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>
Also getting the following error in error_log file:
configuration error: couldn't perform authentication. AuthType not set!:index.html**
index.html's location : /var/apache2/htdocs
Thanks in advance
回答1:
- Files defined inside conf.d would have Listen port as 443 multiple times in multiple files which can cause this issue.
- Seems port 443 is used by some other process, it can be checked by "netstat -anp|grep :443"
回答2:
Add following line after listening port
#You will have
Listen 443 https
#add NameVirtualHost entry after that,
NameVirtualHost *:443
and restart httpd server, hope this will work for you.
回答3:
I had to comment out
Listen 443 https
in /etc/.../conf.d/ssl.conf after an upgrade to httpd version 2.4.6-80.
来源:https://stackoverflow.com/questions/46643780/apache-error-address-already-in-use-make-sock-could-not-bind-to-address