bundlewrap/data/nginx/files/extras/rottenraptor-server/dokuwiki

34 lines
1.2 KiB
Text
Raw Normal View History

location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg|svg)$ {
expires 365d; # browser caching
}
location ~ /(install.php) { deny all; }
location ~ /(\.ht|\.git|\.hg|\.svn|\.vs|data|conf|bin|inc|vendor|README|VERSION|SECURITY.md|COPYING|composer.json|composer.lock) {
#return 404; # https://www.dokuwiki.org/install:nginx?rev=1734102057#nginx_particulars
deny all; # Returns 403
}
# Support for X-Accel-Redirect
location ~ ^/data/ {
internal;
}
location / {
try_files $uri $uri/ @dokuwiki;
# This means; where $uri is 'path', if 'GET /path' doesnt exist, redirect
# client to 'GET /path/' directory. If neither, goto @dokuwiki rules.
}
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 ^/tag/(.*) /doku.php?id=tag:$1&do=showtag&tag=tag:$1 last; #untested
rewrite ^/(.*) /doku.php?id=$1&$args last;
# rewrites "doku.php/" out of the URLs if you set the userewrite
# setting to .htaccess in dokuwiki config page
}