[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"app-article-3":3,"article-surround-3":211},{"article":4,"markdown":20},{"id":5,"category_id":6,"title":7,"author":8,"image":9,"describe":10,"views":11,"sort":12,"status":13,"is_link":6,"link_url":14,"is_hot":6,"created_by":13,"updated_by":15,"create_time":16,"update_time":17,"username":18,"avatar":19},3,2,"SaiAdmin 宝塔部署教程","saithink","https://image.saithink.top/storage/20260412/b28da1d93013ad32ddd2a625fa7883dffca9d291.png","介绍saiadmin的宝塔部署方式，部署异步项目",1696,100,1,"",123,"2024-06-02 22:58:41","2026-11-19 23:38:23","admin","https://image.saithink.top/storage/20260410/7971881d7e10a122e0f51ea188571dbe29d82229.jpg",{"body":21,"data":206,"toc":207},{"type":22,"children":23},"root",[24,33,39,45,50,63,72,82,89,97,104,112,120,127,132,137,144,149,156,163,170,177,189,194,199],{"type":25,"tag":26,"props":27,"children":30},"element","h1",{"style":28,"id":29},"text-align: justify;","宝塔部署",[31],{"type":32,"value":29},"text",{"type":25,"tag":34,"props":35,"children":36},"p",{},[37],{"type":32,"value":38},"部署案例信息，后端webman运行的是8787端口，前端域名采用的是 www.neoadmin.top",{"type":25,"tag":40,"props":41,"children":43},"h3",{"id":42},"本地打包",[44],{"type":32,"value":42},{"type":25,"tag":34,"props":46,"children":47},{},[48],{"type":32,"value":49},"1、前端打包",{"type":25,"tag":34,"props":51,"children":52},{},[53,55,61],{"type":32,"value":54},"找到  ",{"type":25,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":32,"value":60},".env.production",{"type":32,"value":62}," ，修改以下配置",{"type":25,"tag":34,"props":64,"children":65},{},[66],{"type":25,"tag":67,"props":68,"children":71},"img",{"src":69,"alt":70,"dataHref":69,"style":14},"https://image.saithink.top/storage/20260412/0d618e602ae158aac567d4cfe5d9998eaf73d377.png","image.png",[],{"type":25,"tag":34,"props":73,"children":74},{},[75,77],{"type":32,"value":76},"执行打包命令 ",{"type":25,"tag":56,"props":78,"children":79},{},[80],{"type":32,"value":81},"pnpm run build，打包好后，在dist文件能够看到以下内容",{"type":25,"tag":34,"props":83,"children":84},{},[85],{"type":25,"tag":67,"props":86,"children":88},{"src":87,"alt":70,"dataHref":87,"style":14},"https://image.saithink.top/storage/20260412/7bf2652ab440c3d1896831ec16669688f521869e.png",[],{"type":25,"tag":34,"props":90,"children":91},{},[92],{"type":25,"tag":56,"props":93,"children":94},{},[95],{"type":32,"value":96},"注意：本地要先通过 pnpm install 将前端包安装好",{"type":25,"tag":34,"props":98,"children":99},{},[100],{"type":25,"tag":101,"props":102,"children":103},"br",{},[],{"type":25,"tag":34,"props":105,"children":106},{},[107],{"type":25,"tag":56,"props":108,"children":109},{},[110],{"type":32,"value":111},"2、部署内容整合",{"type":25,"tag":34,"props":113,"children":114},{},[115],{"type":25,"tag":56,"props":116,"children":117},{},[118],{"type":32,"value":119},"将前端文件拷贝到 server 的public 目录，内容如下",{"type":25,"tag":34,"props":121,"children":122},{},[123],{"type":25,"tag":67,"props":124,"children":126},{"src":125,"alt":70,"dataHref":125,"style":14},"https://image.saithink.top/storage/20260412/e1bceb38d8cad982468d9649f32a252120fd3b6b.png",[],{"type":25,"tag":34,"props":128,"children":129},{},[130],{"type":32,"value":131},"3、上传到服务器",{"type":25,"tag":34,"props":133,"children":134},{},[135],{"type":32,"value":136},"我们新建一个目录，将整合后的后端内容上传到服务器，本地server 对应 服务器 neoadmin.top",{"type":25,"tag":34,"props":138,"children":139},{},[140],{"type":25,"tag":67,"props":141,"children":143},{"src":142,"alt":70,"dataHref":142,"style":14},"https://image.saithink.top/storage/20260412/26bc3e95fd2787ec4aa89e27912c29739c450ccb.png",[],{"type":25,"tag":34,"props":145,"children":146},{},[147],{"type":32,"value":148},"4、创建php异步项目",{"type":25,"tag":34,"props":150,"children":151},{},[152],{"type":25,"tag":67,"props":153,"children":155},{"src":154,"alt":70,"dataHref":154,"style":14},"https://image.saithink.top/storage/20260412/3509495a19b7da4e55d24735d6865a29bb3a2490.png",[],{"type":25,"tag":34,"props":157,"children":158},{},[159],{"type":25,"tag":67,"props":160,"children":162},{"src":161,"alt":70,"dataHref":161,"style":14},"https://image.saithink.top/storage/20260412/89bdabe9290eac79037ab68cd8de298701bd7e13.png",[],{"type":25,"tag":34,"props":164,"children":165},{},[166],{"type":25,"tag":67,"props":167,"children":169},{"src":168,"alt":70,"dataHref":168,"style":14},"https://image.saithink.top/storage/20260412/a85624bea3855fc96d4ddc81a5b8abb7465a22f7.png",[],{"type":25,"tag":34,"props":171,"children":172},{},[173],{"type":25,"tag":67,"props":174,"children":176},{"src":175,"alt":70,"dataHref":175,"style":14},"https://image.saithink.top/storage/20260412/03713be83df6adf8b45bf51b3a2c9c1ae1c0a895.png",[],{"type":25,"tag":178,"props":179,"children":180},"pre",{},[181],{"type":25,"tag":182,"props":183,"children":186},"code",{"className":184},[185],"language-bash",[187],{"type":32,"value":188},"location /prod/ {\n\tproxy_set_header Host $http_host;\n\tproxy_set_header X-Real-IP $remote_addr;\n\tproxy_set_header REMOTE-HOST $remote_addr;\n\tproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\tproxy_pass http://127.0.0.1:8787/;\n}",{"type":25,"tag":34,"props":190,"children":191},{},[192],{"type":32,"value":193},"5、项目正常访问成功",{"type":25,"tag":34,"props":195,"children":196},{},[197],{"type":32,"value":198},"访问自己的域名：",{"type":25,"tag":34,"props":200,"children":201},{},[202],{"type":25,"tag":67,"props":203,"children":205},{"src":204,"alt":70,"dataHref":204,"style":14},"https://image.saithink.top/storage/20260412/d198e987ba2b2669b6eb3bb9c9239657c0590306.png",[],{},{"title":14,"searchDepth":208,"depth":6,"links":209},6,[210],{"id":42,"depth":5,"text":42},{"code":212,"message":213,"data":214},200,"success",{"prev":215,"next":215},null]