vue部署在nginx后刷新404,nginx.conf一行代码解决掉

直接 vim conf/nginx.conf文件

server {
        listen       8081;
        server_name  localhost;

#charset koi8-r;

#access_log  logs/host.access.log  main;

location / {
            root   /home/www;
            index  index.html index.htm;
            try_files $uri $uri/ /index.html;
    
        }

然后esc 退出 wq! 进行保存

关闭 ..../nginx -s stop

重启 .../nginx

posted @ 2020-06-01 17:41  Angelasp  阅读(401)  评论(0编辑  收藏  举报