When deploying the front-end code, based on the nginx configuration, once refreshed, it will respond to 404 solution
1. After entering the front-end page, click some links, the URL will change, and the response is 200 at this time. But once the entire page is refreshed, it will respond to 404. such as video 1
2. View the error log of nginx and add a line: try_files $uri $uri//index.html;
2024/01/04 10:19:17 [error] 23408#17516: *244 CreateFile() "E:/wwwroot/object/dist/apps/admin/order/order-center/orders" failed (3: The system cannot find the path specified), client: 127.0.0.1, server: object.local, request: "GET /order/order-center/orders HTTP/1.1", host: "object.local"
index index.html;
try_files $uri $uri/ /index.html;
3. Refresh the entire page again, no longer respond to 404.