Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
installing dokuwiki beneath a page on a server
Avatar
Jim54 #1
Member since Apr 2018 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: installing dokuwiki beneath a page on a server
Hi,
I've got Dokuwiki working on a nginx server on a raspbian distro, based on this https://www.dokuwiki.org/install:nginx but would like to have to working from a page on that site so I can have multiple pages on the site e.g. www.example.com/dokuwiki. How would I need to do this, if it is possible?

Thanks
JAmes
Avatar
dokojo #2
Member since Apr 2018 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: a try
Dokuwiki uses relative pathnames wherever I looked, so it should be fine. But I don't know nginx at all, so I might be very wrong... but I'd assume you'd have to change the
root /dokuwiki
to
root /
, throw out the @dokuwiki out of try_files, change
location @dokuwiki {
to
location /dokuwiki {
and adapt the rewrite rules like so:
        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&$args last;
becomes
        rewrite ^(/dokuwiki)/_media/(.*) $1/lib/exe/fetch.php?media=$2 last;
        rewrite ^(/dokuwiki)/_detail/(.*) $1/lib/exe/detail.php?media=$2 last;
        rewrite ^(/dokuwiki)/_export/([^/]+)/(.*) $1/doku.php?do=export_$2&id=$3 last;
        rewrite ^(/dokuwiki)/(.*) $1/doku.php?id=$2&$args last;
Probably
        try_files $uri $uri/ /doku.php;
could be changed to
        try_files $uri $uri/ /dokuwiki/doku.php;
in the ~ \.php location, also. Or better throw out /doku.php there, it shouldn't be needed if there are no nonexistant .php.
Then you could use the rest of the server like usual, and address the dokuwiki with http://www.example.com/dokuwiki/. Given my background, that's a bit of a wild guess, though...

(I hate it when ppl give me answers like "why do you want to do that" or "use a different webserver", but I believe it's fair after answering the original question, so: I used dokuwiki with lighttpd on a RasPi, and that works like this out of the box afair. Might be an option.)
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-08, 03:29:44 (UTC +01:00)