Could not bind to address 0.0.0.0:80
When i try to run apache2 I get this error.
(13) Permission Denied: make_sock: Could not bind to address 0.0.0.0:80 no listening sockets available, shutting down unable to open logs Now, Apache was working fine a month ago because I had been to the website. Now I'm working for the people who made the website, and guess what, I have to fix it. Problem is, I'm not super new to linux, I have done linux before, but never tried troubleshooting it before. Now i checked the httpd.conf file. It's not set to bind to 0.0.0.0:80, its set for a proper address. It's also set to "Listen 80". I can't seem to find the fix I need for this error when I try to restart apache2 (apachectl start). I have also tried to start apachectl from root, but that didn't work either. Anyone have any ideas here? Thanks. |
Is anything else listening on 80?
|
oh ya, I should have posted that...I don't know. How can I check?
|
OK, I did a variety of netstat commands, nothing seems to be showing up as port 80. I'm not sure if the netstat command is the best way to check for items that may be listening on port 80, does any have a better way to check?
|
Can anything else bind to port 80? Test with something like netcat.
|
did you upgrade from an earlier version of Apache, it's possible that the old installation is still bound to port 80.
|
Quote:
|
changing to port 81
My isp blocks 80 so I am just trying to use 81. How would I make apache start as root as you suggest?
Thanks |
What's making me suspicious is not the ":80" but the "0.0.0.0." It sounds like Apache has not been told what adapter to listen to.
Apache normally listens to port #80 and this is a "low-numbered port," which customarily requires root. Under normal installations it will typically do so... starting as root long enough to open the port, then switching to another user. |
Check httpd.conf for a "Listen" configuration line.
|
cannot bind to 0.0.0.0:80
In my case the problem was related to a VirtualHost trying to bind to port 80. It was like httpd would start and bind on port 80 but as soon as the VHOST would start it was trying to bind also to port 80, making the service stop because of the port was in use.
here is my faulty /etc/apache2/httpd.conf file with the 2 overlapping lines that were causing the issue: Quote:
#Listen *:80 Problem is gone, server can start normaly Dirty fix? Regards, |
How about these methods? (I have not tried them out.)
I got exactly the same problem after I upgrade from ubuntu 6.10 to 7.04. :cry: :cry: :cry: I reinstall the whole system again and agin and tried many ways but still can not solve this problem. My apache 2 now can not let firefox to reading in php files. After seraching on the web I found this link:
http://ubuntuforums.org/showthread.php?t=253859 In that post one guy says: "turns out all i needed was a folder called 'logs' in the root dir of the hosted files (/var/log/www/). i'm not sure if i needed to create the file 'error.log' in the 'logs' folder or not, but doing so caused the problem to go away. after creating said folder and file, run sudo /etc/init.d/apache2 restart and i'm back up and running." Note that I have not yet tried them out. I plan to reinstall all things including the system again when I come back from my vocation. Hope this method is useful and let's try together to have this problem solved. |
could not bind to address 0.0.0.0 80 no listening sockets available fix
Fix:-
===================== 1)Kill All nobody process. Use the following script for doing that. root@del [~]#for i in `ps auwx | grep -i nobody | awk {'print $2'}`; do kill -9 $i; done or root@del [~]#for i in `lsof -i :80 | grep http | awk {' print $2'}`; do kill -9 $i; done 2) If apache is not restarting after this. Remove semaphore using the following script. root@del [~]#for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done 3) Restart apache. . |
Quote:
|
hi renesence.
Hello,
Here in this case port 80 may be used by some other process. So i killed all the process which is bound to port 80. and restarted apache. I am sure that the script will work fine. You can get me at sreejithedl@gmail.com Have a nice day. Regards Sreejith |
All times are GMT -5. The time now is 07:17 AM. |