ngx_http_index_module模块
功能:指定/访问时返回的index文件内容
1.index指令
语法:index file.....;
默认:index index.html
放置位置:http,server,location
autoindex模块
功能:当URL以/ 结尾是,尝试以html/xml/json/jsonp等格式返回root/alias中指向目录的目录结构
ngx_http_index_module
默认编译进nginx 通过--with-http_autoindex_moudle取消
1.autoindex 指令
语法:autoindex on | off;
默认:autoindex off;
放置位置 http,server,location
2.autoindex_exact_size 指令; (显示相对路径【字节显示】还是就对路径【单位显示】)
语法:autoindex_exact_size on | off;
默认:autoindex_exact_size on;
放置位置:http,server,location
3.autoindex_format 指令; (返回格式)
语法:autoindex_format html | xml | json | jsonp;
默认:autoindex_format html;
放置位置:http,server,location
4.autoindex_localtime 指令;(时间是否用本地时间)
语法:autoindex_localtime on | off;
默认:autoindex_localtime off;
放置位置:http,server,location