Nginx CONTENT阶段 autoindex、index模块

L 66

 

 

autoindex 指令

syntax : on | off;

default : off;

context : http,server,location;

autoindex_exact_size 指令  针对xml格式 向用户显示相对路径还是绝对路径

syntax : on | off;

default : on;

context : http,server,location;

autoindex_format 指令

syntax : html | xml | json | jsonp;

default : html;

context : http,server,location;

autoindex_localtime 指令 时间是否用本地时间格式

syntax : on | off;

default : off;

context : http,server,location

location / {
                index a.html; #这里要注意 index 指令是没办法去除的 那么我们设置一个没有该文件的路径 这样的话autoindex 才会起到效果
                autoindex on;
                autoindex_format json;
                autoindex_localtime on;
        }

猜你喜欢

转载自www.cnblogs.com/jackey2015/p/10384472.html