Cannot access admin panel

Hi
I am having an issue with pihole where i can't seem to access the admin page on either http://ipaddress/admin or http://pi.hole/admin
I am running pihole on Raspberry pi 4

Expected Behaviour:

should show the admin page
using macOS on Chrome browser

Actual Behaviour:

showing "404 page not found"

Debug Token:

https://tricorder.pi-hole.net/UaHQ9OsE/

You are running nginx on port 80, not the shipped lighttpd server.

[✗] tcp:0.0.0.0:80 is in use by nginx (https://docs.pi-hole.net/main/prerequisites/#ports)

This is an unsupported configuration. I have moved your post to the Community Help category. If you search that category for nginx you will find discussions.

We also have a user-contributed guide for nginx that you may find helpful:

https://docs.pi-hole.net/guides/webserver/nginx/

oh thank you for your reply.
even if stop the nginx service and start lighttpd service shouldn't that work because it doesn't appear to be?

It should.

unfortunately it still isn't working. i checked pi hole logs that its functioning but just can't access the admin panel.
Here is another debug token if it helps:
https://tricorder.pi-hole.net/yjSxhdsl/

Your debug log shows lighttpd running. Please post a screen capture showing what you see on your browser when you go to the web admin GUI page (including the complete URL).

In this forum, you can paste or upload images directly into your reply.

this is what I'm getting in the browser


when I do a curl:

curl http://pi.hole/admin -I
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Wed, 18 Jan 2023 20:00:25 GMT
Content-Length: 19

or

% curl -I http://192.168.1.250/admin
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Wed, 18 Jan 2023 19:54:57 GMT
Content-Length: 19

however when i do the curl on the pihole machine
i get

curl http://pi.hole/admin/ -I
HTTP/1.1 302 Found
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=fk5ml2jokku0nke0h69dljm4n4; path=/; HttpOnly; SameSite=Strict
Location: login.php
Content-type: text/html; charset=UTF-8
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'self' 'unsafe-inline';
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: same-origin
Date: Wed, 18 Jan 2023 20:02:42 GMT
Server: lighttpd/1.4.53

hope that helps?

One of your screenshots indicates your device can't resolve pi.hole.

Please run from that device dig pi.hole

ah sorry. that was before I added pi hole as a dns server. Once I added it, it now resolves but get the same 404 page not found.

Ok. What's the output of

curl -I -s http://pi.hole/admin

it is

curl -I -s http://pi.hole/admin
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Wed, 18 Jan 2023 22:09:21 GMT
Content-Length: 19

There is no server specified in the return.

Are in you redirecting port 80 on your device somewhere?

Hm.. I don't think so. How do I check this?

This is the expected response and shows Pi-hole web interface is running, but you are not able to access it from the machine you are using.

Can you try to connect to the web interface using a different device (another computer or phone)?

i just tried from my phone but get the same curl result as from my laptop. :frowning_face:

i just did a lsof on the pihole machine, hope it helps.

sudo lsof -i:80
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
lighttpd 11105 www-data    4u  IPv4  96469      0t0  TCP *:http (LISTEN)
lighttpd 11105 www-data    5u  IPv6  96470      0t0  TCP *:http (LISTEN)

This answer was not very clear.
What do you see from your phone? Can you access the web interface using the phone?

no i cannot see the web interface on my phone.

I'm not sure what else to do. But the last option I can think of is changing the default port 80 to something else, and now I managed to access admin panel with the new port.