nginx关闭目录浏览功能

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

nginx关闭目录浏览功能_第1张图片

 

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

location /soft {

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

  autoindex_exact_size off;

  autoindex_localtime on;
}

nginx关闭目录浏览功能_第2张图片

 

转载于:https://www.cnblogs.com/taiguyiba/p/10094979.html

你可能感兴趣的:(运维,json)