'Enables an available site, Apache reload required.
.. note:: Does not make sure that the site correctly works or that all
modules are enabled appropriately.
.. todo:: This function should number subdomains before the domain
vhost
.. todo:: Make sure link is not broken...
:param vhost: vhost to enable
:type vhost: :class:`~certbot_apache.obj.VirtualHost`
:raises .errors.NotSupportedError: If filesystem layout is not
supported.'

def enable_site(self, vhost):

    if self.is_site_enabled(vhost.filep):
        return
    if ('/sites-available/' in vhost.filep):
        enabled_path = ('%s/sites-enabled/%s' % (self.parser.root, os.path.basename(vhost.filep)))
        self.reverter.register_file_creation(False, enabled_path)
        os.symlink(vhost.filep, enabled_path)
        vhost.enabled = True
        logger.info('Enabling    available    site:    %s', vhost.filep)
        self.save_notes += ('Enabled    site    %s\n' % vhost.filep)
    else:
        raise errors.NotSupportedError('Unsupported    filesystem    layout.    sites-available/enabled    expected.')
