L 66

Nginx CONTENT阶段 autoindex、index模块

Nginx CONTENT阶段 autoindex、index模块

 Nginx CONTENT阶段 autoindex、index模块

 Nginx CONTENT阶段 autoindex、index模块

Nginx CONTENT阶段 autoindex、index模块

 

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-01-20
  • 2021-05-07
  • 2021-10-01
  • 2022-12-23
  • 2021-07-02
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案