Accessing Pihole installed on Dietpi via domain using Traefik reverse proxy

I have a few different instances of Piholes running for different networks within my home. All except one of them are on Proxmox as LXC. One of them is installed on an old minipc running dietpi. I was able to set up all my LXC to work with Traefik using middlewares and adding a virtual_host configuration to my LXC settings. However, I do not know how to get it working for dietpi. So basically my domain points to the login page but once I login I get the following:
Failed Host Check: pihole.domain.com vs 192.168.10.07, pihole, pi.hole, localhost

This was the case with LXCs as well but once I added virtual host name it works fine now. But I do not know where to add this virtual host configuration in Dietpi.

Any tips?
Thanks!

which web server you choose? I would like to do some testing.

I used the Native PC for BIOS/CSM, if that is what you are asking.

Nope, i would need to know the web server you selected together with PiHole on dietpi-software

Oh sorry. I went with lighttpd.

Hmm issues seem to be with Traefik because I did some testing using native Lighttpd + SSL and NginxProxManager + SSL. In both cases I was able to login to PiHole without issues. :thinking:

Maybe you can check with Traefik community, at least I found a similar case with a possible solution External Pihole behind Traefik redirect /admin - Traefik v2 - Traefik Labs Community Forum

Uhh wait, there is exactly your problem describe on the last post. Seems you are not only one having this issue. Or was it you adding this post? At least IP address seems to match. :smiley:

Yup that was me.
I was trying from every side.

Anyway I have figured out the solution yesterday night and now its working.

The solution is to set the hostname of the dietpi itself to the domain name.

1 Like

Yes, I guess similar like this one I found on PiHole forum Pi-Hole Failed Host Check after added domain/IP combination - #9 by engineBH - Community Help - Pi-hole Userspace

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.