Skip to content

Instantly share code, notes, and snippets.

@pierrefevrier
Last active January 21, 2017 14:39
Show Gist options
  • Save pierrefevrier/1b7b4e5b05dc21779841e0bc07797f0a to your computer and use it in GitHub Desktop.
Save pierrefevrier/1b7b4e5b05dc21779841e0bc07797f0a to your computer and use it in GitHub Desktop.
NGinx proxify an app deployed on several instances
upstream app_name_servers {
server 192.168.1.1:8080;
server 192.168.1.2:8080;
}
location / {
rewrite /(.*) /app_name/$1 break;
proxy_pass http://app_name_servers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment