Cannot access pi.hole admin GUI

Expected Behaviour:

When trying to access http://pi.hole or http://pi.hole/admin, I should be able to access the admin page.

Actual Behaviour:

When browsing to http://pi.hole or http://pi.hole/admin, I get the placeholder page. When I don't include http://, I get 403 forbidden.

Extra information:

I first followed this thread, and deleted the index.lighthttpd.html file. Then, I only got a 403 error. Therefore, I followed this thread and purged the lighttpd package with

sudo dpkg -P lighttpd

Reinstalled it with

sudo apt install --reinstall lighttpd

Then I tried to repair pihole with

pihole -r

But instead I got the error

root@Alexandria:~# pihole -r

  [✓] Root user check
  [i] Existing PHP installation detected : PHP version 5.6.40-0+deb8u9
  [i] Repair option selected
  [✗] Disk space check
  [i] Unknown free disk space! 
      We were unable to determine available free disk space on this system.
      You may override this check, however, it is not recommended.
      The option '--i_do_not_follow_recommendations' can override this.
      e.g: curl -L https://install.pi-hole.net | bash /dev/stdin <option>

Even the option --i_do_not_follow_recommendations did not work and gave me the same error.

I cannot tail the lighthttpd access.log, as it does not exist:

root@Alexandria:~# tail -f /var/log/lighttpd/access.log
tail: cannot open '/var/log/lighttpd/access.log' for reading: No such file or directory

Debug Token:

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

I don't have access to your debug token, but it is likely the installation of lighttp failed due to too little free space.

Please post the output of
df -h

As far as I'm correct, the installation of lighttpd seems to be fine:

root@Alexandria:~# sudo service lighttpd status
[ ok ] lighttpd is running.

Anyhow:

root@Alexandria:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
none            249M  2.5M  246M   1% /dev

Is that the whole output of the df command?
What device are you running?
Please try

sudo df -hla

and

sudo tail -f /var/log/lighttpd/error.log

What placeholder page are you getting? Please post a screen shot of what you are seeing, including the address window in the snap. In this forum you can paste a screen capture directly into a reply.

root@Alexandria:~# sudo df -hla
Filesystem      Size  Used Avail Use% Mounted on
proc               0     0     0    - /proc
sys                0     0     0    - /sys
none            249M  2.5M  246M   1% /dev
none               0     0     0    - /dev/pts
root@Alexandria:~# sudo tail -f /var/log/lighttpd/error.log
2020-05-05 12:20:39: (log.c.217) server started 

@jfb:
Here's http://pi.hole

And here's pi.hole/admin

Your /etc/lighttpd/lighttpd.conf file is not the one installed by the pi-hole.net distribtuion of Pi-hole. From what source did you install your Pi-hole?

Run pihole -r and select "repair", and see if this resolves the problem.

The interesting thing is that things used to work up until today. I had absolutely no issues with lighttpd beforehand.
I simply followed this guide, and installed pihole by using

curl -L https://install.pi-hole.net | bash

Repairing pihole does not work:

root@Alexandria:~# pihole -r

  [✓] Root user check
  [i] Existing PHP installation detected : PHP version 5.6.40-0+deb8u9
  [i] Repair option selected
  [✗] Disk space check
  [i] Unknown free disk space! 
      We were unable to determine available free disk space on this system.
      You may override this check, however, it is not recommended.
      The option '--i_do_not_follow_recommendations' can override this.
      e.g: curl -L https://install.pi-hole.net | bash /dev/stdin <option>

Can you share your docker run or docker-compose ?

1 Like

Can try patch the current install.
Backup the config file:

sudo mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.org

Grab the one from the Pi-hole install:

sudo wget https://raw.githubusercontent.com/pi-hole/pi-hole/master/advanced/lighttpd.conf.debian -O /etc/lighttpd/lighttpd.conf

Might want to adjust the port configured for lighttpd to other than 80:

sudo nano /etc/lighttpd/lighttpd.conf

Restart:

sudo service lighttpd restart

Check for errors:

sudo tail -20 /var/log/lighttpd/error.log

And try access the admin page.

Where is this running? What virualization are you using? Your df shows no root partition so the free space check fails. Nevertheless, without a root partition there's no place to put anything.

If this is in docker, then kill the container and start over. Don't run any apt commands inside the container. If this is on a NAS or another similar setup then please explain.

