Nginx setting specific location throws error

I am trying to set up a react frontend inside a docker container. I am using nginx to specify the route. Here is the problem in very simple terms:

THIS CREATES ERROR

location /project_managment/ {
  root /var/www;
  try_files $uri /index.html;
}

CODE BELOW, NO ERROR

location / {
  root /var/www/project_managment/;
  try_files $uri /index.html;
}

All I want is for the default '/' route to currently be unavailable as this website will have multiple applications.

Here is the entire .conf file. The /media/ route works perfectly!

upstream api {
    server backend:8000;
}

server {
    listen 8080;

    location /admin/ {
        proxy_pass http://api;
        proxy_set_header Host $http_host;
    }
    location /media/ {
        root /var/www;
    }

    location /api/ {
        proxy_pass http://api;
        proxy_set_header Host $http_host;
    }

    location /project_managment/ {
        root /var/www;
        try_files $uri /index.html;
    }
}

ERROR

launch_project-nginx-1     | 2021/11/23 01:29:31 [error] 23#23: *1 open() "/etc/nginx/html/index.html" failed (2: No such file or directory), client: 172.26.0.1, server: , request: "GET /project_managment/ HTTP/1.1", host: "localhost"
launch_project-nginx-1     | 172.26.0.1 - - [23/Nov/2021:01:29:31 +0000] "GET /project_managment/ HTTP/1.1" 404 555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" "-"
launch_project-nginx-1     | 2021/11/23 01:29:31 [error] 23#23: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 172.26.0.1, server: , request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/project_managment/"
launch_project-nginx-1     | 172.26.0.1 - - [23/Nov/2021:01:29:31 +0000] "GET /favicon.ico HTTP/1.1" 404 555 "http://localhost/project_managment/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36" "-"

Docker compose file

version: "3"

services:
  backend:
    build:
      context: ./managment_tool_api
    command: gunicorn managment_tool.wsgi --bind 0.0.0.0:8000
    ports:
      - "8000:8000"
    volumes:
      - django_media:/django/media
  frontend:
    build:
      context: ./managment-tool-react
    volumes:
      - react_build:/react/build
    tty: true
  nginx:
    image: nginx:latest
    ports:
      - 80:8080
    volumes:
      - ./nginx/nginx-setup.conf:/etc/nginx/conf.d/default.conf:ro
      - react_build:/var/www/project_managment
      - django_media:/var/www/media
    depends_on:
      - backend
      - frontend
volumes:
  react_build:
  django_media:

Thank you!

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum