1 1
allekz

Pi-hole admin page not reachable or 403-Forbidden Error

Recommended Posts

Hi evereyone,

After doing some upgrades my Pi-hole Admin Page was not reachable anymore,

while blocking still worked.

 

1. Problem

The lighttpd service was not running because of the missing folder /var/log/lighttpd.

So lighttpd crashes when trying to access /var/log/lighttpd/error.log and access.log.

Reinstalling Pi-hole and lighttpd didnt solve the problem.

So I first created the folder myself:

 

sudo mkdir /var/log/lighttpd

sudo chown -R  www-data: www-data /var/log/lighttpd

 

Then I reinstalled Pi-hole and lighttpd, now lighttpd was running.

Unfortunatly now I ran into 403 - Forbidden when accessing the admin page.

 

2. Problem

In lighttpd the fastcgi module has to be activated to work with php.

All mentioned solutions for this from the Pi-hole board didn't work for me.

After hours of trying and searching I found this workaround:

 

a) Uninstall Pi-hole and lighttpd (maybe not neccessary)

sudo pihole uninstall

sudo apt remove lighttpd

 

b) Install latest php, dnsmasq and Pi-hole (lighttpd will be installed automatically)

sudo apt install dnsmasq

sudo apt install php7.2

sudo apt install php7.2-cgi

sudo curl -sSL https://install.pi-hole.net | bash   (same method as in armbian-config i think)

 

c) Edit /etc/lighttpd/lighttpd.conf

Adding fastcgi to server.modules:

server.modules = (
        "mod_access",
        "mod_fastcgi",
        "mod_accesslog",
        "mod_auth",
        "mod_expire",
        "mod_compress",
        "mod_redirect",
        "mod_setenv",
        "mod_rewrite"
)

And putting this at the end of the file:

fastcgi.server = ( ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                    "socket" => "/tmp/php.sock"
                )))

 

And voila - after reboot the Pi-hole admin-page was accessible again.

 

Hope this can help if someone is running in the same problem.

 

Greetz

Alex

 

 

My System

Orange-Pi +2e

Armbian Bionic 5.85

Server running Pi-hole, OPI-Monitor, SMB, FTPS

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1