Hi! I regularly do this, but with Docker installs. Assuming that you use our standard Docker installation in production, then for your acceptance testing you should be using the same thing. There is a wide margin for differences between dev and Docker installations (configuration, gem and JS package versions, etc) that can turn into migraines at deploy time.
Docker installations use and enforce HTTPS by default. Unless you want to customize the container template (which I’ve found has some hidden complexity), you can simply turn off HTTPS enforcing with another site setting.
This is my snippet for “relaxing security in a local Docker install”, which can just as easily be reverted before going to production:
SiteSetting.content_security_policy = false
SiteSetting.force_https = false
Then it’s just a matter of your browser being able to find port 80 on the Docker container at http://uat.mysite.com – note that you’ll be using http instead of https.
For that, @pfaffman’s /etc/hosts trick is the way; details for each OS here.