Apache restart on Ubuntu - error “could not bind to address 0.0.0.0.80”

青春壹個敷衍的年華 提交于 2019-12-25 03:12:17

问题


I'm a n00b - trying to get apache2 set up on Ubuntu 9.10 (Karmic Koala) on Rackspace Cloud. I have set up/configured OpenSSL and installed Apache, but Apache won't start. I assume its a misconfiguration in my /etc/apache2/sites-available/ssl or /etc/apache2/sites-available/default files)

When I try to restart apache using the command:

sudo /etc/init.d/apache2 restart

I get the following error message:

[error] (EAI 2)Name or service not known: Could not resolve host name *.80 -- ignoring! [error] (EAI 2)Name or service not known: Could not resolve host name *.80 -- ignoring! (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs ...fail!

For my /etc/apache2/sites-available/ssl I have used a virtual host of *:443.

For my /etc/apache2/sites-available/default i have used a virtual host of *:80


回答1:


Turn off Skype. It's use port number 80 for incoming messages. Eventually check what use this port at the moment using netstat.

Second resolve is simply: Add ServerName localhost to main config. file.




回答2:


  1. Check /etc/hosts. Be sure that your machine name and localhost domain definition is correct (ie: "127.0.0.1 localhost.localdomain localhost"
  2. However it is highly unlikely, check /etc/apache2/ports.conf if it contains explicitly "0.0.0.0"


来源:https://stackoverflow.com/questions/4404732/apache-restart-on-ubuntu-error-could-not-bind-to-address-0-0-0-0-80

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!