Matrix Synapse homeserver

Unfortunately lighttpd is not the best web server to run as revers proxy. You could try to adjust one of the existing configuration example to work on a lighttpd web server.

https://github.com/matrix-org/synapse/blob/develop/docs/reverse_proxy.md