1.HTTP Autoindex 模块,用于提供自动目录列表显示,该模块只有在找不到默认的index文件时才启用

 

autoindex [on | off]  :允许和禁止自动列表,默认值为off

autoindex_exact_size  [on |off] : 设置目录列表中文件是显示精确大小,还是对KB MB GB四舍五入;默认值为on

autoindex_localtime [on | off] :设置目录列表中列出文件的时间是本地时间还是utc时间,默认值是off;on表示本地时间。

 

2.

location / {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
}