Ngx_http_autoindex_module This module is used to automatically generate a list of directories, Ngx_http_autoindex_module only make requests when the Ngx_http_index_module module does not find an index file.
Nginx default is not allowed to list the entire directory.
Open Directory list:
Open the nginx.conf file and join in the Location server or HTTP segment
AutoIndex on;
For example:
HTTP {
Include Mime.types;
Default_type Application/octet-stream;
AutoIndex on;//Auto Display directory
Autoindex_exact_size off;//user-friendly way to display file size otherwise, it is displayed in byte
Autoindex_localtime on;//is displayed by server time, otherwise it is displayed in GMT time
Server_names_hash_bucket_size 128;
Client_header_buffer_size 32k;
Large_client_header_buffers 4 32k;
Client_max_body_size 8m;
Limit_zone one $binary _remote_addr 32k;
Sendfile on;
Tcp_nopush on;
Keepalive_timeout 60;
Tcp_nodelay on;
gzip on;
Gzip_min_length 1k;
Gzip_buffers 4 16k;
Gzip_http_version 1.0;
Gzip_comp_level 2;
Gzip_types text/plain application/x-javascript text/css application/xml;
Gzip_vary on;
Log_format wwwlogs ' $remote _addr-$remote _user [$time _local] $request $status $body _bytes_sent $http _referer $http _user _agent $http _x_forwarded_for ';
#include default.conf;
Include vhost/*.conf;
}
autoindex_exact_size off; The
default is on to show the exact size of the file, in bytes.
When off, displays the approximate size of the file, in kilobytes or MB or GB
The
default is off, and the file time displayed is GMT time.
When on, displays the file time as the file's server time
Configure the Nginx directory list method detailed reference: Http://wiki.nginx.org/NginxChsHttpAutoindexModule
If you want the directory list to support Header,footer, you can install the three-party plug-in: http://wiki.nginx.org/ Nginxngxfancyindex
Nginx_ Open Directory file list feature