我怎样才能让 jenkins 停止在 mac os x 上监听远程连接`

我怎样才能让 jenkins 停止在 mac os x 上监听远程连接`

实际上,我的 Jenkins 服务器安装在 mac os x 上,并且它具有不安全的 http 端口 8081(http:www.mydomain.com:8081)。我们通过使用 letsencypt 保护并将 apache 用作反向代理将 http 更改为 https,一切运行正常,而且我们能够登录 http 和 https 网址。但实际上我们需要 Jenkins 停止监听它,而应该在本地主机上监听,而且当我点击 http 端口时,它应该被定向到 http。有人可以帮帮我吗?提前谢谢。

答案1

将标志传递--httpListenAddress=127.0.0.1给 Jenkins。这将使其仅绑定到 localhost。在 Mac OS X 上,您可以通过运行以下命令更新 Jenkins plist 来执行等效操作:

sudo defaults write /Library/Preferences/org.jenkins-ci httpListenAddress 127.0.0.1

然后,您可以使用 Apache 接收其他接口上的所有流量,并可以添加mod_rewrite 规则重定向到 https

相关内容