linux系统中documentroot不存在的解决方法

[复制链接]
查看1133 | 回复4 | 2018-1-18 12:40:31 | 显示全部楼层 |阅读模式
[align=left]重启Apache提示DocumentRoot does notexist,类似如下:
Stopping httpd: [ OK ]
Starting httpd: Warning: DocumentRoot [/var/www/html/test] does not exist[/align][align=left]奇怪的是路径明明已经存在。查了下发现一般是由于启用了SELINUX导致的,解决方法为禁用SELINUX:
1.编辑selinux配置文件/etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
一般内容如上面所示,将SELINUX=enforcing改成SELINUX=disabled然后重启服务器即可。[/align][align=left]2.如果不想重启服务器,直接执行
# setenforce 0
即可。[/align][align=left]再重启Apache就正常了。[/align]
回复

使用道具 举报

狭缝求生室 | 2022-3-15 15:28:24 | 显示全部楼层
有情怀的站啊,爱了
回复

使用道具 举报

术数古籍专卖疤 | 2022-3-24 21:35:17 | 显示全部楼层
这个站很好,资源多,教程全
回复

使用道具 举报

困虫斗倜 | 2022-6-1 17:02:06 | 显示全部楼层
支持悟空源码,越来越好
回复

使用道具 举报

123457108 | 2023-3-7 10:16:37 | 显示全部楼层
我是来白嫖悟空源码的资源的!
回复

使用道具 举报

水果甜蜜蜜潮 | 2024-3-15 05:00:48 | 显示全部楼层
这个站很好,资源多,教程全
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则