【发布时间】:2021-08-29 21:23:04
【问题描述】:
我在 http 服务器 A 上有一个哑 git 存储库,该服务器无法从 Internet 访问。我在 DMZ 中有服务器 B,我想成为我的 git 存储库的网关。 git 存储库是只读的,没有来自互联网的推送。
如果我使用http,即允许使用git pull http://serverB/git/project,那么解决方案很简单,我只需要将端口80从B转发到A。
但是如何启用git pull https://serverB/git/project?
ServerB 有公共 IP 和对应的证书。
【问题讨论】:
-
设置一个 https 代理(nginx 是一个常用选项),将来自服务器 B 端口 443 的 https 连接转发到服务器 A 端口 80 上的常规 http。
标签: git nginx redirect https proxy