User Tools

Site Tools


start:dokuwiki

Table of Contents

Dokuwiki

'DokuWiki' is a wiki application licensed under GPLv2 and written in the PHP programming language. It works on plain text files and thus does not need a database. Its syntax is similar to the one used by MediaWiki.

At the end of this guide you have Dokuwiki up and running on your own Debian-based server.

Prerequisites

  • A running Debian-based server.
  • Apache set up.

Installation

Download

Download Dokuwiki from its website to your home directory:

cd ~
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz

Unzip the compressed file:

tar -xzf dokuwiki-stable.tgz
mv dokuwiki-*/ dokuwiki/

Put the dokuwiki directory in your /var/www/ directory:

sudo cp -af dokuwiki /var/www/

Apache configuration

Edit the Apache configuration file of the web address you want to use:

sudo nano /etc/apache2/sites-available/000www.example.com.conf
/etc/apache2/sites-available/000www.example.com.conf
<VirtualHost *:80>
   ServerName www.example.com
   Redirect / https://www.example.com/
</VirtualHost>
 
<IfModule mod_ssl.c>
<VirtualHost *:443>
   ServerName www.example.com
   DocumentRoot /var/www/dokuwiki
   CustomLog /var/log/apache2/www.example.com-access.log combined
   ErrorLog /var/log/apache2/www.example.com-error.log
   SSLCertificateFile /etc/letsencrypt/live/www.example.com/fullchain.pem
   SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
</VirtualHost>
</IfModule>
 
<Directory /var/www/dokuwiki>
  order deny,allow
  allow from all
</Directory>
 
<LocationMatch "/(data|conf|bin|inc)/">
  order allow,deny
  deny from all
  satisfy all
</LocationMatch>

Reload Apache:

sudo systemctl reload apache2

Permissions

Give ownership of the /var/www/dokuwiki folder to www-data:

cd /var/www/dokuwiki
sudo chown -R root:root .
sudo chmod -R 775 data/
sudo chown -R www-data:www-data data/
cd data
sudo chmod 2775 {attic,cache,index,locks,media,meta,pages,tmp}
sudo chown www-data:www-data {attic,cache,index,locks,media,meta,pages,tmp}
cd ..
sudo chown -R www-data:www-data conf/
sudo chown www-data:www-data lib/plugins/ lib/tpl 

Run the installer

Run the installer on www.example.com/install.php.

More information about the installer on dokuwiki.org/installer

Remove the installer file:

sudo rm /var/www/dokuwiki/install.php

Enjoy your own wiki on www.example.com!

start/dokuwiki.txt ยท Last modified: 2019/04/24 20:34 by justin