vue打包项目后刷新404的问题Nginx配置

server {
  listen   80;
  server_name localhost;
  index index.html;
  root /root/dist;
  location / {
    root /root/dist;
    try_files $uri $uri/ /index.html =404;
  }
}

以上这篇解决vue打包项目后刷新404的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

02-04 10:42