Tested on apache2 on ubuntu.
Enable auth_digest:
# ln -s /etc/apache2/mods-available/auth_digest.load /etc/apache2/mods-enabled
Create your digest file:
# cd /etc/apache2 # htdigest -c nyaruka.digest nyaruka nicp Adding password for nicp in realm nyaruka. New password: ######### Re-type new password: ########
Edit your Moin apache2 config:
<VirtualHost *:80> ServerAdmin [email protected] ServerName wiki.nyaruka.com DocumentRoot /home/wiki/wiki <Location /> AuthType Digest AuthName "nyaruka" AuthUserFile /etc/apache2/nyaruka.digest Require valid-user </Location> <IfModule mod_wsgi.c> # See the link below for an introduction about this mod_wsgi config. # http://groups.google.com/group/modwsgi/browse_thread/thread/60cb0ec3041ac1bc/ WSGIPassAuthorization On WSGIScriptAlias / /home/wiki/wiki/moin.wsgi WSGIDaemonProcess wiki user=wiki group=wiki processes=7 threads=1 display-name=%{GROUP} WSGIProcessGroup wiki WSGIApplicationGroup wiki </IfModule> ErrorLog /home/wiki/logs/error.log LogLevel warn CustomLog /home/wiki/logs/access.log combined ServerSignature On </VirtualHost>
Edit your MoinMoin wikiconfig.py, adding these lines in the LocalConfig object:
from MoinMoin.auth import GivenAuth auth = [GivenAuth(autocreate=True)] # presence (or absence) of 'given' auth name, e.g.: auth_methods_trusted = ['given', 'xmlrpc_applytoken']
Restart apache and things should work.