1
三/09
0

apache的userdir配置403forbidden问题



想在自己机器上搭建个web环境测试方便,谁知道UserDir指令怎么都配置不好,浏览器都会显示403forbidden。这个问题郁闷了好久,大部分文档都说public_html目录要把权限设置为755,而我的权限本来就是755啊。还有说UserDir指令要设置disabled和enabled,我想那只是对特别用户的权限设置,我根本不用理会这个,但依然问题如故。今天看到这些注释:

# UserDir: The name of the directory that is appended onto a user’s home
# directory if a ~user request is received.
#
# The path to the end user account ‘public_html’ directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.

随即再看了看配置文件,将/home/terrysco目录权限设置为711,重启apache后访问http://localhost/~terrysco,成功了!


相关文章

关键字:
评论 (0) Trackbacks (0)

没有评论

发表评论

No trackbacks yet.