Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(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.
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?
(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
Are you starting Apache as root? "Permission denied" indicates you're not root. Only root can bind to lower ports, like port 80. You never want to actually run Apache as root, but it must start up that way (for standard port 80) and then switch to a different userid. If some other program was already bound to port 80 you would get a "could not bind..." error, but I don't think it would not be prefaced with a "permission denied" error like you're seeing.
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.
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
KeepAlive on
HostNameLookups on
ServerAdmin admin@my_own_domain_name
ServerName frodo.midearth.local
/usr/lib/apache2/modules/mod_placeholder.so
<VirtualHost my_own_domain_name:80>
DocumentRoot "/var/www/vhost/my_own_domain_name/httpdocs"
ServerName frodo.midearth.local
<Directory "/var/www/vhost/my_own_domain_name/httpdocs">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
The issue was fixed by commenting the first line at the top: #Listen *:80
Problem is gone, server can start normaly Dirty fix?
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. 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:
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.
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.
I believe 0.0.0.0 is used when a site can be accessed via any ip that the server may use, after all a computer can have more then 1 ip. I would say it's either a conflict over port 80 (either with another process or an older version of apache) or apache isn't being started as a root process, I can't imagine it being anything else to be honest.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.