server_name ~^(?<subdomain>.+)\.ex\.umbach\.dev$; location / { root /home/YOUR_FOLDER_PATH/customer-websites/$subdomain; index index.html; try_files $uri $uri/ =404; }