WikFarm HOWTO ============= Sung Kim 2003/12/26 Won-Kyu Park 2015/11/20 A wikifarm is a collection of wikis running on the farm web server. A wikifarm share it's main resources but all the other resources are saved separatly. This is a quick and dirty patch to support the wikifram feature in the Moniwiki. 1. Motivation We want to have a separated Wiki space for each project (farm host) even though there are many projects in a box. It is possible to have an http://wiki.kldp.org/ space for project, but still macros such as RecentChanges or TitleIndex shows all Wiki pages in the http://wiki.kldp.org/. We want to see only changes in our wiki space. Why we care about other wiki pages created by other projects or hosts? 2. How it works It is vary similar to the virtual host setting in Apache. Define a virtual host name with virtual part (*). And define wiki text directory name with virtual part (%0, %1, ... %n). See more apache virtual host setting at http://httpd.apache.org/docs-2.0/mod/mod_vhost_alias.html 3. config/wikifarm.php Those configuration are required to support wikifarm. you can copy config/wikifarm.php.sample to config/wikifarm.php and modify it like as following: - wikifarm_hostrule: define wikifarm hostname. You can put * for the virtual part Ex: $wikifarm_hostrule='wiki.*.kldp.org'; or '@wiki\..*\.kldp\.org$@'; - wikifarm_sitename: define the virtual site name for the virtual host. We can use %0, %1, %2, .... Ex: $wikifarm_sitename="MoniWIki for %1 project"; - wikifarm_farm_dir: define topmost data dir for farm host wiki pages. %0, %1, ... will be replaced real hostname. Note that the host name starts %0. Ex: $wikifarm_far_dir=$data_dir.'/farmwikis/%1/'; - wikifarm_autocreate: indicate weather create wikifarm dir structure automatically. Ex: $wikifarm_autocreate=1; $wikifarm_autocreate=0; - wikifarm_autoseed: indicate weather copy seed Wikipages automatically. It works only if wikifarm_autoseed is set to 1. Ex: $wikifarm_autoseed=1; $wikifarm_autoseed=0; # copy basic system pages only For example with those setting, if a user connect to http://wiki.moni.kldp.org the wikifarm_farm_dir would be "$data_dir/wikifarms/moni/", and sitename would be "MoniWiki for moni project". 4. Directories and permission The wikifarm_farm_dir should be created by user to use wikifarm wiki unless $wikifarm_autocreate is set. Note that you also need to create RCS directory in the $wikifarm_farm_dir/text to keep RCS files. Otherwise you will see many *,v files in your wiki pages. Make sure the httpd user can create files or directories in the $wikifarm_farm_dir. 5. config/site.local.php This site specific local file is required to support wikifarm. you can copy config/site.wikifarm.php.sample to config/site.local.php and modify it. 6. Questions http://moniwiki.kldp.net