LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   listening on port 80, why (https://www.linuxquestions.org/questions/debian-26/listening-on-port-80-why-487516/)

ekdya 09-27-2006 04:19 PM

listening on port 80, why
 
Hi

it looks like my system is listening on port 80
$ netstat -an | grep -i listen
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
...

but port 80 is for web servers, I am not a web server, so I looked for
how it was opened in order to stop it, I happen to be in runlevel 2,
and in my rc2.d there is no apache daemon which could initiate this
listening service, as I could tell from the command

:/etc/rc2.d$ grep -FHrn 80 .
./S99xdm:114:# vim:set ai et sts=2 sw=2 tw=80:
./S20xfs:156:# vim:set ai et sts=2 sw=2 tw=80:

what should I do in this case?

thanks

i_grok 09-27-2006 04:34 PM

You can find what process has each port open:
Code:

netstat -pan | grep -i listen

ekdya 09-27-2006 05:13 PM

Quote:

Originally Posted by i_grok
You can find what process has each port open:
Code:

netstat -pan | grep -i listen

$ sudo netstat -pan | grep -i listen
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4507/apache

is it safe to purge apache, I use dwww to view system docs in html, do I need apache for that?

another thing, what is this 4507 before apache?

thanks

bulliver 09-27-2006 06:02 PM

Quote:

is it safe to purge apache, I use dwww to view system docs in html, do I need apache for that?
You do not need apache to view static html pages on your local filesystem. Just open them in any browser.

Quote:

another thing, what is this 4507 before apache?
That would be the PID number: Process IDentification...run 'ps aux' to see lots of PIDs, they are in column 2.

ekdya 09-27-2006 06:24 PM

Quote:

Originally Posted by bulliver
You do not need apache to view static html pages on your local filesystem. Just open them in any browser.

:~$ sudo apt-get --purge remove apache
Password:
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED
apache* dwww*

I use dwww to search for docs on my system. yes I don't need it to view the html doc but to find them is the thing.

bulliver 09-27-2006 06:50 PM

Well then keep it...or find something else to find/organize your docs.

You can use your firewall to keep people from the outside world from accessing your webserver, by blocking port 80...in fact you should block all ports except those you want/need open, but that is an entirely differnt issue.


All times are GMT -5. The time now is 12:23 AM.