rottenraptor-server: add vhost for dokuwiki
This commit is contained in:
parent
7808d9b0ea
commit
77003a01d8
2 changed files with 50 additions and 0 deletions
33
data/nginx/files/extras/rottenraptor-server/dokuwiki
Normal file
33
data/nginx/files/extras/rottenraptor-server/dokuwiki
Normal file
|
@ -0,0 +1,33 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue