User Tools

Site Tools


configure_dokuwiki_on_openbsd_6.2

Configure DokuWiki on OpenBSD 6.2

This guide assumes that

  1. You have an OpenBSD server set up;
  2. You can access the server either directly or via SSH; and
  3. You can files on the command line.

Install PHP 7

Install PHP 7 with pkg_add -U php and then choose the latest version when prompted. Then install the php-gd extension with pkg_add -U php-gd and then choose the latest version when prompted. This will allow you to resize images in DokuWiki. Finally, install php-xmlrpc with pkg_add -U php-xmlrpc and choose the latest version when prompted.

pkg_add -U php php-gd php-xmlrpc

Download and Extract DokuWiki

In your terminal, change to the /var/www/htdocs directory.

cd /var/www/htdocs

In a browser, go to the DokuWiki download page and customize your DokuWiki installation options. Then click Download and on the next page. You'll see a direct download link. Copy the link. Then download it to your current directory with ftp and the link you just copied. For example, ftp https://download.dokuwiki.org/.

Extract the downloaded file with tar -xzvf dokuwiki*. Then use mv to rename it to the correct directory. In this case, I used mv dokuwiki wiki.johnolinda.com.

Enable php70_fpm and httpd

Use rcctl to load httpd and php70_fpm at boot.

rcctl enable httpd && rcctl enable php70_fpm

Edit Your httpd Configuration

I've set up my wiki as a subdomain in a separate directory in /var/www/htdocs but feel free to choose to make yours a subdirectory of your existing website. Please note this has not yet been configured with TLS. That version of the config will come later.

Use nano, vi, or vim to create /etc/httpd.conf. Then add in the following lines, altering details such as the server name and root directory.

httpd.conf.dokuwiki
server "wiki.johnolinda.com" {
	listen on $ext_addr port 80
 
	root "/htdocs/wiki.johnolinda.com"
 
 	directory { index "index.php" }
 
	location "*.php"	{ fastcgi socket "/run/php-fpm.sock" }
	location "/data/*"	{ block }
	location "/conf/*"	{ block }
	location "/bin/*"	{ block }
	location "/inc/*"	{ block }
}

Start httpd and php70_fpm

Run install.php

configure_dokuwiki_on_openbsd_6.2.txt · Last modified: 2018/01/07 23:10 by john