~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to docs/INSTALL.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
2
<html>
3
3
<head>
4
 
<link rel="shortcut icon" href="http://moinmaster.wikiwikiweb.de/wiki/favicon.ico">
 
4
<link rel="shortcut icon" href="http://static.moinmo.in/favicon.ico">
5
5
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
6
6
<meta name="robots" content="noindex,nofollow">
7
7
 
8
 
<title>MoinMoin/InstallDocs - MoinMaster</title>
9
 
<script type="text/javascript" src="/wiki/common/js/common.js"></script>
10
 
 
11
 
 
12
 
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="wiki/htdocs/modern/css/common.css">
13
 
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="wiki/htdocs/modern/css/print.css">
14
 
<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">
15
 
 
16
 
<link rel="Start" href="http://moinmaster.wikiwikiweb.de/FrontPage">
17
 
<link rel="Alternate" title="Wiki Markup" href="http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs?action=raw">
18
 
<link rel="Alternate" media="print" title="Print View" href="http://moinmaster.wikiwikiweb.de/MoinMoin/InstallDocs?action=print">
19
 
<link rel="Up" href="http://moinmaster.wikiwikiweb.de/MoinMoin">
20
 
<link rel="Search" href="http://moinmaster.wikiwikiweb.de/FindPage">
21
 
<link rel="Index" href="http://moinmaster.wikiwikiweb.de/TitleIndex">
22
 
<link rel="Glossary" href="http://moinmaster.wikiwikiweb.de/WordIndex">
23
 
<link rel="Help" href="http://moinmaster.wikiwikiweb.de/HelpOnFormatting">
 
8
<title>MoinMoin/InstallDocs - 1.7 Master Wiki</title>
 
9
<script type="text/javascript" src="http://static.moinmo.in/moin_static170/common/js/common.js"></script>
 
10
 
 
11
 
 
12
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="http://static.moinmo.in/moin_static170/modern/css/common.css">
 
13
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="http://static.moinmo.in/moin_static170/modern/css/print.css">
 
14
 
 
15
<!-- css only for MSIE browsers -->
 
16
<!--[if IE]>
 
17
   <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="http://static.moinmo.in/moin_static170/modern/css/msie.css">
 
18
<![endif]-->
 
19
 
 
20
 
 
21
 
 
22
<link rel="Start" href="http://master17.moinmo.in/FrontPage">
 
23
<link rel="Alternate" title="Wiki Markup" href="http://master17.moinmo.in/MoinMoin/InstallDocs?action=raw">
 
24
<link rel="Alternate" media="print" title="Print View" href="http://master17.moinmo.in/MoinMoin/InstallDocs?action=print">
 
25
<link rel="Up" href="http://master17.moinmo.in/MoinMoin">
 
26
<link rel="Search" href="http://master17.moinmo.in/FindPage">
 
27
<link rel="Index" href="http://master17.moinmo.in/TitleIndex">
 
28
<link rel="Glossary" href="http://master17.moinmo.in/WordIndex">
 
29
<link rel="Help" href="http://master17.moinmo.in/HelpOnFormatting">
24
30
</head>
25
31
 
26
32
<body  lang="en" dir="ltr">
27
33
<div id="page" lang="en" dir="ltr">
28
 
<div id="interwiki"><span><a href="http://moinmaster.wikiwikiweb.de/FrontPage">MoinMaster</a></span></div>
 
34
<div id="interwiki"><span><a href="http://master17.moinmo.in/FrontPage" rel="nofollow">MoinMaster</a></span></div>
29
35
<ul id="pagelocation">
30
 
<li>MoinMoin/InstallDocs</li>
 
36
<li><a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a></li><li><a class="backlink" href="http://master17.moinmo.in/4ct10n/fullsearch/MoinMoin/InstallDocs?action=fullsearch&amp;context=180&amp;value=linkto%3A%22MoinMoin/InstallDocs%22" rel="nofollow" title="Click to do a full-text search for this title">InstallDocs</a></li>
31
37
</ul>
32
38
<div dir="ltr" id="content" lang="en"><span class="anchor" id="top"></span>
33
 
<span class="anchor" id="line-9"></span><span class="anchor" id="line-10"></span><p class="line862" />This HTML page contains the basic install docs that can be found on <a class="http" 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 class="backtick"></tt>On<tt class="backtick"></tt>Installing page, which might contain more up-to-date information. <span class="anchor" id="line-11"></span><span class="anchor" id="line-12"></span><p class="line874" />After following the procedures on this page, you should have a working wiki and can browse the rest of the online docs there. <span class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><p class="line867" />
34
 
<h1 id="head-378d73a512870e1afed036c887489ab98ba3c56a">How to install your own MoinMoin Wiki</h1>
35
 
<span class="anchor" id="line-15"></span><p class="line862" />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" href="http://moinmaster.wikiwikiweb.de/HelpOnUpdating" title="MoinMaster">HelpOnUpdating</a>. <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line862" />A Moin<tt class="backtick"></tt>Moin installation is done by some elementary steps: <span class="anchor" id="line-18"></span><ul><li><p class="line891" /><a href="#basic-install">Basic Installation</a> explains the "<tt class="backtick">setup.py</tt>" step of the installation in more detail. This is uses to get the Moin<tt class="backtick"></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 class="anchor" id="line-19"></span></li><li><p class="line891" /><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 class="anchor" id="line-20"></span></li><li><p class="line862" />Getting the web server to serve static stuff under the <tt class="backtick">/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 class="anchor" id="line-21"></span></li><li>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 class="anchor" id="line-22"></span></li><li><p class="line862" />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" href="http://moinmaster.wikiwikiweb.de/HelpOnAdministration" title="MoinMaster">HelpOnAdministration</a> contains links to pages that cover these topics. Especially, the <a class="interwiki" href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration" title="MoinMaster">HelpOnConfiguration</a> and <a class="interwiki" href="http://moinmaster.wikiwikiweb.de/HelpOnUpdating" title="MoinMaster">HelpOnUpdating</a> pages provide additional information regarding wiki setup and maintenance. <span class="anchor" id="line-23"></span></li><li><p class="line891" /><a href="#trouble-shooting">Trouble-shooting</a> helps with fixing any general problems you might encounter, which apply to any installation platform.  <span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span></li></ul><p class="line867" /><span class="anchor" id="installscenarios"></span> <span class="anchor" id="line-26"></span>
36
 
<h1 id="head-bee4ae5a5ef44b7af47ecd4f29b44226ba935e5b">Installation steps specific for some web servers and operating systems</h1>
37
 
<span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><p class="line862" />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 class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><p class="line874" />Linux: <span class="anchor" id="line-31"></span><ul><li><p class="line891" /><a href="#linuxapache-install">Linux Installation using Apache</a> <span class="anchor" id="line-32"></span></li><li><p class="line891" /><a href="#linuxstandalone-install">Linux Installation using standalone server</a> <span class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span></li></ul><p class="line874" />Long-Running-Process Setup: <span class="anchor" id="line-35"></span><ul><li><p class="line891" /><a href="#fastcgi-install">FastCGI Setup using Apache</a> <span class="anchor" id="line-36"></span></li><li><p class="line891" /><a href="#modpy-install">mod_python Setup using Apache</a> <span class="anchor" id="line-37"></span></li><li><p class="line891" /><a href="#twisted-install">Setup using twisted</a> <span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span></li></ul><p class="line874" />Mac OS X: <span class="anchor" id="line-40"></span><ul><li><p class="line891" /><a href="#macosx-install">Mac OS X Installation</a> <span class="anchor" id="line-41"></span><span class="anchor" id="line-42"></span></li></ul><p class="line874" />Windows: <span class="anchor" id="line-43"></span><ul><li><p class="line891" /><a href="#win32apache-install">Windows Installation using Apache</a> <span class="anchor" id="line-44"></span></li><li><p class="line891" /><a href="#win32iis-install">Windows Installation using IIS</a> <span class="anchor" id="line-45"></span><span class="anchor" id="line-46"></span></li></ul><p class="line867" /><span class="anchor" id="basic-install"></span> <span class="anchor" id="line-47"></span><div dir="ltr" id="Include_HelpOnInstalling/BasicInstallation" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/BasicInstallation"></span>
38
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line867" /><span class="anchor" id="line-10"></span><strong>How to do a basic installation of <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> on your system.</strong> <span class="anchor" id="line-11"></span><span class="anchor" id="line-12"></span><p class="line867" /><strong>Contents</strong> <span class="anchor" id="line-13"></span><div class="table-of-contents"><p class="table-of-contents-heading" />Contents<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></div> <span class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><p class="line862" />Before you can integrate Moin<tt class="backtick"></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 class="backtick">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="http" href="http://www.python.org/doc/current/inst/inst.html">Installing Python Modules</a> document in your Python documentation set. <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line874" />The installation is similar on Windows and Linux (and other POSIX-type systems; for simplicity, we just say "Linux" in the docs). <span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> We use text such as <strong><tt class="backtick">&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 class="backtick">&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 class="backtick">&gt;&nbsp;</tt>" are the answers to the commands you have typed. Read them carefully. <span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span></li></ul><p class="line867" />
39
 
<h1 id="head-2fa431ad9c9bff5badd07c5ee676b19852ed28e3">Check if Python is working</h1>
40
 
<span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><p class="line862" />Moin<tt class="backtick"></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 class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line862" />The <tt class="backtick">CHANGES</tt> file in the Moin<tt class="backtick"></tt>Moin archive mentions what versions are supported. Python 2.3 is the minimum requirement for Moin<tt class="backtick"></tt>Moin 1.5, but we suggest you use the latest Python release version. <span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line862" />You can download Python at <a class="http" href="http://www.python.org/download/">http://www.python.org/download/</a>. <span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line862" />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 class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><p class="line874" />If you have shell access, checking if Python is working is very simple. Just type the following command, and look at the result: <span class="anchor" id="line-32"></span><span class="anchor" id="line-33"></span><pre>&gt; python -V
41
 
<span class="anchor" id="line-34"></span>Python 2.3.4
42
 
<span class="anchor" id="line-35"></span></pre><span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><p class="line862" />If you don't have shell access, you can try using this <tt class="backtick">pythontest.cgi</tt> script (it assumes that you are using a Linux kind of webserver). Upload the script to your <tt class="backtick">cgi-bin</tt> directory, use <tt class="backtick">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 class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line867" /><pre>#!/bin/sh
 
39
<span class="anchor" id="line-9"></span><span class="anchor" id="line-10"></span><p class="line862">This HTML page contains the basic install docs that can be found on <a class="http" href="http://master.moinmo.in/MoinMoin/InstallDocs">http://master.moinmo.in/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 class="backtick"></tt>On<tt class="backtick"></tt>Installing page, which might contain more up-to-date information. <span class="anchor" id="line-11"></span><span class="anchor" id="line-12"></span><p class="line874">After following the procedures on this page, you should have a working wiki and can browse the rest of the online docs there. <span class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><p class="line867">
 
40
<h1 id="HowtoinstallyourownMoinMoinWiki">How to install your own MoinMoin Wiki</h1>
 
41
<span class="anchor" id="line-15"></span><p class="line862">This page describes the installation procedure of <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a>. In the next section, there is a list of real-world <a href="http://master17.moinmo.in/MoinMoin/InstallDocs#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" href="http://master17.moinmo.in/HelpOnUpdating" title="MoinMaster">HelpOnUpdating</a>. <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line862">A Moin<tt class="backtick"></tt>Moin installation is done by some elementary steps: <span class="anchor" id="line-18"></span><ul><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#basic-install">Basic Installation</a> explains the "<tt class="backtick">setup.py</tt>" step of the installation in more detail. This is used to get the Moin<tt class="backtick"></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 class="anchor" id="line-19"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#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 class="anchor" id="line-20"></span></li><li><p class="line862">Getting the web server to serve static stuff under the <tt class="backtick">url_prefix_static</tt> URL - used for theme CSS and images, etc. - this is slightly different for the various web servers that can be used - see below. <span class="anchor" id="line-21"></span></li><li>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 class="anchor" id="line-22"></span></li><li><p class="line862">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" href="http://master17.moinmo.in/HelpOnAdministration" title="MoinMaster">HelpOnAdministration</a> contains links to pages that cover these topics. Especially, the <a class="interwiki" href="http://master17.moinmo.in/HelpOnConfiguration" title="MoinMaster">HelpOnConfiguration</a> and <a class="interwiki" href="http://master17.moinmo.in/HelpOnUpdating" title="MoinMaster">HelpOnUpdating</a> pages provide additional information regarding wiki setup and maintenance. <span class="anchor" id="line-23"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#trouble-shooting">Trouble-shooting</a> helps with fixing any general problems you might encounter, which apply to any installation platform.  <span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span></li></ul><p class="line867"><span class="anchor" id="installscenarios"></span> <span class="anchor" id="line-26"></span>
 
42
<h1 id="Installationstepsspecificforsomewebserversandoperatingsystems">Installation steps specific for some web servers and operating systems</h1>
 
43
<span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><p class="line862">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 class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><p class="line874">Linux: <span class="anchor" id="line-31"></span><ul><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#linuxapache-install">Linux Installation using Apache</a> <span class="anchor" id="line-32"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#linuxstandalone-install">Linux Installation using standalone server</a> <span class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span></li></ul><p class="line874">Long-Running-Process Setup: <span class="anchor" id="line-35"></span><ul><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#fastcgi-install">FastCGI Setup using Apache or Lighttpd</a> <span class="anchor" id="line-36"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#modpy-install">mod_python Setup using Apache</a> <span class="anchor" id="line-37"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#twisted-install">Setup using twisted</a> <span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span></li></ul><p class="line874">Mac OS X: <span class="anchor" id="line-40"></span><ul><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#macosx-install">Mac OS X Installation using Apache</a> <span class="anchor" id="line-41"></span><span class="anchor" id="line-42"></span></li></ul><p class="line874">Windows: <span class="anchor" id="line-43"></span><ul><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#win32apache-install">Windows Installation using Apache</a> <span class="anchor" id="line-44"></span></li><li><p class="line891"><a href="http://master17.moinmo.in/MoinMoin/InstallDocs#win32iis-install">Windows Installation using IIS</a> <span class="anchor" id="line-45"></span><span class="anchor" id="line-46"></span></li></ul><p class="line867"><span class="anchor" id="basic-install"></span> <span class="anchor" id="line-47"></span><div dir="ltr" id="HelpOnInstalling.2BAC8-BasicInstallation.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.top"></span>
 
44
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-9"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-10"></span><p class="line867"><strong>How to do a basic installation of <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> on your system.</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-11"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-12"></span><p class="line867"><strong>Contents</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-13"></span><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li>
 
45
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.CheckifPythonisworking">Check if Python is working</a></li><li>
 
46
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.DownloadMoinMoin">Download MoinMoin</a></li><li>
 
47
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.InstallMoinMoin">Install MoinMoin</a><ol><li>
 
48
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.RecommendedinstallationcommandforLinux.28andMacOsX.29">Recommended installation command for Linux (and MacOs X)</a></li><li>
 
49
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.Debuggingsetupprocess">Debugging setup process</a></li><li>
 
50
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.Installingtothedefaultsystemlocation">Installing to the default system location</a></li><li>
 
51
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.Installinginthehomedirectoryoranotherspecificlocation">Installing in the home directory or another specific location</a></li></ol></li><li>
 
52
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.Testinstallation">Test installation</a></li><li>
 
53
<a href="#HelpOnInstalling.2BAC8-BasicInstallation.Whathasbeeninstalled">What has been installed</a></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-15"></span><p class="line862">Before you can integrate Moin<tt class="backtick"></tt>Moin into your web environment, you have to install the <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> source code and data files using the standard Python <em>distutils</em> mechanism (<tt class="backtick">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="http" href="http://www.python.org/doc/current/inst/inst.html">Installing Python Modules</a> document in your Python documentation set. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-16"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-17"></span><p class="line874">The installation is similar on Windows and Linux (and other POSIX-type systems; for simplicity, we just say "Linux" in the docs). <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-18"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-19"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" width="15" /> We use text such as <strong><tt class="backtick">&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 class="backtick">&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 class="backtick">&gt;&nbsp;</tt>" are the answers to the commands you have typed. Read them carefully. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-20"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-21"></span></li></ul><p class="line867">
 
54
<h1 id="HelpOnInstalling.2BAC8-BasicInstallation.CheckifPythonisworking">Check if Python is working</h1>
 
55
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-23"></span><p class="line862">Moin<tt class="backtick"></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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-25"></span><p class="line862">The <tt class="backtick">CHANGES</tt> file in the Moin<tt class="backtick"></tt>Moin archive mentions what versions are supported. Python 2.3 is the minimum requirement for Moin<tt class="backtick"></tt>Moin 1.7, but we suggest you use the latest Python release version. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-27"></span><p class="line862">You can download Python at <a class="http" href="http://www.python.org/download/">http://www.python.org/download/</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-29"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-31"></span><p class="line874">If you have shell access, checking if Python is working is very simple. Just type the following command, and look at the result: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-32"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-33"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-34"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-35"></span><pre>&gt; python -V
 
56
Python 2.4.4</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-37"></span><p class="line862">If you don't have shell access, you can try using this <tt class="backtick">pythontest.cgi</tt> script (it assumes that you are using a Linux kind of webserver). Upload the script to your <tt class="backtick">cgi-bin</tt> directory, use <tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-39"></span><p class="line867"><object data="/HelpOnInstalling/BasicInstallation?action=AttachFile&amp;do=get&amp;target=pythontest.cgi" title="" type="application/octet-stream">pythontest.cgi</object> <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-41"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-42"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-43"></span><p class="line862">Also be sure to read <a href="http://master17.moinmo.in/HelpOnInstalling/ApacheOnLinuxFtp">../ApacheOnLinuxFtp</a> after you've completed the ../BasicInstallation illustrated here. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-44"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-45"></span><p class="line867">
 
57
<h1 id="HelpOnInstalling.2BAC8-BasicInstallation.DownloadMoinMoin">Download MoinMoin</h1>
 
58
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-46"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-47"></span><p class="line862">To download the distribution archive, go to the <a class="http" href="http://moinmo.in/MoinMoinDownload">download page</a> and fetch the latest archive. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-48"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-49"></span><p class="line862">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 class="backtick">.tar.gz</tt> archive, which you can unpack as shown below. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-51"></span><ul><li>On Windows <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-52"></span><ul><li><p class="line862">You can use recent versions of programs like <a class="http" href="http://www.7-zip.org/">7-Zip</a>, Win<tt class="backtick"></tt>Zip, Win<tt class="backtick"></tt>Rar, and Win<tt class="backtick"></tt>Ace, which handle .tar.gz kind of archives. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-53"></span></li><li><p class="line862">At the command prompt, you can use <a class="http" href="http://gnuwin32.sourceforge.net/packages/gzip.htm">GNU gzip</a> and <a class="http" href="http://gnuwin32.sourceforge.net/packages/tar.htm">GNU tar</a> for Windows. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-54"></span></li></ul></li><li>On Linux <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-55"></span><ul><li>You can use your favorite file manager -- it should be able to unpack them. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-56"></span></li><li><p class="line862">At any shell prompt, you can use the <tt class="backtick">tar</tt> command. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-57"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-58"></span></li></ul></li></ul><p class="line862">The distribution archive will always unpack into a directory named <tt class="backtick">moin-&lt;version&gt;</tt>, for example <tt class="backtick">moin-1.7.0</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-60"></span><p class="line862">Here is how you would unpack the archive (using GNU tar) and enter the directory with the Moin<tt class="backtick"></tt>Moin files: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-64"></span><pre>&gt; tar xzf moin-1.7.0.tar.gz
 
59
&gt; cd moin-1.7.0</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-66"></span><p class="line867">
 
60
<h1 id="HelpOnInstalling.2BAC8-BasicInstallation.InstallMoinMoin">Install MoinMoin</h1>
 
61
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-68"></span><p class="line862">You can install Moin<tt class="backtick"></tt>Moin to either: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-69"></span><ul><li>a system location (if you have the necessary rights to do that -- on Linux you need to be root) <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-70"></span></li><li><p class="line862">some specific location, like your home directory (Linux) or <tt class="backtick">C:\moin</tt> (Windows). <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-72"></span></li></ul><p class="line874">The installation to a system location is easier, so choose that if possible. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-74"></span><p class="line867"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" 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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-76"></span><p class="line867">
 
62
<h2 id="HelpOnInstalling.2BAC8-BasicInstallation.RecommendedinstallationcommandforLinux.28andMacOsX.29">Recommended installation command for Linux (and MacOs X)</h2>
 
63
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-77"></span><p class="line862">As you have chosen to not use a preconfigured package for your system this time it is highly recommended that you do not install <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> into the default location. This is because otherwise, if you later want to install a moin package of your distribution this will overwrite your existing installation. The most common path for your own installations is below <tt>/usr/local</tt> (this is called the PREFIX). A command that should be ok for most Linux distributions and also MacOS X is <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-78"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-79"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-81"></span><pre>&gt; python setup.py install --prefix='/usr/local' --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-83"></span><p class="line862">This will install the shared files to '/usr/local/share/moin' and the moin code to <tt class="backtick">/usr/local/lib/python2.x/site-packages/MoinMoin/</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-84"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-85"></span><p class="line867">
 
64
<h2 id="HelpOnInstalling.2BAC8-BasicInstallation.Debuggingsetupprocess">Debugging setup process</h2>
 
65
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-86"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-87"></span><p class="line862">If you have problems with the <tt class="backtick">setup.py</tt> install step, try using the command: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-89"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-90"></span><pre>&gt; python -v setup.py --quiet install --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-92"></span><p class="line862">The additional <tt class="backtick">-v</tt> flag should provide you detailed verbose messages every step of the way. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-93"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-94"></span><p class="line867"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> On Linux, if you get an error like <tt class="backtick">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 class="backtick">distutils</tt></strong> installed, it's usually a part of the <strong>Python development libarary (<tt class="backtick">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 class="backtick">python-devel</tt></strong> package, on Debian it's called <strong><tt class="backtick">python-dev</tt></strong>. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-96"></span><p class="line867">
 
66
<h2 id="HelpOnInstalling.2BAC8-BasicInstallation.Installingtothedefaultsystemlocation">Installing to the default system location</h2>
 
67
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-97"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-98"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-100"></span><pre>&gt; python setup.py --quiet install --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-102"></span><p class="line862">This installs Moin<tt class="backtick"></tt>Moin to the default system location (typically the Python directory, for example on Linux, inside <tt class="backtick">/usr/lib/python2.x/site-packages/MoinMoin</tt> and <tt class="backtick">/usr/share/moin</tt>). Look at the <tt class="backtick">install.log</tt> file to see what was installed, and where. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-106"></span><p class="line867">
 
68
<h2 id="HelpOnInstalling.2BAC8-BasicInstallation.Installinginthehomedirectoryoranotherspecificlocation">Installing in the home directory or another specific location</h2>
 
69
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-108"></span><p class="line874">Linux example, installing in the home directory: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-110"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-111"></span><pre>&gt; python setup.py --quiet install --prefix=$HOME --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-113"></span><p class="line862">Windows example, installing in the <tt class="backtick">C:\moin</tt> directory: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-114"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-115"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-116"></span><pre>&gt; python setup.py --quiet install --prefix="C:\moin" --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-117"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-118"></span><p class="line862">All Moin<tt class="backtick"></tt>Moin files will then be installed inside those directories, see <tt class="backtick">install.log</tt> to know which files were installed, and where. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-119"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-120"></span><p class="line867"><strong>Note:</strong> You will likely see the following warning: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-122"></span><ul><li style="list-style-type:none"><p class="line891"><tt class="backtick">warning:&nbsp;install:&nbsp;modules&nbsp;installed&nbsp;to&nbsp;'C:\moin\',&nbsp;which</tt><br>
 
70
 <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-123"></span><tt class="backtick">is&nbsp;not&nbsp;in&nbsp;Python's&nbsp;module&nbsp;search&nbsp;path&nbsp;(sys.path)&nbsp;--&nbsp;you'll</tt><br>
 
71
 <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-124"></span><tt class="backtick">have&nbsp;to&nbsp;change&nbsp;the&nbsp;search&nbsp;path&nbsp;yourself</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-126"></span></li></ul><p class="line862">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 class="backtick"></tt>Moin code. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-127"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-128"></span><p class="line862">For example, if you are running using a webserver and standard CGI, edit <tt class="backtick">moin.cgi</tt> and add your installation directory to the Python path, like this: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-129"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-131"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-132"></span><pre>import sys
 
72
sys.path.insert(0, 'C:/moin')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-133"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-134"></span><p class="line867">
 
73
<h1 id="HelpOnInstalling.2BAC8-BasicInstallation.Testinstallation">Test installation</h1>
 
74
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-135"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-136"></span><p class="line862">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 class="backtick">import&nbsp;MoinMoin</tt>. Nothing should be displayed in response to this command. Example: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-137"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-138"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-139"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-140"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-141"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-142"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-143"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-144"></span><pre>&gt; python
 
75
Python 2.4.4 (...)
 
76
Type "help", "copyright", "credits" or "license" for more information.
 
77
&gt;&gt;&gt; import MoinMoin
 
78
&gt;&gt;&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-146"></span><p class="line874">If you get this instead: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-147"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-148"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-149"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-150"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-151"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-152"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-153"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-154"></span><pre>&gt;&gt;&gt; import MoinMoin
 
79
Traceback (most recent call last):
 
80
  File "&lt;stdin&gt;", line 1, in ?
 
81
ImportError: No module named MoinMoin
 
82
&gt;&gt;&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-155"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-156"></span><p class="line862">then you have to tune your installation. Try modifying <tt class="backtick">sys.path</tt>, as described above. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-157"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-158"></span><p class="line867">
 
83
<h1 id="HelpOnInstalling.2BAC8-BasicInstallation.Whathasbeeninstalled">What has been installed</h1>
 
84
<span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-159"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-160"></span><p class="line862">So, you have a ready-to-work Moin<tt class="backtick"></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 class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-161"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-162"></span><p class="line867"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> It is important that you understand the different locations used in a Moin<tt class="backtick"></tt>Moin setup, so read this carefully. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-163"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-164"></span><p class="line862">In the following descriptions, <tt class="backtick">PREFIX</tt> is what you used with the <tt class="backtick">setup.py</tt> command, or a default location if you didn't use the <tt class="backtick">--prefix</tt> option. (Typical default values on Linux are <tt class="backtick">/usr</tt> and <tt class="backtick">/usr/local</tt>.) <tt class="backtick">X.Y</tt> is the version of Python. Typically, this is <tt class="backtick">2.3</tt>, <tt class="backtick">2.4</tt> or <tt class="backtick">2.5</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-165"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-166"></span><p class="line862">Look into <tt class="backtick">install.log</tt> to find out about following important locations: <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-167"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-168"></span><ul><li><p class="line891"><strong><tt class="backtick">MoinMoin</tt> directory</strong>, usually <tt class="backtick">PREFIX/lib/pythonX.Y/site-packages/MoinMoin</tt> -- this is where the Moin<tt class="backtick"></tt>Moin <strong>source code</strong> is located <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-169"></span></li><li><p class="line891"><strong><tt class="backtick">share</tt> directory</strong>, usually <tt class="backtick">PREFIX/share/moin</tt> - this is where the <em>templates</em> are located <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-170"></span><ul><li><p class="line891"><strong><tt class="backtick">data</tt></strong> directory (wiki pages, users, etc.) - only Moin<tt class="backtick"></tt>Moin should access this <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-171"></span></li><li><p class="line891"><strong><tt class="backtick">underlay</tt></strong> directory (wiki pages) - only Moin<tt class="backtick"></tt>Moin should access this <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-172"></span></li><li><p class="line891"><strong><tt class="backtick">htdocs</tt></strong> directory with html support files (images for the various themes, etc.) - the web server will need to access this <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-173"></span></li><li><p class="line891"><strong><tt class="backtick">server</tt></strong> - Moin<tt class="backtick"></tt>Moin example startup files (like <tt class="backtick">moin.cgi</tt> for CGI, and other files for other startup methods) <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-174"></span></li><li><p class="line891"><strong><tt class="backtick">config</tt></strong> - Moin<tt class="backtick"></tt>Moin example configuration files (like <tt class="backtick">wikiconfig.py</tt>) <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-175"></span></li></ul></li><li><p class="line891"><strong><tt class="backtick">bin</tt></strong> directory with some scripts that help you use the Moin<tt class="backtick"></tt>Moin shell commands <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-176"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-177"></span></li></ul><p class="line862">We talk of <em>templates</em> in the <tt class="backtick">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 class="backtick"></tt>Moin versions. <span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.line-178"></span><span class="anchor" id="HelpOnInstalling.2BAC8-BasicInstallation.bottom"></span></div> <span class="anchor" id="line-48"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-49"></span><span class="anchor" id="wikiinstance-creation"></span> <span class="anchor" id="line-50"></span><div dir="ltr" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.top"></span>
 
85
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-9"></span><p class="line862">After you have downloaded and installed Moin<tt class="backtick"></tt>Moin, you will want to "have a wiki". As explained at the bottom of <a href="http://master17.moinmo.in/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 class="backtick"></tt>Moin: only the original files will be overwritten, not your copies. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-11"></span><p class="line862">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 independent from the others, with a different configuration, different pages, different users, etc. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-13"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-15"></span><p class="line862">Linux users can use <a class="attachment" href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation?action=AttachFile&amp;do=view&amp;target=createinstance.sh" title="attachment:createinstance.sh">createinstance.sh</a> (a bash script that creates the instance) instead of doing all steps manually: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-16"></span><ol type="1"><li>If anything is unclear, just read the sections below for more hints. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-17"></span></li><li>Have a look into the script before running it, if all settings are correct for your setup: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-18"></span><ul><li>USER and GROUP should be the user and group used by your web-server for running moin. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-19"></span></li><li><p class="line862">SHARE is where the shared files were copied to, see install.log from the <tt class="backtick">setup.py&nbsp;install</tt> step <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-20"></span></li></ul></li><li>The script takes a single parameter: the location of your wiki instance (see "Choose a location" section below): <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-21"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-23"></span><pre># ./createinstance.sh /path/to/mywiki</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-24"></span></li><li>Now continue in section "Tune configuration" <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-25"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-26"></span></li></ol><p class="line867">
 
86
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Readthisfirst">Read this first</h1>
 
87
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-27"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-28"></span><p class="line867">
 
88
<h2 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Securitywarnings">Security warnings</h2>
 
89
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-29"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-30"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862"> <img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: make sure that your <tt class="backtick">data</tt> directory and your configuration files are not accessible through your web server. Do not put your wiki directory in <tt class="backtick">public_html</tt>, <tt class="backtick">Sites</tt> or any other directory your web server can access. The web server only needs to access the file in the <tt class="backtick">htdocs</tt> directory and the <tt class="backtick">moin.cgi</tt> script! (Or whatever script your server uses to start Moin<tt class="backtick"></tt>Moin.)</strong> </td>
 
90
</tr>
 
91
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-31"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-32"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862"> <img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: make sure that the <tt class="backtick">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> </td>
 
92
</tr>
 
93
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-33"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-34"></span><p class="line867">
 
94
<h2 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.NotetoWindowsusers">Note to Windows users</h2>
 
95
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-35"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-36"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-38"></span><p class="line867">
 
96
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Chooseawikiname">Choose a wiki name</h1>
 
97
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-39"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-40"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-41"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-42"></span><p class="line862">The name "<tt class="backtick">mywiki</tt>" is used as an example in the various commands below. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-43"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-44"></span><p class="line867">
 
98
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Choosealocation">Choose a location</h1>
 
99
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-45"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-46"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-48"></span><p class="line862">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 class="backtick">/usr/local/var/moin</tt>, <tt class="backtick">/mnt/wikis</tt>, etc. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-50"></span><p class="line862">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 class="backtick">share/moin</tt> subdirectory. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-52"></span><p class="line867">
 
100
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Collectsomeimportantinformation">Collect some important information</h1>
 
101
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-53"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-54"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-55"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-56"></span><p class="line862">On Linux, the <tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-57"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-58"></span><ul><li><p class="line891"><tt class="backtick">PREFIX</tt> is the prefix you used during the <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-59"></span></li><li><p class="line891"><tt class="backtick">SHARE</tt> is the name of the <tt class="backtick">share</tt> directory, as discussed at the bottom of <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-60"></span></li><li><p class="line891"><tt class="backtick">WIKILOCATION</tt> is the name of the directory that will contain your wiki instance <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-61"></span></li><li><p class="line891"><tt class="backtick">INSTANCE</tt> is the directory containing the wiki instance. It cannot be an existing directory readable through Apache, otherwise it will fail. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-63"></span></li></ul><p class="line874">If you are an administrator, you also need to collect the following: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-64"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-65"></span><ul><li><p class="line891"><tt class="backtick">USER</tt> is the user name of the web server <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-66"></span></li><li><p class="line891"><tt class="backtick">GROUP</tt> is the name of the group to which the web server belongs <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-68"></span></li></ul><p class="line874">Now, Linux folks, let's store these settings in memory: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-70"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-72"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-74"></span><pre>&gt; export PREFIX=/usr                # this might be something else
 
102
&gt; export SHARE=$PREFIX/share/moin   # this should be correct for most people
 
103
&gt; export WIKILOCATION=$SHARE        # this is just an example
 
104
&gt; export INSTANCE=mywiki            # this is just an example</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-76"></span><p class="line874">Administrators also need the following two lines: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-78"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-79"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-81"></span><pre>&gt; export USER=www-data              # this is just an example
 
105
&gt; export GROUP=www-data             # this is just an example</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-83"></span><p class="line867">
 
106
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Copythefiles">Copy the files</h1>
 
107
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-84"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-85"></span><p class="line862">To create your new instance, you first need to create a directory named like your instance, inside the <tt class="backtick">WIKILOCATION</tt>. Then you need to copy the <tt class="backtick">data</tt> and <tt class="backtick">underlay</tt> directories from your <tt class="backtick">SHARE</tt> directory into your instance directory. Finally, you need to copy the <tt class="backtick">wikiconfig.py</tt> file from the <tt class="backtick">config</tt> directory into the instance directory. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-86"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-87"></span><p class="line874">Linux folks need to just type these commands: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-89"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-92"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-93"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-94"></span><pre>&gt; cd $WIKILOCATION
 
108
&gt; mkdir $INSTANCE                   # make a directory for this instance
 
109
&gt; cp -R $SHARE/data $INSTANCE       # copy template data directory
 
110
&gt; cp -R $SHARE/underlay $INSTANCE   # copy underlay data directory
 
111
&gt; cp $SHARE/config/wikiconfig.py $INSTANCE   # copy wiki configuration sample file</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-96"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" 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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-97"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-98"></span></li></ul><p class="line867">
 
112
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Setpermissions">Set permissions</h1>
 
113
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-100"></span><p class="line867">
 
114
<h2 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Administrators">Administrators</h2>
 
115
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-102"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-104"></span><p class="line874">On Linux, the following commands should be enough: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-106"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-108"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-109"></span><pre>&gt; chown -R $USER.$GROUP $INSTANCE   # check that USER and GROUP are correct
 
116
&gt; chmod -R ug+rwX $INSTANCE         # USER.GROUP may read and write
 
117
&gt; chmod -R o-rwx $INSTANCE          # everybody else is rejected</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-110"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-111"></span><p class="line867">
 
118
<h2 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Normalusers">Normal users</h2>
 
119
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-113"></span><p class="line862">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 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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-114"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-115"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-117"></span><p class="line874">On Linux, the following commands will open the instance directory to the whole world: <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-119"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-120"></span><pre>&gt; chmod -R a+rwX $INSTANCE</pre><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-122"></span><p class="line867"><strong>Note:</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-123"></span><ul><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-124"></span></li><li><p class="line862">the best other possibility is that the server administrator sets up <tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-126"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-127"></span></li></ul><p class="line867">
 
120
<h1 id="HelpOnInstalling.2BAC8-WikiInstanceCreation.Tuneconfiguration">Tune configuration</h1>
 
121
<span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-129"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-131"></span><p class="line862">Edit <tt class="backtick">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 alt=":)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/smile.png" title=":)" width="15" /> Read the comments inside <tt class="backtick">wikiconfig.py</tt>, they will guide you through this process. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-132"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-133"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862"> <img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: don't forget to restart your web server in order to apply changes in <tt class="backtick">wikiconfig.py</tt></strong> </td>
 
122
</tr>
 
123
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-134"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-135"></span><p class="line867"><a href="http://master17.moinmo.in/HelpOnConfiguration">HelpOnConfiguration</a> contains all the details about all the options, in case the comments in <tt class="backtick">wikiconfig.py</tt> are not enough. <span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.line-136"></span><span class="anchor" id="HelpOnInstalling.2BAC8-WikiInstanceCreation.bottom"></span></div> <span class="anchor" id="line-51"></span><hr class="hr1" /><p class="line874"> <span class="anchor" id="line-52"></span><span class="anchor" id="linuxapache-install"></span> <span class="anchor" id="line-53"></span>
 
124
<h1>Linux Installation using Apache</h1>
 
125
<div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheOnLinux.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.top"></span>
 
126
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-9"></span><p class="line862">This page describes the particular steps that need to be taken to create a wiki instance using <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> on Linux with the Apache web server. <strong>You should have already performed the <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>. </strong>Installations on other Unices like FreeBSD are very similar. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-11"></span><p class="line874">On this page two installation scenarios are discussed: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-13"></span><ol type="1"><li><p class="line862">You have <strong>Administrator Rights </strong>(you are user 'root' or may use sudo)  for a server and are able to install and modify files almost anywhere on the machine, and notably able to modifiy the Apache configuration. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-14"></span></li><li><p class="line862">You are a <strong>Simple User,</strong> only able to write files into your home directory, and unable to alter the master Apache configuration file. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-15"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-16"></span></li></ol><p class="line874">The following options are not mentioned here: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-17"></span><ul><li><p class="line862">using <strong>suEXEC</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-18"></span></li><li><p class="line862">using <strong>FastCGI </strong> (see <a href="http://master17.moinmo.in/HelpOnInstalling/FastCgi">../FastCgi</a>) <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-19"></span></li><li><p class="line862">using <strong>mod_python</strong> (see <a href="http://master17.moinmo.in/HelpOnInstalling/ApacheWithModPython">../ApacheWithModPython</a>) <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-20"></span></li><li><p class="line862">setting up a <strong>Root Wiki</strong> (see <a href="http://master17.moinmo.in/HelpOnConfiguration/ApacheVoodoo">HelpOnConfiguration/ApacheVoodoo</a>) <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-21"></span></li><li><p class="line862">For more advanced configurations and some tricks see also <a href="http://master17.moinmo.in/HelpMiscellaneous">HelpMiscellaneous</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-23"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-24"></span></li></ul><p class="line867"><strong>Table of contents</strong> <div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li><ol><li>
 
