http启动(重启)报错:Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

【问题】

1、http启动(重启)报错

systemctl start httpd

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

在这里插入图片描述

【解决方案】

1、用systemctl status httpd.service查看,发现80端口被占用

systemctl status httpd.service

在这里插入图片描述

2、用netstat -antlp | grep 80查看端口被哪一服务占用

netstat -antlp | grep 80

在这里插入图片描述
由图看到是squid服务占用了80端口

3、关闭squid服务,再次启动,成功!

[root@web1 ~]# systemctl stop squid.service 
[root@web1 ~]# systemctl start httpd

在这里插入图片描述

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