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.

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,242841,242841#msg-242841

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to