Skip to content

Commit

Permalink
fixup #66: update for wikifarm support
Browse files Browse the repository at this point in the history
  • Loading branch information
wkpark committed Nov 20, 2015
1 parent 0a823f5 commit 2d183b2
Showing 1 changed file with 56 additions and 55 deletions.
111 changes: 56 additions & 55 deletions contrib/WIKIFARM.HOWTO
Original file line number Diff line number Diff line change
@@ -1,76 +1,77 @@
Virtual MoniWiki HOWTO
Sung Kim ([email protected])
12/26/2003
WikFarm HOWTO
=============
Sung Kim <[email protected]>
2003/12/26
Won-Kyu Park <[email protected]>
2015/11/20


This is a quick and dirty patch to support virtual Moni wiki.
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 (virtual host)
even though there are many projects in a box.
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/<projectname> space for project,
but still macros such as RecentChanges or TitleIndex shows all Wiki pages in the http://wiki.kldp.org/.
It is possible to have an http://wiki.kldp.org/<projectname> 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?
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 (*).
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
See more apache virtual host setting at
http://httpd.apache.org/docs-2.0/mod/mod_vhost_alias.html

3. config.php
Those configuration are required to support virtual Wiki
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:

- virtual_host: define virtual host name. You can put * for the virtual part
Ex: $virtual_host='wiki.*.kldp.org';
- wikifarm_hostrule: define wikifarm hostname. You can put * for the virtual part
Ex: $wikifarm_hostrule='wiki.*.kldp.org'; or '@wiki\..*\.kldp\.org$@';

- virtual_sitename: define the virtual site name for the virtual host.
We can use %0, %2, ....
Ex: $virtual_sitename="MoniWIki for %1 project";
- wikifarm_sitename: define the virtual site name for the virtual host.
We can use %0, %1, %2, ....
Ex: $wikifarm_sitename="MoniWIki for %1 project";

- virtual_text_dir: define text directory for virtual host wiki pages.
%0, %1, ... will be replaced real host name.
Note that the host name starts %0.
Ex: $virtual_text_dir=$data_dir.'/virtual_text/%1/';
- 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/';

- virtual_text_dir_auto_create: indicate weather create virtual text directory automatically.
Ex: $virtual_text_dir_auto_create=1;
$virtual_text_dir_auto_create=0;
- wikifarm_autocreate: indicate weather create wikifarm dir structure automatically.
Ex: $wikifarm_autocreate=1;
$wikifarm_autocreate=0;

- virtual_text_dir_auto_seed: indicate weather copy seed Wikipages automatically.
It works only if virtual_text_dir_aito_create is set to 1.
Ex: $virtual_text_dir_auto_seed=1;
$virtual_text_dir_auto_seed=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

- Virtual_text_dir_auto_create_ref: To avid creating unnecessarily virtual text directories
By typo, this option limits auto creation only from the defined http referrer.
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".

For example to create a virtual host text directory, the Wiki page must be connected from the http referrer page.
Note that text directory creation is the only one time event.
After that, the virtual part doesn't check the http referrer.

You can use wild card (*, ?) like file match. We use fnmatch to check the referrers.
4. Directories and permission
The wikifarm_farm_dir should be created by user to use wikifarm wiki
unless $wikifarm_autocreate is set.

If it is not defined and virtual_text_dir_auto_create is set,
there is no limit to create virtual text directory.
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.

Ex: $virtual_text_dir_auto_create_ref="*://kachi.org/projects/*";
Make sure the httpd user can create files or directories in the $wikifarm_farm_dir.

For example with those setting, if a user connect to http://wiki.moni.kldp.org
the virtual_text_dir would be "$data_dir/virtual_text/moni/",
and sitename would be "MoniWiki for moni project".
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.

4. Directories and permission
The virtual_text directory should be created by user to use virtual Wiki
unless virtual_text_dir_auto_create is set.

Note that you also need to create RCS directory in the virtual_text_dir 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 virtual_text directory.

5. Questions
http://moniwiki.kldp.net
6. Questions
http://moniwiki.kldp.net

0 comments on commit 2d183b2

Please sign in to comment.