apache提示DocumentRoot must be a directory

环境centos 6.4

在将apache默认目录修改为home下的目录时候,重启apache会提示DocumentRoot must be a directory.

一般情况下SElinux不允许home作为web目录。下面命令可以查看。

getsebool -a |grep httpd_enable_homedirs


解决方法就是

setsebool httpd_enable_homedirs on
之后重启apache就可以了!


你可能感兴趣的:(apache,linux,centos,httpd)