title: Nginx Angular reverse proxy page not showing
body: <p>I try to run multiple angular apps on same port with nginx and docker. I started with one and set the followings:</p>
  <p><strong>nginx/default.conf</strong></p>
  <pre><code>upstream client {
      server client:4200;
  }
  server {
      listen 80;
      location / {
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header X-Forwarded-Proto $scheme; 
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection &quot;upgrade&quot;;
          proxy_pass http://client/;
      }
  }
  </code></pre>
  <p><strong>docker-compose.yml</strong></p>
  <pre><code>version: &quot;3.8&quot;
  services:
      client:
          build:
              context: ./client
          ports:
              - &quot;4200:4200&quot;
          container_name: client
  
      nginx:
          restart: always
          image: nginx:latest
          container_name: nginx
          volumes:
              - &quot;./nginx/default.conf:/etc/nginx/conf.d/default.conf&quot;
          ports:
              - &quot;8080:80&quot;
  </code></pre>
  <p><strong>client/Dockerfile</strong></p>
  <pre><code># Stage 1
  FROM node:14.19.0-alpine as node
  WORKDIR /usr/src/app
  COPY package*.json ./
  RUN npm install
  RUN npm install -g @angular/cli
  COPY . .
  RUN npm run build --prod
  
  # Stage 2
  
  EXPOSE 4200
  CMD ng serve --prod --host 0.0.0.0
  </code></pre>
  <p>All containers up after i run:</p>
  <pre><code>docker-compose up --build -d
  </code></pre>
  <p>And i can access the app in directory &quot;client&quot; via http://localhost:8080/</p>
  <p>Now, i want to change in nginx/default.conf</p>
  <pre><code>location /
  </code></pre>
  <p>to</p>
  <pre><code>location /client1
  </code></pre>
  <p>I get white page and in docker logs:</p>
  <pre><code>2022/03/15 14:20:42 [error] 33#33: *3 open() &quot;/etc/nginx/html/styles.css&quot; failed (2: No such file or directory), client: 172.21.0.1, server: , request: &quot;GET /styles.css HTTP/1.1&quot;, host: &quot;localhost:8080&quot;, referrer: &quot;http://localhost:8080/client1&quot;
  172.21.0.1 - - [15/Mar/2022:14:20:42 +0000] &quot;GET /styles.css HTTP/1.1&quot; 404 555 &quot;http://localhost:8080/client1&quot; &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36&quot; &quot;-&quot;
  2022/03/15 14:20:42 [error] 33#33: *3 open() &quot;/etc/nginx/html/polyfills.js&quot; failed (2: No such file or directory), client: 172.21.0.1, server: , request: &quot;GET /polyfills.js HTTP/1.1&quot;, host: &quot;localhost:8080&quot;, referrer: &quot;http://localhost:8080/client1&quot;
  172.21.0.1 - - [15/Mar/2022:14:20:42 +0000] &quot;GET /polyfills.js HTTP/1.1&quot; 404 555 &quot;http://localhost:8080/client1&quot; &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36&quot; &quot;-&quot;
  2022/03/15 14:20:42 [error] 34#34: *6 open() &quot;/etc/nginx/html/runtime.js&quot; failed (2: No such file or directory), client: 172.21.0.1, server: , request: &quot;GET /runtime.js HTTP/1.1&quot;, host: &quot;localhost:8080&quot;, referrer: &quot;http://localhost:8080/client1&quot;
  172.21.0.1 - - [15/Mar/2022:14:20:42 +0000] &quot;GET /runtime.js HTTP/1.1&quot; 404 555 &quot;http://localhost:8080/client1&quot; &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36&quot; &quot;-&quot;
  2022/03/15 14:20:42 [error] 31#31: *7 open() &quot;/etc/nginx/html/main.js&quot; failed (2: No such file or directory), client: 172.21.0.1, server: , request: &quot;GET /main.js HTTP/1.1&quot;, host: &quot;localhost:8080&quot;, referrer: &quot;http://localhost:8080/client1&quot;
  172.21.0.1 - - [15/Mar/2022:14:20:42 +0000] &quot;GET /main.js HTTP/1.1&quot; 404 555 &quot;http://localhost:8080/client1&quot; &quot;Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36&quot; &quot;-&quot;
  </code></pre>
  <p>Please help.</p>