Now checks if port already is in use and more flexibility for the subdomains.