vue项目部署

http://nginx.org/en/download.html下载稳定版nginx

 

放到纯英文目录下

 

启动nginx(双击nginx.exe或者cmd窗口切换到nginx文件下 输入命令 nginx.exe 或者 start nginx)

直接在浏览器地址栏输入网址 http://localhost:80,回车,出现以下页面说明启动成功。

 

 如果失败报错0.0.0.0:80 ...failed .... 

查看博文:https://www.cnblogs.com/qq1445496485/p/14449223.html

复制出一份nginx.conf  重命名为xxxx.conf

修改

 

 此处dist直接放在nginx文件下

 在nginx的cmd窗口中输入nginx.exe -c conf\vuenginx.conf即可

 

启动 在nginx中 打开黑窗

nginx.exe -c conf\xx.conf

 

重新加载:nginx.exe -s reload

停止服务:nginx.exe -s stop

 

 

  

 

posted @ 2022-04-18 16:51  埃菲尔上的加菲猫  阅读(45)  评论(0编辑  收藏  举报