LinuxSir.cn,穿越时空的Linuxsir!

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

关于apache +php 在redhat as4的系统上

[复制链接]
发表于 2005-3-24 14:55:57 | 显示全部楼层 |阅读模式
安装好以后 apache可以正常访问 也可以浏览php文件 但是我现在想建立用户的个人权限目录 我的httpd.conf 这样的 就是想实现localhost/~username/file.php 这样来浏览用户下面的目录文件
<IfModule mod_userdir.c>
    #
    # UserDir is disabled by default since it can confirm the presence
    # of a username on the system (depending on home directory
    # permissions).
    #
    #UserDir disable

    #
    # To enable requests to /~user/ to serve the user's public_html
    # directory, remove the "UserDir disable" line above, and uncomment
    # the following line instead:
    #
    UserDir public_html

</IfModule>

<Directory /home/*/public_html>
    #AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>
其他的都没改  
如何浏览的时候 出现这样的错误
You don't have permission to access /~paul/test.php on this server.

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

一看就知道权限问题 如何我作到paul的目录 chmod 777 -R paul  这样做了 也还是出现这样的错误 艾 以前chmod755 都可以拉 怎么现在777还没有权限访问啊  谢谢大家了
发表于 2005-3-24 15:17:33 | 显示全部楼层
和我碰到的问题一样
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-24 15:26:58 | 显示全部楼层
那怎么解决啊 我搞了一上午拉 也不行啊 好郁闷啊   google都g好多次拉 艾
回复 支持 反对

使用道具 举报

发表于 2005-3-24 16:13:35 | 显示全部楼层
cd ~paul
chmod 777 *
试1xia
回复 支持 反对

使用道具 举报

发表于 2005-3-24 16:19:33 | 显示全部楼层
<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>

<Directory /home/*/public_html>
#AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all ==>改为Allow from all或者在下面加上允许访问的地址。
</LimitExcept>
</Directory>
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-24 16:21:55 | 显示全部楼层
还是不行啊 真郁闷啊  是不是as4里面的权限控制不一样的啊  好郁闷啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-24 16:25:34 | 显示全部楼层
也改了 allow拉 也不行拉  怎么会这样啊 在线等大家的帮忙 自己搞了一上午 头都大拉 艾
回复 支持 反对

使用道具 举报

发表于 2005-3-24 16:27:23 | 显示全部楼层
你在你的用户目录下建public_html这个目录了吗?必须在这个目录下才行呀
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-3-24 16:31:40 | 显示全部楼层
是啊 我是到paul的目录下面mkdir public_html目录 这个没有怀疑的 而且我把文件放到/var/www/html/下面可以访问正常 我就不知道怎么用户就不行
回复 支持 反对

使用道具 举报

发表于 2005-3-24 16:40:59 | 显示全部楼层
以前用redhat9做过,很顺利的。你查看一下系统中有没有mod_userdir.c这个module,没有的话,应该也是不行的。现在我不喜欢用一些发行版的linx,还是LFS好啊,什么问题都在自己的掌握中。。。
回复 支持 反对

使用道具 举报

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

本版积分规则

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