Skip to content

Instantly share code, notes, and snippets.

@ProfAvery
Created May 8, 2013 04:35
Show Gist options
  • Save ProfAvery/5538220 to your computer and use it in GitHub Desktop.
Save ProfAvery/5538220 to your computer and use it in GitHub Desktop.
Nginx load-balancing test configuration
# 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