map $http_host $root_dir { hostnames; include conf/vhosts.conf; } root $root_dir; # conf/vhosts.conf .example1.com /www/example1.com; .example2.com /www/example2.com;