Update nginx.conf.template
هذا الالتزام موجود في:
@@ -1,17 +1,30 @@
|
|||||||
events {}
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
upstream backend {
|
include /etc/nginx/mime.types;
|
||||||
|
|
||||||
|
upstream django_servers {
|
||||||
${BACKEND_SERVERS}
|
${BACKEND_SERVERS}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen ${LISTEN_PORT:-8080};
|
||||||
|
|
||||||
|
# Proxy requests to Django backend
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://backend;
|
proxy_pass http://django_servers;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
المرجع في مشكلة جديدة
حظر مستخدم