LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 974|回复: 2

web服务器主页的问题(奇怪的很)

[复制链接]
发表于 2007-12-5 15:56:30 | 显示全部楼层 |阅读模式
Linux localhost.localdomain 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux
httpd-2.0.54-10

[root@localhost html]# ls -l 1.html 1.php abcd.html
-rw-r--r--  1 root root 10 12月  5 15:12 1.html
-rw-r--r--  1 root root 17 12月  5 14:58 1.php
-rw-r--r--  1 root root 12 12月  5 15:24 abcd.html


[root@localhost html]# cat 1.html
dsfdsfsdf
[root@localhost html]# cat 1.php
<? phpinfo(); ?>
[root@localhost html]# cat abcd.html
adfsgfsddsg


3个文件在同一个文件夹/var/www/html

只要把abcd.html在DirectoryIndex设置为主页  就出现下面的错误信息,被拒绝访问
其他二个正常 而且把其他的设置为主页面,后面加上
http://ip/abcd.html
也是这个问题



Forbidden
You don't have permission to access /abcd.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/2.0.54 (Fedora) Server at 192.168.1.112 Port 80

我现在死活找到不原因

请大家指点下吧
发表于 2007-12-5 17:23:50 | 显示全部楼层
估计就是访问不了。ls -lZ看一下,是不是selinux搞的鬼。或者看看日志,有没有什么有用的信息。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-5 19:20:18 | 显示全部楼层
果然是SELINUX 本人已经停掉了
那个文件是我从其他地方拷贝过来
而能访问的是我自己在机器用VI建的

呵呵

-rw-r--r--  root     root     rootbject_r:httpd_sys_content_t 1.html
-rw-r--r--  root     root     rootbject_r:httpd_sys_content_t 1.php
-rw-r--r--  root     root     rootbject_r:user_home_t        abcd.html

能否解释下中间rootbject_r:httpd_sys_content_t的意思
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表