- Nginx http autoindex 모듈 : https://nginx.org/en/docs/http/ngx_http_autoindex_module.html
Module ngx_http_autoindex_module
Module ngx_http_autoindex_module The ngx_http_autoindex_module module processes requests ending with the slash character (‘/’) and produces a directory listing. Usually a request is passed to the ngx_http_autoindex_module module when the ngx_http_index
nginx.org
- ngx_http_autoindex_module 모듈은 슬래시 문자('/')로 끝나는 요청을 처리하고 디렉토리 목록을 생성
- 요청은 ngx_http_index_module 모듈이 인덱스 파일을 찾을 수 없을 때, ngx_http_autoindex_module 모듈로 전달
autoindex 지시자
- 디렉터리 목록(listing) 출력을 활성화 또는 비활성화
- 문맥 : http, server, location
- 사용 문법
## 문법 create_full_put_path on | off;
- 사용 예시
## 기본 설정 autoindex on | off;
autoindex_exact_size 지시자
- HTML 형식의 경우 디렉토리 목록에 정확한 파일 크기를 출력할지 아니면 킬로바이트, 메가바이트, 기가바이트로 반올림하여 출력할지 지정
- 문맥 : http, server, location
- 사용 문법
## 문법 autoindex_exact_size on | off;
- 사용 예시
## 기본 설정 autoindex_exact_size on;
autoindex_format 지시자
- 디렉토리 목록의 형식을 설정
- JSONP 형식이 사용될 때, 콜백 함수(callback function)의 이름은 콜백 요청 인수(callback request argument)로 설정
- 만약 인수가 없거나 값이 비어 있으면 JSON 형식이 사용
-
XML 출력은 ngx_http_xslt_module 모듈을 사용하여 변환 가능
- 문맥 : http, server, location
- 사용 문법
## 문법 autoindex_format html | xml | json | jsonp;
- 사용 예시
## 기본 설정 autoindex_format html;
autoindex_localtime 지시자
- HTML 형식에서는 디렉터리 목록(listing)의 시간이 로컬 시간대( local time zone)또는 UTC로 출력될지 여부를 지정
- 문맥 : http, server, location
- 사용 문법
## 문법 autoindex_localtime on | off;
- 사용 예시
## 기본 설정 autoindex_localtime off;
'Nginx > Nginx 모듈 학습' 카테고리의 다른 글
ngx_http_v2_module 모듈 (0) | 2025.01.18 |
---|---|
ngx_http_auth_basic_module 모듈 (1) | 2024.12.15 |
ngx_http_dav_module 모듈 (1) | 2024.12.11 |
ngx_http_hls_module 모듈 (0) | 2023.09.24 |
ngx_http_mp4_module 모듈 (0) | 2023.09.24 |