Skip to content

Instantly share code, notes, and snippets.

@cpuguy83
Created July 31, 2013 16:06
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 cpuguy83/6123402 to your computer and use it in GitHub Desktop.
Save cpuguy83/6123402 to your computer and use it in GitHub Desktop.
nginx dynamic reverse proxy
location /reverse {
location ~ ^/(.*)/(.*) {
set $parsed_upstream $1;
set $url_remainder $2;
proxy_pass http://$parsed_upstream/$url_remainder;
}
proxy_pass http://$parsed_upstream/$url_remainder;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment