如何强制自动索引并忽略index.html文件

cad*_*eus 7 nginx mod-autoindex

当nginx为具有autoindex的目录提供服务时,它将列出文件,但是当index.html存在时,浏览器将加载该文件.我希望它忽略它.

server {
    listen      80;
    server_name herbert;

    location / {
        root /srv/www;
        index index.htm index.html;
        add_header Cache-Control no-cache;
        expires 300s;
    }

    location /site-dumps/ {

        root /srv/www/;
        autoindex on;
    }
}
Run Code Online (Sandbox Code Playgroud)

Zak*_*wan -1

把:index main.html main.htm;代替index index.htm index.html;