pihole webpage giving 400 bad request error

command:

Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep 12 15:28:51 2019 from 192.168.1.25
pi@raspberrypi:~$ sudo ls -la /var/www/hmtl/admin
ls: cannot access ‘/var/www/hmtl/admin’: No such file or directory
pi@raspberrypi:~$

That’s not a valid token.

sudo ls -la /var/www/html/admin (I mistyped the full path.)

token:

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

command

Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep 12 15:36:02 2019 from 192.168.1.25

pi@raspberrypi:~$ sudo ls -la /var/www/html/admin
total 276
drwxr-xr-x 7 root     root      4096 Sep 11 18:07 .
drwxrwxr-x 4 www-data www-data  4096 Sep 11 18:07 ..
-rw-r--r-- 1 root     root     11342 Sep 11 18:07 api_db.php
-rw-r--r-- 1 root     root      8760 Sep 11 18:07 api_FTL.php
-rw-r--r-- 1 root     root      3609 Sep 11 18:07 api.php
-rw-r--r-- 1 root     root      2795 Sep 11 18:07 auditlog.php
-rw-r--r-- 1 root     root      2339 Sep 11 18:07 CONTRIBUTING.md
-rw-r--r-- 1 root     root      2244 Sep 11 18:07 db_graph.php
-rw-r--r-- 1 root     root      4273 Sep 11 18:07 db_lists.php
-rw-r--r-- 1 root     root      5910 Sep 11 18:07 db_queries.php
-rw-r--r-- 1 root     root       948 Sep 11 18:07 debug.php
drwxr-xr-x 8 root     root      4096 Sep 12 15:36 .git
drwxr-xr-x 2 root     root      4096 Sep 11 18:07 .github
-rw-r--r-- 1 root     root       153 Sep 11 18:07 .gitignore
-rw-r--r-- 1 root     root      1229 Sep 11 18:07 gravity.php
-rw-r--r-- 1 root     root      9398 Sep 11 18:07 help.php
drwxr-xr-x 2 root     root      4096 Sep 11 18:07 img
-rw-r--r-- 1 root     root     10811 Sep 11 18:07 index.php
-rw-r--r-- 1 root     root     14164 Sep 11 18:07 LICENSE
-rw-r--r-- 1 root     root      3300 Sep 11 18:07 list.php
-rw-r--r-- 1 root     root      2843 Sep 11 18:07 network.php
-rw-r--r-- 1 root     root       652 Sep 11 18:07 .pullapprove.yml
-rw-r--r-- 1 root     root      5475 Sep 11 18:07 queries.php
-rw-r--r-- 1 root     root      1110 Sep 11 18:07 queryads.php
-rw-r--r-- 1 root     root      9422 Sep 11 18:07 README.md
drwxr-xr-x 4 root     root      4096 Sep 11 18:07 scripts
-rw-r--r-- 1 root     root     93198 Sep 11 18:07 settings.php
drwxr-xr-x 3 root     root      4096 Sep 11 18:07 style
-rw-r--r-- 1 root     root       939 Sep 11 18:07 taillog-FTL.php
-rw-r--r-- 1 root     root       931 Sep 11 18:07 taillog.php
-rw-r--r-- 1 root     root        45 Sep 11 18:07 .user.php.ini

pi@raspberrypi:~$

/etc/lighttpd/lighttpd.conf has not been changed.

-rw-r--r-- 1 root root 3498 Sep 12 12:40 /etc/lighttpd/lighttpd.conf
   server.modules = (
   	"mod_access",
   	"mod_accesslog",
   	"mod_auth",
   	"mod_expire",
   	"mod_compress",
   	"mod_redirect",
   	"mod_setenv",
   	"mod_rewrite"
   )
   server.document-root        = "/var/www/html"
   server.error-handler-404    = "pihole/index.php"

still same error
(restarted lighttpd)

Restarting isn’t going to change anything if the configuration file has not be fixed.

changed the file and then restart

The something is wrong with your SDcard. I’d suggest a new one with a new image of Raspbian.

fresh installation of rasbian, openvpn and pihole multiple times yesterday before posting

Last thing I can think of would be sudo df -h to see if you are out of disk space. If not then I have no solution for you.

not out of disk space cuz i have a 32 gig sandisk class 10 card and with buster lite , openvpn, and p[ihole only.
any other options?

Did you run sudo df -h?

Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Sep 12 15:53:06 2019 from 192.168.1.25
pi@raspberrypi:~$ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  1.4G   27G   5% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M  232K  463M   1% /dev/shm
tmpfs           464M  6.3M  457M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   40M  213M  16% /boot
tmpfs            93M     0   93M   0% /run/user/999
tmpfs            93M     0   93M   0% /run/user/1000
pi@raspberrypi:~$

That looks fine. Once you find out why changes made to /etc/lighttpd/lighttpd.conf don’t seem to apply or save then the 400 responses will be resolved.

should I reboot the pi

what is the output of ls -lh /etc/lighttpd


pi@raspberrypi:~$ ls -lh /etc/lighttpd
total 16K
drwxr-xr-x 2 root root 4.0K Sep 11 18:12 conf-available
drwxr-xr-x 2 root root 4.0K Apr 13 05:00 conf-enabled
-rw-r--r-- 1 root root    0 Sep 12 12:40 external.conf
-rw-r--r-- 1 root root 3.5K Sep 12 15:43 lighttpd.conf
-rw-r--r-- 1 root root 3.5K Sep 11 18:53 lighttpd.conf.orig

There appears to be some problem writing to your SD card. In your debug log, the most recent log entries shown in any of the logs were three hours prior to when the debug log was run.

Output of

grep server.error-handler-404 /etc/lighttpd/lighttpd.conf