To simply share files, some people use SVN, others use FTP, but more people use the index feature. Apache has a powerful index, and is also the most common, nginx auto_index implementation of the directory index is small, and the function is very simple. Let's take a look at what we have.
Nginx Auto_index Index
nginx Configuration
1 2 3 4 5 |
Location ~ ^/2589(/. *) { autoindex on; //Open autoindex_localtime on; Turn on display function } |
auto_index Directive
syntax: |
AutoIndex on | off ; |
configuration segment: |
 
|
|
http , server , location |
Enable/Use only Nginx directory indexing feature.
syntax: |
Autoindex_exact_size on | off ; |
configuration segment |
 
1 |
autoindex_exact_size on |
|
|
http , server , location |
Make sure to show the size of the file extra, in bytes, MB,GB, and so on. The default is to open the
syntax: |
Autoindex_localtime on | off ; |
configuration segment: |
 
1 |
autoindex_localtime off |
|
|
http , server , location |
Specifies whether to display the directory or the time of the file, which is not displayed by default
It can be found that the index function of Nginx is very single, far worse than the Apache. There are a lot of nginx enthusiasts can not see the past, developed a beautiful index plug-in, called Fancy Index. Please continue to follow the next section of the content nginx+fancy to achieve a beautiful index directory
Nginx Index Directory Configuration