Last active
November 23, 2022 14:19
-
-
Save ricsiga/e67db4ea4def36370dcfc25154f47104 to your computer and use it in GitHub Desktop.
virtual document root for Nginx
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
# [0-9].example.com -> /srv/tickets.example.com/[0-9]/app/build | |
# http://nginx.org/en/docs/http/server_names.html | |
server { | |
listen 80; | |
server_name "~^(?<subdomain>^\d).example.com$"; | |
root /srv/tickets.example.com/$subdomain/app/build; | |
} |
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
# [projectname].[user].example.com -> /home/$user/dev/$projectname/web; | |
server { | |
listen 81; | |
server_name "~^(?<project>.+)\.(?<user>.+)\.example\.com$"; | |
root /home/$user/dev/$project/web; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment