010011110 cce7ea7700 Apply webserver.serve_all to / requested under another Host
`redirect_root_handler()` only redirects / to the web home when the Host
header is webserver.domain. For any other Host - the Pi-hole's IP
address, a missing Host header, "pi.hole." with a trailing dot - it
returned 0, which makes CivetWeb skip the remaining handlers and serve
the file itself. `request_handler()`, registered for "**", never ran, so
with webserver.serve_all=false (the default) an index.html, index.htm or
index.lp in the webroot was still served, and an index.lp executed,
while every other path outside the web home got 404.

Hand those requests to `request_handler()` instead. With serve_all off
/ now gets 404 like any other path outside the web home; with serve_all
on it returns 0 for / and CivetWeb serves the index as before. The
redirect for webserver.domain is unchanged.

Signed-off-by: 010011110 <duckenheim@posteo.de>
2026-10-04 10:26:36 +02:00
…
…
…
…
…

Pi-hole logo
Network-wide ad blocking via your own Linux hardware

FTLDNS logo

FTLDNS (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole®'s Web interface.

  • Fast: stats are read directly from memory by coupling our codebase closely with dnsmasq
  • Versatile: upstream changes to dnsmasq can quickly be merged in without much conflict
  • Lightweight: runs smoothly with minimal hardware and software requirements such as Raspberry Pi Zero
  • Interactive: our API can be used to interface with your projects
  • Insightful: stats normally reserved inside of dnsmasq are made available so you can see what's really happening on your network

Official documentation

The official FTLDNS documentation can be found here.

Installation

FTLDNS (pihole-FTL) is automatically installed when installing Pi-hole.

IMPORTANT

FTLDNS will disable any existing installations of dnsmasq. This is because FTLDNS is dnsmasq + Pi-hole's code, so both cannot run simultaneously.

Languages
C 96.7%
Python 1.1%
C++ 1.1%
Shell 0.7%
CMake 0.3%