127
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.AdministratorScenario">Administrator Scenario</a><ol><li>
 
128
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Createawikiinstance">Create a wiki instance</a></li><li>
 
129
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Installmoin.cgi">Install moin.cgi</a></li><li>
 
130
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi">Configure moin.cgi</a></li><li>
 
131
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureApache">Configure Apache</a></li><li>
 
132
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureMoinMoin">Configure MoinMoin</a></li><li>
 
133
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Testthewiki">Test the wiki</a></li></ol></li><li>
 
134
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.SimpleUserScenario">Simple User Scenario</a><ol><li>
 
135
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Makesure.2BAC8Afg-usernameworks">Make sure /~username works</a></li><li>
 
136
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Createawikiinstance-1">Create a wiki instance</a></li><li>
 
137
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Installthehtdocsfiles">Install the htdocs files</a></li><li>
 
138
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Installmoin.cgi-1">Install moin.cgi</a></li><li>
 
139
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi-1">Configure moin.cgi</a></li><li>
 
140
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureMoinMoin-1">Configure MoinMoin</a></li><li>
 
141
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Testthewiki-1">Test the wiki</a></li></ol></li><li>
 
142
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Troubleshooting">Troubleshooting</a><ol><li>
 
143
<a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.Addingpermissiontoservethehtdocsdirectory">Adding permission to serve the htdocs directory</a></li></ol></li></ol></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-25"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-26"></span><p class="line867">
 
144
<h2 id="HelpOnInstalling.2BAC8-ApacheOnLinux.AdministratorScenario">Administrator Scenario</h2>
 
145
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-27"></span><p class="line862">The exact location of the various Apache configs varies - often used locations are: <tt>/etc/httpd/,&nbsp;/etc/apache/&nbsp;or&nbsp;/etc/apache2/</tt>. You should have at least <em>some</em> know-how of how to set up and deal with Apache, especially when it comes to virtual host setup. If you do not know what we are talking about, please read about <em>Configuration Files</em> and <em>Apache Virtual Host documentation </em>in the <a class="http" href="http://httpd.apache.org/docs/">Apache documentation</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-29"></span><p class="line862">On Apache2 it is quite usual to have a directory (like /etc/httpd/conf.d) for virtual hosts. So every file ending with <em>.conf</em> will be included into the main Apache configuration file. To look if this is true for your configuration, search for the word "Include". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-31"></span><p class="line867">
 
146
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Createawikiinstance">Create a wiki instance</h3>
 
147
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-32"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-33"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-34"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-35"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-38"></span><pre>&gt; egrep "^User|^Group" /etc/httpd/httpd.conf
 
148
User wwwrun
 
149
Group nogroup</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-39"></span><p class="line862">This shows a typical result: "<tt class="backtick">wwwrun.nogroup</tt>". Other common results are "<tt class="backtick">nobody.nogroup</tt>", "<tt class="backtick">apache.apache</tt>" and "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-41"></span><p class="line862">Once you have gathered this information, read <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> and follow the steps described there. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-42"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-43"></span><p class="line867">
 
150
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Installmoin.cgi">Install moin.cgi</h3>
 
151
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-44"></span><p class="line862">There is one last file you need to copy, the bridge between Apache and Moin<tt class="backtick"></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 class="backtick"></tt>Moin components to handle the request. You can actually put this script anywhere you like (all the paths to the files Moin<tt class="backtick"></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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-45"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-46"></span><p class="line862">We will create a <tt class="backtick">cgi-bin</tt> subdirectory in the instance directory. Using the environment variables defined in <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>, run the following commands: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-48"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-52"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-53"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-55"></span><pre>&gt; cd $WIKILOCATION/$INSTANCE
 
152
&gt; mkdir cgi-bin
 
153
&gt; cp $SHARE/server/moin.cgi cgi-bin
 
154
&gt; chown -R $USER.$GROUP cgi-bin
 
155
&gt; chmod -R ug+rx cgi-bin
 
156
&gt; chmod -R o-rwx cgi-bin</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-57"></span><p class="line867">
 
157
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi">Configure moin.cgi</h3>
 
158
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-58"></span><p class="line862">When <tt class="backtick">moin.cgi</tt> is launched, it imports a Moin<tt class="backtick"></tt>Moin module that in turn imports other modules and the configuration file. While the Moin<tt class="backtick"></tt>Moin modules should always be found in a properly configured system (as described in <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>), it is likely that the configuration file will not be found. Edit the <tt class="backtick">moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-60"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-63"></span><pre>import sys
 
159
sys.path.insert(0, '..')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-64"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-65"></span><p class="line862">An even better way is to use the absolute path name of the directory that contains the <tt class="backtick">wikiconfig.py</tt> file instead of <tt class="backtick">'..'</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-67"></span><p class="line867">
 
160
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureApache">Configure Apache</h3>
 
161
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-68"></span><p class="line874">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 depending on 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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-70"></span><p class="line874">Your Apache should be set up so that: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-72"></span><ul><li>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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-73"></span></li><li><p class="line862">An <strong>Alias</strong> is set up to redirect requests from <tt class="backtick">/moin_static160/</tt> (in the URL - see also <tt class="backtick">url_prefix_static</tt> configuration variable) to the <tt class="backtick">htdocs</tt> directory (in the <tt class="backtick">share</tt> directory, as discussed at the bottom of <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>). Please note that <tt class="backtick">url_prefix_static</tt> will change with every moin release! <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-74"></span></li><li><p class="line862">A <strong>ScriptAlias</strong> is set up to redirect requests from whatever you want (we suggest you use your instance name, for example <tt class="backtick">/mywiki</tt>) to the CGI script you just copied. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-76"></span></li></ul><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-78"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-79"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-81"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-82"></span><pre>&gt; echo "" &gt;&gt;/etc/httpd/httpd.conf
 
162
&gt; echo "Alias /moin_static160/ \"$SHARE/htdocs/\"" &gt;&gt;/etc/httpd/httpd.conf
 
163
&gt; echo "ScriptAlias /mywiki \"$WIKILOCATION/$INSTANCE/cgi-bin/moin.cgi\"" &gt;&gt;/etc/httpd/httpd.conf</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-83"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-84"></span><p class="line874">So this would add two lines like the both below to a config file (possibly you use one for each virtual server): <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-86"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-87"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-89"></span><pre>Alias /moin_static160/ /usr/local/share/htdocs/
 
164
ScriptAlias /mywiki /usr/local/share/moin/mywiki/cgi-bin/moin.cgi</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-91"></span><p class="line862">You only need to define the Alias for <tt class="backtick">htdocs</tt> once, no matter how many wikis you run with the 1.6.0 version of moin. You need to define a different script alias for each wiki instance you intend to run. So you could also define the Alias in a central Apache configuration file and only define the <a class="nonexistent" href="http://master17.moinmo.in/ScriptAlias">ScriptAlias</a> in virtual host configurations. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-92"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-93"></span><p class="line867">
 
165
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureMoinMoin">Configure MoinMoin</h3>
 
166
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-94"></span><p class="line862">Finally, check that the <tt class="backtick">wikiconfig.py</tt> file in the instance directory contains correct paths for: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-95"></span><ul><li><p class="line891"><tt class="backtick">url_prefix_static</tt> (static stuff like css/img/js) <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-96"></span></li><li><p class="line891"><tt class="backtick">data_dir</tt> (the instance data directory) and <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-97"></span></li><li><p class="line891"><tt class="backtick">data_underlay_dir</tt> (the instance underlay directory). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-99"></span></li></ul><p class="line862">You can use relative paths for the directories, but note that they are relative to the CGI script, not the configuration file! Better <strong>use absolute paths</strong>, and save yourself some headaches. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-101"></span><p class="line874">Here are the settings you should have in the config file if you followed all our suggestions: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-102"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-103"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-106"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-107"></span><pre>    data_dir = '../data/'  # better use absolute path
 
167
    data_underlay_dir = '../underlay/'  # better use absolute path
 
168
    url_prefix_static = '/moin_static160' # depends on moin version</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-108"></span><p class="line862">There are other settings you will likely want to alter, look at the bottom of <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> for more details about them. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-110"></span><p class="line867">
 
169
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Testthewiki">Test the wiki</h3>
 
170
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-111"></span><p class="line862">Everything should work fine now. It is time to <strong>restart the Apache server</strong> (usually with "<tt class="backtick">/etc/init.d/apache&nbsp;restart</tt>", sometimes with "<tt class="backtick">apachectl&nbsp;restart</tt>") and perform the following steps: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-113"></span><ul><li><p class="line862">Run the <em>Moin<tt class="backtick"></tt>Moin CGI Diagnosis</em>: connect to "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-114"></span></li><li><p class="line862">Access your new wiki with the URL "<tt class="backtick">http://127.0.0.1/mywiki/</tt>" (or the name and port you have defined in the Apache configuration file). You should see some wiki page - read it. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-115"></span></li><li><p class="line862">Then go to the <a href="http://master17.moinmo.in/WikiSandBox">WikiSandBox</a> page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-116"></span></li><li>Try to edit it and save your changes. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-117"></span></li><li><p class="line862">If that works, see if your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-118"></span></li><li><p class="line862">If you see them, congratulations, your new wiki works! <img alt=":)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-119"></span></li></ul><p class="line874">If something goes wrong, have a look at Troubleshooting, at the bottom of this page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-122"></span><p class="line867">
 
171
<h2 id="HelpOnInstalling.2BAC8-ApacheOnLinux.SimpleUserScenario">Simple User Scenario</h2>
 
172
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-123"></span><p class="line862">On machines shared by many people, simple users typically have no access to the root account, cannot modify the <tt class="backtick">httpd.conf</tt> file, and cannot copy files into the system-wide <tt class="backtick">cgi-bin</tt> and <tt class="backtick">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 class="backtick">UserDir</tt> directive. If the machine administrator decides to use it, all URLs that start with "<tt class="backtick">/~username</tt>" will be redirected to a directory in the users' home directories, where they have write permission and can install Moin<tt class="backtick"></tt>Moin. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-124"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-125"></span><p class="line862">As an example, we will consider the case of a user named "<tt class="backtick">mm</tt>". Of course, wherever you see "<tt class="backtick">mm</tt>" below, you will replace it with your own username. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-126"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-127"></span><p class="line867">
 
173
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Makesure.2BAC8Afg-usernameworks">Make sure /~username works</h3>
 
174
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-128"></span><p class="line862">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 class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-129"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-130"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-131"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-132"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-133"></span><pre>&gt; ls -ld ~/public_html
 
175
drwxr-xr-x   2 mm       users        4096 Nov 30 00:29 public_html</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-134"></span><p class="line874">If the directory does not exist, create it, and be sure it can be read and entered by the web server. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-135"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-136"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-137"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-138"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-139"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-140"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-141"></span><pre>&gt; mkdir public_html
 
176
&gt; chmod a+rx public_html
 
177
&gt; ls -ld ~/public_html
 
178
drwxr-xr-x   2 mm       users        4096 Nov 30 00:35 public_html</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-142"></span><p class="line862">Now, check if the "<tt class="backtick">/~mm</tt>" URL works: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-143"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-144"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-146"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-147"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-148"></span><pre>&gt; lynx -error_file=/dev/stderr -dump http://localhost/~mm/ &gt;/dev/null
 
179
URL=http://localhost/~mm/ (GET)
 
180
STATUS=HTTP/1.1 200 OK</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-149"></span><p class="line862">If you get a "<tt class="backtick">200&nbsp;OK</tt>" response code, then it works, and you can go on to the next check. If you get a "<tt class="backtick">403&nbsp;Forbidden</tt>" or a "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-150"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-151"></span><ul><li><p class="line862">Check the permissions for your home directory (<tt class="backtick">~</tt>) and your <tt class="backtick">public_html</tt> directory. The first one should at least end with "<tt class="backtick">--x</tt>", and the second one, as we saw above, with "<tt class="backtick">r-x</tt>". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-152"></span></li><li><p class="line862">It also possible that the administrator has set up another name for the personal web site directory. "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-153"></span></li><li>Finally, if the personal web site feature is disabled, maybe you can ask the administrator to enable it? <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-154"></span></li></ul><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-155"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-156"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-157"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-158"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-159"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-160"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-161"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-162"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-163"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-164"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-165"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-166"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-167"></span><pre>&gt; mkdir -p ~/public_html/cgi-bin
 
181
&gt; cat &gt; ~/public_html/cgi-bin/test.cgi
 
182
#!/bin/sh
43
183
echo Content-Type: text/plain
44
184
echo
45
 
echo "Your web server is running as:"
46
 
id
47
185
echo "CGI scripts work"
48
 
echo "Now we try to invoke Python interpreters and get their versions:"
49
 
echo "Your default version of python is:"
50
 
python -V 2&gt;&amp;1
51
 
echo 
52
 
echo "Available versions of python are:"
53
 
python2.2 -V 2&gt;&amp;1 &amp;&amp; which python2.2
54
 
python2.3 -V 2&gt;&amp;1 &amp;&amp; which python2.3
55
 
python2.4 -V 2&gt;&amp;1 &amp;&amp; which python2.4
56
 
python2.5 -V 2&gt;&amp;1 &amp;&amp; which python2.5
57
 
echo "Finished."
58
 
 
59
 
</pre><a class="attachment" href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation?action=AttachFile&amp;do=get&amp;target=pythontest.cgi" title="attachment:pythontest.cgi">pythontest.cgi</a> <span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line874" />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 class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line862" />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 class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line867" />
60
 
<h1 id="head-119b1acf8110bb618e4f366c3d1f8a35ad625f75">Download MoinMoin</h1>
61
 
<span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><p class="line862" />To download the distribution archive, go to the <a class="http" href="http://sourceforge.net/project/showfiles.php?group_id=8482">download area</a> and fetch the latest archive. <span class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><p class="line862" />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 class="backtick">.tar.gz</tt> archive, which you can unpack as shown below. <span class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><ul><li>On Windows <span class="anchor" id="line-52"></span><ul><li><p class="line862" />You can use recent versions of programs like Win<tt class="backtick"></tt>Zip, Win<tt class="backtick"></tt>Rar, and Win<tt class="backtick"></tt>Ace, which handle .tar.gz kind of archives. <span class="anchor" id="line-53"></span></li><li><p class="line862" />At the command prompt, you can use <a class="http" href="http://gnuwin32.sourceforge.net/packages/gzip.htm">GNU gzip</a> and <a class="http" href="http://gnuwin32.sourceforge.net/packages/tar.htm">GNU tar</a> for Windows. <span class="anchor" id="line-54"></span></li></ul></li><li>On Linux <span class="anchor" id="line-55"></span><ul><li>You can use your favorite file manager -- it should be able to unpack them. <span class="anchor" id="line-56"></span></li><li><p class="line862" />At any shell prompt, you can use the <tt class="backtick">tar</tt> command. <span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span></li></ul></li></ul><p class="line862" />The distribution archive will always unpack into a directory named <tt class="backtick">moin-&lt;version&gt;</tt>, for example <tt class="backtick">moin-1.5</tt>. <span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><p class="line862" />Here is how you would unpack the archive (using GNU tar) and enter the directory with the Moin<tt class="backtick"></tt>Moin files: <span class="anchor" id="line-61"></span><span class="anchor" id="line-62"></span><pre>&gt; tar xzf moin-1.5.0.tar.gz
62
 
<span class="anchor" id="line-63"></span>&gt; cd moin-1.5.0
63
 
<span class="anchor" id="line-64"></span></pre><span class="anchor" id="line-65"></span><span class="anchor" id="line-66"></span><p class="line867" />
64
 
<h1 id="head-a84e58c8b4256bd645b9c47b5a900219a356259f">Install MoinMoin</h1>
65
 
<span class="anchor" id="line-67"></span><span class="anchor" id="line-68"></span><p class="line862" />You can install Moin<tt class="backtick"></tt>Moin to either: <span class="anchor" id="line-69"></span><ul><li>a system location (if you have the necessary rights to do that -- on Linux you need to be root) <span class="anchor" id="line-70"></span></li><li><p class="line862" />some specific location, like your home directory (Linux) or <tt class="backtick">C:\moin</tt> (Windows). <span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span></li></ul><p class="line874" />The installation to a system location is easier, so choose that if possible. <span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span><p class="line867" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" 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 class="anchor" id="line-75"></span><span class="anchor" id="line-76"></span><p class="line862" />If you have problems with the <tt class="backtick">setup.py</tt> install step, try using the command: <span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><pre>&gt; python -v setup.py --quiet install --record=install.log
66
 
<span class="anchor" id="line-79"></span></pre><span class="anchor" id="line-80"></span><span class="anchor" id="line-81"></span><p class="line862" />The additional <tt class="backtick">-v</tt> flag should provide you detailed verbose messages every step of the way. <span class="anchor" id="line-82"></span><span class="anchor" id="line-83"></span><p class="line867" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> On Linux, if u get an error like <tt class="backtick">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 class="backtick">distutils</tt></strong> installed, it's usually a part of the <strong>Python development libarary (<tt class="backtick">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 class="backtick">python-devel</tt></strong> package, on Debian it's called <strong><tt class="backtick">python-dev</tt></strong>. <span class="anchor" id="line-84"></span><span class="anchor" id="line-85"></span><p class="line867" />
67
 
<h2 id="head-640b21abea127e7ac4b48c938607c233b7119bd5">Installing in the default system location</h2>
68
 
<span class="anchor" id="line-86"></span><span class="anchor" id="line-87"></span><p class="line867" /><span class="anchor" id="line-88"></span><pre>&gt; python setup.py --quiet install --record=install.log
69
 
<span class="anchor" id="line-89"></span></pre><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line862" />This installs Moin<tt class="backtick"></tt>Moin to the default system location (typically the Python directory, for example on Linux, inside <tt class="backtick">/usr/lib</tt> and <tt class="backtick">/usr/share</tt>). Look at the <tt class="backtick">install.log</tt> file to see what was installed, and where. <span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><ul><li>Mac OS X note: use the command: <span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><pre>python setup.py install --install-data='/usr/local'
70
 
<span class="anchor" id="line-96"></span></pre><span class="anchor" id="line-97"></span>This will install the shared files to '/usr/local/share/moin', instead of an inconvenient location in the System folder. <span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span></li></ul><p class="line867" />
71
 
<h2 id="head-ae8ab55eb5e8c11d4fd1eb06e12d69f1b33d411b">Installing in the home directory or another specific location</h2>
72
 
<span class="anchor" id="line-100"></span><span class="anchor" id="line-101"></span><p class="line874" />Linux example, installing in the home directory: <span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><pre>&gt; python setup.py --quiet install --prefix=$HOME --record=install.log
73
 
<span class="anchor" id="line-104"></span></pre><span class="anchor" id="line-105"></span><span class="anchor" id="line-106"></span><p class="line862" />Windows example, installing in the <tt class="backtick">C:\moin</tt> directory: <span class="anchor" id="line-107"></span><span class="anchor" id="line-108"></span><pre>&gt; python setup.py --quiet install --prefix="C:\moin" --record=install.log
74
 
<span class="anchor" id="line-109"></span></pre><span class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><p class="line862" />All Moin<tt class="backtick"></tt>Moin files will then be installed inside those directories, see <tt class="backtick">install.log</tt> to know which files were installed, and where. <span class="anchor" id="line-112"></span><span class="anchor" id="line-113"></span><p class="line867" /><strong>Note:</strong> You will likely see the following warning: <span class="anchor" id="line-114"></span><span class="anchor" id="line-115"></span><ul><li style="list-style-type:none"><p class="line891" /><tt class="backtick">warning:&nbsp;install:&nbsp;modules&nbsp;installed&nbsp;to&nbsp;'C:\moin\',&nbsp;which</tt><br />
75
 
 <span class="anchor" id="line-116"></span><tt class="backtick">is&nbsp;not&nbsp;in&nbsp;Python's&nbsp;module&nbsp;search&nbsp;path&nbsp;(sys.path)&nbsp;--&nbsp;you'll</tt><br />
76
 
 <span class="anchor" id="line-117"></span><tt class="backtick">have&nbsp;to&nbsp;change&nbsp;the&nbsp;search&nbsp;path&nbsp;yourself</tt> <span class="anchor" id="line-118"></span><span class="anchor" id="line-119"></span></li></ul><p class="line862" />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 class="backtick"></tt>Moin code. <span class="anchor" id="line-120"></span><span class="anchor" id="line-121"></span><p class="line862" />For example, if you are running using a webserver and standard CGI, edit <tt class="backtick">moin.cgi</tt> and add your installation directory to the Python path, like this: <span class="anchor" id="line-122"></span><span class="anchor" id="line-123"></span><pre>import sys
77
 
<span class="anchor" id="line-124"></span>sys.path.insert(0, 'C:/moin')
78
 
<span class="anchor" id="line-125"></span></pre><span class="anchor" id="line-126"></span><span class="anchor" id="line-127"></span><p class="line867" />
79
 
<h1 id="head-d7d600c8dcfdd9270f4a6642566404ede510f46a">Test installation</h1>
80
 
<span class="anchor" id="line-128"></span><span class="anchor" id="line-129"></span><p class="line862" />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 class="backtick">import&nbsp;MoinMoin</tt>. Nothing should be displayed in response to this command. Example: <span class="anchor" id="line-130"></span><span class="anchor" id="line-131"></span><p class="line867" /><span class="anchor" id="line-132"></span><pre>&gt; python
81
 
