Translations of this page?:

Lazy DokuWiki Farming

In a farm, one single copy of wiki engine (the farmer) is used to run several individual wikis (the animals). For a generic introduction, and for different approaches to set up a DokuWiki farm, see farm.

This page describes a particularly simple approach to setup a farm. However, it is broken.

Recipee

This approach consists of three simple steps for each virtual host:

  1. create directory for new dokuwiki animal
  2. create subdirectory called “data” in this animal subdirectory
  3. put file doku.php in animal directory, edit two lines and set permissions properly
doku.php
<?php
//you will need to set those lines (and create "data" subdirectory in this directory):
$wiki_installdir='..'; //where common dokuwiki (farmer) is installed
$wiki_installurl='http://wiki.kyberia.cz/'; //where common dokuwiki can be reached
 
//get path of this "animal"
$virtual_path=getcwd();
 
//load common configuration
chdir($wiki_installdir);
include_once('conf/dokuwiki.php');
include_once('conf/local.php');
 
//override common configuration
@include_once("$virtual_path/conf/local.php");
$conf['savedir'] = "$virtual_path/data";
define('DOKU_BASE',$wiki_installurl);
 
//call main dokuwiki script
require_once('doku.php');

Setting up webserver

i can suggest you to use great LigHTTPd server with fastcgi PHP and mod_simple_vhost or mod_evhost, which can simply map subdirectories to domains/subdomains based on your configuration. it will be probably faster and simplier to configure than apache…

Troubles

Well. it's not much optimal and not suitable for production use yet, but if there will be few simple modifications in dokuwiki, this can be the best approach of all. we need a way to set wiki homepage url and wiki farmer url separately, then we'll have no need to use plugins or symlinks for farming. instead of it we'll need only this one simple file in each animal directory. see #2115 for more…

Please note that this approach is broken with “dokuwiki-2010-11-07.tgz - Anteater” because _media links are resolved against the farm, not the animal. –timj

tips/lazy_farm.txt · Last modified: 2012/04/30 17:35 by joachim aus münchen
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate