歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> apache提示DocumentRoot must be a directory的問題

apache提示DocumentRoot must be a directory的問題

日期:2017/3/1 17:14:11   编辑:關於Linux
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 ]
Copyright © Linux教程網 All Rights Reserved