1
## Please edit system and help pages ONLY in the master wiki!
2
## For more information, please see MoinMoin:MoinDev/Translation.
3
## page was renamed from ApacheVoodoo
4
##master-page:Unknown-Page
5
##master-date:Unknown-Date
6
#acl -All:write Default
12
/!\ Voodoo is not for newbies!
14
This page gives some nice but advanced tricks for a moin Apache setup. The directives on this page assume that you have knowledge about Apache configuration, newbies should stick to the basic setup.
19
/!\ This requires the Apache module "mod_rewrite" (which should be standard)
21
An Apache root wiki is easy, but it has limitations. Since moin needs to access certain static files (images, css, etc.), it intercepts a part of the possible WikiName namespace.
23
1. Install moin as normal.
24
1. Add the following lines to your VirtualHost config:
29
# Point to moin shared static files - DEPENDS ON MOIN VERSION!
30
RewriteRule ^/moin_static160/(.*)$ /prefix/share/moin/htdocs/$1 [last]
32
# Map everything else to moin cgi script
33
RewriteRule ^(.*)$ /path/to/moin.cgi$1 [type=application/x-httpd-cgi]
36
##RewriteRule ^(.*)$ /path/to/moin.fcg$1 [type=application/x-httpd-fcgi]
39
The RewriteRule for Fast''''''CGI here does not work for me: {{{
40
[Wed Jan 05 01:43:41 2005] [error] [client 10.0.0.1] File does not exist: /home/apache/moin/wiki/share/moin/pw/moin.fcg/RecentChanges, referer: http://moin.dahoam/StartSeite
41
duplo:/home/danielt# ls /home/apache/moin/wiki/share/moin/pw/moin.fcg
42
-rwxr-xr-x 1 root www 1088 Jan 4 23:35 /home/apache/moin/wiki/share/moin/pw/moin.fcg*
45
As a workaround I use this: {{{
46
RewriteRule ^/?(.*) /_Wikiscript_/moin.fcg/$1
47
RewriteRule ^/_Wikiscript_/(.*) /home/apache/moin/wiki/share/moin/pw/$1 [last]
51
= Root wiki on Mac OSX =
52
/!\ This configuration intercepts all userfolder URLs like ''`http://127.0.0.1/~yourname/`'' and offers a blank wiki page instead, so these instructions are offered as an exercise only. There may be a way around this problem but I don't know what it is.
54
Using the previous information on the moin OS X installation, you end up with a virtual host block like this:
57
ServerName Gnarlodious
58
Alias /moin_static160/ /usr/local/share/moin/htdocs/
59
ScriptAlias /mywiki /usr/local/share/moin/mywiki/moin.cgi
61
RewriteRule ^/moin_static160/(.*)$ /usr/local/share/moin/htdocs/$1 [last]
62
RewriteRule ^(.*)$ /usr/local/share/moin/mywiki/moin.cgi$1 [type=application/x-httpd-cgi]
65
Remove the following `<IfModule mod_alias.c>` directives added on [[HelpOnInstalling/ApacheOnMacOsx|this page]], as they are now redundant:
67
Alias /moin_static160/ "/moinwiki/share/moin/htdocs/"
68
ScriptAlias /mywiki "/moinwiki/share/moin/mywiki/moin.cgi"
70
Now restart Apache. You should be able to open a URL like http://127.0.0.1/HelpOnInstalling/ApacheOnMacOsx
73
= Root wiki with mod python recipe =
75
Using the above example, I got this working like this:
77
1. Install moin as usual and create instance
78
1. Use this config in httpd.conf
80
NameVirtualHost 192.115.134.51:80
81
<VirtualHost 192.115.134.51:80>
82
ServerName wiki.nirs.dyndns.org
88
# map static files to htdocs
89
RewriteRule ^/moin_static160/(.*)$ /usr/share/moin/htdocs/$1 [last]
90
# map everything else to server script
91
RewriteRule ^(.*)$ /usr/share/moin/mywiki/moinmodpy.py$1
93
<Directory "/usr/share/moin/mywiki">
94
# These are copied from the default cgi-bin directory
101
AddHandler python-program .py
102
# Add the path to the wiki directory, where moinmodpy.py and
103
# wikiconfig.py are located.
104
PythonPath "['/usr/share/moin/mywiki'] + sys.path"
105
PythonHandler moinmodpy
111
(!) It seems to be impossible to get a root modpy wiki without using the moinmodpy wrapper script.