Can't reload apache2, no listening sockets available

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: <pre>

  • 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. </pre> and when I run <code>sudo netstat -ltnp | grep ‘:80’</code> i get:

<pre> tcp 0 0* LISTEN 4266/apache2 </pre> Where did I go wrong, what should I do ?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

<pre>sudo service apache2 restart </pre>