Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
Configuring Dokuwiki basedir with Linux and Nginx
Silicon Prophet #1
Member for 2 months · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Configuring Dokuwiki basedir with Linux and Nginx
I have a website and I want to host DokuWiki under the directory I edited the nginx file for the program I am running over most of the site to send traffic somewhere when the url has /wiki/ in it, but now I still need to configure Dokuwiki to run under that directory, and get the code to get it to run in that directory. I am aware of the basedir thing in dokuwiki.php but idk where to put the logal configuration, I also don't know how to get dokuwiki to run as a systemd service. Does anyone know how to do these things?
schplurtz (Moderator) #2
Member since Nov 2009 · 508 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post

• you don't run DokuWiki as a systemd service. DokuWiki is a PHP application and PHP applications don't run as service. PHP applications rely on the webserver to launch various PHP scripts on demand; for each HTTP request. In your case, you have to set up a php-fpm service -- whose job is to actually interpret the PHP scripts -- and configure nginx to pass requests to that php-fpm service. To install php-fpm, refer to your particular distro documentation, but this is usually as simple as installing the php-fpm package. Once done, see to setup nginx. The example is given for dokuwiki at the root of a website. So, you have to change "location /" to "location /wiki", "location /lib" to "location /wiki/lib", "rewrite ^/_media" to "rewrite ^/wiki/_media" and so on...

• Once done, run the installer. (it will be  see , this will create the required minimum settings. Among other things, it will create conf/local.php

• Never edit conf/dokuwiki.php, but override default settings in conf/local.php . See

• Usually, there is nothing to configure in DokuWiki to tell it it is located at /something. DW autodetects its own URL. If it does not work properly (images not shown for example), then set basedir in conf/local.php. It might help. See

You might also want to read the whole install documentation.
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
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-01-29, 19:56:45 (UTC +01:00)