The moodle docs for installing lighttpd are for Redhat based distros like Fedora, or CentOS. I suspect they may be outdated at that. For example, the docs to install "lighttpd-fastcgi" but I don't think that is used anymore. It will not install in Debian.
I found some instructions that work for my Debian based Devuan installation. Devuan does not use systemd, so I had to make some modification - mostly I start with /etc/init.d instead of systemctrl.
Anyway, I was able to get moodle installed, and working with lighttpd using these instructions:
How to Install Lighttpd on Debian 9
February 13, 2020 by Jeff
https://www.rosehosting.com/blog/how-to-install-lighttpd-on-debian-9/
Finding documentation that works can be challenging. I was not able to nginx to work. So I thought I would pass this on.