added option to specify domain or ip to listen to