I'm running this on a Synology in Debian chroot as outlined by this guide.

Sorry for taking so long, I have finally gotten around to checking this.
I grabbed the one from the pi-hole install, restarted lighttpd, but to no avail. Still getting 403 Forbidden.

root@Alexandria:/# sudo tail -20 /var/log/lighttpd/error.log
2020-05-05 12:20:39: (log.c.217) server started 
2020-05-11 10:46:21: (server.c.1828) server stopped by UID = 0 PID = 21550 
2020-05-11 10:46:22: (log.c.217) server started 
root@Alexandria:/# sudo tail -20 /var/log/lighttpd/access.log 
1589186794|pi.hole|GET /admin/index.php HTTP/1.1|403|345

What user/group is lighttpd running under ?

pi@noads:~ $ ps -o uid,user,gid,group,pid,cmd -C lighttpd
  UID USER       GID GROUP      PID CMD
   33 www-data    33 www-data  6570 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

Whats ownership/permissions for the doc root ?

pi@noads:~ $ stat -c "%U %G %a %n" /var/www/html
www-data www-data 775 /var/www/html

And for files in the admin folder ?

pi@noads:~ $ stat -c "%U %G %a %n" /var/www/html/admin/*
root root 644 /var/www/html/admin/api_db.php
root root 644 /var/www/html/admin/api_FTL.php
root root 644 /var/www/html/admin/api.php
root root 644 /var/www/html/admin/auditlog.php
root root 644 /var/www/html/admin/CONTRIBUTING.md
root root 644 /var/www/html/admin/db_graph.php
root root 644 /var/www/html/admin/db_lists.php
root root 644 /var/www/html/admin/db_queries.php
root root 644 /var/www/html/admin/debug.php
root root 644 /var/www/html/admin/gravity.php
root root 644 /var/www/html/admin/help.php
root root 755 /var/www/html/admin/img
root root 644 /var/www/html/admin/index.php
root root 644 /var/www/html/admin/LICENSE
root root 644 /var/www/html/admin/list.php
root root 644 /var/www/html/admin/network.php
root root 644 /var/www/html/admin/queries.php
root root 644 /var/www/html/admin/queryads.php
root root 644 /var/www/html/admin/README.md
root root 755 /var/www/html/admin/scripts
root root 644 /var/www/html/admin/settings.php
root root 755 /var/www/html/admin/style
root root 644 /var/www/html/admin/taillog-FTL.php
root root 644 /var/www/html/admin/taillog.php
root@Alexandria:/# ps -o uid,user,gid,group,pid,cmd -C lighttpd
  UID USER       GID GROUP      PID CMD
   33 www-data    33 www-data 21590 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd
root@Alexandria:/# stat -c "%U %G %a %n" /var/www/html
www-data www-data 775 /var/www/html
root@Alexandria:/# stat -c "%U %G %a %n" /var/www/html/admin/*
root root 644 /var/www/html/admin/api_db.php
root root 644 /var/www/html/admin/api_FTL.php
root root 644 /var/www/html/admin/api.php
root root 644 /var/www/html/admin/auditlog.php
root root 644 /var/www/html/admin/CONTRIBUTING.md
root root 644 /var/www/html/admin/db_graph.php
root root 644 /var/www/html/admin/db_lists.php
root root 644 /var/www/html/admin/db_queries.php
root root 644 /var/www/html/admin/debug.php
root root 644 /var/www/html/admin/gravity.php
root root 644 /var/www/html/admin/help.php
root root 755 /var/www/html/admin/img
root root 644 /var/www/html/admin/index.php
root root 644 /var/www/html/admin/LICENSE
root root 644 /var/www/html/admin/list.php
root root 644 /var/www/html/admin/network.php
root root 644 /var/www/html/admin/queries.php
root root 644 /var/www/html/admin/queryads.php
root root 644 /var/www/html/admin/README.md
root root 755 /var/www/html/admin/scripts
root root 644 /var/www/html/admin/settings.php
root root 755 /var/www/html/admin/style
root root 644 /var/www/html/admin/taillog-FTL.php
root root 644 /var/www/html/admin/taillog.php

That 403 error is related to permissions.
Either for the files its trying to publish or other things that fail to load like for example PHP mods.
Dont have tips for Synology though.

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