Ubuntu apache 禁止目录浏览

$ sudo vim /etc/apache2/sites-enabled/000-default

将Options后面Indexes前面加上"-"表示禁止目录浏览:

<Directory /var/www/>

  Options -Indexes 

......

</Directory>

然后重启apache

$sudo service apache2 restart

 

posted @ 2014-01-14 18:10  yshy  阅读(1282)  评论(0编辑  收藏  举报