update scoping in vhost templates