apache出現You don't have permission to access

apache出現You don't have permission to access / on this server. 提示

今天在新的linux上跑原來的代碼,使用的虛擬主機的模式進行操作。幾個相關的網站放在一個文件裏,想法是通過網站列出的目錄進行相應的網站進行操作。一切設置完成後,在瀏覽器中運行出現在You don't have permission to access / on this server.  提示。查了一下apache手冊找到問題所在處。這裏定義了默認對網站根的訪問權限。

# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

這裏改成

<Directory />
    Options Indexes FollowSymLinks
    AllowOverride None
</Directory>

問題解決

發佈了58 篇原創文章 · 獲贊 0 · 訪問量 3367
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章