Admin page showing as text on Ubuntu 16.04 LTS

Please follow the below template, it will help us to help you!

Expected Behaviour:

[Admin PHP page should appear in html style]

Actual Behaviour:

[Page is appearing as text]

Debug Token:

[
root@Multiserver:~# pihole -d
::: Beginning Pi-hole debug at Sun 3 Sep 13:04:51 BST 2017!
:::
::: This process collects information from your Pi-hole, and optionally uploads
::: it to a unique and random directory on tricorder.pi-hole.net.
:::
::: NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers
::: can access your data via the given token. We have taken these extra steps to
::: secure your data and will work to further reduce any personal information gathered.
:::
::: Please read and note any issues, and follow any directions advised during this process.
:::
::: —= Detecting Installed Package Versions:
::: Pi-hole: v3.1.4 (master:v3.1.4-0-gb0ecedd)
::: Pi-hole Dashboard: v3.1 (master:v3.1-0-gf204b71)
::: lighttpd/1.4.35
::: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
:::
::: —= Detecting existence of /etc/pihole/setupVars.conf:
::: File exists, parsing…done and was successfully sourced
:::
::: —= Detecting installed OS Distribution
:::
::: —= Checking processor variety
:::
::: —= Checking IPv6 Stack
::: No IPv6 found on eth0
:::
::: —= Checking IPv4 Stack
::: IPv4 addresses located on eth0
::: Pinging default IPv4 gateway: ::: Gateway responded.
::: Pinging Internet via IPv4: ::: Query responded.
:::
::: —= Daemon Process Information
::: Checking http port for lighttpd listener.
::: Correctly configured.
:::
::: —= Daemon Process Information
::: Checking domain port for dnsmasq listener.
::: Correctly configured.
:::
::: —= Daemon Process Information
::: Checking 4711 port for pihole-FTL listener.
::: Correctly configured.
:::
::: —= Processes Check
::: Logging status of lighttpd, dnsmasq and pihole-FTL…
:::
::: —= Resolver Functions Check (IPv4)
::: Checking for necessary lighttpd files.
:::
::: —= Detecting existence of /etc/lighttpd/lighttpd.conf:
::: File exists, parsing…done
:::
::: —= Detecting existence of /var/log/lighttpd/error.log:
::: /var/log/lighttpd/error.log not found!
:::
:::
::: —= Detecting existence of /etc/dnsmasq.conf:
::: File exists, parsing…done
:::
::: —= Detecting contents of /etc/dnsmasq.d/*:
:::
::: —= File /etc/dnsmasq.d/01-pihole.conf found
::: Parsing…done
:::
::: —= File /etc/dnsmasq.d/README found
::: Parsing…done
:::
:::
::: —= Detecting existence of /etc/pihole/whitelist.txt:
::: File exists, parsing…done
:::
::: —= Detecting existence of /etc/pihole/blacklist.txt:
::: /etc/pihole/blacklist.txt not found!
:::
::: —= Detecting existence of /etc/pihole/adlists.list:
::: File exists, parsing…done
:::
::: —= Analyzing gravity.list
:::
::: —= Analyzing pihole.log
:::
::: —= Analyzing pihole-FTL.log
:::
::: --= User Action Required =–
::: Try loading a site that you are having trouble with now from a client web browser…
::: (Press CTRL+C to finish logging.)
:::
::: —= pihole.log
::: Logging will automatically teminate in 60 seconds
^C: 30 seconds left.
::: Finishing debug write from interrupt… Quitting!
::: Finshed debugging!
::: The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
::: Would you like to upload the log? [y/N] n
::: Log will NOT be uploaded to tricorder.
::: There was an error uploading your debug log.
::: Please try again or contact the Pi-hole team for assistance.
::: A local copy of the Debug log can be found at : /var/log/pihole_debug.log
]

I installed Pi-hile and all works, but initially it would not show the admin page as html. Then suddenly it started working. Then I had to reboot and it has stopped again.

I also have:

root@Multiserver:~# curl -I http://localhost/admin/
HTTP/1.1 200 OK
Date: Sun, 03 Sep 2017 11:59:36 GMT
Server: Apache/2.4.18 (Ubuntu)
Last-Modified: Fri, 01 Sep 2017 12:13:41 GMT
ETag: "1a2c-5581fb1147605"
Accept-Ranges: bytes
Content-Length: 6700

It’s OK I think I found what is wrong - Apache2 was over-riding the lighttpd web server - disable Apache and boom!

thanks

Now this happens with the curl -I http://localhost/admin/ conmand :
root@Multiserver:~# curl -I http://localhost/admin/
HTTP/1.1 200 OK
X-Pi-hole: The Pi-hole Web interface is working!
X-Frame-Options: DENY
Set-Cookie: PHPSESSID=mkllgd5ntqhr3i7ka5rhckekt0; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Date: Sun, 03 Sep 2017 12:21:52 GMT
Server: lighttpd/1.4.35

2 posts were split to a new topic: Admin interface rendering as text only - Apache