move generate_vhosts into an own file