set port depending on set option, default http or https