Maximillian Laumeister asked:
I am trying to get nginx to ignore
index.html files and always show a directory listing from the
If I remove my
index line, nginx still defaults to serving
index.html files, so that is not a solution.
A similar question was asked on Stack Overflow, but I am looking for a solution that does not involve inventing a bogus file name, if such a solution exists (not to mention the thread is off topic there).
How can I change my
index directive to tell nginx to never show index files?
Instead of removing the
index directive, you should set it to a name which is not reasonably expected to exist, so that it never matches any file.
You may not like this solution. It is a little inelegant. But it works well and does exactly what you want, while nothing else does.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.