Server/Linux
[Linux Nginx] URL로 NAS 경로 호출하기
kmhan
2024. 2. 14. 17:30
728x90
반응형
Direct Indexing을 설정하면 되는데, 이것은 별도의 html 파일을 생성하지 않고도 간편하게 파일 다운로드를 하는 방법입니다.

설정에 'autoindex on' 추가
- 경로 : /etc/nginx/conf.d
- 파일명 : xx.conf
※ /etc/nginx/nginx.conf 설정에 'http { include /etc/nginx/conf.d/*.conf }' 만 추가되어있으면 xx에 어떤 파일명이라도 상관없음
|
1
2
3
4
5
6
7
8
9
10
|
server {
listen 9091;
server_name _;
location / {
root /strategy;
autoindex on; # 디렉토리 인덱스 활성화
try_files $url $url/ =404;
}
}
|
cs |
728x90
반응형