WikklyText A wikitext server and rendering library


files/feed-icon-14x14.png Recently Edited Valid XHTML 1.0 Strict
BehindApache edit
frank, 26 September 2009 (created 04 February 2008)
Tags: apache mod_python server
Check your version
These instructions are for WikklyText 1.6.0 and earlier. If you are running a later version, see ApacheIntegration instead.


First, ensure you have installed the Python module. Running a WikklyText wiki behind Apache via mod_python is straightforward. Here is an example:
Wiki location on filesystem:
/MY/WIKI/PATH
Desired URL:
/WIKI/PATH

  • First, add a small bootstrap module to your wiki folder:
    cd /MY/WIKI/PATH
    wik makeboot
  • Point Apache to your wiki (i.e. inside a VirtualHost container):
    <VirtualHost>
        ... assuming this is the root section ...

      <Location /WIKI/PATH>
        PythonPath "sys.path + [r'/MY/WIKI/PATH']"
        SetHandler python-program
        PythonHandler cherrypy._cpmodpy::handler
        PythonOption cherrypy.setup wikboot::start_modpython
        PythonDebug On
        # I recommend setting "MY_WIKI_NAME" in the next line
        # to give each wiki a unique name.
        # This avoids weird problems caused by mod_python caching.
        PythonInterpreter MY_WIKI_NAME
      </Location>
  • Edit wikboot.py (in your wiki folder) and set WEBPATH="/WIKI/PATH".
  • Restart Apache and your wiki should work.
  • For testing purposes, you can also run a standalone server:
    cd /MY/WIKI/PATH
    python wikboot.py


Troubleshooting


Note that your wiki needs to be writeable by the userid that Apache runs under. The best method (assuming the Apache user is apache-user) is:
chown -R apache-user /MY/WIKI/PATH


If that is not possible, then you'll have to make it world writeable:
chmod -R a+rw /MY/WIKI/PATH


blog comments powered by Disqus