server {
listen 8000;
server_name localhost;
#以下两点是关键
location / {
root html;
index index.html index.htm;
try_files $uri $uri/ @req;
}
location @req {
rewrite ^.*$ /index.html last;
}
前后端分离刷新404错误, nignx配置
最新推荐文章于 2024-07-04 15:13:13 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)