Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 [closed]

1

A few days ago when I changed the PHP version of the server and was restarting apache , then it showed me the error:

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

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

To solve, I did the following:

I ran the command: netstat -tlpn | grep 80

It showed me the following:

tcp        0      0 0.0.0.0:80     0.0.0.0:*         LISTEN      1355/nginx      
tcp6       0      0 :::80          :::*              LISTEN      1355/nginx

Then I finished the process with the command: kill 1355 , I restarted apache and only the tcp6

But today I went to the site and saw that it was showing: 502 BAD GATEWAY ERROR . I was restarting apache to see if it would resolve and showed me the same error I mentioned earlier. I did the same process and it worked.

I wanted to know why this type of error is occurring and if there is any way to resolve it permanently.

    
asked by anonymous 20.02.2018 / 18:37

2 answers

0

If the previous help does not work. In my case I had already installed apache by xampp, I uninstalled but some processes were still running and preventing apache from going up. Run this command to see the processes running on port 80: sudo ss -plnt sport eq: 80 (run sudo!) then look at the processes and end them with the kill process_number

    
21.05.2018 / 01:56
0

There is a stackoverflow post that can help you.

link

On my Mac I used the following commands.

sudo apachectl -k start
sudo apachectl -k stop
sudo apachectl -k start

So it worked.

If you do not give it a look at this link that can certainly help you.

    
28.09.2018 / 19:23