Starting apache fails (could not bind to address 0.0.0.0:80)

后端 未结 12 1874
南旧
南旧 2020-12-12 11:11

Update: Already fixed, it seems that one of VirtualHosts configurations files was wrong in sites-enabled.

I have Ubuntu 11.10

When I run the command to start

相关标签:
12条回答
  • 2020-12-12 12:07

    I fixed it by using below procedure. Run below command as root user.

    root# ps aux |grep apache
    

    It will show you Apache PID, just kill that PIDs and restart Apache Server.

    0 讨论(0)
  • 2020-12-12 12:11

    It look like other process is using port 80.

    $ netstat -anp | grep
    

    eg. $ netstat -anp | grep 80

    by above you get process name, if you want to use port then you need to stop the process or change the port

    0 讨论(0)
  • 2020-12-12 12:14

    I had the same error, and just want to confirm that running

        sudo netstat -ltnp | grep ':80'
    

    helped me indicate that Hiawatha webserver was in the way of Apache2.

    Removing Hiawatha fixed the issue (sudo dpkg --purge hiawatha). Ubuntu 12.04.2 server.

    0 讨论(0)
  • 2020-12-12 12:14

    You can only have listen PORTNUMBER in only one file of .conf. Do not put it in multiple files. Try it :)

    0 讨论(0)
  • 2020-12-12 12:17

    It may be skype or nginx using the port 80.

    Try shutting down skype, or running: sudo /etc/init.d/nginx stop

    0 讨论(0)
  • 2020-12-12 12:18

    Try this, it works for me…

    sudo netstat -ltnp | grep ':80'
    

    This would return the following:

    tcp6 0 0 :::80 :::* LISTEN 1047/apache2
    

    Then

    sudo kill -9 1047
    

    Then I was able to restart Apache and everything was working fine.

    0 讨论(0)
提交回复
热议问题