Question about reverse proxy Caddyfile syntax variations

Consider the following scenario:
app1 -
app2 -
app3 -

Have DDNS set up with the following domains:

I’ve seen the syntax written a few different ways. Here is one variation: {
} {
} {

Then I was reading an article on the wiki here, which has a whole different take on it.

reverse_proxy /service-a/*
reverse_proxy /service-b/*

What’s the difference, and does it matter in my use case?

I believe the former refers to domain-based networks, which uses subdomains e.g., while the latter refers to a path-based network, which uses subdirectories e.g.

1 Like

See the reverse_proxy docs here:

The difference is the later uses a path matcher:

Also see the Caddyfile Concepts docs page which describes the difference in terms of structure (multiple sites in the first, vs one site in the second):

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.