Pihole breaks lighttpd cgi perl scripts

The issue I am facing:
I am trying to set up pihole on a pi5.

Prior to loading it I had a lighttpd server running which was successfully serving /var/www/html/index.html and a few perl scripts in /var/www/html/cgi-bin.

Pihole is not yet fully configured but it is intercepting my perl scripts - they now return:
"404 Oops! Page not found. We could not find the page you were looking for. Meanwhile, you may want to return to the dashboard".

My index.html is still being delivered.

I cannot find any activity in any of the lighttpd or pihole logs apart from FTL.log showing NTP traffic.

With a previous setup on a pi3 the upgrade to v6.2.2 went somewhat differently - pihole politely avoided port 80 and chose port 8080 so I didn't have this problem.

I'd appreciate any advice on fixing web access to the perl scripts on my pi5.
Phil

Details about my system:

Pi5. Linux Pi5 6.12.47+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16) aarch64 GNU/Linux

Pihole:
Core version is v6.4 (Latest: v6.4)
Web version is v6.4.1 (Latest: v6.4.1)
FTL version is v6.5 (Latest: v6.5)

What I have changed since installing Pi-hole: Nothing

1 Like

Pi-hole doesn't use lightttpd.
You'd have to make sure that Pi-hole's embedded webserver doesn't conflict with your lightppd, e.g. by operating them on different ports.

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:

sudo pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

Ah: you have given me the vital clue.

I have changed the port= parameter in /etc/pihole/pihole.toml to 8080 rather than 80.

That gives my me perl scripts on :80 and pihole admin on :8080.

Very many thanks. Problem solved.

Phil

1 Like