File size: 1,650 Bytes
d234e06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
server {
listen 80;
server_name YOUR_DOMAIN.com www.YOUR_DOMAIN.com;
# λλ IPλ§ μ¬μ©: server_name YOUR_SERVER_IP;
# λ‘κ·Έ μ€μ
access_log /var/log/nginx/soy-nv-ai-access.log;
error_log /var/log/nginx/soy-nv-ai-error.log;
# ν΄λΌμ΄μΈνΈ μ΅λ μ
λ‘λ ν¬κΈ° (100MB)
client_max_body_size 100M;
client_body_timeout 300s;
client_header_timeout 300s;
# νλ‘μ λ²νΌ μ€μ
proxy_buffering off;
proxy_request_buffering off;
# νλ‘μ μ€μ
location / {
proxy_pass http://127.0.0.1:5001;
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;
# WebSocket μ§μ
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# νμμμ μ€μ (AI μλ΅μ΄ μ€λ 걸릴 μ μμ)
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
proxy_read_timeout 600s;
# λ²νΌ μ€μ
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}
# μ μ νμΌ μ§μ μ 곡 (μ νμ¬ν)
location /static {
alias /var/www/soy-nv-ai/static;
expires 30d;
add_header Cache-Control "public, immutable";
}
# 보μ ν€λ
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
}
|