nginx Index Directory Configuration

For simple file sharing, some people use svn, some people use ftp, but more people have to use an index (index) function. apache have a powerful indexing, and most commonly appear, nginx was auto_index implement directory index was less than normal, but function is very simple. We have to first look at renderings. [Caption ID = "attachment_2590" align = left = "alignnone" width = "524"] FIG effect index nginx auto_index Nginx auto_index Used by rendering index [/ caption]  

nginx configuration

        location ~ ^/2589(/.*)
        {
                autoindex on; //开启
                autoindex_localtime on;//开启显示功能
        }

auto_index instruction

grammar: autoindex on | off;
Configuration section:
autoindex off;
Configuration section: http, server, location
Enable / nginx only directory indexing.  
grammar: autoindex_exact_size on | off;
Configuration section
autoindex_exact_size on;
Configuration section: http, server, location
Whether the development of additional displays the file was too size, in bytes, mb, gb, etc. The default is to open too  
syntax: autoindex_localtime on | off;
Configuration section:
autoindex_localtime off;
Configuration section: http, server, location
Specifies whether to display the file or directory was time, the default is not displayed in the index can be found nginx is very simple, far worse than in the apache. Nginx has a lot of fans will not see passed, has developed a nice index plug-in, called fancy index Stay tuned for the next section. Nginx + Fancy achieve beautiful index directory please indicate the source: http: // www .ttlsa.com / html / 2589.html

Reproduced in: https: //my.oschina.net/766/blog/211550

Guess you like

Origin blog.csdn.net/weixin_33701617/article/details/91493205