404 Not Found when trying to access login page

The issue I am facing:
I have installed pihole on a raspberry pi 4. It appears that the pihole is working and blocking ads. I saw other forums that there was conflicts between services using the same ports, but that does not seem to be the issue here.

Im not sure if this is related, but i am getting errors in my debug file that there are failed connection attempts even though i am able to access the internet and am currently blocking ads. I cannot access the portal locally or through any other pc on the network.

i have tried:

http://pi.hole
http://pi.hole/admin
http://pi.hole/admin/login
http://pi.hole:80/admin/login
http://192.168.1.36 (Pi's IP address)
http://192.168.1.36/admin
http://192.168.1.36/admin/login
http://192.168.1.36:80/admin/login

All to no avail.

Details about my system:

Versions:
Core version is v6.0.5 (Latest: v6.0.5)
Web version is v6.0.2 (Latest: v6.0.2)
FTL version is v6.0.4 (Latest: v6.0.4)

Debug Token: https://tricorder.pi-hole.net/iAsGYv6N/

I am completely stumped here - any clue where i can go from here.

Your debug log shows that pihole-FTL is listening for HTTP requests on port 80, indicating that this is a Pi-hole v6 installation:

*** [ DIAGNOSING ]: Ports in use
    udp:0.0.0.0:5353 is in use by avahi-daemon
    udp:0.0.0.0:47111 is in use by <unknown>
    udp:0.0.0.0:123 is in use by pihole-FTL
    udp:0.0.0.0:37051 is in use by avahi-daemon
    udp:*:5353 is in use by avahi-daemon
    udp:*:58886 is in use by avahi-daemon
    udp:*:47111 is in use by <unknown>
[✓] udp:0.0.0.0:53 is in use by pihole-FTL
[✓] udp:*:53 is in use by pihole-FTL
[✓] tcp:[::]:53 is in use by pihole-FTL
[✓] tcp:0.0.0.0:53 is in use by pihole-FTL
    udp:*:123 is in use by pihole-FTL
[✓] tcp:0.0.0.0:443 is in use by pihole-FTL
[✓] tcp:[::]:443 is in use by pihole-FTL
    tcp:0.0.0.0:22 is in use by sshd
[✓] tcp:0.0.0.0:80 is in use by pihole-FTL
[✓] tcp:[::]:80 is in use by pihole-FTL
    tcp:127.0.0.1:631 is in use by cupsd
    tcp:127.0.0.1:44091 is in use by containerd
    tcp:0.0.0.0:4001 is in use by lighttpd
    tcp:[::]:22 is in use by sshd
    tcp:[::1]:631 is in use by cupsd
    tcp:[::]:4001 is in use by lighttpd

That would suggest that you should be able to access Pi-hole's UI via http://pi.hole/admin, or in case the accessing browser would not use Pi-hole for DNS via http://192.168.1.36/admin (provided you are accessing this from your home network, and not via Wireguard).

It's unusual though that an unknown process is listening on port 47111.
That was the API port in Pi-hole v5.

Is this a fresh install of Pi-hole v6 or an upgrade from v5?

Right, that was my understanding, hence my confusion.

Clarification:
I am not using wireguard for this connection, i am unable to connect from home network.

This is a fresh install of v6. I have purged and reinstalled twice now, to no avail.

"It's unusual though that an unknown process is listening on port 47111."

^^ Yeah this was my own doing following some tutorial for a pihole/VPN that suggested to use that port. While this is the end goal, I want to get Pi-Hole working before I worry about the VPN side of things lol. Could this be part of the issue? Even though i am not currently using the wireguard interface or VPN connection?

"Is this a fresh install of Pi-hole v6 or an upgrade from v5?"

This is a fresh install of v6. I have purged and reinstalled twice now, to no avail.

This is not the Pi-hole 404 page.

It should look like this:

Looks like another web server is answering the request.

Are you sure you are connecting to the same network Pi-hole is installed?or are you using a VPN and another service is answering the request?

I am sure i am on the same network. I can ssh into the device on the same device, so I'm on the same network, I just cant see the admin portal for whatever reason.

My pihole -d command shows the pihole-FTL is using port 80, so it shouldn't be the case that a different webserver is being used here.

Is there a way to get the pi-hole webserver to use a different port? That feels easier than trying to pin down whatever other webserver conflict is running alongside.

I could disable lighttpd, but I have done this before and it did not fix the issue, however i am not against trying again if you'd like to see some results from this troubleshooting.

Should note I also tried to access locally on the pi itself and could not reach it there either.

