Skip to content

Instantly share code, notes, and snippets.

@Shellbye
Created April 18, 2017 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shellbye/adf80f97ab8d657dbfbac6bb72cf13c0 to your computer and use it in GitHub Desktop.
Save Shellbye/adf80f97ab8d657dbfbac6bb72cf13c0 to your computer and use it in GitHub Desktop.
nginx load balance simple demo
# nginx_load_balance.conf
# https://www.nginx.com/resources/admin-guide/load-balancer/
upstream backend {
server 127.0.0.1:8000;
server 192.168.1.1;
server domain.to.other.server;
}
server {
listen 80;
server_name www.domain.com;
charset utf-8;
location / {
proxy_pass http://backend;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment