apache访问权限的诡异表现,纠结了好久都木有结果

2011-09-21 23:26:44 +08:00
 xinkiang
httpd.conf中的部分信息:

DocumentRoot "/var/web"
<Directory "/var/web">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>


在/var/web目录下执行ls -l的结果
-rwxrwxrwx. 1 apache root 22 9月 22 22:28 index2.php
-rwxrwxrwx. 1 apache root 22 9月 22 22:44 info.php

可在浏览器上http://localhost/index2.php能正确显示,而http://localhost/info.php却显示403
Forbidden
You don't have permission to access /info.php on this server.

纠结了一天啊有木有!Help ! !
4394 次点击
所在节点    问与答
4 条回复
dongsheng
2011-09-21 23:30:41 +08:00
> AllowOverride All

这个目录里没有藏着个.htaccess吧?
xinkiang
2011-09-21 23:34:53 +08:00
@dongsheng 没有,目录是新建的~
micate
2011-09-22 00:14:02 +08:00
shell 里面执行这个结果是?
sestatus

还有 info.php 里面是什么,有 header() 之类的操作么?
xinkiang
2011-09-22 00:25:15 +08:00
@micate index2.php和info.php里面是相同的内容....

找到答案了,http://hi.baidu.com/lkx229/blog/item/b07a71d5229d7414a18bb7c7.html

谢谢@dongsheng 和 @micate 的回答哈!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/18460

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX