Apache2 no longer accessible after upgrading Pi-hole

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?

Can anyone give me some pointers please?

Many thanks!

Sincere thanks for getting back so quickly.

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?

Remove the lighttpd entirely it is not needed.

root@raspberrypi:~# acp apache2
apache2:
  Installed: 2.4.38-3+deb10u4
  Candidate: 2.4.38-3+deb10u4
  Version table:
 *** 2.4.38-3+deb10u4 500
        500 https://mirror.herrbischoff.com/raspbian/raspbian buster/main armhf Packages
        100 /var/lib/dpkg/status
root@raspberrypi:~# acp lighttpd
lighttpd:
  Installed: (none)
  Candidate: 1.4.53-4+deb10u1
  Version table:
     1.4.53-4+deb10u1 500
        500 https://mirror.herrbischoff.com/raspbian/raspbian buster/main armhf Packages
root@raspberrypi:~# pihole -v
  Pi-hole version is v5.2.4 (Latest: v5.2.4)
  AdminLTE version is v5.3.1 (Latest: v5.3.1)
  FTL version is v5.5.1 (Latest: v5.5.1)
root@raspberrypi:~# alias acp
alias acp='apt-cache policy'

It is still accessible on my install at:

http://192.168.0.111/html/admin/index.php

As I use my same old custom sites-available I have used for years which has the root set to /var/www/

Do you have a publicly available Pi-hole?

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.

This is expected.

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.

Excellent stuff! Pi-hole is indeed a fine device and very worthy of immense praise.

Sincere thanks to everyone who kindly commented.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.