Lighttpd daemon keep does not start

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

Debug Token:

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

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.

$ sudo ls -l /var/log/lighttpd/access.log
-rw-r--r-- 1 www-data www-data 1280 Sep 1 00:25 /var/log/lighttpd/access.log
$ sudo ls -ld /var/log/lighttpd
drwxr-x--- 2 www-data www-data 4096 Aug 27 00:00 /var/log/lighttpd
$ sudo ls -ld /var/log
drwxr-xr-x 14 root root 4096 Sep 1 00:00 /var/log
$ sudo ls -ld /var/run/lighttpd
drwxr-x--- 2 www-data www-data 80 Jul 26 02:24 /var/run/lighttpd

Note that your router is the DHCP server on the network and it is giving out itself to clients to use as the DNS server.

  DHCP options:
      server-identifier: 192.168.1.1
      router: 192.168.1.1
      dns-server: 192.168.1.1

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.

So for /var/log/lighttpd/access.log
-rw-r—r— 1 root root 0

For /var/log/lighttpd
drwxr-x—- 2 www-data www-data 4096

For /var/log
drwxr-xr-x 18 root 4096

For /var/run/lighttpd
drwxr-x—- 2 www-data www-data 40

Hmmm…. So I’m assuming something is up with my configuration causing it to use port 40 instead of 80?

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:

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

Then check it by doing another

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

and now it should show ownership by www-data www-data, and not root root

-rw-r--r-- 1 www-data www-data 1280 Sep  1 00:25 /var/log/lighttpd/access.log

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.

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