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

Asked

Viewed 4,611 times

1

A few days ago when I changed the version of PHP from the server and went to restart the apache, then 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 settle, I did the following:

turn on the command: netstat -tlpn | grep 80

He 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, restarted the apache and then just went around tcp6.

But today I went to access the website and I saw that you were showing: BAD GATEWAY 502 ERROR . I went to restart the apache to see if it would solve and showed me the same error I mentioned before. I performed the same process and worked.

I wanted to know why this kind of mistake is happening and if there is any way to solve it definitively.

2 answers

0

0

In case the previous aid doesn’t work. In my case I had already installed apache by xampp, uninstalled but some processes were still running and preventing apache from going up. Run this command to see the processes that are running at port 80: sudo ss -plnt sport eq :80 (run with sudo!) then see the processes and finish them with the Kill numero_do_process

Browser other questions tagged

You are not signed in. Login or sign up in order to post.