Tom Jones

Email: <you AT SPAMFREE example DOT com>

Problems

02/06/09

Apologies, but I'm not sure where to publish some issues I've been having with moinmoin? So I figured I'd document it here on my user home page.

1) I'm currently running moinmoin as a CGI version 1.5.9, all is well, apart from the following.

I can't seem to get http auth to work with auto create logins from a .htaccess file? I've added the following code in the wiki.conf:

from MoinMoin.auth.http import HTTPAuth
auth = [HTTPAuth(autocreate=True)]

But it dumps out a error message ending with AttributeError: RequestCGI object has no attribute cfg.

2) I'm also farming out the wiki, it works :) But have to manually configure each wiki instance to run by editing the follow within moin.cgi:

import os
os.environ['SCRIPT_NAME'] = '/wiki/customer1'

Then the following wiki works, but cause it's hard coded in, '/wiki/'customer2' won't have any luck access their wiki:

http://www.website.com/wiki/customer1
http://www.website.com/wiki/customer2

My question is how do I configure this within each wiki-instance.conf to load the url path?

Discussion

Why do you run such an ancient version of moin? Btw. MoinMoinQuestions is a good place to ask for help besides joining #moin at chat.freenode.net. The example snippet code for HTTPAuth is not for the 1.5 code base. May be look into the help pages of your wiki. I guess you also did a wrong indenting because of the error message you described "ImportError: No module named http" would have been the correct error message.

If you upgrade to a a recent 1.8.4 then I would suggest to use mod_wsgi. Currently it looks to me that the ScriptAlias is not used for CGI in your setup. I am not sure if I have seen already the config file named wiki.conf for a farmconfiguration. Please tell which distro has done this renaming. -- ReimarBauer 2009-06-12 16:15:13

25/06/09

Thanks for the above.

I'm going to up grade to the latest version of moinmoin but for the short term I need to use 1.5.

I've added the following to one of the farmed wiki.py configuration files:

from MoinMoin.auth import http

class Config(FarmConfig):

    auth = [http]
    user_autocreate = True

It doesn't produce any errors which is nice :)... but it's not auto creating users into moinmoin when they authenticate using .htaccess

I've gone over all the docs twice, three times, making sure I haven't missed anything but I can't see where I'm going wrong, any ideas?

Oh and I still have no idea how to change the script name no each wiki instance so any links within each wiki appear liks so

First wiki instance
http/www.website.com/wiki/instance1/

Second wiki instance
http/www.website.com/wiki/instance2/


CategoryHomepage

MoinMoin: TomJones (last edited 2009-06-27 22:08:39 by TomJones)