From 101fd612eb5c33f50da0e88efe845dc249cca404 Mon Sep 17 00:00:00 2001
From: ghaymah_dev
Date: Sat, 1 Nov 2025 08:05:05 +0000
Subject: [PATCH] Update nginx.conf.template
---
nginx.conf.template | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/nginx.conf.template b/nginx.conf.template
index eaa4008..1f4218f 100644
--- a/nginx.conf.template
+++ b/nginx.conf.template
@@ -1,17 +1,30 @@
-events {}
+worker_processes 1;
+
+events {
+ worker_connections 1024;
+}
http {
- upstream backend {
+ include /etc/nginx/mime.types;
+
+ upstream django_servers {
${BACKEND_SERVERS}
}
server {
- listen 80;
-
+ listen ${LISTEN_PORT:-8080};
+
+ # Proxy requests to Django backend
location / {
- proxy_pass http://backend;
+ proxy_pass http://django_servers;
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;
+
+ # Handle timeouts
+ proxy_connect_timeout 60;
+ proxy_read_timeout 60;
}
}
}
\ No newline at end of file