Apache wont restart after I enable SSL

apache2, ssl

Solution

The following lines of your output state that an other programme is already listening on port 443 and due to the fact that Apache does not support port sharing it is unable to bind to that port and so it shuts down.

(98)Address already in use: AH00072: make_sock: could not bind to address
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

Thus I recommend you to shut the programme listening to that port down. You can determine which programmes are listening on TCP port 443 with the following command (must be executed as super user):

netstat -tlpn | grep 443

Then shut down the already listening programme (for example by using `service <programme> stop` or by using `kill <processID>` (the process ID is also supplied by `netstat`). Afterwards, you can start Apache by using `service apache2 start` or by executing `/etc/init.d/apache2 start`. Both commands work when you are working with Ubuntu/Debian. If you are working with CentOS/RedHat Apache is named `httpd`.

Problem

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 mod_ssl.c> # 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

Original source