Files
whisper-stt/nginx/nginx.conf
2026-05-07 17:45:54 +09:00

52 lines
1.4 KiB
Nginx Configuration File

worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# 업로드 파일 크기 제한 (통화 녹음 파일 고려)
client_max_body_size 500M;
client_body_timeout 300s;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
upstream fastapi {
server app:8000;
}
server {
listen 80;
server_name _;
# 큰 파일 업로드 버퍼
client_body_buffer_size 10M;
location / {
proxy_pass http://fastapi;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
# 캐시 비활성화 — HTML/JS 항상 최신 버전 제공
proxy_no_cache 1;
proxy_cache_bypass 1;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
# 대용량 업로드를 위한 타임아웃
proxy_connect_timeout 60s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}
}