Please follow the below template, it will help us to help you!
Installed Ali-hole and the install went great.. logged into the web user interface from my phone even. Then suddenly the web user interface stopped working. I have checked and nothing else is on port 80. When I try to check the ports it looks like the lighttpd service doesn’t even run at all.
Expected Behaviour:
Type device IP or pi.hole/admin to access web UI
Actual Behaviour:
web UI does not load and lighttpd service is not running
Your Pi-hole's error log has lots of these entries:
2023-08-31 18:20:05: server.c.1513) server started (lighttpd/1.4.59)
2023-08-31 18:20:05: mod_accesslog.c.612) opening log '/var/log/lighttpd/access.log' failed: Permission denied
2023-08-31 18:20:05: server.c.1517) Configuration of plugins failed. Going down.
Out of interest what are the permissions and ownership on these files and directories using the commands below? I've included my permissions from a working setup.
This is okay if your router's own upstream DNS server (in its DNS settings) is set to use your Pi-hole on 192.168.1.198. However if you are using this setup then your Pi-hole will see all queries on your network coming from your router and you won't be able to tell what is asking for what.
Instead, a better way is to edit your router's DHCP settings and set the DNS server for your network to be 192.168.1.198 which is the address of your Pi-hole. This will result in your router telling each client on your network to use the Pi-hole directly and now you will be able to see what each client is doing.
The Pi-hole's IP or 192.168.1.198 should also be a fixed IP, so in your router's DHCP leases this should be reserved so that your Pi-hole always gets this address.
It looks like you typed in the results, rather than copy and paste, as they don't look quite right, but I think it's shows they're all okay except for that first entry. You have
So for /var/log/lighttpd/access.log
-rw-r—r— 1 root root 0
and the permissions are okay but the ownership is root which is wrong. It needs to be owned by www-data. To fix that, back in the Pi-hole terminal, issue the command:
Then can you try rebooting your Pi-hole and, once it's back up, see if it the web interface will start now? If it doesn't start, please re-run the sudo ls... command above again and see if it got changed back by something, and also create another debug log and post the new token here.
It's okay, that's just a funny coincidence. Those numbers, 40 and 80, in our results, relate to the filesystem where things like access.log are being stored.