23 May 2025

Debian Nginx Port 80 Already in Use Problem and Solution

 In Debian operation system, when using nginx web server, we can get port 80 already in use error.

And this prevents system restart.

Solution is to list all processes that use port 80 and kill each of them.

Connect to your server via SSH.

And they the command below:

sudo netstat -tulpn

This command will list 

sudo netstat

And kill each process with the PID number on the right with using the command below:

sudo kill -2 <PID>

And restart the nginx

sudo service nginx restart

Now your webserver will work as usual.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.