(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80
Posted mmzs
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80相关的知识,希望对你有一定的参考价值。
(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80
问题描述:
80端口已经被占用,导致启动不了
解决思路:
- 一种是比较简单的情况,查看80端口进程号,然后
kill -9 该进程号
关闭占用该80端口的进程,然后重启即可 - 另一种是查询不到80端口被占用,但是出现这样的提示,我困惑很久,最后是参考该文得到的思路https://www.digitalocean.com/community/questions/98-address-already-in-use-ah00072-make_sock-could-not-bind-to-address-80-error
我的解决办法:
找到有可能配置的listen 80
的配置文件(例如:nginx的配置文件等),看是否和/etc/httpd/conf/httpd.conf
配置的有冲突,如果有,则需要需改其中一个即可解决。
总结:
其实这个问题并不是很大,但是容易忽略解决点,不要仅仅是看错误提示的字面意思;占用不一定是进程占用,还有可能是配置文件冲突导致的占用。
以上是关于(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80的主要内容,如果未能解决你的问题,请参考以下文章
socketserver OSError:[Errno 98] Address already in use
Swoole计一次swoole_server配合laravel5启动报错:Address already in use[98]
修改nignx报错Nginx [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)解决