解决方案:

    1. location / {
    2.   root D:\Test\exprice\dist;
    3.   index index.html index.htm;
    4.   try_files $uri $uri/ /index.html;

    第二种方式

    location /{
      root   /data/nginx/html;
      index  index.html index.htm;
      error_page 404 /index.html;
    }
    

    image.png

    https://www.cnblogs.com/goloving/p/9170508.html