Software install inside an individual hosting account

This article provides step by step instructions specific to the installation of MoinMoin in a shared web hosting account where you may not always have the same levels of access or environment control as you would on your own server or a dedicated hosting environment.

  1. Download the latest version from (verify the checksum!)

  2. uncompress and untar
  3. Install:

    python install --home=$HOME
    cp -a ~/share/moin/htdocs ~/public_html/wiki
  4. Edit your shell profile to add something like:

    export PYTHONPATH

Web server config

  1. Setup vhost as per normal
  2. Add the following fragment inside the <VirtualHost *> section:

            <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteRule ^/wiki/       -                      [L]
            RewriteRule ^/error/      -                      [L]
            RewriteRule ^/robots.txt  -                      [L]
            RewriteRule ^/favicon.ico /home/USERNAME/public_html/wiki/favicon.ico       [L]
            # SUBPATH is optional
            RewriteRule ^/SUBPATH/?(.*) /home/USERNAME/public_html/cgi-bin/moin.cgi/$1 [L,type=application/x-httpd-cgi]

Wiki config

  • It is best to leave WHATEVER as used below as a valid python module name, so better use only lower letters "a-z" and "_". Do not use blanks or "-"

  • Copy the wiki data:

    mkdir -p -m 0700 ~/data/moin
    cp -a ~/share/moin/data ~/data/moin/WHATEVER
  • Copy the default wiki config:

    mkdir -p -m 0700 ~/etc/moin/
    cp -a ~/share/moin/config/* ~/etc/moin/
    cd ~/etc/moin/wikifarm
  • vi

    data_dir = 'HOME/data/moin/WHATEVER'
  • vi

    • Ensure that the wikis array has a line something like:

          ("WHATEVER", r".*/SUBPATH/?.*"),
    • Set the paths for:

      data_underlay_dir = 'HOME/share/moin/underlay'
      url_prefix_static = '/wiki' # Or wherever you copied the htdocs in the software install step
    • See HelpOnConfiguration within your wiki (or for configuration details. Things you probably want to configure:

      • Mail settings so that you can send out updates
      • show_hosts possibly

      • Disable anonymous edits if desired by setting:

        acl_rights_default  = u'All:read'
  • Copy the CGI handler:

    cp ~/share/moin/server/moin.cgi ~/cgi-bin
    chmod 700 ~/cgi-bin/moin.cgi
  • vim ~/cgi-bin/moin.cgi

    • Fix up the paths:

      sys.path.insert(0, 'HOME/etc/moin')
      sys.path.insert(0, 'HOME/lib/python')
      sys.path.insert(0, 'HOME/etc/moin/wikifarm')
    • You may need to change the interpreter to be a newer version of python (at least 2.3)