Solution 1:
Following approach might work too:
server_name ~^(?<subdomain>(?<firstletter>\w)\w+)\.development\.test$;
location / {
root /var/www/test/$firstletter/$subdomain;
try_files $uri $uri/ =404;
}
Following approach might work too:
server_name ~^(?<subdomain>(?<firstletter>\w)\w+)\.development\.test$;
location / {
root /var/www/test/$firstletter/$subdomain;
try_files $uri $uri/ =404;
}