Hi,
I'm currently trying to integrate pihole in a project with some other services behind the Reverse Proxy TRAEFIK in docker, for this project I'm using a simple free DNS domain taken from DuckDNS, so I can't really create subdomains.
I would like to know if it is possible (and if someone succeed) to access pihole dashboard with a subfolder like my.domain/pihole/admin rather than the classic subdomain like pihole.my.domain/admin.
I try with pathprefix, pathprefixstrip and path in the labels section of my docker-compose but did not succeed yet. For other services like traefik dashboard or portainer it works without problem.
Disclaimer : I'm not very familiar with lighttpd. It seems backend location is '/', which point to website hosted on /var/www/html, so ^/admin/.* queries should match this traefik rule, and then /admin prefix is stripped, so you end up on this (existing) location : '/'.
If you don't strip prefix, you end up in this lighttpd rule :
# If the URL starts with /admin, it is the Web interface
$HTTP["url"] =~ "^/admin/" {
# Create a response header for debugging using curl -I
setenv.add-response-header = (
"X-Pi-hole" => "The Pi-hole Web interface is working!",
"X-Frame-Options" => "DENY"
)
}
Which is tricky, for it always return a 200/HTTP and doesn't send you anywhere on itself.
So, I did that this morning. Deployed a traefik container in front of my pihole+dhcp-helper stack, and it works. Though without having to strip prefix. I'm not sure why, but redirection occurs nonetheless.