That's likely because they are generated by your Apache.
Pi-hole v6 comes with an embedded webserver, so neither lighttpd
nor PHP are used anymore, as mentioned in Introducing Pi-hole v6.
As you are running Apache, you may not have been shown a dialog box about disabling lighttpd
during your v6 upgrade.
I'm not fluent enough in Apache to help you get lua scripting to work, but I can help you sort port conflicts.
Currently, your Pi-hole tries to listen on the same port as your Apache, which will prevent it from starting at all if Apache is already active.
*** [ DIAGNOSING ]: contents of /etc/pihole
(…)
-rw-rw---- 1 pihole pihole 51K Feb 22 16:01 /etc/pihole/pihole.toml
(…)
[webserver]
(…)
port = "80o,443os,[::]:80o,[::]:443os"
To avoid port conflicts, you should set webserver.port
.
You should either move it to some other ports, e.g. via CLI:
sudo pihole-FTL --config webserver.port '8088o,8443os,[::]:8088o,[::]:8443os'
Instead of trying to get lua working in Apache, that would allow you to consider to using Pi-hole's webserver.
Or, if instead you'd want to disable it, you could set webserver.port
to an empty string:
sudo pihole-FTL --config webserver.port ''
Note that if this value is not set (empty string), the web server will not be started and, hence, the API will not be available.
Unrelated to your issue, your debug log shows that your router is advertising its own IPv6 addresses as DNS servers:
Recursive DNS server 1/2: 2a<redacted>40
Recursive DNS server 2/2: fe<reddacted>40
This would allow IPv6 capable clients to by-pass Pi-hole and should be addresses in your router (click for details)
You'd have to find a way to configure your router to stop advertising its own IPv6 as DNS server, or to advertise your Pi-hole host machine's IPv6 instead.
You'd have to consult your router's documentation sources on further details for its IPv6 configuration options.
If your router doesn't support configuring IPv6 DNS, you could consider disabling IPv6 altogether, provided you'd not depend on IPv6 for reasons.
If your router doesn't support that either, your IPv6-capable clients will always be able to bypass Pi-hole via IPv6.
You could then try to mitigate this, by setting Pi-hole as the only upstream of your router, provided your router supports it.
But note that you won't be able to attribute DNS requests to original individual IPv6 clients in such a configuration.