前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程
vue单页面的启动页面是index.html,路由的路径实际是不存在的,所以会出现访问单页面404问题,需要设置所有找不到的路径直接映射到index.html
root D:/nginx-0.8.55/html/dist/;
index index.html index.htm;
location / {
try_files $uri $uri @router;
index index.html;
}
location @router {
rewrite ^.*$ /index.html last;
}
location /api/ {
proxy_pass http://192.168.8.133:8090/api/;
}