There is no problem not worth solving, and no technology not worth learning!

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.

Need long-term technical maintenance or remote troubleshooting?

I am a PHP / Go backend engineer with 15+ years of experience, focused on existing system maintenance, bug fixing, performance optimization, server troubleshooting, WordPress maintenance, and small feature iterations.

If your project is facing any of the following issues, we can start with a small troubleshooting task first:

  • ✅ PHP / Laravel / Yii2 legacy systems without active maintenance
  • ✅ Go / Gin backend APIs that need troubleshooting or optimization
  • ✅ Slow, broken, or unstable WordPress websites
  • ✅ Nginx / MySQL / Redis / Linux server issues
  • ✅ CDN / Cloudflare / DNS / HTTPS configuration problems
  • ✅ Long-term remote technical support or part-time maintenance

More details: About Me & Collaboration

WeChat: 13980074657
Email: shuijingwanwq@gmail.com
Telegram: @shuijingwan
GitHub: https://github.com/shuijingwan

评论

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.