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