添加如下配置:
try_files $uri $uri/ /index.html;
server {
listen 80 ;
server_name ***.abc.com;
location / {
root /opt/ttjr;
index index.html;
try_files $uri $uri/ /index.html;
}
}
Nginx配置 - Vue项目(history)页面刷新404解决方案
原文:https://www.cnblogs.com/Mr-Lim/p/12599413.html