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

讨论HarmonyOS开发技术,专注于API与组件、DevEco Studio、测试、元服务和应用上架分发等。

更多推荐