Skip to content

Instantly share code, notes, and snippets.

@Hadryan
Forked from jrom/nginx.conf
Created November 25, 2018 09:46
Show Gist options
  • Save Hadryan/f6799b33d8cab3b80d2e6acc88a65301 to your computer and use it in GitHub Desktop.
Save Hadryan/f6799b33d8cab3b80d2e6acc88a65301 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