Posted 2003-09-30T14:32:00+01:00 in recipe web

Installing MoinMoin on Windows

To get MoinMoin to run as CGI script you need to edit three configuration files. Before editing those files, I moved the data part of the wiki to C:/home/wiki. Because I'm guessing that I'll edit the css or html as well at some point, I also moved those to that directory. The application and the cgi driver script were placed in F:/Projects/moin-1.1. The file layout looked like this:

C:/home/wiki/htdocs
C:/home/wiki/data
F:/Projects/moin-1.1/wiki/cgi-bin
F:/Projects/moin-1.1/MoinMoin 

First edit httpd.conf, and restart the webserver:

Alias /wiki C:/home/wiki/htdocs
<Directory "C:/home/wiki/htdocs">
    Order Allow,Deny
    Allow from All
    Options None
    Allowoverride None
</Directory>

ScriptAlias /cgi-moin F:/Projects/moin-1.1/wiki/cgi-bin
<Directory "F:/Projects/moin-1.1/wiki/cgi-bin">
    Order Allow,Deny
    Allow from All
    Options None
    Allowoverride None
</Directory>

Next, edit moin.cgi. In Apache2 on Windows, point the pound-bang line to the python interpreter. Comment the import sys statement back in and adjust the path to MoinMoin.

#!C:\usr\local\python222\python.exe
import sys
sys.path.append('F:/Projects/moin-1.1')

Last, edit moin_config.py so that the data directory can be found, and check the url_prefix, which should match with the Alias directive that was just added to httpd.conf.

# basic options (you normally need to change these)
sitename = 'PulliNotes'
interwikiname = None
data_dir = 'C:/home/wiki/data/'
url_prefix = '/wiki'
logo_url = url_prefix + '/img/moinmoin.gif'