欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

Apache 解决80端口占用问题

程序员文章站 2023-02-26 20:10:34
今天安装mongodb后发现apache无法启动 命令行 services.msc 打开服务 在服务里启动apache2a服务,报错误码1 网上查有很多情况都报的1...

今天安装mongodb后发现apache无法启动

命令行 services.msc 打开服务

在服务里启动apache2a服务,报错误码1

网上查有很多情况都报的1

可以通过命令行下  执行apache bin 下的 httpd.exe进一步了解

ah00548: namevirtualhost has no effect and will be removed in the next release d:/phpstudy/apache/conf/extra/httpd-vhosts.conf:34
(os 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。 : ah00072: make_sock: could not bind to address [::]:80
(os 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。 : ah00072: make_sock: could not bind to address 0.0.0.0:80
ah00451: no listening sockets available, shutting down
ah00015: unable to open logs

看到这里估计是80端口被占用了,我之前也有一次遇到过80被system占用,后来通过修改httpd.conf里的监听端口解决

通过命令行 netstat -ano|findstr 80 查看占用的pid  为4

通过tasklist 显示所有进程

system              4 services          0    108 k

果然还是system占用,这次必须解决,通过查看资料了解到system一般为sql server reporting services (mssqlserver)这个服务

直接去服务里禁用它,apache成功开启

总结

以上所述是小编给大家介绍的apache 解决80端口占用问题 ,希望对大家有所帮助