如何在 localhost Windows 上释放端口 80?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/788348/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 06:17:32  来源:igfitidea点击:

How do I free my port 80 on localhost Windows?

windowsxamppwindows-xplocalhostport

提问by

I installed XAMPP 1.6.8 and for some reason it didn't work. Later realized port 80 is not free or not listening. How can I release it or make it free?

我安装了 XAMPP 1.6.8,但由于某种原因它不起作用。后来发现80端口不空闲或者不监听。我怎样才能释放它或让它免费?

Thanks a lot!

非常感谢!

回答by MuhFred

That agony has been solved for me. I found out that what was taking over port 80 is http api service. I wrote in cmd:

那种痛苦已经为我解决了。我发现接管 80 端口的是 http api 服务。我在cmd中写道:

net stop http

Asked me "The following services will be stopped, do you want to continue?" Pressed y

问我“以下服务将停止,您要继续吗?” 按下 y

It stopped a number of services actually.

它实际上停止了许多服务。

Then wrote localhostand wallah, Apache is up and running on port 80.
Hope this helps

然后写localhost和 wallah,Apache 已启动并在端口 80 上运行。
希望这会有所帮助

Important: Skype uses port 80 by default, you can change this in skype options > advanced > connection - and uncheck "use port 80"

重要提示:Skype 默认使用端口 80,您可以在 Skype 选项 > 高级 > 连接中更改此设置 - 并取消选中“使用端口 80”

回答by Francisco

netstat -ano

netstat -ano

That will show you the PID of the process that is listening on port 80. After that, open the Task Manager -> Processes tab. From the View -> Select Columnsmenu, enable the PIDcolumn, and you will see the name of the process listening on port 80.

这将显示正在侦听端口 80 的进程的 PID。之后,打开任务管理器 -> 进程选项卡。从View -> Select Columns菜单中,启用该PID列,您将看到侦听端口 80 的进程名称。

回答by Chad Grant

netstat -a -b

netstat -a -b

Should tell you what program is bound to port 80

应该告诉你什么程序绑定到了 80 端口

回答by Eswar Rajesh Pinapala

I had this problem previously,

我以前遇到过这个问题,

if you see the Task manager(after enabling the view for PID), you will find PID=4 is "port 80 in use by NT Kernel & System; "

如果您看到任务管理器(启用 PID 视图后),您会发现 PID=4 是“NT 内核和系统正在使用的端口 80;”

Just go to

就去

  1. Control Panel
  2. Programs
  3. Turn Windows features on/off
  4. check if the World wide web servicesunder IISis checked
  1. 控制面板
  2. 程式
  3. 打开/关闭 Windows 功能
  4. 检查World wide web servicesIIS是否被选中

If so, Uncheck and netstat(or TCPVIEW) again to see if 80 is free.

如果是这样,再次取消选中和 netstat(或 TCPVIEW)以查看 80 是否空闲。

回答by Rushik Parikh

use netstat -banoin an elevated command prompt to see what apps are listening on which ports.

在提升的命令提示符中使用netstat -bano来查看哪些应用程序正在侦听哪些端口。

But Usually following applications uses port 80 in windows.

但是通常以下应用程序在 Windows 中使用端口 80。

  1. IIS
  2. World Wide Web Publishing service
  3. IIS Admin Service
  4. SQL Server Reporting services
  5. Web Deployment Agent Service
  1. 信息系统
  2. 万维网发布服务
  3. IIS 管理服务
  4. SQL Server 报告服务
  5. Web 部署代理服务

Stop above applications if running and check!!!

如果正在运行,请停止上述应用程序并检查!!!

回答by MMind

Use TcpViewto find the process that listens to the port and close the process.

使用TcpView查找监听端口的进程并关闭进程。

回答by Kinjal Dixit

Other option to try is to stop SQL Server Reporting Services.

尝试的其他选项是停止 SQL Server Reporting Services。

回答by MBaas

Try

尝试

netstat -anb -p tcp

that show ports and processes

显示端口和进程

回答by Warwicky

You can use net stop httpit will display which process is using. Moslty world wide web services are using

您可以使用net stop http它来显示正在使用的进程。Moslty 万维网服务正在使用

回答by Gene

Type in "netstat -ano" into your command line. I saw that it was showing something for Local Address port 0.0.0.0:80.

在命令行中输入“netstat -ano”。我看到它显示了本地地址端口 0.0.0.0:80 的内容。

My issue was because I had SQL Server Reporting Services on Port 80. So I followed these instructions and changed the port # from 80 to 81:

我的问题是因为我在端口 80 上有 SQL Server Reporting Services。所以我按照这些说明将端口号从 80 更改为 81:

http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/

http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/

Here is a picture of my command line AFTER I changed the port number for SQL Server Reporting Services:

这是更改 SQL Server Reporting Services 端口号后命令行的图片:

enter image description here

在此处输入图片说明

If you are still having the same issue, read this forum:

如果您仍然遇到相同的问题,请阅读此论坛:

http://forum.wampserver.com/read.php?2,66196,66233#REPLY

http://forum.wampserver.com/read.php?2,66196,66233#REPLY