A few notes on setting up a DokuWiki...

Russ Bateman
9 May 2011
last update:

DokuWiki is a really simple wiki implementation you can get running easily in your LAMP environment. (Actually, I think you only need the A and P of this environment (Apache2 web server and PHP).

Really short steps...

  1. Download DokuWiki package to /var/www and explode.
  2. I renamed my installation subdirectory, dokuwiki-2010-11-07a, to simply, dokuwiki.
  3. Change owner and group of subdirectory dokuwiki and everything under it to www-data.
    root@tuonela:/var/www> chown -R www-data dokuwiki* root@tuonela:/var/www> chgrp -R www-data dokuwiki*
  4. Open a browser from (another host) and hit DokuWiki using the URL http://hostname/<dokuwiki-path>/install.php where dokuwiki-path is the name of the dokuwiki subdirectory under /var/www. So, in my case, this is exactly: http://hostname/dokuwiki/install.php.

    (Note: this install.php form is one-shot. It will not work again later after setting up the wiki.)

  5. Fill out the form install.php displays; create a superuser, such as user dokuwiki, for this.
  6. Once everything is filled out and accepted, find the Admin button and add some users.
  7. Hit the new wiki's start page, which you'll have to create, by navigating afresh to the wiki at http://hostname/dokuwiki/doku.php.
  8. Start the new article as you would any other DokuWiki page.
  9. Optionally, you can delete install.pl if it makes you nervous.

Setting it up on a path like /home/dokuwiki

Typically content served up by a virtual host is set up not on the path /var/www, but on /home/dokuwiki or some such. As near as I can understand, that cannot be done to run install.php, but only afterwards.

I merely did the set-up as above, then when I had finished, I did:

root@tuonela:/var/www> mv dokuwiki /home

I decided I wanted to access it via port 8888 since I'm behind a firewall and the port 80 piercing is for pushing content from a different Linux box acting as my web server than the one I'm setting my wiki up on (just as I'm also serving up a Subversion repository on port 443 from this host). So, I added the following line to /etc/apache2/ports.conf:

Listen 8888

Then I created /etc/apache2/sites-enabled/dokuwiki.conf to contain

<VirtualHost *:8888> DocumentRoot /home/dokuwiki/ ErrorLog /var/log/apache2/error.log </VirtualHost>

I'm not abundantly certain this is exactly the best way, but it seems to work. I now access my wiki thus: