44 lines
1.1 KiB
Nginx Configuration File
44 lines
1.1 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_connect_timeout 60s;
|
|
proxy_read_timeout 600s;
|
|
proxy_send_timeout 600s;
|
|
}
|
|
}
|
|
}
|