Created
October 25, 2017 03:14
-
-
Save geraldyeo/544154d7be7569bd54517f26b9868329 to your computer and use it in GitHub Desktop.
NGINX feature deployment
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
# default branch to serve | |
set $branch "master"; | |
# Serve features on *.app.dev subdomain | |
if ($host ~* ^([^.]+)\.app\.dev\.company\.com$) { | |
set $branch $1; | |
} | |
# All branches are hosted from a subdirectory | |
root /var/www/branches/$branch; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment