view docs/INSTALL.html @ 228:d456b1c48b09

make install-docs underlay imported from: moin--main--1.5--patch-231
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 20 Nov 2005 21:08:57 +0000
parents 345d0228a0bd
children 3a26643a903b
line wrap: on
line source
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="shortcut icon" href="http://moinmaster.wikiwikiweb.de/wiki/favicon.ico">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="robots" content="noindex,nofollow">

<title>MoinMoin/InstallDocs - MoinMaster</title>
<script type="text/javascript" src="/wiki/common/js/common.js"></script>


<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="wiki/htdocs/modern/css/common.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="wiki/htdocs/modern/css/print.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="screen" href="http://moinmaster.wikiwikiweb.de/wiki/master.css">
<link rel="alternate" title="MoinMaster Recent Changes" href="http://moinmaster.wikiwikiweb.de/RecentChanges?action=rss_rc&amp;ddiffs=1&amp;unique=1" type="application/rss+xml">

<link rel="Start" href="http://moinmaster.wikiwikiweb.de/FrontPage">
<link rel="Alternate" title="Wiki Markup" href="http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs?action=raw">
<link rel="Alternate" media="print" title="Print View" href="http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs?action=print">
<link rel="Up" href="http://moinmaster.wikiwikiweb.de/MoinMoin">
<link rel="Search" href="http://moinmaster.wikiwikiweb.de/FindPage">
<link rel="Index" href="http://moinmaster.wikiwikiweb.de/TitleIndex">
<link rel="Glossary" href="http://moinmaster.wikiwikiweb.de/WordIndex">
<link rel="Help" href="http://moinmaster.wikiwikiweb.de/HelpOnFormatting">
</head>

<body  lang="en" dir="ltr">
<div id="page" lang="en" dir="ltr">
<div id="interwiki"><span><a href="http://moinmaster.wikiwikiweb.de/FrontPage">MoinMaster</a></span></div>
<ul id="pagelocation">
<li>MoinMoin/InstallDocs</li>
</ul>
<div lang="en" id="content" dir="ltr">
<span id="top" class="anchor"></span><span id="line-11" class="anchor"></span><span id="line-12" class="anchor"></span><p>This HTML page contains the basic install docs that can be found on <a class="www" href="http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs">http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs</a>. It contains all necessary information to get your wiki up and running, even without being online. If you have a permanent internet connection, you might want to browse the docs on the Help<tt></tt>On<tt></tt>Installing page, which might contain more up-to-date information. <span id="line-13" class="anchor"></span></p>
<span id="line-14" class="anchor"></span><p>After following the procedures on this page, you should have a working wiki and can browse the rest of the online docs there. <span id="line-15" class="anchor"></span></p>
<span id="line-16" class="anchor"></span>
<h1 id="head-378d73a512870e1afed036c887489ab98ba3c56a">How to install your own MoinMoin Wiki</h1>

<span id="line-17" class="anchor"></span><p>This page describes the installation procedure of <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a>. In the next section, there is a list of real-world <a href="#installscenarios">Installation Scenarios</a> that help you to understand how to apply the instructions in different environments. If you already have a wiki running and want to upgrade, see <a class="interwiki" title="MoinMaster" href="http://moinmaster.wikiwikiweb.de/HelpOnUpdating">HelpOnUpdating</a>. <span id="line-18" class="anchor"></span></p>
<span id="line-19" class="anchor"></span><p>A Moin<tt></tt>Moin installation is done by some elementary steps: <span id="line-20" class="anchor"></span></p>
<ul>
<li><p><a href="#basic-install">Basic Installation</a> explains the "<tt>setup.py</tt>" step of the installation in more detail. This is uses to get the Moin<tt></tt>Moin code and wiki template installed onto your system. This applies equally to all scenarios, and you should read it before trying a live installation. <span id="line-21" class="anchor"></span></p>
</li>
<li><p><a href="#wikiinstance-creation">Wiki Instance Creation</a> explains how you make a new wiki instance (data and configuration), this is also common to all scenarios. <span id="line-22" class="anchor"></span></p>
</li>
<li><p>Getting the web server to serve static stuff under the <tt>/wiki</tt> URL (url_prefix) - used for theme CSS and images, etc. - this is slightly different for the various web servers that can be used - see below. <span id="line-23" class="anchor"></span></p>
</li>
<li><p>Getting the web server to execute the moin code when you access wiki pages. This is done either by CGI, FastCGI, mod_python or Twisted or the built-in stand alone server - this is slightly different for the various web servers that can be used - see below. <span id="line-24" class="anchor"></span></p>
</li>
<li><p>After a successful installation, you might want to read more about configuration and other options that you, as the wiki administrator, can set up. <a class="interwiki" title="MoinMaster" href="http://moinmaster.wikiwikiweb.de/HelpOnAdministration">HelpOnAdministration</a> contains links to pages that cover these topics. Especially, the <a class="interwiki" title="MoinMaster" href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a> and <a class="interwiki" title="MoinMaster" href="http://moinmaster.wikiwikiweb.de/HelpOnUpdating">HelpOnUpdating</a> pages provide additional information regarding wiki setup and maintenance. <span id="line-25" class="anchor"></span></p>
</li>
<li><p><a href="#trouble-shooting">Trouble-shooting</a> helps with fixing any general problems you might encounter, which apply to any installation platform.  <span id="line-26" class="anchor"></span></p>
<span id="line-27" class="anchor"></span></li>
</ul>
<span id="installscenarios" class="anchor"></span><p> <span id="line-28" class="anchor"></span></p>

<h1 id="head-bee4ae5a5ef44b7af47ecd4f29b44226ba935e5b">Installation steps specific for some web servers and operating systems</h1>

<span id="line-29" class="anchor"></span><span id="line-30" class="anchor"></span><p>The following links will show you concrete examples of installation sessions, showing the commands used and explaining what they do. You <em>must first read the general information on installing above</em> before doing the installation steps described on the pages linked from below: <span id="line-31" class="anchor"></span></p>
<span id="line-32" class="anchor"></span><p>Linux: <span id="line-33" class="anchor"></span></p>
<ul>
<li><p><a href="#linuxapache-install">Linux Installation using Apache</a> <span id="line-34" class="anchor"></span></p>
</li>
<li><p><a href="#linuxstandalone-install">Linux Installation using standalone server</a> <span id="line-35" class="anchor"></span></p>
<span id="line-36" class="anchor"></span></li>
</ul>
<p>Long-Running-Process Setup: <span id="line-37" class="anchor"></span></p>
<ul>
<li><p><a href="#fastcgi-install">FastCGI Setup using Apache</a> <span id="line-38" class="anchor"></span></p>
</li>
<li><p><a href="#modpy-install">mod_python Setup using Apache</a> <span id="line-39" class="anchor"></span></p>
</li>
<li><p><a href="#twisted-install">Setup using twisted</a> <span id="line-40" class="anchor"></span></p>
<span id="line-41" class="anchor"></span></li>
</ul>
<p>Mac OS X: <span id="line-42" class="anchor"></span></p>
<ul>
<li><p><a href="#macosx-install">Mac OS X Installation</a> <span id="line-43" class="anchor"></span></p>
<span id="line-44" class="anchor"></span></li>
</ul>
<p>Windows: <span id="line-45" class="anchor"></span></p>
<ul>
<li><p><a href="#win32apache-install">Windows Installation using Apache</a> <span id="line-46" class="anchor"></span></p>
</li>
<li><p><a href="#win32iis-install">Windows Installation using IIS</a> <span id="line-47" class="anchor"></span></p>
<span id="line-48" class="anchor"></span></li>
</ul>
<span id="basic-install" class="anchor"></span><p> <span id="line-49" class="anchor"></span><div lang="en" id="Include_HelpOnInstalling/BasicInstallation" dir="ltr">
<span id="top_Include_HelpOnInstalling/BasicInstallation" class="anchor"></span><span id="line-8" class="anchor"></span><span id="line-9" class="anchor"></span><p><span id="line-10" class="anchor"></span><strong>How to do a basic installation of <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> on your system.</strong> <span id="line-11" class="anchor"></span></p>
<span id="line-12" class="anchor"></span><p><strong>Contents</strong> <span id="line-13" class="anchor"></span><ol>
<li><a href="#head-2fa431ad9c9bff5badd07c5ee676b19852ed28e3">Check if Python is working</a></li>
<li><a href="#head-119b1acf8110bb618e4f366c3d1f8a35ad625f75">Download MoinMoin</a></li>
<li><a href="#head-a84e58c8b4256bd645b9c47b5a900219a356259f">Install MoinMoin</a><ol>
<li><a href="#head-640b21abea127e7ac4b48c938607c233b7119bd5">Installing in the default system location</a></li>
<li><a href="#head-ae8ab55eb5e8c11d4fd1eb06e12d69f1b33d411b">Installing in the home directory or another specific location</a></li>
</ol>
<li><a href="#head-d7d600c8dcfdd9270f4a6642566404ede510f46a">Test installation</a></li>
<li><a href="#head-87a60f1d02c36fb1804b442815dba49cbc8adfe7">What has been installed</a></li>
</ol>
 <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><p>Before you can integrate Moin<tt></tt>Moin into your web environment, you have to install the <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> source code and data files using the standard Python <em>distutils</em> mechanism (<tt>setup.py</tt>). This page explains the steps you usually need to take to do this. For more details on the <em>distutils</em> installation process, consult the <a class="external" href="http://www.python.org/doc/current/inst/inst.html">Installing Python Modules</a> document in your Python documentation set. <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span><p>The installation is similar on Windows and Linux (and other POSIX-type systems; for simplicity, we just say "Linux" in the docs). <span id="line-18" class="anchor"></span></p>
<span id="line-19" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> We use text such as <strong><tt>&gt;&nbsp;command&nbsp;arguments</tt></strong> to show what you have to type at the command prompt (also known as shell, terminal, etc.). In our examples "<tt>&gt;&nbsp;</tt>" is the prompt, you don't have to type it in, you have to type what comes after it. Lines that do not begin with "<tt>&gt;&nbsp;</tt>" are the answers to the commands you have typed. Read them carefully. <span id="line-20" class="anchor"></span></p>
<span id="line-21" class="anchor"></span></li>
</ul>

<h1 id="head-2fa431ad9c9bff5badd07c5ee676b19852ed28e3">Check if Python is working</h1>

<span id="line-22" class="anchor"></span><span id="line-23" class="anchor"></span><p>Moin<tt></tt>Moin needs Python to run, so the first step is to check if an usable version of Python is installed and correctly set-up. If this is not the case, you will have to fix that before you can proceed. <span id="line-24" class="anchor"></span></p>
<span id="line-25" class="anchor"></span><p>The <tt>CHANGES</tt> file in the Moin<tt></tt>Moin archive mentions what versions are supported. Python 2.3 is the minimum requirement for Moin<tt></tt>Moin 1.5, but we suggest you use the latest Python release version. <span id="line-26" class="anchor"></span></p>
<span id="line-27" class="anchor"></span><p>You can download Python at <a class="external" href="http://www.python.org/download/">http://www.python.org/download/</a>. <span id="line-28" class="anchor"></span></p>
<span id="line-29" class="anchor"></span><p>If you are pretty sure an acceptable version of Python is installed but the commands below do not work, this may be because your Python files are not in the <em>search path</em>. Correctly setting the search path is outside the scope of this document; please ask for help on your favorite Python, Linux, or Windows discussion board. <span id="line-30" class="anchor"></span></p>
<span id="line-31" class="anchor"></span><p>If you have shell access, checking if Python is working is very simple. Just type the following command, and look at the result: <span id="line-32" class="anchor"></span>
<span id="line-33" class="anchor"></span></p>
<pre>
&gt; python -V
<span id="line-34" class="anchor"></span>Python 2.3.4
<span id="line-35" class="anchor"></span></pre>
<span id="line-36" class="anchor"></span><span id="line-37" class="anchor"></span><p>If you don't have shell access, you can try using this <tt>pythontest.cgi</tt> script (it assumes that you are using a Linux kind of webserver). Upload the script to your <tt>cgi-bin</tt> directory, use <tt>chmod&nbsp;a+rx&nbsp;pythontest.cgi</tt> (or a similar command in your FTP program) to make it executable, and invoke it using your web browser. <span id="line-38" class="anchor"></span>
<span id="line-39" class="anchor"></span></p>
<pre>
#!/bin/sh
<span id="line-40" class="anchor"></span>echo Content-Type: text/plain
<span id="line-41" class="anchor"></span>echo
<span id="line-42" class="anchor"></span>echo "Your web server is running as:"
<span id="line-43" class="anchor"></span>id
<span id="line-44" class="anchor"></span>echo "CGI scripts work"
<span id="line-45" class="anchor"></span>echo "Now we try to invoke Python interpreters and get their versions:"
<span id="line-46" class="anchor"></span>python -V 2&gt;&amp;1
<span id="line-47" class="anchor"></span>python2.3 -V 2&gt;&amp;1
<span id="line-48" class="anchor"></span>python2.4 -V 2&gt;&amp;1
<span id="line-49" class="anchor"></span>echo "Finished."
<span id="line-50" class="anchor"></span></pre>
<span id="line-51" class="anchor"></span><span id="line-52" class="anchor"></span><p>If it doesn't display "CGI scripts work", well, then CGI scripts don't work. If it doesn't show one or more Python version numbers, then Python is not correctly installed. In both cases, before you can proceed, you will have to get in touch with the administrator of the server so that the problems get corrected. <span id="line-53" class="anchor"></span></p>
<span id="line-54" class="anchor"></span><p>Also be sure to read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinuxFtp">../ApacheOnLinuxFtp</a> after you've completed the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> illustrated here. <span id="line-55" class="anchor"></span></p>
<span id="line-56" class="anchor"></span>
<h1 id="head-119b1acf8110bb618e4f366c3d1f8a35ad625f75">Download MoinMoin</h1>

<span id="line-57" class="anchor"></span><span id="line-58" class="anchor"></span><p>To download the distribution archive, go to the <a class="external" href="http://sourceforge.net/project/showfiles.php?group_id=8482">download area</a> and fetch the latest archive. <span id="line-59" class="anchor"></span></p>
<span id="line-60" class="anchor"></span><p>The next step is to unpack the distribution archive (which you have done already if you are reading this text from your hard drive). If you read this on the web, the distribution comes in a versioned <tt>.tar.gz</tt> archive, which you can unpack as shown below. <span id="line-61" class="anchor"></span></p>
<span id="line-62" class="anchor"></span><ul>
<li><p>On Windows <span id="line-63" class="anchor"></span></p>
<ul>
<li><p>You can use recent versions of programs like Win<tt></tt>Zip, Win<tt></tt>Rar, and Win<tt></tt>Ace, which handle .tar.gz kind of archives. <span id="line-64" class="anchor"></span></p>
</li>
<li><p>At the command prompt, you can use <a class="external" href="http://gnuwin32.sourceforge.net/packages/gzip.htm">GNU gzip</a> and <a class="external" href="http://gnuwin32.sourceforge.net/packages/tar.htm">GNU tar</a> for Windows. <span id="line-65" class="anchor"></span></p>
</li>
</ul>
</li>
<li><p>On Linux <span id="line-66" class="anchor"></span></p>
<ul>
<li><p>You can use your favorite file manager -- it should be able to unpack them. <span id="line-67" class="anchor"></span></p>
</li>
<li><p>At any shell prompt, you can use the <tt>tar</tt> command. <span id="line-68" class="anchor"></span></p>
<span id="line-69" class="anchor"></span></li>
</ul>
</li>
</ul>
<p>The distribution archive will always unpack into a directory named <tt>moin-&lt;version&gt;</tt>, for example <tt>moin-1.5</tt>. <span id="line-70" class="anchor"></span></p>
<span id="line-71" class="anchor"></span><p>Here is how you would unpack the archive (using GNU tar) and enter the directory with the Moin<tt></tt>Moin files: <span id="line-72" class="anchor"></span>
<span id="line-73" class="anchor"></span></p>
<pre>
&gt; tar xzf moin-1.5.0.tar.gz
<span id="line-74" class="anchor"></span>&gt; cd moin-1.5.0
<span id="line-75" class="anchor"></span></pre>
<span id="line-76" class="anchor"></span><span id="line-77" class="anchor"></span>
<h1 id="head-a84e58c8b4256bd645b9c47b5a900219a356259f">Install MoinMoin</h1>

<span id="line-78" class="anchor"></span><span id="line-79" class="anchor"></span><p>You can install Moin<tt></tt>Moin to either: <span id="line-80" class="anchor"></span></p>
<ul>
<li><p>a system location (if you have the necessary rights to do that -- on Linux you need to be root) <span id="line-81" class="anchor"></span></p>
</li>
<li><p>some specific location, like your home directory (Linux) or <tt>C:\moin</tt> (Windows). <span id="line-82" class="anchor"></span></p>
<span id="line-83" class="anchor"></span></li>
</ul>
<p>The installation to a system location is easier, so choose that if possible. <span id="line-84" class="anchor"></span></p>
<span id="line-85" class="anchor"></span><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> If you have several versions of Python installed, please use the same version for setup and for running the wiki. Usually, the latest Python version will get the best results. <span id="line-86" class="anchor"></span></p>
<span id="line-87" class="anchor"></span><p>If you have problems with the <tt>setup.py</tt> install step, try using the command: <span id="line-88" class="anchor"></span>
<span id="line-89" class="anchor"></span></p>
<pre>
&gt; python -v setup.py --quiet install --record=install.log
<span id="line-90" class="anchor"></span></pre>
<span id="line-91" class="anchor"></span><span id="line-92" class="anchor"></span><p>The additional <tt>-v</tt> flag should provide you detailed verbose messages every step of the way. <span id="line-93" class="anchor"></span></p>
<span id="line-94" class="anchor"></span><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> On Linux, if u get an error like <tt>Invalid&nbsp;Python&nbsp;installation:&nbsp;cannot&nbsp;find&nbsp;/usr/lib/Python2.x/config/Makefile</tt>, you may not have the python module <strong><tt>distutils</tt></strong> installed, it's usually a part of the <strong>Python development libarary (<tt>python-dev</tt>)</strong>. Some Linux distributions may not have installed it by default. For example, on Mandrake you need to install the <strong><tt>python-devel</tt></strong> package, on Debian it's called <strong><tt>python-dev</tt></strong>. <span id="line-95" class="anchor"></span></p>
<span id="line-96" class="anchor"></span>
<h2 id="head-640b21abea127e7ac4b48c938607c233b7119bd5">Installing in the default system location</h2>

<span id="line-97" class="anchor"></span><span id="line-98" class="anchor"></span>
<span id="line-99" class="anchor"></span><pre>
&gt; python setup.py --quiet install --record=install.log
<span id="line-100" class="anchor"></span></pre>
<span id="line-101" class="anchor"></span><span id="line-102" class="anchor"></span><p>This installs Moin<tt></tt>Moin to the default system location (typically the Python directory, for example on Linux, inside <tt>/usr/lib</tt> and <tt>/usr/share</tt>). Look at the <tt>install.log</tt> file to see what was installed, and where. <span id="line-103" class="anchor"></span></p>
<span id="line-104" class="anchor"></span><ul>
<li><p>Mac OS X note: use the command: <span id="line-105" class="anchor"></span>
<span id="line-106" class="anchor"></span></p>
<pre>
python setup.py install --install-data='/usr/local'
<span id="line-107" class="anchor"></span></pre>
<span id="line-108" class="anchor"></span><p>This will install the shared files to '/usr/local/share/moin', instead of an inconvenient location in the System folder. <span id="line-109" class="anchor"></span></p>
<span id="line-110" class="anchor"></span></li>
</ul>

<h2 id="head-ae8ab55eb5e8c11d4fd1eb06e12d69f1b33d411b">Installing in the home directory or another specific location</h2>

<span id="line-111" class="anchor"></span><span id="line-112" class="anchor"></span><p>Linux example, installing in the home directory: <span id="line-113" class="anchor"></span>
<span id="line-114" class="anchor"></span></p>
<pre>
&gt; python setup.py --quiet install --prefix=$HOME --record=install.log
<span id="line-115" class="anchor"></span></pre>
<span id="line-116" class="anchor"></span><span id="line-117" class="anchor"></span><p>Windows example, installing in the <tt>C:\moin</tt> directory: <span id="line-118" class="anchor"></span>
<span id="line-119" class="anchor"></span></p>
<pre>
&gt; python setup.py --quiet install --prefix="C:\moin" --record=install.log
<span id="line-120" class="anchor"></span></pre>
<span id="line-121" class="anchor"></span><span id="line-122" class="anchor"></span><p>All Moin<tt></tt>Moin files will then be installed inside those directories, see <tt>install.log</tt> to know which files were installed, and where. <span id="line-123" class="anchor"></span></p>
<span id="line-124" class="anchor"></span><p><strong>Note:</strong> You will likely see the following warning: <span id="line-125" class="anchor"></span></p>
<span id="line-126" class="anchor"></span><ul>
<li style="list-style-type:none"><p><tt>warning:&nbsp;install:&nbsp;modules&nbsp;installed&nbsp;to&nbsp;'C:\moin\',&nbsp;which</tt><br>
 <span id="line-127" class="anchor"></span><tt>is&nbsp;not&nbsp;in&nbsp;Python's&nbsp;module&nbsp;search&nbsp;path&nbsp;(sys.path)&nbsp;--&nbsp;you'll</tt><br>
 <span id="line-128" class="anchor"></span><tt>have&nbsp;to&nbsp;change&nbsp;the&nbsp;search&nbsp;path&nbsp;yourself</tt> <span id="line-129" class="anchor"></span></p>
<span id="line-130" class="anchor"></span></li>
</ul>
<p>This means exactly what it says, you need to add your install directory to the search path of Python, or it won't find the Moin<tt></tt>Moin code. <span id="line-131" class="anchor"></span></p>
<span id="line-132" class="anchor"></span><p>For example, if you are running using a webserver and standard CGI, edit <tt>moin.cgi</tt> and add your installation directory to the Python path, like this: <span id="line-133" class="anchor"></span>
<span id="line-134" class="anchor"></span></p>
<pre>
import sys
<span id="line-135" class="anchor"></span>sys.path.insert(0, 'C:/moin')
<span id="line-136" class="anchor"></span></pre>
<span id="line-137" class="anchor"></span><span id="line-138" class="anchor"></span>
<h1 id="head-d7d600c8dcfdd9270f4a6642566404ede510f46a">Test installation</h1>

