Search code examples
dockerdocker-machineboot2docker

docker kitematic/hello-world-nginx: 403 error


I am running kitematic/hello-world-nginx container using Docker Toolbox on Windows. My docker-machine ip is 192.168.99.100.

enter image description here

When I hit 192.168.99.100 in my browser I get error: 403 forbidden.

I connect to my docker machine via ssh.

docker@default:~$ curl http://192.168.99.100:80 

which gives me hello world page.

<div style="color: #35393B; margin-top: 100px; text-align: center; font-family: HelveticaNeue-Light, sans-serif;">
  <img src="https://cloud.githubusercontent.com/assets/251292/5254757/a08a277c-7981-11e4-9ec0-d49934859400.png">
  <h2>Voil&agrave;! Your nginx container is running!</h2>
  <div style="color: #838789;">
    <p>To edit files, double click the <strong>website_files</strong> folder in Kitematic and edit the <strong>index.html</strong> file.</p>
  </div>
</div>

Why am I get 403 error in my browser and how to fix it?


Solution

  • You might be hitting an Nginx issue rather than a Docker issue, your browser is saying that server replied with a 403, that means that you are actually talking with NGINX server.

    However, most probably is that you need to set your NGINX to allow external connections or something related with permissions, check official Nginx page regarding 403 error:

    nginxlibrary.com/403-forbidden-error/