<span class="anchor" id="line-133"></span>Python 2.3.4 (#1, May 29 2004, 17:05:23)
82
 
<span class="anchor" id="line-134"></span>[GCC 3.3.3] on linux2
83
 
<span class="anchor" id="line-135"></span>Type "help", "copyright", "credits" or "license" for more information.
84
 
<span class="anchor" id="line-136"></span>&gt;&gt;&gt; import MoinMoin
85
 
<span class="anchor" id="line-137"></span>&gt;&gt;&gt;
86
 
<span class="anchor" id="line-138"></span></pre><span class="anchor" id="line-139"></span><span class="anchor" id="line-140"></span><p class="line874" />If you get this instead: <span class="anchor" id="line-141"></span><span class="anchor" id="line-142"></span><p class="line867" /><span class="anchor" id="line-143"></span><pre>&gt;&gt;&gt; import MoinMoin
87
 
<span class="anchor" id="line-144"></span>Traceback (most recent call last):
88
 
<span class="anchor" id="line-145"></span>  File "&lt;stdin&gt;", line 1, in ?
89
 
<span class="anchor" id="line-146"></span>ImportError: No module named MoinMoin
90
 
<span class="anchor" id="line-147"></span>&gt;&gt;&gt;
91
 
<span class="anchor" id="line-148"></span></pre><span class="anchor" id="line-149"></span><span class="anchor" id="line-150"></span><p class="line862" />then you have to tune your installation. Try modifying <tt class="backtick">sys.path</tt>, as described above. <span class="anchor" id="line-151"></span><span class="anchor" id="line-152"></span><p class="line867" />
92
 
<h1 id="head-87a60f1d02c36fb1804b442815dba49cbc8adfe7">What has been installed</h1>
93
 
<span class="anchor" id="line-153"></span><span class="anchor" id="line-154"></span><p class="line862" />So, you have a ready-to-work Moin<tt class="backtick"></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 class="anchor" id="line-155"></span><span class="anchor" id="line-156"></span><p class="line867" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> It is important that you understand the different locations used in a Moin<tt class="backtick"></tt>Moin setup, so read this carefully. <span class="anchor" id="line-157"></span><span class="anchor" id="line-158"></span><p class="line862" />In the following descriptions, <tt class="backtick">PREFIX</tt> is what you used with the <tt class="backtick">setup.py</tt> command, or a default location if you didn't use the <tt class="backtick">--prefix</tt> option. (Typical default values on Linux are <tt class="backtick">/usr</tt> and <tt class="backtick">/usr/local</tt>.) <tt class="backtick">X.Y</tt> is the version of Python. Typically, this is <tt class="backtick">2.3</tt> or <tt class="backtick">2.4</tt>. <span class="anchor" id="line-159"></span><span class="anchor" id="line-160"></span><p class="line862" />Look into <tt class="backtick">install.log</tt> to find out about following important locations: <span class="anchor" id="line-161"></span><span class="anchor" id="line-162"></span><ul><li><p class="line891" /><strong><tt class="backtick">MoinMoin</tt> directory</strong>, usually <tt class="backtick">PREFIX/lib/pythonX.Y/site-packages/MoinMoin</tt> -- this is where the Moin<tt class="backtick"></tt>Moin <strong>source code</strong> is located <span class="anchor" id="line-163"></span></li><li><p class="line891" /><strong><tt class="backtick">share</tt> directory</strong>, usually <tt class="backtick">PREFIX/share/moin</tt> - this is where the <em>templates</em> are located <span class="anchor" id="line-164"></span><ul><li><p class="line891" /><strong><tt class="backtick">data</tt></strong> directory (wiki pages, users, etc.) - only Moin<tt class="backtick"></tt>Moin should access this <span class="anchor" id="line-165"></span></li><li><p class="line891" /><strong><tt class="backtick">underlay</tt></strong> directory (wiki pages) - only Moin<tt class="backtick"></tt>Moin should access this <span class="anchor" id="line-166"></span></li><li><p class="line891" /><strong><tt class="backtick">htdocs</tt></strong> directory with html support files (images for the various themes, etc.) - the web server will need to access this <span class="anchor" id="line-167"></span></li><li><p class="line891" /><strong><tt class="backtick">server</tt></strong> - Moin<tt class="backtick"></tt>Moin example startup files (like <tt class="backtick">moin.cgi</tt> for CGI, and other files for other startup methods) <span class="anchor" id="line-168"></span></li><li><p class="line891" /><strong><tt class="backtick">config</tt></strong> - Moin<tt class="backtick"></tt>Moin example configuration files (like <tt class="backtick">wikiconfig.py</tt>) <span class="anchor" id="line-169"></span></li></ul></li><li><p class="line891" /><strong><tt class="backtick">bin</tt></strong> directory with some scripts that help you use the Moin<tt class="backtick"></tt>Moin shell commands <span class="anchor" id="line-170"></span><span class="anchor" id="line-171"></span></li></ul><p class="line862" />We talk of <em>templates</em> in the <tt class="backtick">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 class="backtick"></tt>Moin versions. <span class="anchor" id="line-172"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/BasicInstallation"></span></div> <span class="anchor" id="line-48"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-49"></span><span class="anchor" id="wikiinstance-creation"></span> <span class="anchor" id="line-50"></span><div dir="ltr" id="Include_HelpOnInstalling/WikiInstanceCreation" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/WikiInstanceCreation"></span>
94
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line862" />After you have downloaded and installed Moin<tt class="backtick"></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 class="backtick"></tt>Moin: only the original files will be overwritten, not your copies. <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line862" />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 class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line874" />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 class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><p class="line862" />You can use <a class="attachment" href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation?action=AttachFile&amp;do=get&amp;target=createinstance.sh" title="attachment:createinstance.sh">createinstance.sh</a> (a bash script that install the instance). <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line867" />
95
 
<h1 id="head-8c227c275465dec3f8e3b326d53f9566727c5648">Read this first</h1>
96
 
<span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><p class="line867" />
97
 
<h2 id="head-6e91ed0b234e903763a945b5249e7de8b726e5d7">Security warnings</h2>
98
 
<span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862" /> <img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: make sure that your <tt class="backtick">data</tt> directory and your configuration files are not accessible through your web server. Do not put your wiki directory in <tt class="backtick">public_html</tt>, <tt class="backtick">Sites</tt> or any other directory your web server can access. The web server only needs to access the file in the <tt class="backtick">htdocs</tt> directory and the <tt class="backtick">moin.cgi</tt> script! (Or whatever script your server uses to start Moin<tt class="backtick"></tt>Moin.)</strong> </td>
99
 
</tr>
100
 
</tbody></table></div><span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862" /> <img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: make sure that the <tt class="backtick">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> </td>
101
 
</tr>
102
 
</tbody></table></div><span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line867" />
103
 
<h2 id="head-942d29849126a576afcc19bdbfd59c661739eb55">Note to Windows users</h2>
104
 
<span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line874" />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 class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line867" />
105
 
<h1 id="head-66ec28f32e6870e96f6062a4a6ac77bbb4606109">Choose a wiki name</h1>
106
 
<span class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><p class="line874" />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 class="anchor" id="line-32"></span><span class="anchor" id="line-33"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="&lt;!&gt;" height="15" src="wiki/htdocs/modern/img/attention.png" title="&lt;!&gt;" 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 class="anchor" id="line-34"></span><span class="anchor" id="line-35"></span></li></ul><p class="line862" />The name "<tt class="backtick">mywiki</tt>" is used as an example in the various commands below. <span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><p class="line867" />
107
 
<h1 id="head-379ea73c819b2c729ba9c2432b8a4c4b4c524f71">Choose a location</h1>
108
 
<span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line874" />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 class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line862" />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 class="backtick">/usr/local/var/moin</tt>, <tt class="backtick">/mnt/wikis</tt>, etc. <span class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line862" />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 class="backtick">share/moin</tt> subdirectory. <span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line867" />
109
 
<h1 id="head-951584cdd82db21218fc2ffd3945de602f8275c0">Collect some important information</h1>
110
 
<span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><p class="line874" />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 class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><p class="line862" />On Linux, the <tt class="backtick">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 class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><ul><li><p class="line891" /><tt class="backtick">PREFIX</tt> is the prefix you used during the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span class="anchor" id="line-52"></span></li><li><p class="line891" /><tt class="backtick">SHARE</tt> is the name of the <tt class="backtick">share</tt> directory, as discussed at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span class="anchor" id="line-53"></span></li><li><p class="line891" /><tt class="backtick">WIKILOCATION</tt> is the name of the directory that will contain your wiki instance <span class="anchor" id="line-54"></span></li><li><p class="line891" /><tt class="backtick">INSTANCE</tt> is the directory containing the wiki instance. It cannot be an existing directory readable through Apache, otherwise it will fail. <span class="anchor" id="line-55"></span><span class="anchor" id="line-56"></span></li></ul><p class="line874" />If you are an administrator, you also need to collect the following: <span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span><ul><li><p class="line891" /><tt class="backtick">USER</tt> is the user name of the web server <span class="anchor" id="line-59"></span></li><li><p class="line891" /><tt class="backtick">GROUP</tt> is the name of the group to which the web server belongs <span class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span></li></ul><p class="line874" />Now, Linux folks, let's store these settings in memory: <span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><pre>&gt; export PREFIX=/usr                # this might be something else
111
 
<span class="anchor" id="line-64"></span>&gt; export SHARE=$PREFIX/share/moin   # this should be correct for most people
112
 
<span class="anchor" id="line-65"></span>&gt; export WIKILOCATION=$SHARE        # this is just an example
113
 
<span class="anchor" id="line-66"></span>&gt; export INSTANCE=mywiki            # this is just an example
114
 
<span class="anchor" id="line-67"></span></pre><span class="anchor" id="line-68"></span><span class="anchor" id="line-69"></span><p class="line874" />Administrators also need the following two lines: <span class="anchor" id="line-70"></span><span class="anchor" id="line-71"></span><p class="line867" /><span class="anchor" id="line-72"></span><pre>&gt; export USER=www-data              # this is just an example
115
 
<span class="anchor" id="line-73"></span>&gt; export GROUP=www-data             # this is just an example
116
 
<span class="anchor" id="line-74"></span></pre><span class="anchor" id="line-75"></span><span class="anchor" id="line-76"></span><p class="line867" />
117
 
<h1 id="head-c3fc33e072973371ea739841440fb52175ddb9f6">Copy the files</h1>
118
 
<span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><p class="line862" />To create your new instance, you first need to create a directory named like your instance, inside the <tt class="backtick">WIKILOCATION</tt>. Then you need to copy the <tt class="backtick">data</tt> and <tt class="backtick">underlay</tt> directories from your <tt class="backtick">SHARE</tt> directory into your instance directory. Finally, you need to copy the <tt class="backtick">wikiconfig.py</tt> file from the <tt class="backtick">config</tt> directory into the instance directory. <span class="anchor" id="line-79"></span><span class="anchor" id="line-80"></span><p class="line874" />Linux folks need just type these commands: <span class="anchor" id="line-81"></span><span class="anchor" id="line-82"></span><pre>&gt; cd $WIKILOCATION
119
 
<span class="anchor" id="line-83"></span>&gt; mkdir $INSTANCE                   # make a directory for this instance
120
 
<span class="anchor" id="line-84"></span>&gt; cp -R $SHARE/data $INSTANCE       # copy template data directory
121
 
<span class="anchor" id="line-85"></span>&gt; cp -R $SHARE/underlay $INSTANCE   # copy underlay data directory
122
 
<span class="anchor" id="line-86"></span>&gt; cp $SHARE/config/wikiconfig.py $INSTANCE   # copy wiki configuration sample file
123
 
<span class="anchor" id="line-87"></span></pre><span class="anchor" id="line-88"></span><span class="anchor" id="line-89"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" 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 class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span></li></ul><p class="line867" />
124
 
<h1 id="head-027e3666aea4dc02569ad386901ae9456bad5ae1">Set permissions</h1>
125
 
<span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><p class="line867" />
126
 
<h2 id="head-3b8b040007c209e4621b176c8724b3bbcb755957">Administrators</h2>
127
 
<span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><p class="line874" />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 class="anchor" id="line-96"></span><span class="anchor" id="line-97"></span><p class="line874" />On Linux, the following commands should be enough: <span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span><pre>&gt; chown -R $USER.$GROUP $INSTANCE   # check that USER and GROUP are correct
128
 
<span class="anchor" id="line-100"></span>&gt; chmod -R ug+rwX $INSTANCE         # USER.GROUP may read and write
129
 
<span class="anchor" id="line-101"></span>&gt; chmod -R o-rwx $INSTANCE          # everybody else is rejected
130
 
<span class="anchor" id="line-102"></span></pre><span class="anchor" id="line-103"></span><span class="anchor" id="line-104"></span><p class="line867" />
131
 
<h2 id="head-19c5987edf26a8517fbf6cbee5ba5dd5f36ec280">Normal users</h2>
132
 
<span class="anchor" id="line-105"></span><span class="anchor" id="line-106"></span><p class="line862" />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 class="anchor" id="line-107"></span><span class="anchor" id="line-108"></span><p class="line862" />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 class="anchor" id="line-109"></span><span class="anchor" id="line-110"></span><p class="line874" />On Linux, the following commands will open the instance directory to the whole world: <span class="anchor" id="line-111"></span><span class="anchor" id="line-112"></span><pre>&gt; chmod -R a+rwX $INSTANCE
133
 
<span class="anchor" id="line-113"></span></pre><span class="anchor" id="line-114"></span><span class="anchor" id="line-115"></span><p class="line867" /><strong>Note:</strong> <span class="anchor" id="line-116"></span><ul><li><p class="line862" />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 class="anchor" id="line-117"></span></li><li><p class="line862" />the best other possibility is that the server administrator sets up <tt class="backtick">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 class="anchor" id="line-118"></span><span class="anchor" id="line-119"></span><span class="anchor" id="line-120"></span></li></ul><p class="line867" />
134
 
<h1 id="head-442871161f523855f2162b426248f0bb0523c289">Tune configuration</h1>
135
 
<span class="anchor" id="line-121"></span><span class="anchor" id="line-122"></span><p class="line874" />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 class="anchor" id="line-123"></span><span class="anchor" id="line-124"></span><p class="line862" />Edit <tt class="backtick">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 alt=":)" height="15" src="wiki/htdocs/modern/img/smile.png" title=":)" width="15" /> Read the comments inside <tt class="backtick">wikiconfig.py</tt>, they will guide you through this process.  (Start with "Wiki identity", around line 25.) <span class="anchor" id="line-125"></span><span class="anchor" id="line-126"></span><div><table style="color: red"><tbody><tr>  <td><p class="line862" /> <img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> <strong>Warning: don't forget to restart your web server in order to apply changes in <tt class="backtick">wikiconfig.py</tt></strong> </td>
136
 
</tr>
137
 
</tbody></table></div><span class="anchor" id="line-127"></span><span class="anchor" id="line-128"></span><p class="line867" /><a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a> contains all the details about all the options, in case the comments in <tt class="backtick">wikiconfig.py</tt> are not enough. <span class="anchor" id="line-129"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/WikiInstanceCreation"></span></div> <span class="anchor" id="line-51"></span><hr class="hr1" /><p class="line874" /> <span class="anchor" id="line-52"></span><span class="anchor" id="linuxapache-install"></span> <span class="anchor" id="line-53"></span>
138
 
<h1>Linux Installation using Apache</h1>
139
 
<div dir="ltr" id="Include_HelpOnInstalling/ApacheOnLinux" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/ApacheOnLinux"></span>
140
 
<span class="anchor" id="line-9"></span><p class="line862" />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 class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line874" />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 class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line867" /><strong>Table of contents</strong> <div class="table-of-contents"><p class="table-of-contents-heading" />Contents<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></div> <span class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><p class="line867" />
141
 
<h2 id="head-5a61f5b0107edba120089e4251cd633be60b6e15">Administrator (root)</h2>
142
 
<span class="anchor" id="line-16"></span><p class="line874" />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 class="anchor" id="line-17"></span><span class="anchor" id="line-18"></span><ul><li><p class="line891" /><tt class="backtick">/etc/httpd/httpd.conf</tt> - the main Apache configuration file <span class="anchor" id="line-19"></span></li><li><p class="line891" /><tt class="backtick">/var/log/httpd/error_log</tt> - the log file containing Apache error messages <span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span></li></ul><p class="line862" />Some distributions use <tt class="backtick">apache</tt> instead of <tt class="backtick">httpd</tt> for the directory names, others may use weirder settings. <span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><p class="line867" />
143
 
<h3 id="head-c27688fbe7f65d67190a47ce8d32eba244ab0d01">Create a wiki instance</h3>
144
 
<span class="anchor" id="line-24"></span><p class="line874" />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 class="anchor" id="line-25"></span><span class="anchor" id="line-26"></span><p class="line867" /><span class="anchor" id="line-27"></span><pre>&gt; egrep "^User|^Group" /etc/httpd/httpd.conf
145
 
<span class="anchor" id="line-28"></span>User wwwrun
146
 
<span class="anchor" id="line-29"></span>Group nogroup
147
 
<span class="anchor" id="line-30"></span></pre><span class="anchor" id="line-31"></span><span class="anchor" id="line-32"></span><p class="line862" />This shows a typical result: "<tt class="backtick">wwwrun.nogroup</tt>". Other common results are "<tt class="backtick">nobody.nogroup</tt>", "<tt class="backtick">apache.apache</tt>" and "<tt class="backtick">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 class="anchor" id="line-33"></span><span class="anchor" id="line-34"></span><p class="line862" />Once you have gathered this information, read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> and follow the steps described there. <span class="anchor" id="line-35"></span><span class="anchor" id="line-36"></span><p class="line867" />
148
 
<h3 id="head-e3e9e08058bb0ae34c33f53367cd58d6c7411998">Install moin.cgi</h3>
149
 
<span class="anchor" id="line-37"></span><p class="line862" />There is one last file you need to copy, the bridge between Apache and Moin<tt class="backtick"></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 class="backtick"></tt>Moin components to handle the request. You can actually put this script anywhere you like (all the paths to the files Moin<tt class="backtick"></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 class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line862" />We will create a <tt class="backtick">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 class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line867" /><span class="anchor" id="line-42"></span><pre>&gt; cd $WIKILOCATION/$INSTANCE
150
 
<span class="anchor" id="line-43"></span>&gt; mkdir cgi-bin
151
 
<span class="anchor" id="line-44"></span>&gt; cp $SHARE/server/moin.cgi cgi-bin
152
 
<span class="anchor" id="line-45"></span>&gt; chown -R $USER.$GROUP cgi-bin
153
 
<span class="anchor" id="line-46"></span>&gt; chmod -R ug+rx cgi-bin
154
 
<span class="anchor" id="line-47"></span>&gt; chmod -R o-rwx cgi-bin
155
 
<span class="anchor" id="line-48"></span></pre><span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><p class="line867" />
156
 
<h3 id="head-408a7a283b2406c4e6b24646b25ec7996d5ff459">Configure moin.cgi</h3>
157
 
<span class="anchor" id="line-51"></span><p class="line862" />When <tt class="backtick">moin.cgi</tt> is launched, it imports a Moin<tt class="backtick"></tt>Moin module that in turn imports other modules and the configuration file. While the Moin<tt class="backtick"></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 class="backtick">moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span class="anchor" id="line-52"></span><span class="anchor" id="line-53"></span><p class="line867" /><span class="anchor" id="line-54"></span><pre>import sys
158
 
<span class="anchor" id="line-55"></span>sys.path.insert(0, '..')
159
 
<span class="anchor" id="line-56"></span></pre><span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span><p class="line862" />You can also use the absolute name of the directory that contains the <tt class="backtick">wikiconfig.py</tt> file instead of <tt class="backtick">'..'</tt>. <span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><p class="line867" />
160
 
<h3 id="head-b02e2f66403a66cc3b1ff0ce2c7261cf44e4f0d4">Configure Apache</h3>
161
 
<span class="anchor" id="line-61"></span><p class="line874" />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 class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><p class="line874" />Your Apache should be set up so that: <span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><ul><li>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 class="anchor" id="line-66"></span></li><li><p class="line862" />An alias is set up to redirect requests from <tt class="backtick">/wiki/</tt> (in the URL) to the <tt class="backtick">htdocs</tt> directory (in the <tt class="backtick">share</tt> directory, as discussed at the bottom of <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>) <span class="anchor" id="line-67"></span></li><li><p class="line862" />A script alias is set up to redirect requests from whatever you want (we suggest you use your instance name, for example <tt class="backtick">/mywiki</tt>) to the CGI script you just copied. <span class="anchor" id="line-68"></span><span class="anchor" id="line-69"></span></li></ul><p class="line874" />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 class="anchor" id="line-70"></span><span class="anchor" id="line-71"></span><p class="line867" /><span class="anchor" id="line-72"></span><pre>&gt; echo "" &gt;&gt;/etc/httpd/httpd.conf
162
 
<span class="anchor" id="line-73"></span>&gt; echo "Alias /wiki/ \"$SHARE/htdocs/\"" &gt;&gt;/etc/httpd/httpd.conf
163
 
<span class="anchor" id="line-74"></span>&gt; echo "ScriptAlias /mywiki \"$WIKILOCATION/$INSTANCE/cgi-bin/moin.cgi\"" &gt;&gt;/etc/httpd/httpd.conf
164
 
<span class="anchor" id="line-75"></span></pre><span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span><p class="line862" />You only need to define the alias for <tt class="backtick">htdocs</tt> once. You need to define a different script alias for each wiki instance you intend to run. <span class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span><p class="line867" />
165
 
<h3 id="head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86">Configure MoinMoin</h3>
166
 
<span class="anchor" id="line-80"></span><p class="line862" />Finally, check that the <tt class="backtick">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 class="anchor" id="line-81"></span><span class="anchor" id="line-82"></span><p class="line874" />Here are the settings you should have in the config file if you followed all our suggestions: <span class="anchor" id="line-83"></span><span class="anchor" id="line-84"></span><p class="line867" /><span class="anchor" id="line-85"></span><pre>    data_dir = '../data/'
167
 
<span class="anchor" id="line-86"></span>    data_underlay_dir = '../underlay/'
168
 
<span class="anchor" id="line-87"></span>    url_prefix = '/wiki'
169
 
<span class="anchor" id="line-88"></span></pre><span class="anchor" id="line-89"></span><span class="anchor" id="line-90"></span><p class="line862" />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 class="anchor" id="line-91"></span><span class="anchor" id="line-92"></span><p class="line867" />
170
 
<h3 id="head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3">Test the wiki</h3>
171
 
<span class="anchor" id="line-93"></span><p class="line862" />Everything should work fine now. It is time to <strong>restart the Apache server</strong> (usually with "<tt class="backtick">/etc/init.d/apache&nbsp;restart</tt>", sometimes with "<tt class="backtick">apachectl&nbsp;restart</tt>") and perform the following steps: <span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><ul><li><p class="line862" />Run the <em>Moin<tt class="backtick"></tt>Moin CGI Diagnosis</em>: connect to "<tt class="backtick">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 class="anchor" id="line-96"></span></li><li><p class="line862" />Access your new wiki with the URL "<tt class="backtick">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 class="backtick"></tt>Page. <span class="anchor" id="line-97"></span></li><li>If this is the case, try to edit it and save your changes. <span class="anchor" id="line-98"></span></li><li><p class="line862" />If that works, see if your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="line-99"></span></li><li><p class="line862" />If you see them, congratulations, your new wiki works! <img alt=":)" height="15" src="wiki/htdocs/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="line-100"></span><span class="anchor" id="line-101"></span></li></ul><p class="line874" />If something goes wrong, have a look at Troubleshooting, at the bottom of this page. <span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><p class="line867" />
172
 
<h3 id="head-52920da3312438e6a484347d4dfaa369b86cb521">Apache tricks</h3>
173
 
<span class="anchor" id="line-104"></span><p class="line862" />For more advanced configuration and some tricks see <a href="http://moinmaster.wikiwikiweb.de/HelpMiscellaneous">HelpMiscellaneous</a>. <span class="anchor" id="line-105"></span><span class="anchor" id="line-106"></span><p class="line867" />
174
 
<h2 id="head-e559f024646d8751eee1135ad5423247d72ab7fd">Simple user (home directory installation)</h2>
175
 
<span class="anchor" id="line-107"></span><p class="line862" />On machines shared by many people, simple users typically have no access to the root account, cannot modify the <tt class="backtick">httpd.conf</tt> file, and cannot copy files into the system-wide <tt class="backtick">cgi-bin</tt> and <tt class="backtick">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 class="backtick">UserDir</tt> directive. If the machine administrator decides to use it, all URLs that start with "<tt class="backtick">/~username</tt>" will be redirected to a directory in the users' home directories, where they have write permission and can install Moin<tt class="backtick"></tt>Moin. <span class="anchor" id="line-108"></span><span class="anchor" id="line-109"></span><p class="line862" />As an example, we will consider the case of a user named "<tt class="backtick">mm</tt>". Of course, wherever you see "<tt class="backtick">mm</tt>" below, you will replace it with your own username. <span class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><p class="line867" />
176
 
<h3 id="head-6a39e2829f37fd34c569c2ffa768c9b3ec2289cc">Make sure /~username works</h3>
177
 
<span class="anchor" id="line-112"></span><p class="line862" />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 class="backtick">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 class="anchor" id="line-113"></span><span class="anchor" id="line-114"></span><p class="line867" /><span class="anchor" id="line-115"></span><pre>&gt; ls -ld ~/public_html
178
 
<span class="anchor" id="line-116"></span>drwxr-xr-x   2 mm       users        4096 Nov 30 00:29 public_html
179
 
<span class="anchor" id="line-117"></span></pre><span class="anchor" id="line-118"></span><span class="anchor" id="line-119"></span><p class="line874" />If the directory does not exist, create it, and be sure it can be read and entered by the web server. <span class="anchor" id="line-120"></span><span class="anchor" id="line-121"></span><p class="line867" /><span class="anchor" id="line-122"></span><pre>&gt; mkdir public_html
180
 
<span class="anchor" id="line-123"></span>&gt; chmod a+rx public_html
181
 
<span class="anchor" id="line-124"></span>&gt; ls -ld ~/public_html
182
 
<span class="anchor" id="line-125"></span>drwxr-xr-x   2 mm       users        4096 Nov 30 00:35 public_html
183
 
<span class="anchor" id="line-126"></span></pre><span class="anchor" id="line-127"></span><span class="anchor" id="line-128"></span><p class="line862" />Now, check if the "<tt class="backtick">/~mm</tt>" URL works: <span class="anchor" id="line-129"></span><span class="anchor" id="line-130"></span><p class="line867" /><span class="anchor" id="line-131"></span><pre>&gt; lynx -error_file=/dev/stderr -dump http://localhost/~mm/ &gt;/dev/null
184
 
<span class="anchor" id="line-132"></span>URL=http://localhost/~mm/ (GET)
185
 
<span class="anchor" id="line-133"></span>STATUS=HTTP/1.1 200 OK
186
 
<span class="anchor" id="line-134"></span></pre><span class="anchor" id="line-135"></span><span class="anchor" id="line-136"></span><p class="line862" />If you get a "<tt class="backtick">200&nbsp;OK</tt>" response code, then it works, and you can go on to the next check. If you get a "<tt class="backtick">403&nbsp;Forbidden</tt>" or a "<tt class="backtick">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 class="anchor" id="line-137"></span><span class="anchor" id="line-138"></span><ul><li><p class="line862" />Check the permissions for your home directory (<tt class="backtick">~</tt>) and your <tt class="backtick">public_html</tt> directory. The first one should at least end with "<tt class="backtick">--x</tt>", and the second one, as we saw above, with "<tt class="backtick">r-x</tt>". <span class="anchor" id="line-139"></span></li><li><p class="line862" />It also possible that the administrator has set up another name for the personal web site directory. "<tt class="backtick">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 class="anchor" id="line-140"></span></li><li>Finally, if the personal web site feature is disabled, maybe you can ask the administrator to enable it? <span class="anchor" id="line-141"></span><span class="anchor" id="line-142"></span></li></ul><p class="line874" />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 class="anchor" id="line-143"></span><span class="anchor" id="line-144"></span><p class="line867" /><span class="anchor" id="line-145"></span><pre>&gt; mkdir -p ~/public_html/cgi-bin
187
 
<span class="anchor" id="line-146"></span>&gt; cat &gt; ~/public_html/cgi-bin/test.cgi
188
 
<span class="anchor" id="line-147"></span>#!/bin/sh
189
 
<span class="anchor" id="line-148"></span>echo Content-Type: text/plain
190
 
<span class="anchor" id="line-149"></span>echo
191
 
<span class="anchor" id="line-150"></span>echo "CGI scripts work"
192
 
<span class="anchor" id="line-151"></span>&lt;CTRL-D&gt;
193
 
<span class="anchor" id="line-152"></span>&gt; chmod a+rx ~/public_html/cgi-bin/test.cgi
194
 
<span class="anchor" id="line-153"></span>&gt; lynx -dump http://localhost/~jh/cgi-bin/test.cgi
195
 
<span class="anchor" id="line-154"></span>CGI scripts work
196
 
<span class="anchor" id="line-155"></span></pre><span class="anchor" id="line-156"></span><span class="anchor" id="line-157"></span><p class="line862" />If you get anything else than "<tt class="backtick">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 class="anchor" id="line-158"></span><span class="anchor" id="line-159"></span><p class="line862" />Once you get it, you can set up your wiki instance in the <tt class="backtick">public_html</tt> directory. <img alt=":)" height="15" src="wiki/htdocs/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="line-160"></span><span class="anchor" id="line-161"></span><p class="line867" />
197
 
<h3 id="head-c27688fbe7f65d67190a47ce8d32eba244ab0d01-2">Create a wiki instance</h3>
198
 
<span class="anchor" id="line-162"></span><p class="line862" />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 class="anchor" id="line-163"></span><span class="anchor" id="line-164"></span><p class="line867" />
199
 
<h3 id="head-ec9ce458a3f08281e5906f6d1e2e5cc008d620db">Install the htdocs files</h3>
200
 
<span class="anchor" id="line-165"></span><p class="line862" />The web server needs to access these files, so we need to copy them in the "<tt class="backtick">public_html</tt>" directory. Just use this: <span class="anchor" id="line-166"></span><span class="anchor" id="line-167"></span><p class="line867" /><span class="anchor" id="line-168"></span><pre>&gt; cd ~/public_html
201
 
<span class="anchor" id="line-169"></span>&gt; cp -R ~/share/moin/htdocs wiki
202
 
<span class="anchor" id="line-170"></span>&gt; chmod -R a+rX wiki
203
 
<span class="anchor" id="line-171"></span></pre><span class="anchor" id="line-172"></span><span class="anchor" id="line-173"></span><p class="line867" />
204
 
<h3 id="head-e3e9e08058bb0ae34c33f53367cd58d6c7411998-2">Install moin.cgi</h3>
205
 
<span class="anchor" id="line-174"></span><p class="line862" />There is one last file you need to copy, the bridge between Apache and Moin<tt class="backtick"></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 class="backtick"></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 class="anchor" id="line-175"></span><span class="anchor" id="line-176"></span><p class="line867" /><span class="anchor" id="line-177"></span><pre>&gt; cd ~/public_html
206
 
<span class="anchor" id="line-178"></span>&gt; mkdir cgi-bin
207
 
<span class="anchor" id="line-179"></span>&gt; cp $SHARE/server/moin.cgi cgi-bin
208
 
<span class="anchor" id="line-180"></span>&gt; chmod -R a+rx cgi-bin
209
 
<span class="anchor" id="line-181"></span></pre><span class="anchor" id="line-182"></span><span class="anchor" id="line-183"></span><p class="line867" />
210
 
<h3 id="head-408a7a283b2406c4e6b24646b25ec7996d5ff459-2">Configure moin.cgi</h3>
211
 
<span class="anchor" id="line-184"></span><p class="line862" />When <tt class="backtick">moin.cgi</tt> is launched, it imports a Moin<tt class="backtick"></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 class="backtick">moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span class="anchor" id="line-185"></span><span class="anchor" id="line-186"></span><p class="line867" /><span class="anchor" id="line-187"></span><pre>import sys
212
 
<span class="anchor" id="line-188"></span>sys.path.insert(0, '/home/mm/lib/python2.3')
213
 
<span class="anchor" id="line-189"></span>sys.path.insert(0, '/home/mm/lib/python2.3/site-packages')
214
 
<span class="anchor" id="line-190"></span>sys.path.insert(0, '/home/mm/share/moin/mywiki')
215
 
<span class="anchor" id="line-191"></span></pre><span class="anchor" id="line-192"></span><span class="anchor" id="line-193"></span><p class="line862" />Of course, you need to adapt the paths to your situation. The first two lines should help locate the Moin<tt class="backtick"></tt>Moin modules, the last one should help locate the <tt class="backtick">wikiconfig.py</tt> file. <span class="anchor" id="line-194"></span><span class="anchor" id="line-195"></span><p class="line867" /><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 class="backtick">#!&nbsp;/usr/bin/python2.3</tt>" might help you if the default does not work. <span class="anchor" id="line-196"></span><span class="anchor" id="line-197"></span><p class="line867" /><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 class="anchor" id="line-198"></span><span class="anchor" id="line-199"></span><p class="line867" /><span class="anchor" id="line-200"></span><pre>def handle_request(req, env, form):
216
 
<span class="anchor" id="line-201"></span>    request = RequestCGI(req, env, form, properties = {'script_name': '/mywiki'})
217
 
<span class="anchor" id="line-202"></span>    request.run()
218
 
<span class="anchor" id="line-203"></span></pre><span class="anchor" id="line-204"></span><span class="anchor" id="line-205"></span><p class="line867" />
219
 
<h3 id="head-ffa39b171f9d130bb07a8481a5fff1a5a9065e86-2">Configure MoinMoin</h3>
220
 
<span class="anchor" id="line-206"></span><p class="line862" />Finally, check that the <tt class="backtick">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 class="anchor" id="line-207"></span><span class="anchor" id="line-208"></span><p class="line867" /><span class="anchor" id="line-209"></span><pre>    data_dir = '/home/mm/share/moin/mywiki/data/'
221
 
<span class="anchor" id="line-210"></span>    data_underlay_dir = '/home/mm/share/moin/mywiki/underlay/'
222
 
<span class="anchor" id="line-211"></span>    url_prefix = '/~mm/wiki'
223
 
<span class="anchor" id="line-212"></span></pre><span class="anchor" id="line-213"></span><span class="anchor" id="line-214"></span><p class="line867" />
224
 
<h3 id="head-0f7a0fb8dccf6a13b6042fa17e0d7cda751fe3f3-2">Test the wiki</h3>
225
 
<span class="anchor" id="line-215"></span><p class="line874" />Everything should work fine, now. It is time to perform the following steps: <span class="anchor" id="line-216"></span><span class="anchor" id="line-217"></span><ul><li><p class="line862" />Run the <em>Moin<tt class="backtick"></tt>Moin CGI Diagnosis</em>: <tt>&gt;&nbsp;lynx&nbsp;-dump&nbsp;http://localhost/~mm/cgi-bin/moin.cgi?action=test</tt> <span class="anchor" id="line-218"></span></li><li><p class="line862" />If it worked, try to access your new-born wiki with the URL "<tt class="backtick">http://127.0.0.1/~mm/cgi-bin/moin.cgi</tt>". You should see the Front<tt class="backtick"></tt>Page. <span class="anchor" id="line-219"></span></li><li>If this is the case, try to edit it and save your changes. <span class="anchor" id="line-220"></span></li><li><p class="line862" />If that works, see if your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="line-221"></span></li><li><p class="line862" />If you see them, congratulations, you have a new wiki! <img alt=":)" height="15" src="wiki/htdocs/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="line-222"></span><span class="anchor" id="line-223"></span></li></ul><p class="line874" />If something goes wrong, have a look at Troubleshooting, below. <span class="anchor" id="line-224"></span><span class="anchor" id="line-225"></span><p class="line867" />
226
 
<h2 id="head-3f286acb05ce4ad64240f788c78a8f915f59e34e">Troubleshooting</h2>
227
 
<span class="anchor" id="line-226"></span><p class="line862" />See also <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/TroubleShooting">../TroubleShooting</a> for generic stuff. <span class="anchor" id="line-227"></span><span class="anchor" id="line-228"></span><p class="line862" />The first thing to do when your wiki does not work as expected is to issue the command "<tt class="backtick">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 class="anchor" id="line-229"></span><span class="anchor" id="line-230"></span><p class="line867" />
228
 
<h3 id="head-b8c0d1c1aba9cd39d0d15f86ea33025f7f25d48d">Adding permission to serve the htdocs directory</h3>
229
 
<span class="anchor" id="line-231"></span><p class="line862" />In some (sane) Linux distributions (like SuSE 9.0) serving directories other than the document-root "<tt class="backtick">/srv/www/htdocs</tt>" with Apache is switched off by default for security reasons in "<tt class="backtick">/etc/httpd/httpd.conf</tt>" (or for Apache2 "<tt class="backtick">/etc/apache2/httpd.conf</tt>"): <span class="anchor" id="line-232"></span><span class="anchor" id="line-233"></span><p class="line867" /><span class="anchor" id="line-234"></span><pre># forbid access to the entire filesystem by default
230
 
<span class="anchor" id="line-235"></span>&lt;Directory /&gt;
231
 
<span class="anchor" id="line-236"></span>  Options None
232
 
<span class="anchor" id="line-237"></span>  AllowOverride None
233
 
<span class="anchor" id="line-238"></span>  Order deny,allow
234
 
<span class="anchor" id="line-239"></span>  Deny from all
235
 
<span class="anchor" id="line-240"></span>&lt;/Directory&gt;
236
 
<span class="anchor" id="line-241"></span></pre><span class="anchor" id="line-242"></span><span class="anchor" id="line-243"></span><p class="line862" />To allow Apache to serve directories outside of the document root you have to add these lines to "<tt class="backtick">/etc/httpd/httpd.conf</tt>" (in SuSE it is recommended to create a new "<tt class="backtick">http.conf.local</tt>" and include this file in "<tt class="backtick">/etc/sysconfig/apache2</tt>"): <span class="anchor" id="line-244"></span><span class="anchor" id="line-245"></span><p class="line867" /><span class="anchor" id="line-246"></span><pre>Alias /wiki/ "/usr/share/moin/htdocs/"
237
 
<span class="anchor" id="line-247"></span>&lt;Directory "/usr/share/moin/htdocs/"&gt;
238
 
<span class="anchor" id="line-248"></span>   Order deny,allow
239
 
<span class="anchor" id="line-249"></span>   Allow from all
240
 
<span class="anchor" id="line-250"></span>&lt;/Directory&gt;
241
 
<span class="anchor" id="line-251"></span>
242
 
<span class="anchor" id="line-252"></span>ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
243
 
<span class="anchor" id="line-253"></span>&lt;Directory "/usr/share/moin/mywiki/cgi-bin"&gt;
244
 
<span class="anchor" id="line-254"></span>   Order deny,allow
245
 
<span class="anchor" id="line-255"></span>   Allow from all
246
 
<span class="anchor" id="line-256"></span>&lt;/Directory&gt;
247
 
<span class="anchor" id="line-257"></span></pre><span class="anchor" id="line-258"></span><span class="anchor" id="line-259"></span><p class="line874" />Of course, you need to adapt the paths to your particular situation. <span class="anchor" id="line-260"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/ApacheOnLinux"></span></div> <span class="anchor" id="line-54"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-55"></span><span class="anchor" id="fastcgi-install"></span> <span class="anchor" id="line-56"></span> <span class="anchor" id="line-57"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-58"></span><span class="anchor" id="modpy-install"></span> <span class="anchor" id="line-59"></span>
 
186
&lt;CTRL-D&gt;
 
187
&gt; chmod a+rx ~/public_html/cgi-bin/test.cgi
 
188
&gt; lynx -dump http://localhost/~jh/cgi-bin/test.cgi
 
189
CGI scripts work</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-168"></span><p class="line862">If you get anything else than "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-169"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-170"></span><p class="line862">Once you get it, you can set up your wiki instance in the <tt class="backtick">public_html</tt> directory. <img alt=":)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-171"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-172"></span><p class="line867">
 
190
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Createawikiinstance-1">Create a wiki instance</h3>
 
191
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-173"></span><p class="line862">Creating a wiki instance involves copying files around and setting appropriate permissions. Read <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> and follow the steps described there. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-174"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-175"></span><p class="line867">
 
192
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Installthehtdocsfiles">Install the htdocs files</h3>
 
193
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-176"></span><p class="line862">The web server needs to access these files, so we need to copy them into the "<tt class="backtick">public_html</tt>" directory. Just use this: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-177"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-178"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-179"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-180"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-181"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-182"></span><pre>&gt; cd ~/public_html
 
194
&gt; cp -R ~/share/moin/htdocs moin_static160
 
195
&gt; chmod -R a+rX moin_static160</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-183"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-184"></span><p class="line867">
 
196
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Installmoin.cgi-1">Install moin.cgi</h3>
 
197
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-185"></span><p class="line862">There is one last file you need to copy, the bridge between Apache and Moin<tt class="backtick"></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 class="backtick"></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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-186"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-187"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-188"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-189"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-190"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-191"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-192"></span><pre>&gt; cd ~/public_html
 
198
&gt; mkdir cgi-bin
 
199
&gt; cp $SHARE/server/moin.cgi cgi-bin
 
200
&gt; chmod -R a+rx cgi-bin</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-193"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-194"></span><p class="line867">
 
201
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi-1">Configure moin.cgi</h3>
 
202
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-195"></span><p class="line862">When <tt class="backtick">moin.cgi</tt> is launched, it imports a Moin<tt class="backtick"></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 class="backtick">moin.cgi</tt> script to correct that. Add these lines near the top of the file: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-196"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-197"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-198"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-199"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-200"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-201"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-202"></span><pre>import sys
 
203
sys.path.insert(0, '/home/mm/lib/python2.4')
 
204
sys.path.insert(0, '/home/mm/lib/python2.4/site-packages')
 
205
sys.path.insert(0, '/home/mm/share/moin/mywiki')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-203"></span><p class="line862">Of course, you need to adapt the paths to your situation. The first two lines should help locate the Moin<tt class="backtick"></tt>Moin modules, the last one should help locate the <tt class="backtick">wikiconfig.py</tt> file. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-204"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-205"></span><p class="line867"><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 class="backtick">#!&nbsp;/usr/bin/python2.4</tt>" might help you if the default does not work. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-206"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-207"></span><p class="line867"><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 parentheses. This will let <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> generate URLs that start with <tt>/mywiki</tt> and not the path that the webserver passed to <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a>: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-208"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-209"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-210"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-211"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-212"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-213"></span><pre>def handle_request(req, env, form):
 
206
    request = RequestCGI(req, env, form, properties = {'script_name': '/mywiki'})
 
207
    request.run()</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-214"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-215"></span><p class="line867">
 
208
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureMoinMoin-1">Configure MoinMoin</h3>
 
209
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-216"></span><p class="line862">Finally, check that the <tt class="backtick">wikiconfig.py</tt> file in the instance directory contains correct paths for <tt class="backtick">url_prefix_static</tt> (the htdocs directory), <tt class="backtick">data_dir</tt> (the instance data directory) and <tt class="backtick">data_underlay_dir</tt> (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! It is better to use <strong>absolute paths</strong>, and save yourself some headaches. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-217"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-218"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-219"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-220"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-221"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-222"></span><pre>    data_dir = '/home/mm/share/moin/mywiki/data/'
 
210
    data_underlay_dir = '/home/mm/share/moin/mywiki/underlay/'
 
211
    url_prefix = '/~mm/moin_static160'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-223"></span><p class="line867">
 
212
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Testthewiki-1">Test the wiki</h3>
 
213
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-224"></span><p class="line874">Everything should work fine, now. It is time to perform the following steps: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-225"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-226"></span><ul><li><p class="line862">Run the <em>Moin<tt class="backtick"></tt>Moin CGI Diagnosis</em>: <tt>&gt;&nbsp;lynx&nbsp;-dump&nbsp;http://localhost/~mm/cgi-bin/moin.cgi?action=test</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-227"></span></li><li><p class="line862">If it worked, try to access your new-born wiki with the URL "<tt class="backtick">http://127.0.0.1/~mm/cgi-bin/moin.cgi</tt>". You should see some wiki page - read it. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-228"></span></li><li><p class="line862">Now go to the <a href="http://master17.moinmo.in/WikiSandBox">WikiSandBox</a> page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-229"></span></li><li>Try to edit it and save your changes. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-230"></span></li><li><p class="line862">If that works, see if your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-231"></span></li><li><p class="line862">If you see them, congratulations, you have a new wiki! <img alt=":)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/smile.png" title=":)" width="15" /> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-232"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-233"></span></li></ul><p class="line874">If something goes wrong, have a look at Troubleshooting, below. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-234"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-235"></span><p class="line867">
 
214
<h2 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Troubleshooting">Troubleshooting</h2>
 
215
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-236"></span><p class="line862">See also <a href="http://master17.moinmo.in/HelpOnInstalling/TroubleShooting">../TroubleShooting</a> for generic stuff. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-237"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-238"></span><p class="line862">The first thing to do when your wiki does not work as expected is to issue the command "<tt class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-239"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-240"></span><p class="line867">
 
216
<h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Addingpermissiontoservethehtdocsdirectory">Adding permission to serve the htdocs directory</h3>
 
217
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-241"></span><p class="line862">In some (sane) Linux distributions (like SuSE 9.0) serving directories other than the document-root "<tt class="backtick">/srv/www/htdocs</tt>" with Apache is switched off by default for security reasons in "<tt class="backtick">/etc/httpd/httpd.conf</tt>" (or for Apache2 "<tt class="backtick">/etc/apache2/httpd.conf</tt>"): <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-242"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-243"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-244"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-245"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-246"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-247"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-248"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-249"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-250"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-251"></span><pre># forbid access to the entire filesystem by default
 
218
&lt;Directory /&gt;
 
219
  Options None
 
220
  AllowOverride None
 
221
  Order deny,allow
 
222
  Deny from all
 
223
&lt;/Directory&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-252"></span><p class="line862">To allow Apache to serve directories outside of the document root you have to add these lines to "<tt class="backtick">/etc/httpd/httpd.conf</tt>" (in SuSE it is recommended to create a new "<tt class="backtick">http.conf.local</tt>" and include this file in "<tt class="backtick">/etc/sysconfig/apache2</tt>"): <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-253"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-254"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-255"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-256"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-257"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-258"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-259"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-260"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-261"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-262"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-263"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-264"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-265"></span><pre>Alias /wiki/ "/usr/share/moin/htdocs/"
 
224
&lt;Directory "/usr/share/moin/htdocs/"&gt;
 
225
   Order deny,allow
 
226
   Allow from all
 
227
&lt;/Directory&gt;
 
228
ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
 
229
&lt;Directory "/usr/share/moin/mywiki/cgi-bin"&gt;
 
230
   Order deny,allow
 
231
   Allow from all
 
232
&lt;/Directory&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-266"></span><p class="line874">Of course, you need to adapt the paths to your particular situation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-267"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.bottom"></span></div> <span class="anchor" id="line-54"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-55"></span><span class="anchor" id="fastcgi-install"></span> <span class="anchor" id="line-56"></span>
 
233
<h1>FastCGI Setup using Apache or Lighttpd</h1>
 
234
<div dir="ltr" id="HelpOnInstalling.2BAC8-FastCgi.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.top"></span>
 
235
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-9"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-10"></span><p class="line874">FastCGI is a method which enables a web server to communicate with long-running scripts. This has the advantage that the script is only <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-11"></span>started and initialized one time, and that data could be cached in memory from request to request, enhancing the performance of the CGI application. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-13"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> Follow the basic installation for your operating system as described in other parts of the <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> installation documentation. This is <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">HelpOnInstalling/BasicInstallation</a> and <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">HelpOnInstalling/WikiInstanceCreation</a>, or <a href="http://master17.moinmo.in/HelpOnInstalling/ApacheOnLinux">HelpOnInstalling/ApacheOnLinux</a> in most cases.  <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-15"></span></li></ul><p class="line867"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li><ol><li>
 
236
<a href="#HelpOnInstalling.2BAC8-FastCgi.UsingMoinMoinwithFastCgi">Using MoinMoin with FastCgi</a></li><li>
 
237
<a href="#HelpOnInstalling.2BAC8-FastCgi.DeployingonApache">Deploying on Apache</a><ol><li>
 
238
<a href="#HelpOnInstalling.2BAC8-FastCgi.Scriptoptions">Script options</a></li><li>
 
239
<a href="#HelpOnInstalling.2BAC8-FastCgi.FastCgiExternalServer">FastCgiExternalServer</a></li><li>
 
240
<a href="#HelpOnInstalling.2BAC8-FastCgi.FastCgiServer">FastCgiServer</a></li><li>
 
241
<a href="#HelpOnInstalling.2BAC8-FastCgi.ExampleforApache2onDebian">Example for Apache2 on Debian</a></li><li>
 
242
<a href="#HelpOnInstalling.2BAC8-FastCgi.Runningasanexternalapplicationand.2BAC8-oronWindows">Running as an external application and/or on Windows</a></li><li>
 
243
<a href="#HelpOnInstalling.2BAC8-FastCgi.FallbacktoCGIifFastCGIisnotavailable">Fallback to CGI if FastCGI is not available</a></li></ol></li><li>
 
244
<a href="#HelpOnInstalling.2BAC8-FastCgi.Deployingonlighttpd">Deploying on lighttpd</a><ol><li>
 
245
<a href="#HelpOnInstalling.2BAC8-FastCgi.UsingHTTPAuthentication">Using HTTP Authentication</a></li><li>
 
246
<a href="#HelpOnInstalling.2BAC8-FastCgi.MoinMoinStartupscript">MoinMoin Startup script</a></li><li>
 
247
<a href="#HelpOnInstalling.2BAC8-FastCgi.MacOSX.3AAddingMoinMoinstartupscript">Mac OS X: Adding MoinMoin startup script</a></li></ol></li></ol></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-16"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-17"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-18"></span><p class="line867">
 
248
<h2 id="HelpOnInstalling.2BAC8-FastCgi.UsingMoinMoinwithFastCgi">Using MoinMoin with FastCgi</h2>
 
249
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-19"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-20"></span><p class="line874">For more general information: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-21"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-22"></span><ul><li><p class="line891"><a class="http" href="http://fastcgi.com">http://fastcgi.com</a> - FastCGI Homepage <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-23"></span></li><li><p class="line891"><a class="http" href="http://cryp.to/publications/fastcgi/">FastCGI — The Forgotten Treasure</a> (introduction) <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-25"></span></li></ul><p class="line867">
 
250
<h2 id="HelpOnInstalling.2BAC8-FastCgi.DeployingonApache">Deploying on Apache</h2>
 
251
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-27"></span><p class="line862">To deploy <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> using FastCGI you need an apache with mod_fastcgi. Please refer to the documentation of mod_fastcgi ( <a class="http" href="http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html">mod_fastcgi homepage</a> ). <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-29"></span><p class="line862">Don't forget to install the fastcgi Apache module (e.g. libapache2-mod-fastcgi). Then in places where the documentation refers to <tt class="backtick">moin.cgi</tt> you use <tt class="backtick">moin.fcg</tt> instead. Be sure that <strong>.fcg</strong> is handled by the FastCGI module (<tt class="backtick">AddHandler&nbsp;fastcgi-script&nbsp;.fcg</tt> in your apache config). <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-31"></span><p class="line862">Normally Apache will start CGI scripts with its own user and group, or with the user and group of the VirtualHost if you are using the suexec wrapper. To enable this with FastCGI you need to use <tt class="backtick">FastCgiWrapper&nbsp;On</tt> in your Apache config (check your distributions and/or FastCGI Documentation). <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-32"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-33"></span><p class="line874">Be sure to restart your Apache after you changed py files (i.e. the config) for a running FastCGI server, or you won't see any changes! <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-34"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-35"></span><p class="line867">
 
252
<h3 id="HelpOnInstalling.2BAC8-FastCgi.Scriptoptions">Script options</h3>
 
253
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-36"></span><p class="line874">No matter how and where you install or how you configure, you can add some options (in Apache config or as self-running process). Here is a list of some options. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-39"></span><p class="line867">
 
254
<h3 id="HelpOnInstalling.2BAC8-FastCgi.FastCgiExternalServer">FastCgiExternalServer</h3>
 
255
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-41"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-42"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-43"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-44"></span><pre>-host [hostname:port]     - The port and on what host name to respond.
 
256
-idle-timeout [seconds]   - The number of seconds of inactivity allowed before request is aborted.</pre><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-45"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-46"></span><p class="line867">
 
257
<h3 id="HelpOnInstalling.2BAC8-FastCgi.FastCgiServer">FastCgiServer</h3>
 
258
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-48"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-51"></span><pre>-port [port]              - The port the application will use for communication with the web server.
 
259
-idle-timeout [seconds]   - The number of seconds of inactivity allowed before request is aborted.</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-52"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-53"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-54"></span><p class="line867">
 
260
<h3 id="HelpOnInstalling.2BAC8-FastCgi.ExampleforApache2onDebian">Example for Apache2 on Debian</h3>
 
261
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-55"></span><p class="line874">Edit the /etc/apache2/conf.d/your_wiki: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-57"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-58"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-60"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-62"></span><pre>&lt;IfModule mod_fastcgi.c&gt;
 
262
   AddHandler fastcgi-script .fcgi .fcg
 
263
   FastCgiServer /your/path/to/moin.fcg -idle-timeout 60 -processes 1
 
264
   ScriptAlias /your_wiki "/your/path/to/moin.fcg"
 
265
&lt;/IfModule&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-63"></span><ul><li>number of processes depends on your hardware.. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-64"></span></li></ul><p class="line874">Expand the Apache installation: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-68"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-69"></span><pre>apt-get install libapache2-mod-fastcgi
 
266
a2enmod fastcgi
 
267
apache2ctl graceful</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-70"></span><p class="line874">Now, your wiki should respond a little faster. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-72"></span><p class="line867">
 
268
<h3 id="HelpOnInstalling.2BAC8-FastCgi.Runningasanexternalapplicationand.2BAC8-oronWindows">Running as an external application and/or on Windows</h3>
 
269
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-74"></span><p class="line867"><em>(see also <a href="http://master17.moinmo.in/HelpOnInstalling/ApacheOnWin32withFastCgi">../ApacheOnWin32withFastCgi</a> for a Windows-specific how-to)</em> <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-76"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-77"></span><p class="line867">MoinMoin 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 class="backtick">mod_fastcgi</tt> and a working MoinMoin instance) is this: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-78"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-79"></span><ol type="1"><li>Select a port number for the internal communication. It should be larger than 1023. For this example, we chose 8888 (just for fun). <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-81"></span></li><li class="gap"><p class="line862">Add the following lines to your httpd.conf:<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-83"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-84"></span><pre>Alias /moin.fcg "/your/path/to/moin.fcg"
 
270
FastCgiExternalServer "/your/path/to/moin.fcg" -host localhost:8888</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-86"></span></li><li class="gap"><p class="line862">Edit <tt class="backtick">moin.fcg</tt>. Replace<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-87"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-88"></span><pre>fcg = thfcgi.FCGI(handle_request, max_requests=max_requests, backlog=backlog, max_threads=max_threads)</pre><p class="line862"> with <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-89"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-90"></span><pre>fcg = thfcgi.FCGI(handle_request, 0, 8888, max_requests=max_requests, backlog=backlog, max_threads=max_threads)</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-92"></span></li><li class="gap"><p class="line862">Start the file <tt class="backtick">moin.fcg</tt> manually like a Python script:<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-93"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-94"></span><pre>python moin.fcg</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-96"></span></li><li class="gap">Start Apache. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-97"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-98"></span></li></ol><p class="line867">
 
271
<h3 id="HelpOnInstalling.2BAC8-FastCgi.FallbacktoCGIifFastCGIisnotavailable">Fallback to CGI if FastCGI is not available</h3>
 
272
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-100"></span><p class="line862">Install and test <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> according to <a href="http://master17.moinmo.in/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 class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-102"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-106"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-108"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-109"></span><pre>&lt;IfModule !mod_fastcgi.c&gt;
 
273
    ScriptAlias /mywiki "/your/path/to/moin.cgi"
 
274
&lt;/IfModule&gt;
 
275
&lt;IfModule mod_fastcgi.c&gt;
 
276
    AddHandler fastcgi-script .fcg
 
277
    ScriptAlias /mywiki "/your/path/to/moin.fcg"
 
278
&lt;/IfModule&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-110"></span><p class="line874">Now Apache will use mod_fastcgi if available and otherwise use the slow cgi script. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-111"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-112"></span><p class="line867">
 
279
<h2 id="HelpOnInstalling.2BAC8-FastCgi.Deployingonlighttpd">Deploying on lighttpd</h2>
 
280
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-113"></span><p class="line874">This is about running a wiki under "/" URL with lighttpd. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-114"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-115"></span><p class="line874">The moin.fcg processes will get spawned by lighttpd automatically (thus, if you want to restart moin, just restart lighttpd). <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-117"></span><p class="line874">It will also take care about handling robots.txt and favicon.ico correctly. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-119"></span><p class="line874">First add fastcgi and rewriting support to your lighttpd.conf (if you don't already have it): <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-122"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-123"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-124"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-126"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-127"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-129"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-131"></span><pre>server.modules              = (
 
281
                                "mod_access",
 
282
                                "mod_rewrite",      # &lt;--- IMPORTANT!
 
283
                                "mod_status",
 
284
                                "mod_fastcgi",      # &lt;--- IMPORTANT!
 
285
                                "mod_accesslog",
 
286
                                "mod_redirect",
 
287
                                "mod_auth",
 
288
                                "mod_expire",
 
289
)</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-132"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-133"></span><p class="line874">Then configure it to run moin.fcg for your wiki site and also serve the static stuff: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-134"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-135"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-136"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-137"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-138"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-139"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-140"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-141"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-142"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-143"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-144"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-146"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-147"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-148"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-149"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-150"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-151"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-152"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-153"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-154"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-155"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-156"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-157"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-158"></span><pre>$HTTP["host"] =~ "^(www\.)?example\.org" {
 
290
    url.rewrite-once = (
 
291
        "^/robots.txt" =&gt; "/robots.txt",
 
292
        "^/favicon.ico" =&gt; "/favicon.ico",
 
293
        "^/moin_static161/(.*)" =&gt; "/moin_static161/$1",
 
294
        "^/(.*)" =&gt; "/wiki-engine/$1"
 
295
    )
 
296
    server.document-root        = "/srv/org.example/htdocs/"
 
297
    $HTTP["url"] =~ "^/wiki-engine/" {
 
298
      fastcgi.server = ( "/wiki-engine" =&gt;
 
299
        (( "docroot"   =&gt; "/",
 
300
           "min-procs" =&gt; 10,
 
301
           "max-procs" =&gt; 10,
 
302
           "max-load-per-proc" =&gt; 2,
 
303
           # allocate successive port numbers for each process, starting with "port"
 
304
           "bin-path"  =&gt; "/srv/org.example/bin/moin.fcg",
 
305
           "host"      =&gt; "127.0.0.1",
 
306
           "port"      =&gt; 3060,
 
307
           "check-local" =&gt; "disable",
 
308
        ))
 
309
      )
 
310
    }
 
311
}</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-159"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-160"></span><p class="line874">Finally adapt moin.fcg: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-161"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-162"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-163"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-164"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-165"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-166"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-167"></span><pre>class Config(FastCgiConfig):
 
312
    loglevel_file = logging.INFO
 
313
    logPath = '/srv/org.example/logs/moin.log'
 
314
    max_requests = 1000
 
315
    properties = {'script_name': '/'}  # &lt;--- IMPORTANT!</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-168"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-169"></span><p class="line867">
 
316
<h3 id="HelpOnInstalling.2BAC8-FastCgi.UsingHTTPAuthentication">Using HTTP Authentication</h3>
 
317
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-170"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-171"></span><p class="line874">lighttpd mod_fastcgi does not add the AUTH_TYPE variable to the cgi environment, which will cause http auth in moin to fail.   <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-172"></span>See <a class="http" href="http://trac.lighttpd.net/trac/ticket/889">http://trac.lighttpd.net/trac/ticket/889</a> for more information, and an attached diff file to correct to issue. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-173"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-174"></span><p class="line867">
 
318
<h3 id="HelpOnInstalling.2BAC8-FastCgi.MoinMoinStartupscript">MoinMoin Startup script</h3>
 
319
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-175"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-176"></span><p class="line862">Here is a startup script for Mac OS X, using <a class="nonexistent" href="http://master17.moinmo.in/DarwinPortsStartup">DarwinPortsStartup</a> system. It is probably useful for other unix like platforms. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-177"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-178"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-179"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-180"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-181"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-182"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-183"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-184"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-185"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-186"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-187"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-188"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-189"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-190"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-191"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-192"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-193"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-194"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-195"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-196"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-197"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-198"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-199"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-200"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-201"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-202"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-203"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-204"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-205"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-206"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-207"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-208"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-209"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-210"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-211"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-212"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-213"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-214"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-215"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-216"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-217"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-218"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-219"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-220"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-221"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-222"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-223"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-224"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-225"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-226"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-227"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-228"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-229"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-230"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-231"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-232"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-233"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-234"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-235"></span><pre># Start and stop multiple moin fast cgi instances runnings on PORTS
 
320
 
 
321
NAME="moin"
 
322
DIR="/www/org.mywiki/bin"
 
323
FCGIAPP="./moin.fcg"
 
324
PREFIX="/usr/local"
 
325
 
 
326
# List of ports to start moin instances on, separated with whitesapce
 
327
# Keep in sync with fastcgi.server in lighttpd.conf
 
328
PORTS="1080 1081"
 
329
 
 
330
start_on_port () {
 
331
    # Start moin instance on port, leaving pid file
 
332
    port=$1
 
333
    
 
334
    cd "${DIR}" &amp;&amp; sudo -u www "${PREFIX}/bin/spawn-fcgi" \
 
335
        -f "${FCGIAPP}" \
 
336
        -p $port \
 
337
        -P "${NAME}-${port}.pid" \
 
338
        &gt; /dev/null
 
339
}
 
340
 
 
341
kill_on_port () {
 
342
    # Try to kill process using pid in pid file, then remove the pid file
 
343
    pidFile="${DIR}/${NAME}-$1.pid"
 
344
    kill `cat "$pidFile"` &amp;&amp; rm -f "$pidFile" &gt; /dev/null 
 
345
}
 
346
 
 
347
start () {
 
348
    for port in $PORTS; do start_on_port $port; done 
 
349
}
 
350
 
 
351
stop () {
 
352
    for port in $PORTS; do kill_on_port $port; done
 
353
}
 
354
 
 
355
case "$1" in
 
356
start)
 
