=====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
ServerName www.example.com
Redirect / https://www.example.com/
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
order deny,allow
allow from all
order allow,deny
deny from all
satisfy all
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 [[https://www.example.com/install.php|www.example.com/install.php]].
More information about the installer on [[https://www.dokuwiki.org/installer|dokuwiki.org/installer]]
Remove the installer file:
sudo rm /var/www/dokuwiki/install.php
Enjoy your own wiki on [[https://www.example.com|www.example.com]]!