80端口被NT Kernel & System 占据

解决Windows 7 Beta中HTTP.sys占用80端口导致Apache无法启动的问题
本文详细介绍了如何解决Windows 7 Beta操作系统中HTTP.sys技术占用80端口,导致安装Apache失败的问题。通过运行特定命令并调整系统配置,最终成功启动了Apache。

这个问题也困扰了我一段时间,刚开始这样查看也没有发现是80端口是被NT Kernel & System 占据,然后在网上也查了很多的方法都不行,今天偶然打开就发现了原来80端口是被NT Kernel & System 占据,以下是解决的方法。

不知道装了什么东西之后,发现已经无法启动了Apache,80端口被占用,于是win+r 运行cmd

输入netstat -ano

20111116010312678.jpg

可以看到80端口被PID4占用,于是打开任务管理器-进程-查看,选择列,勾选PID

可以看到pid 4 的被NT kernel & System 占用

20111116010313643.jpg

 

在网上找了很久找到解决方案

http://www.cameroncooke.com/2009/01/25/windows-7-uses-port-80-and-makes-it-impossible-to-install-apache-solution/comment-page-1/#comments

原文:

i work on Http.sys technology at Microsoft and somebody sent me a link to this blog. I am a bit surprised by this behavior you are seeing on Windows7 Beta and with some help you, I will like to find out the root cause of this issue sothat we can take the appropriate action if needed.
You are right, Http.sys uses port 80. It is the driver component for httpapi, the server http stack (You can find moreinfo on this technology
at?http://msdn.microsoft.com/en-us/library/aa364434(VS.85).aspx?). In your case, some application is running which is using http.sys to listen on port 80. This is preventing Apache using port 80. We offer a mechanism for applications to help control port sharing but I’ll need to look into the specific application that’s causing you this conflict. If you can give us the output of following command “netsh http show servicestate”, then it will allow me to find out which application is using http.sys. Since you have disabled http.sys, please follow these steps listed below before running the command:

1. sc config http start= demand
2. Reboot
3. Run the command (netsh http show servicestate) as administrator After you have run this command, you can disable http.sys as follows: 1. net stop http
2. Sc config http start= disabled
Please let me know if you face any issues in the process. Thanks, Niranjan

 

翻译如下:

该进程是Http.sys。它是http API的驱动组件,Http栈服务器。如果该端口被Http.sys占用,说明一些正在使用http.sys的应用程序在运行。这就是阻止Apache运 行的原因,因为Http.sys占用着80端口。我们提供了一种应用程序的机制来帮助控制端口共享,但是我需要调查导致你遇到这种困难的是什么特殊应用程 序。如果你能提供给我们“netsh http show servicestate”这条命令的输出结果,我就能找出是哪个应用程序在使用Http.sys。在你禁用Http.sys之前,请按照下面的步骤来运 行命令:

1. sc config http stat = demand

2. reboot

3. run the command(netsh http show servicestat)as administrator

在你使用这个命令之前,你可以按照下面步骤禁用http.sys:

1. net stop http

2. Sc config http start= disabled

 

于是运行net stop http

 

20111116010313682.jpg

按y 确定

 

20111116010334391.jpg

在运行 Sc config http start= disabled

 

20111116010334660.jpg

好了,现在启动Apache,可以启动了。

在查看一下netstat -ano

发现pid 4占用了445端口

 

转载于:https://www.cnblogs.com/gxldan/archive/2013/05/12/4066899.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值