码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx CONTENT阶段 autoindex、index模块

时间:2019-04-18 16:56:48      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:size   .com   form   9.png   info   image   cat   code   技术   

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;
        }

 

Nginx CONTENT阶段 autoindex、index模块

标签:size   .com   form   9.png   info   image   cat   code   技术   

原文地址:https://www.cnblogs.com/jackey2015/p/10384472.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!