Admin Panel not loading as expected

The issue I am facing:
admin panel not loading as expected

Details about my system:
Virtual Box 7.0.6
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian

What I have changed since installing Pi-hole:
New install - first solo install, I have helped other people in the past install on R-pi 3

did have lighttpd issue changed to port 8888 seems to have fixed it but still not loading
firefox


chrome
Just shows PHP code
https://tricorder.pi-hole.net/McY0EL1a/

You are using Apache, not lighttpd:

*** [ DIAGNOSING ]: Dashboard headers
[✗] Web interface X-Header: X-Header does not match or could not be retrieved.
HTTP/1.1 200 OK
Date: Sun, 12 Mar 2023 16:36:02 GMT
Server: Apache/2.4.54 (Debian)

This shows Apache is not configured to handle PHP files.

If you look in the header of the file you changed, you will see this:

cat /etc/lighttpd/lighttpd.conf | grep '#'
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Lighttpd config for Pi-hole
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
###################################################################################################
#   IF THIS HEADER EXISTS, THE FILE WILL BE OVERWRITTEN BY PI-HOLE'S UPDATE PROCEDURE.            #
#   ANY CHANGES MADE TO THIS FILE WILL BE LOST ON THE NEXT UPDATE UNLESS YOU REMOVE THIS HEADER   #
#                                                                                                 #
#   ENSURE THAT YOU DO NOT REMOVE THE REQUIRED LINE:                                              #
#                                                                                                 #
#   include "/etc/lighttpd/conf-enabled/*.conf"                                                   #
#                                                                                                 #
###################################################################################################
# For lighttpd version 1.4.46 or above, the port can be overwritten in `/etc/lighttpd/external.conf` using the := operator
# e.g. server.port := 8000
# Allow streaming response
# reference: https://redmine.lighttpd.net/projects/lighttpd/wiki/Server_stream-response-bodyDetails
#ssl.read-ahead              = "disable"
# Add user chosen options held in (optional) external file
# default listening port for IPv6 falls back to the IPv4 port

What is the complete URL you are using in Firefox to access the web admin GUI?

~Update~

  1. I missed the prerequisites about Apache Prerequisites - Pi-hole documentation
    I ran sudo systemctl disable apache2 && sudo systemctl stop apache2

  2. I didn't see the header in nano in putty. Is there a better view to use?
    since disabling apache I reverted back to port 80

  3. I have a friend using ubuntu who has no issues their debug file shows PHP 8.1.7
    for some reason, Debian ran on PHP 7.4.1
    I updated to 8.2.3 and it resolved the issue I was facing

  1. Disabling Apache should fix the issues.

  2. If you are using only lighttpd, you don't need to set a different port (as you already noticed), but if you want to change the port for whatever reason, the best way to do it is creating a new config file in /etc/lighttpd/conf-enabled/ directory with the new port.

    Example: /etc/lighttpd/conf-enabled/15-pihole-admin-port.conf:

    server.port := 8888
    
  3. After disabling Apache, PHP pages will be handled by lighttpd web server. Pi-hole would work even with PHP 7.0. The issue you had before was not related to PHP version. The problem was Apache was not configured to use PHP.