How to find the process that is using the port 80 and apache server.
When i used the command 'netstat -a|grep 80' it given that port 80 is in listening mode.
I had used the following command:
telnet localhost 80
GET /
I had got some HTML script.
But when I accessed the GUI ( url is http:// ip address of server/hawk.htm )which uses the script '/usr/local/apache/htdocs/hawk.htm' using apache server ( for which default server is 80 and document root is "/usr/local/apache/htdocs") it is different.
friend there is no command that you can execute that will tell you which process id tied to port 80, stop creating threads everywhere.
To trace what is using a certain port
netstat -an | grep \\.80
will list out the IP address that is using port 80, then of course from there once you have the IP address you should know in your company/organisation which are the webservers that are using which IP address, this knowledge is domain you must know.
The purpose of using telnet localhost 80; GET /
is used for troubleshooting to isolate problems only. If client cannot access url but when determined that telnet GET / is able to return some ascii output means there's nothing wrong with webserver and isolate that it's probably a client connectivity issue.
Of course when you are troubleshooting you must also know what you are doing.