LinuxSoftware

Coding and tramping in Aotearoa / New Zealand

MoinMoin is a Python Wiki:WikiClone, based on Wiki:PikiPiki. The name is a common German slang expression.

Setup

This Wiki uses FastCGI and my ModifiedStarDust theme.

Rewrite Rules

Notice that the URLs are nicely rooted at the /wiki location, not some ugly /cgi-bin/moin.cgi thing. To do this I found Robert Schumann's ApacheOnLinuxFTPRootWiki page extremely helpful.

www/wiki/.htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
# The RewriteBase tells Apache that we got here because the user typed in
# http://example.com/wiki/SomePage, rather than http://example.com/SomePage
RewriteBase /wiki

# If the request is not for a valid directory...
RewriteCond %{REQUEST_FILENAME} !-d
# ...and it's not for a file...
RewriteCond %{REQUEST_FILENAME} !-f
# ...then pass the path from the URL to moin.cgi
#RewriteRule ^(.*) /cgi-bin/moin.cgi/$1 [last,type=application/x-httpd-cgi]
RewriteRule ^(.*) /cgi-bin/moin.fcg/$1 [last,type=application/x-httpd-fcgi]

# Of course, if the user just typed http://example.com/wiki,
# that needs to work too!
#RewriteRule ^$ /cgi-bin/moin.cgi [last,type=application/x-httpd-cgi]
RewriteRule ^$ /cgi-bin/moin.fcg [last,type=application/x-httpd-fcgi]

</IfModule>

And in www/cgi-bin/moin.fcg (for FastCGI)

    properties = {'script_name': '/wiki'}