【Web笔记】httpd-Starting httpd: (98)Address already in use

姜嘉良
2023-12-01

启动apache httpd服务时报错:

# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address x.x.x.x:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

解决步骤:

1) 查看是否有进程占用80端口:

# netstat -nltp |grep 80
没有进程占用。

2) 查看httpd配置文件

# vim /etc/httpd/conf/httpd.conf
Listen host:80
Listen host:80

发现httpd.conf里面配置了两条Listen,删掉一条之后,httpd正常启动。


总结:

1) 做应用部署时,要细心、严谨;

2) httpd启动的时候会顺序的加载配置文件??如果有一步骤执行失败,则启动失败。

 类似资料: