当前位置: > Linux服务器 > apache >

apache的userdir 403 Forbidden问题的解决办法

时间:2014-10-18 17:27来源:linux.it.net.cn 作者:it

apache的userdir模块:http://httpd.apache.org/docs/2.2/howto/public_html.html

以前没用过,想用一下,可是就是很403,日志也是简单的
Permission denied: access to /~username denied

后来在另一台用yum安装的服务器上找到答案。
# 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.


 

代码如下:
#chmod -R 711 /home/*
#cd /home/username/
#chmod 755 -R public_html
(责任编辑:IT)
------分隔线----------------------------