Pi-hole v6 Nginx Reverse Proxy Issue – Admin Dashboard Not Resolving Without /admin/ Path

Expected Behaviour:

Previously, on Pi-hole v5, I could access the admin login page by using just the IP and port (e.g., http://<Pi-hole_IP>:80) when resolving my FQDN internally through my Synology NAS's built-in Nginx reverse proxy. No additional configuration was needed beyond setting the IP and port in Nginx.

Actual Behaviour:

After upgrading to Pi-hole v6, attempting to access http://<Pi-hole_IP>:80 results in a 403 error instead of the admin login page. The login page only loads if /admin/ is manually appended to the URL (http://<Pi-hole_IP>:80/admin/).

I am unable to configure directory paths within the Synology Nginx manager—it only allows setting an IP and port. Since this setup worked fine on v5, I am looking for a Pi-hole-side solution to make http://<Pi-hole_IP>:80 automatically serve the admin dashboard without needing to append /admin/.

Debug Token:

(Will provide only if absolutely necessary)

Any guidance on resolving this would be appreciated!

Would it perhaps accept a name instead of an IP?
If so, did you try to use pi.hole:80 yet?

Maybe these posts can help you:

Hi,

Yes, I did try this and it does not work.

Hi,

Thanks for sharing those links, but unfortunately, those solutions don’t work for me.

The real question is, why does v6 behave this way? I’ve never come across a self-hosted service that doesn’t resolve the web interface login page with just the IP and port. Every other self-hosted service does this, so I’m wondering if this is a bug that will be fixed or if it was intentional, and if so why?

Either way, are there any plans to revert this?

Am I correct in assuming that the developers have no plans to restore this to its previous functionality or offer a simplified solution?

Pi-hole v5 didn't automatically redirect using IP for every user.
Actually if you were using IP, this redirection was automatic only in docker (you use docker in Synology).

A lighttpd configuration file containing a hard-coded redirection was installed (/etc/lighttpd/conf-enabled/15-pihole-admin-redirect-docker.conf):

    $HTTP["url"] == "/" {
        $HTTP["host"] == "pihole" {
            url.redirect = ("" => "/admin/")
        }
        $HTTP["host"] == "192.168.0.201" {  #  FTLCONF_LOCAL_IPV4 was used here
            url.redirect = ("" => "/admin/")
        }
    }

Now, you need to create your own redirection using a reverse proxy.

I don't understand what you think is "missing". Pi-hole v5 behaved in the exact same way, where you had to go to /admin to log in.

The only significant difference is the addition of /api. You will likely need to change your nginx configuration to account for this.

I should be more clear: this is not pi-hole's fault. It's a simple nginx configuration change.

No, you are quite incorrect.

https://github.com/pi-hole/web/pull/3269

2 Likes

My Pi-hole is and has always been running on DietPi OS, hosted on a dedicated Raspberry Pi device.

In Pi-hole's local DNS records, I've configured it to forward my FQDN requests internally to my NAS IP. From there, Nginx intercepts the request and directs it to the appropriate service.

This setup used to work perfectly, delivering the actual login page for my service. However, since upgrading from Pi-hole v5 to v6, the only change made, it now returns a 404 error page instead.

Take a look at the attached image? It shows how I set up a reverse proxy in Synology DSM using its built-in Nginx functionality. I run a homelab where I self-host multiple services, and this is the first time I've encountered an issue when reverse proxying my FQDN subdomain to a service's IP and port. Instead of displaying the intended main web service page, it returns a 404 error page that I shared a screen of in the original post. I'm not suggesting Pi-hole is to blame; that wasn't the point of my last response. After waiting 16 days without a response to my last reply, I started thinking maybe there’s no solution for this. One thing is clear, though: this probably isn’t how it’s supposed to work.

And very happy to be.

Appreciate the team's efforts.

Issue is still persisting in recent 6.1 update.

Is that 404 a recent occurrence?
Your original post doesn't show a 404:

I am not familiar with Synology's nginx frontend, but your nginx configuration should match something like

That isn't possible with v6 as Pi-hole needs /admin/ and the new /api/ path to work.

What's possible is that / can redirect to /admin/ which somehow also will make http://<Pi-hole_IP>/ "work" as it will automatically redirect to http://<Pi-hole_IP>/admin/
This auto-redirect only happens, if Pi-hole setting webserver.domain is set to the domain you are using. So try setting this to <Pi-hole_IP> and I guess it should work.

1 Like

I just realized I made a typo that I’ve now corrected. It’s a 403 page, not a 404.

It worked successfully. Thank you for providing that information.

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