JavaScript

超轻量级php框架startmvc

解决vue打包项目后刷新404的问题

更新时间:2020-06-30 19:36 作者:startmvc
vue打包项目后刷新404的问题Nginx配置server{listen80;server_namelocalhost;indexindex.html;root/root/dist;locat

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的问题就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。