ngx_http_autoindex_module

ngx_http_autoindex_module 모듈은 슬래시 문자(‘/’)로 끝나는 요청을 처리하고 디렉터리 목록을 생성합니다. 일반적으로 ngx_http_index_module 모듈이 인덱스 파일을 찾지 못하면 요청이 ngx_http_autoindex_module 모듈로 전달됩니다. 

예제 구성

location / {
    autoindex on;
}

Directives

Syntax:  autoindex on | off;
Default: autoindex off;
Context: http, server, location

디렉터리 목록 출력을 활성화하거나 비활성화합니다.

Syntax:  autoindex_exact_size on | off;
Default: autoindex_exact_size on;
Context: http, server, location

HTML 형식의 경우, 정확한 파일 용량을 디렉터리 목록에 출력해야 할지 KB, MB, GB로 올림해야 할지 지정합니다.

Syntax: autoindex_format html | xml | json | jsonp;
Default: autoindex_format html;
Context: http, server, location
This directive appeared in version 1.7.9.

디렉터리 목록의 형식을 설정합니다.

JSONP 형식을 사용할 경우, 콜백 함수의 이름을 callback 요청 인수로 설정합니다. 이 인수가 누락되거나 인수에 빈 값이 있을 경우, JSON 형식을 사용합니다.

XML 출력은 ngx_http_xslt_module 모듈을 사용하여 변환할 수 있습니다.

Syntax:  autoindex_localtime on | off;
Default: autoindex_localtime off;
Context: http, server, location

HTML 형식의 경우, 디렉터리 목록의 시간을 로컬 시간대 또는 UTC로 출력해야 하는지 지정합니다.