This one had me banging my head against the wall for longer than it should have. I am setting up an nginx instance with Docker and wanted to get HTTPS working. I could get things loading fine from port 80, but not over port 443 the HTTPS port.
There are a handful of posts on the Internet about this, but none had my solution. When I was running the docker image, I was not mapping port 433. I had this:
1docker run --rm --name my-image -d -p 80:80 my-image:latest
The p tag defines the port mapping from the external computer into the internal computer. I completely forgot to add port 443. I can fix it like this:
1docker run --rm --name my-image -d -p 80:80 -p 443:443 my-image:latest
And suddenly everything started working!