<span id="line-139" class="anchor"></span><span id="line-140" class="anchor"></span><p>As a final step, if you have access to the shell or the command prompt, you can check that everything is correctly installed and ready to run. Start Python and type <tt>import&nbsp;MoinMoin</tt>. Nothing should be displayed in response to this command. Example: <span id="line-141" class="anchor"></span></p>
<span id="line-142" class="anchor"></span>
<span id="line-143" class="anchor"></span><pre>
&gt; python
<span id="line-144" class="anchor"></span>Python 2.3.4 (#1, May 29 2004, 17:05:23)
<span id="line-145" class="anchor"></span>[GCC 3.3.3] on linux2
<span id="line-146" class="anchor"></span>Type "help", "copyright", "credits" or "license" for more information.
<span id="line-147" class="anchor"></span>&gt;&gt;&gt; import MoinMoin
<span id="line-148" class="anchor"></span>&gt;&gt;&gt;
<span id="line-149" class="anchor"></span></pre>
<span id="line-150" class="anchor"></span><span id="line-151" class="anchor"></span><p>If you get this instead: <span id="line-152" class="anchor"></span></p>
<span id="line-153" class="anchor"></span>
<span id="line-154" class="anchor"></span><pre>
&gt;&gt;&gt; import MoinMoin
<span id="line-155" class="anchor"></span>Traceback (most recent call last):
<span id="line-156" class="anchor"></span>  File "&lt;stdin&gt;", line 1, in ?
<span id="line-157" class="anchor"></span>ImportError: No module named MoinMoin
<span id="line-158" class="anchor"></span>&gt;&gt;&gt;
<span id="line-159" class="anchor"></span></pre>
<span id="line-160" class="anchor"></span><span id="line-161" class="anchor"></span><p>then you have to tune your installation. Try modifying <tt>sys.path</tt>, as described above. <span id="line-162" class="anchor"></span></p>
<span id="line-163" class="anchor"></span>
<h1 id="head-87a60f1d02c36fb1804b442815dba49cbc8adfe7">What has been installed</h1>

<span id="line-164" class="anchor"></span><span id="line-165" class="anchor"></span><p>So, you have a ready-to-work Moin<tt></tt>Moin installation now. Congratulations! Before you go on to configuring it, take a look at the various files and directories that have been installed. <span id="line-166" class="anchor"></span></p>
<span id="line-167" class="anchor"></span><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> It is important that you understand the different locations used in a Moin<tt></tt>Moin setup, so read this carefully. <span id="line-168" class="anchor"></span></p>
<span id="line-169" class="anchor"></span><p>In the following descriptions, <tt>PREFIX</tt> is what you used with the <tt>setup.py</tt> command, or a default location if you didn't use the <tt>--prefix</tt> option. (Typical default values on Linux are <tt>/usr</tt> and <tt>/usr/local</tt>.) <tt>X.Y</tt> is the version of Python. Typically, this is <tt>2.3</tt> or <tt>2.4</tt>. <span id="line-170" class="anchor"></span></p>
<span id="line-171" class="anchor"></span><p>Look into <tt>install.log</tt> to find out about following important locations: <span id="line-172" class="anchor"></span></p>
<span id="line-173" class="anchor"></span><ul>
<li><p><strong><tt>MoinMoin</tt> directory</strong>, usually <tt>PREFIX/lib/pythonX.Y/site-packages/MoinMoin</tt> -- this is where the Moin<tt></tt>Moin <strong>source code</strong> is located <span id="line-174" class="anchor"></span></p>
</li>
<li><p><strong><tt>share</tt> directory</strong>, usually <tt>PREFIX/share/moin</tt> - this is where the <em>templates</em> are located <span id="line-175" class="anchor"></span></p>
<ul>
<li><p><strong><tt>data</tt></strong> directory (wiki pages, users, etc.) - only Moin<tt></tt>Moin should access this <span id="line-176" class="anchor"></span></p>
</li>
<li><p><strong><tt>underlay</tt></strong> directory (wiki pages) - only Moin<tt></tt>Moin should access this <span id="line-177" class="anchor"></span></p>
</li>
<li><p><strong><tt>htdocs</tt></strong> directory with html support files (images for the various themes, etc.) - the web server will need to access this <span id="line-178" class="anchor"></span></p>
</li>
<li><p><strong><tt>server</tt></strong> - Moin<tt></tt>Moin example startup files (like <tt>moin.cgi</tt> for CGI, and other files for other startup methods) <span id="line-179" class="anchor"></span></p>
</li>
<li><p><strong><tt>config</tt></strong> - Moin<tt></tt>Moin example configuration files (like <tt>wikiconfig.py</tt>) <span id="line-180" class="anchor"></span></p>
</li>
</ul>
</li>
<li><p><strong><tt>bin</tt></strong> directory with some scripts that help you use the Moin<tt></tt>Moin shell commands <span id="line-181" class="anchor"></span></p>
<span id="line-182" class="anchor"></span></li>
</ul>
<p>We talk of <em>templates</em> in the <tt>share</tt> directory because you usually will not use those files at that location, but copy them elsewhere when you need them. This way, you can set-up several wikis without problems, and easily upgrade to new Moin<tt></tt>Moin versions. <span id="line-183" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/BasicInstallation" class="anchor"></span>
</div>
 <span id="line-50" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-51" class="anchor"></span><span id="wikiinstance-creation" class="anchor"></span> <span id="line-52" class="anchor"></span><div lang="en" id="Include_HelpOnInstalling/WikiInstanceCreation" dir="ltr">
<span id="top_Include_HelpOnInstalling/WikiInstanceCreation" class="anchor"></span><span id="line-10" class="anchor"></span><span id="line-11" class="anchor"></span><p>After you have downloaded and installed Moin<tt></tt>Moin, you will want to "have a wiki". As explained at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>, you have to copy several directories and files. This way, you can have as many wikis as you want, and you can easily upgrade Moin<tt></tt>Moin: only the original files will be overwritten, not your copies. <span id="line-12" class="anchor"></span></p>
<span id="line-13" class="anchor"></span><p>Every time you copy those files (and modify the configuration of your server accordingly), you create what is called a <em>wiki instance</em>. Each wiki instance is independant from the others, with a different configuration, different pages, different users, etc. <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><p>Some of the steps you need to take depend on which web server and which operating system you use. They are described on dedicated pages, which you should read (at least the beginning) before reading this one. Some other steps are common to every webserver and operating system (copying files around, setting permissions), and this is what is described here. <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span>
<h1 id="head-8c227c275465dec3f8e3b326d53f9566727c5648">Read this first</h1>

<span id="line-18" class="anchor"></span><span id="line-19" class="anchor"></span>
<h2 id="head-6e91ed0b234e903763a945b5249e7de8b726e5d7">Security warnings</h2>

<span id="line-20" class="anchor"></span><span id="line-21" class="anchor"></span><div>
<table style="color: red">
<tr>
<td>
<p> <img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> <strong>Warning: make sure that your <tt>data</tt> directory and your configuration files are not accessible through your web server. Do not put your wiki directory in <tt>public_html</tt>, <tt>Sites</tt> or any other directory your web server can access. The web server only needs to access the file in the <tt>htdocs</tt> directory and the <tt>moin.cgi</tt> script! (Or whatever script your server uses to start Moin<tt></tt>Moin.)</strong> </p>
</td>
</tr>
<span id="line-22" class="anchor"></span></table>
</div>
<span id="line-23" class="anchor"></span><div>
<table style="color: red">
<tr>
<td>
<p> <img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> <strong>Warning: make sure that the <tt>data</tt> directory and its subdirectories are not readable and not writeable by users other than the web server user. If you need to give worldwide read-write permissions to get it working, be aware that you are doing a very unsecure setup, that can be compromised by any other user or program on your computer.</strong> </p>
</td>
</tr>
<span id="line-24" class="anchor"></span></table>
</div>
<span id="line-25" class="anchor"></span>
<h2 id="head-942d29849126a576afcc19bdbfd59c661739eb55">Note to Windows users</h2>

<span id="line-26" class="anchor"></span><span id="line-27" class="anchor"></span><p>All the commands below are Linux commands. The text descriptions that introduce them should be enough to help you understand what you need to do. Use the Windows Explorer, or the appropriate text-mode commands. <span id="line-28" class="anchor"></span></p>
<span id="line-29" class="anchor"></span>
<h1 id="head-66ec28f32e6870e96f6062a4a6ac77bbb4606109">Choose a wiki name</h1>

<span id="line-30" class="anchor"></span><span id="line-31" class="anchor"></span><p>Choose a unique name for the new wiki instance you want to create. It should be a short word, something that reflects what you intend to use the wiki for, like the name of your organization, of your team, of the project you are working on, etc. <span id="line-32" class="anchor"></span></p>
<span id="line-33" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/attention.png" alt="&lt;!&gt;" height="15" width="15"> <strong>Do not use the name "wiki" - it is reserved for internal use. You would need a special setup to use this with CGI, and you can't use it at all with standalone or twisted server.</strong> <span id="line-34" class="anchor"></span></p>
<span id="line-35" class="anchor"></span></li>
</ul>
<p>The name "<tt>mywiki</tt>" is used as an example in the various commands below. <span id="line-36" class="anchor"></span></p>
<span id="line-37" class="anchor"></span>
<h1 id="head-379ea73c819b2c729ba9c2432b8a4c4b4c524f71">Choose a location</h1>

<span id="line-38" class="anchor"></span><span id="line-39" class="anchor"></span><p>Choose a directory on your disk, it will contain all the files needed for your wiki instance. At the beginning, your wiki instance will use approximately 10 MB of disk space. Then of course, it will grow depending on the way your wiki is used. A personal wiki, even with many pages, might only use 30 MB or 40 MB of disk space. A popular wiki, or a wiki with many files attached to the pages, might use much more, of course. <span id="line-40" class="anchor"></span></p>
<span id="line-41" class="anchor"></span><p>If you are the administrator (or root) of the server, you can use anything you like or that makes sense to you, for example <tt>/usr/local/var/moin</tt>, <tt>/mnt/wikis</tt>, etc. <span id="line-42" class="anchor"></span></p>
<span id="line-43" class="anchor"></span><p>If you are a simple user, you will probably only be allowed to write in your personal, "home" directory. Choose a subdirectory that makes sense to you, for example the <tt>share/moin</tt> subdirectory. <span id="line-44" class="anchor"></span></p>
<span id="line-45" class="anchor"></span>
<h1 id="head-951584cdd82db21218fc2ffd3945de602f8275c0">Collect some important information</h1>

<span id="line-46" class="anchor"></span><span id="line-47" class="anchor"></span><p>This is where the instructions differ according to the web server and operating system you use, and whether you are the administrator or a simple user. See the appropriate pages for your web server and operating system combination. <span id="line-48" class="anchor"></span></p>
<span id="line-49" class="anchor"></span><p>On Linux, the <tt>export</tt> command will be used to remember the collected information. Windows users should write it down carefully (maybe cutting-and-pasting in a Notepad window), or store it in environment variables if they use the command prompt. <span id="line-50" class="anchor"></span></p>
<span id="line-51" class="anchor"></span><ul>
<li><p><tt>PREFIX</tt> is the prefix you used during the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span id="line-52" class="anchor"></span></p>
</li>
<li><p><tt>SHARE</tt> is the name of the <tt>share</tt> directory, as discussed at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span id="line-53" class="anchor"></span></p>
</li>
<li><p><tt>WIKILOCATION</tt> is the name of the directory that will contain your wiki instance <span id="line-54" class="anchor"></span></p>
<span id="line-55" class="anchor"></span></li>
</ul>
<p>If you are an administrator, you also need to collect the following: <span id="line-56" class="anchor"></span></p>
<span id="line-57" class="anchor"></span><ul>
<li><p><tt>USER</tt> is the user name of the web server <span id="line-58" class="anchor"></span></p>
</li>
<li><p><tt>GROUP</tt> is the name of the group to which the web server belongs <span id="line-59" class="anchor"></span></p>
<span id="line-60" class="anchor"></span></li>
</ul>
<p>Now, Linux folks, let's store these settings in memory: <span id="line-61" class="anchor"></span>
<span id="line-62" class="anchor"></span></p>
<pre>
&gt; export PREFIX=/usr                # this might be something else
<span id="line-63" class="anchor"></span>&gt; export SHARE=$PREFIX/share/moin   # this should be correct for most people
<span id="line-64" class="anchor"></span>&gt; export WIKILOCATION=$SHARE        # this is just an example
<span id="line-65" class="anchor"></span>&gt; export INSTANCE=mywiki            # this is just an example
<span id="line-66" class="anchor"></span></pre>
<span id="line-67" class="anchor"></span><span id="line-68" class="anchor"></span><p>Administrators also need the following two lines: <span id="line-69" class="anchor"></span></p>
<span id="line-70" class="anchor"></span>
<span id="line-71" class="anchor"></span><pre>
&gt; export USER=www-data              # this is just an example
<span id="line-72" class="anchor"></span>&gt; export GROUP=www-data             # this is just an example
<span id="line-73" class="anchor"></span></pre>
<span id="line-74" class="anchor"></span><span id="line-75" class="anchor"></span>
<h1 id="head-c3fc33e072973371ea739841440fb52175ddb9f6">Copy the files</h1>

<span id="line-76" class="anchor"></span><span id="line-77" class="anchor"></span><p>To create your new instance, you first need to create a directory named like your instance, inside the <tt>WIKILOCATION</tt>. Then you need to copy the <tt>data</tt> and <tt>underlay</tt> directories from your <tt>SHARE</tt> directory into your instance directory. Finally, you need to copy the <tt>wikiconfig.py</tt> file from the <tt>config</tt> directory into the instance directory. <span id="line-78" class="anchor"></span></p>
<span id="line-79" class="anchor"></span><p>Linux folks need just type these commands: <span id="line-80" class="anchor"></span>
<span id="line-81" class="anchor"></span></p>
<pre>
&gt; cd $WIKILOCATION
<span id="line-82" class="anchor"></span>&gt; mkdir $INSTANCE                   # make a directory for this instance
<span id="line-83" class="anchor"></span>&gt; cp -R $SHARE/data $INSTANCE       # copy template data directory
<span id="line-84" class="anchor"></span>&gt; cp -R $SHARE/underlay $INSTANCE   # copy underlay data directory
<span id="line-85" class="anchor"></span>&gt; cp $SHARE/config/wikiconfig.py $INSTANCE   # copy wiki configuration sample file
<span id="line-86" class="anchor"></span></pre>
<span id="line-87" class="anchor"></span><span id="line-88" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> Note that you just need to keep one underlay directory on your system if you are running multiple wikis (e.g. in a farm.) <span id="line-89" class="anchor"></span></p>
<span id="line-90" class="anchor"></span></li>
</ul>

<h1 id="head-027e3666aea4dc02569ad386901ae9456bad5ae1">Set permissions</h1>

<span id="line-91" class="anchor"></span><span id="line-92" class="anchor"></span>
<h2 id="head-3b8b040007c209e4621b176c8724b3bbcb755957">Administrators</h2>

<span id="line-93" class="anchor"></span><span id="line-94" class="anchor"></span><p>Administrators need to restrict the permissions of the files, so that only the web server (and the administrator of course) can read and write them. For maximum security, no other user on the machine should be able to read or write anything in the wiki instance directory. Don't forget that this directory contains sensitive information, notably the (encrypted) passwords of the wiki users. <span id="line-95" class="anchor"></span></p>
<span id="line-96" class="anchor"></span><p>On Linux, the following commands should be enough: <span id="line-97" class="anchor"></span>
<span id="line-98" class="anchor"></span></p>
<pre>
&gt; chown -R $USER.$GROUP $INSTANCE   # check that USER and GROUP are correct
<span id="line-99" class="anchor"></span>&gt; chmod -R ug+rwX $INSTANCE         # USER.GROUP may read and write
<span id="line-100" class="anchor"></span>&gt; chmod -R o-rwx $INSTANCE          # everybody else is rejected
<span id="line-101" class="anchor"></span></pre>
<span id="line-102" class="anchor"></span><span id="line-103" class="anchor"></span>
<h2 id="head-19c5987edf26a8517fbf6cbee5ba5dd5f36ec280">Normal users</h2>

<span id="line-104" class="anchor"></span><span id="line-105" class="anchor"></span><p>Normal users, on the contrary, need to broaden the permissions of the files, so that the web server can read and write them. On recent Windows versions, and on some versions of Unix, Linux and other systems, <em>access control lists</em> can be used to that effect. They are, however, powerful and complicated, much beyond the scope of this document. Ask a knowledgeable person about them. <span id="line-106" class="anchor"></span></p>
<span id="line-107" class="anchor"></span><p>Without them, normal users have to allow <em>everybody</em> to access the instance directory. This is the only way the web server can enter it and do its work. This is, of course, <strong>VERY INSECURE</strong>, since any other user and program on the server can read the directory. You should <strong>not</strong> use such a setup for a wiki open to the public. <span id="line-108" class="anchor"></span></p>
<span id="line-109" class="anchor"></span><p>On Linux, the following commands will open the instance directory to the whole world: <span id="line-110" class="anchor"></span>
<span id="line-111" class="anchor"></span></p>
<pre>
&gt; chmod -R a+rwX $INSTANCE
<span id="line-112" class="anchor"></span></pre>
<span id="line-113" class="anchor"></span><span id="line-114" class="anchor"></span><p><strong>Note:</strong> <span id="line-115" class="anchor"></span></p>
<ul>
<li><p>it is also possible to put the web server and the normal user in the same <em>group</em>, and then only open the instance directory to the members of that group. This is a bit more secure (depending on who else is in the group), but you need the cooperation of the server administrator; he is the one setting up groups. <span id="line-116" class="anchor"></span></p>
</li>
<li><p>the best other possibility is that the server administrator sets up <tt>suexec</tt> to execute CGI scripts in user directories under the user id of that user. You don't need to give world permissions that way, so it is a quite secure setup, but you also need cooperation of the administrator. <span id="line-117" class="anchor"></span></p>
<span id="line-118" class="anchor"></span><span id="line-119" class="anchor"></span></li>
</ul>

<h1 id="head-442871161f523855f2162b426248f0bb0523c289">Tune configuration</h1>

<span id="line-120" class="anchor"></span><span id="line-121" class="anchor"></span><p>Now, you need to tune the configuration of your web server and of your wiki instance. Look at the appropriate help page for your web server, then come back here to tune the settings of your wiki instance. <span id="line-122" class="anchor"></span></p>
<span id="line-123" class="anchor"></span><p>Edit <tt>wikiconfig.py</tt>. The default settings should work fine in most cases, but there are some things that you will probably want to change, like the name and logo of your wiki! <img src="wiki/htdocs/modern/img/smile.png" alt=":)" height="15" width="15"> Read the comments inside <tt>wikiconfig.py</tt>, they will guide you through this process.  (Start with "Wiki identity", around line 25.) <span id="line-124" class="anchor"></span></p>
<span id="line-125" class="anchor"></span><p><a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a> contains all the details about all the options, in case the comments in <tt>wikiconfig.py</tt> are not enough. <span id="line-126" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/WikiInstanceCreation" class="anchor"></span>
</div>
 <span id="line-53" class="anchor"></span></p>
<hr class="hr1">
<p> <span id="line-54" class="anchor"></span><span id="linuxapache-install" class="anchor"></span> <span id="line-55" class="anchor"></span>
<h1>Linux Installation using Apache</h1>

<div lang="en" id="Include_HelpOnInstalling/ApacheOnLinux" dir="ltr">
<span id="top_Include_HelpOnInstalling/ApacheOnLinux" class="anchor"></span><span id="line-11" class="anchor"></span><p>This page describes the particular steps that need to be taken to create a wiki instance using <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> on Linux with the Apache web server. <strong>You should have already performed the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>. </strong>Installations on other Unices like FreeBSD are very similar. <span id="line-12" class="anchor"></span></p>
<span id="line-13" class="anchor"></span><p>Two scenarios are possible. You might be the administrator (root) of the server, able to install and modify files almost anywhere on the machine, and notably able to modifiy the Apache configuration. You might also be a simple user, only able to write files into your home directory, and unable to alter the master Apache config file. The two scenarios are discussed below. <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><p><strong>Table of contents</strong> <ol>
<li><a href="#head-5a61f5b0107edba120089e4251cd633be60b6e15">Administrator (root)</a><ol>
<li><a href="#head-c27688fbe7f65d67190a47ce8d32eba244ab0d01">Create a wiki instance</a></li>
<li><a href="#head-e3e9e08058bb0ae34c33f53367cd58d6c7411998">Install moin.cgi</a></li>
<li><a href="#head-408a7a283b2406c4e6b24646b25ec7996d5ff459">Configure moin.cgi</a></li>
<li><a href="#head-b02e2f66403a66cc3b1ff0ce2c7261cf44e4f0d4">Configure Apache</a></li>
<li><a href="#head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86">Configure MoinMoin</a></li>
<li><a href="#head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3">Test the wiki</a></li>
<li><a href="#head-52920da3312438e6a484347d4dfaa369b86cb521">Apache tricks</a></li>
</ol>
<li><a href="#head-e559f024646d8751eee1135ad5423247d72ab7fd">Simple user (home directory installation)</a><ol>
<li><a href="#head-6a39e2829f37fd34c569c2ffa768c9b3ec2289cc">Make sure /~username works</a></li>
<li><a href="#head-c27688fbe7f65d67190a47ce8d32eba244ab0d01-2">Create a wiki instance</a></li>
<li><a href="#head-ec9ce458a3f08281e5906f6d1e2e5cc008d620db">Install the htdocs files</a></li>
<li><a href="#head-e3e9e08058bb0ae34c33f53367cd58d6c7411998-2">Install moin.cgi</a></li>
<li><a href="#head-408a7a283b2406c4e6b24646b25ec7996d5ff459-2">Configure moin.cgi</a></li>
<li><a href="#head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86-2">Configure MoinMoin</a></li>
<li><a href="#head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3-2">Test the wiki</a></li>
</ol>
<li><a href="#head-3f286acb05ce4ad64240f788c78a8f915f59e34e">Troubleshooting</a><ol>
<li><a href="#head-b8c0d1c1aba9cd39d0d15f86ea33025f7f25d48d">Adding permission to serve the htdocs directory</a></li>
</ol>
</li>
</ol>
 <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span>
<h2 id="head-5a61f5b0107edba120089e4251cd633be60b6e15">Administrator (root)</h2>

<span id="line-18" class="anchor"></span><p>Most GNU/Linux distributions come with Apache pre-installed. There is, however, some variation as to where exactly the various Apache files are located. You should consult your distribution manual, or ask on the appropriate discussion board. In the following paragraphs, we assume a (quite standard) file system layout with: <span id="line-19" class="anchor"></span></p>
<span id="line-20" class="anchor"></span><ul>
<li><p><tt>/etc/httpd/httpd.conf</tt> - the main Apache configuration file <span id="line-21" class="anchor"></span></p>
</li>
<li><p><tt>/var/log/httpd/error_log</tt> - the log file containing Apache error messages <span id="line-22" class="anchor"></span></p>
<span id="line-23" class="anchor"></span></li>
</ul>
<p>Some distributions use <tt>apache</tt> instead of <tt>httpd</tt> for the directory names, others may use weirder settings. <span id="line-24" class="anchor"></span></p>
<span id="line-25" class="anchor"></span>
<h3 id="head-c27688fbe7f65d67190a47ce8d32eba244ab0d01">Create a wiki instance</h3>

<span id="line-26" class="anchor"></span><p>Creating a wiki instance involves copying files around and setting appropriate permissions. Before you can proceed, you need to know what user and group your Apache server runs as. The easiest way to know this is to issue this command: <span id="line-27" class="anchor"></span></p>
<span id="line-28" class="anchor"></span>
<span id="line-29" class="anchor"></span><pre>
&gt; egrep "^User|^Group" /etc/httpd/httpd.conf
<span id="line-30" class="anchor"></span>User wwwrun
<span id="line-31" class="anchor"></span>Group nogroup
<span id="line-32" class="anchor"></span></pre>
<span id="line-33" class="anchor"></span><span id="line-34" class="anchor"></span><p>This shows a typical result: "<tt>wwwrun.nogroup</tt>". Other common results are "<tt>nobody.nogroup</tt>", "<tt>apache.apache</tt>" and "<tt>www-data.www-data</tt>". You can of course use your own. What matters is that you know which ones are in use, because you will need them to set file permissions. <span id="line-35" class="anchor"></span></p>
<span id="line-36" class="anchor"></span><p>Once you have gathered this information, read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> and follow the steps described there. <span id="line-37" class="anchor"></span></p>
<span id="line-38" class="anchor"></span>
<h3 id="head-e3e9e08058bb0ae34c33f53367cd58d6c7411998">Install moin.cgi</h3>

<span id="line-39" class="anchor"></span><p>There is one last file you need to copy, the bridge between Apache and Moin<tt></tt>Moin: the CGI script that Apache will call every time a wiki page is requested, and that will in turn invoke all the Moin<tt></tt>Moin components to handle the request. You can actually put this script anywhere you like (all the paths to the files Moin<tt></tt>Moin needs can be configured to match your filesystem layout), but for the sake of simplicity and security, we suggest you follow the instructions below, unless you think you know better. <span id="line-40" class="anchor"></span></p>
<span id="line-41" class="anchor"></span><p>We will create a <tt>cgi-bin</tt> subdirectory in the instance directory. Using the environment variables defined in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>, run the following commands: <span id="line-42" class="anchor"></span></p>
<span id="line-43" class="anchor"></span>
<span id="line-44" class="anchor"></span><pre>
&gt; cd $WIKILOCATION/$INSTANCE
<span id="line-45" class="anchor"></span>&gt; mkdir cgi-bin
<span id="line-46" class="anchor"></span>&gt; cp $SHARE/server/moin.cgi cgi-bin
<span id="line-47" class="anchor"></span>&gt; chown -R $USER.$GROUP cgi-bin
<span id="line-48" class="anchor"></span>&gt; chmod -R ug+rx cgi-bin
<span id="line-49" class="anchor"></span>&gt; chmod -R o-rwx cgi-bin
<span id="line-50" class="anchor"></span></pre>
<span id="line-51" class="anchor"></span><span id="line-52" class="anchor"></span>
<h3 id="head-408a7a283b2406c4e6b24646b25ec7996d5ff459">Configure moin.cgi</h3>

<span id="line-53" class="anchor"></span><p>When <tt>moin.cgi</tt> is launched, it imports a Moin<tt></tt>Moin module that in turn imports other modules and the configuration file. While the Moin<tt></tt>Moin modules should always be found in a properly configured system (as described in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>), it is likely that the configuration file will not be found. Edit the <tt>moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span id="line-54" class="anchor"></span></p>
<span id="line-55" class="anchor"></span>
<span id="line-56" class="anchor"></span><pre>
import sys
<span id="line-57" class="anchor"></span>sys.path.insert(0, '..')
<span id="line-58" class="anchor"></span></pre>
<span id="line-59" class="anchor"></span><span id="line-60" class="anchor"></span><p>You can also use the absolute name of the directory that contains the <tt>wikiconfig.py</tt> file instead of <tt>'..'</tt>. <span id="line-61" class="anchor"></span></p>
<span id="line-62" class="anchor"></span>
<h3 id="head-b02e2f66403a66cc3b1ff0ce2c7261cf44e4f0d4">Configure Apache</h3>

<span id="line-63" class="anchor"></span><p>Now that every file is in place and properly locked down (as far as the filesystem is concerned), we need to configure Apache so that it offers access to the right files, and no others. However, since the default Apache configuration varies a lot according to the distribution you use, and since administrators often make important additions and changes to it, we cannot give exact instructions that cover all cases. Instead, we will first describe roughly what needs to be done, and then give a few specific lines that you should add at the appropriate place in your Apache config. <span id="line-64" class="anchor"></span></p>
<span id="line-65" class="anchor"></span><p>Your Apache should be set up so that: <span id="line-66" class="anchor"></span></p>
<span id="line-67" class="anchor"></span><ul>
<li><p>Access to your instance directory is denied (sane Apache installations should actually deny access to the whole server, and then only allow a few specific directories). <span id="line-68" class="anchor"></span></p>
</li>
<li><p>An alias is set up to redirect requests from <tt>/wiki/</tt> (in the URL) to the <tt>htdocs</tt> directory (in the <tt>share</tt> directory, as discussed at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>) <span id="line-69" class="anchor"></span></p>
</li>
<li><p>A script alias is set up to redirect requests from whatever you want (we suggest you use your instance name, for example <tt>/mywiki</tt>) to the CGI script you just copied. <span id="line-70" class="anchor"></span></p>
<span id="line-71" class="anchor"></span></li>
</ul>
<p>The following commands will add two lines at the bottom of your Apache config file. These lines only cover the last two items listed above. You have to check the first one by yourself (there is too much variation in Linux distributions). Note that you may have to move the two lines to the appropriate place in your config file -- maybe near other similar lines. <span id="line-72" class="anchor"></span></p>
<span id="line-73" class="anchor"></span>
<span id="line-74" class="anchor"></span><pre>
&gt; echo "" &gt;&gt;/etc/httpd/httpd.conf
<span id="line-75" class="anchor"></span>&gt; echo "Alias /wiki/ \"$SHARE/htdocs/\"" &gt;&gt;/etc/httpd/httpd.conf
<span id="line-76" class="anchor"></span>&gt; echo "ScriptAlias /mywiki \"$WIKILOCATION/$INSTANCE/cgi-bin/moin.cgi\"" &gt;&gt;/etc/httpd/httpd.conf
<span id="line-77" class="anchor"></span></pre>
<span id="line-78" class="anchor"></span><span id="line-79" class="anchor"></span><p>You only need to define the alias for <tt>htdocs</tt> once. You need to define a different script alias for each wiki instance you intend to run. <span id="line-80" class="anchor"></span></p>
<span id="line-81" class="anchor"></span>
<h3 id="head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86">Configure MoinMoin</h3>

<span id="line-82" class="anchor"></span><p>Finally, check that the <tt>wikiconfig.py</tt> file in the instance directory contains correct paths for the htdocs prefix, the instance data directory, and the instance underlay directory. You can use relative paths for the directories, but note that they are relative to the CGI script, not the configuration file! You can also use absolute paths, and save yourself some headaches. <span id="line-83" class="anchor"></span></p>
<span id="line-84" class="anchor"></span><p>Here are the settings you should have in the config file if you followed all our suggestions: <span id="line-85" class="anchor"></span></p>
<span id="line-86" class="anchor"></span>
<span id="line-87" class="anchor"></span><pre>
    data_dir = '../data/'
<span id="line-88" class="anchor"></span>    data_underlay_dir = '../underlay/'
<span id="line-89" class="anchor"></span>    url_prefix = '/wiki'
<span id="line-90" class="anchor"></span></pre>
<span id="line-91" class="anchor"></span><span id="line-92" class="anchor"></span><p>There are other settings you will likely want to alter, look at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> for more details about them. <span id="line-93" class="anchor"></span></p>
<span id="line-94" class="anchor"></span>
<h3 id="head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3">Test the wiki</h3>

<span id="line-95" class="anchor"></span><p>Everything should work fine now. It is time to <strong>restart the Apache server</strong> (usually with "<tt>/etc/init.d/apache&nbsp;restart</tt>", sometimes with "<tt>apachectl&nbsp;restart</tt>") and perform the following steps: <span id="line-96" class="anchor"></span></p>
<span id="line-97" class="anchor"></span><ul>
<li><p>Run the <em>Moin<tt></tt>Moin CGI Diagnosis</em>: connect to "<tt>http://127.0.0.1/mywiki?action=test</tt>" (or the name and port you have defined in the Apache configuration file). Verify that the displayed information is correct. Check that the directories listed under <em>Checking directories...</em> are <em>OK</em>. <span id="line-98" class="anchor"></span></p>
</li>
<li><p>Access your new wiki with the URL "<tt>http://127.0.0.1/mywiki/</tt>" (or the name and port you have defined in the Apache configuration file). You should see the Front<tt></tt>Page. <span id="line-99" class="anchor"></span></p>
</li>
<li><p>If this is the case, try to edit it and save your changes. <span id="line-100" class="anchor"></span></p>
</li>
<li><p>If that works, see if your edit is reflected on the Recent<tt></tt>Changes page. <span id="line-101" class="anchor"></span></p>
</li>
<li><p>If you see them, congratulations, your new wiki works! <img src="wiki/htdocs/modern/img/smile.png" alt=":)" height="15" width="15"> <span id="line-102" class="anchor"></span></p>
<span id="line-103" class="anchor"></span></li>
</ul>
<p>If something goes wrong, have a look at Troubleshooting, at the bottom of this page. <span id="line-104" class="anchor"></span></p>
<span id="line-105" class="anchor"></span>
<h3 id="head-52920da3312438e6a484347d4dfaa369b86cb521">Apache tricks</h3>

<span id="line-106" class="anchor"></span><p>For more advanced configuration and some tricks see <a href="http://moinmaster.wikiwikiweb.de/HelpMiscellaneous">HelpMiscellaneous</a>. <span id="line-107" class="anchor"></span></p>
<span id="line-108" class="anchor"></span>
<h2 id="head-e559f024646d8751eee1135ad5423247d72ab7fd">Simple user (home directory installation)</h2>

<span id="line-109" class="anchor"></span><p>On machines shared by many people, simple users typically have no access to the root account, cannot modify the <tt>httpd.conf</tt> file, and cannot copy files into the system-wide <tt>cgi-bin</tt> and <tt>htdocs</tt> directories. In that case, Apache can be set up so that each user can host a web site in the home directory of his or her shell account, using the <tt>UserDir</tt> directive. If the machine administrator decides to use it, all URLs that start with "<tt>/~username</tt>" will be redirected to a directory in the users' home directories, where they have write permission and can install Moin<tt></tt>Moin. <span id="line-110" class="anchor"></span></p>
<span id="line-111" class="anchor"></span><p>As an example, we will consider the case of a user named "<tt>mm</tt>". Of course, wherever you see "<tt>mm</tt>" below, you will replace it with your own username. <span id="line-112" class="anchor"></span></p>
<span id="line-113" class="anchor"></span>
<h3 id="head-6a39e2829f37fd34c569c2ffa768c9b3ec2289cc">Make sure /~username works</h3>

<span id="line-114" class="anchor"></span><p>The home directory installation can only work if the administrator (root) has allowed it. So, the first step is of course to check that it works. Typically, Apache is set up so that the <tt>public_html</tt> subdirectory in the home directory is used as the web site root. So, the first first step is to check if that directory exists. <span id="line-115" class="anchor"></span></p>
<span id="line-116" class="anchor"></span>
<span id="line-117" class="anchor"></span><pre>
&gt; ls -ld ~/public_html
<span id="line-118" class="anchor"></span>drwxr-xr-x   2 mm       users        4096 Nov 30 00:29 public_html
<span id="line-119" class="anchor"></span></pre>
<span id="line-120" class="anchor"></span><span id="line-121" class="anchor"></span><p>If the directory does not exist, create it, and be sure it can be read and entered by the web server. <span id="line-122" class="anchor"></span></p>
<span id="line-123" class="anchor"></span>
<span id="line-124" class="anchor"></span><pre>
&gt; mkdir public_html
<span id="line-125" class="anchor"></span>&gt; chmod a+rx public_html
<span id="line-126" class="anchor"></span>&gt; ls -ld ~/public_html
<span id="line-127" class="anchor"></span>drwxr-xr-x   2 mm       users        4096 Nov 30 00:35 public_html
<span id="line-128" class="anchor"></span></pre>
<span id="line-129" class="anchor"></span><span id="line-130" class="anchor"></span><p>Now, check if the "<tt>/~mm</tt>" URL works: <span id="line-131" class="anchor"></span></p>
<span id="line-132" class="anchor"></span>
<span id="line-133" class="anchor"></span><pre>
&gt; lynx -error_file=/dev/stderr -dump http://localhost/~mm/ &gt;/dev/null
<span id="line-134" class="anchor"></span>URL=http://localhost/~mm/ (GET)
<span id="line-135" class="anchor"></span>STATUS=HTTP/1.1 200 OK
<span id="line-136" class="anchor"></span></pre>
<span id="line-137" class="anchor"></span><span id="line-138" class="anchor"></span><p>If you get a "<tt>200&nbsp;OK</tt>" response code, then it works, and you can go on to the next check. If you get a "<tt>403&nbsp;Forbidden</tt>" or a "<tt>404&nbsp;Not&nbsp;Found</tt>" response, then maybe something is wrong with your directory, or maybe the whole thing has not been enabled by your administrator. <span id="line-139" class="anchor"></span></p>
<span id="line-140" class="anchor"></span><ul>
<li><p>Check the permissions for your home directory (<tt>~</tt>) and your <tt>public_html</tt> directory. The first one should at least end with "<tt>--x</tt>", and the second one, as we saw above, with "<tt>r-x</tt>". <span id="line-141" class="anchor"></span></p>
</li>
<li><p>It also possible that the administrator has set up another name for the personal web site directory. "<tt>public_html</tt>" is just the usual default, but anything can actually be used. There is no way to know, you have to ask the administrator (root). <span id="line-142" class="anchor"></span></p>
</li>
<li><p>Finally, if the personal web site feature is disabled, maybe you can ask the administrator to enable it? <span id="line-143" class="anchor"></span></p>
<span id="line-144" class="anchor"></span></li>
</ul>
<p>Once you have checked you can read the files in the directory, you need to check that you are also able to execute CGI scripts in that directory. Use the following commands to create a simple CGI script in the appropriate location: <span id="line-145" class="anchor"></span></p>
<span id="line-146" class="anchor"></span>
<span id="line-147" class="anchor"></span><pre>
&gt; mkdir -p ~/public_html/cgi-bin
<span id="line-148" class="anchor"></span>&gt; cat &gt; ~/public_html/cgi-bin/test.cgi
<span id="line-149" class="anchor"></span>#!/bin/sh
<span id="line-150" class="anchor"></span>echo Content-Type: text/plain
<span id="line-151" class="anchor"></span>echo
<span id="line-152" class="anchor"></span>echo "CGI scripts work"
<span id="line-153" class="anchor"></span>&lt;CTRL-D&gt;
<span id="line-154" class="anchor"></span>&gt; chmod a+rx ~/public_html/cgi-bin/test.cgi
<span id="line-155" class="anchor"></span>&gt; lynx -dump http://localhost/~jh/cgi-bin/test.cgi
<span id="line-156" class="anchor"></span>CGI scripts work
<span id="line-157" class="anchor"></span></pre>
<span id="line-158" class="anchor"></span><span id="line-159" class="anchor"></span><p>If you get anything else than "<tt>CGI&nbsp;scripts&nbsp;work</tt>", then something went wrong. Check the directory permissions as above, try other names (or ask about them). The sad truth might be that you are not allowed to execute CGI scripts. You would then have to ask the administrator (root) for that permission. <span id="line-160" class="anchor"></span></p>
<span id="line-161" class="anchor"></span><p>Once you get it, you can set up your wiki instance in the <tt>public_html</tt> directory. <img src="wiki/htdocs/modern/img/smile.png" alt=":)" height="15" width="15"> <span id="line-162" class="anchor"></span></p>
<span id="line-163" class="anchor"></span>
<h3 id="head-c27688fbe7f65d67190a47ce8d32eba244ab0d01-2">Create a wiki instance</h3>

<span id="line-164" class="anchor"></span><p>Creating a wiki instance involves copying files around and setting appropriate permissions. Read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> and follow the steps described there. <span id="line-165" class="anchor"></span></p>
<span id="line-166" class="anchor"></span>
<h3 id="head-ec9ce458a3f08281e5906f6d1e2e5cc008d620db">Install the htdocs files</h3>

<span id="line-167" class="anchor"></span><p>The web server needs to access these files, so we need to copy them in the "<tt>public_html</tt>" directory. Just use this: <span id="line-168" class="anchor"></span></p>
<span id="line-169" class="anchor"></span>
<span id="line-170" class="anchor"></span><pre>
&gt; cd ~/public_html
<span id="line-171" class="anchor"></span>&gt; cp -R ~/share/moin/htdocs wiki
<span id="line-172" class="anchor"></span>&gt; chmod -R a+rX wiki
<span id="line-173" class="anchor"></span></pre>
<span id="line-174" class="anchor"></span><span id="line-175" class="anchor"></span>
<h3 id="head-e3e9e08058bb0ae34c33f53367cd58d6c7411998-2">Install moin.cgi</h3>

<span id="line-176" class="anchor"></span><p>There is one last file you need to copy, the bridge between Apache and Moin<tt></tt>Moin: the CGI script that Apache will call every time a wiki page is requested, and that will in turn invoke all the Moin<tt></tt>Moin components to handle the request. You need to put this file in a directory for which CGI scripts execution is enabled. By default, this should work: <span id="line-177" class="anchor"></span></p>
<span id="line-178" class="anchor"></span>
<span id="line-179" class="anchor"></span><pre>
&gt; cd ~/public_html
<span id="line-180" class="anchor"></span>&gt; mkdir cgi-bin
<span id="line-181" class="anchor"></span>&gt; cp $SHARE/server/moin.cgi cgi-bin
<span id="line-182" class="anchor"></span>&gt; chmod -R a+rx cgi-bin
<span id="line-183" class="anchor"></span></pre>
<span id="line-184" class="anchor"></span><span id="line-185" class="anchor"></span>
<h3 id="head-408a7a283b2406c4e6b24646b25ec7996d5ff459-2">Configure moin.cgi</h3>

<span id="line-186" class="anchor"></span><p>When <tt>moin.cgi</tt> is launched, it imports a Moin<tt></tt>Moin module (that in turn imports other modules and the configuration file). Since everything has been installed in your home directory, it is likely none of these will be found. Edit the <tt>moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span id="line-187" class="anchor"></span></p>
<span id="line-188" class="anchor"></span>
<span id="line-189" class="anchor"></span><pre>
import sys
<span id="line-190" class="anchor"></span>sys.path.insert(0, '/home/mm/lib/python2.3')
<span id="line-191" class="anchor"></span>sys.path.insert(0, '/home/mm/lib/python2.3/site-packages')
<span id="line-192" class="anchor"></span>sys.path.insert(0, '/home/mm/share/moin/mywiki')
<span id="line-193" class="anchor"></span></pre>
<span id="line-194" class="anchor"></span><span id="line-195" class="anchor"></span><p>Of course, you need to adapt the paths to your situation. The first two lines should help locate the Moin<tt></tt>Moin modules, the last one should help locate the <tt>wikiconfig.py</tt> file. <span id="line-196" class="anchor"></span></p>
<span id="line-197" class="anchor"></span><p><strong>Note:</strong> You might also need to edit the first line of the file, to point to the correct version of Python. The default should be fine, but a line like "<tt>#!&nbsp;/usr/bin/python2.3</tt>" might help you if the default does not work. <span id="line-198" class="anchor"></span></p>
<span id="line-199" class="anchor"></span><p><strong>Note 2:</strong> In this file there is a line reading <tt>request&nbsp;=&nbsp;RequestCGI()</tt>. If you have a complex mod_rewrite case, you might want to add <tt>properties&nbsp;=&nbsp;{'script_name':&nbsp;'/mywiki'}&nbsp;</tt> in the parenthesis. This will let <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> generate URLs that start with <tt>/mywiki</tt> and not the path that the webserver passed to <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a>. <span id="line-200" class="anchor"></span></p>
<span id="line-201" class="anchor"></span>
<h3 id="head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86-2">Configure MoinMoin</h3>

<span id="line-202" class="anchor"></span><p>Finally, check that the <tt>wikiconfig.py</tt> file in the instance directory contains correct paths for the htdocs directory, the instance data directory, and the instance underlay directory. You can use relative paths for the directories, but note that they are relative to the CGI script, not the configuration file! You can also use absolute paths, and save yourself some headaches. <span id="line-203" class="anchor"></span></p>
<span id="line-204" class="anchor"></span>
<span id="line-205" class="anchor"></span><pre>
    data_dir = '/home/mm/share/moin/mywiki/data/'
<span id="line-206" class="anchor"></span>    data_underlay_dir = '/home/mm/share/moin/mywiki/underlay/'
<span id="line-207" class="anchor"></span>    url_prefix = '/~mm/wiki'
<span id="line-208" class="anchor"></span></pre>
<span id="line-209" class="anchor"></span><span id="line-210" class="anchor"></span>
<h3 id="head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3-2">Test the wiki</h3>

<span id="line-211" class="anchor"></span><p>Everything should work fine, now. It is time to perform the following steps: <span id="line-212" class="anchor"></span></p>
<span id="line-213" class="anchor"></span><ul>
<li><p>Run the <em>Moin<tt></tt>Moin CGI Diagnosis</em>: <tt>&gt;&nbsp;lynx&nbsp;-dump&nbsp;http://localhost/~mm/cgi-bin/moin.cgi?action=test</tt> <span id="line-214" class="anchor"></span></p>
</li>
<li><p>If it worked, try to access your new-born wiki with the URL "<tt>http://127.0.0.1/~mm/cgi-bin/moin.cgi</tt>". You should see the Front<tt></tt>Page. <span id="line-215" class="anchor"></span></p>
</li>
<li><p>If this is the case, try to edit it and save your changes. <span id="line-216" class="anchor"></span></p>
</li>
<li><p>If that works, see if your edit is reflected on the Recent<tt></tt>Changes page. <span id="line-217" class="anchor"></span></p>
</li>
<li><p>If you see them, congratulations, you have a new wiki! <img src="wiki/htdocs/modern/img/smile.png" alt=":)" height="15" width="15"> <span id="line-218" class="anchor"></span></p>
<span id="line-219" class="anchor"></span></li>
</ul>
<p>If something goes wrong, have a look at Troubleshooting, below. <span id="line-220" class="anchor"></span></p>
<span id="line-221" class="anchor"></span>
<h2 id="head-3f286acb05ce4ad64240f788c78a8f915f59e34e">Troubleshooting</h2>

<span id="line-222" class="anchor"></span><p>See also <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/TroubleShooting">../TroubleShooting</a> for generic stuff. <span id="line-223" class="anchor"></span></p>
<span id="line-224" class="anchor"></span><p>The first thing to do when your wiki does not work as expected is to issue the command "<tt>tail&nbsp;/var/log/httpd/error_log</tt>" to display the most recent errors. Usually, you will get a hint on what went wrong, like missing file system permissions. <span id="line-225" class="anchor"></span></p>
<span id="line-226" class="anchor"></span>
<h3 id="head-b8c0d1c1aba9cd39d0d15f86ea33025f7f25d48d">Adding permission to serve the htdocs directory</h3>

<span id="line-227" class="anchor"></span><p>In some (sane) Linux distributions (like SuSE 9.0) serving directories other than the document-root "<tt>/srv/www/htdocs</tt>" with Apache is switched off by default for security reasons in "<tt>/etc/httpd/httpd.conf</tt>" (or for Apache2 "<tt>/etc/apache2/httpd.conf</tt>"): <span id="line-228" class="anchor"></span></p>
<span id="line-229" class="anchor"></span>
<span id="line-230" class="anchor"></span><pre>
# forbid access to the entire filesystem by default
<span id="line-231" class="anchor"></span>&lt;Directory /&gt;
<span id="line-232" class="anchor"></span>  Options None
<span id="line-233" class="anchor"></span>  AllowOverride None
<span id="line-234" class="anchor"></span>  Order deny,allow
<span id="line-235" class="anchor"></span>  Deny from all
<span id="line-236" class="anchor"></span>&lt;/Directory&gt;
<span id="line-237" class="anchor"></span></pre>
<span id="line-238" class="anchor"></span><span id="line-239" class="anchor"></span><p>To allow Apache to serve directories outside of the document root you have to add these lines to "<tt>/etc/httpd/httpd.conf</tt>" (in SuSE it is recommended to create a new "<tt>http.conf.local</tt>" and include this file in "<tt>/etc/sysconfig/apache2</tt>"): <span id="line-240" class="anchor"></span></p>
<span id="line-241" class="anchor"></span>
<span id="line-242" class="anchor"></span><pre>
Alias /wiki/ "/usr/share/moin/htdocs/"
<span id="line-243" class="anchor"></span>&lt;Directory "/usr/share/moin/htdocs/"&gt;
<span id="line-244" class="anchor"></span>   Order deny,allow
<span id="line-245" class="anchor"></span>   Allow from all
<span id="line-246" class="anchor"></span>&lt;/Directory&gt;
<span id="line-247" class="anchor"></span>
<span id="line-248" class="anchor"></span>ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
<span id="line-249" class="anchor"></span>&lt;Directory "/usr/share/moin/mywiki/cgi-bin"&gt;
<span id="line-250" class="anchor"></span>   Order deny,allow
<span id="line-251" class="anchor"></span>   Allow from all
<span id="line-252" class="anchor"></span>&lt;/Directory&gt;
<span id="line-253" class="anchor"></span></pre>
<span id="line-254" class="anchor"></span><span id="line-255" class="anchor"></span><p>Of course, you need to adapt the paths to your particular situation. <span id="line-256" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/ApacheOnLinux" class="anchor"></span>
</div>
 <span id="line-56" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-57" class="anchor"></span><span id="fastcgi-install" class="anchor"></span> <span id="line-58" class="anchor"></span>
<h1>FastCGI Setup using Apache</h1>

<div lang="en" id="Include_HelpOnInstalling/ApacheWithFastCgi" dir="ltr">
<span id="top_Include_HelpOnInstalling/ApacheWithFastCgi" class="anchor"></span><span id="line-10" class="anchor"></span><span id="line-11" class="anchor"></span>
<h2 id="head-6839f37b445b94c0c179f023498969fb53e3d925">Using MoinMoin with apache + mod_fastcgi</h2>

<span id="line-12" class="anchor"></span><span id="line-13" class="anchor"></span><p><a class="external" href="http://fastcgi.com">FastCGI</a> is a method which enables apache to communicate <span id="line-14" class="anchor"></span>with long-running scripts. This has the advantage that the script is only <span id="line-15" class="anchor"></span>started and initialized one time, and that data could be cached in memory <span id="line-16" class="anchor"></span>from request to request, enhancing the performance of the CGI application. <span id="line-17" class="anchor"></span></p>
<span id="line-18" class="anchor"></span>
<h3 id="head-a37ae17ad8fb640605fa790fcef7b8cbf0b29353">Deploying MoinMoin with apache + mod_fastcgi</h3>

<span id="line-19" class="anchor"></span><span id="line-20" class="anchor"></span><p>To deploy <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> using FastCGI you need an apache with mod_fastcgi. Please <span id="line-21" class="anchor"></span>refer to the documentation of mod_fastcgi how to build it. <span id="line-22" class="anchor"></span></p>
<span id="line-23" class="anchor"></span><p>Follow the basic apache installation for your operating system as described <span id="line-24" class="anchor"></span>in other parts of the <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> installation documentation. This is <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinux">HelpOnInstalling/ApacheOnLinux</a> in most cases. In places where <span id="line-25" class="anchor"></span>the documentation refers to <tt>moin.cgi</tt> you use <tt>moin.fcg</tt> instead. Be sure <span id="line-26" class="anchor"></span>that <strong>.fcg</strong> is handled by the FastCGI module <span id="line-27" class="anchor"></span>(<tt>AddHandler&nbsp;fastcgi-script&nbsp;.fcg</tt> in your apache config). <span id="line-28" class="anchor"></span></p>
<span id="line-29" class="anchor"></span><p>Normally apache will start CGI scripts with its own user and group, or <span id="line-30" class="anchor"></span>with the user and group of the VirtualHost if you are using the suexec <span id="line-31" class="anchor"></span>wrapper. To enable this with FastCGI you need to use <tt>FastCgiWrapper&nbsp;On</tt> <span id="line-32" class="anchor"></span>in your apache config (see FastCGI Documentation). <span id="line-33" class="anchor"></span></p>
<span id="line-34" class="anchor"></span><p>Be sure to restart your apache after you changed py files (i.e. the config) <span id="line-35" class="anchor"></span>for a running FastCGI server, or you won't see any changes! <span id="line-36" class="anchor"></span></p>
<span id="line-37" class="anchor"></span><span id="line-38" class="anchor"></span>
<h3 id="head-cd07429ac863a0a4bf393f5936fbccbffe17e9b4">Running as an external application and/or on Windows</h3>

<span id="line-39" class="anchor"></span><span id="line-40" class="anchor"></span><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> Experimental. <span id="line-41" class="anchor"></span></p>
<span id="line-42" class="anchor"></span><p><a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> can be run as an external application that answers FastCGI request via a local TCP/IP socket. This works on Windows as well. All you need to do (after having installed <tt>mod_fastcgi</tt> and a working <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> instance) is this: <span id="line-43" class="anchor"></span></p>
<span id="line-44" class="anchor"></span><ol type="1">
<li><p>Select a port number for the internal communication. It should be larger than 1023. For this example, we chose 8888 (just for fun). <span id="line-45" class="anchor"></span></p>
<span id="line-46" class="anchor"></span></li>
<li class="gap"><p>Add the following lines to your httpd.conf:
<span id="line-47" class="anchor"></span></p>
<pre>
Alias /moin.fcg "/your/path/to/moin.fcg"
<span id="line-48" class="anchor"></span>FastCgiExternalServer "/your/path/to/moin.fcg" -host localhost:8888
<span id="line-49" class="anchor"></span></pre>
<span id="line-50" class="anchor"></span><span id="line-51" class="anchor"></span></li>
<li class="gap"><p>Edit <tt>moin.fcg</tt>. Replace
<span id="line-52" class="anchor"></span></p>
<pre>
fcg = thfcgi.THFCGI(handle_request)
<span id="line-53" class="anchor"></span></pre>
<p> with 
<span id="line-54" class="anchor"></span></p>
<pre>
fcg = thfcgi.THFCGI(handle_request, 0, 8888)
<span id="line-55" class="anchor"></span></pre>
<span id="line-56" class="anchor"></span><span id="line-57" class="anchor"></span></li>
<li class="gap"><p>Start the file <tt>moin.fcg</tt> manually like a Python script:
<span id="line-58" class="anchor"></span></p>
<pre>
python moin.fcg
<span id="line-59" class="anchor"></span></pre>
<span id="line-60" class="anchor"></span><span id="line-61" class="anchor"></span></li>
<li class="gap"><p>Start Apache. <span id="line-62" class="anchor"></span></p>
<span id="line-63" class="anchor"></span></li>
<li class="gap"><p>Enjoy <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> running with FastCGI support! <span id="line-64" class="anchor"></span></p>
<span id="line-65" class="anchor"></span></li>
</ol>

<h3 id="head-4f0ae2079d5166e93d946467cf44f193f0c8e571">Add a safe fallback</h3>

<span id="line-66" class="anchor"></span><span id="line-67" class="anchor"></span><p>Install and test <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> according to <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinux">HelpOnInstalling/ApacheOnLinux</a>. Then make and test the changes to run mod_fastcgi. If you are satisfied, you can add the following block to your apache config: <span id="line-68" class="anchor"></span>
<span id="line-69" class="anchor"></span></p>
<pre>
&lt;IfModule !mod_fastcgi.c&gt;
<span id="line-70" class="anchor"></span>    ScriptAlias /mywiki "/your/path/to/moin.cgi"
<span id="line-71" class="anchor"></span>&lt;/IfModule&gt;
<span id="line-72" class="anchor"></span>&lt;IfModule mod_fastcgi.c&gt;
<span id="line-73" class="anchor"></span>    AddHandler fastcgi-script .fcg
<span id="line-74" class="anchor"></span>    ScriptAlias /mywiki "/your/path/to/moin.fcg"
<span id="line-75" class="anchor"></span>&lt;/IfModule&gt;
<span id="line-76" class="anchor"></span></pre>
<span id="line-77" class="anchor"></span><p>Now Apache will use mod_fastcgi if available and otherwise use the slow cgi script. <span id="line-78" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/ApacheWithFastCgi" class="anchor"></span>
</div>
 <span id="line-59" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-60" class="anchor"></span><span id="modpy-install" class="anchor"></span> <span id="line-61" class="anchor"></span>
<h1>mod_python Setup using Apache</h1>

<div lang="en" id="Include_HelpOnInstalling/ApacheWithModPython" dir="ltr">
<span id="top_Include_HelpOnInstalling/ApacheWithModPython" class="anchor"></span><span id="line-10" class="anchor"></span><span id="line-11" class="anchor"></span><ol>
<li><a href="#head-4e6235e8e3535359b4aa9df9722961dfd62a685a">Why Use mod_python</a></li>
<li><a href="#head-52f515a2448d32357136b23a188dd227330baeb2">Basic configuring</a><ol>
<li><a href="#head-8cd6758d1fcc77b433f6584bcc34e24469568d75">Install mod_python</a></li>
<li><a href="#head-671adcfb8441deb9daa6ba877d59cc69d5e9d25e">Set up a wiki instance</a></li>
<li><a href="#head-08923628c7a5b449b5f210251334c431791adec9">Edit `wikiconfig.py`</a></li>
<li><a href="#head-b628477f88ab294636a22af4ee665656a8897b3a">Changes to Apache `httpd.conf`</a></li>
</ol>
<li><a href="#head-2dba68d0d0ad069f1c4a2a46bcdbd07cb21d3887">Solving problems for non-root-mounted wikis</a></li>
<li><a href="#head-e7e935fbfb5a81ceb0698ef82b5b7a897aa5e157">Configuring root wiki</a></li>
<li><a href="#head-53a11a51ff1c262df8f1f287084f8700685446d4">Older mod_python versions</a><ol>
<li><a href="#head-7b2283d5184932488fe551b2cee08e28fb18230c">Use a wrapper script</a></li>
<li><a href="#head-f2a32b29f0aff0101a91c87d692d063a6e0a4ec2">Fix mod_python</a></li>
</ol>
<li><a href="#head-17313e33f7320af70773f484730b290d86b62ee5">Troubleshooting</a></li>
</ol>
<p> <span id="line-12" class="anchor"></span></p>
<span id="line-13" class="anchor"></span>
<h1 id="head-4e6235e8e3535359b4aa9df9722961dfd62a685a">Why Use mod_python</h1>

<span id="line-14" class="anchor"></span><span id="line-15" class="anchor"></span><p><a class="external" href="http://modpython.org/">mod_python</a> embeds the python interpreter into <span id="line-16" class="anchor"></span>the apache server. This saves initialization time and the need of <span id="line-17" class="anchor"></span>forking cgi scripts. It doesn't have the ability to run as different <span id="line-18" class="anchor"></span>users. It will always run as the main apache user and group. Be sure <span id="line-19" class="anchor"></span>that your wiki data files are accessible and writable by your apache <span id="line-20" class="anchor"></span>server. <span id="line-21" class="anchor"></span></p>
<span id="line-22" class="anchor"></span><p><img src="wiki/htdocs/modern/img/attention.png" alt="&lt;!&gt;" height="15" width="15"> The basic configuration is suitable for mod_python 3.1.3 and later. If you use older version, see the section "Older mod_python versions" <span id="line-23" class="anchor"></span></p>
<span id="line-24" class="anchor"></span><p><img src="wiki/htdocs/modern/img/attention.png" alt="&lt;!&gt;" height="15" width="15"> mod_python will cause your apache processes to increase their <span id="line-25" class="anchor"></span>memory requirements considerably - especially as apache runs many <span id="line-26" class="anchor"></span>separate processes which will each need to have their own copy of the <span id="line-27" class="anchor"></span>python code and data in the process memory space.  You may find that <span id="line-28" class="anchor"></span>FastCGI, as detailed in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheWithFastCgi">HelpOnInstalling/ApacheWithFastCgi</a> is rather <span id="line-29" class="anchor"></span>more efficient in this respect. <span id="line-30" class="anchor"></span></p>
<span id="line-31" class="anchor"></span>
<h1 id="head-52f515a2448d32357136b23a188dd227330baeb2">Basic configuring</h1>

<span id="line-32" class="anchor"></span><span id="line-33" class="anchor"></span><ol type="1">
<li><p>Install mod_python <span id="line-34" class="anchor"></span></p>
</li>
<li><p>Set up a wiki instance <span id="line-35" class="anchor"></span></p>
</li>
<li><p>Edit <tt>wikiconfig.py</tt> <span id="line-36" class="anchor"></span></p>
</li>
<li><p>Changes to Apache <tt>httpd.conf</tt> <span id="line-37" class="anchor"></span></p>
</li>
<li><p>Restart Apache <span id="line-38" class="anchor"></span></p>
<span id="line-39" class="anchor"></span></li>
</ol>
<p>The sample configurations below are for a wiki instance called <tt>mywiki</tt> installed in a directory <tt>/var/www/moin/mywiki</tt> with the main <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> installation installed in python's default site library path. The wiki appears as URL <tt>/mywiki</tt> under the server - ie <tt>http://my.ser.ver/mywiki</tt>.  You will need to change these to reflect your installation. <span id="line-40" class="anchor"></span></p>
<span id="line-41" class="anchor"></span>
<h2 id="head-8cd6758d1fcc77b433f6584bcc34e24469568d75">Install mod_python</h2>

<span id="line-42" class="anchor"></span><span id="line-43" class="anchor"></span><p>Most people will just add a <tt>mod_python</tt> package to their current operating system installation.  If you are building from source then you should consult the <a class="external" href="http://modpython.org/live/current/doc-html/">mod_python documentation</a>. <span id="line-44" class="anchor"></span></p>
<span id="line-45" class="anchor"></span><p>The mod_python installation should have added some lines to the Apache configuration file - either in the file itself or in an included configuration file (for example on Red Hat or Fedora linux the mod_python configuration is in <tt>/etc/httpd/conf.d/python.conf</tt>). <span id="line-46" class="anchor"></span></p>
<span id="line-47" class="anchor"></span><p>Make sure you have this line in <tt>httpd.conf</tt> or mod_python will not work: <span id="line-48" class="anchor"></span>
<span id="line-49" class="anchor"></span></p>
<pre>
LoadModule python_module modules/mod_python.so
<span id="line-50" class="anchor"></span></pre>
<span id="line-51" class="anchor"></span><span id="line-52" class="anchor"></span><p>After this restart Apache and make sure that it starts successfully, and that the error log has a line similar to this:- <span id="line-53" class="anchor"></span>
<span id="line-54" class="anchor"></span></p>
<pre>
[Sat Jan 01 15:40:49 2005] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
<span id="line-55" class="anchor"></span></pre>
<span id="line-56" class="anchor"></span><span id="line-57" class="anchor"></span><p>You may need to change some environment variables on (eg) FreeBSD - this is detailed in the port installation message. <span id="line-58" class="anchor"></span></p>
<span id="line-59" class="anchor"></span>
<h2 id="head-671adcfb8441deb9daa6ba877d59cc69d5e9d25e">Set up a wiki instance</h2>

<span id="line-60" class="anchor"></span><span id="line-61" class="anchor"></span><p>This is done as shown in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">WikiInstanceCreation</a>. Its recommended to first configure the wiki with cgi and check that it works, then change the configuratin to use mod_python. This allows you be sure that any problems are in the mod_python transition rather than the basic <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> installation. <span id="line-62" class="anchor"></span></p>
<span id="line-63" class="anchor"></span><ol type="1">
<li><p>Copy moin.cgi into your wiki directory <span id="line-64" class="anchor"></span></p>
</li>
<li><p>Configure <tt>httpd.conf</tt> as cgi first: <span id="line-65" class="anchor"></span></p>
<ul>
<li style="list-style-type:none">
<span id="line-66" class="anchor"></span><pre>
Alias /wiki/ "/usr/share/moin/htdocs/"
<span id="line-67" class="anchor"></span>ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
<span id="line-68" class="anchor"></span></pre>
<span id="line-69" class="anchor"></span><span id="line-70" class="anchor"></span></li>
</ul>
</li>
</ol>
<p>Restart Apache and make test that your wiki works. <span id="line-71" class="anchor"></span></p>
<span id="line-72" class="anchor"></span>
<h2 id="head-08923628c7a5b449b5f210251334c431791adec9">Edit `wikiconfig.py`</h2>

<span id="line-73" class="anchor"></span><span id="line-74" class="anchor"></span><p>Make sure you use only absolute paths - relative paths will not work! <span id="line-75" class="anchor"></span>
<span id="line-76" class="anchor"></span></p>
<pre>
data_dir = '/var/www/moin/mywiki/data/'
<span id="line-77" class="anchor"></span>data_underlay_dir = '/var/www/moin/mywiki/underlay/'
<span id="line-78" class="anchor"></span></pre>
<span id="line-79" class="anchor"></span><span id="line-80" class="anchor"></span><p>If you do not want to use absolute paths, you can use Python's os module to construct the relative paths: <span id="line-81" class="anchor"></span></p>
<pre>
import os 
<span id="line-82" class="anchor"></span>data_dir = os.path.join(os.path.dirname(__file__), 'data/')
<span id="line-83" class="anchor"></span>data_underlay_dir = os.path.join(os.path.dirname(__file__), 'underlay/')
<span id="line-84" class="anchor"></span></pre>
<span id="line-85" class="anchor"></span><span id="line-86" class="anchor"></span><p>Test that the wiki works after this change. <span id="line-87" class="anchor"></span></p>
<span id="line-88" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> In 1.2 and earlyer, the configuration file is called <tt>moin_config.py</tt>. <span id="line-89" class="anchor"></span></p>
<span id="line-90" class="anchor"></span></li>
</ul>

<h2 id="head-b628477f88ab294636a22af4ee665656a8897b3a">Changes to Apache `httpd.conf`</h2>

<span id="line-91" class="anchor"></span><span id="line-92" class="anchor"></span><p>After your wiki is running as cgi script, convert it to run with mod_python.  <span id="line-93" class="anchor"></span></p>
<span id="line-94" class="anchor"></span><p>If you run your wiki as cgi as we recommended before, remove or comment the <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a> directive: <span id="line-95" class="anchor"></span>
<span id="line-96" class="anchor"></span></p>
<pre>
#ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
<span id="line-97" class="anchor"></span></pre>
<span id="line-98" class="anchor"></span><span id="line-99" class="anchor"></span><p>Add a <tt>Location</tt> directive: <span id="line-100" class="anchor"></span>
<span id="line-101" class="anchor"></span></p>
<pre>
&lt;Location /mywiki&gt;
<span id="line-102" class="anchor"></span>    SetHandler python-program
<span id="line-103" class="anchor"></span>    # Add the path of your wiki directory
<span id="line-104" class="anchor"></span>    PythonPath "['/var/www/moin/mywiki'] + sys.path"
<span id="line-105" class="anchor"></span>    PythonHandler MoinMoin.request::RequestModPy.run
<span id="line-106" class="anchor"></span>&lt;/Location&gt;
<span id="line-107" class="anchor"></span></pre>
<span id="line-108" class="anchor"></span><span id="line-109" class="anchor"></span><p>If you have multiple <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> instances then add one location directive for each one (changing the paths as appropriate) and add a line with the directive <tt>PythonInterpreter&nbsp;mywiki</tt> to each Location section. With this directive different subinterpreters with completely separate namespaces will be used for each wiki (see <a class="external" href="http://modpython.org/live/current/doc-html/pyapi-interps.html">here</a> for details). <span id="line-110" class="anchor"></span></p>
<span id="line-111" class="anchor"></span><p>If you did not install <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> in the default location, you will have to add the path to <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> to the system path: <span id="line-112" class="anchor"></span>
<span id="line-113" class="anchor"></span></p>
<pre>
    PythonPath "['/var/www/moin/mywiki', '/prefix/lib/python2.x/site-packages'] + sys.path"
<span id="line-114" class="anchor"></span></pre>
<span id="line-115" class="anchor"></span><span id="line-116" class="anchor"></span><p>Restart Apache - everything should now work correctly. <span id="line-117" class="anchor"></span></p>
<span id="line-118" class="anchor"></span>
<h1 id="head-2dba68d0d0ad069f1c4a2a46bcdbd07cb21d3887">Solving problems for non-root-mounted wikis</h1>

<span id="line-119" class="anchor"></span><span id="line-120" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/alert.png" alt="/!\" height="15" width="15"> If your wiki does not have a root URL (like <tt>http://www.example.com/FrontPage</tt>), then you might need to follow the next steps: <span id="line-121" class="anchor"></span></p>
<span id="line-122" class="anchor"></span></li>
</ul>
<p>On some installations, mod_python hands <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> incorrect script_name and path_info. It usually happens when using the Apache Location directive, with a wiki in an arbitary path: <span id="line-123" class="anchor"></span>
<span id="line-124" class="anchor"></span></p>
<pre>
&lt;Location /farm/mywiki&gt;
<span id="line-125" class="anchor"></span>    ...
<span id="line-126" class="anchor"></span>&lt;/Location&gt;
<span id="line-127" class="anchor"></span></pre>
<span id="line-128" class="anchor"></span><p>This will not work, because its not clear what is the script name, since with location setup, there is no real script. <span id="line-129" class="anchor"></span></p>
<span id="line-130" class="anchor"></span><p>To solve this problem, use a <tt>PythonOption</tt> directive: <span id="line-131" class="anchor"></span>
<span id="line-132" class="anchor"></span></p>
<pre>
&lt;Location /farm/mywiki&gt;
<span id="line-133" class="anchor"></span>    # Location value must match the Apache Location value!
<span id="line-134" class="anchor"></span>    PythonOption Location /farm/mywiki
<span id="line-135" class="anchor"></span>    ...
<span id="line-136" class="anchor"></span>&lt;/Location&gt;
<span id="line-137" class="anchor"></span></pre>
<span id="line-138" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in release 1.3.5 <span id="line-139" class="anchor"></span></p>
<span id="line-140" class="anchor"></span></li>
</ul>

<h1 id="head-e7e935fbfb5a81ceb0698ef82b5b7a897aa5e157">Configuring root wiki</h1>

<span id="line-141" class="anchor"></span><span id="line-142" class="anchor"></span><p>You may wish to have your wiki appearing at the root of your webserver - for example so that <tt>http://wiki.example.com/</tt> will map to your wiki rather than having to use <tt>http://wiki.example.com/mywiki/</tt>.  This requires a slightly different form of configuration using <tt>mod_rewrite</tt> - this is a standard module of recent Apache distributions, and is often enabled by default. <span id="line-143" class="anchor"></span></p>
<span id="line-144" class="anchor"></span><p>You need to set up your wiki instance as described above, and also copy <tt>moinmodpy.py</tt> from the Moin installation directory to the wiki instance directory (<tt>/var/www/moin/mywiki</tt> in these examples). <span id="line-145" class="anchor"></span></p>
<span id="line-146" class="anchor"></span><p>The Apache configuration needs <tt>mod_rewrite</tt> enabled - so the line <span id="line-147" class="anchor"></span>
<span id="line-148" class="anchor"></span></p>
<pre>
LoadModule rewrite_module modules/mod_rewrite.so
<span id="line-149" class="anchor"></span></pre>
<span id="line-150" class="anchor"></span><p>should appear in the first part of the <tt>httpd.conf</tt> configuration file. <span id="line-151" class="anchor"></span></p>
<span id="line-152" class="anchor"></span><p>The wiki and virtual host configuration sould look like this:- <span id="line-153" class="anchor"></span>
<span id="line-154" class="anchor"></span></p>
<pre>
&lt;VirtualHost *:80&gt;
<span id="line-155" class="anchor"></span>  ServerAdmin postmaster@example.com
<span id="line-156" class="anchor"></span>  DocumentRoot /var/www/html
<span id="line-157" class="anchor"></span>  ServerName wiki.example.com
<span id="line-158" class="anchor"></span>  Alias /wiki/ "/usr/share/moin/htdocs/"
<span id="line-159" class="anchor"></span>
<span id="line-160" class="anchor"></span>  # Rewrite urls
<span id="line-161" class="anchor"></span>  RewriteEngine On
<span id="line-162" class="anchor"></span>  RewriteLogLevel 0
<span id="line-163" class="anchor"></span>  # map /wiki static files to Moin htdocs
<span id="line-164" class="anchor"></span>  RewriteRule ^/wiki/(.*)$ /usr/share/moin/htdocs/$1 [last]
<span id="line-165" class="anchor"></span>  # map everything else to server script
<span id="line-166" class="anchor"></span>  RewriteRule ^(.*)$ /var/www/moin/mywiki/moinmodpy.py$1
<span id="line-167" class="anchor"></span>
<span id="line-168" class="anchor"></span>  &lt;Directory "/var/www/moin/testwiki"&gt;
<span id="line-169" class="anchor"></span>    # Modpy stuff
<span id="line-170" class="anchor"></span>    AddHandler python-program .py
<span id="line-171" class="anchor"></span>    # Add the path to the wiki directory, where
<span id="line-172" class="anchor"></span>    # moinmodpy.py and wikiconfig.py are located.
<span id="line-173" class="anchor"></span>    PythonPath "['/var/www/moin/mywiki'] + sys.path"
<span id="line-174" class="anchor"></span>    PythonHandler moinmodpy
<span id="line-175" class="anchor"></span>  &lt;/Directory&gt;
<span id="line-176" class="anchor"></span>&lt;/VirtualHost&gt;
<span id="line-177" class="anchor"></span></pre>
<span id="line-178" class="anchor"></span><span id="line-179" class="anchor"></span><p>Apache should be restarted, and the FrontPage of <tt>mywiki</tt> should now appear at <tt>http://wiki.example.com/</tt>. <span id="line-180" class="anchor"></span></p>
<span id="line-181" class="anchor"></span><p>Other ways of handling root level wikis with Apache are detailed in the appropriately named <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration/ApacheVoodoo">HelpOnConfiguration/ApacheVoodoo</a>. <span id="line-182" class="anchor"></span></p>
<span id="line-183" class="anchor"></span>
<h1 id="head-53a11a51ff1c262df8f1f287084f8700685446d4">Older mod_python versions</h1>

<span id="line-184" class="anchor"></span><span id="line-185" class="anchor"></span><p>mod_python versions 2.7.10, 3.0.4 and 3.1.2b have a bug in <tt>apache.resolve_object</tt>. This bug was reported to the mod_python <span id="line-186" class="anchor"></span>maintainers and has been fixed in the 3.1.3 release. The best fix for this is to update to the current release. However if you are unable to do this there are 2 possible solutions: <span id="line-187" class="anchor"></span></p>
<span id="line-188" class="anchor"></span>
<h2 id="head-7b2283d5184932488fe551b2cee08e28fb18230c">Use a wrapper script</h2>

<span id="line-189" class="anchor"></span><span id="line-190" class="anchor"></span><p><a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> come with a <tt>moinmodpy.py</tt> wrapper script, and this could be used by changing the <tt>PythonPath</tt> and <tt>PythonHandler</tt> directives as shown in the <tt>moinmodpy.htaccess</tt> file. The wrapper was named <tt>moin_modpy.py</tt> in <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> 1.2. <span id="line-191" class="anchor"></span></p>
<span id="line-192" class="anchor"></span>
<h2 id="head-f2a32b29f0aff0101a91c87d692d063a6e0a4ec2">Fix mod_python</h2>

<span id="line-193" class="anchor"></span><p>mod_python has a small resolver bug in versions 2.7.10, 3.0.4 and 3.1.2b. <span id="line-194" class="anchor"></span>The method <tt>resolve_object</tt> in <tt>mod_python/apache.py</tt> checks the wrong <span id="line-195" class="anchor"></span>object, and so the lookup for <tt>RequestModPy.run</tt> fails. <span id="line-196" class="anchor"></span></p>
<span id="line-197" class="anchor"></span><p>To fix it you need to change the method <tt>resolve_object</tt> (around line 551 for <span id="line-198" class="anchor"></span>mod_python 3.1.2b) from <span id="line-199" class="anchor"></span></p>
<span id="line-200" class="anchor"></span>
<span id="line-201" class="anchor"></span><pre>
        if silent and not hasattr(module, obj_str):
<span id="line-202" class="anchor"></span>            return None
<span id="line-203" class="anchor"></span></pre>
<span id="line-204" class="anchor"></span><span id="line-205" class="anchor"></span><p>to <span id="line-206" class="anchor"></span></p>
<span id="line-207" class="anchor"></span>
<span id="line-208" class="anchor"></span><pre>
        if silent and not hasattr(obj, obj_str):
<span id="line-209" class="anchor"></span>            return None
<span id="line-210" class="anchor"></span></pre>
<span id="line-211" class="anchor"></span><span id="line-212" class="anchor"></span><span id="line-213" class="anchor"></span>
<h1 id="head-17313e33f7320af70773f484730b290d86b62ee5">Troubleshooting</h1>

<span id="line-214" class="anchor"></span><span id="line-215" class="anchor"></span><p>Page access gives apache error:: <span id="line-216" class="anchor"></span></p>
<ul>
<li style="list-style-type:none"><p><tt>PythonHandler&nbsp;MoinMoin.request::RequestModPy.run:&nbsp;OSError:&nbsp;[Errno&nbsp;2]&nbsp;No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory:&nbsp;'data/user'</tt> <span id="line-217" class="anchor"></span>This appears to be caused by you not having an absolute path for <tt>data_dir</tt> in <tt>moin_config.py</tt>.  There are several other lines of error traceback preceding this one in the apache error log.  Fix the path in <tt>moin_config.py</tt>. <span id="line-218" class="anchor"></span></p>
</li>
</ul>
<span id="bottom_Include_HelpOnInstalling/ApacheWithModPython" class="anchor"></span>
</div>
 <span id="line-62" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-63" class="anchor"></span><span id="twisted-install" class="anchor"></span> <span id="line-64" class="anchor"></span>
<h1>Setup using Twisted</h1>

<div lang="en" id="Include_HelpOnInstalling/TwistedWeb" dir="ltr">
<span id="top_Include_HelpOnInstalling/TwistedWeb" class="anchor"></span><span id="line-10" class="anchor"></span><span id="line-11" class="anchor"></span>
<h1 id="head-aadc9ea90352d5b5ad5745583f12238abc07f6b1">Using MoinMoin with Twisted</h1>

<span id="line-12" class="anchor"></span><span id="line-13" class="anchor"></span><p><a class="external" href="http://twistedmatrix.com">Twisted</a> is a standalone python framework for many kinds of applications. <span id="line-14" class="anchor"></span>For <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a>, we use Twisted as a python web server that just imports <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> persistently. <span id="line-15" class="anchor"></span></p>
<span id="line-16" class="anchor"></span><p>This has the advantage that the Python interpreter and all Python scripts (including Twisted itself and also <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a>) is only loaded and initialized one time, and that data can be cached in memory from request to request, enhancing the performance of <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a>. <span id="line-17" class="anchor"></span></p>
<span id="line-18" class="anchor"></span><p>Another advantage is that this is all based on Python. <img src="wiki/htdocs/modern/img/smile4.png" alt=";)" height="15" width="15"> <span id="line-19" class="anchor"></span></p>
<span id="line-20" class="anchor"></span><p>First do <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> and <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>. <span id="line-21" class="anchor"></span></p>
<span id="line-22" class="anchor"></span>
<h2 id="head-781019b7b4433e2b39a07387d381c1ca28eb9134">Install Twisted</h2>

<span id="line-23" class="anchor"></span><span id="line-24" class="anchor"></span><p>First, install Twisted (see URL above). Many Linux distributions have Twisted packages. Please refer to the documentation of Twisted for installation information. <span id="line-25" class="anchor"></span></p>
<span id="line-26" class="anchor"></span>
<h2 id="head-f377d8187c2c46a84ee4a6ae292b323853a6ae0c">Configuring the Twisted server</h2>

<span id="line-27" class="anchor"></span><span id="line-28" class="anchor"></span><p>Copy the file <tt>wiki/server/mointwisted.py</tt> to your wiki directory. Edit and adapt the settings to your needs. <span id="line-29" class="anchor"></span></p>
<span id="line-30" class="anchor"></span>
<h3 id="head-6cf160dca6339d0a63474b5e9d1c94115980d292">System path configuration</h3>

<span id="line-31" class="anchor"></span><span id="line-32" class="anchor"></span><p>If you did a standard install, and you are not a developer, you probably want to skip this section. Otherwise, you might want to add the path to moin and config file, like that: <span id="line-33" class="anchor"></span></p>
<span id="line-34" class="anchor"></span>
<span id="line-35" class="anchor"></span><pre>
sys.path.insert(0, '/path/to/moin')
<span id="line-36" class="anchor"></span>sys.path.insert(0, '/path/to/wikiconfig')
<span id="line-37" class="anchor"></span></pre>
<span id="line-38" class="anchor"></span><span id="line-39" class="anchor"></span>
<h3 id="head-a51f43e6a56656fb4ff7b17d487afc09442427b5">Config class options</h3>

<span id="line-40" class="anchor"></span><span id="line-41" class="anchor"></span><p>If you did a standard install, the default options might be just what you need. Check and change what you like: <span id="line-42" class="anchor"></span></p>
<span id="line-43" class="anchor"></span><div>
<table>
<tr>
<td>
<p> <strong>Option</strong> </p>
</td>
<td>
<p> <strong>Default</strong> </p>
</td>
<td>
<p> <strong>Comment</strong> </p>
</td>
</tr>
<span id="line-44" class="anchor"></span><tr>
<td>
<p> docs </p>
</td>
<td>
<p> '/usr/share/moin/wiki/htdocs' </p>
</td>
<td>
<p> Path to moin shared files </p>
</td>
</tr>
<span id="line-45" class="anchor"></span><tr>
<td>
<p> user </p>
</td>
<td>
<p> 'www-data' </p>
</td>
<td>
<p> If you run as root, the server will run as this user </p>
</td>
</tr>
<span id="line-46" class="anchor"></span><tr>
<td>
<p> group </p>
</td>
<td>
<p> 'www-data' </p>
</td>
<td>
<p> If you run as root, the server will run as this group </p>
</td>
</tr>
<span id="line-47" class="anchor"></span><tr>
<td>
<p> port </p>
</td>
<td>
<p> 8080 </p>
</td>
<td>
<p> Port to serve. To serve a privileged port below 1024 you will have to run as root </p>
</td>
</tr>
<span id="line-48" class="anchor"></span><tr>
<td>
<p> interfaces </p>
</td>
<td>
<p> <tt>['']</tt> </p>
</td>
<td>
<p> A list of interfaces the server will listen to. If the list contains the entry <tt>''</tt> (like for the default configuration), all other entries are ignored and the server will listen to all interfaces. </p>
</td>
</tr>
<span id="line-49" class="anchor"></span><tr>
<td>
<p> logPath </p>
</td>
<td>
<p> 'mointwisted.log' </p>
</td>
<td>
<p> Log file. </p>
</td>
</tr>
<span id="line-50" class="anchor"></span><tr>
<td>
<p> profiler </p>
</td>
<td>
<p> commented python code </p>
</td>
<td>
<p> Useful only if you are a moin developer. </p>
</td>
</tr>
<span id="line-51" class="anchor"></span></table>
</div>
<span id="line-52" class="anchor"></span>
<h2 id="head-e4c385b7866dfc82bdf390d00038d1e191cd6870">Configuring wikiconfig.py</h2>

<span id="line-53" class="anchor"></span><span id="line-54" class="anchor"></span><p>The sample config file should be just fine. <span id="line-55" class="anchor"></span></p>
<span id="line-56" class="anchor"></span><div>
<table>
<tr>
<td>
<p> <strong>Option</strong> </p>
</td>
<td>
<p> <strong>Default</strong> </p>
</td>
<td>
<p> <strong>Comment</strong> </p>
</td>
</tr>
<span id="line-57" class="anchor"></span><tr>
<td>
<p> url_prefix </p>
</td>
<td>
<p> '/wiki' </p>
</td>
<td>
<p> You should not change this, or images and css file will not be available to the wiki! </p>
</td>
</tr>
<span id="line-58" class="anchor"></span></table>
</div>
<span id="line-59" class="anchor"></span>
<h2 id="head-828a44c0e867e6f0fb60395a972cb6003658f76f">Starting the server on Unix</h2>

<span id="line-60" class="anchor"></span><span id="line-61" class="anchor"></span><p>On GNU/Linux, Mac OS X or another POSIX-like OS, copy <tt>wiki/server/mointwisted</tt> to your wiki directory. You might want to adapt <tt>PYTHONPATH</tt> and the path to <tt>twistd</tt>.  <span id="line-62" class="anchor"></span></p>
<span id="line-63" class="anchor"></span><p>Start the server with <tt>./mointwisted&nbsp;start</tt> and test your wiki at <a class="www" href="http://localhost:8080/">http://localhost:8080/</a>. Stop the server with <tt>./mointwisted&nbsp;stop</tt>. <span id="line-64" class="anchor"></span></p>
<span id="line-65" class="anchor"></span><p>For more options run <tt>./mointwisted</tt> without arguments. <span id="line-66" class="anchor"></span></p>
<span id="line-67" class="anchor"></span>
<h2 id="head-0457c39c25e65945e29141fa8f207afe318806fe">Starting the server on Windows</h2>

<span id="line-68" class="anchor"></span><span id="line-69" class="anchor"></span><p>Copy <tt>wiki/server/mointwisted.cmd</tt> to your wiki directory. You might have to change the path pointing to the python-scripts directory. <span id="line-70" class="anchor"></span></p>
<span id="line-71" class="anchor"></span><p>Double click <tt>mointwisted.cmd</tt> to start the server. It will create a new terminal window. To stop the server, close the terminal window. <span id="line-72" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/TwistedWeb" class="anchor"></span>
</div>
 <span id="line-65" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-66" class="anchor"></span><span id="linuxstandalone-install" class="anchor"></span> <span id="line-67" class="anchor"></span>
<h1>Linux Installation using standalone server</h1>

<div lang="en" id="Include_HelpOnInstalling/StandaloneServer" dir="ltr">
<span id="top_Include_HelpOnInstalling/StandaloneServer" class="anchor"></span><span id="line-11" class="anchor"></span><p><strong>Installing and configuring standalone server</strong> <span id="line-12" class="anchor"></span></p>
<span id="line-13" class="anchor"></span><p>See also: <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration/IntegratingWithApache">HelpOnConfiguration/IntegratingWithApache</a> <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><p>The standalone server is especially made for local wikis because it does not need a web server installed. Only Python and Moin are necessary! <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span><p>To install and run the standalone server: <span id="line-18" class="anchor"></span></p>
<ol type="1">
<li><p>If <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> is not installed yet, preform <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span id="line-19" class="anchor"></span></p>
</li>
<li><p>Create a wiki instance as described in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> <span id="line-20" class="anchor"></span></p>
</li>
<li><p>Copy <tt>moin.py</tt> to your wiki directory, where your <tt>wikiconfig.py</tt> is <span id="line-21" class="anchor"></span></p>
</li>
<li><p>If you installed with <tt>--prefix</tt> option, you must edit moin.py and set <tt>docs</tt> to the correct path. <span id="line-22" class="anchor"></span></p>
</li>
<li><p>Run <tt>moin.py</tt> <span id="line-23" class="anchor"></span></p>
</li>
<li><p>Access your wiki at <a class="www" href="http://localhost:8000/">http://localhost:8000/</a> <span id="line-24" class="anchor"></span></p>
<span id="line-25" class="anchor"></span></li>
</ol>
<p>On most cases, the default settings will be just fine. You many want to edit <tt>moin.py</tt> and change some of the options, as described in the next section. <span id="line-26" class="anchor"></span></p>
<span id="line-27" class="anchor"></span>
<h1 id="head-b104ff56fc1c89199447f1f2756b65995534e032">Configuring moin.py</h1>

<span id="line-28" class="anchor"></span><span id="line-29" class="anchor"></span>
<h2 id="head-5d2a2fc430a567acd72fcaa712af23333abca0df">System path configuration</h2>

<span id="line-30" class="anchor"></span><span id="line-31" class="anchor"></span><p>If you did a standard install, and you are not a developer, you probably want to skip this section. If not, you might want to add the path to moin and config file, like that: <span id="line-32" class="anchor"></span></p>
<span id="line-33" class="anchor"></span>
<span id="line-34" class="anchor"></span><pre>
import sys
<span id="line-35" class="anchor"></span>sys.path.insert(0, '/path/to/moin')
<span id="line-36" class="anchor"></span>sys.path.insert(0, '/path/to/wikiconfig')
<span id="line-37" class="anchor"></span></pre>
<span id="line-38" class="anchor"></span><span id="line-39" class="anchor"></span><span id="options" class="anchor"></span><p> <span id="line-40" class="anchor"></span></p>

<h2 id="head-3cb7180f429490b9735cfc083869eaaa128ed64c">Config class options</h2>

<span id="line-41" class="anchor"></span><span id="line-42" class="anchor"></span><div>
<table>
<tr>
<td>
<p> <strong>Option</strong> </p>
</td>
<td>
<p> <strong>Default</strong> </p>
</td>
<td>
<p> <strong>Comment</strong> </p>
</td>
</tr>
<span id="line-43" class="anchor"></span><tr>
<td>
<p> name </p>
</td>
<td>
<p> <tt>'moin'</tt> </p>
</td>
<td>
<p> Server name, used by default for log and pid files. <img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in 1.5 </p>
</td>
</tr>
<span id="line-44" class="anchor"></span><tr>
<td>
<p> docs </p>
</td>
<td>
<p> <tt>'/usr/share/moin/wiki/htdocs'</tt> </p>
</td>
<td>
<p> Path to moin shared files. If you used <tt>--prefix</tt> install, the default path will not work, and you must set the path to <tt>'PREFIX/share/moin/wiki/htdocs'</tt>. </p>
</td>
</tr>
<span id="line-45" class="anchor"></span><tr>
<td>
<p> user </p>
</td>
<td>
<p> <tt>'www-data'</tt> </p>
</td>
<td>
<p> If you run as root, the server will run with as this user </p>
</td>
</tr>
<span id="line-46" class="anchor"></span><tr>
<td>
<p> group </p>
</td>
<td>
<p> <tt>'www-data'</tt> </p>
</td>
<td>
<p> If you run as root, the server will run with as this group </p>
</td>
</tr>
<span id="line-47" class="anchor"></span><tr>
<td>
<p> port </p>
</td>
<td>
<p> <tt>8000</tt> </p>
</td>
<td>
<p> Port to serve. To serve privileged port under 1024 you will have to run as root </p>
</td>
</tr>
<span id="line-48" class="anchor"></span><tr>
<td>
<p> interface </p>
</td>
<td>
<p> <tt>'localhost'</tt> </p>
</td>
<td>
<p> The interface the server will listen to. The default will listen only to localhost. Set to <tt>''</tt> to listen to all.</p>
</td>
</tr>
<span id="line-49" class="anchor"></span><tr>
<td>
<p> logPath </p>
</td>
<td>
<p> <tt>name&nbsp;+&nbsp;'.log'</tt> </p>
</td>
<td>
<p> Log file. Default is commented. </p>
</td>
</tr>
<span id="line-50" class="anchor"></span><tr>
<td>
<p> serverClass </p>
</td>
<td>
<p> <tt>'ThreadPoolServer'</tt>, <tt>'ThreadingServer'</tt>, <tt>'ForkingServer'</tt>, <tt>'SimpleServer'</tt> </p>
</td>
<td>
<p> The server type to use, see the comments in the <tt>moin.py</tt>. The default is <tt>'ThreadPoolServer'</tt>, which create a pool of threads and reuse them for new connections. <img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in 1.3.5 </p>
</td>
</tr>
<span id="line-51" class="anchor"></span><tr>
<td>
<p> threadLimit </p>
</td>
<td>
<p> <tt>10</tt> </p>
</td>
<td>
<p> How many threads to create. <img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in 1.3.5 </p>
</td>
</tr>
<span id="line-52" class="anchor"></span><tr>
<td>
<p> requestQueueSize </p>
</td>
<td>
<p> <tt>50</tt> </p>
</td>
<td>
<p> The count of socket connection requests that are buffered by the operating system. <img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in 1.3.5 </p>
</td>
</tr>
<span id="line-53" class="anchor"></span><tr>
<td>
<p> properties </p>
</td>
<td>
<p> <tt>&nbsp;{}&nbsp;</tt> </p>
</td>
<td>
<p> allow overriding any request property by setting the value in this dict e.g <tt>properties&nbsp;=&nbsp;{'script_name':&nbsp;'/mywiki'</tt>}. <img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in 1.5 </p>
</td>
</tr>
<span id="line-54" class="anchor"></span></table>
</div>
<span id="line-55" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> There may be more options useful to moin developers, see the comments in <tt>moin.py</tt> <span id="line-56" class="anchor"></span></p>
<span id="line-57" class="anchor"></span><span id="line-58" class="anchor"></span></li>
</ul>

<h1 id="head-09dea245aaa1a9c2da2585949e627adb3e22284d">Configuring wikiconfig.py</h1>

<span id="line-59" class="anchor"></span><span id="line-60" class="anchor"></span><p>The sample config file should be just fine. <span id="line-61" class="anchor"></span></p>
<span id="line-62" class="anchor"></span><div>
<table>
<tr>
<td>
<p> <strong>Option</strong> </p>
</td>
<td>
<p> <strong>Default</strong> </p>
</td>
<td>
<p> <strong>Comment</strong> </p>
</td>
</tr>
<span id="line-63" class="anchor"></span><tr>
<td>
<p> url_prefix </p>
</td>
<td>
<p> '/wiki' </p>
</td>
<td>
<p> You should not change this, or images and css file will not be available to the wiki! </p>
</td>
</tr>
<span id="line-64" class="anchor"></span></table>
</div>
<span id="line-65" class="anchor"></span>
<h1 id="head-97336ff12bb113d4f2b55edf2d4c433001e6e54e">Starting the server</h1>

<span id="line-66" class="anchor"></span><span id="line-67" class="anchor"></span><p>Run <tt>moin.py</tt> from the command line: <span id="line-68" class="anchor"></span>
<span id="line-69" class="anchor"></span></p>
<pre>
$ ./moin.py
<span id="line-70" class="anchor"></span>Serving on localhost:8000
<span id="line-71" class="anchor"></span></pre>
<span id="line-72" class="anchor"></span><span id="line-73" class="anchor"></span><p>Test your wiki at <a class="www" href="http://localhost:8000/">http://localhost:8000/</a> <span id="line-74" class="anchor"></span></p>
<span id="line-75" class="anchor"></span><p>On Windows, you can double click <tt>moin.py</tt> to start the server. A new terminal window will be opened. Close the window or press <tt>Control&nbsp;+&nbsp;Pause</tt> to stop the server. <span id="line-76" class="anchor"></span></p>
<span id="line-77" class="anchor"></span><p>On Unix, interrupt the server with <tt>Control&nbsp;+&nbsp;C</tt> in order to shut it down. <span id="line-78" class="anchor"></span></p>
<span id="line-79" class="anchor"></span>
<h1 id="head-3da0e8e1ef007d5e29a21fda332f1982c4e7140b">Serving port 80 on Unix</h1>

<span id="line-80" class="anchor"></span><span id="line-81" class="anchor"></span><p>On GNU/Linux, Mac OS X or other Posix like OS, you can serve the standard port 80 used for web serving, but you must run as <tt>root</tt> for this. <span id="line-82" class="anchor"></span></p>
<span id="line-83" class="anchor"></span><p>Set <tt>port</tt> to 80, and verify that <tt>user</tt> and <tt>group</tt> exists on your system. If not, set them to an existing user, meant for web serving. If needed, <tt>chown</tt> your wiki dir to this user and group. <span id="line-84" class="anchor"></span></p>
<span id="line-85" class="anchor"></span><p>Run <tt>moin.py</tt> as root: <span id="line-86" class="anchor"></span>
<span id="line-87" class="anchor"></span></p>
<pre>
$ sudo moin.py
<span id="line-88" class="anchor"></span>Password:
<span id="line-89" class="anchor"></span>Serving on localhost:8000
<span id="line-90" class="anchor"></span>Running as uid/gid 70/70
<span id="line-91" class="anchor"></span></pre>
<span id="line-92" class="anchor"></span><span id="line-93" class="anchor"></span><p>Test your wiki at <a class="www" href="http://localhost/">http://localhost/</a> <span id="line-94" class="anchor"></span></p>
<span id="line-95" class="anchor"></span>
<h1 id="head-79336bdc41d8a5136baf30cad5a31b8c49b7c57b">Running as daemon</h1>

<span id="line-96" class="anchor"></span><span id="line-97" class="anchor"></span><p>If run on Unix, you can run moin.py as a background process: <span id="line-98" class="anchor"></span></p>
<ol type="1">
<li><p>Have a working <tt>moin.py</tt> as explained above <span id="line-99" class="anchor"></span></p>
</li>
<li><p>Copy the file <tt>prefix/share/moin/server/moin</tt> to your wiki directory. <span id="line-100" class="anchor"></span></p>
</li>
<li><p>Start moin server: <span id="line-101" class="anchor"></span></p>
</li>
</ol>

<span id="line-102" class="anchor"></span><pre>
./moin start
<span id="line-103" class="anchor"></span></pre>
<span id="line-104" class="anchor"></span><span id="line-105" class="anchor"></span><p>To stop the server: <span id="line-106" class="anchor"></span>
<span id="line-107" class="anchor"></span></p>
<pre>
./moin stop
<span id="line-108" class="anchor"></span></pre>
<span id="line-109" class="anchor"></span><span id="line-110" class="anchor"></span><p>For more info run <tt>moin</tt> with no arguments. <span id="line-111" class="anchor"></span></p>
<span id="line-112" class="anchor"></span><p>If you want to start moin from a system startup script, you may need to add the path to <tt>moin.py</tt> in the top of the script: <span id="line-113" class="anchor"></span>
<span id="line-114" class="anchor"></span></p>
<pre>
# Add the path to moin.py directory 
<span id="line-115" class="anchor"></span>import sys
<span id="line-116" class="anchor"></span>sys.path.insert(0, '/path/to/moin')
<span id="line-117" class="anchor"></span></pre>
<span id="line-118" class="anchor"></span><span id="line-119" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> New in release 1.5 <span id="line-120" class="anchor"></span></p>
</li>
</ul>
<span id="bottom_Include_HelpOnInstalling/StandaloneServer" class="anchor"></span>
</div>
 <span id="line-68" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-69" class="anchor"></span><span id="macosx-install" class="anchor"></span> <span id="line-70" class="anchor"></span>
<h1>Mac OS X Installation using Apache</h1>

<div lang="en" id="Include_HelpOnInstalling/ApacheOnMacOsx" dir="ltr">
<span id="top_Include_HelpOnInstalling/ApacheOnMacOsx" class="anchor"></span><span id="line-10" class="anchor"></span><span id="line-11" class="anchor"></span><p>You must not be afraid to use the terminal. It is possible but much harder to install without using the terminal. <span id="line-12" class="anchor"></span></p>
<span id="line-13" class="anchor"></span><p>There are 2 step in the installation: <span id="line-14" class="anchor"></span></p>
<ol type="1">
<li><p>Install the <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> engine - once <span id="line-15" class="anchor"></span></p>
</li>
<li><p>Create wiki instance. You can create and serve as many wikis as you like. <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span><span id="line-18" class="anchor"></span></li>
</ol>

<h1 id="head-c94edbb5fa226613bc614ed4817a423e49bfab74">Installing MoinMoin</h1>

<span id="line-19" class="anchor"></span>
<h2 id="head-fab7fde843537e1c43e51293df06cf230070066f">Download</h2>

<span id="line-20" class="anchor"></span><span id="line-21" class="anchor"></span><p>Download the source on the Desktop. You should see a <tt>moin-1.3.tar.gz</tt> file. Extract this file on the desktop with Stuffit Expander, or from the terminal (faster and safer): <span id="line-22" class="anchor"></span>
<span id="line-23" class="anchor"></span></p>
<pre>
cd ~/Desktop
<span id="line-24" class="anchor"></span>tar -xzf moin-1.3.0.tar.gz
<span id="line-25" class="anchor"></span></pre>
<span id="line-26" class="anchor"></span><span id="line-27" class="anchor"></span>
<h2 id="head-fe44f2863565a3eaecef0a33bc1e9a1f4c96638f">Install procedure</h2>

<span id="line-28" class="anchor"></span><span id="line-29" class="anchor"></span><p>Use these commands in the terminal to install the MoinMoin wiki engine into the system. <span id="line-30" class="anchor"></span></p>
<span id="line-31" class="anchor"></span><p>First, open a shell as root. You will need this to install <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> and configure the wiki. When asked, enter your password. <span id="line-32" class="anchor"></span>
<span id="line-33" class="anchor"></span></p>
<pre>
sudo -s
<span id="line-34" class="anchor"></span>... password:
<span id="line-35" class="anchor"></span></pre>
<span id="line-36" class="anchor"></span><p>Now you have root privileges in this shell. <span id="line-37" class="anchor"></span></p>
<span id="line-38" class="anchor"></span><p>Install: <span id="line-39" class="anchor"></span>
<span id="line-40" class="anchor"></span></p>
<pre>
cd moin-1.3.0
<span id="line-41" class="anchor"></span>python setup.py install --install-data='/usr/local'
<span id="line-42" class="anchor"></span></pre>
<span id="line-43" class="anchor"></span><span id="line-44" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> The --install-data='/usr/local' will put the shared data in the convenient <tt>'/usr/local/share/moin'</tt> folder. If you don't use it, your shared data will be at <tt>'/System/Library/Frameworks/Python.framework/Versions/2.3/share/moin'</tt>. On Mac OS X, '/usr' belong to Apple, and it is safer to install in '/usr/local'. <span id="line-45" class="anchor"></span></p>
<span id="line-46" class="anchor"></span><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> The default Python used by Apache is the framework one supplied by Apple.  If you have added another Python version such as through <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/DarwinPorts">DarwinPorts</a> or Fink, then you should substitute "/usr/bin/python" for "python" above or you should substitute the specific path for the Python that will be used by Apache. <span id="line-47" class="anchor"></span></p>
<span id="line-48" class="anchor"></span></li>
</ul>
<p>Now the installation is finished. You will not have to repeat this step unless you upgrade moin. <span id="line-49" class="anchor"></span></p>
<span id="line-50" class="anchor"></span>
<h2 id="head-7cf05b3d73a21fa16eabfdced354c3e079182014">Optional Installs</h2>

<span id="line-51" class="anchor"></span><span id="line-52" class="anchor"></span>
<h3 id="head-223faa3a0e587eb269f79e3faf05d3851d778e8d">RSS</h3>

<span id="line-53" class="anchor"></span><span id="line-54" class="anchor"></span><p>If you want your wiki to support RSS and Mozilla Firefox Live Bookmarks features, you have to install PyXML. Get PyXML from <a class="www" href="http://sourceforge.net/projects/pyxml/">http://sourceforge.net/projects/pyxml/</a> and install according to the instructions. <span id="line-55" class="anchor"></span></p>

<h1 id="head-0cd30234950a8438af556cb7a93ef4dd346358a3">Creating a wiki</h1>

<span id="line-56" class="anchor"></span><span id="line-57" class="anchor"></span><p>After you have installed the software, you need to create a wiki. You may create several wikis if you need. <span id="line-58" class="anchor"></span></p>
<span id="line-59" class="anchor"></span>
<h2 id="head-df71f35b5f6ca32f75dd1e1d9c71a7113906c308">Copying a template wiki</h2>

<span id="line-60" class="anchor"></span><span id="line-61" class="anchor"></span><p>Copy a template wiki from the <tt>/usr/local/share/moin</tt>. Do not try to run the wiki from <tt>/usr/local/share/moin/data</tt> because your wiki will be overwritten when you install a new version of moin. <span id="line-62" class="anchor"></span></p>
<span id="line-63" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/attention.png" alt="&lt;!&gt;" height="15" width="15"> <strong>Security warning: do not put your wiki folder where the web server can access it! Your wiki should not be at the "Sites" folder in your home folder.</strong> <span id="line-64" class="anchor"></span></p>
<span id="line-65" class="anchor"></span></li>
</ul>
<p>The following instructions will create a wiki called "mywiki". You can choose any name you like, except the reserved name "wiki". <span id="line-66" class="anchor"></span></p>
<span id="line-67" class="anchor"></span><p>Do these commands: <span id="line-68" class="anchor"></span>
<span id="line-69" class="anchor"></span></p>
<pre>
cd /usr/local/share/moin
<span id="line-70" class="anchor"></span>mkdir mywiki
<span id="line-71" class="anchor"></span>cp -r data mywiki
<span id="line-72" class="anchor"></span>cp -r underlay mywiki
<span id="line-73" class="anchor"></span>cp server/moin.cgi mywiki
<span id="line-74" class="anchor"></span>cp config/wikiconfig.py mywiki
<span id="line-75" class="anchor"></span></pre>
<span id="line-76" class="anchor"></span><span id="line-77" class="anchor"></span>
<h2 id="head-49456651956c5f3bbba97c6917e54be2420fbf14">Setting Permissions</h2>

<span id="line-78" class="anchor"></span><span id="line-79" class="anchor"></span><p>You have to make the web server the owner of the files in your wiki. Unless you changed the default configuration, both are 'www'. <span id="line-80" class="anchor"></span>
<span id="line-81" class="anchor"></span></p>
<pre>
chown -R www:www mywiki
<span id="line-82" class="anchor"></span>chmod -R ug+rwX mywiki
<span id="line-83" class="anchor"></span>chmod -R o-rwx mywiki
<span id="line-84" class="anchor"></span></pre>
<span id="line-85" class="anchor"></span><span id="line-86" class="anchor"></span>
<h2 id="head-31a82db9b85a63663e1b46abf203b3c0abdb5fad">Configure Apache</h2>

<span id="line-87" class="anchor"></span><span id="line-88" class="anchor"></span><p>We'll use the pico editor: <span id="line-89" class="anchor"></span>
<span id="line-90" class="anchor"></span></p>
<pre>
pico /etc/httpd/httpd.conf
<span id="line-91" class="anchor"></span></pre>
<span id="line-92" class="anchor"></span><span id="line-93" class="anchor"></span><p>Go to the end of the Aliases section and edit like the example below: <span id="line-94" class="anchor"></span>
<span id="line-95" class="anchor"></span></p>
<pre>
    Alias /wiki/ "/usr/local/share/moin/htdocs/"      
<span id="line-96" class="anchor"></span>    ScriptAlias /mywiki "/usr/local/share/moin/mywiki/moin.cgi"       
<span id="line-97" class="anchor"></span></pre>
<span id="line-98" class="anchor"></span><p>Use Control+O to save the file and Control+X to exit pico. <span id="line-99" class="anchor"></span></p>
<span id="line-100" class="anchor"></span><p>Restart Apache - open System Preferences, go to the Sharing page, select "Personal Web Sharing" and click "Stop" then "Start". Or just type this instead: <span id="line-101" class="anchor"></span>
<span id="line-102" class="anchor"></span></p>
<pre>
apachectl graceful
<span id="line-103" class="anchor"></span>... /usr/sbin/apachectl graceful: httpd gracefully restarted
<span id="line-104" class="anchor"></span></pre>
<span id="line-105" class="anchor"></span><span id="line-106" class="anchor"></span><span id="line-107" class="anchor"></span><p>Instance creation finished - exit from the shell with the root privileges - working as root is dangerous. <span id="line-108" class="anchor"></span>
<span id="line-109" class="anchor"></span></p>
<pre>
exit
<span id="line-110" class="anchor"></span></pre>
<span id="line-111" class="anchor"></span><p>Now you are running again safely. <span id="line-112" class="anchor"></span></p>
<span id="line-113" class="anchor"></span><span id="line-114" class="anchor"></span>
<h2 id="head-eb585ff24f9cd4b445a74b848cd1c5ec2b10706a">Testing Your New Wiki</h2>

<span id="line-115" class="anchor"></span><span id="line-116" class="anchor"></span><p>In a web-browser surf to the site: <a class="www" href="http://localhost/mywiki">http://localhost/mywiki</a> <span id="line-117" class="anchor"></span></p>
<span id="line-118" class="anchor"></span><p>You should see the FrontPage of your new wiki. <span id="line-119" class="anchor"></span></p>
<span id="line-120" class="anchor"></span><p>Now run the unit tests, to make sure everything is fine. Go to this address: <a class="www" href="http://localhost/mywiki?action=test">http://localhost/mywiki?action=test</a> <span id="line-121" class="anchor"></span></p>
<span id="line-122" class="anchor"></span><p>You should see a report on the wiki and tests results for the <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> engine. If some of the tests fail, please report the problem on <a class="external" href="http://moinmoin.wikiwikiweb.de/MoinMoinBugs">MoinMoinBugs</a>. <span id="line-123" class="anchor"></span></p>
<span id="line-124" class="anchor"></span>
<h2 id="head-14a0f4b701dc07823ca965841351a2bd3d021b8e">Configuring Your wiki</h2>

<span id="line-125" class="anchor"></span><span id="line-126" class="anchor"></span><p>The wiki you created is a new "Untitled Wiki", using the default configuration. You want to give a better name and setup some configuration values. Open <tt>wikiconfig.py</tt> and read the comments. You can edit the file with any text editor, like pico, emacs, or BBEdit.  <span id="line-127" class="anchor"></span></p>
<span id="line-128" class="anchor"></span><ul>
<li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> Note that the file belongs to user and group www:www. You can edit the file as root, or change the group of the file to yourself with <tt>chown&nbsp;www:username&nbsp;wikiconfig.py</tt>. <span id="line-129" class="anchor"></span></p>
<span id="line-130" class="anchor"></span></li>
</ul>
<p>For more help on configuration, see <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a>. <span id="line-131" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/ApacheOnMacOsx" class="anchor"></span>
</div>
 <span id="line-71" class="anchor"></span></p>
<hr class="hr1">
<p> <span id="line-72" class="anchor"></span><span id="win32apache-install" class="anchor"></span> <span id="line-73" class="anchor"></span>
<h1>Windows Installation using Apache</h1>

<div lang="en" id="Include_HelpOnInstalling/ApacheOnWin32" dir="ltr">
<span id="top_Include_HelpOnInstalling/ApacheOnWin32" class="anchor"></span><span id="line-8" class="anchor"></span><p><strong>Index</strong> <span id="line-9" class="anchor"></span><ol>
<li><a href="#head-3c727e631e2668b26b0f23f76dfaca64e810648e">Requirements</a></li>
<li><a href="#head-18c7f9f6c7f20cad8a2598f80aba6a6b36bae585">Preparation</a><ol>
<li><a href="#head-ce3f1899eb42247cc89c79893ca80eb5da56d2d4">MSI Installer</a></li>
<li><a href="#head-b1287e95efcad1b36cc2c15f825e1de198ebfcf6">Installing Apache</a></li>
<li><a href="#head-55b68c00864e2a0be48f87115a45f6a17a76bcc0">Installing Python</a></li>
</ol>
<li><a href="#head-c76f9a659995f587c02878baf3877ab5bd08a5bd">Installing MoinMoin</a></li>
<li><a href="#head-ba9ed0d8dd27b7bc62472aa0d24e8102dd103deb">Creating a Wiki Instance</a></li>
<li><a href="#head-42c812a9d38d3af1de6c09ed952ac1858c5221b8">Integrating MoinMoin into Apache</a></li>
<li><a href="#head-82ba5417401e5b5cb78836b4f23ef160fbc80630">Troubleshooting</a><ol>
<li><a href="#head-01d84d7e6494dcee0bd2abfbb04f43f812c9bdd7">Internal Server Error</a></li>
<li><a href="#head-7a4c0881ccb7242b9857811b27dc07ad836889d0">Not Found</a></li>
<li><a href="#head-d9b4f0491158f7280b4bf1693d990336527ebf4d">The Page Cannot be found</a></li>
<li><a href="#head-d47936fa3c21c07d857b27fdb811e5836635a100">FrontPage Loads Without Icons</a></li>
</ol>
</li>
</ol>
 <span id="line-10" class="anchor"></span></p>
<span id="line-11" class="anchor"></span>
<h2 id="head-3c727e631e2668b26b0f23f76dfaca64e810648e">Requirements</h2>

<span id="line-12" class="anchor"></span><span id="line-13" class="anchor"></span><p>Before you install Moin<tt></tt>Moin, you must have the necessary infrastructure in place. This procedure explains the steps necessary to install the infrastructure and provides detailed instructions for the installation of Moin<tt></tt>Moin.  <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><p>Downloading and installing all of the required components will require almost 100 MB of disk space - shouldn't be a problem nowadays, right? <span id="line-16" class="anchor"></span></p>
<span id="line-17" class="anchor"></span><p>Many users prefer to install software products in a folder other than the installation default. Python typically changes the default installation folder name with each point release, and Apache has changed the default installation folder name with the release of version 2.  Instead of enumerating all the possibilities at each step, this procedure will use the <strong>Reference</strong> name in the table below as the installed location for each product. Substitute your real installation location when editing configuration files and entering commands. <span id="line-18" class="anchor"></span></p>
<span id="line-19" class="anchor"></span><div>
<table>
<tr style="background-color: #EEDDAA;">
<td>
<p>Reference</p>
</td>
<td>
<p>Product</p>
</td>
<td>
<p>Installation Default or Typical Name</p>
</td>
</tr>
<span id="line-20" class="anchor"></span><tr>
<td>
<p><strong>C:\Apache</strong></p>
</td>
<td>
<p> Apache</p>
</td>
<td>
<p>C:\Program Files\Apache Group\Apache2</p>
</td>
</tr>
<span id="line-21" class="anchor"></span><tr>
<td>
<p><strong>C:\Python</strong></p>
</td>
<td>
<p>Python</p>
</td>
<td>
<p>C:\Python22</p>
</td>
</tr>
<span id="line-22" class="anchor"></span><tr>
<td>
<p><strong>C:\Moin</strong></p>
</td>
<td>
<p>wiki instances</p>
</td>
<td>
<p>C:\My Documents\Moin</p>
</td>
</tr>
<span id="line-23" class="anchor"></span></table>
</div>
<span id="line-24" class="anchor"></span><p>This installation procedure was tested with Apache 1.3.26 and Apache 2.0.44 for Windows running on Windows ME, and using Python 2.3. <span id="line-25" class="anchor"></span></p>
<span id="line-26" class="anchor"></span>
<h2 id="head-18c7f9f6c7f20cad8a2598f80aba6a6b36bae585">Preparation</h2>

<span id="line-27" class="anchor"></span><span id="line-28" class="anchor"></span>
<h3 id="head-ce3f1899eb42247cc89c79893ca80eb5da56d2d4">MSI Installer</h3>

<span id="line-29" class="anchor"></span><p>Installation of Apache and one alternative distribution of Python require the Microsoft <strong>MSI Installer</strong>.  The latest version, 2.0, was released in September of 2001. You will know you don't have the correct version if you receive errors after double-clicking on a file name ending in <strong>.msi</strong>. To get the latest version, go to <a class="www" href="http://www.microsoft.com/">http://www.microsoft.com/</a>, search for <strong>msi installer</strong>, and follow the instructions.  There are two versions, one for Windows ME, 98, and 95; and another for Windows 2000 and NT. Windows XP has the 2.0 version and requires no update. <span id="line-30" class="anchor"></span></p>
<span id="line-31" class="anchor"></span>
<h3 id="head-b1287e95efcad1b36cc2c15f825e1de198ebfcf6">Installing Apache</h3>

<span id="line-32" class="anchor"></span><span id="line-33" class="anchor"></span><p>To obtain the latest version of Apache, go to <a class="www" href="http://www.apache.org/">http://www.apache.org/</a>, and click on the link to <strong>HTTP Server</strong>. Find the link to download the <strong>Win32 Binary (MSI Installer)</strong> version. Read the Apache documentation to determine the correct installation procedure for your situation.  Questions and problems with the Apache installation process should be resolved through use of the resources provided by the Apache organization. Be sure your webserver runs correctly before proceeding.  <span id="line-34" class="anchor"></span></p>
<span id="line-35" class="anchor"></span><p><strong>Warning:</strong> the procedure described above tends to trivialize the installation of the Apache web server. Apache can be installed and running on your PC in a very few minutes with only a cursory examination of the Apache documentation.  Before you undertake the installation of any web server that can be accessed through the internet, you should exercise a controlled level of paranoia and assess the potential damage that may be caused by hackers accessing or destroying sensitive data. This should include not only the all data which resides on the PC which will host the Apache web server, but all other PCs on the local LAN which participate in any form of file sharing.   <span id="line-36" class="anchor"></span></p>
<span id="line-37" class="anchor"></span><p>Windows ME, 98SE, 98, 95, and probably NT should be considered inappropriate hosts for any Apache web server that can be accessed via the internet.  Use either Windows 2000 or XP and install all security patches available for your operating system. <span id="line-38" class="anchor"></span></p>
<span id="line-39" class="anchor"></span><p>Do not let the above discourage you from installing Moin<tt></tt>Moin.  Most of the internet activity probing your system for weaknesses will be from virus infected Windows NT systems running IIS whose owners have neglected to apply available security patches. The starting Apache configuration is secure and you will not have a problem provided you: <span id="line-40" class="anchor"></span></p>
<ul>
<li><p>Regularly review and apply security patches for your installed software. <span id="line-41" class="anchor"></span></p>
</li>
<li><p>Understand the ramifications of any changes you make to the Apache config files. <span id="line-42" class="anchor"></span></p>
</li>
<li><p>Regularly review the Apache logs for suspicious activity. <span id="line-43" class="anchor"></span></p>
</li>
<li><p>Regularly take backups of your data. <span id="line-44" class="anchor"></span></p>
<span id="line-45" class="anchor"></span></li>
</ul>

<h3 id="head-55b68c00864e2a0be48f87115a45f6a17a76bcc0">Installing Python</h3>

<span id="line-46" class="anchor"></span><span id="line-47" class="anchor"></span><p>There are currently two different distributions of Python available for Windows. The normal Python distribution is available from <a class="www" href="http://www.python.org">http://www.python.org</a>. This is distributed as a windows executable (.exe) file. <span id="line-48" class="anchor"></span></p>
<span id="line-49" class="anchor"></span><p>An alternative distribution called <strong>Active<tt></tt>Python</strong> is available from <a class="www" href="http://www.activestate.com/">http://www.activestate.com/</a>. This distribution uses the MSI Installer and contains some tools specific to the Windows operating system and a popular Windows IDE called Pythonwin.  Active<tt></tt>Python is available for free; an email address is requested (but not required) before downloading. <span id="line-50" class="anchor"></span></p>
<span id="line-51" class="anchor"></span><p>Moin<tt></tt>Moin will work with either distribution, but requires Python release 2.3 or later.  Download and install the distribution of your choice.  Questions and problems dealing with the Python installation process should be resolved through the use of resources provided by Python.org or Active<tt></tt>State.  Be sure your Python installation is correct before proceeding. <span id="line-52" class="anchor"></span></p>
<span id="line-53" class="anchor"></span>
<h2 id="head-c76f9a659995f587c02878baf3877ab5bd08a5bd">Installing MoinMoin</h2>

<span id="line-54" class="anchor"></span><p>Download the current version of Moin<tt></tt>Moin from <a class="www" href="http://moinmoin.wikiwikiweb.de/">http://moinmoin.wikiwikiweb.de/</a> into <tt>C:\TEMP</tt> or an alternative location. To extract the <em>.tar.gz</em>-format archive, you may use Win<tt></tt>Zip. <span id="line-55" class="anchor"></span></p>
<span id="line-56" class="anchor"></span><p>You should then have a folder such as <tt>C:\TEMP\moin-x.x</tt> where "x.x" is the current release number. This folder will contain a <tt>setup.py</tt> file in addition to several other files and subfolders. <span id="line-57" class="anchor"></span></p>
<span id="line-58" class="anchor"></span><p>Open an MS-DOS or console window and enter the commands: <span id="line-59" class="anchor"></span>
<span id="line-60" class="anchor"></span></p>
<pre>
C:
<span id="line-61" class="anchor"></span>cd \TEMP\moin-x.x
<span id="line-62" class="anchor"></span>C:\Python\python setup.py install --record=install.log
<span id="line-63" class="anchor"></span></pre>
<span id="line-64" class="anchor"></span><span id="line-65" class="anchor"></span><p>The above commands will add Moin<tt></tt>Moin to your <tt>C:\Python</tt> installation and create an <tt>install.log</tt> file in <tt>C:\temp\moin-x.x</tt> listing all the copied files. You may use Windows Explorer to examine the newly created folders within <tt>C:\Python</tt>. You should find a <tt>C:\Python\share\moin</tt> folder. With Python 2.3 and later you will also find a <tt>C:\Python\Lib\site-packages\MoinMoin</tt> folder. The <tt>MoinMoin</tt> folder contains many Python scripts and several subfolders. <span id="line-66" class="anchor"></span></p>
<span id="line-67" class="anchor"></span><p>You are now ready to create a wiki instance. <span id="line-68" class="anchor"></span></p>
<span id="line-69" class="anchor"></span>
<h2 id="head-ba9ed0d8dd27b7bc62472aa0d24e8102dd103deb">Creating a Wiki Instance</h2>

<span id="line-70" class="anchor"></span><p>It is a good practice to try to keep all of your personal or site specific data under a few root folders. This way you can easily backup your important data on a regular basis without having to waste time either backing up static files or picking out dozens of important folders scattered throughout your folder structure.  You should avoid placing your wiki data under the <tt>C:\Python</tt> folder so that you can later upgrade Python or Moin<tt></tt>Moin without accidentally overwriting or deleting your wiki data.  For the same reason, you probably don't want to place your wiki data within the <tt>C:\Apache</tt> folder. The default personal folder under many Windows versions is called <tt>C:\My&nbsp;Documents</tt>.   <span id="line-71" class="anchor"></span></p>
<span id="line-72" class="anchor"></span><p>Choose a location appropriate for you; the following instructions assume you will be creating one or more wiki instances in <tt>C:\Moin\</tt> and the first wiki instance will be named <tt>mywiki</tt>. <span id="line-73" class="anchor"></span></p>
<span id="line-74" class="anchor"></span><p>You may replace the name <tt>mywiki</tt> with almost any name you wish, but do not use <tt>wiki</tt> because that is used by Moin<tt></tt>Moin for loading standard images and style sheets. Although this can be changed later, the plan is that the name you choose for <tt>mywiki</tt> will become part of the url used to access your site, e.g. <tt>http://myorganization.org/mywiki/FrontPage</tt>. <span id="line-75" class="anchor"></span></p>
<span id="line-76" class="anchor"></span><p>Start an MS-DOS or console window and enter the commands below. This will create a clone of the Moin<tt></tt>Moin wiki in the mywiki folder.  <span id="line-77" class="anchor"></span></p>
<span id="line-78" class="anchor"></span>
<span id="line-79" class="anchor"></span><pre>
cd C:\ 
<span id="line-80" class="anchor"></span>md Moin
<span id="line-81" class="anchor"></span>md Moin\mywiki
<span id="line-82" class="anchor"></span>md Moin\mywiki\data
<span id="line-83" class="anchor"></span>md Moin\mywiki\underlay
<span id="line-84" class="anchor"></span>cd \Python\share\moin
<span id="line-85" class="anchor"></span>xcopy data        C:\Moin\mywiki\data /E
<span id="line-86" class="anchor"></span>xcopy underlay    C:\Moin\mywiki\underlay /E
<span id="line-87" class="anchor"></span>copy  config\*.* C:\Moin\mywiki\*.*
<span id="line-88" class="anchor"></span>copy  server\*.* C:\Moin\mywiki\*.*
<span id="line-89" class="anchor"></span></pre>
<span id="line-90" class="anchor"></span><span id="line-91" class="anchor"></span><p>If your server is going to run multiple wikis, you need to create additional clones. Do the same commands again, but use mywiki2 instead of mywiki. <span id="line-92" class="anchor"></span></p>
<span id="line-93" class="anchor"></span><p>Edit <tt>C:\Moin\mywiki\wikiconfig.py</tt> and at least change <tt>sitename</tt> to the name of your wiki: <span id="line-94" class="anchor"></span>
<span id="line-95" class="anchor"></span></p>
<pre>
    sitename = 'My Wiki'
<span id="line-96" class="anchor"></span></pre>
<span id="line-97" class="anchor"></span><span id="line-98" class="anchor"></span><p>Additionally, set <tt>data_dir</tt> and <tt>data_underlay_dir</tt> to the absolute paths of the particular directories. Like here: <span id="line-99" class="anchor"></span>
<span id="line-100" class="anchor"></span></p>
<pre>
    data_dir = r'C:\Moin\mywiki\data'
<span id="line-101" class="anchor"></span>    data_underlay_dir = r'C:\Moin\mywiki\underlay'
<span id="line-102" class="anchor"></span></pre>
<span id="line-103" class="anchor"></span><span id="line-104" class="anchor"></span><p>For a personal or intranet installation, you'll normally also add this line to <tt>wikiconfig.py</tt>: <span id="line-105" class="anchor"></span>
<span id="line-106" class="anchor"></span></p>
<pre>
    allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage', ]
<span id="line-107" class="anchor"></span></pre>
<span id="line-108" class="anchor"></span><span id="line-109" class="anchor"></span><p>If you will <em><strong>not</strong></em> be running a Wiki farm (if you're not sure what this means, then you probably won't be), make sure to delete the <tt>farmconfig.py</tt> file from the <tt>C:\Moin\mywiki</tt> directory, or else <tt>moin.cgi</tt> will most likely give off various errors (including one about not being able to find a configuration file) and will ultimately fail to start up properly. <span id="line-110" class="anchor"></span></p>
<span id="line-111" class="anchor"></span><p>Additional configuration details can be found in <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a>. <span id="line-112" class="anchor"></span></p>
<span id="line-113" class="anchor"></span>
<h2 id="head-42c812a9d38d3af1de6c09ed952ac1858c5221b8">Integrating MoinMoin into Apache</h2>

<span id="line-114" class="anchor"></span><p>Use your editor to edit the file <tt>C:\Moin\mywiki\moin.cgi</tt>.  Change the first line (the shebang statement) to point to your local Python executable program. Note the forward slashes -- Apache uses the Unix convention for folder separators. This tells Apache the <tt>moin.cgi</tt> file is an executable script that will be interpreted by a program to be loaded from <tt>C:/Python/python</tt>. <span id="line-115" class="anchor"></span></p>
<pre>

<span id="line-116" class="anchor"></span>#! C:/Python/python
<span id="line-117" class="anchor"></span></pre>
<span id="line-118" class="anchor"></span><span id="line-119" class="anchor"></span><p>After that, you may need to activate the lines which add a folder to the sys.path and enter your path to <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> there if you have <strong>not</strong> installed <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> to the site-packages dir: <span id="line-120" class="anchor"></span>
<span id="line-121" class="anchor"></span><span id="line-122" class="anchor"></span><span id="line-123" class="anchor"></span></p>
<div lang="en" class="codearea" dir="ltr">
<script type="text/JavaScript">
function isnumbered(obj) {
  return obj.childNodes.length && obj.firstChild.childNodes.length && obj.firstChild.firstChild.className == 'LineNumber';
}
function nformat(num,chrs,add) {
  var nlen = Math.max(0,chrs-(''+num).length), res = '';
  while (nlen>0) { res += ' '; nlen-- }
  return res+num+add;
}
function addnumber(did, nstart, nstep) {
  var c = document.getElementById(did), l = c.firstChild, n = 1;
  if (!isnumbered(c))
    if (typeof nstart == 'undefined') nstart = 1;
    if (typeof nstep  == 'undefined') nstep = 1;
    n = nstart;
    while (l != null) {
      if (l.tagName == 'SPAN') {
        var s = document.createElement('SPAN');
        s.className = 'LineNumber'
        s.appendChild(document.createTextNode(nformat(n,4,' ')));
        n += nstep;
        if (l.childNodes.length)
          l.insertBefore(s, l.firstChild)
        else
          l.appendChild(s)
      }
      l = l.nextSibling;
    }
  return false;
}
function remnumber(did) {
  var c = document.getElementById(did), l = c.firstChild;
  if (isnumbered(c))
    while (l != null) {
      if (l.tagName == 'SPAN' && l.firstChild.className == 'LineNumber') l.removeChild(l.firstChild);
      l = l.nextSibling;
    }
  return false;
}
function togglenumber(did, nstart, nstep) {
  var c = document.getElementById(did);
  if (isnumbered(c)) {
    remnumber(did);
  } else {
    addnumber(did,nstart,nstep);
  }
  return false;
}
</script>

<script type="text/javascript">
document.write('<a href="#" onClick="return togglenumber(\'CA-ae7207ce08c12f42f82f00c644b7aa0c244223a5_000\', 1, 1);" \
                class="codenumbers">Toggle line numbers<\/a>');
</script>
<pre lang="en" id="CA-ae7207ce08c12f42f82f00c644b7aa0c244223a5_000" dir="ltr">
<span class="line"><span class="LineNumber">   1 </span><span class="ResWord">import</span> <span class="ID">sys</span></span>
<span class="line"><span class="LineNumber">   2 </span><span class="ID">sys</span><span class="Operator">.</span><span class="ID">path</span><span class="Operator">.</span><span class="ID">insert</span><span class="Operator">(</span><span class="Number">0</span><span class="Operator">,</span> <span class="String">r'C:\Moin\...'</span><span class="Operator">)</span><span class="Text"></span></span>
</pre>
</div>
<span id="line-124" class="anchor"></span><span id="line-125" class="anchor"></span><p>The next step is to tell Apache that is has more work to do. <span id="line-126" class="anchor"></span>Use your editor to append the following lines to <tt>C:\Apache\conf\httpd.conf</tt>. Note the presence and absence of trailing slashes, it is important to enter the lines exactly as shown below. <span id="line-127" class="anchor"></span>
<span id="line-128" class="anchor"></span></p>
<pre>
Alias       /wiki/     "C:/Python/share/moin/htdocs/"
<span id="line-129" class="anchor"></span>ScriptAlias /mywiki    "C:/Moin/mywiki/moin.cgi"
<span id="line-130" class="anchor"></span></pre>
<span id="line-131" class="anchor"></span><span id="line-132" class="anchor"></span><p>The <strong>Alias</strong> lines for <tt>wiki</tt> above instructs Apache to serve images, style sheets, etc. from the specified folders and subfolders. The <strong>Script<tt></tt>Alias</strong> line is needed once for each wiki instance, so if you have multiple wikis, repeat the statement using mywiki2, mywiki3, etc. The Script<tt></tt>Alias statement instructs Apache to execute scripts from the specified folder. See the Apache docs for a complete explanation. <span id="line-133" class="anchor"></span></p>
<span id="line-134" class="anchor"></span><p>Test your changes by restarting your Apache server and try to access your newborn wiki with the URL <tt>http://127.0.0.1/mywiki</tt>. You should see the Front<tt></tt>Page, try to edit and save it, and if that works, verify your edit is reflected on the Recent<tt></tt>Changes page. <span id="line-135" class="anchor"></span></p>
<span id="line-136" class="anchor"></span><p>And now, it is up to you and your user community to transform your wiki into an informative and useful tool. You will probably want to retain most of the Help<tt></tt>On~ pages dealing with editing, delete those pages with irrelevant information (like this page, don't let your users or boss know how easy it was to install Moin<tt></tt>Moin <img src="wiki/htdocs/modern/img/smile4.png" alt=";)" height="15" width="15"> ), and rewrite the Front<tt></tt>Page to introduce your wiki topic.  <span id="line-137" class="anchor"></span></p>
<span id="line-138" class="anchor"></span>
<h2 id="head-82ba5417401e5b5cb78836b4f23ef160fbc80630">Troubleshooting</h2>

<span id="line-139" class="anchor"></span><p>The first place to look for clues when the unexpected happens is to try changing your url to: <tt>http://127.0.0.1/mywiki?action=test</tt>. If Apache can find and execute the module <tt>C:/Moin/mywiki/moin.cgi</tt>, a page of diagnostics titled <strong>Moin<tt></tt>Moin CGI Diagnosis</strong> will be displayed. Check the output for error messages. <span id="line-140" class="anchor"></span></p>
<span id="line-141" class="anchor"></span><p>The second place to look for is <tt>C:\Apache\logs\error.log</tt>. The following are common errors grouped by the message displayed by your browser. <span id="line-142" class="anchor"></span></p>
<span id="line-143" class="anchor"></span>
<h3 id="head-01d84d7e6494dcee0bd2abfbb04f43f812c9bdd7">Internal Server Error</h3>

<span id="line-144" class="anchor"></span><span id="line-145" class="anchor"></span><p>If the Apache log shows a message "The system cannot find the file specified." then a possibility is the shebang statement in <tt>moin.cgi</tt> is incorrect. <span id="line-146" class="anchor"></span></p>
<span id="line-147" class="anchor"></span><p>If the Apache log shows a different error message, then the Moin<tt></tt>Moin Python scripts may be abending. To determine the cause, you could try temporarily renaming <tt>moin.cgi</tt> to <tt>moin.py</tt>, loading <tt>moin.py</tt> with the Python <strong>idle</strong> IDE and executing it to determine if there are any error messages. <span id="line-148" class="anchor"></span></p>
<span id="line-149" class="anchor"></span>
<h3 id="head-7a4c0881ccb7242b9857811b27dc07ad836889d0">Not Found</h3>

<span id="line-150" class="anchor"></span><p>If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/mywiki",  the <strong>Script<tt></tt>Alias</strong> statement in <tt>httpd.conf</tt> may be incorrect. <span id="line-151" class="anchor"></span></p>
<span id="line-152" class="anchor"></span>
<h3 id="head-d9b4f0491158f7280b4bf1693d990336527ebf4d">The Page Cannot be found</h3>

<span id="line-153" class="anchor"></span><p>If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/????", you may have mistyped the url "<a class="www" href="http://127.0.0.1/mywiki">http://127.0.0.1/mywiki</a>" into your browser. <span id="line-154" class="anchor"></span></p>
<span id="line-155" class="anchor"></span>
<h3 id="head-d47936fa3c21c07d857b27fdb811e5836635a100">FrontPage Loads Without Icons</h3>

<span id="line-156" class="anchor"></span><p>If the Apache Error log shows many error messages "File does not exist: C:/Apache/htdocs/wiki", then the <strong>Alias</strong> statement in <tt>httpd.conf</tt> may be incorrect. <span id="line-157" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/ApacheOnWin32" class="anchor"></span>
</div>
 <span id="line-74" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-75" class="anchor"></span><span id="win32iis-install" class="anchor"></span> <span id="line-76" class="anchor"></span>
<h1>Windows Installation using IIS</h1>

<div lang="en" id="Include_HelpOnInstalling/InternetInformationServer" dir="ltr">
<span id="top_Include_HelpOnInstalling/InternetInformationServer" class="anchor"></span><span id="line-8" class="anchor"></span><span id="line-9" class="anchor"></span><p><strong>Index</strong> <span id="line-10" class="anchor"></span><ol>
<li><a href="#head-060b14babb0736cc50274d972342cb03248902b9">Requirements</a></li>
<li><a href="#head-5ba445062f460e5652dc22727c85420aeece6353">Preparation</a><ol>
<li><a href="#head-4f6e8cac8cfeabe2476189c3adfc5c9782ab423b">Installing IIS</a></li>
<li><a href="#head-124918b94fdd224ff1d6bfff86c7525168676c98">Installing Python</a></li>
<li><a href="#head-a1cff6121b8b9ce2a1b1d94e923ae54f0b89ce4c">Installing MoinMoin</a></li>
</ol>
<li><a href="#head-c5d24a8b08d751dc989c57e5ec58363b55bef1b3">Creating a Wiki Instance</a><ol>
<li><a href="#head-890abdbd0d21bf874ce794be87067abf433a51d7">IIS 6.0 (Windows Server 2003)</a></li>
</ol>
<li><a href="#head-086499a2b43629c3fef3b36dc435cff210e32faa">Troubleshooting</a></li>
</ol>
 <span id="line-11" class="anchor"></span></p>
<span id="line-12" class="anchor"></span>
<h2 id="head-060b14babb0736cc50274d972342cb03248902b9">Requirements</h2>

<span id="line-13" class="anchor"></span><span id="line-14" class="anchor"></span><p>Before you install <a class="interwiki" title="MoinMoin" href="http://moinmoin.wikiwikiweb.de/MoinMoin">MoinMoin</a>, make sure you have the necessary infra-structure in place, namely the <em>Internet Information Services</em> webserver (any version should be OK), and a <em>Python</em> installation (version 2.3 is required, the latest python release is recommended). <span id="line-15" class="anchor"></span></p>
<span id="line-16" class="anchor"></span><p>In the following description, we assume that you have installed or will install things to these locations: <span id="line-17" class="anchor"></span></p>
<ul>
<li><p>IIS to its default location <span id="line-18" class="anchor"></span></p>
</li>
<li><p><tt>C:\Python</tt> - the Python interpreter <span id="line-19" class="anchor"></span></p>
</li>
<li><p><tt>C:\Moin</tt> - Moin<tt></tt>Moin itself <span id="line-20" class="anchor"></span></p>
<span id="line-21" class="anchor"></span></li>
</ul>
<p>Quite often, you might want to install things elsewhere, which is no problem at all; you just have to adapt any paths that appear in a command or config file to the locations you have chosen. <span id="line-22" class="anchor"></span></p>
<span id="line-23" class="anchor"></span><p>This installation procedure was tested with IIS 5.1 for Windows running on Windows XP SP2, using Python 2.4. <span id="line-24" class="anchor"></span></p>
<span id="line-25" class="anchor"></span>
<h2 id="head-5ba445062f460e5652dc22727c85420aeece6353">Preparation</h2>

<span id="line-26" class="anchor"></span><span id="line-27" class="anchor"></span>
<h3 id="head-4f6e8cac8cfeabe2476189c3adfc5c9782ab423b">Installing IIS</h3>

<span id="line-28" class="anchor"></span><span id="line-29" class="anchor"></span><p>You currently need an external webserver to run Moin<tt></tt>Moin.  <span id="line-30" class="anchor"></span></p>
<span id="line-31" class="anchor"></span><p>From Microsoft: (<a class="www" href="http://www.microsoft.com/windows2000/en/server/iis/">http://www.microsoft.com/windows2000/en/server/iis/</a>) <span id="line-32" class="anchor"></span></p>
<span id="line-33" class="anchor"></span><ul>
<li style="list-style-type:none"><p>To install IIS, add components, or remove components: <span id="line-34" class="anchor"></span></p>
<span id="line-35" class="anchor"></span><p>Click Start, point to Settings, click Control Panel and start the Add/Remove Programs application.  <span id="line-36" class="anchor"></span>Select Configure Windows, click the Components button, and then follow the on-screen instructions  <span id="line-37" class="anchor"></span>to install, remove, or add components to IIS.  <span id="line-38" class="anchor"></span></p>
<span id="line-39" class="anchor"></span></li>
</ul>
<p>Make sure that your webserver runs without problems before you start to install Moin<tt></tt>Moin; problems with your webserver installation are not in the scope of this document. <span id="line-40" class="anchor"></span></p>
<span id="line-41" class="anchor"></span>
<h3 id="head-124918b94fdd224ff1d6bfff86c7525168676c98">Installing Python</h3>

<span id="line-42" class="anchor"></span><span id="line-43" class="anchor"></span><p>Download <a class="external" href="http://www.python.org/ftp/python/2.3.4/Python-2.3.4.exe">Python 2.3.4</a> and install it. Python installation is done via a standard Windows installer program. <span id="line-44" class="anchor"></span></p>
<span id="line-45" class="anchor"></span><p>Alternatively, you may download the <a class="external" href="http://www.activestate.com/Products/ActivePython/">ActivePython distribution</a> as a Microsoft Installer package. <span id="line-46" class="anchor"></span></p>
<span id="line-47" class="anchor"></span>
<h3 id="head-a1cff6121b8b9ce2a1b1d94e923ae54f0b89ce4c">Installing MoinMoin</h3>

<span id="line-48" class="anchor"></span><span id="line-49" class="anchor"></span><p>Before creating a wiki instance, you have to download and install the basic Moin<tt></tt>Moin software. We assume you already have downloaded the distribution archive to the "<tt>C:\TEMP</tt>" directory. <span id="line-50" class="anchor"></span></p>
<span id="line-51" class="anchor"></span><p>Open a console window and enter the following commands: <span id="line-52" class="anchor"></span>
<span id="line-53" class="anchor"></span></p>
<pre>
C:
<span id="line-54" class="anchor"></span>cd \temp
<span id="line-55" class="anchor"></span>unzip moin-1.3.zip
<span id="line-56" class="anchor"></span>cd moin-1.3
<span id="line-57" class="anchor"></span>python setup.py install --prefix=C:\Moin --record=install.log
<span id="line-58" class="anchor"></span></pre>
<span id="line-59" class="anchor"></span><span id="line-60" class="anchor"></span><p>This will install all necessary files to the "<tt>C:\Moin</tt>" directory, and create a "<tt>install.log</tt>" file listing all the files that are created there. <span id="line-61" class="anchor"></span></p>
<span id="line-62" class="anchor"></span><p> <span id="line-63" class="anchor"></span></p>
<span id="line-64" class="anchor"></span>
<h2 id="head-c5d24a8b08d751dc989c57e5ec58363b55bef1b3">Creating a Wiki Instance</h2>

<span id="line-65" class="anchor"></span><span id="line-66" class="anchor"></span><p>Enter these commands in a console window from C:\Moin: <span id="line-67" class="anchor"></span>
<span id="line-68" class="anchor"></span></p>
<pre>
md mywiki
<span id="line-69" class="anchor"></span>md mywiki\data
<span id="line-70" class="anchor"></span>md mywiki\underlay
<span id="line-71" class="anchor"></span>xcopy share\moin\data mywiki\data /E
<span id="line-72" class="anchor"></span>xcopy share\moin\underlay mywiki\underlay /E
<span id="line-73" class="anchor"></span>copy share\moin\server\moin.cgi mywiki\
<span id="line-74" class="anchor"></span>copy share\moin\config\wikiconfig.py mywiki\
<span id="line-75" class="anchor"></span>copy share\moin\htdocs\index.html mywiki\default.htm
<span id="line-76" class="anchor"></span></pre>
<span id="line-77" class="anchor"></span><span id="line-78" class="anchor"></span><p>"<tt>mywiki</tt>" is the name of your wiki instance, you might want to chose a different name best fitting the intended use of this instance; just don't name it simply "<tt>wiki</tt>", because that would result in confusion and problems later on. <span id="line-79" class="anchor"></span></p>
<span id="line-80" class="anchor"></span><p>We have to make sure that <tt>moin.cgi</tt> can find the Moin<tt></tt>Moin directory, so that "<tt>import&nbsp;MoinMoin</tt>" will work. The easiest way to make sure <tt>MoinMoin</tt> can be imported is to append to <tt>sys.path</tt> <em>within</em> <tt>moin.cgi</tt>. <span id="line-81" class="anchor"></span></p>
<span id="line-82" class="anchor"></span><p>You can change the first two lines of code in moin.cgi to something like this: <span id="line-83" class="anchor"></span>
<span id="line-84" class="anchor"></span><span id="line-85" class="anchor"></span><span id="line-86" class="anchor"></span><span id="line-87" class="anchor"></span></p>
<div lang="en" class="codearea" dir="ltr">
<script type="text/JavaScript">
function isnumbered(obj) {
  return obj.childNodes.length && obj.firstChild.childNodes.length && obj.firstChild.firstChild.className == 'LineNumber';
}
function nformat(num,chrs,add) {
  var nlen = Math.max(0,chrs-(''+num).length), res = '';
  while (nlen>0) { res += ' '; nlen-- }
  return res+num+add;
}
function addnumber(did, nstart, nstep) {
  var c = document.getElementById(did), l = c.firstChild, n = 1;
  if (!isnumbered(c))
    if (typeof nstart == 'undefined') nstart = 1;
    if (typeof nstep  == 'undefined') nstep = 1;
    n = nstart;
    while (l != null) {
      if (l.tagName == 'SPAN') {
        var s = document.createElement('SPAN');
        s.className = 'LineNumber'
        s.appendChild(document.createTextNode(nformat(n,4,' ')));
        n += nstep;
        if (l.childNodes.length)
          l.insertBefore(s, l.firstChild)
        else
          l.appendChild(s)
      }
      l = l.nextSibling;
    }
  return false;
}
function remnumber(did) {
  var c = document.getElementById(did), l = c.firstChild;
  if (isnumbered(c))
    while (l != null) {
      if (l.tagName == 'SPAN' && l.firstChild.className == 'LineNumber') l.removeChild(l.firstChild);
      l = l.nextSibling;
    }
  return false;
}
function togglenumber(did, nstart, nstep) {
  var c = document.getElementById(did);
  if (isnumbered(c)) {
    remnumber(did);
  } else {
    addnumber(did,nstart,nstep);
  }
  return false;
}
</script>

<script type="text/javascript">
document.write('<a href="#" onClick="return togglenumber(\'CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee_000\', 1, 1);" \
                class="codenumbers">Toggle line numbers<\/a>');
</script>
<pre lang="en" id="CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee_000" dir="ltr">
<span class="line"><span class="LineNumber">   1 </span><span class="Comment">#!python</span></span>
<span class="line"><span class="LineNumber">   2 </span><span class="Comment"></span><span class="ResWord">import</span> <span class="ID">sys</span></span>
<span class="line"><span class="LineNumber">   3 </span><span class="ID">sys</span><span class="Operator">.</span><span class="ID">path</span><span class="Operator">.</span><span class="ID">append</span><span class="Operator">(</span><span class="String">'C:/Moin/Lib/site-packages'</span><span class="Operator">)</span><span class="Text"></span></span>
</pre>
</div>
<span id="line-88" class="anchor"></span><p>Notice that we're pointing to the directory which contains the Moin<tt></tt>Moin directory, not the directory itself. <span id="line-89" class="anchor"></span></p>
<span id="line-90" class="anchor"></span><p>Next, you'll need to create two virtual directories in IIS. One for the shared data, and one for this specific wiki instance.  <span id="line-91" class="anchor"></span></p>
<span id="line-92" class="anchor"></span><p>Go to <em>Control Panel =&gt; Administrative Tools =&gt; Internet Information Service</em>. Open up the tree to <em>Default Web Site</em>.  <span id="line-93" class="anchor"></span></p>
<span id="line-94" class="anchor"></span><p>Right click on <em>Default Web Site</em> and choose <em>New =&gt; Virtual directory</em>. This will bring up a wizard with the mandatory useless first screen, hit next. Enter "<tt>wiki</tt>" for the alias name and hit next. Browse to "<tt>C:\Moin\share\moin\htdocs</tt>" and hit next. Leave the <em>Access permissions</em> at their defaults and hit next. And now you're done, hit finish! <span id="line-95" class="anchor"></span></p>
<span id="line-96" class="anchor"></span><p>Now follow the same steps, but set the alias to "<tt>mywiki</tt>" and the path to "<tt>C:\Moin\mywiki</tt>".  <span id="line-97" class="anchor"></span></p>
<span id="line-98" class="anchor"></span><p>Use IIS Admin to remove permissions to read the data directory: expand the "<tt>mywiki</tt>" node, right click on <tt>data</tt>, select <tt>Properties</tt>, and uncheck <tt>Read</tt>. Repeat these steps with the <tt>underlay</tt> directory. <span id="line-99" class="anchor"></span></p>
<span id="line-100" class="anchor"></span><p>Now you need to setup the 'mywiki' alias so that it will run Python to interpret <tt>.cgi</tt> files. On Windows Server 2003, you will need to click the <em>Create</em> button under <em>Application Settings</em> to create an application space. Right click on your new 'mywiki' alias and choose <em>Properties</em>. On the first tab (<em>Virtual Directory</em>), click the <em>Configuration</em> button. The first tab is the <em>App Mappings</em> tab, which defines which programs to use for each file exetension. Click <em>Add</em>. Browse to your <tt>python.exe</tt> (probably something like <tt>c:\pythonXX\python.exe</tt>). Then add <tt>-u&nbsp;"%s"&nbsp;"%s"</tt> after the Python executable path. The <em>Executable</em> line will look something like this: <tt>"C:\Python22\python.exe"&nbsp;-u&nbsp;"%s"&nbsp;"%s"</tt>. In the <em>Extension</em> box enter <tt>.cgi</tt> with the begining period. Make sure that the <em>Check that file exists</em> option is not checked (if it is, Moin<tt></tt>Moin won't be able to display sub pages). Ok, you're done with the alias configuration, click <em>OK</em> several times to get back out of all the dialog boxes. <span id="line-101" class="anchor"></span></p>
<span id="line-102" class="anchor"></span><p>If you add another wiki instance, you'll only need to setup the reference to its folder, they can safely share the "<tt>wiki</tt>" alias which points to static files only. <span id="line-103" class="anchor"></span></p>
<span id="line-104" class="anchor"></span><p>That is all, try to access your new-born wiki with the URL "<tt>http://127.0.0.1/mywiki/</tt>". You should see the Front<tt></tt>Page, try to edit and save it, and if that works, see if your edit is reflected on the Recent<tt></tt>Changes page. <span id="line-105" class="anchor"></span></p>
<span id="line-106" class="anchor"></span><p>Finally, edit "<tt>wikiconfig.py</tt>" and at least change "<tt>sitename</tt>" and "<tt>logo_url</tt>" to some personal values: <span id="line-107" class="anchor"></span>
<span id="line-108" class="anchor"></span></p>
<pre>
sitename = u'My Wiki'
<span id="line-109" class="anchor"></span>logo_url = '/images/mywiki-logo.gif'
<span id="line-110" class="anchor"></span></pre>
<span id="line-111" class="anchor"></span><p>It is advised that you use "<tt>logo_string</tt>" for an image, string, or both instead of "<tt>logo_url</tt>": <span id="line-112" class="anchor"></span>
<span id="line-113" class="anchor"></span></p>
<pre>
logo_string = u'&lt;img src="/mywiki/images/mywiki-logo.gif" alt="MyWiki Logo"&gt;My Wiki'
<span id="line-114" class="anchor"></span></pre>
<span id="line-115" class="anchor"></span><p>Where "<tt>images</tt>" is a directory under your "<tt>mywiki</tt>" instance. <span id="line-116" class="anchor"></span></p>
<span id="line-117" class="anchor"></span><p>NOTE: The configuration variable "<tt>url_prefix</tt>" in "<tt>wikiconfig.py</tt>" should match the alias for "<tt>C:\Moin\share\moin\htdocs</tt>" or themes will not work ("<tt>/wiki</tt>" for the instructions above).  This way, any reference in "<tt>wikiconfig.py</tt>" to "<tt>/wiki/something</tt>" will look in the shared data directory and a reference to "<tt>/mywiki/something</tt>" will look in the wiki instance directory.  These are considered absolute paths because relative paths will not work correctly. <span id="line-118" class="anchor"></span></p>
<span id="line-119" class="anchor"></span><p>For a personal or intranet installation, you'll normally also add the line 
<span id="line-120" class="anchor"></span></p>
<pre>
allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage', ]
<span id="line-121" class="anchor"></span></pre>
<span id="line-122" class="anchor"></span><span id="line-123" class="anchor"></span><p><strong>Starting with <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> 1.3.5</strong>, it seems you need to change the Custom Errors setting for 404 before you can create new pages. You can accomplish this by performing the following steps: <span id="line-124" class="anchor"></span></p>
<span id="line-125" class="anchor"></span><ol type="1">
<li><p>Go into the IIS Manager, right-click on 'mywiki' (or whatever your wiki instance directory is called), and select properties. <span id="line-126" class="anchor"></span></p>
<span id="line-127" class="anchor"></span></li>
<li class="gap"><p>Next, go to the Custom Errors tab and find the 404 entry, and click the Edit button. <span id="line-128" class="anchor"></span></p>
<span id="line-129" class="anchor"></span></li>
<li class="gap"><p>Set "Message type" to "Default" and click click click until you're out of all the dialogs. <span id="line-130" class="anchor"></span></p>
<span id="line-131" class="anchor"></span></li>
</ol>

<h3 id="head-890abdbd0d21bf874ce794be87067abf433a51d7">IIS 6.0 (Windows Server 2003)</h3>

<span id="line-132" class="anchor"></span><span id="line-133" class="anchor"></span><p>The instructions below also apply to IIS 6.0 but the more aggressive security settings in newer version of IIS disallow the usage of <em>unknown CGI extensions</em>.  That means you will always get a 404 error unless you do this: <span id="line-134" class="anchor"></span></p>
<span id="line-135" class="anchor"></span><ol type="1">
<li><p>Open IIS Manager by going to Start Menu-&gt;Programs-&gt;Administrative Tools-&gt;IIS Manager. <span id="line-136" class="anchor"></span></p>
<span id="line-137" class="anchor"></span></li>
<li class="gap"><p>Go the the <strong>Web Service Extensions</strong> folder. <span id="line-138" class="anchor"></span></p>
<span id="line-139" class="anchor"></span></li>
<li class="gap"><p>Under the <strong>Action</strong> menu, select <strong>Add a new Web service extension...</strong>. <span id="line-140" class="anchor"></span></p>
<span id="line-141" class="anchor"></span></li>
<li class="gap"><p>For Extension name, give it a name such as <em>.cgi</em> or <em>Python cgi</em> or something. <span id="line-142" class="anchor"></span></p>
<span id="line-143" class="anchor"></span></li>
<li class="gap"><p>Under <strong>Required files</strong> click the <strong>Add...</strong> button and type in the exact command-line string you used above. Eg: <em>c:\python24\python.exe -u "%s" "%s"</em>, then click the <strong>Ok</strong> button. <span id="line-144" class="anchor"></span></p>
<span id="line-145" class="anchor"></span></li>
<li class="gap"><p>Make sure the <strong>Set extension status to Allowed</strong> checkbox is checked and click the <strong>Ok</strong> button. <span id="line-146" class="anchor"></span></p>
<span id="line-147" class="anchor"></span></li>
</ol>
<p>Under Windows Server 2003, you will also need to give your IUSR_MACHINENAME account Modify access to the mywiki\data and mywiki\underlay sub-directories, as file system permissions are more restricted by default than previous Windows versions. <span id="line-148" class="anchor"></span></p>
<span id="line-149" class="anchor"></span>
<h2 id="head-086499a2b43629c3fef3b36dc435cff210e32faa">Troubleshooting</h2>

<span id="line-150" class="anchor"></span><span id="line-151" class="anchor"></span><p>If you see an error like "<tt>ImportError:&nbsp;No&nbsp;module&nbsp;named&nbsp;MoinMoin</tt>", it means that python cannot find Moin<tt></tt>Moin. See above for how to add to <tt>sys.path</tt>. <span id="line-152" class="anchor"></span></p>
<span id="line-153" class="anchor"></span><p>If you see an error like Error 13: Permission Denied, it means that your web user permissions for the files do not have write/modify enabled. <span id="line-154" class="anchor"></span></p>
<span id="line-155" class="anchor"></span><p>If the page never loads after hitting <tt>Save&nbsp;Changes</tt>, you should check the permissions of the <tt>data</tt> directory.  Make sure the IUSR_COMPUTERNAME user has modify permissions. <span id="line-156" class="anchor"></span></p>
<span id="line-157" class="anchor"></span><p>If some images like <a href="http://moinmaster.wikiwikiweb.de/InterWiki">InterWiki</a> and <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/WorldWideWeb">WorldWideWeb</a> don't show up, it could have been because of incorrect permissions or a bad "<tt>url_prefix</tt>" in "<tt>wikiconfig.py</tt>" or the cached pages need to be updated by an Edit or deleting them in the data folder. <span id="line-158" class="anchor"></span></p>
<span id="line-159" class="anchor"></span><p>If you see an error message like: <span id="line-160" class="anchor"></span>
<span id="line-161" class="anchor"></span></p>
<pre>
Check your URL regular expressions in the "wikis" list in "farmconfig.py". Content-type: text/html;charset=utf-8
<span id="line-162" class="anchor"></span>MoinMoin Configuration Error
<span id="line-163" class="anchor"></span>Could not find a match for url: "servername/wikiname/moin.cgi?
<span id="line-164" class="anchor"></span>Check your URL regular expressions in the "wikis" list in "farmconfig.py".
<span id="line-165" class="anchor"></span></pre>
<span id="line-166" class="anchor"></span><span id="line-167" class="anchor"></span><p>and you don't intend on using a serverfarm, remove the farmconfig.py and farmconfig.pyc files and try again.  The error message shouldn't appear when you refresh the page.  <span id="line-168" class="anchor"></span></p>
<span id="bottom_Include_HelpOnInstalling/InternetInformationServer" class="anchor"></span>
</div>
 <span id="line-77" class="anchor"></span></p>
<hr class="hr2">
<p> <span id="line-78" class="anchor"></span><span id="trouble-shooting" class="anchor"></span> <span id="line-79" class="anchor"></span>
<h1>Trouble-shooting</h1>

<div lang="en" id="Include_HelpOnInstalling/TroubleShooting" dir="ltr">
<span id="top_Include_HelpOnInstalling/TroubleShooting" class="anchor"></span><span id="line-8" class="anchor"></span><span id="line-9" class="anchor"></span><p><strong>How to deal with common errors</strong> <span id="line-10" class="anchor"></span></p>
<span id="line-11" class="anchor"></span>
<h1 id="head-19c97c74376eccc15bf415113eb35925fb0600ef">First follow the instructions</h1>

<span id="line-12" class="anchor"></span><span id="line-13" class="anchor"></span><p>Moin has provided instructions for common usage.  Try creating a wiki using the default values within the instructions. Your wiki would then be stored where ours is, and named <tt>mywiki</tt> ... but you can change that place, and this name, AFTER you have a working wiki. The default values have been chosen carefully to work for most people on most platforms, or at least be a good start. <span id="line-14" class="anchor"></span></p>
<span id="line-15" class="anchor"></span><ul>
<li><p>First follow the instructions <span id="line-16" class="anchor"></span></p>
</li>
<li><p>Do not change any configuration option unless you must. <span id="line-17" class="anchor"></span></p>
</li>
<li><p>Play with a working wiki before you try to customize it. <span id="line-18" class="anchor"></span></p>
<span id="line-19" class="anchor"></span></li>
</ul>

<h1 id="head-d6d40372ac4a2b91da396f084ba3faaf3e6c3845">Change one thing at a time</h1>

<span id="line-20" class="anchor"></span><span id="line-21" class="anchor"></span><p>When your wiki is running, go and customize it to your needs, but remember to change only one option at a time. You probably don't fully understand how all options work, and if you go and break few things in the same step, you will have hard time to fix it.  <span id="line-22" class="anchor"></span></p>
<span id="line-23" class="anchor"></span>
<h1 id="head-1372c460df94281a98cdde429b2496bdfd6e2677">Check That Your Webserver Can Use Python</h1>

<span id="line-24" class="anchor"></span><span id="line-25" class="anchor"></span><p>This is also in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">HelpOnInstalling/BasicInstallation</a>.  Use this script: <span id="line-26" class="anchor"></span></p>
<span id="line-27" class="anchor"></span>
<span id="line-28" class="anchor"></span><pre>
#!/bin/sh
<span id="line-29" class="anchor"></span>echo Content-Type: text/plain
<span id="line-30" class="anchor"></span>echo
<span id="line-31" class="anchor"></span>echo "Your web server is running as:"
<span id="line-32" class="anchor"></span>id
<span id="line-33" class="anchor"></span>echo "CGI scripts work"
<span id="line-34" class="anchor"></span>echo "Now we try to invoke Python interpreters and get their versions:"
<span id="line-35" class="anchor"></span>python -V 2&gt;&amp;1
<span id="line-36" class="anchor"></span>python2.3 -V 2&gt;&amp;1
<span id="line-37" class="anchor"></span>python2.4 -V 2&gt;&amp;1
<span id="line-38" class="anchor"></span>echo "Finished."
<span id="line-39" class="anchor"></span></pre>
<span id="line-40" class="anchor"></span><span id="line-41" class="anchor"></span><p>to see if you can get it to announce that cgi works. Then you will also know which versions of python are usable.  This is especially handy for users with no root access. <span id="line-42" class="anchor"></span></p>
<span id="line-43" class="anchor"></span>
<h1 id="head-82d34035b28a82ec380913906a9c676a0c20ecf3">Built-in test</h1>

<span id="line-44" class="anchor"></span><span id="line-45" class="anchor"></span><p>There's a built-in diagnostic mode that's useful when doing an install; just append "<tt>?action=test</tt>" to the URL of your wiki: <span id="line-46" class="anchor"></span>
<span id="line-47" class="anchor"></span></p>
<pre>
lynx --dump http://`hostname`/mywiki?action=test
<span id="line-48" class="anchor"></span></pre>
<span id="line-49" class="anchor"></span><span id="line-50" class="anchor"></span><p>If you see an import error here, but  <span id="line-51" class="anchor"></span></p>
<span id="line-52" class="anchor"></span>
<span id="line-53" class="anchor"></span><pre>
python -c "import MoinMoin"
<span id="line-54" class="anchor"></span></pre>
<span id="line-55" class="anchor"></span><span id="line-56" class="anchor"></span><p>works, it's likely a result of missing file permissions or a wrong PYTHONPATH setting within the web server environment. <span id="line-57" class="anchor"></span></p>
<span id="line-58" class="anchor"></span>
<h1 id="head-68a88c328bf1907f03ed306eb15199cc98b2cd6a">Duelling Pythons</h1>

<span id="line-59" class="anchor"></span><span id="line-60" class="anchor"></span><p>The most common problem you might encounter is when you have an old Python version installed into "<tt>/usr</tt>", and a newer Python distribution into "<tt>/usr/local</tt>"; this is typical for GNU/Linux distributions that still come bundled with an old Python version. <span id="line-61" class="anchor"></span></p>
<span id="line-62" class="anchor"></span><p>In that case, if you enter "<tt>python</tt>" on your prompt, you will usually get the more recent Python interpreter, because "<tt>/usr/local/bin</tt>" is in your <tt>PATH</tt>. The situation is different in your webserver environment, and thus you might have to change the bang path of "<tt>moin.cgi</tt>", like this: <span id="line-63" class="anchor"></span>
<span id="line-64" class="anchor"></span></p>
<pre>
#!/usr/local/bin/python
<span id="line-65" class="anchor"></span>
<span id="line-66" class="anchor"></span>"""
<span id="line-67" class="anchor"></span>    MoinMoin - CGI Driver Script
<span id="line-68" class="anchor"></span>...
<span id="line-69" class="anchor"></span>"""
<span id="line-70" class="anchor"></span></pre>
<span id="line-71" class="anchor"></span><span id="line-72" class="anchor"></span><ul>
<li><p>Debian stable users might want to look for backport of newer Python, or download and build Python from source. <span id="line-73" class="anchor"></span></p>
<span id="line-74" class="anchor"></span></li>
<li class="gap"><p>When installing, make sure you install with the version of python you want to run moin with. <tt>python&nbsp;setup.py&nbsp;install</tt> will install with the first python in the path, which may be the version you expect or not! <tt>/usr/local/bin/python2.4</tt> will install in specific python. You will have to use the same path in the moin server script. <span id="line-75" class="anchor"></span></p>
<span id="line-76" class="anchor"></span></li>
</ul>

<h1 id="head-8e72ddd753a6ead652d17bd2c24324a9a0dc9512">Missing file permissions</h1>

<span id="line-77" class="anchor"></span><span id="line-78" class="anchor"></span><p>If you are root, the installed files may be readable only by root, but they must also be readable by the web server before the wiki will work. This includes both the Python modules and the site itself. For the data directory, the wiki engine also needs <em>write</em> access.  To fix this, first find out where the Python module directory is; look in <tt>install.log</tt>, or run the command:  <span id="line-79" class="anchor"></span></p>
<span id="line-80" class="anchor"></span>
<span id="line-81" class="anchor"></span><pre>
python -c "import sys; print '%s/lib/python%s/site-packages' % ( sys.prefix, sys.version[:3] )"
<span id="line-82" class="anchor"></span></pre>
<span id="line-83" class="anchor"></span><span id="line-84" class="anchor"></span><p>For the example below, we'll assume that the Python module directory is <tt>/usr/local/lib/python2.3/site-packages</tt>. <span id="line-85" class="anchor"></span>Make the files world-readable using the following commands: <span id="line-86" class="anchor"></span>
<span id="line-87" class="anchor"></span></p>
<pre>
cd /usr/local
<span id="line-88" class="anchor"></span>chmod -R a+rX lib/python2.3/site-packages/MoinMoin
<span id="line-89" class="anchor"></span></pre>
<span id="line-90" class="anchor"></span><span id="line-91" class="anchor"></span>
<h1 id="head-bf2856e568e384c1b4da0403cfee28297345e8a9">Set Your Variables Carefully</h1>

<span id="line-92" class="anchor"></span><span id="line-93" class="anchor"></span><p>Be especially careful when you retype instead of cut and paste. Quoting errors in <tt>wikiconfig.py</tt> can cause things to fail.  The following items are also variable issues.  Also, some features only work if they are enabled by their option in either <tt>wikiconfig.py</tt> or <tt>farmconfig.py</tt>. <span id="line-94" class="anchor"></span></p>
<span id="line-95" class="anchor"></span>
<h2 id="head-b3137d96e505ef20d7cff55253012674ea4a5d10">moin.cgi found, Moin doesn't run</h2>

<span id="line-96" class="anchor"></span><span id="line-97" class="anchor"></span><p>If you have to add the moin code location into the system path, make sure to specify the place <tt></tt>above<tt></tt> MoinMoin itself, so that the word MoinMoin is recognized during the import request.   <span id="line-98" class="anchor"></span></p>
<span id="line-99" class="anchor"></span>
<h2 id="head-ecc94aa011a0d0de8cfa6123fcfd70164d85a139">CSS files do not work</h2>

<span id="line-100" class="anchor"></span><span id="line-101" class="anchor"></span><p>Very common error is missing CSS styles. Your wiki look bare and ugly, unlike this nice wiki. In most cases, you did broke the configuration by not reading the instructions, or by trying to customize the instructions because you are smarter then us. <img src="wiki/htdocs/modern/img/smile.png" alt=":-)" height="15" width="15"> <span id="line-102" class="anchor"></span></p>
<span id="line-103" class="anchor"></span><p>The fix is very easy: make sure your Apache Alias and <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a> are NOT the same. This Apache setup will never work: <span id="line-104" class="anchor"></span>
<span id="line-105" class="anchor"></span></p>
<pre>
Alias /wiki/ "/prefix/share/moin/htdocs/"
<span id="line-106" class="anchor"></span>ScriptAlias /wiki/ "/var/www/wiki/moin.cgi"
<span id="line-107" class="anchor"></span></pre>
<span id="line-108" class="anchor"></span><span id="line-109" class="anchor"></span><p>Alias is used to server static files: css, images etc. <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a> is used to hide moin.cgi from the url. You must use different values! You can use anything you like for <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a>, or Alias, but Alias must match the <tt>url_prefix</tt> configuration option. Here is an example that works (the default): <span id="line-110" class="anchor"></span>
<span id="line-111" class="anchor"></span></p>
<pre>
# Apache config
<span id="line-112" class="anchor"></span>Alias /wiki/ "/prefix/share/moin/htdocs/"
<span id="line-113" class="anchor"></span></pre>
<span id="line-114" class="anchor"></span>
<span id="line-115" class="anchor"></span><pre>
# Wiki config
<span id="line-116" class="anchor"></span>    url_prefix = '/wiki'
<span id="line-117" class="anchor"></span></pre>
<span id="line-118" class="anchor"></span><span id="bottom_Include_HelpOnInstalling/TroubleShooting" class="anchor"></span>
</div>
 <span id="line-80" class="anchor"></span></p>
<span id="bottom" class="anchor"></span>
</div>
<p id="pageinfo" class="info" lang="en" dir="ltr">last edited 2005-01-22 22:28:34 by <span title="??? @ 127.0.0.127[127.0.0.127]">127</span></p>
<div id="pagebottom"></div>
</div>
</body>
</html>