add SNI support, and change domain configuration a bit.