Created
May 8, 2013 04:35
-
-
Save ProfAvery/5538220 to your computer and use it in GitHub Desktop.
Nginx load-balancing test configuration
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
# Modify Bottle application as follows: | |
# import sys | |
# ... | |
# run(port=sys.argv[1], debug=True) | |
# | |
# Then run | |
# python app.py 8081 | |
# python app.py 8082 | |
# nginx -p . -c nginx.conf | |
# | |
daemon off; | |
pid ./nginx.pid; | |
error_log stderr; | |
events { | |
} | |
http { | |
access_log off; | |
server { | |
listen 8080; | |
location / { | |
proxy_pass http://backend; | |
proxy_set_header Host $http_host; | |
} | |
} | |
upstream backend { | |
server localhost:8081; | |
server localhost:8082; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment