48)Address already in use: AH00072: make_sock: could not bind to address [::]:80

后端 未结 5 1317
时光取名叫无心
时光取名叫无心 2021-02-04 06:43

I get a apache error when I try access to anything folder or file, it returns Http Not found or Forbidden I am trying restart and start apache

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 07:29

    this error ocurs because apache server listen by deafult in port 80 so another service or program is using that port and apache canot start.

    The solution is identify what program or service is using that port an then close, disable or unistall it.

    to identify you can run netstat

    sudo netstat -ltnp | grep ':80'
    

    or

    sudo lsof -i:80
    

    in my case i have installed nginx and apache at the same time and both uses the port 80.

    Temporary Solution: Stop or kill the service, program, etc.

    Permanent Solution:

    1. Change the port of apache server in config file /etc/apache2/apache2.conf
    2. Uninstall the service or program that uses port 80.

    in my case I needed both so I decided to temporarily fix it by disabling the service with:

    systemctl stop MyServiceName.service
    

    If it is a service otherwise use kill command.

提交回复
热议问题