Use Plesk instead of Lighttpd for Pihole

Hi,

since I noticed weird accesses and cpu usage on lighttpd processes which should idle, I finally decided to switch to Plesk (Nginx/&Apache) and remove Lighttpd completely.

So far so good. I got Pihole running including all/most basedir restrictions. It performs even better on Nginx than Lighttpd. Sadly I'm still getting the "Readonly database" error.

How can I achieve write access? My pihole-FTL.db and gravity.db both are owned by pihole:pihole, my web server on the other hand usually needs username123:psacln.

Regards,
Dennis

You can look through this community guide:

https://docs.pi-hole.net/guides/webserver/nginx/

Thanks, the GUI has been working already. But what about the access to the pihole-FTL.db?

I usermodded the pihole-FTL.db file and even gave it chmod 777. Somehow I'm still getting a "read only database" error.

It's still worth working through our nginx community guide linked by jfb. :wink:

For most distros, the default web server user would be www-data.
Since you seem to be using a different user, you'd have to add permissions by adding that user to the pihole group - see the guide for suggestions to do so for www-data and adopt that for your user and distro.

Yeah, it seems I mixed up the group and user.

With this command it works just fine:

usermod -aG pihole plesk_username

Actually there is one more problem. The web user doesn't have the proper permissions to execute pihole reload-lists:

47114#0: *10864 FastCGI sent in stderr: "PHP message: PHP Warning: Executing sudo pihole restartdns reload-lists failed. in /var/www/admin/scripts/pi-hole/php/func.php on line 158" while reading response header from upstream

Is it enough to add the webserver user to the sudo group? I just tried the following command:

usermod -aG sudo plesk_username

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