Forcing access to Discourse via domain name only

It sounds like your question is something like:

host:port at 123.123.123.123:8080
domain example.com maps to host:port
you don’t want requests for host:port to work, but only requests for the domain that are mapped to the host:port

But that doesn’t make sense to me and the code example you posted isn’t about that so I am confused.

What instructions did you follow for your install and is this a domain name, host IP, or port problem?