The file browsing feature is implemented using the ngx_http_autoindex_module
module, with few optional configuration items.
location / {
root /path/to/folder/;
autoindex on | off; # Enable nginx directory browsing feature
autoindex_exact_size on | off; # File size format
autoindex_localtime on | off; # Whether the server uses local time
}
In practical use, it is recommended to use location in conjunction with routing access.