From 63c571942033a47307eddb8667a5c2e1c6789b55 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 15 Jul 2025 13:45:37 -0700 Subject: [PATCH] Override nginx.conf --- .platform/nginx/conf.d/proxy.conf | 4 +-- .platform/nginx/nginx.conf | 43 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 .platform/nginx/nginx.conf diff --git a/.platform/nginx/conf.d/proxy.conf b/.platform/nginx/conf.d/proxy.conf index 68c9f523f..1ab7fa483 100644 --- a/.platform/nginx/conf.d/proxy.conf +++ b/.platform/nginx/conf.d/proxy.conf @@ -1,4 +1,2 @@ client_max_body_size 50M; -client_body_buffer_size 5M; - -worker_connections 2048; \ No newline at end of file +client_body_buffer_size 5M; \ No newline at end of file diff --git a/.platform/nginx/nginx.conf b/.platform/nginx/nginx.conf new file mode 100644 index 000000000..c89519ef4 --- /dev/null +++ b/.platform/nginx/nginx.conf @@ -0,0 +1,43 @@ +#Elastic Beanstalk Nginx Configuration File + +user nginx; +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; +worker_processes auto; +worker_rlimit_nofile 200000; + +events { + worker_connections 2048; +} + +http { + server_tokens off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + include conf.d/*.conf; + + map $http_upgrade $connection_upgrade { + default "upgrade"; + } + + server { + listen 80 default_server; + access_log /var/log/nginx/access.log main; + + client_header_timeout 60; + client_body_timeout 60; + keepalive_timeout 60; + gzip off; + gzip_comp_level 4; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml> + + # Include the Elastic Beanstalk generated locations + include conf.d/elasticbeanstalk/*.conf; + } +} \ No newline at end of file