vuerouter模式为history的项目打包发布后不能通过地址栏里的地址进行路由跳转

修改nginx的配置文件

server {
        listen       8080;
        server_name  localhost;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            try_files $uri $uri/ /index.html;#必须要有的
            root   /home/dist/;#打包后的项目路径,index.html所在文件夹
            index  index.html index.htm;
        }
}
原文地址:https://www.cnblogs.com/windok/p/15763239.html