Created
July 14, 2018 07:17
-
-
Save justdoit0823/5100d7178d8f342cb349cb3b8a9991aa to your computer and use it in GitHub Desktop.
remove path prefix in nginx
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
# Use rewrite directive | |
location ^~ /apps/ { | |
rewrite ^/apps/(.*) /$1 break; | |
proxy_pass http://127.0.0.1:3000$uri$is_args$args; | |
} | |
# Use location path match | |
location ^~ /apps/ { | |
proxy_pass http://127.0.0.1:3000/; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment