(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 - error


Being a novice on configuring Apache servers I managed to get my droplet up and running and have two domains pointing to it. Made my own virtual host files using the given tutorials, DNS all figured out…great! It worked all just fine.

But now I cannot reach my two domain anymore and when I restart Apache using terminal (sudo service apache2 restart) I get this error:

  • Restarting web server apache2 AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/ (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

I googled a fair bit but got lost in all these different solutions that make my novice head spin.

Any help on this…?

Just can’t get my head around the fact that it was al working just fine, and just stopped.

Show comments

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.

This could be brought about by Nginx, if you have it install run these two command to uninstall it. Use commands(1 or 2) and 3

  1. sudo apt-get remove nginx nginx-common # Removes all but config files.

  2. sudo apt-get purge nginx nginx-common # Removes everything.

  3. sudo apt-get autoremove #After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.

I am running FreeBSD (Linux like…) without NGINX and had this same problem. It appears that there was a httpd process that was hung. Apparently, this happens every so often. I listed all processes and grep out the httpd process to see what was hung. If you do not manually kill the process, it should timeout eventually. The eventual timeout is probably why the problem fixed itself in some of the previous comments. In my situation, I went ahead and manually killed the process and then started apache. Here’s the commands:

== Notice the commands might vary slightly for Linux ==

= Show processes hung = ps wax | grep httpd

= Kill Process ID 1234 = kill 1234

= Start Apache24 = apachectl start

= Verify it is running = service apache24 status


I hope this helps.

After having worked on this for two hours my final solution, which I think is what actually worked. Is that instead of doing sudo apachectl -k restart (Which is what made the message appear for me). I finally did

sudo apachectl stop waiting for my site which showed “It works!” to go down. sudo apachectl start

So this is just the stupidest solution but it worked for me. Though when I woke up this morning my entire php@7.2 folder was missing (something with the latest brew update perhaps?). So I checked my /usr/local/etc/httpd/httpd.conf file, then found a whole new httpd.conf file in the /etc/apache2/ folder, so I just copied my original httpd.conf file over that one. Don’t know which folder apachectl checks but at least it works now.