Skip to content

Instantly share code, notes, and snippets.

@lepiku
Last active December 1, 2019 09:57
Show Gist options
  • Save lepiku/a93836db166898e06ed659070259609f to your computer and use it in GitHub Desktop.
Save lepiku/a93836db166898e06ed659070259609f to your computer and use it in GitHub Desktop.
Load Balancer Settings
# /etc/nginx/sites-enabled/default
# Django load balancing
#
upstream django_server {
server localhost:9000;
server localhost:8000;
}
# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
location / {
# Django
proxy_pass http://django_server;
proxy_set_header Host $host;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment