Skip to content

Instantly share code, notes, and snippets.

@AndresSepar
Forked from jrom/nginx.conf
Created June 18, 2019 21: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 AndresSepar/8be823f09c670c4b2de9ec72928dc0b7 to your computer and use it in GitHub Desktop.
Save AndresSepar/8be823f09c670c4b2de9ec72928dc0b7 to your computer and use it in GitHub Desktop.
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
}
if ($test = ABC) {
proxy_pass http://teambox-cms.heroku.com;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment