Last active
March 3, 2016 11:09
-
-
Save daveslutzkin/d315ea593d1dcb6a17ab to your computer and use it in GitHub Desktop.
nginx re-resolve upstream dns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nginx will only re-resolve a hostname for a proxy if it's a variable | |
set $feedback "FEEDBACK"; | |
resolver RESOLVER; # set from $(grep nameserver /etc/resolv.conf | head -1 | awk '{ print $2; }') | |
location / { | |
proxy_pass http://$feedback; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Ssl on; | |
proxy_redirect off; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment