|
Here's the setup. 2 DNS entries example.com and *.example.com These both point to the pangolin vps. Pangolin is set up with the domain pangolin.example.com On pangolin I set up a wildcard resource *.example.com to route to a Nginx rp, however, pangolin.example.com is also being routed there causing all sorts of fun. Been through the docs on wildcard setup, but struggling to figure out how to get this working. Any pointers? example.com used in place of real domain here. |
Replies: 2 comments 1 reply
|
You've already got a proxy with Traefik in Pangolin? Maybe create a dedicated resource for |
|
Your wildcard resource wins over the dashboard because Pangolin gives it an explicit priority and the dashboard routers have none. What Pangolin generates for a wildcard resource is a regex router: I reproduced it with Traefik v3.6 and two whoami backends:
Sweeping the wildcard priority against the dashboard router with no priority puts the crossover where the rule length says: at 53 the dashboard wins, at 55 the wildcard does. So the fix is an explicit priority on the dashboard routers. In That last point is also why adding a dedicated resource for |
Your wildcard resource wins over the dashboard because Pangolin gives it an explicit priority and the dashboard routers have none.
What Pangolin generates for a wildcard resource is a regex router:
buildHostRuleinserver/lib/traefik/rule.tsturns*.example.comintoHostRegexp(`^[^.]+\.example\.com$`), andcomputeRoutePriorityin the same file returns 100 for a target with no path and no explicit priority. Your dashboard is served by the routers in the installedconfig/traefik/dynamic_config.yml(main-app-router-redirect,next-router,api-router, plusws-routeron installer-generated configs), and none of them setspriority. In Traefik a router without an explicit priority gets one equal …