This is how you can make flarum work with lighttpd:
Open your /etc/lighttpd/vhosts.conf and add a block
$HTTP["host"] == "forum.example.com" {
var.server_name = "forum.example.com"
server.name = server_name
server.document-root = "/home/sites/forum.example.com/public_html/public"
url.rewrite-if-not-file = ( "^" => "/index.php${qsa}" )
}
url.rewrite-if-not-file rewrites all not found files to index.php with qsa (query strings attached)
I have been using flarum on lighttpd for months.