jeecgboot- vue -前端部署Nginx出现404解决方法

jeecgboot项目,使用nginx部署vue项目刷新报404,正常访问没问题,只有在刷新的时候才会出现问题


server {
listen 80;
server_name localhost;
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
别问,问就这一句话try_files $uri $uri/ /index.html;

posted @ 2021-02-19 18:04  CNBlackICE  阅读(3249)  评论(0编辑  收藏  举报