server { listen 8080; location /admin { root /app/; index index.html; try_files $uri/index.html $uri/ $uri /admin/index.html; } location ~ ^/(_plugin|assets|imgs|js|plugins|static)/ { root /app/dist/; try_files $uri $uri/ =404; } location / { root /app/dist/; index index.html; try_files $uri $uri/ /index.html; } error_page 404 /404.html; location = /404.html { internal; } }