L 66

Nginx CONTENT阶段 autoindex、index模块-LMLPHP

Nginx CONTENT阶段 autoindex、index模块-LMLPHP

Nginx CONTENT阶段 autoindex、index模块-LMLPHP

Nginx CONTENT阶段 autoindex、index模块-LMLPHP

Nginx CONTENT阶段 autoindex、index模块-LMLPHP

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;
}
05-07 12:55
查看更多