Handle virtual host-style and CNAME-style requests.