[Moin-user] multiple wikis on same virtual host
jtmoree at kahalacorp.com
Mon Oct 27 15:10:14 EDT 2008
I googled for this but found no revelvant links. I've also looked at
the main wiki site but this case is not covered.
Generally, the moinmoin setup seems to work best when using DNS to
differentiate between wiki sites but I'd prefer to cut out the overhead
of creating multiple DNS entries.
Unfortunately this requires more overhead in configuring apache or some
creative setups. I've hacked together a solution that works but I'd
like to hear some feedback from others.
I'm using Ubuntu so some of my setup is specific to the way debian is
packaging moinmoin but I find that I'm having to make copies of some of
the files and re-arrange things anyway.
First I installed with apt. The version I got is
Next I got the single and farm sites working as virtual hosts then I
started changing things.
I don't want to create a new virtual host in apache for every new site
for the same reason I don't want to create multiple dns entries. The
files are all the same that run the site. Only the data and some part
of the url needs to be different.
I am using an apache virtual host with this configuration
AddHandler cgi-script .cgi
# Use default themes
Alias /wiki/ /usr/share/moin/htdocs/
I copied the contents of the server folder which contains the moin.cgi
script from /usr/share/moin to /var/www/vhosts/bugs-dev.kahalacorp.com/
Next I create a symlink in that folder for the sites I want to
differentiate from each other
ln -s moin.cgi a.cgi
ln -s moin.cgi b.cgi
ln -s moin.cgi c.cgi
Then I tell farmconfig.py how to get to the sites
# for multiple wikis, do something like this:
Create the folders to hold the data and set perms
mkdir -p /var/moin/a/data
mkdir -p /var/moin/a/underlay
chmod -R ug+rw /var/moin
chown -R www-data:www-data /var/moin
Lastly I configure each site's .py file and set the data_dir and
data_underlay_dir. (this is a rough approximation)
cp /etc/moin/mywiki.py /etc/moin/a.py
printf " data_dir = '/var/moin/a/data'\n data_underlay_dir =
'/var/moin/a/underlay'\n" > /etc/moin/a.py
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Moin-user