It sounds like you are trying to run a production instance at a non standard port? This is not supported in Discourse.