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

【转】【原创】Apache 在更改DocumentRoot,或新增虚拟目录之后出现403错误的解决方法汇总详解(Linux)

【原创】Apache 在更改DocumentRoot,或新增虚拟目录之后出现403错误的解决方法汇总详解(Linux)

【一】关于本文

?

  1. 本文讲述在Linux系统下编译安装Apache之后,自行更改DocumentRoot目录指向后,站点出现403错误,浏览器中显示:Forbidden?You?don't?have?permission?to?access?/?on?this?server.

?

  2. 或者设置虚拟目录后的403错误。

?

  3. Apache的httpd服务已经成功启动,一切看似正常,却显示无权限的问题

?

  4. 查看错误日志,其中出现access?to?/?denied?(filesystem?path?'/usr/local/site/test')?because?search?permissions?are?missing?on?a?component?of?the?path条目

?

  5. 设置虚拟目录后,错误日志出现:client?denied?by?server?configuration:?/usr/local/folder

?

  6. 本文采用系统:Linux?Red?Hat?Enterprise?Linux?6(VMware);?Apache版本:2.2.23

?

  7. Apache安装目录:/usr/local/apache

?

?

【二】错误汇总

?

  1. 首先,已经更改httpd.conf配置文件中的DocumentRoot为"/usr/local/site/test",site目录和test目录使用mkdir建立完成,并在test目录下建立index.html,这时,应该查看httpd.conf中如下一段内容:

?