LPS-42820 Add logic to recognize virtual hosts

Hi Eudaldo,

I'm sending you this pull as per Julio's request.

Please review my changes.

Thanks,
Ákos