当前位置:   article > 正文

systemctl start httpd 报错

systemctl start httpd

[root@localhost redhat]# 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.
这是因为SELINUX(一种安全机制)默认开着的
需要我们关闭,命令是setenforce 0 进行关闭
getenforce 查看
enforcing 代表强制模式
permissive 代表建议模式也就是没有强制启用模式
在这里插入图片描述
之后。再来打开httpd服务,查看状态就可以了
在这里插入图片描述
补充:
如果以上方法还是不能启动httpd,还是会报相同的错,那说明,你的自定义配置文件写错了。仔细检查!!!!注意路径!!!
划红线的就是我自定义的配置文件,进去检查后发现结束标签没写。关键字也要注意不要写错了。
[root@localhost ~]# cd /etc/httpd/conf.d

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/208693
推荐阅读
相关标签
  

闽ICP备14008679号