Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to add

 

问题描述:

启动 Apache 时报错:

[root@localhost sh]# service httpd start
Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                        
问题分析:启动apache时,apache配置文件默认使用的80端口,被其他程序所占用。
解决方法1:查询占用 80 端口的进程,然后杀掉该进程:

查询80端口占用的进程
[root@localhost sh]# netstat -tulnp | grep ":80"
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1327/ngi
posted @ 2020-06-28 15:22  Linux黑客小课堂  阅读(176)  评论(0)    收藏  举报