通常網站沒有index首頁時會出現整個網站的檔案列表 這時其他人就能知道裡面有什麼檔案 甚至他還能到其他資料夾瀏覽你的檔案 請找到httpd.conf裡面的這一段 # # 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.0/mod/core.html#options # for more information. # (原本) Options Indexes FollowSymLinks MultiViews ExecCGI 改為 Options -Indexes FollowSymLinks MultiViews -ExecCGI -Indexes表示沒有index時,不要顯示檔案列表 -ExecCGI表示不要使用CGI程式 (因為我沒用CGI+看到的範例是這個就也-掉了) 接著記得重啟apache及清除暫存空間 應該就行了
創作者介紹
創作者 windqqb 的頭像
windqqb

windqqb

windqqb 發表在 痞客邦 留言(0) 人氣( 330 )