Created
December 23, 2015 19:11
-
-
Save johnmarinelli/cbfcf3a60b3e31a90035 to your computer and use it in GitHub Desktop.
nginx conf file
This file contains hidden or 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
events { worker_connections 1024; } | |
http { | |
upstream roundrobin { | |
# roundrobin is enabled by default | |
server google.com; | |
server msn.com; | |
server yahoo.com; | |
} | |
upstream iphash { | |
ip_hash; | |
server google.com; | |
server msn.com; | |
server yahoo.com; | |
} | |
upstream generichash { | |
hash $request_uri consistent; | |
server google.com; | |
server msn.com; | |
server yahoo.com; | |
} | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://roundrobin; | |
} | |
location /iphash/ { | |
proxy_pass http://iphash; | |
} | |
location /generichash/ { | |
proxy_pass http://generichash; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment