【Vue】宝塔面板服务器配置Vue项目

[1] 编译Vue项目成dist文件夹
  输入打包Vue项目语句:
npm run build:prod

  打包完成后,shell提示如下:   然后在项目中,会出现一个dist文件夹:
[2] 把dist文件夹上传到服务器
  我的路径如下:
[3] 增加配置服务器的nginx
  配置代码如下:
server {
listen 80;
server_name localhost;

location / {
root /www/wwwroot/blueele/dist;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}

location /prod-api/{

【Vue】宝塔面板服务器配置Vue项目最先出现在Python成神之路

版权声明:
作者:dingding
链接:https://www.techfm.club/p/11987.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>