'Helper function for get_virtual_hosts().
:param host: In progress vhost whose names will be added
:type host: :class:`~certbot_apache.obj.VirtualHost`'

def _add_servernames(self, host):

    (servername, serveraliases) = self._get_vhost_names(host.path)
    for alias in serveraliases:
        if (not host.modmacro):
            host.aliases.add(alias)
    if (not host.modmacro):
        host.name = servername
