Created
April 1, 2017 01:40
-
-
Save casprwang/2a099762892ac1bc8628da01a78dbffe to your computer and use it in GitHub Desktop.
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
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
# Load dynamic modules. See /usr/share/nginx/README.dynamic. | |
include /usr/share/nginx/modules/*.conf; | |
events { | |
worker_connections 768; | |
} | |
http { | |
upstream myapp { | |
#ip_hash; | |
server ec2-35-166-219-59.us-west-2.compute.amazonaws.com weight=1; | |
server ec2-52-41-152-191.us-west-2.compute.amazonaws.com weight=2; | |
server ec2-34-208-160-118.us-west-2.compute.amazonaws.com weight=1; | |
server ec2-52-33-227-159.us-west-2.compute.amazonaws.com weight=2; | |
} | |
server { | |
listen 80; | |
server_name myapp.com; | |
location / { | |
proxy_pass http://myapp; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment