| 1 |
Dokuwiki |
| 2 |
======== |
| 3 |
|
| 4 |
|image0| |
| 5 |
|
| 6 |
Presentation |
| 7 |
------------ |
| 8 |
|
| 9 |
`DokuWiki <http://www.dokuwiki.org/>`__ is a standards compliant, simple |
| 10 |
to use Wiki, mainly aimed at creating documentation of any kind. It is |
| 11 |
targeted at developer teams, workgroups and small companies. It has a |
| 12 |
simple but powerful syntax which makes sure the data files remain |
| 13 |
readable outside the Wiki and eases the creation of structured texts. |
| 14 |
All data is stored in plain text files – no database is required. |
| 15 |
|
| 16 |
|
| 17 |
HTTP headers |
| 18 |
------------ |
| 19 |
|
| 20 |
You need to install a Dokuwiki plugin, available on `Dokuwiki plugins |
| 21 |
registry <https://www.dokuwiki.org/plugins>`__: |
| 22 |
https://www.dokuwiki.org/plugin:authlemonldap |
| 23 |
|
| 24 |
Plugin installation |
| 25 |
~~~~~~~~~~~~~~~~~~~ |
| 26 |
|
| 27 |
Install the plugin using the `Plugin |
| 28 |
Manager <https://www.dokuwiki.org/plugin:plugin>`__. |
| 29 |
|
| 30 |
Dokuwiki configuration |
| 31 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 32 |
|
| 33 |
As administrator, go in Dokuwiki parameters and set: |
| 34 |
|
| 35 |
- Authentication backend: authlemonldap |
| 36 |
- Manager: set which users and/or groups will be admin |
| 37 |
|
| 38 |
|image1| |
| 39 |
|
| 40 |
Dokuwiki virtual host |
| 41 |
~~~~~~~~~~~~~~~~~~~~~ |
| 42 |
|
| 43 |
Configure Dokuwiki virtual host like other |
| 44 |
:doc:`protected virtual host<../configvhost>`. |
| 45 |
|
| 46 |
- For Apache: |
| 47 |
|
| 48 |
.. code-block:: apache |
| 49 |
|
| 50 |
<VirtualHost *:80> |
| 51 |
ServerName dokuwiki.example.com |
| 52 |
|
| 53 |
PerlHeaderParserHandler Lemonldap::NG::Handler |
| 54 |
|
| 55 |
... |
| 56 |
|
| 57 |
</VirtualHost> |
| 58 |
|
| 59 |
- For Nginx: |
| 60 |
|
| 61 |
.. code-block:: nginx |
| 62 |
|
| 63 |
server { |
| 64 |
listen 80; |
| 65 |
server_name dokuwiki.example.com; |
| 66 |
root /path/to/application; |
| 67 |
# Internal authentication request |
| 68 |
location = /lmauth { |
| 69 |
internal; |
| 70 |
include /etc/nginx/fastcgi_params; |
| 71 |
fastcgi_pass unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock; |
| 72 |
# Drop post data |
| 73 |
fastcgi_pass_request_body off; |
| 74 |
fastcgi_param CONTENT_LENGTH ""; |
| 75 |
# Prevent attacks on older Nginx versions (<1.29.5) |
| 76 |
fastcgi_param HTTP_HOST $host; |
| 77 |
# Keep original request (LL::NG server will receive /lmauth) |
| 78 |
fastcgi_param X_ORIGINAL_URI $original_uri; |
| 79 |
} |
| 80 |
|
| 81 |
# Client requests |
| 82 |
location / { |
| 83 |
auth_request /lmauth; |
| 84 |
set $original_uri $uri$is_args$args; |
| 85 |
auth_request_set $lmremote_user $upstream_http_lm_remote_user; |
| 86 |
auth_request_set $lmlocation $upstream_http_location; |
| 87 |
error_page 401 $lmlocation; |
| 88 |
try_files $uri $uri/ =404; |
| 89 |
|
| 90 |
... |
| 91 |
|
| 92 |
include /etc/lemonldap-ng/nginx-lua-headers.conf; |
| 93 |
} |
| 94 |
location / { |
| 95 |
try_files $uri $uri/ =404; |
| 96 |
} |
| 97 |
} |
| 98 |
|
| 99 |
Dokuwiki virtual host in Manager |
| 100 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 101 |
|
| 102 |
Go to the Manager and :doc:`create a new virtual host<../configvhost>` |
| 103 |
for Dokuwiki. |
| 104 |
|
| 105 |
Configure the :ref:`access rules<rules>`. |
| 106 |
|
| 107 |
Configure the :ref:`headers<headers>`: |
| 108 |
|
| 109 |
- Auth-User $uid |
| 110 |
- Auth-Cn: $cn |
| 111 |
- Auth-Mail: $mail |
| 112 |
- Auth-Groups: encode_base64($groups,"") |
| 113 |
|
| 114 |
|
| 115 |
.. attention:: |
| 116 |
|
| 117 |
To allow execution of encode_base64() method, you must |
| 118 |
deactivate the :doc:`Safe jail<../safejail>`. |
| 119 |
|
| 120 |
.. |image0| image:: /applications/dokuwiki_logo.png |
| 121 |
:class: align-center |
| 122 |
.. |image1| image:: /applications/screenshot_dokuwiki_configuration.png |
| 123 |
:class: align-center |
| 124 |
|