server { listen 8080; location /admin { root /app/; index index.html; try_files $uri/index.html $uri/ $uri /admin/index.html; } location / { root /app/dist/; index index.html; try_files $uri $uri/ /index.html; } error_page 404 /404.html; location = /404.html { internal; } }