As you may not see, this blog is powered by "Typo":, a cool "Ruby on Rails": driven blog application. However I missed the functionnality of being able to easily host multiple blog on my server. I could not find much info beside a howto which required virtual hosts and implied editing Typo's internal.

So I write down a script to create blogs easily. It uses symlinks to the real Typo directory and a database per user. It works on Linux using MySQL and Apache. It needs "Ruby": and "Termios":

To use it,

  • download[1] it
  • create a directory $DIR, put the script in it.
  • Download a Typo "release": and extract it in $DIR/typo
  • edit or create $DIR/typo/database.yml[2]. You can use "ERB": tags in the file. Available variables are user, the user name,@target, the directory in which user blogs are installed and the instance variable of the Manager class.
  • edit the $DIR/typo/.htaccess[3], same remark apply.
  • create the $DIR/apache.conf.erb[4] file, same remark apply. It will be used as a template to create a config file to include in your apache configuration. An example is attached.

Finally run ./manage foo and it will

  • create the user directory,
  • create a database.yml file,
  • ask you the root password for mysql, create and populate database using the Typo MySQL schemas,
  • create the apache.conf file

Now restart your apache, pray and try. Send me comments if something went wrong. Don't forget you need to have the correct permissions and look at the source for more parameters, Luke.

fn1. "manage":

fn2. "database.yml":

fn3. "htaccess":

fn4. "apache.conf.erb":