Last active
December 19, 2015 21:18
-
-
Save jdelStrother/6019116 to your computer and use it in GitHub Desktop.
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
| try_files $uri @app; | |
| location @app { | |
| # if the host looks like api.<something>/<somepath> then rewrite the request | |
| # as /api/<somepath> | |
| if ( $host ~* api\.(.*) && $path !~ ^/api) { | |
| rewrite ^(.*)$ /api$1 last; | |
| } | |
| include "proxy.conf"; | |
| proxy_pass http://backend_app; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment