Hi,
From wiki: Wildcards ( *
) may be used, but only to represent precisely one label of the hostname. For example, *.example.com
matches foo.example.com
but not foo.bar.example.com
, and *
matches localhost
but not example.com
. To catch all hosts, omit the host portion of the address.
Is it possible to match in Caddyfile foo-bar.example.com somehow? If we write *bar.example.com
or *-bar.example.com
it doesnt work. **Its not RFC, but problem with SSL and LetsEncrypt is that you **cannot** have
foo.bar.example.com`, because wildcard certificates work only One Level.** Then lot of hosting providers use foo-bar instead of foo.bar.
Any idea if this can somehow work? In nginx you have simple regex for server_name like (server_name ~^(?[^.]+).example.com)