歡迎您光臨本站 註冊首頁

Apache配用戶目錄后,403沒許可權訪問?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

Apache配用戶目錄后,403沒許可權訪問?

配置在下面


<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 disabled
    #UserDir enabled lab

    #
    # 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 "/home/labftp/upload/*/html"

</IfModule>

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/labftp/upload/*/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>

然後userdir目錄的許可權也設置成了755,selinux也關掉了,但是訪問用戶目錄是還是報403 Forbidden。網上搜了很多,都是因為selinux的原因,但是我已經關了selinux,還是不行,大家有什麼建議?今天弄了一晚上這個問題還沒有解決。

[ 本帖最後由 diker007 於 2009-1-9 22:03 編輯 ]
《解決方案》

forbidden by default.you need configure as follows

Order allow,deny
Allow from all
《解決方案》

設了index沒?
《解決方案》

原帖由 todayhero 於 2009-1-9 22:49 發表 http://bbs.chinaunix.net/images/common/back.gif
forbidden by default.you need configure as follows

Order allow,deny
Allow from all

我安裝你說的改成這樣,還是不行。

<Directory /home/labftp/upload/*/html>
   Order allow,deny
   Allow from all
</Directory>
《解決方案》

原帖由 ttplay 於 2009-1-9 23:29 發表 http://bbs.chinaunix.net/images/common/back.gif
設了index沒?
設了的
《解決方案》

解決了,還是許可權問題。除了/home/labftp/upload/*/html要設置成755外,labftp也要有x許可權
《解決方案》

/home/labftp/upload/*/html
首先要確保Apache用戶對這個目錄有可讀可寫許可權

換個目錄看下
我有次把目錄放在 root 文件夾下,就是訪問不了,鬱悶死了,但是用默認的目錄可以
後來改到 / 根下就能訪問了
《解決方案》

原帖由 diker007 於 2009-1-10 10:52 發表 http://bbs2.chinaunix.net/images/common/back.gif
解決了,還是許可權問題。除了/home/labftp/upload/*/html要設置成755外,labftp也要有x許可權

此法正解.

把upload設置成755都沒用

[火星人 ] Apache配用戶目錄后,403沒許可權訪問?已經有237次圍觀

http://coctec.com/docs/service/show-post-24764.html