How to serve Jenkins?

I want to serve Jenkins CI with Caddy.

Reading How to proxy from port to path I have this Caddyfile: {
    proxy / http://localhost:8080

Now I access Jenkins on port 8080 and set the Jenkins URL in Jenkins settings. Then Jenkins complains that the reverse proxy setup is broken, see Reverse proxy configuration.

When I access it via https and port 80 some pages work but on lots of pages I get redirected to localhost:80.

Has someone successfully used Jenkins with Caddy?

It seems that using the transparent preset fixes this: {
    proxy / http://localhost:8080 {
        max_fails 0

max_fails 0 for me was required because sometimes I got a 502 Bad Gateway response. See this caddy issue.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.