Pi-hole, Nginx Proxy Manager and domain names

I've come back over to the Pi-hole side after a few years using AdGuard Home (for no other reason than I fancied a change). I have Pi-hole running again on one of my Pis, and all is working well.

What I'd like to do next is to replicate the setup I had with AGH, by being able to access Pi-hole using a subdomain of my main domain name. I use Nginx Proxy Manager to setup my proxy hosts. The issue I'm facing is that I can't get it setup correctly...

The Pi's IP address is 192.168.1.100. I have setup a proxy host as being:

Domain Name = pihole.MYDOMAIN.co.uk
Scheme = http
Forward Hostname = 192.168.1.100
Forward Port = 80

But all I get is the lighttpd Welcome Page.

What am I doing wrong? No doubt something completely obvious, but something I can't see...

I'm not very good with nginx configuration, but your issue seems to be related to the path.

Try to add /admin to your configuration.
Pi-hole interface correct address is: http://192.168.1.100/admin/

Unfortunately this change just gives a '404 Not Found' error. Good idea though!

I had this on my Nginx Proxy Manager as well. My fix was replacing the index page with an automatic redirect to the admin page.
In /var/www/html, replace the contents of "index.lighttpd.html" with the html below. The body isn't strictly necessary, but if your browser blocks the auto redirect it is nice to have.

<!DOCTYPE html>
<head>
    <meta http-equiv="refresh" content="0;url=/admin">
</head>
<body>
    <p>Redirect: <a href="/admin">Admin Page</a></p>
</body>

Thanks @TylerRose this worked a treat!

Hi there, this thread helped me and I think there is an other solution as well:


Adding
location /admin/ {
proxy_pass http://192.168.123.100:80/admin/;
}
(Replace the IP Address with your own pi-hole IP) and you're good to go..

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