Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Kill Whatever Process is Running on Port 80

[***EDIT: I tried searching again with command lsof -wni tcp:80 and another process comes up with the name google but on a different port and I noticed that whenever I kill that process it just kills Google. Happened with the command mentioned below but I just didn't notice the first time]

I have completely killed all my terminal windows and closed out, but there is still something running on localhost:80. I am on a mac and in my terminal I searched:

lsof -i tcp:80

And something came up with info under COMMAND that says Google and PID was 270.

I typed:

kill -9 270.

Did another search. Nothing there. But still when I go to localhost:80, in the browser it says "It works!" which was something I used to write in the past whenever I just wanted to check and see if something was functioning before proceeding.

I have no idea how to get rid of this. Tried several other suggestions based on internet searches and none work.

Is there a command I can run that will kill every process on every port so that I don't have to go through this again? Please help! (Time sensitive matter). Thank you!

like image 670
Jessie Richardson Avatar asked Dec 13 '22 20:12

Jessie Richardson


1 Answers

This helped me out and I was able to fix. Turns out I had my apache server running in the background from a project like 2 years ago lol.

Discovered issue from this link: https://www.mkyong.com/mac/mac-osx-what-program-is-using-port-80/ and then ran:

sudo apachectl stop
like image 103
Jessie Richardson Avatar answered Dec 28 '22 10:12

Jessie Richardson