Installing Habari on Lighttpd

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/domain.com/, all you need to do is add the following to your lighttpd.conf file :

$HTTP["host"] =~ "^(www\.)?domain\.com$" { 
    server.document-root =  "/home/seld/domain.com" 
    url.rewrite-once =  ( 
        "^/(?!scripts/|3rdparty/|system/|doc/|user/(?:themes/|files/|plugins/|locales/|sites/))[^?]*(\?(.*))?" => "/index.php/$1"
    ) 
}

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 ( http://domain.com/ ), should you want to install it in a subdirectory, you need to add it to the url rewrite, for example to install in http://domain.com/blog/ you would need to replace line 4 with:

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

August 02, 2008 // Web

Post a comment

Subscribe to this RSS Feed Comments

2011-01-07 04:28:42

Art

Hi Jordi, I am trying to set up Habari blog, here's excerpt of my config http://pastebin.com/raw.php?i=BjfEAZNg however none of the links, say /blog/ajax/check_pgsql_credentials (which is used during installation) work.

Could you have a quick look at the config just to see if something is glaringly wrong with it?

Thanks!

2011-01-07 12:54:13

Seldaek

@Art: Looks alright to me but I haven't really been using Habari much in the past years, so you might want to check with them on irc.freenode.org #habari, or at least read their wiki (linked below the code block)