apache提示DocumentRoot must be a directory的问题


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
原来是SELinux不允许使用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  ]
 

相关内容

    暂无相关文章