Files
KMH_IT_Assets/nginx/default.conf
T

31 lines
817 B
Plaintext
Raw Normal View History

server {
listen 80;
server_name localhost;
client_max_body_size 10M;
# Static files served directly by Nginx
location /static/ {
alias /app/staticfiles/;
expires 30d;
add_header Cache-Control "public, max-age=2592000";
}
# Media files (e.g. BAST documents)
location /media/ {
alias /app/media/;
expires 7d;
add_header Cache-Control "public, max-age=604800";
}
# Dynamic application traffic
location / {
proxy_pass http://web:8000;
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 120s;
}
}