title: Docker - nginx angular -- 403 Forbidden Error
body: <p>I am attempting to build my angular app in Docker using the following Dockerfile:</p>
  
  <pre><code>FROM node:8.11.2-alpine as node
  
  COPY package.json package-lock.json ./
  
  RUN npm i &amp;&amp; mkdir /app &amp;&amp; cp -R ./node_modules ./app
  
  WORKDIR /usr/src/app
  
  COPY . .
  
  RUN npm install
  
  FROM nginx:1.13.3-alpine
  
  RUN rm -rf /usr/share/nginx/html/*
  
  COPY ./nginx.conf  /etc/nginx/conf.d/default.conf
  
  COPY --from=node . /dist/usr/share/nginx/html
  
  CMD ["nginx", "-g", "daemon off;"]
  </code></pre>
  
  <p>And the following nginx.conf file:</p>
  
  <pre><code> server {
   listen 80;
   location / {
   root /usr/share/nginx/html/;
  index index.html index.htm;
  try_files $uri $uri/ /index.html =404;
   }
    }
  </code></pre>
  
  <p>The container builds just fine, but when I check my port for this container, I receive the "403 Forbidden" webpage instead of my Angular application. </p>
  
  <p>When inspecting my container, I find the following error message:
      2018/09/03 23:23:09 [error] 6#6: *1 directory index of 
       "/usr/share/nginx/html/" is forbidden, client: 172.17.0.1, server: , 
       request: "GET / HTTP/1.1", host: "localhost"</p>
  
  <p>My index.html file exists inside a folder called 'src' , which is on the same directory as my DockerFile and nginx.conf file. </p>
  
  <p>Could not having the Docker-Compose.yml file on the same directory as the DockerFile be causing the issue? Is there something I am missing? </p>
  
  <p>The current container does not have a volume, as of yet. </p>
  
  <p>Please help point me in the right direction.</p>