Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Apache 2 on Ubuntu 12.10. When I try to start the service using sudo /etc/init.d/apache2 start, I get the following message.

*Starting web server apache2
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.                                 [fail]
share|improve this question
Make sure apache is not already running when (ps -ef | grep apache). And what does sudo /etc/init.d/apache2 restart say? Verify you have your a site in /etc/apache2/sites-enabled/ and check the files in there. – Rinzwind Feb 21 '13 at 13:55

Try sudo service apache2 start

then type

sudo service apache2 status

second command will display whether it is running or not.

share|improve this answer

It's well possible that you have something already running at (or "bound to") that port. Try this command to see processes in question:

sudo lsof -i :80

This lists processes listening on port 80. Once you found the culprit you know which process to kill or kill -9 (also as superuser).

Keep in mind that the Apache instance, assuming you had started that earlier, might have gone "stale" or become a zombie. In the latter case even a reboot may be necessary in some cases.

Otherwise go with the answer from dedunumax.

share|improve this answer

I got this error message with the following configuration:

# cat /etc/hosts   localhost   foo

# cat /etc/apache2/sites-enabled/foo
<VirtualHost foo:80>

# cat /etc/apache2/ports.conf 
NameVirtualHost *:80
Listen localhost:80

Changing ports.conf to the following solved the problem:

NameVirtualHost *:80
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.