How to route /tiles_*

1. The problem I’m having:

I can’t figure out how to route i.e. /tiles_*

I’ve tried

reverse_proxy /tiles_* http://basemaps:8080

and:

@basemaps_tiles path_regexp ^/tiles_.*
reverse_proxy @basemaps_tiles http://basemaps:8080

Won’t work. Super annoying…

2. Error messages and/or full log output:

No error, but won't route

3. Caddy version:

v2

Share your Caddyfile please.

1 Like

Actually just figured it out. It seems blocks override oneliners.. I had fallback block in the end, which apparently was higher priority than oneliners

handle and route have higher priority than reverse_proxy. That’s why I asked for the full Caddyfile. It’s hard to understand exactly what’s going on from just a snippet.

Directive order is one of the most important things to keep in mind when working with Caddy:

1 Like

Seems so, thank you for the further info! :raising_hands: