MoinMoin
So far, Unit doesn’t support handling the REMOTE_USER headers directly, so authentication should be implemented via other means. For a full list of available authenticators, see here.
To run the MoinMoin wiki engine using Unit:
-
Install Unit with a Python 2 language module.
As of now, MoinMoin doesn’t fully support Python 3. Mind that Python 2 is officially deprecated. -
Install and configure MoinMoin’s prerequisites
-
Install MoinMoin’s core files. Here we install them at /path/to/app; use a real path in your configuration.
For example:
consoletar xzf moin-X.Y.Z.tar.gz --strip-components 1 -C /path/to/app/ # MoinMoin version | Path to the application directory; use a real path in your configuration -
Configure your wiki instances:
See the ‘Single Wiki’ section here for an explanation of these commands:
consolecd /path/to/app/ # Path to the application directory; use a real path in your configurationconsolemkdir single/consolecp wiki/config/wikiconfig.py single/ # Wiki instance configurationconsolecp -r wiki/data/ single/data/consolecp -r wiki/underlay/ single/underlay/consolecp wiki/server/moin.wsgi single/moin.py # WSGI module to run, extension should be changed for proper discoveryNext, edit the wiki instance configuration in wikiconfig.py as appropriate.
See the 'Multiple Wikis' section [here](https://master.moinmo.in/InstallDocs/ServerInstall) for an explanation of these commands:consolecd /path/to/app/ # Path to the application directory; use a real path in your configurationconsolemkdir multi/ multi/wiki1/ multi/wiki2/consolecp wiki/config/wikifarm/* multi/consolecp wiki/config/wikiconfig.py multi/wiki1.py # Wiki instance configurationconsolecp wiki/config/wikiconfig.py multi/wiki2.py # Wiki instance configurationconsolecp -r wiki/data/ multi/wiki1/data/consolecp -r wiki/data/ multi/wiki2/data/consolecp -r wiki/underlay/ multi/wiki1/underlay/consolecp -r wiki/underlay/ multi/wiki2/underlay/consolecp wiki/server/moin.wsgi multi/moin.py # WSGI module to run, extension should be changed for proper discoveryNext, edit the farm configuration in farmconfig.py and the wiki instance configurations, shown here as wiki1.py and wiki2.py, as appropriate.
-
Change ownership:
Run the following command (as root) so Unit can access the application directory (If the application uses several directories, run the command for each one):
console# chown -R unit:unit /path/to/app/ # User and group that Unit's router runs as by defaultThe unit:unit user-group pair is available only with official packages , Docker images, and some third-party repos. Otherwise, account names may differ; run theps aux | grep unitdcommand to be sure.For further details, including permissions, see the security checklist.
-
Next, prepare the MoinMoin configuration for Unit (use real values for path):
json{ "listeners": { "*:80": { "pass": "applications/moin" } }, "applications": { "moin": { "type": "python 2", "path": [ "/path/to/app/wsgi/module/", "/path/to/app/" ], "_comment_path": "Path where the WSGI module was stored at Step 4 | Path where the MoinMoin directory was extracted at Step 3", "module": "moin", "_comment_module": "WSGI file basename" } } } -
Upload the updated configuration.
Assuming the JSON above was added to
config.json. Run the following command as root:console# curl -X PUT --data-binary @config.json --unix-socket \ /path/to/control.unit.sock \ # Path to Unit's control socket in your installation http://localhost/config/ # Path to the config section in Unit's control APIAfter a successful update, MoinMoin should be available on the listener’s IP address and port: