Created
February 5, 2014 20:38
-
-
Save gansbrest/8832525 to your computer and use it in GitHub Desktop.
Proxy to another hostname (X-Accel-Redirect support)
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
location ~* ^/(assets)/(.*) { | |
set $remote_host "static.fc.com"; | |
# needed to resolve the dynamic host in proxy_pass | |
resolver 172.16.0.23; | |
proxy_set_header HOST $remote_host; | |
proxy_pass http://$remote_host/$1/$2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment