title: Configuring nginx to server assets files in angular
body: <p>I'm getting data from <code>assets</code> folder. On my local machine, I'm able to get the data with this url: </p>
  
  <p><code>http://localhost:4200/assets/data.json</code></p>
  
  <p>But when I deploy my app using docker in a <code>VM</code>, I'm getting an <code>HTTP 404</code> error.</p>
  
  <p>The HTTP request: </p>
  
  <pre><code>http://192.168.xxx.xxx:22/assets/data.json
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;&lt;title&gt;404 Not Found&lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
  &lt;center&gt;&lt;h1&gt;404 Not Found&lt;/h1&gt;&lt;/center&gt;
  &lt;hr&gt;&lt;center&gt;nginx/1.17.7&lt;/center&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Here's my docker file</p>
  
  <pre><code>FROM node:alpine AS builder
  
  WORKDIR /app
  COPY . .
  FROM nginx:alpine
  
  COPY --from=builder /app/dist/proj/* /usr/share/nginx/html/
  </code></pre>
  
  <p>I figured out that I should also add an nginx config file  like in <a href="https://marcofranssen.nl/run-your-angular-app-in-a-nginx-docker-container/" rel="nofollow noreferrer">this example</a> </p>
  
  <p>I would like how to configue in my case nginx to serve asset files </p>