首页 > 实用技巧 > apache 403错误 You don’t have permission to access on this server

apache 403错误 You don’t have permission to access on this server

apache 403错误 You don’t have permission to access on this server.

在配置好了Apache服务器后,测试已经通过了,但是通过浏览器访问localhost时,出现403错误提示,
Forbidden
You don’t have permission to access / on this server
请教出现这个问题的原因是什么呢?如何解决?

这是由于你更改了你的DocumentRoot,而更改了这个默认值后,下面还有一个值是要随着更改的。就在它下面不远的地方,有这样一段:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "\Your_New_DocumentRoot\">
中括号里的内容就是你更改的新值。这样就不会出现403错误了。

<Directory "/var/www/html1/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

———————————————–

http://hi.baidu.com/vking/blog/item/bc50f3d380296adfa9ec9af4.html
apache昨天调试了一下午,都没有解决这个问题,到今天上午,仔细检查了一遍配置文件httpd.conf,找到这么一段:
<Directory />
     Options FollowSymLinks
     AllowOverride None
     Order deny,allow
     deny from all
     Satisfy all
</Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache,然后再一测试我的网页,哈哈!居然问题就出在这,访问测试网站完全正常了。





实用技巧->

发表评论

无觅相关文章插件,快速提升流量