One of the reasons I started looking at Habari was it's promise to be able to host multiple sites on one installation of the software. If you have multiple sites, that can save a fair amount of space on your server, and it makes upgrading much easier. Install the updated software once, and all your sites are automatically updated.
According to Habari's manual:
In order to run multiple sites, you will first need to create a sites directory inside your user directory. Then, inside user/sites you will create a directory for each site you want to run. Inside each of these sub-directories you will place a config.php with that site's configuration directives.
...
Additional Habari-powered sites do not need to use the same domain. Provided the web server is properly configured, a single installation of the Habari source code can serve www.habariproject.org, www.habarithemes.org, and www.habari-ya-kazi.com. Likewise, sub-domains and sub-directories are also supported.
Each Habari site can use its own themes and plugins, as well as the themes and plugins available to the "main" site. Simply create /themes and /plugins sub-directories inside each site's directory. A theme or plugin located in a site's directory structure is only available to that site; while themes and plugins in the top-level /user directory will be available to all sites.
I found two problems with this, though.
First, sub-directories don't work properly yet. So if your main site is www.example.com, www.example.com/subdir won't work properly.
Second, it took a while to figure out what properly configured means. In the end, it turned out to be simple.
Let's say your site's url is www.example.com. The top level directory structure for a Habari installation will look like this:
- www.example.com
- 3rdparty
- doc
- system
- user
- user
- sites
- www.sitetwo.com
- test.example.com
- sites
- www.sitetwo.com
- themes
- plugins
After you have your directories set up, you need to tell the webserver how to find the sites - the properly configured part the manual talks about. This turns out to be simple. Point the web server to the same directory the main site is in. In other words, with the examples I've used here: If your main site is www.example.com and it is at /home/www, tell the web server that www.sitetwo.com, and test.example.com are also at /home/www. Habari will find the sub-directory with the same name as the url, and use the config file in that directory to pull up the site.
It Just Works.


Looks like good stuff to add to the wiki :)
There is likely to be some effort in upcoming releases to make multi-site Habari more robust and scalable.
I'll take that as a hint, Michael. :) I thought about it, but my experience with how multi-site setup works varies from the way it's supposed to work. Taken for what it is, it works well. I'm running mirrors of four sites on one installation of Habari locally.
I didn't want to step on anyone's toes by changing the wiki from the way Habari is supposed to work, since I thought it would be fixed, to the way it actually does work.
Multi-site is an important feature for Habari. I look forward to support for it being improved.
In that case, a post to dev outlining the differences between the documented way it works and the actual way it works would be a great start to kickstarting development. But I'm not trying to make you do work, I haven't even experimented with multi-site myself yet :)
Okay ( to a post on -dev).
I wouldn't know how to make it work, myself. I've looked at the code in Site.php . I've looked at the comments around the ticket about subdirectory sites not working. Most of the code I don't understand and wouldn't want to mess with. I can't see why it doesn't work as it's supposed to.