By default, nginx does not allow listing the entire directory. How do I enable the nginx directory file list function?
Open the nginx. conf file and add it to the location server or HTTP segment.
Autoindex on;
We recommend that you add the following two parameters:
Autoindex_exact_size on;
The exact size of the file, in bytes.
After changing to off, the approximate size of the file is displayed. The unit is kb, MB, or GB.
Autoindex_localtime on;
The default value is off. The displayed file time is GMT.
After changing to on, the displayed file time is the file server time
How to configure nginx directory list see: http://wiki.nginx.org/NginxChsHttpAutoindexModule
Configuration example:
Location/upload {Autoindex on; autoindex_exact_size on; autoindex_localtime on; aliasf: \ PHP \ upload ;}
Display example:
Enable the nginx directory file list Function