I have just upgrade to the latest release of Pi-hole [v5.2.4]
The fabulous function of Pi-hole is operating as normal, however since upgrading, the Apache2 web server appears to have been clobbered.
My Pi 3+ is [was] running Appache2, Samba and Pi-hole seriously nicely but since the upgrade, the web server returns;
When accessed externally by anyone - "Blocked by Pi-hole"
When accessed by me locally whether Pi-hole is disabled or not
Access to the following website has been denied
{my domain name]
This is primarily due to being flagged as:
Not found on any Blacklist
The second result above is a little contradictory.
Redirecting DNS settings in the router away from Pi-hole achieves nothing.
I seem to recall having to re-jig ports to make Apache2 and Pi-hole live together harmoniously - but cannot remember the details. Will upgrading Pi-hole have made it default to the original port, I wonder?
Since writing my request for assistance, I may have discovered the issue.
I had previously set "server.port = 8080" in the /sys/lighttpd/external.conf file, but discovered the file was empty. I have corrected that by adding the new port info as above and it seems to be behaving itself now.
After noticing a warning of possible security issues I had updated Pi-hole using the command sudo pihole -up so possibly it reinstalled an empty external.conf file.
Pi-hole has always worked well andfor example, clicking on any ad links served at the top of a Google result page always refuses connection but I have noticed an anomaly.
In /etc/apache/sites-enabled/000-default.conf a Virtual Hosts section refers to Port 80 for the web server and also a second Virtual Host section for Pi-hole also refers to Port 80, despite Lighttpd port being set to 8080. Perhaps I should correct the latter to 8080?
No, Pi-hole is only servicing the internal network [ me!]
My apologies, I should have been more accurate in my statement! What I meant is that if anyone visited my web server from outside the internal network by calling the domain name with or without a valid sub directory, would see "Blocked by Pi-hole".
As I subsequently mentioned, /sys/lighttpd/external.conf was mysteriously empty, so I re-added the " server.port = 8080 " line and after a reboot everything seems fine. Both Apache2 [port 80] and Pi-hole [port 8080] are working as before.
One thing that does confuse me is that after searching Google for say "screwdrivers" at the very top of the search results page a load of ads appear, served by Google. Clicking on these, results in a page load failure which shows that Pi-hole is definitely blocking the outgoing signal, but I had expected the ads not to show in the first place. Certainly not a problem but just interested.
The initial sponsored ads are, as you noted, served from a non-blocked google domain. These can only be blocked on URL lever, e.g. by a browser plugin. Following the link requests a domain which is likely on your adlists and thus is blocked by pihole.