How to setup Caddy to send an https request to the server?

1. Caddy version (caddy version):

2.4.6

2. How I run Caddy:

with docker as always :slight_smile:

a. System environment:

docker linux

b. Command:

c. Service/unit/compose file:

d. My complete Caddyfile or JSON config:

https://example.tld {
 reverse_proxy 127.0.0.1:8080 {
  transport http {
     tls_insecure_skip_verify
    }
  }
}

3. The problem I’m having:

i want to specify to caddy to use https for my application that is not using http by default.

4. Error messages and/or full log output:

5. What I already tried:

this config in my Caddyfile but aren’t sure if it’s the good way for it.

6. Links to relevant resources:

You haven’t actually used either of the two ways to tell Caddy to use TLS.

Either use https:// in front of the upstream address, or add the tls http transport option.

What’s your full config at this point? You may have misunderstood what I meant, so please share the actual config you tried.

The “upstream address” is 127.0.0.1:8080.

I’m saying you should use https://127.0.0.1:8080

OR

Add the tls option inside of transport http (not the same as tls_insecure_skip_verify, it’s another distinct option).

This topic was automatically closed after 30 days. New replies are no longer allowed.