Installing DokuWiki on Debian 9 (Stretch) or Ubuntu 18.04 (Bionic Beaver)
Installing DokuWiki is a relatively straightforward process on Debian and it's derivatives. The gist of it is: download DokuWiki, extract and copy the files to
/var/www/ or wherever you'd like, and configure your web server. I'm using Nginx.
A longer form of these instructions can be found at DokuWiki's own documentation.
Downloading and Installing
Simply navigate to https://download.dokuwiki.org, customize your package and download to your server.
Extract the archive and copy it to its destination:
$ tar xzvf dokuwiki.tgz $ sudo cp -r dokuwiki /var/www/
Give your web server user access, on Debian and its derivatives, this is usually
$ sudo chown -R www-data:www-data dokuwiki
Configuring the Web Server
As stated earlier, I'm using Nginx as my web server. I create a Nginx configuration file for each domain/subdomain. I crafted my config file using DokuWiki's example.
Increasing File Upload Limit
There's several places you may need to check to increase the file upload size limit from the default 2 MB.
Since I use Nginx, I had to modify the following line in my site configuration file.
Then I needed to change the FCGI settings for php-fpm.
... post_max_size = 25M ... upload_max_filesize = 25M ...
Note: You may need to change the
post_max_size = 25M to
26M if you run into issues uploading a file that's exactly 25MB large.
Restart nginx and php-fpm for the changes to take effect:
$ sudo nginx -s reload $ sudo service php7.0-fpm restart