nginx 允许访问目录,即列出目录
server {
....
location / {
index index.php index.html index.htm;
}
location / {
autoindex on;
}
}
禁止访问目录
location /dirdeny {
deny all;
return 403;
}