Friday, January 19, 2018

How to kill a process listening to a port say "8080"


I have often encountered this issue while trying to run tomcat on port 8080. I get an error saying that the port is already being used by another process.
Below is the command that I used to kill that process:-
Step 1 : Find the process that is using this port.
netstat -ano | find "8080"
This command searches for the process listening to the port 8080.
Step 2 : Kill the process
I found that in my case the process with PID 22300 is listening to the 8080 port.
To kill this process use taskkill /PID 22300 /F

.htaccess display error pages on http errors

In your htaccess file add the below lines and save to show error pages on Http errors (404, 403 etc) ErrorDocument 403 /errors/404.html ...