Skip to content

Instantly share code, notes, and snippets.

@dowens
Created March 25, 2014 02:15
Show Gist options
  • Save dowens/9754093 to your computer and use it in GitHub Desktop.
Save dowens/9754093 to your computer and use it in GitHub Desktop.
upstream upstream_server {
server 127.0.0.1;
keepalive 512;
}
server {
listen *:80;
location / {
error_page 502 @proxy_error;
proxy_intercept_errors on;
proxy_pass http://upstream_server;
}
location @proxy_error {
rewrite ^ https://my.externalsite.com/app redirect;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment