I’m talking about our “due to parsing difficulties” error:
$ cat Caddyfile
:80
map {hostname} {ip} {
foo.example.com 1.2.3.4
bar.example.com 2.3.4.5:8080
default 4.5.6.7
}
reverse_proxy http://{ip}
$ ./caddy adapt --pretty
2021/03/02 15:17:11.650 INFO using adjacent Caddyfile
adapt: parsing caddyfile tokens for 'reverse_proxy': Caddyfile:9 - Error during parsing: due to parsing difficulties, placeholders are not allowed when an upstream address contains a scheme
You would need to explicitly define the port for each entry in the map to :80
and then omit http://
.