我试图为我的应用服务器使用端口80,但当我执行netstat -aon时,我得到:
TCP 0.0.0.0:80 0.0.0.0:0监听4
当我在任务管理器中查找进程时,它显示PID 4是SYSTEM,就是这样。没有扩展…什么都没有。“系统”。这是怎么回事?
我害怕结束这个过程,我该怎么办?
我试图为我的应用服务器使用端口80,但当我执行netstat -aon时,我得到:
TCP 0.0.0.0:80 0.0.0.0:0监听4
当我在任务管理器中查找进程时,它显示PID 4是SYSTEM,就是这样。没有扩展…什么都没有。“系统”。这是怎么回事?
我害怕结束这个过程,我该怎么办?
当前回答
尝试netstat -b,这可能会对情况有所帮助(显示什么.exe正在使用端口)。祝你好运。
其他回答
如果您使用雷蛇产品并在PC上安装雷蛇Synapse软件,它也会阻塞端口80。
它不包括在netstat命令中,因此我无法排除故障。由于软件中包含了许多服务,所以我无法分析是哪个服务阻塞了端口。卸载Razer Synapse后,我可以在Windows 10上重新启动Apache服务器。
这不能解释PID方面的事情,但如果你运行Skype,它喜欢使用端口80出于某种原因。
工作解决方案-在Windows 10上测试
造成这种情况的原因有很多,我推荐的一个原因/解决方案是:
以管理员身份打开命令行,然后:
停止HTTP服务
Net停止HTTP /y
配置'http'服务默认为禁用
Sc config HTTP start=disabled
如果上述解决方案不工作,找到你的具体情况-在这里
重新启动web服务器/XAMPP/Apache,你就完成了。
重新启用http服务
use
sc config HTTP start= demand
解释的来源在这里
https://web.archive.org/web/20190917190806/http://servicedefaults.com/10/http/
这些对我都没用。我不得不回答一个超级用户的问题。
If it is a System Process—PID 4—you need to disable the HTTP.sys driver which is started on demand by another service, such as Windows Remote Management or Print Spooler on Windows 7 or 2008. There is two ways to disable it but the first one is safer: Go to device manager, select “show hidden devices” from menu/view, go to “Non-Plug and Play Driver”/HTTP, double click it to disable it (or set it to manual, some services depended on it). Reboot and use netstat -nao | find ":80" to check if 80 is still used.
这招对我很管用!
WINDOWS 11
对我来说,是万维网发布服务(World Wide Web Publishing Service)让系统使用80端口。
希望这对Win11新用户有所帮助。