30 أسطر
682 B
Plaintext
30 أسطر
682 B
Plaintext
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
|
|
upstream django_servers {
|
|
${BACKEND_SERVERS}
|
|
}
|
|
|
|
server {
|
|
listen ${LISTEN_PORT:-8080};
|
|
|
|
# Proxy requests to Django backend
|
|
location / {
|
|
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;
|
|
}
|
|
}
|
|
} |