rebuild nginx config on domain change

refs: #783 
also checks if we already have the domain defined for the app