vue 在nginx上面简单的部署

1 npm run build

2 把dis里面的文件打包到服务器里

3 配置nginx 监听80 端口
编辑 /usr/local/nginx/config 下面的nginx.conf 文件
修改访问的默认的文件位置

4

location / {
            root   /data/www/ESBP_WEB/dist;
            index  index.html index.htm;
        }

5 访问nginx 所在的服务器
就是访问到vue 项目的相应页面

猜你喜欢

转载自blog.csdn.net/yangxiaodong88/article/details/80149161