Migration from Caddy v1 to v2 directives - reverse proxy

1. The problem I’m having:

I have tried several times to move from Caddy v1 to v2 but always have problems with reverse-proxy nodes.

With Caddy v1, my Caddyfile consists of import directive for each node

import	                                    /etc/caddy/sub1.something.Caddyfile
import	                                    /etc/caddy/sub2.something.Caddyfile
import	                                    /etc/caddy/sub3.something.Caddyfile

Please help with translating the below Caddyfile to the correspoding v2 directives.

2. Error messages and/or full log output:


3. Caddy version:

4. How I installed and ran Caddy:

a. System environment:

Ubuntu 20.04 or 22.04

b. Command:


c. Service/unit/compose file:


d. My complete Caddy config:

The Caddyfile for sub1.something node as following,

https://sub1.something.com 			            {
	tls     admin@something.com
	proxy /         	{ transparent insecure_skip_verify }

The backend is apache or nginx using the default self-signed SSL

SSLCertificateFile	/etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

5. Links to relevant resources:

I don’t understand the question. Your config’s formatting looks broken, and is missing detail.

Don’t put “N/A” for any sections of the topic template. Fill out every question, as per the forum rules. We won’t be able to help you otherwise.

Have you read the upgrade guide? Upgrading to Caddy 2 — Caddy Documentation