用途:在目錄下如果沒有默認(rèn)首頁面(如index.html default.htm)時(shí)防止用戶訪問web時(shí)瀏覽目錄
打開httpd.conf
查找Options Indexes FollowSymLinks
修改為:
Options -Indexes FollowSymLinks
修改保存退出,重新啟動(dòng)apache
訪問http://127.0.0.1如果看到以下提示說明修改成功
Forbidden
You don't have permission to access / on this server.
Apache/2.0.53 (Unix) Server at 192.168.0.1Port 80
?
?
?
開啟瀏覽:
<Directory />
??? Options FollowSymLinks
??? AllowOverride None
??? Options Indexes?????????? #就加這句就可以了,目錄按需要選擇
</Directory>
posted on 2007-10-29 02:15
EricWong 閱讀(5342)
評(píng)論(0) 編輯 收藏 所屬分類:
Java