Moin Apache2 WSGI Configuration

In order to "restart" moin, just "$ sudo touch moin.wsgi"

The action log is inserted in /var/log/apache2/access.log

Changes to Apache2 httpd.conf

If after an apache2 restart the wiki page does not show CSS formatting,
look in file /etc/apache2/httpd.conf if Alias /moin_static196 is set wrong.

If after an apache2 restart the wiki pages does look OK, but after editing and saving a traceback is thrown, have a look for the permissions. Im my case the folder moin-1.9.6 should have user:group of www-data:www-data, the user folder must have the user:group permission of the user.

Part of the file /etc/apache2/httpd.conf on ASUS EeePC 900A, Ubuntu 12.04. In Ubuntu 14.04 it is in path /etc/apache2/conf-enabled/httpd.conf

# run moin 1.9.4tw and 1.9.4 in parallel (wiki and wiki9) 2012-09-12
# other definitions are in /etc/apache2/httpd.conf

# wiki - moin, wsgi interface
# 2012-09-14 RudolfReuter
# 2013-01-01 change to moin-1.9.6
Alias /moin_static196 /home/rudi/moin-1.9.6/MoinMoin/web/static/htdocs/
<Directory /home/rudi/moin-1.9.6/MoinMoin/web/static/htdocs>
    # for apache2, version 2.2 (Ubuntu 12.04)
        Order allow,deny
        allow from all
    # for apache2, version 2.4 (Ubuntu 14.04)
        Require all granted
</Directory>
WSGIScriptAlias /wiki9 /home/rudi/moin-1.9.6/moin.wsgi
WSGIDaemonProcess moin_196 user=www-data group=www-data processes=1 threads=5 maximum-requests=100 umask=0007
WSGIProcessGroup moin_196
<Directory /home/rudi/moin-1.9.6>
    # for apache2, version 2.2 (Ubuntu 12.04)
        Order allow,deny
        allow from all
    # for apache2, version 2.4 (Ubuntu 14.04)
        Require all granted
</Directory>

# wiki9 - moin, wsgi interface
# 2012-09-13 RudolfReuter
Alias /moin_static194 /home/rudi/moin-1.9.4/MoinMoin/web/static/htdocs/
<Directory /home/rudi/moin-1.9.4/MoinMoin/web/static/htdocs>
    # for apache2, version 2.2 (Ubuntu 12.04)
        Order allow,deny
        allow from all
    # for apache2, version 2.4 (Ubuntu 14.04)
        Require all granted
</Directory>
WSGIScriptAlias /wiki9 /home/rudi/moin-1.9.4/moin.wsgi
WSGIDaemonProcess moin_19 user=www-data group=www-data processes=1 threads=4 maximum-requests=100 umask=0007
WSGIProcessGroup moin_19
<Directory /home/rudi/moin-1.9.4>
    # for apache2, version 2.2 (Ubuntu 12.04)
        Order allow,deny
        allow from all
    # for apache2, version 2.4 (Ubuntu 14.04)
        Require all granted
</Directory>

Changes in moin-1.9.4/moin.wsgi

# Python code search path
sys.path.insert(0, '/home/rudi/moin-1.9.4')

# logging
from MoinMoin import log
log.load_config('/home/rudi/moin-1.9.4/wikiserverlogging.conf')

Permissions in moin-1.9.4

In order to run without problems, and to allow editing from the user set:

$ sudo chmod -R ug+rw moin-1.9.4/

Apache2 modules

In order to see, which Multi-Threading method is use, you have to list the modules. A help page is here.

# on Debian / Ubuntu use:
$ apache2ctl -M
[Wed May 09 10:00:57 2012] [warn] worker http://192.168.17.81:8080/ already used by another worker
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 headers_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 proxy_module (shared)
 proxy_html_module (shared)
 proxy_http_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
 wsgi_module (shared)
Syntax OK

Limit CPU load

List of pages in this category:

-- RudolfReuter 2012-05-09 09:22:51


Go Back to CategoryMoinMaintenance or FrontPage ; KontaktEmail (ContactEmail)

MoinApache2WSGI (last edited 2014-07-16 06:57:16 by RudolfReuter)