357
    # XXX starting twice will break pid files (bug in spawn-fcgi)
 
358
    start &amp;&amp; echo -n " $NAME"
 
359
        ;;
 
360
stop)
 
361
        stop &amp;&amp; echo -n " $NAME"
 
362
        ;;
 
363
restart)
 
364
    stop
 
365
    start &amp;&amp; echo -n " $NAME"
 
366
        ;;
 
367
*)
 
368
        echo "Usage: `basename $0` {start|stop|restart}" &gt;&amp;2
 
369
        ;;
 
370
esac
 
371
 
 
372
exit 0</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-236"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-237"></span><p class="line867">
 
373
<h3 id="HelpOnInstalling.2BAC8-FastCgi.MacOSX.3AAddingMoinMoinstartupscript">Mac OS X: Adding MoinMoin startup script</h3>
 
374
<span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-238"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-239"></span><p class="line874">With this script, moin instances will be started automatically on startup. <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-240"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-241"></span><ol type="1"><li><p class="line862">Install <a class="http" href="http://darwinports.opendarwin.org/getdp/">darwinports</a> <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-242"></span></li><li><p class="line862">Install DarwinPortsStartup package: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-243"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-244"></span><pre>sudo port install DarwinPortsStartup</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-245"></span></li><li><p class="line862">Copy moin.sh into <tt class="backtick">/opt/local/etc/rc.d</tt>: <span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-246"></span><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-247"></span><pre>sudo cp moin.sh /opt/local/etc/rc.d</pre><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.line-248"></span></li></ol><span class="anchor" id="HelpOnInstalling.2BAC8-FastCgi.bottom"></span></div> <span class="anchor" id="line-57"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-58"></span><span class="anchor" id="modpy-install"></span> <span class="anchor" id="line-59"></span>
248
375
<h1>mod_python Setup using Apache</h1>
249
 
<div dir="ltr" id="Include_HelpOnInstalling/ApacheWithModPython" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/ApacheWithModPython"></span>
250
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line867" /><div class="table-of-contents"><p class="table-of-contents-heading" />Contents<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></div> <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line867" />
251
 
<h1 id="head-4e6235e8e3535359b4aa9df9722961dfd62a685a">Why Use mod_python</h1>
252
 
<span class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line867" /><a class="http" href="http://modpython.org/">mod_python</a> embeds the python interpreter into <span class="anchor" id="line-14"></span>the apache server. This saves initialization time and the need of <span class="anchor" id="line-15"></span>forking cgi scripts. It doesn't have the ability to run as different <span class="anchor" id="line-16"></span>users. It will always run as the main apache user and group. Be sure <span class="anchor" id="line-17"></span>that your wiki data files are accessible and writable by your apache <span class="anchor" id="line-18"></span>server. <span class="anchor" id="line-19"></span><span class="anchor" id="line-20"></span><p class="line867" /><img alt="&lt;!&gt;" height="15" src="wiki/htdocs/modern/img/attention.png" title="&lt;!&gt;" 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 class="anchor" id="line-21"></span><span class="anchor" id="line-22"></span><p class="line867" /><img alt="&lt;!&gt;" height="15" src="wiki/htdocs/modern/img/attention.png" title="&lt;!&gt;" width="15" /> mod_python will cause your apache processes to increase their <span class="anchor" id="line-23"></span>memory requirements considerably - especially as apache runs many <span class="anchor" id="line-24"></span>separate processes which will each need to have their own copy of the <span class="anchor" id="line-25"></span>python code and data in the process memory space.  You may find that <span class="anchor" id="line-26"></span>FastCGI, as detailed in <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheWithFastCgi">HelpOnInstalling/ApacheWithFastCgi</a> is rather <span class="anchor" id="line-27"></span>more efficient in this respect. <span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line867" />
253
 
<h1 id="head-52f515a2448d32357136b23a188dd227330baeb2">Basic configuring</h1>
254
 
<span class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><ol type="1"><li>Install mod_python <span class="anchor" id="line-32"></span></li><li>Set up a wiki instance <span class="anchor" id="line-33"></span></li><li><p class="line862" />Edit <tt class="backtick">wikiconfig.py</tt> <span class="anchor" id="line-34"></span></li><li><p class="line862" />Changes to Apache <tt class="backtick">httpd.conf</tt> <span class="anchor" id="line-35"></span></li><li>Restart Apache <span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span></li></ol><p class="line862" />The sample configurations below are for a wiki instance called <tt class="backtick">mywiki</tt> installed in a directory <tt class="backtick">/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 class="backtick">/mywiki</tt> under the server - ie <tt class="backtick">http://my.ser.ver/mywiki</tt>.  You will need to change these to reflect your installation. <span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line867" />
255
 
<h2 id="head-8cd6758d1fcc77b433f6584bcc34e24469568d75">Install mod_python</h2>
256
 
<span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line862" />Most people will just add a <tt class="backtick">mod_python</tt> package to their current operating system installation.  If you are building from source then you should consult the <a class="http" href="http://modpython.org/live/current/doc-html/">mod_python documentation</a>. <span class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line862" />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 class="backtick">/etc/httpd/conf.d/python.conf</tt>). <span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line862" />Make sure you have this line in <tt class="backtick">httpd.conf</tt> or mod_python will not work: <span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><pre>LoadModule python_module modules/mod_python.so
257
 
<span class="anchor" id="line-48"></span></pre><span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><p class="line874" />After this restart Apache and make sure that it starts successfully, and that the error log has a line similar to this:- <span class="anchor" id="line-51"></span><span class="anchor" id="line-52"></span><pre>[Sat Jan 01 15:40:49 2005] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
258
 
<span class="anchor" id="line-53"></span></pre><span class="anchor" id="line-54"></span><span class="anchor" id="line-55"></span><p class="line874" />You may need to change some environment variables on (eg) FreeBSD - this is detailed in the port installation message. <span class="anchor" id="line-56"></span><span class="anchor" id="line-57"></span><p class="line867" />
259
 
<h2 id="head-671adcfb8441deb9daa6ba877d59cc69d5e9d25e">Set up a wiki instance</h2>
260
 
<span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span><p class="line862" />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 class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><ol type="1"><li>Copy moin.cgi into your wiki directory <span class="anchor" id="line-62"></span></li><li><p class="line862" />Configure <tt class="backtick">httpd.conf</tt> as cgi first: <span class="anchor" id="line-63"></span><ul><li style="list-style-type:none"><span class="anchor" id="line-64"></span><pre>Alias /wiki/ "/usr/share/moin/htdocs/"
261
 
<span class="anchor" id="line-65"></span>ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
262
 
<span class="anchor" id="line-66"></span></pre><span class="anchor" id="line-67"></span><span class="anchor" id="line-68"></span></li></ul></li></ol><p class="line874" />Restart Apache and make test that your wiki works. <span class="anchor" id="line-69"></span><span class="anchor" id="line-70"></span><p class="line867" />
263
 
<h2 id="head-08923628c7a5b449b5f210251334c431791adec9">Edit `wikiconfig.py`</h2>
264
 
<span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span><p class="line874" />Make sure you use only absolute paths - relative paths will not work! <span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span><pre>data_dir = '/var/www/moin/mywiki/data/'
265
 
<span class="anchor" id="line-75"></span>data_underlay_dir = '/var/www/moin/mywiki/underlay/'
266
 
<span class="anchor" id="line-76"></span></pre><span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><p class="line874" />If you do not want to use absolute paths, you can use Python's os module to construct the relative paths: <span class="anchor" id="line-79"></span><pre>import os 
267
 
<span class="anchor" id="line-80"></span>data_dir = os.path.join(os.path.dirname(__file__), 'data/')
268
 
<span class="anchor" id="line-81"></span>data_underlay_dir = os.path.join(os.path.dirname(__file__), 'underlay/')
269
 
<span class="anchor" id="line-82"></span></pre><span class="anchor" id="line-83"></span><span class="anchor" id="line-84"></span><p class="line874" />Test that the wiki works after this change. <span class="anchor" id="line-85"></span><span class="anchor" id="line-86"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> In 1.2 and earlyer, the configuration file is called <tt class="backtick">moin_config.py</tt>. <span class="anchor" id="line-87"></span><span class="anchor" id="line-88"></span></li></ul><p class="line867" />
270
 
<h2 id="head-b628477f88ab294636a22af4ee665656a8897b3a">Changes to Apache `httpd.conf`</h2>
271
 
<span class="anchor" id="line-89"></span><span class="anchor" id="line-90"></span><p class="line874" />After your wiki is running as cgi script, convert it to run with mod_python.  <span class="anchor" id="line-91"></span><span class="anchor" id="line-92"></span><p class="line862" />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 class="anchor" id="line-93"></span><span class="anchor" id="line-94"></span><pre>#ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
272
 
<span class="anchor" id="line-95"></span></pre><span class="anchor" id="line-96"></span><span class="anchor" id="line-97"></span><p class="line862" />Add a <tt class="backtick">Location</tt> directive: <span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span><pre>&lt;Location /mywiki&gt;
273
 
<span class="anchor" id="line-100"></span>    SetHandler python-program
274
 
<span class="anchor" id="line-101"></span>    # Add the path of your wiki directory
275
 
<span class="anchor" id="line-102"></span>    PythonPath "['/var/www/moin/mywiki'] + sys.path"
276
 
<span class="anchor" id="line-103"></span>    PythonHandler MoinMoin.request::RequestModPy.run
277
 
<span class="anchor" id="line-104"></span>&lt;/Location&gt;
278
 
<span class="anchor" id="line-105"></span></pre><span class="anchor" id="line-106"></span><span class="anchor" id="line-107"></span><p class="line862" />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 class="backtick">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="http" href="http://modpython.org/live/current/doc-html/pyapi-interps.html">here</a> for details). <span class="anchor" id="line-108"></span><span class="anchor" id="line-109"></span><p class="line862" />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 class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><pre>    PythonPath "['/var/www/moin/mywiki', '/prefix/lib/python2.x/site-packages'] + sys.path"
279
 
<span class="anchor" id="line-112"></span></pre><span class="anchor" id="line-113"></span><span class="anchor" id="line-114"></span><p class="line874" />Restart Apache - everything should now work correctly. <span class="anchor" id="line-115"></span><span class="anchor" id="line-116"></span><p class="line867" />
280
 
<h1 id="head-2dba68d0d0ad069f1c4a2a46bcdbd07cb21d3887">Solving problems for non-root-mounted wikis</h1>
281
 
