Table of Contents
This is a Nextcloud app which embeds a Dokuwiki instance into a Nextcloud server installation. If Dokuwiki and Nextcloud are configured to use the same authentication backend, then this will work with SSO, otherwise the login window of DokuWiki will appear in the embedding iframe.
make help
will list all targetsmake dev
comiles without minification or other assset-size optimizationsmake build
will generate optimized assetsIf DokuWiki and Nextcloud share a common user-base and authentication scheme then the current user is just silently logged into the configured DokuWiki instance and later the DokuWiki contents will just be presented in an IFrame to the user.
The idea is here to use LDAP for the authentication for Nextcloud as well as DokuWiki. In this case the user-names and passwords just coincide.
It is still possible to have "local" accounts for Nextcloud and DokuWiki, e.g. in order to have an administrator account which is independent from LDAP in order not to run into a chicken-and-egg problem.
There is an experimental DokuWiki auth plugin using Nextcloud as authentication source. Please refer to the original repository:
https://github.com/santifa/authnc.git
or to my own private fork
https://github.com/rotdrop/authnc
Due to the technology used -- DokuWikix just runs in an iframe -- there are some restrictions caused by the same origin policy which at least nowadays is widely in use.
In principle this boils down to the point that the Nextcloud server installation and the DokuWiki installation must be served in the same DNS domain.
In this case nothing special has to be done. The administrator can simply enter the location of the DokuWiki installation in the adminstrator settings of the app.
In this case the simplest thing is to just map the DokuWiki
installation a second time by a simple Alias
directive.
Example for Apache mod_alias:
Alias /SOME_WEB_PATH PATH_TO_EXISTING_DOKUWIKI_INSTALLATION
This directive should be placed in the virtual host definition of the Nextcloud server installation.
In the administration settings for the NC app you can then enter
whatever you have chosen for /SOME_WEB_PATH
.
Please Doc Me!
In this case it is possible to map the existing external DokuWiki installation into the Nextcloud server domain by means of a proxy configuration mapping a local web-path to the external DokuWiki server.
If you try this then please first check the proxy settings independent from the use of it in this app, i.e. just open the proxied-location in you web-browser, log-in manually and check if it works.
Place something like the following into the virtual host setup for your Nextcloud server:
ProxyRequests Off
SSLProxyEngine on
<Location /SOME_WEB_PATH/>
ProxyPass https://dokuwiki.my-domain.tld/
ProxyPassReverse https://dokuwiki.my-domain.tld/
ProxyPreserveHost Off
</Location>
Please note that you probably have ProxyPreserveHost On
in the
configuration for the push notifications service.
location /SOME_WEB_PATH/ {
proxy_pass https://dokuwiki.my-domain.tld/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
The "location /SOME_WEB_PATH/" folder paramter is used only as example. This is the location you have to enter in Administrator seetings of this Nextcloud app. The "https://dokuwiki.my-domain.tld" domain is used only as example. Point to the domain where your DokuWiki is served from.
DokuWiki may optionally be loading into a jQuery dialog, if desired. To be documented ...