Created
December 4, 2020 21:00
-
-
Save shivampip/2582c168baa6c3d204f8b396cd9853c2 to your computer and use it in GitHub Desktop.
Nginx wildcard subdomain to folder
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
server{ | |
listen 80; | |
server_name ~^(?<subdomain>.*)\.yoursite\.com$; | |
root /var/www/project/sites/$subdomain; | |
index index.html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment