First, the system environment
ubuntu6.4 system
nginx 版本: nginx / 1.10.3 (Ubuntu).
Second, turn on directory browsing
Nginx default is not allowed to list the entire directory. For this, edit the virtual host configuration file, add in the location server or http segment
autoindex on;
the other two parameters is best to also add:
autoindex_exact_size OFF;
default is on, showing the exact size of the file, the unit is bytes.
Later changed to off, the file shows the approximate size of the unit is kB or MB or GB
autoindex_localtime ON;
the default is off, the display file times are GMT time.
After the change on, the time display of the file as a file server time
Third, modify the configuration nginx.conf
1, modify configuration files nginx
If the local ip address is 192.168.4.1, enter in your browser http://192.168.4.1:80
If you have index.html file systems under Linux / var / www / html directory, the browser displays the contents of the index.html file, otherwise display files in a directory