The issue I am facing:
I'm installing pihole on a new pi because the SD card on my live one seems flaky. I have apache2 in the same pi, and it uses ports :80 and :8080 for other apps.
I want pihole's new web server to render the web interface on :8888 so in
/etc/pihole/pihole.toml I changed
port = "80o,443os,[::]:80o,[::]:443os"
to
port = "8888o,443os,[::]:8888o,[::]:443os"
but when I open http://[newPi-IP]:8888/admin/ I see
Error 404: Not Found
Not found
Opening http://[newPi-IP]:8888/ shows
Error 403: Forbidden
Error: Directory listing denied
which is different to another installation I have that shows a proper 403:
Opening http://[workingPi-IP]:8888/ correctly shows
"403
Oops! Access denied.
You don't have permission to access / on this server.
Did you mean to go to your Pi-hole's dashboard instead?"
So something's different on the new installation.
Details about my system:
It's a freshly installed LAMP server, fully updated after install, RaspiOS bookworm.
I've checked that there's no mention of :8888 in /etc/apache2/ports.conf
which has
Listen 80
Listen 8080
<IfModule etc. ...
and that /etc/apache2/sites-enabled/000-default.conf defines virtual hosts for *:80 and *:8080 only.
What I have changed since installing Pi-hole:
just the port line in /etc/pihole/pihole.toml
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
I just opened http://192.168.0.110:8888/admin/
and find that apache2 access.log for 192.168.0.110 for today is empty (checked with WinSCP and in terminal with nano)
Not until I open http://192.168.0.110:80 does anything appear in the file, as follows:
192.168.0.2 - - [23/Apr/2025:12:08:33 +0800] "GET / HTTP/1.1" 200 3380 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0"
192.168.0.2 - - [23/Apr/2025:12:08:33 +0800] "GET /icons/openlogo-75.png HTTP/1.1" 200 6040 "http://192.168.0.110/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0"
I did journalctl -b >journal.txt
Don't really know how to interpret the contents of that but a text search on 'error' showed only lines related to camera and audio that I don't use.
I wondered if something else was bound to 8888, so in /etc/pihole/pihole.toml, I changed
port = "8888o,443os,[::]:8888o,[::]:443os"
to
port = "8880o,443os,[::]:8880o,[::]:443os"
but going to http://192.168.0.110:8880/admin/
gave me the same
Error 404: Not Found
Not found
I've now reverted to 8888 (which works on the other pi with a flaky micro SD), but I still have no clue of where else to look. The failure of 8880 to work suggests to me that it's something within the pihole built-in server.
I have now uninstalled pihole completely and then reinstalled it. Changed that one line in pihole.toml to
port = "8888,443os,[::]:80o,[::]:443os" ### CHANGED, default = "80o,443os,[::]:80o,[::]:443os"
making :8888 not optional and leaving IPV6 alone, as I don't use it.