Redesigned vhost API, allowing vhost mapping to be changed on-the-fly