作者:手机用户2502855767 | 来源:互联网 | 2014-05-23 14:01
apache提示DocumentRootmustbeadirectory的问题将DocumentRoot改为/home/test/www后提示:Startinghttpd:Syntaxerroronline293of/etc/httpd/conf/httpd.conf:DocumentRootmustbea...
apache提示DocumentRoot must be a directory的问题
将DocumentRoot改为/home/test/www后提示:
Starting httpd: Syntax error on line 293 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
www.2cto.com
[root@sl ~]# getsebool -a |grep httpd_enable_homedirs
httpd_enable_homedirs --> off
原来是SE
Linux不允许使用home目录作为web目录
修改SELinux设定
[root@sl ~]# setsebool httpd_enable_homedirs on
www.2cto.com
之后重启apache,一切正常
[root@sl ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]