diff --git a/ubuntu-install.sh b/ubuntu-install.sh index e78d1cd..7972901 100644 --- a/ubuntu-install.sh +++ b/ubuntu-install.sh @@ -220,6 +220,11 @@ server { ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384; ssl_prefer_server_ciphers off; + # Large file upload settings + client_max_body_size 100G; + client_body_timeout 300s; + client_header_timeout 60s; + # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; @@ -242,9 +247,13 @@ server { proxy_set_header Connection "upgrade"; # Timeout settings - proxy_connect_timeout 60s; - proxy_send_timeout 60s; - proxy_read_timeout 60s; + proxy_connect_timeout 300s; + proxy_send_timeout 300s; + proxy_read_timeout 300s; + + # Disable buffering for large uploads + proxy_buffering off; + proxy_request_buffering off; } # Static files @@ -262,6 +271,11 @@ server { listen 80; server_name $DNS_DOMAIN; + # Large file upload settings + client_max_body_size 100G; + client_body_timeout 300s; + client_header_timeout 60s; + # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; @@ -283,9 +297,13 @@ server { proxy_set_header Connection "upgrade"; # Timeout settings - proxy_connect_timeout 60s; - proxy_send_timeout 60s; - proxy_read_timeout 60s; + proxy_connect_timeout 300s; + proxy_send_timeout 300s; + proxy_read_timeout 300s; + + # Disable buffering for large uploads + proxy_buffering off; + proxy_request_buffering off; } # Static files