<span class="anchor" id="line-117"></span><span class="anchor" id="line-118"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> If your wiki does not have a root URL (like <tt class="backtick">http://www.example.com/FrontPage</tt>), then you might need to follow the next steps: <span class="anchor" id="line-119"></span><span class="anchor" id="line-120"></span></li></ul><p class="line862" />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 class="anchor" id="line-121"></span><span class="anchor" id="line-122"></span><pre>&lt;Location /farm/mywiki&gt;
282
 
<span class="anchor" id="line-123"></span>    ...
283
 
<span class="anchor" id="line-124"></span>&lt;/Location&gt;
284
 
<span class="anchor" id="line-125"></span></pre><span class="anchor" id="line-126"></span><p class="line874" />This will not work, because its not clear what is the script name, since with location setup, there is no real script. <span class="anchor" id="line-127"></span><span class="anchor" id="line-128"></span><p class="line862" />To solve this problem, use a <tt class="backtick">PythonOption</tt> directive: <span class="anchor" id="line-129"></span><span class="anchor" id="line-130"></span><pre>&lt;Location /farm/mywiki&gt;
285
 
<span class="anchor" id="line-131"></span>    # Location value must match the Apache Location value!
286
 
<span class="anchor" id="line-132"></span>    PythonOption Location /farm/mywiki
287
 
<span class="anchor" id="line-133"></span>    ...
288
 
<span class="anchor" id="line-134"></span>&lt;/Location&gt;
289
 
<span class="anchor" id="line-135"></span></pre><span class="anchor" id="line-136"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in release 1.3.5 <span class="anchor" id="line-137"></span><span class="anchor" id="line-138"></span></li></ul><p class="line867" />
290
 
<h1 id="head-e7e935fbfb5a81ceb0698ef82b5b7a897aa5e157">Configuring root wiki</h1>
291
 
<span class="anchor" id="line-139"></span><span class="anchor" id="line-140"></span><p class="line862" />You may wish to have your wiki appearing at the root of your webserver - for example so that <tt class="backtick">http://wiki.example.com/</tt> will map to your wiki rather than having to use <tt class="backtick">http://wiki.example.com/mywiki/</tt>.  This requires a slightly different form of configuration using <tt class="backtick">mod_rewrite</tt> - this is a standard module of recent Apache distributions, and is often enabled by default. <span class="anchor" id="line-141"></span><span class="anchor" id="line-142"></span><p class="line862" />You need to set up your wiki instance as described above, and also copy <tt class="backtick">moinmodpy.py</tt> from the Moin installation directory to the wiki instance directory (<tt class="backtick">/var/www/moin/mywiki</tt> in these examples). <span class="anchor" id="line-143"></span><span class="anchor" id="line-144"></span><p class="line862" />The Apache configuration needs <tt class="backtick">mod_rewrite</tt> enabled - so the line <span class="anchor" id="line-145"></span><span class="anchor" id="line-146"></span><pre>LoadModule rewrite_module modules/mod_rewrite.so
292
 
<span class="anchor" id="line-147"></span></pre><span class="anchor" id="line-148"></span><p class="line862" />should appear in the first part of the <tt class="backtick">httpd.conf</tt> configuration file. <span class="anchor" id="line-149"></span><span class="anchor" id="line-150"></span><p class="line874" />The wiki and virtual host configuration sould look like this:- <span class="anchor" id="line-151"></span><span class="anchor" id="line-152"></span><pre>&lt;VirtualHost *:80&gt;
293
 
<span class="anchor" id="line-153"></span>  ServerAdmin postmaster@example.com
294
 
<span class="anchor" id="line-154"></span>  DocumentRoot /var/www/html
295
 
<span class="anchor" id="line-155"></span>  ServerName wiki.example.com
296
 
<span class="anchor" id="line-156"></span>  Alias /wiki/ "/usr/share/moin/htdocs/"
297
 
<span class="anchor" id="line-157"></span>
298
 
<span class="anchor" id="line-158"></span>  # Rewrite urls
299
 
<span class="anchor" id="line-159"></span>  RewriteEngine On
300
 
<span class="anchor" id="line-160"></span>  RewriteLogLevel 0
301
 
<span class="anchor" id="line-161"></span>  # map /wiki static files to Moin htdocs
302
 
<span class="anchor" id="line-162"></span>  RewriteRule ^/wiki/(.*)$ /usr/share/moin/htdocs/$1 [last]
303
 
<span class="anchor" id="line-163"></span>  RewriteRule ^/robots.txt$ /usr/share/moin/htdocs/robots.txt [last]
304
 
<span class="anchor" id="line-164"></span>  RewriteRule ^/favicon.ico$ /usr/share/moin/htdocs/favicon.ico [last]
305
 
<span class="anchor" id="line-165"></span>  # map everything else to server script
306
 
<span class="anchor" id="line-166"></span>  RewriteRule ^(.*)$ /var/www/moin/mywiki/moinmodpy.py$1
307
 
<span class="anchor" id="line-167"></span>
308
 
<span class="anchor" id="line-168"></span>  &lt;Directory "/var/www/moin/testwiki"&gt;
309
 
<span class="anchor" id="line-169"></span>    # Modpy stuff
310
 
<span class="anchor" id="line-170"></span>    AddHandler python-program .py
311
 
<span class="anchor" id="line-171"></span>    # Add the path to the wiki directory, where
312
 
<span class="anchor" id="line-172"></span>    # moinmodpy.py and wikiconfig.py are located.
313
 
<span class="anchor" id="line-173"></span>    PythonPath "['/var/www/moin/mywiki'] + sys.path"
314
 
<span class="anchor" id="line-174"></span>    PythonHandler moinmodpy
315
 
<span class="anchor" id="line-175"></span>  &lt;/Directory&gt;
316
 
<span class="anchor" id="line-176"></span>&lt;/VirtualHost&gt;
317
 
<span class="anchor" id="line-177"></span></pre><span class="anchor" id="line-178"></span><span class="anchor" id="line-179"></span><p class="line862" />Apache should be restarted, and the FrontPage of <tt class="backtick">mywiki</tt> should now appear at <tt class="backtick">http://wiki.example.com/</tt>. <span class="anchor" id="line-180"></span><span class="anchor" id="line-181"></span><p class="line862" />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 class="anchor" id="line-182"></span><span class="anchor" id="line-183"></span><p class="line867" />
318
 
<h1 id="head-53a11a51ff1c262df8f1f287084f8700685446d4">Older mod_python versions</h1>
319
 
<span class="anchor" id="line-184"></span><span class="anchor" id="line-185"></span><p class="line862" />mod_python versions 2.7.10, 3.0.4 and 3.1.2b have a bug in <tt class="backtick">apache.resolve_object</tt>. This bug was reported to the mod_python <span class="anchor" id="line-186"></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 class="anchor" id="line-187"></span><span class="anchor" id="line-188"></span><p class="line867" />
320
 
<h2 id="head-7b2283d5184932488fe551b2cee08e28fb18230c">Use a wrapper script</h2>
321
 
<span class="anchor" id="line-189"></span><span class="anchor" id="line-190"></span><p class="line867" /><a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> come with a <tt class="backtick">moinmodpy.py</tt> wrapper script, and this could be used by changing the <tt class="backtick">PythonPath</tt> and <tt class="backtick">PythonHandler</tt> directives as shown in the <tt class="backtick">moinmodpy.htaccess</tt> file. The wrapper was named <tt class="backtick">moin_modpy.py</tt> in <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> 1.2. <span class="anchor" id="line-191"></span><span class="anchor" id="line-192"></span><p class="line867" />
322
 
<h2 id="head-f2a32b29f0aff0101a91c87d692d063a6e0a4ec2">Fix mod_python</h2>
323
 
<span class="anchor" id="line-193"></span><p class="line874" />mod_python has a small resolver bug in versions 2.7.10, 3.0.4 and 3.1.2b. <span class="anchor" id="line-194"></span>The method <tt class="backtick">resolve_object</tt> in <tt class="backtick">mod_python/apache.py</tt> checks the wrong <span class="anchor" id="line-195"></span>object, and so the lookup for <tt class="backtick">RequestModPy.run</tt> fails. <span class="anchor" id="line-196"></span><span class="anchor" id="line-197"></span><p class="line862" />To fix it you need to change the method <tt class="backtick">resolve_object</tt> (around line 551 for <span class="anchor" id="line-198"></span>mod_python 3.1.2b) from <span class="anchor" id="line-199"></span><span class="anchor" id="line-200"></span><p class="line867" /><span class="anchor" id="line-201"></span><pre>        if silent and not hasattr(module, obj_str):
324
 
<span class="anchor" id="line-202"></span>            return None
325
 
<span class="anchor" id="line-203"></span></pre><span class="anchor" id="line-204"></span><span class="anchor" id="line-205"></span><p class="line874" />to <span class="anchor" id="line-206"></span><span class="anchor" id="line-207"></span><p class="line867" /><span class="anchor" id="line-208"></span><pre>        if silent and not hasattr(obj, obj_str):
326
 
<span class="anchor" id="line-209"></span>            return None
327
 
<span class="anchor" id="line-210"></span></pre><span class="anchor" id="line-211"></span><span class="anchor" id="line-212"></span><span class="anchor" id="line-213"></span><p class="line867" />
328
 
<h1 id="head-17313e33f7320af70773f484730b290d86b62ee5">Troubleshooting</h1>
329
 
<span class="anchor" id="line-214"></span><span class="anchor" id="line-215"></span><p class="line874" />Page access gives apache error:: <span class="anchor" id="line-216"></span><ul><li style="list-style-type:none"><p class="line891" /><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 class="anchor" id="line-217"></span>This appears to be caused by you not having an absolute path for <tt class="backtick">data_dir</tt> in <tt class="backtick">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 class="backtick">moin_config.py</tt>. <span class="anchor" id="line-218"></span></li></ul><span class="anchor" id="bottom_Include_HelpOnInstalling/ApacheWithModPython"></span></div> <span class="anchor" id="line-60"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-61"></span><span class="anchor" id="twisted-install"></span> <span class="anchor" id="line-62"></span>
 
376
<div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheWithModPython.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.top"></span>
 
377
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-9"></span><p class="line867"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li>
 
378
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.WhyUsemodpython">Why Use mod_python</a></li><li>
 
379
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Basicconfiguring">Basic configuring</a><ol><li>
 
380
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Installmodpython">Install mod_python</a></li><li>
 
381
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Setupawikiinstance">Set up a wiki instance</a></li><li>
 
382
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Edit.60wikiconfig.py.60">Edit `wikiconfig.py`</a></li><li>
 
383
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.ChangestoApache.60httpd.conf.60">Changes to Apache `httpd.conf`</a></li></ol></li><li>
 
384
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Solvingproblemsfornon-root-mountedwikis">Solving problems for non-root-mounted wikis</a></li><li>
 
385
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Configuringrootwiki">Configuring root wiki</a></li><li>
 
386
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Oldermodpythonversions">Older mod_python versions</a><ol><li>
 
387
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Useawrapperscript">Use a wrapper script</a></li><li>
 
388
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Fixmodpython">Fix mod_python</a></li></ol></li><li>
 
389
<a href="#HelpOnInstalling.2BAC8-ApacheWithModPython.Troubleshooting">Troubleshooting</a></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-11"></span><p class="line867">
 
390
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.WhyUsemodpython">Why Use mod_python</h1>
 
391
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-13"></span><p class="line867"><a class="http" href="http://modpython.org/">mod_python</a> embeds the python interpreter into <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-14"></span>the apache server. This saves initialization time and the need of <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-15"></span>forking cgi scripts. It doesn't have the ability to run as different <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-16"></span>users. It will always run as the main apache user and group. Be sure <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-17"></span>that your wiki data files are accessible and writable by your apache <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-18"></span>server. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-19"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-20"></span><p class="line867"><img alt="&lt;!&gt;" height="15" src="http://static.moinmo.in/moin_static170/modern/img/attention.png" title="&lt;!&gt;" 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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-21"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-22"></span><p class="line867"><img alt="&lt;!&gt;" height="15" src="http://static.moinmo.in/moin_static170/modern/img/attention.png" title="&lt;!&gt;" width="15" /> mod_python will cause your apache processes to increase their <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-23"></span>memory requirements considerably - especially as apache runs many <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-24"></span>separate processes which will each need to have their own copy of the <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-25"></span>python code and data in the process memory space.  You may find that <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-26"></span>FastCGI, as detailed in <a href="http://master17.moinmo.in/HelpOnInstalling/FastCgi">HelpOnInstalling/FastCgi</a> is rather <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-27"></span>more efficient in this respect. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-29"></span><p class="line867">
 
392
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Basicconfiguring">Basic configuring</h1>
 
393
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-31"></span><ol type="1"><li>Install mod_python <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-32"></span></li><li>Set up a wiki instance <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-33"></span></li><li><p class="line862">Edit <tt class="backtick">wikiconfig.py</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-34"></span></li><li><p class="line862">Changes to Apache <tt class="backtick">httpd.conf</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-35"></span></li><li>Restart Apache <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-37"></span></li></ol><p class="line862">The sample configurations below are for a wiki instance called <tt class="backtick">mywiki</tt> installed in a directory <tt class="backtick">/var/www/moin/mywiki</tt> with the main <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> installation installed in python's default site library path. The wiki appears as URL <tt class="backtick">/mywiki</tt> under the server - ie <tt class="backtick">http://my.ser.ver/mywiki</tt>.  You will need to change these to reflect your installation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-39"></span><p class="line867">
 
394
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Installmodpython">Install mod_python</h2>
 
395
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-41"></span><p class="line862">Most people will just add a <tt class="backtick">mod_python</tt> package to their current operating system installation.  If you are building from source then you should consult the <a class="http" href="http://modpython.org/live/current/doc-html/">mod_python documentation</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-42"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-43"></span><p class="line862">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 class="backtick">/etc/httpd/conf.d/python.conf</tt>). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-44"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-45"></span><p class="line862">Make sure you have this line in <tt class="backtick">httpd.conf</tt> or mod_python will not work: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-46"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-48"></span><pre>LoadModule python_module modules/mod_python.so</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-50"></span><p class="line874">After this restart Apache and make sure that it starts successfully, and that the error log has a line similar to this:- <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-52"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-53"></span><pre>[Sat Jan 01 15:40:49 2005] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-55"></span><p class="line874">You may need to change some environment variables on (eg) FreeBSD - this is detailed in the port installation message. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-57"></span><p class="line867">
 
396
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Setupawikiinstance">Set up a wiki instance</h2>
 
397
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-58"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-59"></span><p class="line862">This is done as shown in <a href="http://master17.moinmo.in/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://master17.moinmo.in/MoinMoin">MoinMoin</a> installation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-60"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-61"></span><ol type="1"><li>Copy moin.cgi into your wiki directory <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-62"></span></li><li><p class="line862">Configure <tt class="backtick">httpd.conf</tt> as cgi first (the shown Alias is for moin version 1.6.0): <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-63"></span><ul><li style="list-style-type:none"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-64"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-66"></span><pre>Alias /moin_static160/ "/usr/share/moin/htdocs/"
 
398
ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-68"></span></li></ul></li></ol><p class="line874">Restart Apache and make test that your wiki works. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-70"></span><p class="line867">
 
399
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Edit.60wikiconfig.py.60">Edit `wikiconfig.py`</h2>
 
400
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-72"></span><p class="line874">Make sure you use only absolute paths - relative paths will not work! <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-74"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-76"></span><pre>data_dir = '/var/www/moin/mywiki/data/'
 
401
data_underlay_dir = '/var/www/moin/mywiki/underlay/'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-78"></span><p class="line874">If you do not want to use absolute paths, you can use Python's os module to construct the relative paths: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-79"></span>{{{import os <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-80"></span>data_dir = os.path.join(os.path.dirname(<span class="u">file</span>), 'data/') <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-81"></span>data_underlay_dir = os.path.join(os.path.dirname(<span class="u">file</span>), 'underlay/') <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-82"></span>}}} <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-83"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-84"></span><p class="line874">Test that the wiki works after this change. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-86"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-87"></span><p class="line867">
 
402
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.ChangestoApache.60httpd.conf.60">Changes to Apache `httpd.conf`</h2>
 
403
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-89"></span><p class="line874">After your wiki is running as cgi script, convert it to run with mod_python.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-91"></span><p class="line862">If you run your wiki as cgi as we recommended before, remove or comment the <a class="nonexistent" href="http://master17.moinmo.in/ScriptAlias">ScriptAlias</a> directive: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-92"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-93"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-94"></span><pre>#ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-96"></span><p class="line862">Add a <tt class="backtick">Location</tt> directive: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-97"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-102"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-104"></span><pre>&lt;Location /mywiki&gt;
 
404
    SetHandler python-program
 
405
    # Add the path of your wiki directory
 
406
    PythonPath "['/var/www/moin/mywiki'] + sys.path"
 
407
    PythonHandler MoinMoin.request.request_modpython::Request.run
 
408
&lt;/Location&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-106"></span><p class="line862">If you have multiple <a href="http://master17.moinmo.in/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 class="backtick">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="http" href="http://modpython.org/live/current/doc-html/pyapi-interps.html">here</a> for details). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-108"></span><p class="line862">If you did not install <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> in the default location, you will have to add the path to <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> to the system path: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-110"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-111"></span><pre>    PythonPath "['/var/www/moin/mywiki', '/prefix/lib/python2.x/site-packages'] + sys.path"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-113"></span><p class="line874">Restart Apache - everything should now work correctly. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-114"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-115"></span><p class="line867">
 
409
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Solvingproblemsfornon-root-mountedwikis">Solving problems for non-root-mounted wikis</h1>
 
410
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-117"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> If your wiki does not have a root URL (like <tt class="backtick">http://www.example.com/FrontPage</tt>), then you might need to follow the next steps: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-119"></span></li></ul><p class="line862">On some installations, mod_python hands <a href="http://master17.moinmo.in/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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-122"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-123"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-124"></span><pre>&lt;Location /farm/mywiki&gt;
 
411
    ...
 
412
&lt;/Location&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-125"></span><p class="line874">This will not work, because its not clear what is the script name, since with location setup, there is no real script. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-126"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-127"></span><p class="line862">To solve this problem, use a <tt class="backtick">PythonOption</tt> directive: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-129"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-131"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-132"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-133"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-134"></span><pre>&lt;Location /farm/mywiki&gt;
 
413
    # Location value must match the Apache Location value!
 
414
    PythonOption Location /farm/mywiki
 
415
    ...
 
416
&lt;/Location&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-135"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-136"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-137"></span><p class="line867">
 
417
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Configuringrootwiki">Configuring root wiki</h1>
 
418
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-138"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-139"></span><p class="line862">You may wish to have your wiki appearing at the root of your webserver - for example so that <tt class="backtick">http://wiki.example.com/</tt> will map to your wiki rather than having to use <tt class="backtick">http://wiki.example.com/mywiki/</tt>.  This requires a slightly different form of configuration using <tt class="backtick">mod_rewrite</tt> - this is a standard module of recent Apache distributions, and is often enabled by default. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-140"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-141"></span><p class="line862">You need to set up your wiki instance as described above, and also copy <tt class="backtick">moinmodpy.py</tt> from the Moin installation directory to the wiki instance directory (<tt class="backtick">/var/www/moin/mywiki</tt> in these examples). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-142"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-143"></span><p class="line862">The Apache configuration needs <tt class="backtick">mod_rewrite</tt> enabled - so the line <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-144"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-146"></span><pre>LoadModule rewrite_module modules/mod_rewrite.so</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-147"></span><p class="line862">should appear in the first part of the <tt class="backtick">httpd.conf</tt> configuration file. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-148"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-149"></span><p class="line874">The wiki and virtual host configuration should look like this (Alias is for moin version 1.6.0):- <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-150"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-151"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-152"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-153"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-154"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-155"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-156"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-157"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-158"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-159"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-160"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-161"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-162"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-163"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-164"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-165"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-166"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-167"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-168"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-169"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-170"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-171"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-172"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-173"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-174"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-175"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-176"></span><pre>&lt;VirtualHost *:80&gt;
 
419
  ServerAdmin postmaster@example.com
 
420
  DocumentRoot /var/www/html
 
421
  ServerName wiki.example.com
 
422
  Alias /moin_static160/ "/usr/share/moin/htdocs/"
 
423
 
 
424
  # Rewrite urls
 
425
  RewriteEngine On
 
426
  RewriteLogLevel 0
 
427
  # map /wiki static files to Moin htdocs
 
428
  RewriteRule ^/moin_static160/(.*)$ /usr/share/moin/htdocs/$1 [last]
 
429
  RewriteRule ^/robots.txt$ /usr/share/moin/htdocs/robots.txt [last]
 
430
  RewriteRule ^/favicon.ico$ /usr/share/moin/htdocs/favicon.ico [last]
 
431
  # map everything else to server script
 
432
  RewriteRule ^(.*)$ /var/www/moin/mywiki/moinmodpy.py$1
 
433
 
 
434
  &lt;Directory "/var/www/moin/testwiki"&gt;
 
435
    # Modpy stuff
 
436
    AddHandler python-program .py
 
437
    # Add the path to the wiki directory, where
 
438
    # moinmodpy.py and wikiconfig.py are located.
 
439
    PythonPath "['/var/www/moin/mywiki'] + sys.path"
 
440
    PythonHandler MoinMoin.request.request_modpython::Request.run
 
441
  &lt;/Directory&gt;
 
442
&lt;/VirtualHost&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-177"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-178"></span><p class="line862">Apache should be restarted, and the FrontPage of <tt class="backtick">mywiki</tt> should now appear at <tt class="backtick">http://wiki.example.com/</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-179"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-180"></span><p class="line862">Other ways of handling root level wikis with Apache are detailed in the appropriately named <a href="http://master17.moinmo.in/HelpOnConfiguration/ApacheVoodoo">HelpOnConfiguration/ApacheVoodoo</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-181"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-182"></span><p class="line867">
 
443
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Oldermodpythonversions">Older mod_python versions</h1>
 
444
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-183"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-184"></span><p class="line862">mod_python versions 2.7.10, 3.0.4 and 3.1.2b have a bug in <tt class="backtick">apache.resolve_object</tt>. This bug was reported to the mod_python <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-185"></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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-186"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-187"></span><p class="line867">
 
445
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Useawrapperscript">Use a wrapper script</h2>
 
446
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-188"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-189"></span><p class="line867"><a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> come with a <tt class="backtick">moinmodpy.py</tt> wrapper script, and this could be used by changing the <tt class="backtick">PythonPath</tt> and <tt class="backtick">PythonHandler</tt> directives as shown in the <tt class="backtick">moinmodpy.htaccess</tt> file.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-190"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-191"></span><p class="line867">
 
447
<h2 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Fixmodpython">Fix mod_python</h2>
 
448
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-192"></span><p class="line874">mod_python has a small resolver bug in versions 2.7.10, 3.0.4 and 3.1.2b. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-193"></span>The method <tt class="backtick">resolve_object</tt> in <tt class="backtick">mod_python/apache.py</tt> checks the wrong <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-194"></span>object, and so the lookup for <tt class="backtick">RequestModPy.run</tt> fails. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-195"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-196"></span><p class="line862">To fix it you need to change the method <tt class="backtick">resolve_object</tt> (around line 551 for <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-197"></span>mod_python 3.1.2b) from <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-198"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-199"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-200"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-201"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-202"></span><pre>        if silent and not hasattr(module, obj_str):
 
449
            return None</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-203"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-204"></span><p class="line874">to <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-205"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-206"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-207"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-208"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-209"></span><pre>        if silent and not hasattr(obj, obj_str):
 
450
            return None</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-210"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-211"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-212"></span><p class="line867">
 
451
<h1 id="HelpOnInstalling.2BAC8-ApacheWithModPython.Troubleshooting">Troubleshooting</h1>
 
452
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-213"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-214"></span><p class="line874">Page access gives apache error:: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-215"></span><ul><li style="list-style-type:none"><p class="line891"><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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-216"></span>This appears to be caused by you not having an absolute path for <tt class="backtick">data_dir</tt> in <tt class="backtick">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 class="backtick">moin_config.py</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.line-217"></span></li></ul><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheWithModPython.bottom"></span></div> <span class="anchor" id="line-60"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-61"></span><span class="anchor" id="twisted-install"></span> <span class="anchor" id="line-62"></span>
330
453
<h1>Setup using Twisted</h1>
331
 
<div dir="ltr" id="Include_HelpOnInstalling/TwistedWeb" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/TwistedWeb"></span>
332
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line867" />
333
 
<h1 id="head-aadc9ea90352d5b5ad5745583f12238abc07f6b1">Using MoinMoin with Twisted</h1>
334
 
<span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line867" /><a class="http" href="http://twistedmatrix.com">Twisted</a> is a standalone python framework for many kinds of applications. <span class="anchor" id="line-12"></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 class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><p class="line862" />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 class="anchor" id="line-15"></span><span class="anchor" id="line-16"></span><p class="line862" />Another advantage is that this is all based on Python. <img alt=";)" height="15" src="wiki/htdocs/modern/img/smile4.png" title=";)" width="15" /> <span class="anchor" id="line-17"></span><span class="anchor" id="line-18"></span><p class="line862" />First do <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> and <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>. <span class="anchor" id="line-19"></span><span class="anchor" id="line-20"></span><p class="line867" />
335
 
<h2 id="head-781019b7b4433e2b39a07387d381c1ca28eb9134">Install Twisted</h2>
336
 
<span class="anchor" id="line-21"></span><span class="anchor" id="line-22"></span><p class="line874" />First, install Twisted (see URL above). Many Linux distributions have Twisted packages. Please refer to the documentation of Twisted for installation information. <span class="anchor" id="line-23"></span><span class="anchor" id="line-24"></span><p class="line867" />
337
 
<h2 id="head-f377d8187c2c46a84ee4a6ae292b323853a6ae0c">Configuring the Twisted server</h2>
338
 
<span class="anchor" id="line-25"></span><span class="anchor" id="line-26"></span><p class="line862" />Copy the file <tt class="backtick">wiki/server/mointwisted.py</tt> to your wiki directory. Edit and adapt the settings to your needs. <span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><p class="line867" />
339
 
<h3 id="head-6cf160dca6339d0a63474b5e9d1c94115980d292">System path configuration</h3>
340
 
<span class="anchor" id="line-29"></span><span class="anchor" id="line-30"></span><p class="line874" />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 class="anchor" id="line-31"></span><span class="anchor" id="line-32"></span><p class="line867" /><span class="anchor" id="line-33"></span><pre>sys.path.insert(0, '/path/to/moin')
341
 
<span class="anchor" id="line-34"></span>sys.path.insert(0, '/path/to/wikiconfig')
342
 
<span class="anchor" id="line-35"></span></pre><span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><p class="line867" />
343
 
<h3 id="head-a51f43e6a56656fb4ff7b17d487afc09442427b5">Config class options</h3>
344
 
<span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line874" />If you did a standard install, the default options might be just what you need. Check and change what you like: <span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><div><table><tbody><tr>  <td><p class="line862" /> <strong>Option</strong> </td>
345
 
  <td><p class="line862" /> <strong>Default</strong> </td>
346
 
  <td><p class="line862" /> <strong>Comment</strong> </td>
347
 
</tr>
348
 
<tr>  <td><span class="anchor" id="line-42"></span><p class="line862" /> docs </td>
349
 
  <td><p class="line862" /> '/usr/share/moin/wiki/htdocs' </td>
350
 
  <td><p class="line862" /> Path to moin shared files </td>
351
 
</tr>
352
 
<tr>  <td><span class="anchor" id="line-43"></span><p class="line862" /> user </td>
353
 
  <td><p class="line862" /> 'www-data' </td>
354
 
  <td><p class="line862" /> If you run as root, the server will run as this user </td>
355
 
</tr>
356
 
<tr>  <td><span class="anchor" id="line-44"></span><p class="line862" /> group </td>
357
 
  <td><p class="line862" /> 'www-data' </td>
358
 
  <td><p class="line862" /> If you run as root, the server will run as this group </td>
359
 
</tr>
360
 
<tr>  <td><span class="anchor" id="line-45"></span><p class="line862" /> port </td>
361
 
  <td><p class="line862" /> 8080 </td>
362
 
  <td><p class="line862" /> Port to serve. To serve a privileged port below 1024 you will have to run as root </td>
363
 
</tr>
364
 
<tr>  <td><span class="anchor" id="line-46"></span><p class="line862" /> interfaces </td>
365
 
  <td><p class="line862" /> <tt class="backtick">['']</tt> </td>
366
 
  <td><p class="line862" /> A list of interfaces the server will listen to. If the list contains the entry <tt class="backtick">''</tt> (like for the default configuration), all other entries are ignored and the server will listen to all interfaces. </td>
367
 
</tr>
368
 
<tr>  <td><span class="anchor" id="line-47"></span><p class="line862" /> logPath </td>
369
 
  <td><p class="line862" /> 'mointwisted.log' </td>
370
 
  <td><p class="line862" /> Log file. </td>
371
 
</tr>
372
 
<tr>  <td><span class="anchor" id="line-48"></span><p class="line862" /> profiler </td>
373
 
  <td><p class="line862" /> commented python code </td>
374
 
  <td><p class="line862" /> Useful only if you are a moin developer. </td>
375
 
</tr>
376
 
</tbody></table></div><span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><p class="line867" />
377
 
<h2 id="head-e4c385b7866dfc82bdf390d00038d1e191cd6870">Configuring wikiconfig.py</h2>
378
 
<span class="anchor" id="line-51"></span><span class="anchor" id="line-52"></span><p class="line874" />The sample config file should be just fine. <span class="anchor" id="line-53"></span><span class="anchor" id="line-54"></span><div><table><tbody><tr>  <td><p class="line862" /> <strong>Option</strong> </td>
379
 
  <td><p class="line862" /> <strong>Default</strong> </td>
380
 
  <td><p class="line862" /> <strong>Comment</strong> </td>
381
 
</tr>
382
 
<tr>  <td><span class="anchor" id="line-55"></span><p class="line862" /> url_prefix </td>
383
 
  <td><p class="line862" /> '/wiki' </td>
384
 
  <td><p class="line862" /> You should not change this, or images and css file will not be available to the wiki! </td>
385
 
</tr>
386
 
</tbody></table></div><span class="anchor" id="line-56"></span><span class="anchor" id="line-57"></span><p class="line867" />
387
 
<h2 id="head-828a44c0e867e6f0fb60395a972cb6003658f76f">Starting the server on Unix</h2>
388
 
<span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span><p class="line862" />On GNU/Linux, Mac OS X or another POSIX-like OS, copy <tt class="backtick">wiki/server/mointwisted</tt> to your wiki directory. You might want to adapt <tt class="backtick">PYTHONPATH</tt> and the path to <tt class="backtick">twistd</tt>.  <span class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><p class="line862" />Start the server with <tt>./mointwisted&nbsp;start</tt> and test your wiki at <a class="http" href="http://localhost:8080/">http://localhost:8080/</a>. Stop the server with <tt>./mointwisted&nbsp;stop</tt>. <span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><p class="line862" />For more options run <tt>./mointwisted</tt> without arguments. <span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><p class="line867" />
389
 
<h2 id="head-0457c39c25e65945e29141fa8f207afe318806fe">Starting the server on Windows</h2>
390
 
<span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><p class="line862" />Copy <tt class="backtick">wiki/server/mointwisted.cmd</tt> to your wiki directory. You might have to change the path pointing to the python-scripts directory. <span class="anchor" id="line-68"></span><span class="anchor" id="line-69"></span><p class="line862" />Double click <tt class="backtick">mointwisted.cmd</tt> to start the server. It will create a new terminal window. To stop the server, close the terminal window. <span class="anchor" id="line-70"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/TwistedWeb"></span></div> <span class="anchor" id="line-63"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-64"></span><span class="anchor" id="linuxstandalone-install"></span> <span class="anchor" id="line-65"></span>
 
454
<div dir="ltr" id="HelpOnInstalling.2BAC8-TwistedWeb.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.top"></span>
 
455
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-9"></span><p class="line867">
 
456
<h1 id="HelpOnInstalling.2BAC8-TwistedWeb.UsingMoinMoinwithTwisted">Using MoinMoin with Twisted</h1>
 
457
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-11"></span><p class="line867"><a class="http" href="http://twistedmatrix.com/trac/wiki">Twisted</a> is an event-driven networking framework for many kinds of applications. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-12"></span>For <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> Twisted is used as a web server that just imports <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a> persistently. This has the advantage that the Python interpreter and all Python scripts (including Twisted itself and also <a href="http://master17.moinmo.in/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://master17.moinmo.in/MoinMoin">MoinMoin</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-13"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-15"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> First do <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> and <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-16"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-17"></span></li></ul><p class="line874">Besides the general installation you need 3 files:  <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-18"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-19"></span><ol type="1"><li><p class="line862">the script <tt>/path/to/cgi-dir/mointwisted</tt> (see "Starting the server" below) <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-20"></span></li><li><p class="line862">the webserver script file like <tt>mointwisted.py</tt> (which needs to be in the same directory where your working directory is). <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-21"></span></li><li><p class="line862">the configuration file like  <tt>/path/to/wikiconfig-dir/wikiconfig.py</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-23"></span></li></ol><p class="line867"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li>
 
458
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.UsingMoinMoinwithTwisted">Using MoinMoin with Twisted</a><ol><li>
 
459
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.InstallTwisted">Install Twisted</a></li><li>
 
460
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.ConfiguringtheTwistedserver">Configuring the Twisted server</a><ol><li>
 
461
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.Systempathconfiguration">System path configuration</a></li><li>
 
462
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.Configclassoptions">Config class options</a></li></ol></li><li>
 
463
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.Configuringwikiconfig.py">Configuring wikiconfig.py</a></li><li>
 
464
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.Startingtheserver">Starting the server</a><ol><li>
 
465
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.onUnix">on Unix</a></li><li>
 
466
<a href="#HelpOnInstalling.2BAC8-TwistedWeb.onWindows">on Windows</a></li></ol></li></ol></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-25"></span><p class="line867">
 
467
<h2 id="HelpOnInstalling.2BAC8-TwistedWeb.InstallTwisted">Install Twisted</h2>
 
468
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-27"></span><p class="line874">First, install Twisted (see URL above). Many Linux distributions have Twisted packages. Please refer to the documentation of Twisted for installation information. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-29"></span><p class="line867">
 
469
<h2 id="HelpOnInstalling.2BAC8-TwistedWeb.ConfiguringtheTwistedserver">Configuring the Twisted server</h2>
 
470
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-31"></span><p class="line862">Copy the file <tt class="backtick">wiki/server/mointwisted.py</tt> to your wiki directory. Edit and adapt the settings to your needs. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-32"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-33"></span><p class="line867">
 
471
<h3 id="HelpOnInstalling.2BAC8-TwistedWeb.Systempathconfiguration">System path configuration</h3>
 
472
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-34"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-35"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-37"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-39"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-40"></span><pre>sys.path.insert(0, '/path/to/moin')
 
473
sys.path.insert(0, '/path/to/wikiconfig')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-41"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-42"></span><p class="line867">
 
474
<h3 id="HelpOnInstalling.2BAC8-TwistedWeb.Configclassoptions">Config class options</h3>
 
475
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-43"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-44"></span><p class="line874">If you did a standard install, the default options might be just what you need. Check and change what you like: <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-45"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-46"></span><div><table><tbody><tr>  <td><p class="line862"> <strong>Option</strong> </td>
 
476
  <td><p class="line862"> <strong>Default</strong> </td>
 
477
  <td><p class="line862"> <strong>Comment</strong> </td>
 
478
</tr>
 
479
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-47"></span><p class="line862"> docs </td>
 
480
  <td><p class="line862"> '/usr/share/moin/wiki/htdocs' </td>
 
481
  <td><p class="line862"> Path to moin shared files </td>
 
482
</tr>
 
483
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-48"></span><p class="line862"> user </td>
 
484
  <td><p class="line862"> 'www-data' </td>
 
485
  <td><p class="line862"> If you run as root, the server will run as this user </td>
 
486
</tr>
 
487
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-49"></span><p class="line862"> group </td>
 
488
  <td><p class="line862"> 'www-data' </td>
 
489
  <td><p class="line862"> If you run as root, the server will run as this group </td>
 
490
</tr>
 
491
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-50"></span><p class="line862"> port </td>
 
492
  <td><p class="line862"> 8080 </td>
 
493
  <td><p class="line862"> Port to serve. To serve a privileged port below 1024 you will have to run as root </td>
 
494
</tr>
 
495
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-51"></span><p class="line862"> interfaces </td>
 
496
  <td><p class="line862"> <tt class="backtick">['']</tt> </td>
 
497
  <td><p class="line862"> A list of interfaces the server will listen to. If the list contains the entry <tt class="backtick">''</tt> (like for the default configuration), all other entries are ignored and the server will listen to all interfaces. </td>
 
498
</tr>
 
499
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-52"></span><p class="line862"> logPath </td>
 
500
  <td><p class="line862"> 'mointwisted.log' </td>
 
501
  <td><p class="line862"> Log file. </td>
 
502
</tr>
 
503
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-53"></span><p class="line862"> profiler </td>
 
504
  <td><p class="line862"> commented python code </td>
 
505
  <td><p class="line862"> Useful only if you are a moin developer. </td>
 
506
</tr>
 
507
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-55"></span><p class="line867">
 
508
<h2 id="HelpOnInstalling.2BAC8-TwistedWeb.Configuringwikiconfig.py">Configuring wikiconfig.py</h2>
 
509
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-57"></span><p class="line874">The sample config file should be just fine. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-58"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-59"></span><p class="line862">Don't change <tt class="backtick">url_prefix_static</tt> as the default value is hardcoded in the Twisted server. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-60"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-61"></span><p class="line867">
 
510
<h2 id="HelpOnInstalling.2BAC8-TwistedWeb.Startingtheserver">Starting the server</h2>
 
511
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-63"></span><p class="line867">
 
512
<h3 id="HelpOnInstalling.2BAC8-TwistedWeb.onUnix">on Unix</h3>
 
513
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-64"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-65"></span><p class="line862">On GNU/Linux, Mac OS X or another POSIX-like OS, copy <tt class="backtick">wiki/server/mointwisted</tt> to your wiki directory. You might want to adapt <tt class="backtick">PYTHONPATH</tt> and the path to <tt class="backtick">twistd</tt>.  <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-67"></span><p class="line862">Start the server with <tt>./mointwisted&nbsp;start</tt> and test your wiki at <a class="http" href="http://localhost:8080/">http://localhost:8080/</a>. Stop the server with <tt>./mointwisted&nbsp;stop</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-68"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-69"></span><p class="line862">For more options run <tt>./mointwisted</tt> without arguments. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-70"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-71"></span><p class="line862">If you want to start the server via initscript make sure <tt>mointwisted</tt> finds <tt>montwisted.py</tt> on startup!  <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-72"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-74"></span><p class="line867">
 
514
<h3 id="HelpOnInstalling.2BAC8-TwistedWeb.onWindows">on Windows</h3>
 
515
<span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-76"></span><p class="line862">Copy <tt class="backtick">wiki/server/mointwisted.cmd</tt> to your wiki directory. You might have to change the path pointing to the python-scripts directory. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-78"></span><p class="line862">Double click <tt class="backtick">mointwisted.cmd</tt> to start the server. It will create a new terminal window. To stop the server, close the terminal window. <span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.line-79"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TwistedWeb.bottom"></span></div> <span class="anchor" id="line-63"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-64"></span><span class="anchor" id="linuxstandalone-install"></span> <span class="anchor" id="line-65"></span>
391
516
<h1>Linux Installation using standalone server</h1>
392
 
<div dir="ltr" id="Include_HelpOnInstalling/StandaloneServer" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/StandaloneServer"></span>
393
 
<span class="anchor" id="line-9"></span><p class="line867" /><strong>Installing and configuring standalone server</strong> <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line862" />See also: <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration/IntegratingWithApache">HelpOnConfiguration/IntegratingWithApache</a> <span class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line874" />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 class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><p class="line874" />To install and run the standalone server: <span class="anchor" id="line-16"></span><ol type="1"><li><p class="line862" />If <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> is not installed yet, perform <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> <span class="anchor" id="line-17"></span></li><li><p class="line862" />Create a wiki instance as described in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a> <span class="anchor" id="line-18"></span></li><li><p class="line862" />Copy <tt>moin.py</tt> to your wiki directory, where your <tt>wikiconfig.py</tt> is <span class="anchor" id="line-19"></span></li><li><p class="line862" />If you installed with <tt class="backtick">--prefix</tt> option, you must edit moin.py and set <tt class="backtick">docs</tt> to the correct path. <span class="anchor" id="line-20"></span></li><li><p class="line862" />Run <tt>moin.py</tt> <span class="anchor" id="line-21"></span></li><li><p class="line862" />Access your wiki at <a class="http" href="http://localhost:8000/">http://localhost:8000/</a> <span class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span></li></ol><p class="line862" />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 class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line867" />
394
 
<h1 id="head-b104ff56fc1c89199447f1f2756b65995534e032">Configuring moin.py</h1>
395
 
<span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line867" />
396
 
<h2 id="head-5d2a2fc430a567acd72fcaa712af23333abca0df">System path configuration</h2>
397
 
<span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line874" />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 class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><p class="line867" /><span class="anchor" id="line-32"></span><pre>import sys
398
 
<span class="anchor" id="line-33"></span>sys.path.insert(0, '/path/to/moin')
399
 
<span class="anchor" id="line-34"></span>sys.path.insert(0, '/path/to/wikiconfig')
400
 
<span class="anchor" id="line-35"></span></pre><span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><p class="line867" /><span class="anchor" id="options"></span> <span class="anchor" id="line-38"></span>
401
 
<h2 id="head-3cb7180f429490b9735cfc083869eaaa128ed64c">Config class options</h2>
402
 
<span class="anchor" id="line-39"></span><span class="anchor" id="line-40"></span><div><table><tbody><tr>  <td><p class="line862" /> <strong>Option</strong> </td>
403
 
  <td><p class="line862" /> <strong>Default</strong> </td>
404
 
  <td><p class="line862" /> <strong>Comment</strong> </td>
405
 
</tr>
406
 
<tr>  <td><span class="anchor" id="line-41"></span><p class="line862" /> name </td>
407
 
  <td><p class="line862" /> <tt>'moin'</tt> </td>
408
 
  <td><p class="line862" /> Server name, used by default for log and pid files. <img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in 1.5 </td>
409
 
</tr>
410
 
<tr>  <td><span class="anchor" id="line-42"></span><p class="line862" /> docs </td>
411
 
  <td><p class="line862" /> <tt>'/usr/share/moin/wiki/htdocs'</tt> </td>
412
 
  <td><p class="line862" /> Path to moin shared files. If you used <tt class="backtick">--prefix</tt> install, the default path will not work, and you must set the path to <tt>'PREFIX/share/moin/wiki/htdocs'</tt>. </td>
413
 
</tr>
414
 
<tr>  <td><span class="anchor" id="line-43"></span><p class="line862" /> user </td>
415
 
  <td><p class="line862" /> <tt>'www-data'</tt> </td>
416
 
  <td><p class="line862" /> If you run as root, the server will run with as this user </td>
417
 
</tr>
418
 
<tr>  <td><span class="anchor" id="line-44"></span><p class="line862" /> group </td>
419
 
  <td><p class="line862" /> <tt>'www-data'</tt> </td>
420
 
  <td><p class="line862" /> If you run as root, the server will run with as this group </td>
421
 
</tr>
422
 
<tr>  <td><span class="anchor" id="line-45"></span><p class="line862" /> port </td>
423
 
  <td><p class="line862" /> <tt>8000</tt> </td>
424
 
  <td><p class="line862" /> Port to serve. To serve privileged port under 1024 you will have to run as root </td>
425
 
</tr>
426
 
<tr>  <td><span class="anchor" id="line-46"></span><p class="line862" /> interface </td>
427
 
  <td><p class="line862" /> <tt>'localhost'</tt> </td>
428
 
  <td><p class="line862" /> The interface the server will listen to. The default will listen only to localhost. Set to <tt>''</tt> to listen to all.</td>
429
 
</tr>
430
 
<tr>  <td><span class="anchor" id="line-47"></span><p class="line862" /> logPath </td>
431
 
  <td><p class="line862" /> <tt>name&nbsp;+&nbsp;'.log'</tt> </td>
432
 
  <td><p class="line862" /> Log file. Default is commented. </td>
433
 
</tr>
434
 
<tr>  <td><span class="anchor" id="line-48"></span><p class="line862" /> serverClass </td>
435
 
  <td><p class="line862" /> <tt>'ThreadPoolServer'</tt>, <tt>'ThreadingServer'</tt>, <tt>'ForkingServer'</tt>, <tt>'SimpleServer'</tt> </td>
436
 
  <td><p class="line862" /> 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 alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in 1.3.5 </td>
437
 
</tr>
438
 
<tr>  <td><span class="anchor" id="line-49"></span><p class="line862" /> threadLimit </td>
439
 
  <td><p class="line862" /> <tt>10</tt> </td>
440
 
  <td><p class="line862" /> How many threads to create. <img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in 1.3.5 </td>
441
 
</tr>
442
 
<tr>  <td><span class="anchor" id="line-50"></span><p class="line862" /> requestQueueSize </td>
443
 
  <td><p class="line862" /> <tt>50</tt> </td>
444
 
  <td><p class="line862" /> The count of socket connection requests that are buffered by the operating system. <img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in 1.3.5 </td>
445
 
</tr>
446
 
<tr>  <td><span class="anchor" id="line-51"></span><p class="line862" /> properties </td>
447
 
  <td><p class="line862" /> <tt>&nbsp;{}&nbsp;</tt> </td>
448
 
  <td><p class="line862" /> allow overriding any request property by setting the value in this dict e.g <tt>properties&nbsp;=&nbsp;{'script_name':&nbsp;'/mywiki'</tt>}. <img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in 1.5 </td>
449
 
</tr>
450
 
</tbody></table></div><span class="anchor" id="line-52"></span><span class="anchor" id="line-53"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> There may be more options useful to moin developers, see the comments in <tt>moin.py</tt> <span class="anchor" id="line-54"></span><span class="anchor" id="line-55"></span><span class="anchor" id="line-56"></span></li></ul><p class="line867" />
451
 
<h1 id="head-09dea245aaa1a9c2da2585949e627adb3e22284d">Configuring wikiconfig.py</h1>
452
 
<span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span><p class="line874" />The sample config file should be just fine. <span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><div><table><tbody><tr>  <td><p class="line862" /> <strong>Option</strong> </td>
453
 
  <td><p class="line862" /> <strong>Default</strong> </td>
454
 
  <td><p class="line862" /> <strong>Comment</strong> </td>
455
 
</tr>
456
 
<tr>  <td><span class="anchor" id="line-61"></span><p class="line862" /> url_prefix </td>
457
 
  <td><p class="line862" /> '/wiki' </td>
458
 
  <td><p class="line862" /> You should not change this, or images and css file will not be available to the wiki! </td>
459
 
</tr>
460
 
</tbody></table></div><span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><p class="line867" />
461
 
<h1 id="head-97336ff12bb113d4f2b55edf2d4c433001e6e54e">Starting the server</h1>
462
 
<span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><p class="line862" />Run <tt>moin.py</tt> from the command line: <span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><pre>$ ./moin.py
463
 
<span class="anchor" id="line-68"></span>Serving on localhost:8000
464
 
<span class="anchor" id="line-69"></span></pre><span class="anchor" id="line-70"></span><span class="anchor" id="line-71"></span><p class="line862" />Test your wiki at <a class="http" href="http://localhost:8000/">http://localhost:8000/</a> <span class="anchor" id="line-72"></span><span class="anchor" id="line-73"></span><p class="line862" />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 class="anchor" id="line-74"></span><span class="anchor" id="line-75"></span><p class="line862" />On Unix, interrupt the server with <tt>Control&nbsp;+&nbsp;C</tt> in order to shut it down. <span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span><p class="line867" />
465
 
<h1 id="head-3da0e8e1ef007d5e29a21fda332f1982c4e7140b">Serving port 80 on Unix</h1>
466
 
<span class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span><p class="line862" />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 class="anchor" id="line-80"></span><span class="anchor" id="line-81"></span><p class="line862" />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 class="anchor" id="line-82"></span><span class="anchor" id="line-83"></span><p class="line862" />Run <tt>moin.py</tt> as root: <span class="anchor" id="line-84"></span><span class="anchor" id="line-85"></span><pre>$ sudo moin.py
467
 
<span class="anchor" id="line-86"></span>Password:
468
 
<span class="anchor" id="line-87"></span>Serving on localhost:8000
469
 
<span class="anchor" id="line-88"></span>Running as uid/gid 70/70
470
 
<span class="anchor" id="line-89"></span></pre><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line862" />Test your wiki at <a class="http" href="http://localhost/">http://localhost/</a> <span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><p class="line867" />
471
 
<h1 id="head-79336bdc41d8a5136baf30cad5a31b8c49b7c57b">Running as daemon</h1>
472
 
<span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><p class="line874" />If run on Unix, you can run moin.py as a background process: <span class="anchor" id="line-96"></span><ol type="1"><li><p class="line862" />Have a working <tt>moin.py</tt> as explained above <span class="anchor" id="line-97"></span></li><li><p class="line862" />Copy the file <tt>prefix/share/moin/server/moin</tt> to your wiki directory. <span class="anchor" id="line-98"></span></li><li>Start moin server: <span class="anchor" id="line-99"></span></li></ol><p class="line867" /><span class="anchor" id="line-100"></span><pre>./moin start
473
 
<span class="anchor" id="line-101"></span></pre><span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><p class="line874" />To stop the server: <span class="anchor" id="line-104"></span><span class="anchor" id="line-105"></span><pre>./moin stop
474
 
<span class="anchor" id="line-106"></span></pre><span class="anchor" id="line-107"></span><span class="anchor" id="line-108"></span><p class="line862" />For more info run <tt>moin</tt> with no arguments. <span class="anchor" id="line-109"></span><span class="anchor" id="line-110"></span><p class="line862" />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 class="anchor" id="line-111"></span><span class="anchor" id="line-112"></span><pre># Add the path to moin.py directory 
475
 
<span class="anchor" id="line-113"></span>import sys
476
 
<span class="anchor" id="line-114"></span>sys.path.insert(0, '/path/to/moin')
477
 
<span class="anchor" id="line-115"></span></pre><span class="anchor" id="line-116"></span><span class="anchor" id="line-117"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> New in release 1.5 <span class="anchor" id="line-118"></span></li></ul><span class="anchor" id="bottom_Include_HelpOnInstalling/StandaloneServer"></span></div> <span class="anchor" id="line-66"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-67"></span><span class="anchor" id="macosx-install"></span> <span class="anchor" id="line-68"></span>
 
517
<div dir="ltr" id="HelpOnInstalling.2BAC8-StandaloneServer.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.top"></span>
 
518
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-9"></span><p class="line867"><strong>Installing and configuring standalone server</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-11"></span><p class="line862">See also: <a href="http://master17.moinmo.in/HelpOnConfiguration/IntegratingWithApache">HelpOnConfiguration/IntegratingWithApache</a> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-13"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-15"></span><p class="line867">
 
519
<h1 id="HelpOnInstalling.2BAC8-StandaloneServer.Thequickway">The quick way</h1>
 
520
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-16"></span><p class="line862">See <a href="http://master17.moinmo.in/DesktopEdition">DesktopEdition</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-17"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-18"></span><p class="line867">
 
521
<h1 id="HelpOnInstalling.2BAC8-StandaloneServer.Theflexibleway">The flexible way</h1>
 
522
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-19"></span><p class="line862">Instead of just running it like described above, you can of course move stuff to different places (see <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">../BasicInstallation</a>, <a href="http://master17.moinmo.in/HelpOnInstalling/WikiInstanceCreation">../WikiInstanceCreation</a>). <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-20"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-21"></span><p class="line862">You can then invoke the moin standalone server using the <tt class="backtick">moin</tt> scripting command: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-23"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-25"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-26"></span><pre># for details and other options, see: moin server standalone --help
 
523
moin --config-dir=/etc/moin server standalone --docs=/usr/share/moin/htdocs</pre><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-27"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-28"></span><p class="line874">Of course you have to give correct values that match your setup: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-29"></span><ul><li><p class="line891"><tt class="backtick">--config-dir</tt> gives the directory that contains your wikiconfig (or farmconfig). <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-30"></span><ul><li><p class="line862">wikiconfig points to other important pathes, e.g. <tt class="backtick">data_dir</tt> and <tt class="backtick">underlay_dir</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-31"></span></li></ul></li><li><p class="line891"><tt class="backtick">--docs</tt> gives the directory where moin finds the static files (css, imgs, etc.) <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-32"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-33"></span></li></ul><p class="line862">If it does not find the <tt class="backtick">moin</tt> command: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-34"></span><ul><li><p class="line862">if you used <tt class="backtick">setup.py</tt> it should have copied it to <tt class="backtick">/usr(/local)/bin</tt> - check your PATH. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-35"></span></li><li><p class="line862">if you don't want to use <tt class="backtick">setup.py</tt> just write your own <tt class="backtick">moin</tt> command script: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-39"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-41"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-42"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-43"></span><pre>#Fix and uncomment those 2 lines if it doesn't find the MoinMoin package:
 
524
#import sys
 
525
#sys.path.insert(0, '/path/to/moin_code')
 
526
from MoinMoin.script.moin import run
 
527
run()</pre><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-44"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-45"></span></li></ul><p class="line867"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" width="15" /> If it crashes and tells it can't import <tt class="backtick">MoinMoin</tt>, then just uncomment and fix the <tt class="backtick">sys.path</tt> stuff you see above. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-46"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-47"></span><p class="line862">Now point your browser at <tt class="backtick">http://localhost:8080/</tt> (or whatever moin tells you). <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-48"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-49"></span><p class="line862">If you want to run the moin process as a daemon, have a look at the <tt class="backtick">--start</tt>, <tt class="backtick">--stop</tt> and <tt class="backtick">--pidfile</tt> options. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-51"></span><p class="line867">
 
528
<h2 id="HelpOnInstalling.2BAC8-StandaloneServer.Servingport80onUnix">Serving port 80 on Unix</h2>
 
529
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-52"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-53"></span><p class="line862">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 start moin as <tt>root</tt> for this. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-55"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-57"></span><p class="line867">
 
530
<h2 id="HelpOnInstalling.2BAC8-StandaloneServer.StandaloneServerconfiguration">Standalone Server configuration</h2>
 
531
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-58"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-59"></span><p class="line862">Alternatively to giving parameters by commandline options, you can also have a <tt class="backtick">wikiserverconfig.py</tt> and specify your stuff in a <tt class="backtick">Config</tt> class there. See the example file in the toplevel directory. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-60"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-61"></span><div><table><tbody><tr>  <td><p class="line862"> <strong>Option</strong> </td>
 
532
  <td><p class="line862"> <strong>Default</strong> </td>
 
533
  <td><p class="line862"> <strong>Comment</strong> </td>
 
534
</tr>
 
535
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-62"></span><p class="line862"> name </td>
 
536
  <td><p class="line862"> <tt>'moin'</tt> </td>
 
537
  <td><p class="line862"> Server name, used by default for log and pid files. </td>
 
538
</tr>
 
539
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-63"></span><p class="line862"> docs </td>
 
540
  <td><p class="line862"> <tt>'/usr/share/moin/wiki/htdocs'</tt> </td>
 
541
  <td><p class="line862"> Path to moin shared files. If you used <tt class="backtick">--prefix</tt> install, the default path will not work, and you must set the path to <tt>'PREFIX/share/moin/wiki/htdocs'</tt>. </td>
 
542
</tr>
 
543
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-64"></span><p class="line862"> user </td>
 
544
  <td><p class="line862"> <tt>'www-data'</tt> </td>
 
545
  <td><p class="line862"> If you run as root, the server will run with as this user </td>
 
546
</tr>
 
547
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-65"></span><p class="line862"> group </td>
 
548
  <td><p class="line862"> <tt>'www-data'</tt> </td>
 
549
  <td><p class="line862"> If you run as root, the server will run with as this group </td>
 
550
</tr>
 
551
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-66"></span><p class="line862"> port </td>
 
552
  <td><p class="line862"> <tt>8000</tt> </td>
 
553
  <td><p class="line862"> Port to serve. To serve privileged port under 1024 you will have to run as root </td>
 
554
</tr>
 
555
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-67"></span><p class="line862"> interface </td>
 
556
  <td><p class="line862"> <tt>'localhost'</tt> </td>
 
557
  <td><p class="line862"> The interface the server will listen to. The default will listen only to localhost. Set to <tt>''</tt> to listen to all.</td>
 
558
</tr>
 
559
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-68"></span><p class="line862"> serverClass </td>
 
560
  <td><p class="line862"> <tt>'ThreadPoolServer'</tt>, <tt>'ThreadingServer'</tt>, <tt>'ForkingServer'</tt>, <tt>'SimpleServer'</tt>, <tt>'SecureThreadPoolServer'</tt> </td>
 
561
  <td><p class="line862"> 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. </td>
 
562
</tr>
 
563
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-69"></span><p class="line862"> threadLimit </td>
 
564
  <td><p class="line862"> <tt>10</tt> </td>
 
565
  <td><p class="line862"> How many threads to create. </td>
 
566
</tr>
 
567
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-70"></span><p class="line862"> requestQueueSize </td>
 
568
  <td><p class="line862"> <tt>50</tt> </td>
 
569
  <td><p class="line862"> The count of socket connection requests that are buffered by the operating system. </td>
 
570
</tr>
 
571
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-71"></span><p class="line862"> properties </td>
 
572
  <td><p class="line862"> <tt>&nbsp;{}&nbsp;</tt> </td>
 
573
  <td><p class="line862"> allow overriding any request property by setting the value in this dict e.g <tt>properties&nbsp;=&nbsp;{'script_name':&nbsp;'/mywiki'</tt>}. </td>
 
574
</tr>
 
575
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-72"></span><p class="line862"> ssl_privkey </td>
 
576
  <td><p class="line862"> <tt>&nbsp;None&nbsp;</tt> </td>
 
577
  <td><p class="line862"> If using the <a class="nonexistent" href="http://master17.moinmo.in/SecureThreadPoolServer">SecureThreadPoolServer</a>, this must point to the server's private key. </td>
 
578
</tr>
 
579
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-73"></span><p class="line862"> ssl_certificate </td>
 
580
  <td><p class="line862"> <tt>&nbsp;None&nbsp;</tt> </td>
 
581
  <td><p class="line862"> If using the <a class="nonexistent" href="http://master17.moinmo.in/SecureThreadPoolServer">SecureThreadPoolServer</a>, this must point to the server's certificate. </td>
 
582
</tr>
 
583
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-74"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-75"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" width="15" /> There may be more options useful to moin developers, see the comments in <tt>moin.py</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-76"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-77"></span></li></ul><p class="line867">
 
584
<h2 id="HelpOnInstalling.2BAC8-StandaloneServer.Configuringwikiconfig.py">Configuring wikiconfig.py</h2>
 
585
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-78"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-79"></span><p class="line874">The sample config file should be just fine. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-81"></span><p class="line862">The default value of <tt class="backtick">url_prefix_static</tt> is hardcoded into the standalone server script, do not change it or it won't work! <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-83"></span><p class="line867">
 
586
<h2 id="HelpOnInstalling.2BAC8-StandaloneServer.Usingthesecurestandaloneserver">Using the secure standalone server</h2>
 
587
<span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-84"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-85"></span><p class="line862">The standalone server supports SSL when using the <a class="nonexistent" href="http://master17.moinmo.in/SecureThreadPoolServer">SecureThreadPoolServer</a> server class. The SSL support is provided by the <a class="http" href="http://trevp.net/tlslite/">TLSLite library</a>. <strong>All wiki traffic is forced to SSL when using the <a class="nonexistent" href="http://master17.moinmo.in/SecureThreadPoolServer">SecureThreadPoolServer</a></strong>.  <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-86"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-87"></span><p class="line862">Two additional configuration options are required when using the <a class="nonexistent" href="http://master17.moinmo.in/SecureThreadPoolServer">SecureThreadPoolServer</a>. First, <tt class="backtick">ssl_privkey</tt> must point to the server's private key. Second, <tt class="backtick">ssl_certificate</tt> must point to the server's certificate.  <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-89"></span><p class="line867"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> <em>TLSLite does not support a password protected private key unless additional libraries are used. Consult the TLSLite webpage for more information.</em> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-91"></span><p class="line862">Typically a certificate would be purchased from an certificate authority, such as Thawte (<a class="http" href="http://www.thawte.com">http://www.thawte.com</a>). However, since the suggested usage of the standalone server is for personal use, a self signed certificate may be appropriate. For more information on how to generate a server private key, and a self signed certificate, see the <a class="http" href="http://www.openssl.org/docs/HOWTO/">openssl HOWTO pages</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-92"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-93"></span><p class="line874">For example, to create the server's private key, run the following: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-94"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-95"></span><p class="line867"><tt class="backtick">openssl&nbsp;genrsa&nbsp;-out&nbsp;privkey.pem&nbsp;2048</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-96"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-97"></span><p class="line874">To create a self signed certificate for the newly created private key, run the following: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-99"></span><p class="line867"><tt class="backtick">openssl&nbsp;req&nbsp;-new&nbsp;-x509&nbsp;-key&nbsp;privkey.pem&nbsp;-out&nbsp;cacert.pem&nbsp;-days&nbsp;1095</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-101"></span><p class="line862">moin.py then needs to be told about the generated files <tt class="backtick">privkey.pem</tt> and <tt class="backtick">cacert.pem</tt>. For the example above, the following lines would need to be added to moin.py: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-102"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-103"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-106"></span><pre>    ssl_privkey = "/secure/path/to/privkey.pem"
 
588
    ssl_certificate = "/secure/path/to/cacert.pem"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-108"></span><p class="line867"><img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> Using a self signed certificate will cause your browser to generate a warning that it cannot verify the identify of the wiki server. This is because the certificate was not signed by a recognized certificate authority (CA). In order to get rid of this warning, you must purchase a certificate from a CA. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.bottom"></span></div> <span class="anchor" id="line-66"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-67"></span><span class="anchor" id="macosx-install"></span> <span class="anchor" id="line-68"></span>
478
589
<h1>Mac OS X Installation using Apache</h1>
479
 
<div dir="ltr" id="Include_HelpOnInstalling/ApacheOnMacOsx" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/ApacheOnMacOsx"></span>
480
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line874" />You must not be afraid to use the terminal. It is possible but much harder to install without using the terminal. <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line874" />There are 2 step in the installation: <span class="anchor" id="line-12"></span><ol type="1"><li><p class="line862" />Install the <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> engine - once <span class="anchor" id="line-13"></span></li><li>Create wiki instance. You can create and serve as many wikis as you like. <span class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><span class="anchor" id="line-16"></span></li></ol><p class="line867" />
481
 
<h1 id="head-c94edbb5fa226613bc614ed4817a423e49bfab74">Installing MoinMoin</h1>
482
 
<span class="anchor" id="line-17"></span><p class="line867" />
483
 
<h2 id="head-fab7fde843537e1c43e51293df06cf230070066f">Download</h2>
484
 
<span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><p class="line862" />Download the source on the Desktop. You should see a <tt class="backtick">moin-1.3.tar.gz</tt> file. Extract this file on the desktop with Stuffit Expander, or from the terminal (faster and safer): <span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span><pre>cd ~/Desktop
485
 
<span class="anchor" id="line-22"></span>tar -xzf moin-1.3.0.tar.gz
486
 
<span class="anchor" id="line-23"></span></pre><span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line867" />
487
 
<h2 id="head-fe44f2863565a3eaecef0a33bc1e9a1f4c96638f">Install procedure</h2>
488
 
<span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line862" />Use these commands in the terminal to install the MoinMoin wiki engine into the system. <span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line862" />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 class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><pre>sudo -s
489
 
<span class="anchor" id="line-32"></span>... password:
490
 
<span class="anchor" id="line-33"></span></pre><span class="anchor" id="line-34"></span><p class="line874" />Now you have root privileges in this shell. <span class="anchor" id="line-35"></span><span class="anchor" id="line-36"></span><p class="line874" />Install: <span class="anchor" id="line-37"></span><span class="anchor" id="line-38"></span><pre>cd moin-1.3.0
491
 
<span class="anchor" id="line-39"></span>python setup.py install --install-data='/usr/local'
492
 
<span class="anchor" id="line-40"></span></pre><span class="anchor" id="line-41"></span><span class="anchor" id="line-42"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" width="15" /> The --install-data='/usr/local' will put the shared data in the convenient <tt class="backtick">'/usr/local/share/moin'</tt> folder. If you don't use it, your shared data will be at <tt class="backtick">'/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 class="anchor" id="line-43"></span><span class="anchor" id="line-44"></span><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" 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 class="anchor" id="line-45"></span><span class="anchor" id="line-46"></span></li></ul><p class="line874" />Now the installation is finished. You will not have to repeat this step unless you upgrade moin. <span class="anchor" id="line-47"></span><span class="anchor" id="line-48"></span><p class="line867" />
493
 
<h2 id="head-7cf05b3d73a21fa16eabfdced354c3e079182014">Optional Installs</h2>
494
 
<span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><p class="line867" />
495
 
<h3 id="head-223faa3a0e587eb269f79e3faf05d3851d778e8d">RSS</h3>
496
 
<span class="anchor" id="line-51"></span><span class="anchor" id="line-52"></span><p class="line862" />If you want your wiki to support RSS and Mozilla Firefox Live Bookmarks features, you have to install PyXML. Get PyXML from <a class="http" href="http://sourceforge.net/projects/pyxml/">http://sourceforge.net/projects/pyxml/</a> and install according to the instructions. <span class="anchor" id="line-53"></span>
497
 
<h1 id="head-0cd30234950a8438af556cb7a93ef4dd346358a3">Creating a wiki</h1>
498
 
<span class="anchor" id="line-54"></span><span class="anchor" id="line-55"></span><p class="line874" />After you have installed the software, you need to create a wiki. You may create several wikis if you need. <span class="anchor" id="line-56"></span><span class="anchor" id="line-57"></span><p class="line867" />
499
 
<h2 id="head-df71f35b5f6ca32f75dd1e1d9c71a7113906c308">Copying a template wiki</h2>
500
 
<span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span><p class="line862" />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 class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="&lt;!&gt;" height="15" src="wiki/htdocs/modern/img/attention.png" title="&lt;!&gt;" 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 class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span></li></ul><p class="line874" />The following instructions will create a wiki called "mywiki". You can choose any name you like, except the reserved name "wiki". <span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><p class="line874" />Do these commands: <span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><pre>cd /usr/local/share/moin
501
 
<span class="anchor" id="line-68"></span>mkdir mywiki
502
 
<span class="anchor" id="line-69"></span>cp -r data mywiki
503
 
<span class="anchor" id="line-70"></span>cp -r underlay mywiki
504
 
<span class="anchor" id="line-71"></span>cp server/moin.cgi mywiki
505
 
<span class="anchor" id="line-72"></span>cp config/wikiconfig.py mywiki
506
 
<span class="anchor" id="line-73"></span></pre><span class="anchor" id="line-74"></span><span class="anchor" id="line-75"></span><p class="line867" />
507
 
<h2 id="head-49456651956c5f3bbba97c6917e54be2420fbf14">Setting Permissions</h2>
508
 
<span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span><p class="line874" />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 class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span><pre>chown -R www:www mywiki
509
 
<span class="anchor" id="line-80"></span>chmod -R ug+rwX mywiki
510
 
<span class="anchor" id="line-81"></span>chmod -R o-rwx mywiki
511
 
<span class="anchor" id="line-82"></span></pre><span class="anchor" id="line-83"></span><span class="anchor" id="line-84"></span><p class="line867" />
512
 
<h2 id="head-31a82db9b85a63663e1b46abf203b3c0abdb5fad">Configure Apache</h2>
513
 
<span class="anchor" id="line-85"></span><span class="anchor" id="line-86"></span><p class="line874" />We'll use the pico editor: <span class="anchor" id="line-87"></span><span class="anchor" id="line-88"></span><pre>pico /etc/httpd/httpd.conf
514
 
<span class="anchor" id="line-89"></span></pre><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line874" />Go to the end of the Aliases section and edit like the example below: <span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><pre>    Alias /wiki/ "/usr/local/share/moin/htdocs/"      
515
 
<span class="anchor" id="line-94"></span>    ScriptAlias /mywiki "/usr/local/share/moin/mywiki/moin.cgi"       
516
 
<span class="anchor" id="line-95"></span></pre><span class="anchor" id="line-96"></span><p class="line874" />Use Control+O to save the file and Control+X to exit pico. <span class="anchor" id="line-97"></span><span class="anchor" id="line-98"></span><p class="line874" />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 class="anchor" id="line-99"></span><span class="anchor" id="line-100"></span><pre>apachectl graceful
517
 
<span class="anchor" id="line-101"></span>... /usr/sbin/apachectl graceful: httpd gracefully restarted
518
 
<span class="anchor" id="line-102"></span></pre><span class="anchor" id="line-103"></span><span class="anchor" id="line-104"></span><span class="anchor" id="line-105"></span><p class="line874" />Instance creation finished - exit from the shell with the root privileges - working as root is dangerous. <span class="anchor" id="line-106"></span><span class="anchor" id="line-107"></span><pre>exit
519
 
<span class="anchor" id="line-108"></span></pre><span class="anchor" id="line-109"></span><p class="line874" />Now you are running again safely. <span class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><span class="anchor" id="line-112"></span><p class="line867" />
520
 
<h2 id="head-eb585ff24f9cd4b445a74b848cd1c5ec2b10706a">Testing Your New Wiki</h2>
521
 
<span class="anchor" id="line-113"></span><span class="anchor" id="line-114"></span><p class="line862" />In a web-browser surf to the site: <a class="http" href="http://localhost/mywiki">http://localhost/mywiki</a> <span class="anchor" id="line-115"></span><span class="anchor" id="line-116"></span><p class="line862" />You should see the FrontPage of your new wiki. <span class="anchor" id="line-117"></span><span class="anchor" id="line-118"></span><p class="line862" />Now run the unit tests, to make sure everything is fine. Go to this address: <a class="http" href="http://localhost/mywiki?action=test">http://localhost/mywiki?action=test</a> <span class="anchor" id="line-119"></span><span class="anchor" id="line-120"></span><p class="line862" />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="http" href="http://moinmoin.wikiwikiweb.de/MoinMoinBugs">MoinMoinBugs</a>. <span class="anchor" id="line-121"></span><span class="anchor" id="line-122"></span><p class="line867" />
522
 
<h2 id="head-14a0f4b701dc07823ca965841351a2bd3d021b8e">Configuring Your wiki</h2>
523
 
<span class="anchor" id="line-123"></span><span class="anchor" id="line-124"></span><p class="line862" />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 class="anchor" id="line-125"></span><span class="anchor" id="line-126"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="(!)" height="15" src="wiki/htdocs/modern/img/idea.png" title="(!)" 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 class="anchor" id="line-127"></span><span class="anchor" id="line-128"></span></li></ul><p class="line862" />For more help on configuration, see <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a>. <span class="anchor" id="line-129"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/ApacheOnMacOsx"></span></div> <span class="anchor" id="line-69"></span><hr class="hr1" /><p class="line874" /> <span class="anchor" id="line-70"></span><span class="anchor" id="win32apache-install"></span> <span class="anchor" id="line-71"></span>
 
590
<div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.top"></span>
 
591
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-9"></span><p class="line874">These instructions will walk you through, step by step, setting up Moin on Mac OS X <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-11"></span><p class="line867"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li><ol><li>
 
592
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.SystemRequirements.26Preparation">System Requirements &amp; Preparation</a></li><li>
 
593
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Installation">Installation</a><ol><li>
 
594
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>
 
595
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuration">Configuration</a><ol><li>
 
596
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.CreatingaWikiInstance">Creating a Wiki Instance</a></li><li>
 
597
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.ConfiguringApachehttpd.conf">Configuring Apache httpd.conf</a></li><li>
 
598
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuringmoin.cgi">Configuring moin.cgi</a></li><li>
 
599
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuringwikiconfig.py">Configuring wikiconfig.py</a></li><li>
 
600
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.SettingPermissions">Setting Permissions</a></li></ol></li><li>
 
601
<a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.TestingYourNewWiki">Testing Your New Wiki</a></li></ol></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-13"></span><ul><li style="list-style-type:none"><div><table><tbody><tr>  <td style="text-align: center; ; background-color: #ffffcc"><p class="line862"> Apple's latest operating system, 10.5 Leopard, packs enough under-hood changes that, rather than a bunch of if/then instructions, going forward this page will be updated only for Leopard.  If you have an older system (Tiger or Panther) you can click 'info' and view revision 45 for hints for those operating systems. </td>
 
602
</tr>
 
603
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-15"></span></li></ul><p class="line867">
 
604
<h2 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.SystemRequirements.26Preparation">System Requirements &amp; Preparation</h2>
 
605
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-16"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-17"></span><p class="line874">MacOS 10.5 Leopard includes the latest version of Python, version 2.5.1. (Older versions 10.4-Tiger and 10.3-Panther include the minimum required versions of Python to run Moin without updating, 2.3.5 and 2.3 respectively). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-18"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-19"></span><p class="line867">MoinMoin installation requires the use of the Terminal and assumes you have a basic familiarity with commands and syntax.  When you read commandline mentioned below, assume that you will enter these commands using the Terminal.app (located in /Applications/Utilities/Terminal.app). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-20"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-21"></span><p class="line862">Make sure Apache is started ('Apple' menu &gt; 'System Preferences...' &gt; 'Sharing' panel &gt; and check "Personal Web Sharing") <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-23"></span><p class="line867"><hr /><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-25"></span><p class="line867">
 
606
<h2 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.Installation">Installation</h2>
 
607
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-27"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-28"></span><p class="line867">
 
608
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.InstallingMoinMoin">Installing MoinMoin</h3>
 
609
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-29"></span><ol type="1"><li><p class="line891"><strong>Download MoinMoin</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-30"></span><ul><li><p class="line862">The most current version is here: <a class="interwiki" href="http://moinmo.in/MoinMoinDownload" title="MoinMoin">MoinMoinDownload</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-31"></span></li></ul></li><li><p class="line891"><strong>Expand the archive</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-32"></span><ul><li><p class="line862">Double-click to expand the <tt>moin-X.X.tar.gz</tt> archive.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-33"></span></li><li><p class="line862">You should then have a folder such as <tt>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. Optionally, you may want to move the expanded <tt>moin-X.X</tt> folder to a location more convenient to work from, like into a <tt>temp</tt> folder the root of your hard drive. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-34"></span></li></ul></li><li><p class="line891"><strong>Run Setup.py from the commandline</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-35"></span><ul><li><p class="line862">Open Terminal.app and enter the commands: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-38"></span><pre>sudo -s
 
610
password:</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-39"></span></li><li><p class="line862">Now you have root privileges in this shell (note: the prompt will change from a $ to a #). To install, type: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-40"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-41"></span><pre>cd /temp/moin-1.6</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-42"></span></li><li><p class="line891"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" width="15" /> <strong>Important: </strong>Now you have to decide where you want to install your Moin wiki installation; this will be your wiki root folder. Unix traditionalists will install this into <tt>/usr/local</tt> because of long standing unix conventions.  However, on Mac, this and other unix folders are typically hidden from the Finder. So, you may want to install outside this folder where you can more easily manage the files (such as drag-copy backups, editing config files using TextEdit.app, etc).  In the examples below, Moin is installed in a folder on the root of your hard drive named <tt>/moinwiki</tt>. If you want to follow unix conventions, simply substitute <tt>/usr/local</tt> for <tt>/moinwiki</tt> in all the examples below. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-43"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-44"></span><pre>python setup.py install --install-data='/moinwiki'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-45"></span></li><li><p class="line862">The <tt>--install-data='/moinwiki'</tt> argument tells the setup script where to put the data.  In this case, it will create a folder on the root of your hard drive called 'moinwiki'. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-46"></span></li><li><p class="line891"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" width="15" /> <strong>Note:</strong> 'moinwiki' may seem like an odd name, but there are a number 'moin' folders created, so I use 'moinwiki' to distinguish this folder from the others.  You can of course name it anything you like. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-47"></span></li><li><p class="line891"><img alt="&lt;!&gt;" height="15" src="http://static.moinmo.in/moin_static170/modern/img/attention.png" title="&lt;!&gt;" width="15" /> <strong>Security warning:</strong> Your wiki should not be in the "Sites" folder of your home folder, or in the /Library/!WebServer/Documents (Apache root) folder. Do not put your wiki folder where the web server can access it! <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-48"></span></li></ul></li><li><p class="line891"><strong>Add yourself access privileges for moinwiki</strong>  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-49"></span></li><li style="list-style-type:none"><p class="line862">Apple tightened security in 10.5 Leopard. We want to add our username to the <tt>moinwiki</tt> folder so that it's easier to work with.   <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-50"></span><ol type="i"><li>right-click (control-click) on the moinwiki folder, and select "Get Info...". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-51"></span></li><li>click the lock icon in the lower-right corner, enter your password to unlock. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-52"></span></li><li>click the + icon to add a new user, from the dialog select your username. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-53"></span></li><li><p class="line862">change your privileges to "Read &amp; Write" <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-54"></span></li><li>click the gear icon and select "Apply to enclosed items". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-55"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-57"></span></li></ol></li></ol><p class="line874">The installation portion is now finished. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-58"></span><hr /><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-60"></span><p class="line867">
 
611
<h2 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuration">Configuration</h2>
 
612
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-64"></span><p class="line862">You are now ready to create a wiki instance! The following instructions will create a wiki called "mywiki". 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 MoinMoin for loading standard images and style sheets. Although this can be changed later, the name you choose for <tt>mywiki</tt> will become part of the url used to access your site, e.g. <tt>http://server.myorganization.org/mywiki/FrontPage</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-67"></span><p class="line867">
 
613
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.CreatingaWikiInstance">Creating a Wiki Instance</h3>
 
614
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-68"></span><p class="line874">We now want to create our own wiki instance and copy in a default set of templates and files. Do these commands: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-70"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-72"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-74"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-76"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-77"></span><pre>cd /moinwiki/share/moin
 
615
mkdir mywiki
 
616
cp -r data mywiki
 
617
cp -r underlay mywiki
 
618
cp server/moin.cgi mywiki
 
619
cp config/wikiconfig.py mywiki</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-78"></span><p class="line862">You can repeat these steps for creating multiple instances, run these same commands again, substituting <tt>mywiki2</tt> for <tt>mywiki</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-79"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-81"></span><p class="line867">
 
620
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.ConfiguringApachehttpd.conf">Configuring Apache httpd.conf</h3>
 
621
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-83"></span><p class="line874">Apple upgraded Apache to 2.2 in Leopard, which (among other things) brings tighter security controls than previous versions.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-84"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-85"></span><ol type="1"><li><p class="line891"><strong>Add yourself access privileges for apache2</strong> <em>(alternatively, if you're comfortable with commandline (Terminal.app), you can bypass these steps and use <tt>sudo</tt> and <tt>pico</tt> instead)</em> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-86"></span><ol type="i"><li><p class="line862">From the Finder, under the 'Go' menu, select "Go to folder..." and type <tt>/etc</tt>.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-87"></span></li><li>right-click (control-click) on the apache2 folder, and select "Get Info...". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-88"></span></li><li>click the lock icon in the lower-right corner, enter your password to unlock. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-89"></span></li><li>click the + icon to add a new user, from the dialog select your username. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-90"></span></li><li><p class="line862">change your privileges to "Read &amp; Write" <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-91"></span></li><li>click the gear icon and select "Apply to enclosed items". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-92"></span></li></ol></li><li><p class="line891"><strong>Edit Apache's configuration file, httpd.conf</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-93"></span><ol type="i"><li><p class="line862">From the Finder, under the 'Go' menu, select "Go to folder..." and type <tt>/etc/Apache2</tt>.  Drag the <em>httpd.conf</em> file onto TextEdit.app. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-94"></span></li><li><p class="line862">Go to the end of the Aliases section and edit like the example below: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-96"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-97"></span><pre>    Alias /moin_static160/   "/moinwiki/share/moin/htdocs/"
 
622
    ScriptAlias /mywiki      "/moinwiki/share/moin/mywiki/moin.cgi"</pre><p class="line862"> Add the following to allow Apache to access your <tt>moinwiki</tt> directory (see <a class="http" href="http://httpd.apache.org/docs/2.2/mod/core.html#options">http://httpd.apache.org/docs/2.2/mod/core.html#options</a> for more help): <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-102"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-104"></span><pre>&lt;Directory "/moinwiki"&gt;
 
623
    Options Indexes FollowSymLinks MultiViews
 
624
    AllowOverride None
 
625
    Order allow,deny
 
626
    Allow from all
 
627
&lt;/Directory&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-105"></span></li><li>Save changes <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-106"></span></li><li>Restart Apache - <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-107"></span><ul><li>open System Preferences, go to the Sharing page, select "Personal Web Sharing" and click "Stop" then "Start". <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-108"></span></li><li><p class="line862">Alternatively, from Terminal.app, type <tt>apachectl&nbsp;graceful</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-110"></span></li></ul></li></ol></li></ol><p class="line867">
 
628
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuringmoin.cgi">Configuring moin.cgi</h3>
 
629
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-111"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-112"></span><p class="line862">The <em>moin.cgi</em> file essentially tells Apache to run all the moin wiki pages through the python interpreter.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-113"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-114"></span><ol type="1"><li><p class="line862">Edit the moin.cgi file at the following path <tt>/moinwiki/share/moin/mywiki/moin.cgi</tt> (click-drag the file onto TextEdit.app). Change the line that points to your wikiconfig.py file, like in the example below. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-115"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-116"></span><pre>sys.path.insert(0, '/moinwiki/share/moin/mywiki/wikiconfig.py')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-117"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-118"></span></li><dt>What to do if you get an "Internal Server Error"</dt><dd>This most likely means that the pathname above is not correct. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-119"></span></dd><dt></dt><dd><p class="line862">You can test your pathname by opening Terminal.app and pasting in the above line without the shebang <tt>#!</tt> statement (using the above example, <tt>/Library/Frameworks/Python.framework/Versions/2.5/bin/Python</tt>. If the path is correct, you should see output indicating your Python version as well as sample commands such as "help", "copyright", "credits", etc. If you get the error "Bad executable (or shared library)" or "No such file or directory" then the path is likely wrong, and you will need to correct.  I've also noticed that it helps to point directly at the "python" executable, rather than the alias or symlinks found in the upper directories. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-121"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-122"></span></dd></ol><p class="line867">
 
630
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuringwikiconfig.py">Configuring wikiconfig.py</h3>
 
631
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-123"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-124"></span><p class="line862">Open <tt>wikiconfig.py</tt> (click-drag the file onto TextEdit.app) and read the comments. 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.  <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-126"></span><ul><li style="list-style-type:none"><p class="line891"><img alt="(!)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/idea.png" title="(!)" 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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-127"></span></li></ul><p class="line862">Edit <tt>/moinwiki/share/moin/mywiki/wikiconfig.py</tt> and change the <tt>sitename</tt> to the name of your wiki: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-129"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-131"></span><pre>    sitename = 'My Mac Wiki'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-132"></span><p class="line862">Additionally, set <tt>data_dir</tt> and <tt>data_underlay_dir</tt> to the absolute paths of the particular directories. You can use relative paths for the directories, but note that they are relative to the CGI script, not the configuration file! Better to <strong>use absolute paths</strong>, and save yourself some headaches: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-133"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-134"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-135"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-136"></span><pre>    data_dir = r'/moinwiki/share/moin/mywiki/data'
 
632
    data_underlay_dir = r'/moinwiki/share/moin/mywiki/underlay'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-137"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-138"></span><p class="line862">Uncomment the <tt>url_prefix_static</tt> line: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-139"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-140"></span><pre>    url_prefix_static = '/moin_static160'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-141"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-142"></span><p class="line862">For a public installation, you'll normally want to forbid some of the more dangerous actions. Add a line like this to <tt>wikiconfig.py</tt>: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-143"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-144"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-146"></span><pre>    actions_excluded = ['AttachFile', 'DeletePage', 'RenamePage', ]</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-147"></span><p class="line862">Additional configuration details can be found in <a href="http://master17.moinmo.in/HelpOnConfiguration">HelpOnConfiguration</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-148"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-149"></span><p class="line867">
 
633
<h3 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.SettingPermissions">Setting Permissions</h3>
 
634
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-150"></span><p class="line862">You have to make the web server the owner of the files in your wiki. Navigate to <tt>/moinwiki/share/moin/</tt> and run the following commands: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-151"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-152"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-153"></span><pre>chown -R www:www mywiki
 
635
chmod -R 744 mywiki</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-154"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-155"></span><p class="line867"><hr /><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-156"></span>
 
636
<h2 id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.TestingYourNewWiki">Testing Your New Wiki</h2>
 
637
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-157"></span><p class="line862">In a web-browser surf to the site: <a class="http" href="http://localhost/mywiki">http://localhost/mywiki</a> You should see the FrontPage of your new wiki. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-158"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-159"></span><p class="line862">Now run the unit tests, to make sure everything is fine. Go to this address: <a class="http" href="http://localhost/mywiki?action=test">http://localhost/mywiki?action=test</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.line-160"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.bottom"></span></div> <span class="anchor" id="line-69"></span><hr class="hr1" /><p class="line874"> <span class="anchor" id="line-70"></span><span class="anchor" id="win32apache-install"></span> <span class="anchor" id="line-71"></span>
524
638
<h1>Windows Installation using Apache</h1>
525
 
<div dir="ltr" id="Include_HelpOnInstalling/ApacheOnWin32" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/ApacheOnWin32"></span>
526
 
<span class="anchor" id="line-8"></span><p class="line867" /><strong>Index</strong> <span class="anchor" id="line-9"></span><div class="table-of-contents"><p class="table-of-contents-heading" />Contents<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></div> <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line867" />
527
 
<h2 id="head-3c727e631e2668b26b0f23f76dfaca64e810648e">Requirements</h2>
528
 
<span class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line862" />Before you install Moin<tt class="backtick"></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 class="backtick"></tt>Moin.  <span class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><p class="line874" />Downloading and installing all of the required components will require almost 100 MB of disk space - shouldn't be a problem nowadays, right? <span class="anchor" id="line-16"></span><span class="anchor" id="line-17"></span><p class="line862" />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 class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span><div><table><tbody><tr style="background-color: #EEDDAA">  <td><p class="line862" />Reference</td>
529
 
  <td><p class="line862" />Product</td>
530
 
  <td><p class="line862" />Installation Default or Typical Name</td>
531
 
</tr>
532
 
<tr>  <td><span class="anchor" id="line-20"></span><p class="line891" /><strong>C:\Apache</strong></td>
533
 
  <td><p class="line862" /> Apache</td>
534
 
  <td><p class="line862" />C:\Program Files\Apache Group\Apache2</td>
535
 
</tr>
536
 
<tr>  <td><span class="anchor" id="line-21"></span><p class="line891" /><strong>C:\Python</strong></td>
537
 
  <td><p class="line862" />Python</td>
538
 
  <td><p class="line862" />C:\Python22</td>
539
 
</tr>
540
 
<tr>  <td><span class="anchor" id="line-22"></span><p class="line891" /><strong>C:\Moin</strong></td>
541
 
  <td><p class="line862" />wiki instances</td>
542
 
  <td><p class="line862" />C:\My Documents\Moin</td>
543
 
</tr>
544
 
</tbody></table></div><span class="anchor" id="line-23"></span><span class="anchor" id="line-24"></span><p class="line874" />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 class="anchor" id="line-25"></span><span class="anchor" id="line-26"></span><p class="line867" />
545
 
<h2 id="head-18c7f9f6c7f20cad8a2598f80aba6a6b36bae585">Preparation</h2>
546
 
<span class="anchor" id="line-27"></span><span class="anchor" id="line-28"></span><p class="line867" />
547
 
<h3 id="head-ce3f1899eb42247cc89c79893ca80eb5da56d2d4">MSI Installer</h3>
548
 
<span class="anchor" id="line-29"></span><p class="line862" />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="http" 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 class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><p class="line867" />
549
 
<h3 id="head-b1287e95efcad1b36cc2c15f825e1de198ebfcf6">Installing Apache</h3>
550
 
<span class="anchor" id="line-32"></span><span class="anchor" id="line-33"></span><p class="line862" />To obtain the latest version of Apache, go to <a class="http" 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 class="anchor" id="line-34"></span><span class="anchor" id="line-35"></span><p class="line867" /><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 class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span><p class="line874" />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 class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line862" />Do not let the above discourage you from installing Moin<tt class="backtick"></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 class="anchor" id="line-40"></span><ul><li>Regularly review and apply security patches for your installed software. <span class="anchor" id="line-41"></span></li><li>Understand the ramifications of any changes you make to the Apache config files. <span class="anchor" id="line-42"></span></li><li>Regularly review the Apache logs for suspicious activity. <span class="anchor" id="line-43"></span></li><li>Regularly take backups of your data. <span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span></li></ul><p class="line867" />
551
 
<h3 id="head-55b68c00864e2a0be48f87115a45f6a17a76bcc0">Installing Python</h3>
552
 
<span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><p class="line862" />There are currently two different distributions of Python available for Windows. The normal Python distribution is available from <a class="http" href="http://www.python.org">http://www.python.org</a>. This is distributed as a windows executable (.exe) file. <span class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><p class="line862" />An alternative distribution called <strong>Active<tt class="backtick"></tt>Python</strong> is available from <a class="http" 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 class="backtick"></tt>Python is available for free; an email address is requested (but not required) before downloading. <span class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><p class="line862" />Moin<tt class="backtick"></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 class="backtick"></tt>State.  Be sure your Python installation is correct before proceeding. <span class="anchor" id="line-52"></span><span class="anchor" id="line-53"></span><p class="line867" />
553
 
<h2 id="head-c76f9a659995f587c02878baf3877ab5bd08a5bd">Installing MoinMoin</h2>
554
 
<span class="anchor" id="line-54"></span><p class="line862" />Download the current version of Moin<tt class="backtick"></tt>Moin from <a class="http" href="http://moinmoin.wikiwikiweb.de/">http://moinmoin.wikiwikiweb.de/</a> into <tt class="backtick">C:\TEMP</tt> or an alternative location. To extract the <em>.tar.gz</em>-format archive, you may use Win<tt class="backtick"></tt>Zip. <span class="anchor" id="line-55"></span><span class="anchor" id="line-56"></span><p class="line862" />You should then have a folder such as <tt class="backtick">C:\TEMP\moin-x.x</tt> where "x.x" is the current release number. This folder will contain a <tt class="backtick">setup.py</tt> file in addition to several other files and subfolders. <span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span><p class="line874" />Open an MS-DOS or console window and enter the commands: <span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><pre>C:
555
 
<span class="anchor" id="line-61"></span>cd \TEMP\moin-x.x
556
 
<span class="anchor" id="line-62"></span>C:\Python\python setup.py install --record=install.log
557
 
<span class="anchor" id="line-63"></span></pre><span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><p class="line862" />The above commands will add Moin<tt class="backtick"></tt>Moin to your <tt class="backtick">C:\Python</tt> installation and create an <tt class="backtick">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 class="backtick">C:\Python</tt>. You should find a <tt class="backtick">C:\Python\share\moin</tt> folder. With Python 2.3 and later you will also find a <tt class="backtick">C:\Python\Lib\site-packages\MoinMoin</tt> folder. The <tt class="backtick">MoinMoin</tt> folder contains many Python scripts and several subfolders. <span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><p class="line874" />You are now ready to create a wiki instance. <span class="anchor" id="line-68"></span><span class="anchor" id="line-69"></span><p class="line867" />
558
 
<h2 id="head-ba9ed0d8dd27b7bc62472aa0d24e8102dd103deb">Creating a Wiki Instance</h2>
559
 
<span class="anchor" id="line-70"></span><p class="line862" />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 class="backtick">C:\Python</tt> folder so that you can later upgrade Python or Moin<tt class="backtick"></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 class="backtick">C:\Apache</tt> folder. The default personal folder under many Windows versions is called <tt class="backtick">C:\My&nbsp;Documents</tt>.   <span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span><p class="line862" />Choose a location appropriate for you; the following instructions assume you will be creating one or more wiki instances in <tt class="backtick">C:\Moin\</tt> and the first wiki instance will be named <tt class="backtick">mywiki</tt>. <span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span><p class="line862" />You may replace the name <tt class="backtick">mywiki</tt> with almost any name you wish, but do not use <tt class="backtick">wiki</tt> because that is used by Moin<tt class="backtick"></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 class="backtick">mywiki</tt> will become part of the url used to access your site, e.g. <tt class="backtick">http://myorganization.org/mywiki/FrontPage</tt>. <span class="anchor" id="line-75"></span><span class="anchor" id="line-76"></span><p class="line862" />Start an MS-DOS or console window and enter the commands below. This will create a clone of the Moin<tt class="backtick"></tt>Moin wiki in the mywiki folder.  <span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><p class="line867" /><span class="anchor" id="line-79"></span><pre>cd C:\ 
560
 
<span class="anchor" id="line-80"></span>md Moin
561
 
<span class="anchor" id="line-81"></span>md Moin\mywiki
562
 
<span class="anchor" id="line-82"></span>md Moin\mywiki\data
563
 
<span class="anchor" id="line-83"></span>md Moin\mywiki\underlay
564
 
<span class="anchor" id="line-84"></span>cd \Python\share\moin
565
 
<span class="anchor" id="line-85"></span>xcopy data        C:\Moin\mywiki\data /E
566
 
<span class="anchor" id="line-86"></span>xcopy underlay    C:\Moin\mywiki\underlay /E
567
 
<span class="anchor" id="line-87"></span>copy  config\*.* C:\Moin\mywiki\*.*
568
 
<span class="anchor" id="line-88"></span>copy  server\*.* C:\Moin\mywiki\*.*
569
 
<span class="anchor" id="line-89"></span></pre><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line874" />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 class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><p class="line862" />Edit <tt class="backtick">C:\Moin\mywiki\wikiconfig.py</tt> and at least change <tt class="backtick">sitename</tt> to the name of your wiki: <span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><pre>    sitename = 'My Wiki'
570
 
<span class="anchor" id="line-96"></span></pre><span class="anchor" id="line-97"></span><span class="anchor" id="line-98"></span><p class="line862" />Additionally, set <tt class="backtick">data_dir</tt> and <tt class="backtick">data_underlay_dir</tt> to the absolute paths of the particular directories. Like here: <span class="anchor" id="line-99"></span><span class="anchor" id="line-100"></span><pre>    data_dir = r'C:\Moin\mywiki\data'
571
 
<span class="anchor" id="line-101"></span>    data_underlay_dir = r'C:\Moin\mywiki\underlay'
572
 
<span class="anchor" id="line-102"></span></pre><span class="anchor" id="line-103"></span><span class="anchor" id="line-104"></span><p class="line862" />For a personal or intranet installation, you'll normally also add this line to <tt class="backtick">wikiconfig.py</tt>: <span class="anchor" id="line-105"></span><span class="anchor" id="line-106"></span><pre>    allowed_actions = ['DeletePage', 'AttachFile', 'RenamePage', ]
573
 
<span class="anchor" id="line-107"></span></pre><span class="anchor" id="line-108"></span><span class="anchor" id="line-109"></span><p class="line862" />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 class="backtick">farmconfig.py</tt> file from the <tt class="backtick">C:\Moin\mywiki</tt> directory, or else <tt class="backtick">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 class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><p class="line862" />Additional configuration details can be found in <a href="http://moinmaster.wikiwikiweb.de/HelpOnConfiguration">HelpOnConfiguration</a>. <span class="anchor" id="line-112"></span><span class="anchor" id="line-113"></span><p class="line867" />
574
 
<h2 id="head-42c812a9d38d3af1de6c09ed952ac1858c5221b8">Integrating MoinMoin into Apache</h2>
575
 
<span class="anchor" id="line-114"></span><p class="line862" />Use your editor to edit the file <tt class="backtick">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 class="backtick">moin.cgi</tt> file is an executable script that will be interpreted by a program to be loaded from <tt class="backtick">C:/Python/python</tt>. <span class="anchor" id="line-115"></span><pre>
576
 
<span class="anchor" id="line-116"></span>#! C:/Python/python
577
 
<span class="anchor" id="line-117"></span></pre><span class="anchor" id="line-118"></span><span class="anchor" id="line-119"></span><p class="line862" />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 class="anchor" id="line-120"></span><span class="anchor" id="line-121"></span><span class="anchor" id="line-122"></span><span class="anchor" id="line-123"></span><div class="codearea" dir="ltr" lang="en">
578
 
<script type="text/javascript">
579
 
function isnumbered(obj) {
580
 
  return obj.childNodes.length && obj.firstChild.childNodes.length && obj.firstChild.firstChild.className == 'LineNumber';
581
 
}
582
 
function nformat(num,chrs,add) {
583
 
  var nlen = Math.max(0,chrs-(''+num).length), res = '';
584
 
  while (nlen>0) { res += ' '; nlen-- }
585
 
  return res+num+add;
586
 
}
587
 
function addnumber(did, nstart, nstep) {
588
 
  var c = document.getElementById(did), l = c.firstChild, n = 1;
589
 
  if (!isnumbered(c))
590
 
    if (typeof nstart == 'undefined') nstart = 1;
591
 
    if (typeof nstep  == 'undefined') nstep = 1;
592
 
    n = nstart;
593
 
    while (l != null) {
594
 
      if (l.tagName == 'SPAN') {
595
 
        var s = document.createElement('SPAN');
596
 
        s.className = 'LineNumber'
597
 
        s.appendChild(document.createTextNode(nformat(n,4,' ')));
598
 
        n += nstep;
599
 
        if (l.childNodes.length)
600
 
          l.insertBefore(s, l.firstChild)
601
 
        else
602
 
          l.appendChild(s)
603
 
      }
604
 
      l = l.nextSibling;
605
 
    }
606
 
  return false;
607
 
}
608
 
function remnumber(did) {
609
 
  var c = document.getElementById(did), l = c.firstChild;
610
 
  if (isnumbered(c))
611
 
    while (l != null) {
612
 
      if (l.tagName == 'SPAN' && l.firstChild.className == 'LineNumber') l.removeChild(l.firstChild);
613
 
      l = l.nextSibling;
614
 
    }
615
 
  return false;
616
 
}
617
 
function togglenumber(did, nstart, nstep) {
618
 
  var c = document.getElementById(did);
619
 
  if (isnumbered(c)) {
620
 
    remnumber(did);
621
 
  } else {
622
 
    addnumber(did,nstart,nstep);
623
 
  }
624
 
  return false;
625
 
}
626
 
</script>
627
 
 
628
 
<script type="text/javascript">
629
 
document.write('<a href="#" onclick="return togglenumber(\'CA-ae7207ce08c12f42f82f00c644b7aa0c244223a5_000\', 1, 1);" \
630
 
                class="codenumbers">Toggle line numbers<\/a>');
631
 
</script>
632
 
<pre dir="ltr" id="CA-ae7207ce08c12f42f82f00c644b7aa0c244223a5_000" lang="en"><span class="line"><span class="LineNumber">   1 </span><span class="ResWord">import</span> <span class="ID">sys</span></span>
633
 
<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>
634
 
</pre></div><span class="anchor" id="line-124"></span><span class="anchor" id="line-125"></span><p class="line874" />The next step is to tell Apache that is has more work to do. <span class="anchor" id="line-126"></span>Use your editor to append the following lines to <tt class="backtick">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 class="anchor" id="line-127"></span><span class="anchor" id="line-128"></span><pre>Alias       /wiki/     "C:/Python/share/moin/htdocs/"
635
 
<span class="anchor" id="line-129"></span>ScriptAlias /mywiki    "C:/Moin/mywiki/moin.cgi"
636
 
<span class="anchor" id="line-130"></span></pre><span class="anchor" id="line-131"></span><span class="anchor" id="line-132"></span><p class="line862" />The <strong>Alias</strong> lines for <tt class="backtick">wiki</tt> above instructs Apache to serve images, style sheets, etc. from the specified folders and subfolders. The <strong>Script<tt class="backtick"></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 class="backtick"></tt>Alias statement instructs Apache to execute scripts from the specified folder. See the Apache docs for a complete explanation. <span class="anchor" id="line-133"></span><span class="anchor" id="line-134"></span><p class="line862" />Test your changes by restarting your Apache server and try to access your newborn wiki with the URL <tt class="backtick">http://127.0.0.1/mywiki</tt>. You should see the Front<tt class="backtick"></tt>Page, try to edit and save it, and if that works, verify your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="line-135"></span><span class="anchor" id="line-136"></span><p class="line862" />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 class="backtick"></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 class="backtick"></tt>Moin <img alt=";)" height="15" src="wiki/htdocs/modern/img/smile4.png" title=";)" width="15" /> ), and rewrite the Front<tt class="backtick"></tt>Page to introduce your wiki topic.  <span class="anchor" id="line-137"></span><span class="anchor" id="line-138"></span><p class="line867" />
637
 
<h2 id="head-82ba5417401e5b5cb78836b4f23ef160fbc80630">Troubleshooting</h2>
638
 
<span class="anchor" id="line-139"></span><p class="line862" />The first place to look for clues when the unexpected happens is to try changing your url to: <tt class="backtick">http://127.0.0.1/mywiki?action=test</tt>. If Apache can find and execute the module <tt class="backtick">C:/Moin/mywiki/moin.cgi</tt>, a page of diagnostics titled <strong>Moin<tt class="backtick"></tt>Moin CGI Diagnosis</strong> will be displayed. Check the output for error messages. <span class="anchor" id="line-140"></span><span class="anchor" id="line-141"></span><p class="line862" />The second place to look for is <tt class="backtick">C:\Apache\logs\error.log</tt>. The following are common errors grouped by the message displayed by your browser. <span class="anchor" id="line-142"></span><span class="anchor" id="line-143"></span><p class="line867" />
639
 
<h3 id="head-01d84d7e6494dcee0bd2abfbb04f43f812c9bdd7">Internal Server Error</h3>
640
 
<span class="anchor" id="line-144"></span><span class="anchor" id="line-145"></span><p class="line862" />If the Apache log shows a message "The system cannot find the file specified." then a possibility is the shebang statement in <tt class="backtick">moin.cgi</tt> is incorrect. <span class="anchor" id="line-146"></span><span class="anchor" id="line-147"></span><p class="line862" />If the Apache log shows a different error message, then the Moin<tt class="backtick"></tt>Moin Python scripts may be abending. To determine the cause, you could try temporarily renaming <tt class="backtick">moin.cgi</tt> to <tt class="backtick">moin.py</tt>, loading <tt class="backtick">moin.py</tt> with the Python <strong>idle</strong> IDE and executing it to determine if there are any error messages. <span class="anchor" id="line-148"></span><span class="anchor" id="line-149"></span><p class="line867" />
641
 
<h3 id="head-7a4c0881ccb7242b9857811b27dc07ad836889d0">Not Found</h3>
642
 
<span class="anchor" id="line-150"></span><p class="line862" />If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/mywiki",  the <strong>Script<tt class="backtick"></tt>Alias</strong> statement in <tt class="backtick">httpd.conf</tt> may be incorrect. <span class="anchor" id="line-151"></span><span class="anchor" id="line-152"></span><p class="line867" />
643
 
<h3 id="head-d9b4f0491158f7280b4bf1693d990336527ebf4d">The Page Cannot be found</h3>
644
 
<span class="anchor" id="line-153"></span><p class="line862" />If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/????", you may have mistyped the url "<a class="http" href="http://127.0.0.1/mywiki">http://127.0.0.1/mywiki</a>" into your browser. <span class="anchor" id="line-154"></span><span class="anchor" id="line-155"></span><p class="line867" />
645
 
<h3 id="head-d47936fa3c21c07d857b27fdb811e5836635a100">FrontPage Loads Without Icons</h3>
646
 
<span class="anchor" id="line-156"></span><p class="line862" />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 class="backtick">httpd.conf</tt> may be incorrect. <span class="anchor" id="line-157"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/ApacheOnWin32"></span></div> <span class="anchor" id="line-72"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-73"></span><span class="anchor" id="win32iis-install"></span> <span class="anchor" id="line-74"></span>
 
639
<div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheOnWin32.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.top"></span>
 
640
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-8"></span><ul><li style="list-style-type:none"><p class="line891"><div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li><ol><li>
 
641
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.SystemRequirements.26Preparation">System Requirements &amp; Preparation</a></li><li>
 
642
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Installation">Installation</a><ol><li>
 
643
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingApache">Installing Apache</a></li><li>
 
644
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingPython">Installing Python</a></li><li>
 
645
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>
 
646
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Configuration">Configuration</a><ol><li>
 
647
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.CreatingaWikiInstance">Creating a Wiki Instance</a></li><li>
 
648
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Configuringwikiconfig.py">Configuring wikiconfig.py</a></li><li>
 
649
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Configuringmoin.cgi">Configuring moin.cgi</a></li><li>
 
650
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.ConfiguringApachehttpd.conf">Configuring Apache httpd.conf</a></li></ol></li><li>
 
651
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Troubleshooting">Troubleshooting</a></li><li>
 
652
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.NextSteps">Next Steps</a><ol><li>
 
653
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.AuthenticatingMoinMoinUsersAgainstaDomainController">Authenticating MoinMoin Users Against a Domain Controller</a></li><li>
 
654
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.SimpleWindowsMoinMoinBackup">Simple Windows MoinMoin Backup</a></li><li>
 
655
<a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.FastCGIwithWindows">FastCGI with Windows</a></li></ol></li></ol></li></ol></div> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-9"></span></li></ul><p class="line867">
 
656
<h2 id="HelpOnInstalling.2BAC8-ApacheOnWin32.SystemRequirements.26Preparation">System Requirements &amp; Preparation</h2>
 
657
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-10"></span><p class="line862">Before you install MoinMoin, 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 MoinMoin. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-11"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-12"></span><ul><li><p class="line891"><strong>Windows 2000, XP, or greater </strong>(including server variants, such as Windows 2000 Server). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-13"></span><ul><li><p class="line862">Earlier versions of Windows (such as Win98 or WinME) are <span class="u"><em>not</em></span> recommended due to their obsolete and poor-performing multiple-process handling. WinNT is obsolete and Microsoft has officially dropped support for it and should not be considered a safe server platform for the Internet. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-14"></span></li><li>Run Windows Update to ensure that you are running the latest service packs and security patches. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-15"></span></li><li>Apache doesn't require Windows Server (unlike IIS), so it's a great way to use an older desktop without using a Server license! Apache doesn't artificially limit the number of connections, unlike personal IIS for example. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-16"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-17"></span></li></ul></li></ul><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-18"></span><div><table><tbody><tr style="background-color: #eeddaa">  <td><p class="line862">Reference </td>
 
658
  <td><p class="line862">Product </td>
 
659
  <td><p class="line862">Installation Default or Typical Name </td>
 
660
</tr>
 
661
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-19"></span><p class="line891"><strong>C:\Apache</strong> </td>
 
662
  <td><p class="line862"> Apache </td>
 
663
  <td><p class="line862">C:\Program Files\Apache Group\Apache2 </td>
 
664
</tr>
 
665
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-20"></span><p class="line891"><strong>C:\Python</strong> </td>
 
666
  <td><p class="line862">Python </td>
 
667
  <td><p class="line862">C:\Python24 </td>
 
668
</tr>
 
669
<tr>  <td><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-21"></span><p class="line891"><strong>C:\Moin</strong> </td>
 
670
  <td><p class="line862">wiki instances </td>
 
671
  <td><p class="line862">C:\My Documents\Moin </td>
 
672
</tr>
 
673
</tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-22"></span><p class="line874">Downloading and installing all of the required components below will require almost 100 MB of disk space - shouldn't be a problem nowadays, right? <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-23"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-24"></span><p class="line867">
 
674
<h2 id="HelpOnInstalling.2BAC8-ApacheOnWin32.Installation">Installation</h2>
 
675
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-25"></span><p class="line867">
 
676
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingApache">Installing Apache</h3>
 
677
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-26"></span><ol type="1"><li><p class="line862">Download &amp; Install Apache 2.0.xx or greater <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-27"></span><ol type="i"><li><p class="line862">Apache2 was re-written with better support for non-unix systems, therefore the 2.0.xx series is <em>strongly</em> recommended for Windows users over Apache 1.3.xx. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-28"></span></li><li><p class="line862">Go to <a class="http" href="http://httpd.apache.org">http://httpd.apache.org</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-29"></span></li><li><p class="line862">download the <strong>Win32 Binary (MSI Installer)</strong> for the latest version of Apache 2. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-30"></span></li><li>Read the Apache documentation to determine the correct installation procedure for your situation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-31"></span></li><li>Test your Apache installation to make sure it runs correctly before proceeding (questions and problems with the Apache installation should be resolved through the resources provided by the Apache organization). <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-32"></span></li></ol></li></ol><p class="line867">
 
678
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingPython">Installing Python</h3>
 
679
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-33"></span><p class="line874">There are currently two different distributions of Python available for Windows. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-34"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-35"></span><ol type="1"><li><p class="line862">The normal Python distribution is available from <a class="http" href="http://www.python.org">http://www.python.org</a>. This is distributed as a windows executable (.exe) file. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-36"></span></li><li><p class="line862">An alternative distribution called <strong>ActivePython</strong> is available from <a class="http" 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, which may be useful <span class="u"><em>if</em></span> you also plan to develop in Python.  ActivePython is available for free; an email address is requested (but not required) before downloading. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-37"></span></li></ol><p class="line867">MoinMoin 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 ActiveState.  Be sure your Python installation is correct before proceeding. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-39"></span><p class="line867">
 
680
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingMoinMoin">Installing MoinMoin</h3>
 
681
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-40"></span><ol type="1"><li><p class="line891"><strong>Download MoinMoin</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-41"></span><ul><li><p class="line862">The most current version is here: <a class="interwiki" href="http://moinmo.in/MoinMoinDownload" title="MoinMoin">MoinMoinDownload</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-42"></span></li></ul></li><li><p class="line891"><strong>Expand the archive</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-43"></span><ul><li><p class="line891"><span class="u"><em>Note:</em></span> users of older versions of <a class="http" href="http://www.winzip.com">WinZip</a> report problem expanding .tar.gz files. Either upgrade or use the free <a class="http" href="http://7-zip.org/">7-Zip</a> utility. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-44"></span></li><li><p class="line862">Expand the archive into <tt>C:\TEMP</tt> or an alternative location. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-45"></span></li><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-46"></span></li></ul></li><li><p class="line891"><strong>Run Setup.py from the commandline</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-47"></span><ul><li><p class="line862">Open an DOS window (start &gt; Run... &gt; type <tt>cmd</tt>) and enter the commands:<br>
 
682
 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-48"></span></li></ul><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-52"></span><pre>C:
 
683
cd \TEMP\moin-x.x
 
684
C:\Python\python setup.py install --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-53"></span></li></ol><p class="line862">The above commands will add MoinMoin 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 can 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 and a <tt>C:\Python\Lib\site-packages\MoinMoin</tt> folder. The <tt>MoinMoin</tt> folder contains many Python scripts and several subfolders. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-55"></span><p class="line874">You are now ready to create a wiki instance. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-57"></span><p class="line867">
 
685
<h2 id="HelpOnInstalling.2BAC8-ApacheOnWin32.Configuration">Configuration</h2>
 
686
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-58"></span><p class="line862">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 MoinMoin 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. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-60"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-62"></span><p class="line862">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 class="backtick"></tt>Moin for loading standard images and style sheets. Although this can be changed later, the name you choose for <tt>mywiki</tt> will become part of the url used to access your site, e.g. <tt>http://server.myorganization.org/mywiki/FrontPage</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-64"></span><p class="line867">
 
687
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.CreatingaWikiInstance">Creating a Wiki Instance</h3>
 
688
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-65"></span><p class="line862">Start an DOS window and enter the commands below. This will create a clone of the MoinMoin wiki in the mywiki folder. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-67"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-68"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-70"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-72"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-74"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-76"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-78"></span><pre>cd C:\
 
689
md Moin
 
690
md Moin\mywiki
 
691
md Moin\mywiki\data
 
692
md Moin\mywiki\underlay
 
693
cd \Python\share\moin
 
694
xcopy data        C:\Moin\mywiki\data /E
 
695
xcopy underlay    C:\Moin\mywiki\underlay /E
 
696
copy  config\*.* C:\Moin\mywiki\*.*
 
697
copy  server\*.* C:\Moin\mywiki\*.*</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-79"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-81"></span><p class="line867">
 
698
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.Configuringwikiconfig.py">Configuring wikiconfig.py</h3>
 
699
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-82"></span><p class="line862">Edit <tt>C:\Moin\mywiki\wikiconfig.py</tt> and at least change <tt>sitename</tt> to the name of your wiki: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-83"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-84"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-86"></span><pre>    sitename = 'My Wiki'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-87"></span><p class="line862">Additionally, set <tt>data_dir</tt> and <tt>data_underlay_dir</tt> to the absolute paths of the particular directories. Like here: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-89"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-92"></span><pre>    data_dir = r'C:\Moin\mywiki\data'
 
700
    data_underlay_dir = r'C:\Moin\mywiki\underlay'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-93"></span><p class="line862">For a public installation, you'll normally want to forbid some of the more dangerous actions. Add a line like this to <tt>wikiconfig.py</tt>: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-94"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-95"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-96"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-97"></span><pre>    actions_excluded = ['AttachFile', 'DeletePage', 'RenamePage', ]</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-98"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-100"></span><p class="line862">Additional configuration details can be found in <a href="http://master17.moinmo.in/HelpOnConfiguration">HelpOnConfiguration</a>. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-102"></span><p class="line867">
 
701
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.Configuringmoin.cgi">Configuring moin.cgi</h3>
 
702
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-103"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-105"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-106"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-107"></span><pre> #! C:/Python/python</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-108"></span><p class="line867">
 
703
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.ConfiguringApachehttpd.conf">Configuring Apache httpd.conf</h3>
 
704
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-109"></span><p class="line862">The next step is to tell Apache that is has more work to do. 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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-110"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-111"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-113"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-114"></span><pre>Alias       /moin_static160/ "C:/Python/share/moin/htdocs/"
 
705
ScriptAlias /mywiki          "C:/Moin/mywiki/moin.cgi"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-115"></span><p class="line862">The <strong>Alias</strong> line above instructs Apache to serve images, style sheets, etc. from the specified folders and subfolders. The <strong>Script<tt class="backtick"></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 class="backtick"></tt>Alias statement instructs Apache to execute scripts from the specified folder. See the Apache docs for a complete explanation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-117"></span><p class="line862">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 class="backtick"></tt>Page, try to edit and save it, and if that works, verify your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-119"></span><p class="line862">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 class="backtick"></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 class="backtick"></tt>Moin <img alt=";-)" height="15" src="http://static.moinmo.in/moin_static170/modern/img/smile4.png" title=";-)" width="15" /> ), and rewrite the Front<tt class="backtick"></tt>Page to introduce your wiki topic. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-121"></span><p class="line867">
 
706
<h2 id="HelpOnInstalling.2BAC8-ApacheOnWin32.Troubleshooting">Troubleshooting</h2>
 
707
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-122"></span><p class="line862">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 class="backtick"></tt>Moin CGI Diagnosis</strong> will be displayed. Check the output for error messages. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-123"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-124"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-126"></span><ul><li><p class="line891"><strong>Internal Server Error</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-127"></span><ul><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-128"></span></li><li><p class="line862">If the Apache log shows a different error message, then the Moin<tt class="backtick"></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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-129"></span></li></ul></li><li><p class="line891"><strong>Not Found</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-130"></span><ul><li><p class="line862">If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/mywiki",  the <strong>Script<tt class="backtick"></tt>Alias</strong> statement in <tt>httpd.conf</tt> may be incorrect. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-131"></span></li></ul></li><li><p class="line891"><strong>The Page Cannot be found</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-132"></span><ul><li><p class="line862">If the Apache error log shows the message "File does not exist: C:/Apache/htdocs/????", you may have mistyped the url "<a class="http" href="http://127.0.0.1/mywiki">http://127.0.0.1/mywiki</a>" into your browser. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-133"></span></li></ul></li><li><p class="line891"><strong>FrontPage Loads Without Icons</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-134"></span><ul><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-135"></span></li></ul></li><li><p class="line862">If you did not install MoinMoin in the Python site-packages folder (i.e. only if you deviated from the above instructions), you will have to activate the lines which add a folder to the sys.path and enter your path to MoinMoin there:<br>
 
708
 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-136"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-137"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-138"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-139"></span><pre>import sys
 
709
sys.path.insert(0, r'C:\Moin\...')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-140"></span></li></ul><p class="line867">
 
710
<h2 id="HelpOnInstalling.2BAC8-ApacheOnWin32.NextSteps">Next Steps</h2>
 
711
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-141"></span><p class="line867">
 
712
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.AuthenticatingMoinMoinUsersAgainstaDomainController">Authenticating MoinMoin Users Against a Domain Controller</h3>
 
713
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-142"></span><ul><li style="list-style-type:none">Many organizations are setting up wiki's for documentation on their internal network.  As a result, many organizations require the security of authentication, which protects their content, as well as allowing people to work remotely on the wiki without anonymous eye's peeking at their site.  Domain authentication is convenient for both the administrator and the user, because it uses the same password the user would use for other network logins.  If this describes you, proceed to: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-143"></span></li><li style="list-style-type:none"><p class="line891"><a href="http://master17.moinmo.in/HelpOnInstalling/ApacheOnWin32withDomainAuthentication">../ApacheOnWin32withDomainAuthentication</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-144"></span></li></ul><p class="line867">
 
714
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.SimpleWindowsMoinMoinBackup">Simple Windows MoinMoin Backup</h3>
 
715
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-145"></span><ul><li style="list-style-type:none">Simple strategy for backing up your wiki: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-146"></span></li><li style="list-style-type:none"><p class="line891"><a href="http://master17.moinmo.in/HelpOnInstalling/Win32MoinEasyBackup">../Win32MoinEasyBackup</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-147"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-148"></span></li></ul><p class="line867">
 
716
<h3 id="HelpOnInstalling.2BAC8-ApacheOnWin32.FastCGIwithWindows">FastCGI with Windows</h3>
 
717
<span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-149"></span><ul><li style="list-style-type:none">Dramatically increase performance of your wiki with the FastCGI Apache module: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-150"></span></li><li style="list-style-type:none"><p class="line891"><a href="http://master17.moinmo.in/HelpOnInstalling/ApacheOnWin32withFastCgi">../ApacheOnWin32withFastCgi</a> <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.line-151"></span></li></ul><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.bottom"></span></div> <span class="anchor" id="line-72"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-73"></span><span class="anchor" id="win32iis-install"></span> <span class="anchor" id="line-74"></span>
647
718
<h1>Windows Installation using IIS</h1>
648
 
<div dir="ltr" id="Include_HelpOnInstalling/InternetInformationServer" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/InternetInformationServer"></span>
649
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line867" /><strong>Index</strong> <span class="anchor" id="line-10"></span><div class="table-of-contents"><p class="table-of-contents-heading" />Contents<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></div> <span class="anchor" id="line-11"></span><span class="anchor" id="line-12"></span><p class="line867" />
650
 
<h2 id="head-060b14babb0736cc50274d972342cb03248902b9">Requirements</h2>
651
 
<span class="anchor" id="line-13"></span><span class="anchor" id="line-14"></span><p class="line862" />Before you install <a class="interwiki" href="http://moinmaster.wikiwikiweb.de/MoinMoin" title="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 class="anchor" id="line-15"></span><span class="anchor" id="line-16"></span><p class="line874" />In the following description, we assume that you have installed or will install things to these locations: <span class="anchor" id="line-17"></span><ul><li>IIS to its default location <span class="anchor" id="line-18"></span></li><li><p class="line891" /><tt class="backtick">C:\Python</tt> - the Python interpreter <span class="anchor" id="line-19"></span></li><li><p class="line891" /><tt class="backtick">C:\Moin</tt> - Moin<tt class="backtick"></tt>Moin itself <span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span></li></ul><p class="line874" />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 class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><p class="line874" />This installation procedure was tested with IIS 5.1 for Windows running on Windows XP SP2, using Python 2.4. <span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line867" />
652
 
<h2 id="head-5ba445062f460e5652dc22727c85420aeece6353">Preparation</h2>
653
 
<span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line867" />
654
 
<h3 id="head-4f6e8cac8cfeabe2476189c3adfc5c9782ab423b">Installing IIS</h3>
655
 
<span class="anchor" id="line-28"></span><span class="anchor" id="line-29"></span><p class="line862" />From Microsoft: (<a class="http" href="http://www.microsoft.com/windows2000/en/server/iis/">http://www.microsoft.com/windows2000/en/server/iis/</a>) <span class="anchor" id="line-30"></span><span class="anchor" id="line-31"></span><ul><li style="list-style-type:none">To install IIS, add components, or remove components: <span class="anchor" id="line-32"></span><span class="anchor" id="line-33"></span>Click Start, point to Settings, click Control Panel and start the Add/Remove Programs application.  <span class="anchor" id="line-34"></span>Select Configure Windows, click the Components button, and then follow the on-screen instructions  <span class="anchor" id="line-35"></span>to install, remove, or add components to IIS.  <span class="anchor" id="line-36"></span><span class="anchor" id="line-37"></span></li></ul><p class="line862" />Make sure that your webserver runs without problems before you start to install Moin<tt class="backtick"></tt>Moin; problems with your webserver installation are not in the scope of this document. <span class="anchor" id="line-38"></span><span class="anchor" id="line-39"></span><p class="line867" />
656
 
<h3 id="head-124918b94fdd224ff1d6bfff86c7525168676c98">Installing Python</h3>
657
 
<span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line862" />Download <a class="http" 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 class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line862" />Alternatively, you may download the <a class="http" href="http://www.activestate.com/Products/ActivePython/">ActivePython distribution</a> as a Microsoft Installer package. <span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line867" />
658
 
<h3 id="head-a1cff6121b8b9ce2a1b1d94e923ae54f0b89ce4c">Installing MoinMoin</h3>
659
 
<span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><p class="line862" />Before creating a wiki instance, you have to download and install the basic Moin<tt class="backtick"></tt>Moin software. We assume you already have downloaded the distribution archive to the "<tt class="backtick">C:\TEMP</tt>" directory. <span class="anchor" id="line-48"></span><span class="anchor" id="line-49"></span><p class="line874" />Open a console window and enter the following commands: <span class="anchor" id="line-50"></span><span class="anchor" id="line-51"></span><pre>C:
660
 
<span class="anchor" id="line-52"></span>cd \temp
661
 
<span class="anchor" id="line-53"></span>unzip moin-1.3.zip
662
 
<span class="anchor" id="line-54"></span>cd moin-1.3
663
 
<span class="anchor" id="line-55"></span>python setup.py install --prefix=C:\Moin --record=install.log
664
 
<span class="anchor" id="line-56"></span></pre><span class="anchor" id="line-57"></span><ul><li style="list-style-type:none"><p class="line891" /><img alt="/!\" height="15" src="wiki/htdocs/modern/img/alert.png" title="/!\" width="15" /> TODO: fix instructions for .tar.gz format used by recent moin versions. <span class="anchor" id="line-58"></span><span class="anchor" id="line-59"></span></li></ul><p class="line862" />This will install all necessary files to the "<tt class="backtick">C:\Moin</tt>" directory, and create a "<tt class="backtick">install.log</tt>" file listing all the files that are created there. <span class="anchor" id="line-60"></span><span class="anchor" id="line-61"></span><p class="line867" /> <span class="anchor" id="line-62"></span><span class="anchor" id="line-63"></span><p class="line867" />
665
 
<h2 id="head-c5d24a8b08d751dc989c57e5ec58363b55bef1b3">Creating a Wiki Instance</h2>
666
 
<span class="anchor" id="line-64"></span><span class="anchor" id="line-65"></span><p class="line874" />Enter these commands in a console window from C:\Moin: <span class="anchor" id="line-66"></span><span class="anchor" id="line-67"></span><pre>md mywiki
667
 
<span class="anchor" id="line-68"></span>md mywiki\data
668
 
<span class="anchor" id="line-69"></span>md mywiki\underlay
669
 
<span class="anchor" id="line-70"></span>xcopy share\moin\data mywiki\data /E
670
 
<span class="anchor" id="line-71"></span>xcopy share\moin\underlay mywiki\underlay /E
671
 
<span class="anchor" id="line-72"></span>copy share\moin\server\moin.cgi mywiki\
672
 
<span class="anchor" id="line-73"></span>copy share\moin\config\wikiconfig.py mywiki\
673
 
<span class="anchor" id="line-74"></span>copy share\moin\htdocs\index.html mywiki\default.htm
674
 
<span class="anchor" id="line-75"></span></pre><span class="anchor" id="line-76"></span><span class="anchor" id="line-77"></span><p class="line862" />"<tt class="backtick">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 class="backtick">wiki</tt>", because that would result in confusion and problems later on. <span class="anchor" id="line-78"></span><span class="anchor" id="line-79"></span><p class="line862" />We have to make sure that <tt class="backtick">moin.cgi</tt> can find the Moin<tt class="backtick"></tt>Moin directory, so that "<tt>import&nbsp;MoinMoin</tt>" will work. The easiest way to make sure <tt class="backtick">MoinMoin</tt> can be imported is to append to <tt class="backtick">sys.path</tt> <em>within</em> <tt class="backtick">moin.cgi</tt>. <span class="anchor" id="line-80"></span><span class="anchor" id="line-81"></span><p class="line874" />You can change the first two lines of code in moin.cgi to something like this: <span class="anchor" id="line-82"></span><span class="anchor" id="line-83"></span><span class="anchor" id="line-84"></span><span class="anchor" id="line-85"></span><span class="anchor" id="line-86"></span><div class="codearea" dir="ltr" lang="en">
 
719
<div dir="ltr" id="HelpOnInstalling.2BAC8-InternetInformationServer.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.top"></span>
 
720
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-8"></span><p class="line867"><strong>Index</strong> <div class="table-of-contents"><p class="table-of-contents-heading">Contents<ol><li><ol><li>
 
721
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Requirements.26Preparation">Requirements &amp; Preparation</a></li><li>
 
722
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Installation">Installation</a><ol><li>
 
723
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingIIS">Installing IIS</a></li><li>
 
724
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingPython">Installing Python</a></li><li>
 
725
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>
 
726
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Configuration">Configuration</a><ol><li>
 
727
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.CreatingaWikiInstance">Creating a Wiki Instance</a></li><li>
 
728
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.ConfiguringIIS">Configuring IIS</a><ol><li>
 
729
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.ConfiguringIIS5.0andabove">Configuring IIS 5.0 and above</a></li><li>
 
730
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.IIS6.0.28WindowsServer2003.29">IIS 6.0 (Windows Server 2003)</a></li></ol></li><li>
 
731
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Configuringwikiconfig.py">Configuring wikiconfig.py</a></li></ol></li><li>
 
732
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Troubleshooting">Troubleshooting</a></li><li>
 
733
<a href="#HelpOnInstalling.2BAC8-InternetInformationServer.NextSteps">Next Steps</a></li></ol></li></ol></div><p class="line874"> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-9"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-10"></span><p class="line867">
 
734
<h2 id="HelpOnInstalling.2BAC8-InternetInformationServer.Requirements.26Preparation">Requirements &amp; Preparation</h2>
 
735
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-11"></span><p class="line862">Before you install <a href="http://master17.moinmo.in/MoinMoin">MoinMoin</a>, make sure you have the necessary infrastructure in place, namely the <em>Internet Information Services</em> webserver (any version should be OK), and a <em>Python</em> installation (at least version 2.3 is required, the latest python release is recommended). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-13"></span><p class="line874">These instructions make the basic assumption that you will have these components installed in their default locations. In reality, you'll probably have them installed elsewhere (on the D: drive, for example). Be careful to substitute your drive and paths based on the following assumed default locations: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-15"></span><ul><li>IIS to its default location <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-16"></span></li><li><p class="line891"><tt>C:\Python</tt> - the Python interpreter <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-17"></span></li><li><p class="line891"><tt>C:\Moin</tt> - MoinMoin itself <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-18"></span></li></ul><p class="line867">
 
736
<h2 id="HelpOnInstalling.2BAC8-InternetInformationServer.Installation">Installation</h2>
 
737
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-19"></span><p class="line867">
 
738
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.InstallingIIS">Installing IIS</h3>
 
739
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-20"></span><p class="line862">From Microsoft: (<a class="http" href="http://www.microsoft.com/windows2000/en/server/iis/">http://www.microsoft.com/windows2000/en/server/iis/</a>) <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-21"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-22"></span><ol type="1"><li>To install IIS, add components, or remove components: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-23"></span><ol type="i"><li><p class="line862">Click Start =&gt; Settings =&gt; Control Panel =&gt; Add/Remove Programs. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-24"></span></li><li><p class="line862">Click 'Add/Remove Windows Components', Check 'Internet Information Services' and follow the on-screen instructions to install. ( <img alt="/!\" height="15" src="http://static.moinmo.in/moin_static170/modern/img/alert.png" title="/!\" width="15" /> it is also recommended to click the 'details' button and un-selecting components you will not need. This will depend on your server role; but for example, you probably will not need FTP, or "Frontpage 2000 Server Extensions"). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-25"></span></li></ol></li></ol><p class="line862">Make sure that your webserver runs without problems before you start to install MoinMoin; problems with your webserver installation are not in the scope of this document. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-27"></span><p class="line867">
 
740
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.InstallingPython">Installing Python</h3>
 
741
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-28"></span><p class="line874">There are currently two different distributions of Python available for Windows. Either version will work fine. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-29"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-30"></span><ol type="1"><li><p class="line891"><a class="http" href="http://www.python.org">http://www.python.org</a> - The standard open-source Python distribution. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-31"></span><ul><li>The installer is a windows executable (.exe) file. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-32"></span></li></ul></li><li><p class="line891"><a class="http" href="http://www.activestate.com">http://www.activestate.com</a> - An alternative, commercially-supported, distribution (distributed for free (email address required)). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-33"></span><ul><li>The installer is a Windows .MSI file. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-34"></span></li><li><p class="line862">If you are or plan to develop in the Python language, ActivePython has some tools specific to the Windows operating system and includes a popular Windows IDE called Pythonwin. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-35"></span></li></ul></li></ol><p class="line867">MoinMoin works with either distribution, but requires Python release 2.3 or later. Download and install the distribution of your choice. Be sure your Python installation is correct before proceeding. Installation is straightforward; however, any questions or issues regarding the Python installation process should be resolved through the use of resources provided by Python.org or ActiveState. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-37"></span><p class="line867">
 
742
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.InstallingMoinMoin">Installing MoinMoin</h3>
 
743
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-38"></span><ol type="1"><li><p class="line891"><strong>Download MoinMoin</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-39"></span><ul><li><p class="line862">The most current version is here: <a class="interwiki" href="http://moinmo.in/MoinMoinDownload" title="MoinMoin">MoinMoinDownload</a> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-40"></span></li></ul></li><li><p class="line891"><strong>Expand the archive</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-41"></span><ul><li><p class="line891"><span class="u"><em>Note:</em></span> users of older versions of <a class="http" href="http://www.winzip.com">WinZip</a> report problem expanding .tar.gz files. Either upgrade or use the free <a class="http" href="http://7-zip.org/">7-Zip</a> utility. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-42"></span></li><li><p class="line862">Expand the archive into <tt>C:\TEMP</tt> or an alternative location. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-43"></span></li><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-44"></span></li></ul></li><li><p class="line891"><strong>Run Setup.py from the commandline</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-45"></span><ul><li><p class="line862">Open an DOS window (start &gt; Run... &gt; type <tt>cmd</tt>) and enter the commands:<br>
 
744
 <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-46"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-48"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-52"></span><pre>C:
 
745
cd \temp
 
746
unzip moin-1.6.zip
 
747
cd moin-1.6
 
748
python setup.py install --prefix=C:\Moin --record=install.log</pre><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-53"></span></li></ul></li></ol><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-55"></span><p class="line874">You are now ready to create a wiki instance. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-57"></span><p class="line867">
 
749
<h2 id="HelpOnInstalling.2BAC8-InternetInformationServer.Configuration">Configuration</h2>
 
750
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-58"></span><p class="line867">
 
751
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.CreatingaWikiInstance">Creating a Wiki Instance</h3>
 
752
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-59"></span><p class="line862">Enter these commands in a console window from C:\Moin&gt;: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-60"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-61"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-62"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-64"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-66"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-68"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-70"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-71"></span><pre>cd c:\Moin
 
753
md mywiki
 
754
md mywiki\data
 
755
md mywiki\underlay
 
756
xcopy share\moin\data mywiki\data /E
 
757
xcopy share\moin\underlay mywiki\underlay /E
 
758
copy share\moin\server\moin.cgi mywiki\
 
759
copy share\moin\config\wikiconfig.py mywiki\
 
760
copy share\moin\htdocs\index.html mywiki\default.htm</pre><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-72"></span><p class="line862">"<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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-73"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-74"></span><p class="line862">We have to make sure that <tt>moin.cgi</tt> can find the MoinMoin 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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-75"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-76"></span><p class="line874">You can change the first two lines of code in moin.cgi to something like this: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-77"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-78"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-79"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-81"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-83"></span><div class="codearea" dir="ltr" lang="en">
675
761
<script type="text/javascript">
676
762
function isnumbered(obj) {
677
763
  return obj.childNodes.length && obj.firstChild.childNodes.length && obj.firstChild.firstChild.className == 'LineNumber';
723
809
</script>
724
810
 
725
811
<script type="text/javascript">
726
 
document.write('<a href="#" onclick="return togglenumber(\'CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee_000\', 1, 1);" \
 
812
document.write('<a href="#" onclick="return togglenumber(\'HelpOnInstalling.2BAC8-InternetInformationServer.CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee\', 1, 1);" \
727
813
                class="codenumbers">Toggle line numbers<\/a>');
728
814
</script>
729
 
<pre dir="ltr" id="CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee_000" lang="en"><span class="line"><span class="LineNumber">   1 </span><span class="Comment">#!python</span></span>
 
815
<pre dir="ltr" id="HelpOnInstalling.2BAC8-InternetInformationServer.CA-acbc60d12efe38198c86305c09c3ae16aba7d8ee" lang="en"><span class="line"><span class="LineNumber">   1 </span><span class="Comment">#!python</span></span>
730
816
<span class="line"><span class="LineNumber">   2 </span><span class="Comment"></span><span class="ResWord">import</span> <span class="ID">sys</span></span>
731
817
<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>
732
 
</pre></div><span class="anchor" id="line-87"></span><p class="line862" />Notice that we're pointing to the directory which contains the Moin<tt class="backtick"></tt>Moin directory, not the directory itself. <span class="anchor" id="line-88"></span><span class="anchor" id="line-89"></span><p class="line874" />Next, you'll need to create two virtual directories in IIS. One for the shared data, and one for this specific wiki instance.  <span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line862" />Go to <em>Control Panel =&gt; Administrative Tools =&gt; Internet Information Service</em>. Open up the tree to <em>Default Web Site</em>.  <span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><p class="line862" />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 class="backtick">wiki</tt>" for the alias name and hit next. Browse to "<tt class="backtick">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 class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><p class="line862" />Now follow the same steps, but set the alias to "<tt class="backtick">mywiki</tt>" and the path to "<tt class="backtick">C:\Moin\mywiki</tt>".  <span class="anchor" id="line-96"></span><span class="anchor" id="line-97"></span><p class="line862" />Use IIS Admin to remove permissions to read the data directory: expand the "<tt class="backtick">mywiki</tt>" node, right click on <tt class="backtick">data</tt>, select <tt class="backtick">Properties</tt>, and uncheck <tt class="backtick">Read</tt>. Repeat these steps with the <tt class="backtick">underlay</tt> directory. <span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span><p class="line862" />Now you need to setup the 'mywiki' alias so that it will run Python to interpret <tt class="backtick">.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 class="backtick">python.exe</tt> (probably something like <tt class="backtick">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 class="backtick"></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 class="anchor" id="line-100"></span><span class="anchor" id="line-101"></span><p class="line862" />If you add another wiki instance, you'll only need to setup the reference to its folder, they can safely share the "<tt class="backtick">wiki</tt>" alias which points to static files only. <span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><p class="line862" />That is all, try to access your new-born wiki with the URL "<tt class="backtick">http://127.0.0.1/mywiki/</tt>". You should see the Front<tt class="backtick"></tt>Page, try to edit and save it, and if that works, see if your edit is reflected on the Recent<tt class="backtick"></tt>Changes page. <span class="anchor" id="line-104"></span><span class="anchor" id="line-105"></span><p class="line862" />Finally, edit "<tt class="backtick">wikiconfig.py</tt>" and at least change "<tt class="backtick">sitename</tt>" and "<tt class="backtick">logo_string</tt>" to some personal values: <span class="anchor" id="line-106"></span><span class="anchor" id="line-107"></span><pre>sitename = u'My Wiki'
733
 
<span class="anchor" id="line-108"></span>logo_string = u'&lt;img src="/mywiki/images/mywiki-logo.gif" alt="MyWiki Logo"&gt;My Wiki'
734
 
<span class="anchor" id="line-109"></span></pre><span class="anchor" id="line-110"></span><p class="line862" />Where "<tt class="backtick">images</tt>" is a directory under your "<tt class="backtick">mywiki</tt>" instance. <span class="anchor" id="line-111"></span><span class="anchor" id="line-112"></span><p class="line862" />NOTE: The configuration variable "<tt class="backtick">url_prefix</tt>" in "<tt class="backtick">wikiconfig.py</tt>" should match the alias for "<tt class="backtick">C:\Moin\share\moin\htdocs</tt>" or themes will not work ("<tt class="backtick">/wiki</tt>" for the instructions above).  This way, any reference in "<tt class="backtick">wikiconfig.py</tt>" to "<tt class="backtick">/wiki/something</tt>" will look in the shared data directory and a reference to "<tt class="backtick">/mywiki/something</tt>" will look in the wiki instance directory.  These are considered absolute paths because relative paths will not work correctly. <span class="anchor" id="line-113"></span><span class="anchor" id="line-114"></span><p class="line867" /><strong>Since <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 class="anchor" id="line-115"></span><span class="anchor" id="line-116"></span><ol type="1"><li>Go into the IIS Manager, right-click on 'mywiki' (or whatever your wiki instance directory is called), and select properties. <span class="anchor" id="line-117"></span><span class="anchor" id="line-118"></span></li><li class="gap"><p class="line862" />Next, go to the Custom Errors tab and find the 404 entry, and click the <em>Set to Default</em> button. <span class="anchor" id="line-119"></span><span class="anchor" id="line-120"></span><span class="anchor" id="line-121"></span></li></ol><p class="line867" />
735
 
<h3 id="head-890abdbd0d21bf874ce794be87067abf433a51d7">IIS 6.0 (Windows Server 2003)</h3>
736
 
<span class="anchor" id="line-122"></span><span class="anchor" id="line-123"></span><p class="line862" />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 class="anchor" id="line-124"></span><span class="anchor" id="line-125"></span><ol type="1"><li><p class="line862" />Open IIS Manager by going to Start Menu-&gt;Programs-&gt;Administrative Tools-&gt;IIS Manager. <span class="anchor" id="line-126"></span><span class="anchor" id="line-127"></span></li><li class="gap"><p class="line862" />Go to the <strong>Web Service Extensions</strong> folder. <span class="anchor" id="line-128"></span><span class="anchor" id="line-129"></span></li><li class="gap"><p class="line862" />Under the <strong>Action</strong> menu, select <strong>Add a new Web service extension...</strong>. <span class="anchor" id="line-130"></span><span class="anchor" id="line-131"></span></li><li class="gap"><p class="line862" />For Extension name, give it a name such as <em>.cgi</em> or <em>Python cgi</em> or something. <span class="anchor" id="line-132"></span><span class="anchor" id="line-133"></span></li><li class="gap"><p class="line862" />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 class="anchor" id="line-134"></span><span class="anchor" id="line-135"></span></li><li class="gap"><p class="line862" />Make sure the <strong>Set extension status to Allowed</strong> checkbox is checked and click the <strong>Ok</strong> button. <span class="anchor" id="line-136"></span><span class="anchor" id="line-137"></span></li></ol><p class="line874" />Another change that may be necessary if you are receiving HTTP Error 403 19 1314 while using IIS 6.0 is to adjust the Identity settings for the Application Pool that is being used by your site.  The following steps assume you are adjusting the Default Web Site. <span class="anchor" id="line-138"></span><span class="anchor" id="line-139"></span><ol type="1"><li><p class="line862" />Open IIS Manager by going to Start Menu-&gt;Programs-&gt;Administrative Tools-&gt;IIS Manager. <span class="anchor" id="line-140"></span><span class="anchor" id="line-141"></span></li><li class="gap"><p class="line862" />Go to the <strong>Application Pool</strong> folder. <span class="anchor" id="line-142"></span><span class="anchor" id="line-143"></span></li><li class="gap"><p class="line862" />Select the Application Pool you wish to adjust. (likely <strong>Default<tt class="backtick"></tt>App<tt class="backtick"></tt>Pool</strong> ) When you do this on the right you will see the Application pools for each site on the server.  This will include a Description (likely <strong>Default Application</strong> )and a Path (<strong>&lt;Default Web Site&gt;</strong>).  In this way you can be certain you are adjusting the appropriate Application Pool. <span class="anchor" id="line-144"></span><span class="anchor" id="line-145"></span></li><li class="gap"><p class="line862" />With <strong>Default<tt class="backtick"></tt>App<tt class="backtick"></tt>Pool</strong> still selected right click and select <strong>Properties</strong>. <span class="anchor" id="line-146"></span><span class="anchor" id="line-147"></span></li><li class="gap"><p class="line862" />Select the <strong>Identity</strong> tab and with <strong>Predefined</strong> clicked use the drop down box to change the <strong>Identity</strong> to <strong>Local System</strong> instead of Network Service. <span class="anchor" id="line-148"></span><span class="anchor" id="line-149"></span><p class="line891" /><em>Please be aware that this is a workaround since you SHOULD set your group settings to allow Network Service to access the cgi scripts.</em> <span class="anchor" id="line-150"></span><span class="anchor" id="line-151"></span></li></ol><p class="line874" />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 class="anchor" id="line-152"></span><span class="anchor" id="line-153"></span><p class="line867" />
737
 
<h2 id="head-086499a2b43629c3fef3b36dc435cff210e32faa">Troubleshooting</h2>
738
 
<span class="anchor" id="line-154"></span><span class="anchor" id="line-155"></span><p class="line862" />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 class="backtick"></tt>Moin. See above for how to add to <tt class="backtick">sys.path</tt>. <span class="anchor" id="line-156"></span><span class="anchor" id="line-157"></span><p class="line874" />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 class="anchor" id="line-158"></span><span class="anchor" id="line-159"></span><p class="line862" />If the page never loads after hitting <tt class="backtick">Save&nbsp;Changes</tt>, you should check the permissions of the <tt class="backtick">data</tt> directory.  Make sure the IUSR_COMPUTERNAME user has modify permissions. <span class="anchor" id="line-160"></span><span class="anchor" id="line-161"></span><p class="line862" />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 class="backtick">url_prefix</tt>" in "<tt class="backtick">wikiconfig.py</tt>" or the cached pages need to be updated by an Edit or deleting them in the data folder. Or you are using MS IE which has broken CSS :before support - try another browser. <span class="anchor" id="line-162"></span><span class="anchor" id="line-163"></span><p class="line874" />If you see an error message like: <span class="anchor" id="line-164"></span><span class="anchor" id="line-165"></span><pre>Check your URL regular expressions in the "wikis" list in "farmconfig.py". Content-type: text/html;charset=utf-8
739
 
<span class="anchor" id="line-166"></span>MoinMoin Configuration Error
740
 
<span class="anchor" id="line-167"></span>Could not find a match for url: "servername/wikiname/moin.cgi?
741
 
<span class="anchor" id="line-168"></span>Check your URL regular expressions in the "wikis" list in "farmconfig.py".
742
 
<span class="anchor" id="line-169"></span></pre><span class="anchor" id="line-170"></span><span class="anchor" id="line-171"></span><p class="line874" />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 class="anchor" id="line-172"></span><span class="anchor" id="line-173"></span><p class="line862" />If you are using URLScan, you might have to add the following setting in the file <tt class="backtick">%SystemRoot%\system32\inetsrv\urlscan\urlscan.ini</tt>: <span class="anchor" id="line-174"></span><pre>[options]
743
 
<span class="anchor" id="line-175"></span>AllowHighBitCharacters=1
744
 
<span class="anchor" id="line-176"></span></pre><span class="anchor" id="line-177"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/InternetInformationServer"></span></div> <span class="anchor" id="line-75"></span><hr class="hr2" /><p class="line874" /> <span class="anchor" id="line-76"></span><span class="anchor" id="trouble-shooting"></span> <span class="anchor" id="line-77"></span>
 
818
</pre></div><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-84"></span><p class="line862">Notice that we're pointing to the directory which contains the MoinMoin directory, not the directory itself. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-86"></span><p class="line867">
 
819
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.ConfiguringIIS">Configuring IIS</h3>
 
820
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-87"></span><p class="line874">Next, you'll need to create two virtual directories in IIS. One for the shared data, and one for this specific wiki instance. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-89"></span><p class="line867">
 
821
<h4 id="HelpOnInstalling.2BAC8-InternetInformationServer.ConfiguringIIS5.0andabove">Configuring IIS 5.0 and above</h4>
 
822
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-90"></span><ol type="1"><li><p class="line862">Open <strong>Internet Services Manager</strong> (Start &gt; Settings &gt; Control Panels &gt; Administrative Tools &gt; ...). Open up the tree to <em>Default Web Site</em>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-92"></span></li><li class="gap"><p class="line862">Right click on <em>Default Web Site</em> and choose <em>New &gt; Virtual directory</em>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-93"></span><ol type="i"><li>This will bring up a wizard with the mandatory useless first screen, hit next. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-94"></span></li><li><p class="line862">Enter "<tt>wiki</tt>" for the alias name, hit next. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-95"></span></li><li><p class="line862">Browse to "<tt>C:\Moin\share\moin\htdocs</tt>", hit next. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-96"></span></li><li><p class="line862">Leave the <em>Access permissions</em> at their defaults, hit next. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-97"></span></li><li>And now you're done, hit finish! <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-99"></span></li></ol></li><li class="gap"><p class="line862">Now follow the same steps, but set the alias to "<tt>mywiki</tt>" and the path to "<tt>C:\Moin\mywiki</tt>". <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-101"></span></li><li class="gap">Use IIS Admin to remove permissions to read the data directory: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-102"></span><ol type="i"><li><p class="line862">expand the "<tt>mywiki</tt>" node <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-103"></span></li><li><p class="line862">right click on <tt>data</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-104"></span></li><li><p class="line862">select <tt>Properties</tt> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-105"></span></li><li><p class="line862">and uncheck <tt>Read</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-106"></span></li><li><p class="line862">Repeat these steps with the <tt>underlay</tt> directory. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-108"></span></li></ol></li><li class="gap"><p class="line862">Now you need to setup the 'mywiki' alias so that it will run Python to interpret <tt>.cgi</tt> files. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-109"></span><ol type="i"><li><p class="line862">On Windows Server 2003, click the <em>Create</em> button under <em>Application Settings</em> to create an application space. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-110"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-111"></span></li><li class="gap"><p class="line862">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. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-112"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-113"></span></li><li class="gap"><p class="line862">The first tab is the <em>App Mappings</em> tab, which defines which programs to use for each file extension. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-114"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-115"></span></li><li class="gap"><p class="line862">Click <em>Add</em>. Browse to your <tt>python.exe</tt> (probably something like <tt>c:\pythonXX\python.exe</tt>). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-117"></span></li><li class="gap"><p class="line862">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 beginning period. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-119"></span></li><li class="gap"><p class="line862">Make sure that the <em>Check that file exists</em> option is not checked (if it is, MoinMoin won't be able to display sub pages). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-121"></span></li><li class="gap"><p class="line862">Ok, you're done with the alias configuration, click <em>OK</em> several times to get back out of all the dialog boxes. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-122"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-123"></span></li></ol></li><li class="gap"><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-124"></span></li></ol><p class="line867">
 
823
<h4 id="HelpOnInstalling.2BAC8-InternetInformationServer.IIS6.0.28WindowsServer2003.29">IIS 6.0 (Windows Server 2003)</h4>
 
824
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-125"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-126"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-127"></span><ol type="1"><li><p class="line862">Open <strong>IIS Manager</strong> (Start &gt; Programs &gt; Administrative Tools &gt; IIS Manager). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-129"></span></li><li class="gap"><p class="line862">Go to the <strong>Web Service Extensions</strong> folder. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-131"></span></li><li class="gap"><p class="line862">Under the <strong>Action</strong> menu, select <strong>Add a new Web service extension...</strong>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-132"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-133"></span></li><li class="gap"><p class="line862">For Extension name, give it a name such as <em>.cgi</em> or <em>Python cgi</em> or similar. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-134"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-135"></span></li><li class="gap"><p class="line862">Under <strong>Required files</strong> click the <strong>Add...</strong> button and type in the exact command-line string you used above. Eg: <tt>c:\python24\python.exe&nbsp;-u&nbsp;"%s"&nbsp;"%s"</tt>, then click the <strong>Ok</strong> button. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-136"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-137"></span></li><li class="gap"><p class="line862">Make sure the <strong>Set extension status to Allowed</strong> checkbox is checked and click the <strong>Ok</strong> button. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-138"></span></li></ol><p class="line874">Another change that may be necessary if you are receiving HTTP Error 403 19 1314 while using IIS 6.0 is to adjust the Identity settings for the Application Pool that is being used by your site. The following steps assume you are adjusting the Default Web Site. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-139"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-140"></span><ol type="1"><li><p class="line862">Open <strong>IIS Manager</strong> (Start &gt; Programs &gt; Administrative Tools &gt; IIS Manager). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-141"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-142"></span></li><li class="gap"><p class="line862">Go to the <strong>Application Pool</strong> folder. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-143"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-144"></span></li><li class="gap"><p class="line862">Select the Application Pool you wish to adjust. (likely <strong>DefaultAppPool</strong> ) When you do this on the right you will see the Application pools for each site on the server. This will include a Description (likely <strong>Default Application</strong> ) and a Path (<strong>&lt;Default Web Site&gt;</strong>). In this way you can be certain you are adjusting the appropriate Application Pool. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-145"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-146"></span></li><li class="gap"><p class="line862">With <strong>DefaultAppPool</strong> still selected right click and select <strong>Properties</strong>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-147"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-148"></span></li><li class="gap"><p class="line862">Select the <strong>Identity</strong> tab and with <strong>Predefined</strong> clicked use the drop down box to change the <strong>Identity</strong> to <strong>Local System</strong> instead of Network Service. <em>Please be aware that this is a workaround since you SHOULD set your group settings to allow Network Service to access the cgi scripts.</em> <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-149"></span></li></ol><p class="line862">Under Windows Server 2003, you will also need to give your IUSR_MACHINENAME account <em>Modify</em> access to the mywiki\data and mywiki\underlay sub-directories, as file system permissions are more restricted by default than previous Windows versions. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-150"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-151"></span><p class="line862">That is all, try to access your new-born wiki with the URL <a class="http" href="http://127.0.0.1/mywiki/">http://127.0.0.1/mywiki/</a>. You should see the FrontPage, try to edit and save it, and if that works, see if your edit is reflected on the RecentChanges page. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-152"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-153"></span><p class="line867">
 
825
<h3 id="HelpOnInstalling.2BAC8-InternetInformationServer.Configuringwikiconfig.py">Configuring wikiconfig.py</h3>
 
826
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-154"></span><p class="line862">Finally, edit "<tt>wikiconfig.py</tt>" and at least change "<tt>sitename</tt>" and "<tt>logo_string</tt>" to some personal values: <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-155"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-156"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-157"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-158"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-159"></span><pre>sitename = u'My Wiki'
 
827
logo_string = u'&lt;img src="/mywiki/images/mywiki-logo.gif" alt="MyWiki Logo"&gt;My Wiki'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-160"></span><p class="line862">Where "<tt>images</tt>" is a directory under your "<tt>mywiki</tt>" instance. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-161"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-162"></span><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-163"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-164"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-165"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-166"></span><ol type="1"><li>Go into the IIS Manager, right-click on 'mywiki' (or whatever your wiki instance directory is called), and select properties. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-167"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-168"></span></li><li class="gap"><p class="line862">Next, go to the Custom Errors tab and find the 404 entry, and click the <em>Set to Default</em> button. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-169"></span></li></ol><p class="line867">
 
828
<h2 id="HelpOnInstalling.2BAC8-InternetInformationServer.Troubleshooting">Troubleshooting</h2>
 
829
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-170"></span><ul><li><p class="line862">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 class="backtick"></tt>Moin. See above for how to add to <tt>sys.path</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-171"></span></li><li>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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-172"></span></li><li><p class="line862">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-173"></span></li><li><p class="line862">If some images like InterWiki and WorldWideWeb 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. Or you are using MS IE which has broken CSS :before support - try another browser. <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-174"></span></li><li><p class="line862">If you see an error message like:<br>
 
830
 <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-175"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-176"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-177"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-178"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-179"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-180"></span><pre>Check your URL regular expressions in the "wikis" list in "farmconfig.py". Content-type: text/html;charset=utf-8
 
831
MoinMoin Configuration Error
 
832
Could not find a match for url: "servername/wikiname/moin.cgi?
 
833
Check your URL regular expressions in the "wikis" list in "farmconfig.py".</pre><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-181"></span><ul><li style="list-style-type:none">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 class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-182"></span></li></ul></li><li><p class="line862">If you are using URLScan, you might have to add the following setting in the file <tt>%SystemRoot%\system32\inetsrv\urlscan\urlscan.ini</tt>:<br>
 
834
 <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-183"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-184"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-185"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-186"></span><pre>[options]
 
835
AllowHighBitCharacters=1</pre><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-187"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-188"></span><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-189"></span></li></ul><p class="line867">
 
836
<h2 id="HelpOnInstalling.2BAC8-InternetInformationServer.NextSteps">Next Steps</h2>
 
837
<span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-190"></span><ul><li><p class="line862">Backing up MoinMoin is simple. Look at <a href="http://master17.moinmo.in/HelpOnInstalling/Win32MoinEasyBackup">HelpOnInstalling/Win32MoinEasyBackup</a> for guidance (despite the somewhat misleading title, the procedure would be the same for IIS). <span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.line-191"></span></li></ul><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.bottom"></span></div> <span class="anchor" id="line-75"></span><hr class="hr2" /><p class="line874"> <span class="anchor" id="line-76"></span><span class="anchor" id="trouble-shooting"></span> <span class="anchor" id="line-77"></span>
745
838
<h1>Trouble-shooting</h1>
746
 
<div dir="ltr" id="Include_HelpOnInstalling/TroubleShooting" lang="en"><span class="anchor" id="top_Include_HelpOnInstalling/TroubleShooting"></span>
747
 
<span class="anchor" id="line-8"></span><span class="anchor" id="line-9"></span><p class="line867" /><strong>How to deal with common errors</strong> <span class="anchor" id="line-10"></span><span class="anchor" id="line-11"></span><p class="line867" />
748
 
<h1 id="head-19c97c74376eccc15bf415113eb35925fb0600ef">First follow the instructions</h1>
749
 
<span class="anchor" id="line-12"></span><span class="anchor" id="line-13"></span><p class="line862" />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 class="backtick">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 class="anchor" id="line-14"></span><span class="anchor" id="line-15"></span><ul><li>First follow the instructions <span class="anchor" id="line-16"></span></li><li>Do not change any configuration option unless you must. <span class="anchor" id="line-17"></span></li><li>Play with a working wiki before you try to customize it. <span class="anchor" id="line-18"></span><span class="anchor" id="line-19"></span></li></ul><p class="line867" />
750
 
<h1 id="head-d6d40372ac4a2b91da396f084ba3faaf3e6c3845">Change one thing at a time</h1>
751
 
<span class="anchor" id="line-20"></span><span class="anchor" id="line-21"></span><p class="line874" />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 class="anchor" id="line-22"></span><span class="anchor" id="line-23"></span><p class="line867" />
752
 
<h1 id="head-1372c460df94281a98cdde429b2496bdfd6e2677">Check That Your Webserver Can Use Python</h1>
753
 
<span class="anchor" id="line-24"></span><span class="anchor" id="line-25"></span><p class="line862" />This is also in <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">HelpOnInstalling/BasicInstallation</a>.  Use this script: <span class="anchor" id="line-26"></span><span class="anchor" id="line-27"></span><p class="line867" /><span class="anchor" id="line-28"></span><pre>#!/bin/sh
754
 
<span class="anchor" id="line-29"></span>echo Content-Type: text/plain
755
 
<span class="anchor" id="line-30"></span>echo
756
 
<span class="anchor" id="line-31"></span>echo "Your web server is running as:"
757
 
<span class="anchor" id="line-32"></span>id
758
 
<span class="anchor" id="line-33"></span>echo "CGI scripts work"
759
 
<span class="anchor" id="line-34"></span>echo "Now we try to invoke Python interpreters and get their versions:"
760
 
<span class="anchor" id="line-35"></span>python -V 2&gt;&amp;1
761
 
<span class="anchor" id="line-36"></span>python2.3 -V 2&gt;&amp;1
762
 
<span class="anchor" id="line-37"></span>python2.4 -V 2&gt;&amp;1
763
 
<span class="anchor" id="line-38"></span>echo "Finished."
764
 
<span class="anchor" id="line-39"></span></pre><span class="anchor" id="line-40"></span><span class="anchor" id="line-41"></span><p class="line874" />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 class="anchor" id="line-42"></span><span class="anchor" id="line-43"></span><p class="line867" />
765
 
<h1 id="head-82d34035b28a82ec380913906a9c676a0c20ecf3">Built-in test</h1>
766
 
<span class="anchor" id="line-44"></span><span class="anchor" id="line-45"></span><p class="line862" />There's a built-in diagnostic mode that's useful when doing an install; just append "<tt class="backtick">?action=test</tt>" to the URL of your wiki: <span class="anchor" id="line-46"></span><span class="anchor" id="line-47"></span><pre>lynx --dump http://`hostname`/mywiki?action=test
767
 
<span class="anchor" id="line-48"></span></pre><span class="anchor" id="line-49"></span><span class="anchor" id="line-50"></span><p class="line874" />If you see an import error here, but  <span class="anchor" id="line-51"></span><span class="anchor" id="line-52"></span><p class="line867" /><span class="anchor" id="line-53"></span><pre>python -c "import MoinMoin"
768
 
<span class="anchor" id="line-54"></span></pre><span class="anchor" id="line-55"></span><span class="anchor" id="line-56"></span><p class="line874" />works, it's likely a result of missing file permissions or a wrong PYTHONPATH setting within the web server environment. <span class="anchor" id="line-57"></span><span class="anchor" id="line-58"></span><p class="line867" />
769
 
<h1 id="head-68a88c328bf1907f03ed306eb15199cc98b2cd6a">Duelling Pythons</h1>
770
 
<span class="anchor" id="line-59"></span><span class="anchor" id="line-60"></span><p class="line862" />The most common problem you might encounter is when you have an old Python version installed into "<tt class="backtick">/usr</tt>", and a newer Python distribution into "<tt class="backtick">/usr/local</tt>"; this is typical for GNU/Linux distributions that still come bundled with an old Python version. <span class="anchor" id="line-61"></span><span class="anchor" id="line-62"></span><p class="line862" />In that case, if you enter "<tt class="backtick">python</tt>" on your prompt, you will usually get the more recent Python interpreter, because "<tt class="backtick">/usr/local/bin</tt>" is in your <tt class="backtick">PATH</tt>. The situation is different in your webserver environment, and thus you might have to change the bang path of "<tt class="backtick">moin.cgi</tt>", like this: <span class="anchor" id="line-63"></span><span class="anchor" id="line-64"></span><pre>#!/usr/local/bin/python
771
 
<span class="anchor" id="line-65"></span>
772
 
<span class="anchor" id="line-66"></span>"""
773
 
<span class="anchor" id="line-67"></span>    MoinMoin - CGI Driver Script
774
 
<span class="anchor" id="line-68"></span>...
775
 
<span class="anchor" id="line-69"></span>"""
776
 
<span class="anchor" id="line-70"></span></pre><span class="anchor" id="line-71"></span><span class="anchor" id="line-72"></span><ul><li>Debian stable users might want to look for backport of newer Python, or download and build Python from source. <span class="anchor" id="line-73"></span><span class="anchor" id="line-74"></span></li><li class="gap"><p class="line862" />When installing, make sure you install with the version of python you want to run moin with. <tt class="backtick">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 class="backtick">/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 class="anchor" id="line-75"></span><span class="anchor" id="line-76"></span></li></ul><p class="line867" />
777
 
<h1 id="head-8e72ddd753a6ead652d17bd2c24324a9a0dc9512">Missing file permissions</h1>
778
 
<span class="anchor" id="line-77"></span><span class="anchor" id="line-78"></span><p class="line862" />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 class="backtick">install.log</tt>, or run the command:  <span class="anchor" id="line-79"></span><span class="anchor" id="line-80"></span><p class="line867" /><span class="anchor" id="line-81"></span><pre>python -c "import sys; print '%s/lib/python%s/site-packages' % ( sys.prefix, sys.version[:3] )"
779
 
<span class="anchor" id="line-82"></span></pre><span class="anchor" id="line-83"></span><span class="anchor" id="line-84"></span><p class="line862" />For the example below, we'll assume that the Python module directory is <tt class="backtick">/usr/local/lib/python2.3/site-packages</tt>. <span class="anchor" id="line-85"></span>Make the files world-readable using the following commands: <span class="anchor" id="line-86"></span><span class="anchor" id="line-87"></span><pre>cd /usr/local
780
 
<span class="anchor" id="line-88"></span>chmod -R a+rX lib/python2.3/site-packages/MoinMoin
781
 
<span class="anchor" id="line-89"></span></pre><span class="anchor" id="line-90"></span><span class="anchor" id="line-91"></span><p class="line867" />
782
 
<h1 id="head-bf2856e568e384c1b4da0403cfee28297345e8a9">Set Your Variables Carefully</h1>
783
 
<span class="anchor" id="line-92"></span><span class="anchor" id="line-93"></span><p class="line862" />Be especially careful when you retype instead of cut and paste. Quoting errors in <tt class="backtick">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 class="backtick">wikiconfig.py</tt> or <tt class="backtick">farmconfig.py</tt>. <span class="anchor" id="line-94"></span><span class="anchor" id="line-95"></span><p class="line867" />
784
 
<h2 id="head-b3137d96e505ef20d7cff55253012674ea4a5d10">moin.cgi found, Moin doesn't run</h2>
785
 
<span class="anchor" id="line-96"></span><span class="anchor" id="line-97"></span><p class="line862" />If you have to add the moin code location into the system path, make sure to specify the place <tt class="backtick"></tt>above<tt class="backtick"></tt> MoinMoin itself, so that the word MoinMoin is recognized during the import request.   <span class="anchor" id="line-98"></span><span class="anchor" id="line-99"></span><p class="line867" />
786
 
<h2 id="head-ecc94aa011a0d0de8cfa6123fcfd70164d85a139">CSS files do not work</h2>
787
 
<span class="anchor" id="line-100"></span><span class="anchor" id="line-101"></span><p class="line862" />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 alt=":-)" height="15" src="wiki/htdocs/modern/img/smile.png" title=":-)" width="15" /> <span class="anchor" id="line-102"></span><span class="anchor" id="line-103"></span><p class="line862" />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 class="anchor" id="line-104"></span><span class="anchor" id="line-105"></span><pre>Alias /wiki/ "/prefix/share/moin/htdocs/"
788
 
<span class="anchor" id="line-106"></span>ScriptAlias /wiki/ "/var/www/wiki/moin.cgi"
789
 
<span class="anchor" id="line-107"></span></pre><span class="anchor" id="line-108"></span><span class="anchor" id="line-109"></span><p class="line862" />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 class="backtick">url_prefix</tt> configuration option. Here is an example that works (the default): <span class="anchor" id="line-110"></span><span class="anchor" id="line-111"></span><pre># Apache config
790
 
<span class="anchor" id="line-112"></span>Alias /wiki/ "/prefix/share/moin/htdocs/"
791
 
<span class="anchor" id="line-113"></span></pre><span class="anchor" id="line-114"></span><p class="line867" /><span class="anchor" id="line-115"></span><pre># Wiki config
792
 
<span class="anchor" id="line-116"></span>    url_prefix = '/wiki'
793
 
<span class="anchor" id="line-117"></span></pre><span class="anchor" id="line-118"></span><span class="anchor" id="bottom_Include_HelpOnInstalling/TroubleShooting"></span></div> <span class="anchor" id="line-78"></span><span class="anchor" id="bottom"></span></div><p id="pageinfo" class="info" lang="en" dir="ltr">MoinMaster: MoinMoin/InstallDocs  (last edited 2006-01-01 23:26:52 by <span title="??? @ localhost[127.0.0.1]">localhost</span>)</p>
 
839
<div dir="ltr" id="HelpOnInstalling.2BAC8-TroubleShooting.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.top"></span>
 
840
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-8"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-9"></span><p class="line867"><strong>How to deal with common errors</strong> <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-10"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-11"></span><p class="line867">
 
841
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.Firstfollowtheinstructions">First follow the instructions</h1>
 
842
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-12"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-13"></span><p class="line862">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 class="backtick">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 class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-14"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-15"></span><ul><li>First follow the instructions <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-16"></span></li><li>Do not change any configuration option unless you must. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-17"></span></li><li>Play with a working wiki before you try to customize it. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-18"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-19"></span></li></ul><p class="line867">
 
843
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.Changeonethingatatime">Change one thing at a time</h1>
 
844
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-20"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-21"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-22"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-23"></span><p class="line867">
 
845
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.CheckThatYourWebserverCanUsePython">Check That Your Webserver Can Use Python</h1>
 
846
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-24"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-25"></span><p class="line862">This is also in <a href="http://master17.moinmo.in/HelpOnInstalling/BasicInstallation">HelpOnInstalling/BasicInstallation</a>.  Use this script: <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-26"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-27"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-28"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-29"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-30"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-31"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-32"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-33"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-34"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-35"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-36"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-37"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-38"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-39"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-40"></span><pre>echo Content-Type: text/plain
 
847
echo
 
848
echo "Your web server is running as:"
 
849
id
 
850
echo "CGI scripts work"
 
851
echo "Now we try to invoke Python interpreters and get their versions:"
 
852
python -V 2&gt;&amp;1
 
853
python2.3 -V 2&gt;&amp;1
 
854
python2.4 -V 2&gt;&amp;1
 
855
python2.5 -V 2&gt;&amp;1
 
856
echo "Finished."</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-41"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-42"></span><p class="line874">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 class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-43"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-44"></span><p class="line867">
 
857
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.DuellingPythons">Duelling Pythons</h1>
 
858
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-45"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-46"></span><p class="line862">The most common problem you might encounter is when you have an old Python version installed into "<tt class="backtick">/usr</tt>", and a newer Python distribution into "<tt class="backtick">/usr/local</tt>"; this is typical for GNU/Linux distributions that still come bundled with an old Python version. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-47"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-48"></span><p class="line862">In that case, if you enter "<tt class="backtick">python</tt>" on your prompt, you will usually get the more recent Python interpreter, because "<tt class="backtick">/usr/local/bin</tt>" is in your <tt class="backtick">PATH</tt>. The situation is different in your webserver environment, and thus you might have to change the bang path of "<tt class="backtick">moin.cgi</tt>", like this: <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-49"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-50"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-51"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-52"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-53"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-55"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-56"></span><pre>"""
 
859
    MoinMoin - CGI Driver Script
 
860
...
 
861
"""</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-57"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-58"></span><ul><li><p class="line862">When installing, make sure you install with the version of python you want to run moin with. <tt class="backtick">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 class="backtick">/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 class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-60"></span></li></ul><p class="line867">
 
862
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.Missingfilepermissions">Missing file permissions</h1>
 
863
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-62"></span><p class="line862">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 class="backtick">install.log</tt>, or run the command:  <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-64"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-66"></span><pre>python -c "import sys; print '%s/lib/python%s/site-packages' % ( sys.prefix, sys.version[:3] )"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-68"></span><p class="line862">For the example below, we'll assume that the Python module directory is <tt class="backtick">/usr/local/lib/python2.4/site-packages</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-69"></span>Make the files world-readable using the following commands: <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-70"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-72"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-73"></span><pre>cd /usr/local
 
864
chmod -R a+rX lib/python2.4/site-packages/MoinMoin</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-74"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-75"></span><p class="line867">
 
865
<h1 id="HelpOnInstalling.2BAC8-TroubleShooting.SetYourVariablesCarefully">Set Your Variables Carefully</h1>
 
866
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-76"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-77"></span><p class="line862">Be especially careful when you retype instead of cut and paste. Quoting errors in <tt class="backtick">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 class="backtick">wikiconfig.py</tt> or <tt class="backtick">farmconfig.py</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-78"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-79"></span><p class="line867">
 
867
<h2 id="HelpOnInstalling.2BAC8-TroubleShooting.moin.cgifound.2CMoindoesn.27trun">moin.cgi found, Moin doesn't run</h2>
 
868
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-80"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-81"></span><p class="line862">If you have to add the moin code location into the system path, make sure to specify the place <tt class="backtick"></tt>above<tt class="backtick"></tt> MoinMoin itself, so that the word MoinMoin is recognized during the import request.   <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-82"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-83"></span><p class="line867">
 
869
<h2 id="HelpOnInstalling.2BAC8-TroubleShooting.CSSfilesdonotwork">CSS files do not work</h2>
 
870
<span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-84"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-85"></span><p class="line874">A very common error is missing CSS styles. Your wiki looks bare and ugly, unlike this nice wiki. In most cases, you did break the configuration by not reading the instructions. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-86"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-87"></span><p class="line862">The fix is very easy: make sure your Apache Alias and <a class="nonexistent" href="http://master17.moinmo.in/ScriptAlias">ScriptAlias</a> are <strong>NOT</strong> the same. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-88"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-89"></span><p class="line862">This Apache setup will <strong>never work</strong>: <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-90"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-92"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-93"></span><pre>Alias /wiki/ "/prefix/share/moin/htdocs/"
 
871
ScriptAlias /wiki/ "/var/www/wiki/moin.cgi"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-94"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-95"></span><p class="line862">The Alias is used to serve static files: css, images, etc. <a class="nonexistent" href="http://master17.moinmo.in/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://master17.moinmo.in/ScriptAlias">ScriptAlias</a>, or Alias, but Alias must match the <tt class="backtick">url_prefix_static</tt> configuration option. <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-96"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-97"></span><p class="line874">Here is an example that works (the default): <span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-98"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-100"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-101"></span><pre># Apache config
 
872
Alias /moin_static170/ "/prefix/share/moin/htdocs/"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-102"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-104"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-105"></span><pre># Wiki config
 
873
    url_prefix_static = '/moin_static170'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.line-106"></span><span class="anchor" id="HelpOnInstalling.2BAC8-TroubleShooting.bottom"></span></div> <span class="anchor" id="line-78"></span><span class="anchor" id="bottom"></span></div><p id="pageinfo" class="info" lang="en" dir="ltr">MoinMaster: MoinMoin/InstallDocs  (last edited 2008-06-08 14:27:37 by <span title="??? @ localhost[127.0.0.1]">localhost</span>)</p>
794
874
<div id="pagebottom"></div>
795
875
</div>
796
876
</body>