Created
September 4, 2012 09:25
-
-
Save stephennancekivell/3619082 to your computer and use it in GitHub Desktop.
nginx proxy_pass forwarding
This file contains hidden or 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
# ends up at 127.0.0.1:8080 | |
location /bla/ { | |
rewrite ^/bla/(.*) $1 break; | |
proxy_pass http://127.0.0.1:8080/; | |
} | |
# doesnt end up at 127.0.0.1:8080/woo | |
location /bla/ { | |
rewrite ^/bla/(.*) $1 break; | |
proxy_pass http://127.0.0.1:8080/woo; | |
} | |
# ends up at 127.0.0.1:8080/woo | |
location /bla/ { | |
rewrite ^/bla/(.*) /woo/$1 break; | |
proxy_pass http://127.0.0.1:8080/; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment