In a server as
server {
server_name domain.com *.domain.com
root /var/www/$server_name;
}
is it possible to set locations for subdomains based on subfolders of the $server_name ?
location matching sub1.domain.com {
serving from /var/www/$server_name/sub1
}
Currently, I am using a server for each subdomain, but when the number of subdomains increases, maintaining numerous servers becomes messy.