# DO NOT EDIT THIS FILE -- OPNsense auto-generated file# caddy_user=root# Global Options{ log { include http.log.access.6a100fb9-863d-4a8e-a6dc-6aaad5598184 output net unixgram//var/run/caddy/log.sock { } format json { time_format rfc3339 } } email *email* grace_period 10s import /usr/local/etc/caddy/caddy.d/*.global}# Reverse Proxy Configuration# Reverse Proxy Domain: "ef64738b-136e-4bba-b267-f6307990db7b"domain.tld { tls /var/db/caddy/data/caddy/certificates/temp/66a3c470808dc.pem /var/db/caddy/data/caddy/certificates/temp/66a3c470808dc.key handle { reverse_proxy 127.0.0.1 { transport http { tls } } } abort}[u][b]This section does not work[/b][/u]# Reverse Proxy Domain: "6a100fb9-863d-4a8e-a6dc-6aaad5598184"*.local.domain.tld { log 6a100fb9-863d-4a8e-a6dc-6aaad5598184 tls /var/db/caddy/data/caddy/certificates/temp/66a26c37d9228.pem /var/db/caddy/data/caddy/certificates/temp/66a26c37d9228.key @febd140e-6307-4080-8419-d1de0c6a23b2 { host *.local.domain.tld } handle @febd140e-6307-4080-8419-d1de0c6a23b2 { handle { reverse_proxy *local 192 address*:port { transport http { tls tls_server_name *.local.domain.tld } } } abort } @dbd15585-f172-4fbd-8524-13d6dcd351af { client_ip local 192 address } handle @dbd15585-f172-4fbd-8524-13d6dcd351af { } abort}
*.local.domain.tld { log 6a100fb9-863d-4a8e-a6dc-6aaad5598184 tls /var/db/caddy/data/caddy/certificates/temp/66a26c37d9228.pem /var/db/caddy/data/caddy/certificates/temp/66a26c37d9228.key @febd140e-6307-4080-8419-d1de0c6a23b2 { host *.local.domain.tld }
Oh. I assumed that I have to redirect e.g. nextcloud.example.com to 192.168.1.1 LAN GW so that it arrives at the firewall and thus at Caddy and Caddy forwards it to the Nextcloud 192.168.10.10.
You have enabled TLS, does that mean your internal service has a globally trusted certificate? Because if not, you need to make sure Caddy trusts the certificate.Check this out, it explains it: https://docs.opnsense.org/manual/how-tos/caddy.html#reverse-proxy-the-opnsense-webguiOtherwise, disable both TLS options you have set, and enable "TLS Insecure Skip Verify", it will skip certifocate handling and the internal HTTPS connection will "just work".