Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
958 views
in Technique[技术] by (71.8m points)

macos - The port 80 in Mac is used

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...