首页 > Web开发 > 详细

通过 nginx 访问 golang web

时间:2019-03-16 17:02:34      阅读:207      评论:0      收藏:0      [点我收藏+]

nginx 配文件加入:

upstream frontends {
server 127.0.0.1:端口号;
}

 

location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://frontends;
}

通过 nginx 访问 golang web

原文:https://www.cnblogs.com/liujie-php/p/10542611.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!