0

When I start the container that has nginx running, I try to view it in the browser, the https is enforced, and although nginx is running in the container with the right volume mapping, I only see:

404 Not Found

nginx/1.4.6 (Ubuntu)

I tried different ports, but I got the same result. I am using Docker version 1.10.1, OSX Capitan

Any idea?

simo
  • 22,134
  • 35
  • 107
  • 202

1 Answers1

0

You need to make sure:

  • your NGiNX image does EXPOSE port 80
  • your docker run command does map port 80 (to for example the host port 80 if it is free: docker run -p 80:80)
  • your VM does port-forward port 80 (if you are not using docker directly on Linux, but through a boot2docker VM, which is the case here)
  • your nginx.conf does serve something when trying to access the main page (http://<your-nginx>/)
Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • I' ve checked the above list, if I try http 192.168.99.100:800/ the browser will redirect to https 192.168.99.100 and I get 404 error, if I use https 192.168.99.100:800/ I get ERR_SSL_PROTOCOL_ERROR , why the redirect, why can't I view it in http ? – simo Feb 20 '16 at 10:22