vue做前端,thinkphp6做后台,项目部署
2022-11-24 11:10:29
228
{{single.collect_count}}

前后端分离开发完毕打包后,面临上线部署问题,一种做法是前后端分开来部署。前端nginx服务器配置反向代理;另外一种做法是把打包好的前端代码放置ThinkPHP框架Public目录下,默认访问index.html即可

location /admin/ {proxy_set_header Host $proxy_host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header X-NginX-Proxy true;proxy_pass 'http://admin.caorulai.com/';}
回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}