以下為引用的內容: <Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all Satisfy all </Directory> |
根據配置文件提示,此設置是用于修改Apache對所有目錄的訪問權限的,如果任意修改,可能會帶來安全隱患的!那我們來看看到底是什么在作祟,讓我們無法訪問網頁的吧!
Deny from all 有點英文基礎的都可以看的出來,這里是關鍵:拒絕所有!
將Deny改為Allow試試!(因為可能會存在大小寫敏感的問題,所以推薦用首字母大寫,有興趣的可以自己嘗試小寫!)一下通過了,但是這樣配置的話服務器安全性會...
于是我繼續往下看配置文件!
發現了以下內容
#
# This should be changed to whatever you set DocumentRoot to.
#
以上這行注釋的意思:無論你的服務器根目錄設置為什么,你都必須保證此處配置保持一致!
以下為引用的內容: <Directory "默認目錄"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # </Directory> |
再將以上的"默認目錄"設置為"目標目錄",(當然已經將對所有權限訪問的設置修改為拒絕了!)刷新一下頁面,OK,通過了!
新聞熱點
疑難解答
圖片精選