What do you see if you try accessing using https?

Also, please generate a new debug log.

I see this - same thing:

New Debug log:
https://tricorder.pi-hole.net/A03jBjK9/

OK.
I found a very unusual way to replicate your screenshot.

Error 404: Not Found
Not found

If I move most of the files from /var/www/html/admin to a different place, the web server will show the same error message, but this is not a normal circumstance.


What is the output of ls -la /var/www/html/admin?

Here is the output:

user@pi:~ $ sudo ls -la /var/www/html/admin
total 628
drwxr-xr-x  9 root root   4096 Mar  8 01:49 .
drwxr-xr-x  3 root root   4096 Mar  8 01:49 ..
-rw-r--r--  1 root root     17 Mar  8 01:49 .codespellignore
-rw-r--r--  1 root root   2348 Mar  8 01:49 CONTRIBUTING.md
drwxr-xr-x  2 root root   4096 Mar  8 01:49 .devcontainer
-rw-r--r--  1 root root    571 Mar  8 01:49 .editorconfig
-rw-r--r--  1 root root   1026 Mar  8 01:49 error403.lp
-rw-r--r--  1 root root    969 Mar  8 01:49 error404.lp
drwxr-xr-x  8 root root   4096 Mar 12 21:21 .git
-rw-r--r--  1 root root     12 Mar  8 01:49 .gitattributes
drwxr-xr-x  3 root root   4096 Mar  8 01:49 .github
-rw-r--r--  1 root root    154 Mar  8 01:49 .gitignore
-rw-r--r--  1 root root   1323 Mar  8 01:49 gravity.lp
-rw-r--r--  1 root root   4964 Mar  8 01:49 groups-clients.lp
-rw-r--r--  1 root root   8860 Mar  8 01:49 groups-domains.lp
-rw-r--r--  1 root root   4562 Mar  8 01:49 groups-lists.lp
-rw-r--r--  1 root root   3324 Mar  8 01:49 groups.lp
drwxr-xr-x  3 root root   4096 Mar  8 01:49 img
-rw-r--r--  1 root root  10853 Mar  8 01:49 index.lp
-rw-r--r--  1 root root   1129 Mar  8 01:49 interfaces.lp
-rw-r--r--  1 root root  14136 Mar  8 01:49 LICENSE
-rw-r--r--  1 root root   7591 Mar  8 01:49 login.lp
-rw-r--r--  1 root root   1580 Mar  8 01:49 messages.lp
-rw-r--r--  1 root root   2851 Mar  8 01:49 network.lp
-rw-r--r--  1 root root   3997 Mar  8 01:49 package.json
-rw-r--r--  1 root root 340940 Mar  8 01:49 package-lock.json
-rw-r--r--  1 root root   9835 Mar  8 01:49 queries.lp
-rw-r--r--  1 root root  10188 Mar  8 01:49 README.md
drwxr-xr-x  4 root root   4096 Mar  8 01:49 scripts
-rw-r--r--  1 root root   2212 Mar  8 01:49 search.lp
-rw-r--r--  1 root root   1471 Mar  8 01:49 settings-all.lp
-rw-r--r--  1 root root  15226 Mar  8 01:49 settings-api.lp
-rw-r--r--  1 root root  20522 Mar  8 01:49 settings-dhcp.lp
-rw-r--r--  1 root root  18114 Mar  8 01:49 settings-dns.lp
-rw-r--r--  1 root root   7129 Mar  8 01:49 settings-dnsrecords.lp
-rw-r--r--  1 root root   7230 Mar  8 01:49 settings-privacy.lp
-rw-r--r--  1 root root  18639 Mar  8 01:49 settings-system.lp
-rw-r--r--  1 root root   6617 Mar  8 01:49 settings-teleporter.lp
drwxr-xr-x  3 root root   4096 Mar  8 01:49 style
-rw-r--r--  1 root root   1448 Mar  8 01:49 taillog.lp
drwxr-xr-x 29 root root   4096 Mar  8 01:49 vendor

The output seems correct... and that's why I can't understand your issue. The web interface should be working.

On your Pi, what is the output of curl -I http://127.0.0.1/admin/login?

user@pi:~ $ curl -I http://127.0.0.1/admin/login
HTTP/1.1 404 Not Found
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Expires: 0
Pragma: no-cache
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: *
Content-Type: text/plain; charset=utf-8
Date: Thu, 13 Mar 2025 01:58:12 GMT
Connection: close

I might be speaking checkers while you’re discussing chess here, but I overcame this issue today with pihole -r.