Debian – Port 80 is blocked, but I don't know by what

Goot asked:

I can’t make lighttpd listen to port 80.

~# /etc/init.d/lighttpd start
Starting web server: lighttpd2013-03-16 23:15:02: (network.c.379) can't bind to port:  80 Address already in use

Actually I have apache2 installed on my server, too (listening to port 80) but it is not active.

I used netstat / netstat -npl but it wasn’t helpful

How can I figure out what is using the port?

My answer:

Address already in use means that another process is already listening on port 80. Only one process can listen on a given port at a time.

To find the process, run as root:

netstat -tnlp | grep -w 80

The offending process will be listed.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.