I am trying to make my subpath as directory listing only in Nginx, however it returns 404.
Suppose I have following config for http://file.example.com/test
:
server {
listen 80;
server_name file.example.com;
location /test/ {
root /var/www/abc/def/;
autoindex on;
autoindex_exact_size off;
autoindex_format html;
autoindex_localtime on;
}
}
I didn't specify /
section, is it the issue caused above not working? Anything I missed?