403 - Forbidden -- Solution on Armbian (Ubuntu 18.04.2)

After getting the 403 error, I searched the whole board an web for solutions and tried out everything mentioned. What helped me was activating the fastcgi module in lighttpd to get rid of the php restriction.

Many suggestions showed in the same direction and worked with “lighty-enable-mod fastcgi-php” and “service lighttpd force-reload” which ended for me in “Ignoring unknown module: fastcgi” and" Ignoring unknown module: fastcgi-php". So this didn’t do the job on my system.

I found a workaround for php and lighttpd in the net that solved the problem.

Installing the latest php7.2 and php7.2-cgi

sudo apt-get install php7.2
sudo apt-get install php7.2-cgi

Then editing the /etc/lighttpd/lighttpd.conf:

  1. Adding fastcgi to the server modules
server.modules = (
  1. putting this at the end:
fastcgi.server = ( ".php" => (( 
                    "bin-path" => "/usr/bin/php-cgi",
                    "socket" => "/tmp/php.sock" 

After reboot the admin-page was accessible again.

Hope this could help some other guys!



WOW THANKS!! Excellent post. I wish this one would come up closer to the top when people search for “pi hole 403” :wink:

It’s mostly correct, do not install dnsmasq though, that will conflict with FTLDNS and Pi-hole.

Edit: And there are a few situations that will cause 403s. We’ve fixed a few of them to prevent them from happening in the future.

1 Like

Ok, I will edit the post.
The Solution depended on a general post referring on problems with lighttpd.
I wasn’t aware of any conflicts.
Removed dnsmasq from my server, everything is still working fine.:ok_hand:

1 Like