Cannot Load Admin Interface

Hello, as the title states I am unable to load the admin interface. I did a fresh install of pihole on a semi-fresh install of Debian on a RaspberryPI 4. Port 80 is already in use by Apache for Nextcloud but it seems that the pihole installation process did not catch this (I was under the impression that if port 80 is already being used, the pihole.toml file will say that the port should be 8080, but it didn't). I went into the pihole.toml file and changed the port to 8080 and did a sudo systemctl restart pihole-FTL.

Now, if I go to 192.168.1.101:8080/admin, I get "Error 404: Not Found
Not found" but magically the url somehow gets /login appended to the end without my intervention. If I go to https://192.168.1.101/admin/, I get an index directory of files that seem to be related to the pihole interface, but no actual interface.

Any idea what I'm doing wrong? ufw has port 8080/tcp open.

Thank you in advance for any assistance.

Debug token: https://tricorder.pi-hole.net/RBo42Nt6/

Using the https:// without any port will go to your apache2 server:

tcp:*:443 is in use by apache2

You'd need to use https://192.168.1.101:8443/

tcp:[::]:8080 is in use by pihole-FTL
tcp:[::]:8443 is in use by pihole-FTL
[webserver]
     domain = "pi.hole"
     port = "8080,8443s,[::]:8080,[::]:8443s" ### CHANGED, default = "80o,443os,[::]:80o,[::]:443os"

Yes, you need to authenticate to use the admin page.

   [2025-03-31 18:55:56.770 CEST 6547] Initializing HTTP server on ports "8080,8443s,[::]:8080,[::]:8443s"
   [2025-03-31 18:56:39.765 CEST 6547] Authentication required, redirecting to /admin/login

What happens when you try http://pi.hole/admin/ as the URL?

Thank you for the quick follow-up!

Going to https://192.168.1.101:8443/admin/ gives me the same 404 that 8080 gives.

Going to http://pi.hole/admin gives me "Hmm. We’re having trouble finding that site" in Librewolf and "This site can’t be reached" in ungoogled-chromium.

I allowed 8443 under ufw before attempting to access both sites.

Also, if I go to https://192.168.1.101:8443/ without "admin" appended, I get: "Error 403: Forbidden
Error: Directory listing denied"

This is expected.

The correct URL is https://192.168.1.101:8443/admin. It should also work with http if you try http://192.168.1.101:8080/admin.

Does it work or do you still see 404 error using the links above?

Thank you for the follow up! I am very grateful for everyone being willing to help me out.

Unfortunately clicking both links gives me a 404. But it is appending "login" to the end of the address by itself, which means it is finding something related to pihole and isn't just finding nothing, so I'm hopeful.

ufw is allowing both 8080 and 8443.

edit to add: just to check, i ssh tunneled into the RaspberryPi with port 8080 and still got a 404.

This is 100% normal.

When you access the web interface, it first checks if you are logged in.
If not, it redirects to the login page (/admin/login).

I still don't understand why it is throwing a 404 error.

Does it work using pi.hole hostname?

Clicking both links gives a "Hmm. We’re having trouble finding that site." in Librewolf with the tab saying "Server Not Found."

Could the html file (or whatever type of file) be missing from the installation for the login page? What directory contains the interface files?

If there were changes to the files, the debug log would show them.

/var/www/html/admin.

Note: the files containing the HTML code are written in Lua (.lp and .lua extensions).

Ah well, no worries. I do appreciate everyone trying! I'll see if Adguard Home works.

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