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.
It's still worth working through our nginx community guide linked by jfb.
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.
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: