LPS-42820 Add logic to recognize virtual hosts