0

Once I a2enmod the ssl module and restart apache I get the following error:

Restarting web server apache2
AH00548: NameVirtualHost has no effect and will be removed in the next 
release     /etc/apache2/ports.conf:14
(98)Address already in use: AH00072: make_sock: could not bind to address
[::]:443
(98)Address already in use: AH00072: make_sock: could not bind to address
0.0.0.0:443
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.

To stop it I can either disenmod or comment out the following module lines in the ports.conf file:

Listen 80
#<IfModule ssl_module>
#    Listen 443
#</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Any help would be much appreciated

1
  • Please ask a question, not only summing up your problems, also a full configuration file could be useful or output of netstat -l to see what process is listening on 443. Maybe your answer is right in the ports.conf file you posted, there is mod_gnutls listening on port 443 also.
    – mondjunge
    Feb 19, 2015 at 16:02

1 Answer 1

0

Apache usually complains of "no listening sockets available, shutting down", when another process is listening on said socket. Make sure that your apache instance is down or you don't have something else listening on said port. Use this command to find out who ( what pid) is bound to the port:

sudo netstat -anltp | grep 443

where a (all) l (listening) -t ( tcp ) -p (program/pid) -n (numeric ports)

3
  • tcp 0 0 MYIP:443 0.0.0.0:* LISTEN 1553/openvpn-openss That's what I get?
    – Stephen66
    Feb 18, 2015 at 18:31
  • Ok from googling "no listening sockets available, shutting down" I figured it out, I just do "kill 1553" and then when I reenter that command nothing comes up. I could restart apache fine. Problem solved. thank you!
    – Stephen66
    Feb 18, 2015 at 18:36
  • 1
    Looks like you have openvpn bound to 443. You have to choose what to run on that port. Either openvpn or apache. Make sure you correct openvpn conf in /etc because on the next restart apache will complain again!!!
    – user283885
    Feb 18, 2015 at 18:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .