Hi folks,

Just set up Nginx Proxy Manager + Pihole and a new domain with Porkbun. All is working and I have all my services service.mydomain.com, however some services such as pihole seem to be strictly reachable with /admin at the end. This means with my current setup it only directs me to pihole.mydomain.com which leads to a 403 Forbidden.

This is what I have tried, but with no prevail. Not really getting the hang of this so would really appriciate a pinpoint on this :)

  • Bakkoda
    link
    fedilink
    English
    21 day ago

    Side question: Are you exposing your pihole externally?

    • Sunny' 🌻OP
      link
      fedilink
      English
      116 hours ago

      nope. Been using Tailscale to acesss my stuff from home.

  • Saiwal
    link
    fedilink
    62 days ago

    Add the following in Advanced tab

    location / {   return 301 /admin;}location /admin {   proxy_pass [url=http://<Pi-hole-IP>:<Pi-hole-Port>/admin;]http://<Pi-hole-IP>:<Pi-hole-Port>/admin;[/url]   proxy_set_header Host $host;   proxy_set_header X-Real-IP $remote_addr;   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;   proxy_set_header X-Forwarded-Proto $scheme;}
    

    replace the IP and port

    • Sunny' 🌻OP
      link
      fedilink
      English
      22 days ago

      Thank you for providing this, however when i now browse to pihole.mydomain.com it gives me a 404, and the URL is directed to pihole.mydomain.com/admin:8118. E.g. the port is somehow ending up at the end of the url haha.

      • Saiwal
        link
        fedilink
        32 days ago

        @Sunny’ 🌻 that must not happen, did you remove the custom location from before? The above is working with my pihole setup

        • Sunny' 🌻OP
          link
          fedilink
          English
          32 days ago

          Ahhh i got it working now! Thanks a bunch for the help, been trying to get this to work for hours now hehe

          • K3CAN
            link
            English
            16 hours ago

            If you’re going to be playing with custom locations and such, it might be worth using nginx directly instead of through the limitations of NPM.