DokuWiki Administration

Konfiguration

Rewrites

conf/local.php
// rewrites handled by nginx
$conf['userewrite'] = 1;
/etc/nginx/include/dokuwiki.conf
location / {
	index doku.php;
	try_files $uri $uri/ @dokuwiki;
}
 
location ^~ /lib/(.*)!(\.php) { expires 30d; }
location ~ /(data|conf|bin|inc)/ { deny all; }
 
location @dokuwiki {
	rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
	rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
	rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
	rewrite ^/(.*) /doku.php?id=$1 last;
}
/etc/nginx/sites/com.example.wiki.conf
server {
[...]
	include /etc/nginx/dokuwiki.conf;
[...]