1594
Comment:
|
4058
|
Deletions are marked like this. | Additions are marked like this. |
Line 36: | Line 36: |
=== The apache2 setup === First check that libapache2-mod_wsgi or similar is installed, check that is loaded by apache ( a2enmod wsgi && apachectl restart ) This is my sample virtual host for the sum off all the wikis: {{{ NameVirtualHost nnn.nnn.nnn.nnn <VirtualHost thefarm> ServerAdmin webmaster@thefarm ServerName thefarm DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> # Static data, styleshets and images Alias /moin_static /var/www/wiki/htdocs # # WSGIScriptAlias /wiki /home/wiki/bin/moin.wsgi # match rules for multihoming, multihoming won't work without WSGIScriptAliasMatch ^/wiki/([^/]+) /home/wiki/bin/moin.wsgi # create some wsgi daemons - use someuser.somegroup same as your data_dir: WSGIDaemonProcess wiki user=wiki group=wiki home=/home/wiki processes=5 threads=10 maximum-requests=1000 # umask=0007 does not work for mod_wsgi 1.0rc1, but will work later # use the daemons we defined above to process requests! WSGIProcessGroup wiki # this is here because I'm integrating moinmoin in various frameworks(RoR,django,phpcake) and I had to be sure that the wiki dir is handled only by moinmoin <Location /wiki> SetHandler None </Location> # this is for the basic <Location /moin_static> SetHandler None </Location> <Directory /var/www/moin/htdocs> Order allow,deny Allow from all </Directory> # this is for the multihoming # now don't need to restart apache when adding new wikis :) # could do the same trick to run custom moin.wsgi Alias /moin_([^/]+) /home/wiki/wikis/([^/]+)/htdocs <DirectoryMatch ^/home/wiki/wikis/([^/]+)/> Order deny,allow Allow from all </DirectoryMatch> ErrorLog /var/log/apache2/stargate1-error.log LogLevel warn CustomLog /var/log/apache2/stargate1-access.log combined </VirtualHost> |
MoinMoin farming mode with apache2 and mod_wsgi
Why? Because MoinMoin is a widely used wiki, dyne.org uses MoinMoin and I thought to keep a page with a guide to install the latest moinmoin version at the time I'm writing 2024-04-20
Basic idea
The basic idea is that in farming mode each wiki has it's own instance. For its own instance we mean data, configuration files, stylesheets and plugins Search on the online documentation of moinmoin I found http://moinmo.in/FarmQuestions
/home/wiki/ bin/ moin.wsgi config/ farmconfig.py # contain the basic configurations common to all wikis mywiki.py # site1 rcyb.py # site2 logging/ logfile.conf plugin/ # systemwide plugins underlay/ # read-only doc pages/ #<--- need to be rwx for owner and group www-data wikis/ mywiki/ data/ #<--- need to be rwx for owner and group www-data and so for plugin -> ../../../plugin rcyb/ data/
All the static content will be in the DocRoot of the webserver (e.g. /var/www/$(wikiname|hostname)/htdocs
At the end each host in the farm could have something like http://wherewerehome.nn/wiki/$(wikiname|hostname)/ with a rewrite rule (I'm might be totally wrong and a rewrite rule might not be usefull but I'm thinking in case of migration from server to server) in case of dedicated hostname, e.g. http://groupxy.com/wiki that point to http://wherewerehome.nn/wiki/$groupxy/
The apache2 setup
First check that libapache2-mod_wsgi or similar is installed, check that is loaded by apache ( a2enmod wsgi && apachectl restart )
This is my sample virtual host for the sum off all the wikis: