1:在本地电脑 项目跟目录 执行
npm run build
在根目录生成文件夹 dist
2:复制dist 到linux 上 /usr/vuespace/ledger-web/dist
3: 配置nginx
server {listen 443 ssl;server_name tz.i569.cn; #填写绑定证书的域名ssl_certificate /etc/nginx/myconf/tz.i569.cn/tz.i569.cn_bundle.pem; ssl_certificate_key /etc/nginx/myconf/tz.i569.cn/tz.i569.cn.key; ssl_session_timeout 5m;ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;ssl_prefer_server_ciphers on;location /api/ {proxy_pass http://127.0.0.1:8081/;}location / {root /usr/vuespace/ledger-web/dist;}
}
4:浏览器访问