根据个人需求,网站的某些目录是要去被允许显示目录文件列表的,比如下载文件的所在目录,在nginx下的配置如下:
location /down {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
重启nginx生效
service nginx restart
或者使用
/usr/nginx/sbin/nginx -s reload
根据个人需求,网站的某些目录是要去被允许显示目录文件列表的,比如下载文件的所在目录,在nginx下的配置如下:
location /down {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}
重启nginx生效
service nginx restart
或者使用
/usr/nginx/sbin/nginx -s reload