Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:2.1:applications:dokuwiki [2017/11/23 14:33] (current)
Line 1: Line 1:
 +====== Dokuwiki ======
  
 +{{ :​applications:​dokuwiki_logo.png |}}
 +
 +===== Presentation =====
 +
 +[[http://​www.dokuwiki.org/​|DokuWiki]] is a standards compliant, simple to use Wiki, mainly aimed at creating documentation of any kind. It is targeted at developer teams, workgroups and small companies. It has a simple but powerful syntax which makes sure the data files remain readable outside the Wiki and eases the creation of structured texts. All data is stored in plain text files – no database is required.
 +
 +<note tip>​LemonLDAP::​NG wiki uses Dokuwiki!</​note>​
 +
 +===== HTTP headers =====
 +
 +You need to install a Dokuwiki plugin, available on [[https://​www.dokuwiki.org/​plugins|Dokuwiki plugins registry]]: https://​www.dokuwiki.org/​plugin:​authlemonldap
 +
 +==== Plugin installation ====
 +
 +Install the plugin using the [[https://​www.dokuwiki.org/​plugin:​plugin|Plugin Manager]].
 +
 +==== Dokuwiki configuration====
 +
 +As administrator,​ go in Dokuwiki parameters and set:
 +  * Authentication backend: authlemonldap
 +  * Manager: set which users and/or groups will be admin
 +
 +{{ :​applications:​screenshot_dokuwiki_configuration.png |}}
 +
 +==== Dokuwiki virtual host ====
 +
 +Configure Dokuwiki virtual host like other [[..configvhost|protected virtual host]].
 +
 +
 +  * For Apache:
 +<file apache>
 +<​VirtualHost *:80>
 +       ​ServerName dokuwiki.example.com
 +
 +       ​PerlHeaderParserHandler Lemonldap::​NG::​Handler
 +
 +       ...
 +       
 +</​VirtualHost>​
 +</​file>​
 +
 +  * For Nginx:
 +<file nginx>
 +server {
 +  listen 80;
 +  server_name dokuwiki.example.com;​
 +  root /​path/​to/​application;​
 +  # Internal authentication request
 +  location = /lmauth {
 +    internal;
 +    include /​etc/​nginx/​fastcgi_params;​
 +    fastcgi_pass unix:/​var/​run/​llng-fastcgi-server/​llng-fastcgi.sock;​
 +    # Drop post datas
 +    fastcgi_pass_request_body ​ off;
 +    fastcgi_param CONTENT_LENGTH "";​
 +    # Keep original hostname
 +    fastcgi_param HOST $http_host;
 +    # Keep original request (LLNG server will received /llauth)
 +    fastcgi_param X_ORIGINAL_URI ​ $request_uri;​
 +  } 
 + 
 +  # Client requests
 +  location / {
 +    auth_request /lmauth;
 +    auth_request_set $lmremote_user $upstream_http_lm_remote_user;​
 +    auth_request_set $lmlocation $upstream_http_location;​
 +    error_page 401 $lmlocation;​
 +    try_files $uri $uri/ =404;
 + 
 +    ...
 + 
 +    include /​etc/​lemonldap-ng/​nginx-lua-headers.conf;​
 +  }
 +  location / {
 +    try_files $uri $uri/ =404;
 +  }
 +}
 +</​file>​
 +
 +==== Dokuwiki virtual host in Manager ====
 +
 +Go to the Manager and [[..configvhost#​lemonldapng_configuration|create a new virtual host]] for Dokuwiki.
 +
 +Configure the [[..writingrulesand_headers#​rules|access rules]].
 +
 +Configure the [[..writingrulesand_headers#​headers|headers]]:​
 +  * Auth-User $uid
 +  * Auth-Cn: $cn
 +  * Auth-Mail: $mail
 +  * Auth-Groups:​ encode_base64($groups,''​)
 +
 +<note important>​To allow execution of encode_base64() method, you must deactivate the [[..safejail|Safe jail]].</​note>​