[Techtalk] one server, two wiki sites (pmwiki)

Maria McKinley maria at shadlen.org
Thu May 10 21:28:48 UTC 2007


Kathryn Andersen wrote:
> On Thu, May 10, 2007 at 12:04:08PM -0700, Maria McKinley wrote:
>> Does anyone have any experience with setting up a computer to host a 
>> couple of wiki sites? I'd love to hear how you did it.
> 
> Sure!  I note that you mention PmWiki in your subject line; have you
> considered checking out the PmWiki users mailing list?  They're really
> helpful (if sometimes busy).
> 
> I actually did it in more than one way, changing my setup to suit my
> needs (and to take advantage of new features).
> 
> My current setup is this:
> 
> I run my own server; Apache 2.0.58 on GenToo Linux.
> I have two virtual hosts; one is www.katspace.org, my external website.
> The other is an internal website, kat.localhost, which contains random
> documentation, personal information management, calender, an archive of
> my favourite fiction, and so on.
> 
> The www.katspace.org site is a hybrid site; part of it is run using
> Embperl, and part of it uses PmWiki as a content management system.
> 
> The kat.localhost system is a similar hybrid; some parts use Embperl,
> some parts are straight directory listings, and it has two wikis.
> 
> All three of the wikis are separate installations, because
> (a) The www.katspace.org is a "production" site, so I'm a bit more
> conservative in which version of PmWiki (and which plugins) I use for
> it; I put the latest version on kat.localhost, then when I'm happy with
> it, I upgrade the www.katspace.org site.
> (b) I've written a few plugins (recipes) for PmWiki, so I like to have a
> "vanilla" wiki to test them on, to make sure they work.  So my test wiki
> is a completely separate installation on kat.localhost, just to make
> absolutely sure that my "fun" installation doesn't interfere with the
> "test" wiki.
> (c) I'm the only user, so there isn't that much more administrative
> overhead.
> 
> I'm using "Clean URLs" for all my wikis:
> http://www.pmwiki.org/wiki/Cookbook/CleanUrls
> 
> My Apache configuration for www.katspace.org is like this:
> 
> #================================================================
> # PM-Wiki
> 
> Alias /stuff/pub /var/www/katspace/pmwiki/pub
> Alias /stuff/uploads /var/www/katspace/pmwiki/uploads
> Alias /stuff /var/www/katspace/pmwiki/index.php
> 
> <Directory "/var/www/katspace/pmwiki">
>         SetHandler      None
>         AcceptPathInfo On
> </Directory>
> 
> ----------------------------
> 
> Then I have a whole bunch of rewrite rules (a number of which are simply
> because I want prevent broken links from my previous setup, so I'll skip
> those).
> 
> The following set of rules aims to enable the hybrid-ness of the site,
> while hiding the fact that part of it is a wiki.  It says, that
> if the URL is not for an existing directory, file, or link, and
> if it starts with something other than lowercase letters, then
> treat it as a PmWiki request.  This works because PmWiki always starts
> its names with capital letters, while I've used the convention for
> normal pages that the directories, at least, are all in lower-case.
> ----------------------------
> 
> RewriteEngine On
> 
> # Don't rewrite requests for any files, directories, or symbolic
> # links (shortcuts) that exist on the filesystem.
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteCond %{REQUEST_FILENAME} !-l
> # Send requests to pmwiki.php, appending the query string part.
> RewriteRule ^/([^/a-z].*) /var/www/katspace/pmwiki/index.php?n=$1 [QSA,L]
> 
> ----------------------------
> 
> With the above, for example, if I have the link
> http://www.katspace.org/Computers/LinuxTips
> 
> then that will turn into
> /var/www/katspace/pmwiki/index.php?n=Computers/LinuxTips
> which will give me the Computers.LinuxTips page from the wiki.
> 
> In order to complete the illusion, in my PmWiki local/config.php file,
> I set
> $EnablePathInfo = 1;
> $ScriptUrl = '';
> 
> This will give links on the PmWiki pages like this:
> 
> <a class='wikilink' href='/Computers/LinuxBurnDVD'>Burning Video DVDs on Linux</a>
> 
> And these links work because of the rewrite rule above.
> 
> In an earlier configuration of www.katspace.org, I was using PmWiki's
> nifty concept of "Wiki Farms"
> (http://www.pmwiki.org/wiki/PmWiki/WikiFarms) because I wanted to be
> able to have sets of related wiki groups that were configured with a
> common configuration, and I found at that time, that Wiki Farms were the
> easiest way to do that.  However, now I'm using the "Cluster" recipe
> (http://www.pmwiki.org/wiki/Cookbook/Cluster), which enables one to
> "cluster" similarly-named wiki groups together with common
> configurations, so I've changed over to one wiki with clustered groups.
> 
> Any questions?
> 
> Kathryn Andersen


Helpful info Kathryn, thanks. I'm using this for a wiki I actually want 
people to edit, so I won't use your tips for that yet, but might when I 
convert my own site to a wiki. So, how do you edit your pages? I don't 
see an edit button or anything.

cheers,
maria


More information about the Techtalk mailing list