upstream transfa_app { server 127.0.0.1:3001; keepalive 32; } server { listen 80; server_name _; # Large file uploads client_max_body_size 100G; client_body_timeout 300s; proxy_read_timeout 300s; proxy_send_timeout 300s; keepalive_timeout 65s; # Gzip for API and static assets gzip on; gzip_types application/json text/plain text/css application/javascript; location / { proxy_pass http://transfa_app; proxy_http_version 1.1; 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_set_header Connection ''; # Disable buffering for streaming uploads/downloads proxy_buffering off; proxy_request_buffering off; } }