public function findByCustomServerName($server_name, array $sites_config)
    {
        $site_label = null;
        foreach ($sites_config as $key => $data) {
            if ($server_name === $data['domain']) {
                $site_label = $key;
                break;
            }
        }

        $site = null;
        if (null !== $site_label) {
            $site = $this->findOneBy(array(
                '_label' => $site_label,
            ));
        }

        return $site;
    }