一、Windows版
修改配置文件:Apache目录/conf/httpd.conf
<Directory "x:/www">
Options Indexes FollowSymLinks
#(有Indexes为显示目录,无Indexes为不显示目录)
AllowOverride None
Order allow,deny
Allow from all
</Directory>
二、Liunx版
修改配置文件:/etc/apache2/sites-available/000-default.conf
在 DocumentRoot /var/www/html 这一行后增加
<Directory /var/www/html>
# /var/www/html为网站根目录,必须有
Options Indexes FollowSymLinks
#(有Indexes为显示目录,无Indexes为不显示目录)
AllowOverride None
Order allow,deny
Allow from all
</Directory>