码迷,mamicode.com
首页 > 数据库 > 详细

解决问题 “You don't have permission to access /index.html on this server.”

时间:2015-04-01 23:21:15      阅读:321      评论:0      收藏:0      [点我收藏+]

标签:

前几天装一个linux 企业版5.0安装了apache,打开测试页面的时候出现如下错误:

Forbidden

You don‘t have permission to access /index.html on this server.

开始我以为我配置出错,花半天时间都没有搞定,今天终于搞定了.

原因:index.html是用root用户建的文件,apache权限不够。

解决方法:更改文件权限;chmod 755 index.html

 

如果是WIN 2003下出现这个问题,请按以下方式解决

打开apache配置文件httpd.conf,找到这么一段:
<Directory />
     Options FollowSymLinks
     AllowOverride None
     Order deny,allow
     deny from all
     Satisfy all
</Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页,哈哈!居然问题就出在这,访问测试网站完全正常了。

 

 

第二种方法

是Apache  的配置文件httpd-vhosts.conf里,打开了扩展配置

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

前面的#去掉了,就 引入了扩展配置,而扩展配置 文件里又没配好相应 的权限“Allow from all”,所以提示此错误

解决问题 “You don't have permission to access /index.html on this server.”

标签:

原文地址:http://www.cnblogs.com/vania/p/4385543.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!