0

I've installed apache2 and then configured it to work with SSL following this and this tutorials, the problem becomes when I try to restart the service, I get the following error:

(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

the output of netstat -anp | grep 443 just display firefox listening and anything else, how could I solve this and get the service running??

Journeyman Geek
  • 6,977
  • 3
  • 32
  • 50
poz2k4444
  • 99
  • 2
  • 10

2 Answers2

2

This is caused when there is other service running on this port 443. We have to check what is the service running on it and shutdown and then restart the apache. To check what service running on port 443 use below command

nmap localhost

Surendra Anne
  • 86
  • 1
  • 4
  • 1
    You're not the first to go in that direction. The right answer is `lsof` or `netstat`. See http://serverfault.com/questions/357323/how-can-i-list-my-open-ports-on-debian for more details and the right flags. – Jeff Ferland Oct 03 '12 at 05:13
1

I assume firefox is connected to some other web site on port 443, although you could close it anyway to avoid confusion.

So if there are no other processes listening to port 443, the most likely explanation is that you have accidentally configured apache to listen to port 443 more than once (perhaps once with a specific IP address, and once without, hence the 0.0.0.0) so that when apache starts, the first bind attempt succeeds but the second fails.

Check for LISTEN directives in httpd.conf and any files that are INCLUDEd by httpd.conf.

ramruma
  • 2,740
  • 1
  • 15
  • 8