今天章郎蟲在配置apache服務(wù)器的時候在web目錄里面放了很多網(wǎng)站的目錄,我的想法是在瀏覽器里面輸入網(wǎng)址后可以列出目錄??墒且磺性O(shè)置完成,在瀏覽器中輸入本地地址后,出現(xiàn)“you don’t have permission to access / on this server.”的 提示。在網(wǎng)上胡亂找了下后,總算是解決了問題。
在apache的安裝目錄找到“/conf/httpd.conf”文件,這里定義了默認對網(wǎng)站根的訪問權(quán)限。
#?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>