Support servers with same host but different ports

Allow configuration of multiple servers that share a hostname
but have different ports, as described in issue #784.