[Moin-user] WSGI config without admin interaction
Florian Lindner
mailinglists at xgm.de
Sun Jan 11 11:57:04 EST 2009
Hello,
I wanted to run MoinMoin with mod_wsgi but the configuration should
require as less as possible help from the admin thus no edting of
files in /etc/. After some tries I could make it working. I'm posting
it here that anyone more knowledgable than me could have a look at it
if there are any flaws.
Since the Alias directive is not allowed in .htaccess I symlinked the
moin_static181 into the document root.
I create a file moin.wsgi:
import sys
sys.path.insert(0, '/home/flindner/moinmoin/test_instance')
sys.path.insert(0, '/home/flindner/moinmoin/lib/python2.5/site-
packages')
from MoinMoin.server.server_wsgi import moinmoinApp
application = moinmoinApp
wikiconfig.py in test_instance needs to have absolute paths for the
data and underlay dir or - I guess - relative to moin.wsgi.
In my .htaccess I used mod_rewrite:
RewriteEngine On
AddHandler wsgi-script .wsgi
RewriteCond %{REQUEST_URI} ^/testwiki/
RewriteRule ^(.*)$ /moin.wsgi/$1 [L]
So far it seems to work. Is it ok or any problems I don't see?
Thanks,
Florian
More information about the Moin-user
mailing list