Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The port 80 in Mac is used

Tags:

We have to use port 80 for our server. But when I was trying to use it in Mac, it always said that the 80 is used, but I don't know which program uses it.

I searched it in Google, and someone said it's about apache, but I tried, which is not working. I found this: https://gist.github.com/kujohn/7209628 , but seems it's not working visiting our server by IP address.

I really don't know what's going on and how can I find out which program using port 80 and stop it.

Many thanks if anyone can help, I'm new using Mac. Thanks.

like image 516
Sky Avatar asked Oct 27 '14 10:10

Sky


People also ask

What is using port 80 Mac?

This /usr/sbin/httpd is listening on port 80, should be Apache server.

What port 80 is used for?

On a Web server or Hypertext Transfer Protocol daemon, port 80 is the port that the server "listens to" or expects to receive from a Web client, assuming that the default was taken when the server was configured or set up.

Who's using port 80?

Many programs use Port 80 in addition to Alteryx Server:Alteryx Connect. Tableau Server. Apache. Qlik.


2 Answers

To find out what process is using port 80

  1. go to Applications
  2. open utilities.
  3. open Activity Monitor.
  4. click on the Memory tab,
  5. look at the ports and the processes using them. Find port 80 and select it
  6. go to the view on the menu bar and choose Quit process.

This will just kill the process, it will not stop a server instance that is already running from continuing to run. (Correction: the Ports column shows the number of open ports (and files?), not the port number)

It is not clear if you are using a database management system or not and which one but one method that has worked for me using MAMP is as follows.

  • stop the server by using sudo apachectl stop command.
  • then change the port to port 80.
  • then restart your servers.
like image 115
David Odhiambo Avatar answered Sep 27 '22 21:09

David Odhiambo


type the following in Terminal

sudo lsof -i -n -P | grep TCP 

you will get a list - e.g. dropbox listens on 80
you can copy the output to a text editor, etc to search

like image 35
Glock34shooter Avatar answered Sep 27 '22 20:09

Glock34shooter