Skip to content

Instantly share code, notes, and snippets.

@mervick
Forked from jrom/nginx.conf
Created November 22, 2015 21:17
Show Gist options
  • Save mervick/aa5cc4a06f65d515bf23 to your computer and use it in GitHub Desktop.
Save mervick/aa5cc4a06f65d515bf23 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