https://admin.xxx.com/ 访问正常
https://admin.xxx.com/index 访问404
location / { root /home/ruoyi/projects/ruoyi-ui; try_files $uri $uri/ /index.html; index index.html index.htm; }
nginx 加上上面这段即可,表示不管哪个目录,都会访问根目录的index.html文件标签:index,html,访问,404,vue2,根目录 From: https://www.cnblogs.com/lanxi0320/p/17836829.html