1. After entering the frontend page, clicking some links changes the URL, and the responses are all 200. However, once the entire page is refreshed, it responds with a 404. See Video 1.
2. Check the Nginx error logs and add the following line: try_files $uri $uri/ /index.html;
Plaintext
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"
Nginx
index index.html;
try_files $uri $uri/ /index.html;
3. Refresh the entire page again, and it no longer responds with a 404.
