You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reverse proxying an HTTPS backend that uses a self-signed certificate, Caddy will normally reject it because it cannot verify the certificate authority.
248
+
249
+
To skip this verification we can modify site entry of the [caddyfile](https://caddyserver.com/docs/quick-starts/caddyfile) as shown below:
250
+
251
+
*Note: replace `calibre.xxx.com` with your domain and `172.xxx.xxx.xxx:8181` with your backend service IP and port.*
252
+
253
+
```caddyfile
254
+
calibre.xxx.com {
255
+
reverse_proxy https://172.xxx.xxx.xxx:8181 {
256
+
transport http {
257
+
tls
258
+
tls_insecure_skip_verify
259
+
}
260
+
}
261
+
}
262
+
```
263
+
264
+
**Bonus Tip 1**: If you find yourself needing to do this for multiple services, you can also define a [caddy snippet](https://caddyserver.com/docs/caddyfile/concepts#snippets) and reuse it in your caddyfile like so:
265
+
266
+
```caddyfile
267
+
(allow_insecure_ssl) {
268
+
transport http {
269
+
tls
270
+
tls_insecure_skip_verify
271
+
}
272
+
}
273
+
calibre.xxx.com {
274
+
reverse_proxy https://172.xxx.xxx.xxx:8181 {
275
+
import allow_insecure_ssl
276
+
}
277
+
}
278
+
```
279
+
280
+
**Bonus Tip 2**: If you use [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy), you can simply apply the following labels to your docker-compose yaml file:
0 commit comments