nginx关闭目录浏览功能

nginx图片服务器,因为图片的敏感度,不允许直接访问图片的目录:

需要修改配置文件,去掉 autoindex on; 重启nginx即可

location /soft {

  #autoindex on;#去掉这一行内容

  autoindex_exact_size off;

  autoindex_localtime on;
}

原文地址:https://www.cnblogs.com/taiguyiba/p/10094979.html