日期:2014-05-16  浏览次数:20775 次

apache提示目录不存在解决办法

?

在Centos上用yum -y install httpd*安装了Apache,启动的时候总是提示目录不存在的错误:

  1. # /etc/init.d/httpd restart
  2. Stopping httpd: [ OK ]
  3. Starting httpd: Warning: DocumentRoot [/home/wwwroot/***.com] does not exist
  4. [ OK ]

到服务器里检察了一下,目录是存在的,写法也没错,开始以为是权限的问题,后台赋予了777权限也还是不行,GOOGLE上找了一圈,结果发现是SElinux的问题,输入以下命令:

  1. setsebool -P httpd_disable_trans on

然后再次重启:

  1. /etc/init.<