Installing Habari on Lighttpd

Jordi Boggiano • August 2, 2008


Just a small post about Habari installation over Lighttpd, since it is not really documented anywhere that I could find.

I will assume that you know how to run php scripts on your server, and start from there. So once you have unpacked Habari files in say /home/seld/, all you need to do is add the following to your lighttpd.conf file :

[code js] $HTTP["host"] =~ "^(www\.)?domain\.com$" { server.document-root = "/home/seld/" url.rewrite-once = ( "^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/index.php/$1" ) } [/code] Update: See also the Habari wiki on how to set that up, they have since then added docs on Lighttpd support

With this setup, your blog must lie in the top level directory ( ), should you want to install it in a subdirectory, you need to add it to the url rewrite, for example to install in you would need to replace line 4 with:

"^/blog/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/blog/index.php/$1"