Skip to content

How to migrate a Caddyfile with wildcard site and host matchers to Ferron? #455

@krovuxdev

Description

@krovuxdev

Hello,
I want to start using Ferron, but I have some doubts about how to properly migrate my current Caddy configuration.

In Caddy, I use a wildcard site (*.example.com) and then route traffic to different services based on the host using named matchers. I like this approach because I can keep everything under a single wildcard domain.
Here is a simplified example of my current Caddyfile:

{
    admin 0.0.0.0:2019
}

*.example.com {
    tls internal
    tls {
        dns cloudflare {env.CLOUDFLARE_API_TOKEN}
        propagation_delay 2m
        resolvers 1.1.1.1
    }

    @foo host foo.example.com
    reverse_proxy @foo backend_foo:8008

    @bar host bar.example.com
    reverse_proxy @bar backend_bar:8001
}

My questions are:

  • Is it possible to achieve a similar setup in Ferron using a wildcard domain (*.example.com)?
  • What is the recommended way to translate Caddy named matchers (@foo, @bar) into ferron.kdl?
  • Should each subdomain be defined explicitly, or is there a cleaner pattern for this kind of configuration?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions