i have pihole installed on a different machine, so pi hole do not run as a docker container next to Traefik.
What i have done is, that i added pihole as an external router to my config.yml.
If i access the URL via my browser, i can see the start page of pihole, but after fill in my admin credentials,
the site will always redirect to /admin
So, i navigate to
I can see the pihole admin page.
But after i fill in my admin credentials, i will be redirected to
which is not available. White screen, no admin interface annymore.
If i then delete the /admin from the URL, i can see the admin panel again and i am logged in....
How is it possible with Traefik that there is not redirect to /admin, so i only want to use the URL
Is that possible?
Here is my config
- url: "http://xxx.xxx.xxx.xxx:80"
Thanks and regards
Why do you have this? Messing with paths for a full-blown application usually does not work. Apps are mostly not path-aware and will redirect or link to fixed paths, which then don’t work anymore.
Best practice for multiple services on the same (reverse proxy) server is to use sub-domains.
I use the subdomain pihole.local.localdomain.... For each Service behind Traefik an own local subdomain. That just works fine for all my Services, execp pihole, because if i will open the sudomain for pihole and enter my credentials, pihole will redirect me to /admin, which does not exist. So i want to redirect back to the subdomain of pihole. But that isn't working....
Yes, still not working. Same effect as before.... .
Without the path manipulation your config looks okay, have you restarted Traefik?
Check Traefik debug log and access log. Check your target service log.
I had the same issue yesterday. The redirects don't get updated and pihole redirects you to the wrong pages constantly.
If you're willing to have /admin put in the URL automatically you can also just use the following middleware to redirect from the root to /admin automatically
thanks, this works fine.
The only thing is now, that always the path /admin is there.
It is ok for me..... But is there no way to work only with the base URL, without the addition of
the path /admin in the URL...?
Thanks and regards
the setup below seems to be working for me.
- kind: Rule
- name: dashboard-redirect
- name: dashboard-prefix
- name: pihole-tcp
that worked great for me. thank you @ajschmidt8
Here's a version for others not using k8s