Getting Bludit Working with Lighttpd

Lighttpd is one of the lightweight web servers that is fairly easy to install and get running.  I like it because it seems secure and the configuration files are straight forward and easy to understand.  One drawback is that there doesn't seem to be much support as Nginx and Apache are the more recognized and supported web servers.

If you've stumbled upon this, you are probably looking for a way to get your Bludit install working properly with Lighttpd.  The solution was fairly simple;  There have been a few forum posts and other support posts I found, but all of them seemed to vary just a little and nothing seemed to work properly.  So here is one more solution that will hopefully help.

$HTTP["host"] =~ "(^|\.)YOURSITE.COM$" {
   server.document-root = "/srv/http/location/",
    url.rewrite-once = ( ".*\.(php|txt|json)$" => "/" ),
    url.rewrite-if-not-file  = ( ".*\?(.*)" => "/index.php?$1", "." => "/index.php" )
}

The highlighted sections are the only things you will have to change.  This is assuming that your configuration is configured properly.

December 8, 2019