Last active
December 1, 2019 09:57
-
-
Save lepiku/a93836db166898e06ed659070259609f to your computer and use it in GitHub Desktop.
Load Balancer Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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