windows下若依vue项目部署

  1. 下载若依项目,前端后端项目本地启动
  2. 前端打包,后端打包
  3. 配置nginx.conf
    需要注意的是:路径别用中文,要不然报错
conf 复制代码
#前台访问地址及端口80,在vue.config.js中可查看
    server {
        listen       80;
        server_name  localhost;
#后台访问地址http://localhost:8080/
        location /prod-api/{
           proxy_set_header Host $http_host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header REMOTE-HOST $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           # proxy_pass就是设置的代理后的地址,即自己服务器后台接口的url
           proxy_pass http://localhost:8080/;
        }
 # root:dist静态页面根目录地址  index:dist中html文件的名字
         location / {
            root   C:/Users/18427/Desktop/windowsBUSHUTest/dist;
            try_files $uri $uri/ /index.html;
            index  index.html index.htm;
        }

# windows中无需配置第一行的user
  1. 启动nginx,访问localhost:80
    参考:
相关推荐
JustHappy6 小时前
古法编程秘籍(七):互联网到底是什么?把两台电脑怎么说话搞懂就够了
前端·后端·网络协议
snow@li6 小时前
SEO-文章标题:写文章时候,分类+主标题+大纲+解释 作为标题 / 不点进去也知道全文覆盖什么 / 标题即架构
前端
kyriewen7 小时前
Git Commit 前自动修复代码风格?配置 Husky + lint-staged,从此 CR 只聊逻辑
前端·git·面试
岁月宁静7 小时前
RAG 文档摄入全链路,从原理到生产落地
vue.js·人工智能·python
小和尚同志7 小时前
AI 自动化测试探索(一):Playwright MCP
前端·人工智能·aigc
caimouse7 小时前
Reactos 第 8 章 结构化异常处理 — 8.2 系统空间的结构化异常处理
windows
老马识途2.07 小时前
在AI的帮助下理解spring的启动过程
java·前端·spring
caimouse7 小时前
Reactos 第 7 章 视窗报文 — 7.3 Win32k 的用户空间回调机制
windows
caimouse8 小时前
Reactos 第 9 章 设备驱动 — 9.5 一组PnP设备驱动模块的实例
网络·windows
神成18 小时前
vmware 上 win7 系统按照 vmware tool
windows