Question
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 - error
Hello,
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/huizenmeteenverhaal.nl.conf:5 (98)Address already in use: AH00072: makesock: could not bind to address [::]:80 (98)Address already in use: AH00072: makesock: 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.
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.
×
Ok, actually got it back working by changing the .conf files in /sites-available and /sites-enabled to .config and back to .conf again. (WHY? HOW?)
Really don’t get that either....
If somebody is able to shed some light it would be highly appreciated.
Thank you.
By using :: you are listening to a IPv6 Loopback?
Anyway.. In your virtualhost, Use * and not the IP.
Also, .conf is default for apache, so keep your stuff as .conf and not .config.
Also at the top, listen by port and not ip and port.. use *:80 / *:443 in your Vhosts.
Listen 12.34.56.78:80
Listen 80
<VirtualHost *:80>
DocumentRoot “/var/www/html/blaaaa”
ServerName blaaaa.com
<Directory “/var/www/html/blaaaa”>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot “/var/www/html/Moooo”
ServerName Moooo.com
<Directory “/var/www/html/Moooo”>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
OK,
So it was all working just fine…and it stopped again.
As far as I can tell my .conf file is correct:
Ensure that Apache listens on port 80
Listen 80
Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin me@mywebsite.com
ServerName huizenmetkarakter.nl
ServerAlias www.huizenmetkarakter.nl
DocumentRoot /var/www/huizenmetkarakter.nl
</VirtualHost>
Correct me if I’m wrong.
Then if I try to run the : service apache2 reload command it tells me apache is not running.
I really can’t see what is going wrong here. I was working on my sites and not even fiddling my .conf-files or whatever. It just stopped working....
Please advice…
Kind regards,
Jasper
Hi Jasper,
Did you get this resolved? I’m experiencing it now and haven’t found a solution.
Thanks!
Hi,
on my server when i restart the apache it gives error.
sudo service apache2 restart
Please reply me ASAP
Thanks in advance
I had the same issue because I had a process of apache waiting for the passphrase for ssl.
Check your running commands for apache with any
top
program.