Pihole appears to be working, but I can't access the web interface

I just set up my pihole and it was working fine but I wanted to see if I could restart it so I pulled the power cord out (I now know this was a bad idea). When I plugged it back in I can see in my router that it has the static ip and when I run -status it says it's working, but when I try to access the web interface on pi.hole or any other way, it doesn't work.

I'm using an at&t router and I have my raspberry pi hooked up through the ethernet.

The only thing I can remember changing was I made pihole the DHCP server. Other than that I just restarted it and the web interface wasn't working.

I ran a debug thing and the debug token is
https://tricorder.pi-hole.net/NhImltGb

-rw-r--r-- 1 www-data www-data 4.9K Feb 15 20:31 /var/log/lighttpd/error-pihole.log
   -----head of error-pihole.log------
   2023-02-15 20:17:10: (server.c.1551) server started (lighttpd/1.4.63)
   2023-02-15 20:17:10: (mod_accesslog.c.565) opening log '/var/log/lighttpd/access.log' failed: Permission denied
   2023-02-15 20:17:10: (server.c.1555) Configuration of plugins failed. Going down.

From the Pi terminal, what is the output of the following command:

sudo ls -lha /var/log/lighttpd/access.log

ls: cannot access '/var/log/lightpd/access.log': No such file or directory

There's a typo in that attempt, there should be two t's, can you try jfb's command again?

1 Like

My bad. Now I typed in

ls -lha /var/log/lighttpd/access.log

and I got back

-rw-r--r-- 1 root root 0 Feb 16 06:27 /var/log/lighttpd/access.log

It has the wrong ownership for some reason, meaning the webserver can't open it, which is probably why it's zero length too. At the moment it's owned by root. Can you try these commands step by step please? Copy and paste to avoid any typos.

Fix the ownership

sudo chown www-data:www-data /var/log/lighttpd/access.log

Confirm it is now owned by www-data and not by root.

sudo ls -lha /var/log/lighttpd/access.log

Reboot

sudo reboot

Once it's back up... is Pi-hole web interface now working?

Also check those permissions again to be sure they have stuck

sudo ls -lha /var/log/lighttpd/access.log

Re-run another debug log and post the token URL

pihole -d
1 Like

That seemed to do that trick! My debug token is https://tricorder.pi-hole.net/AVDPxdWF/

I can use the web interface again. Thanks!

1 Like

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