caddyFile reverse proxy v2, wit insecure_skip_verify

Hi , i am a newbee in caddy and struggle with a problem around backend with no valid SSL

1. The problem I’m having:

I have a backend with an unsecured SSL certificate (no valid root certificate). and i do not find how to configure the insecure_skip_verify configuration

NB: i cannot change the fact that the ssl certificate is wrong

I want to have Client HTTP => to caddy => backend 443 (wrong certificate)

if i setup straight reverse proxy configuration file

    reverse_proxy https://myCorruptedSSL:443 

the error message is “tls: failed to verify certificate: x509: certificate signed by unknown authority”

then i am adjusting the configuration to

    reverse_proxy https://myCorruptedSSL:443 
		transport http {

and i got this error message

{"level":"info","ts":1688397782.3754442,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
Error: adapting config using caddyfile: parsing caddyfile tokens for 'reverse_proxy': /etc/caddy/Caddyfile:5 - Error during parsing: for now, all proxy upstreams must use the same scheme (transport protocol); expecting 'https://' but got '://'

not sure what to put there i have tries many combination but not the good one :frowning:

can someone help ?

thanks in advance

3. Caddy version:

i am using caddy v2.6.4

4. How I installed and ran Caddy:

i am running it via docker compose via basic configuration

` caddyproxy :
image: caddy
restart: unless-stopped
- 8090:80

  - ./caddyConfigSSL.txt:/etc/caddy/Caddyfile


a. System environment:

Windows + WSL2 + Podman compose

The { to open a block must be on the same line as the directive attached to it, it should not be on the next line. I think that’s what’s causing parsing problems in this case.

1 Like

thanks it helps a lot !

looking around the document it is clearly mentionned,

  • The open curly brace { must be at the end of its line and preceded by a space.
  • The close curly brace } must be on its own line.

that s a bit in between Json, and yml and other , but it s written so i am guilty :slight_smile:

thanks for your help

1 Like

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