如何与凯蒂一起为詹金斯服务?
问题描述:
我想与凯蒂一起为Jenkins CI服务。如何与凯蒂一起为詹金斯服务?
阅读about Caddy "How to proxy from port to path"我有这个Caddyfile
:
jenkins.example.com {
proxy/http://localhost:8080
}
现在我访问詹金斯在8080端口上,并设置在詹金斯设置Jenkins URL
。然后Jenkins抱怨反向代理设置被破坏,请参阅"Jenkins says my reverse proxy setup is broken"。
当我通过https和80端口访问它时,有些页面可以正常工作,但是在很多页面上,我将其重定向到localhost:80
。
有人成功地使用了Jenkins和Caddy吗?
答
看来,使用transparent
预先设置修补这样的:
jenkins.example.com {
proxy/http://localhost:8080 {
transparent
max_fails 0
}
}
max_fails 0
对我来说是必要的,因为有时我得到了一个502 Bad Gateway
响应。见this caddy issue。
您将URL配置为_Jenkins URL_? – StephenKing
它被设置为'https:// jenkins.example.com /'。我发现添加'透明'代理预设似乎工作! –