Can't reload apache2, no listening sockets available

Posted June 21, 2014 4.5k views
I've set up everything by the book (tutorials) Initial Server Setup with Ubuntu 12.04 How To Protect SSH with fail2ban on Ubuntu 12.04 How To Set Up a Firewall Using IP Tables on Ubuntu 12.04 How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu and at the end of everything, just when I thought it's all over, when I needed to reload apache, I get this error:
* Reloading web server config apache2                                                             
 /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs
Action 'graceful' failed.
and when I run sudo netstat -ltnp | grep ':80' i get:
tcp        0      0    *               LISTEN      4266/apache2
Where did I go wrong, what should I do ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Make sure you are running the command restart command as root using <code>sudo</code>:

<pre>sudo service apache2 restart </pre>