Ubuntu apache 禁止目录浏览时间:2023-03-09 20:51:46 $ sudo vim /etc/apache2/sites-enabled/000-default 将Options后面Indexes前面加上"-"表示禁止目录浏览: <Directory /var/www/> Options -Indexes ...... </Directory> 然后重启apache $sudo service apache2 restart