早上电脑开机遇到了这个问题,之前也遇到过这个问题,直接重启了一次,自己没解决这个问题,这次又碰到了。
用CMD 命令查看会发现被线程4的kernel & System占用。我直接用的XAMPP也可以看到
8:59:22 [Apache] Problem detected!
8:59:22 [Apache] Port 80 in use by “Unable to open process” with PID 4!
8:59:22 [Apache] Apache WILL NOT start without the configured ports free!
8:59:22 [Apache] You need to uninstall/disable/reconfigure the blocking application
8:59:22 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
查看任务管理器,
只好百度NT kernel & System 查看//www.2cto.com/os/201111/111269.html这篇文章,找到了解决办法
该进程是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
按y 确定
在运行 Sc config http start= disabled
好了,现在启动Apache,可以启动了。
在查看一下netstat -ano
发现pid 4占用了445端口