[dokuwiki] Re: Dokuwiki farm question

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 20 Oct 2009 23:43:17 +0100


On 20 Oct 2009, at 20:55, Karl Loncarek wrote:


What is your additional constant and how do you intend to your urls will reference the different "animals" (farmed wikis)?
I created a constant named DOKU_FARMER which should point to the main DokuWiki installation (relative path). Basically I added this variable throughout some scripts to most occurences of DOKU_BASE and some DOKU_URL. (DOKU_FARMER is concatenated between those constants and following text.

As I said the only thing I'm not sure is how to handle those helper scripts like indexer.php and mediamanager.php (located in lib/exe).

In the end I'm thinking of such a directory structure:
/animal/index.php
/animal/data
/animal/conf
/farmer/doku.php

A user would for example call http://someserver.com/animal/index.php to execute the animal. If he would call http://someserver.com/farmer.doku.php default Dokuwiki installation will show up.

/animal/index.php would contain this newly created constant DOKU_FARMER and such a command would be issued:
define('DOKU_FARMER','../farmer');

last line of index.php would be
include DOKU_FARMER.'doku.php';


I see this as a very awkward way of managing the farm/animals.

Did you consider using domains?
E.g. http://animal.someserver.com/doku.php

Access to the lib/exe scripts is no longer an issue.
Preload.php is used to choose the farmer/animal configuration based on the $_SERVER['HTTP_HOST'] value.
All dokuwiki scripts are in one place, making updating straightforward.

- Chris
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: