Files
KNELProductionContainers/Techops/inventree.knownelement.com/nginx.conf
2025-04-21 12:23:35 -04:00

35 lines
916 B
Nginx Configuration File

server {
listen 8000; # This should match the httpPort in CloudronManifest.json
client_max_body_size 100M;
access_log /dev/stdout;
error_log /dev/stderr;
# Serve static files
location /static/ {
alias /app/data/static/;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
# Serve media files
location /media/ {
alias /app/data/media/;
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
# Proxy requests to gunicorn
location / {
proxy_pass http://127.0.0.1:8001;
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_redirect off;
proxy_buffering off;
}
}