comparison docs/INSTALL.html @ 3888:a016745f4cca

make install-docs interwiki
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Jul 2008 14:14:01 +0200
parents 8ffe79f29100
children a1f682e8f8f8
comparison
equal deleted inserted replaced
3886:3d3cbae4c550 3888:a016745f4cca
14 14
15 <!-- css only for MSIE browsers --> 15 <!-- css only for MSIE browsers -->
16 <!--[if IE]> 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"> 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]--> 18 <![endif]-->
19
19 20
20 21
21 22
22 <link rel="Start" href="http://master17.moinmo.in/FrontPage"> 23 <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" title="Wiki Markup" href="http://master17.moinmo.in/MoinMoin/InstallDocs?action=raw">
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 <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 </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 </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 <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 <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 <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>
127 <a href="#HelpOnInstalling.2BAC8-ApacheOnLinux.AdministratorScenario">Administrator Scenario</a><ol><li> 128 <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.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.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.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.ConfigureApache">Configure Apache</a></li><li>
157 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi">Configure moin.cgi</h3> 158 <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 <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 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 <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 <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 "Alias /moin_static170/ \"$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 &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_static170/ /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 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 <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 <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 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 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 <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 <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">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-114"></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-115"></span></li><li>Try to edit it and save your changes. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-116"></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-117"></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-118"></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-119"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-120"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-121"></span><p class="line867">
171 <h2 id="HelpOnInstalling.2BAC8-ApacheOnLinux.SimpleUserScenario">Simple User Scenario</h2> 172 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-122"></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-123"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-124"></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-125"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-126"></span><p class="line867">
173 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Makesure.2BAC8Afg-usernameworks">Make sure /~username works</h3> 174 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-127"></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-128"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-129"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-130"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-131"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-132"></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 drwxr-xr-x 2 mm users 4096 Nov 30 00:29 public_html</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-133"></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-134"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-135"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-136"></span><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><pre>&gt; mkdir public_html
176 &gt; chmod a+rx public_html 177 &gt; chmod a+rx public_html
177 &gt; ls -ld ~/public_html 178 &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 drwxr-xr-x 2 mm users 4096 Nov 30 00:35 public_html</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-141"></span><p class="line862">Now, check if the "<tt class="backtick">/~mm</tt>" URL works: <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-142"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-143"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-144"></span><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><pre>&gt; lynx -error_file=/dev/stderr -dump http://localhost/~mm/ &gt;/dev/null
179 URL=http://localhost/~mm/ (GET) 180 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 STATUS=HTTP/1.1 200 OK</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-148"></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-149"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-150"></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-151"></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-152"></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-153"></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-154"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-155"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-156"></span><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><pre>&gt; mkdir -p ~/public_html/cgi-bin
181 &gt; cat &gt; ~/public_html/cgi-bin/test.cgi 182 &gt; cat &gt; ~/public_html/cgi-bin/test.cgi
182 #!/bin/sh 183 #!/bin/sh
183 echo Content-Type: text/plain 184 echo Content-Type: text/plain
184 echo 185 echo
185 echo "CGI scripts work" 186 echo "CGI scripts work"
186 &lt;CTRL-D&gt; 187 &lt;CTRL-D&gt;
187 &gt; chmod a+rx ~/public_html/cgi-bin/test.cgi 188 &gt; chmod a+rx ~/public_html/cgi-bin/test.cgi
188 &gt; lynx -dump http://localhost/~jh/cgi-bin/test.cgi 189 &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 CGI scripts work</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-167"></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-168"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-169"></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-170"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-171"></span><p class="line867">
190 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Createawikiinstance-1">Create a wiki instance</h3> 191 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-172"></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-173"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-174"></span><p class="line867">
192 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Installthehtdocsfiles">Install the htdocs files</h3> 193 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-175"></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-176"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-177"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-178"></span><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><pre>&gt; cd ~/public_html
194 &gt; cp -R ~/share/moin/htdocs moin_static160 195 &gt; cp -R ~/share/moin/htdocs moin_static170
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 &gt; chmod -R a+rX moin_static170</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-182"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-183"></span><p class="line867">
196 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Installmoin.cgi-1">Install moin.cgi</h3> 197 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-184"></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-185"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-186"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-187"></span><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><pre>&gt; cd ~/public_html
198 &gt; mkdir cgi-bin 199 &gt; mkdir cgi-bin
199 &gt; cp $SHARE/server/moin.cgi cgi-bin 200 &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 &gt; chmod -R a+rx cgi-bin</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-192"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-193"></span><p class="line867">
201 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Configuremoin.cgi-1">Configure moin.cgi</h3> 202 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-194"></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-195"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-196"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-197"></span><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><pre>import sys
203 sys.path.insert(0, '/home/mm/lib/python2.4') 204 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/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 sys.path.insert(0, '/home/mm/share/moin/mywiki')</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-202"></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-203"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-204"></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-205"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-206"></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-207"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-208"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-209"></span><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><pre>def handle_request(req, env, form):
206 request = RequestCGI(req, env, form, properties = {'script_name': '/mywiki'}) 207 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 request.run()</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-213"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-214"></span><p class="line867">
208 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.ConfigureMoinMoin-1">Configure MoinMoin</h3> 209 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-215"></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-216"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-217"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-218"></span><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><pre> data_dir = '/home/mm/share/moin/mywiki/data/'
210 data_underlay_dir = '/home/mm/share/moin/mywiki/underlay/' 211 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 url_prefix = '/~mm/moin_static170'</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-222"></span><p class="line867">
212 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Testthewiki-1">Test the wiki</h3> 213 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-223"></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-224"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-225"></span><ul><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-226"></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-227"></span></li><li>Try to edit it and save your changes. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-228"></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-229"></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-230"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-231"></span></li></ul><p class="line874">If something goes wrong, have a look at Troubleshooting, below. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-232"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-233"></span><p class="line867">
214 <h2 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Troubleshooting">Troubleshooting</h2> 215 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-234"></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-235"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-236"></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-237"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-238"></span><p class="line867">
216 <h3 id="HelpOnInstalling.2BAC8-ApacheOnLinux.Addingpermissiontoservethehtdocsdirectory">Adding permission to serve the htdocs directory</h3> 217 <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 <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-239"></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-240"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-241"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-242"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-243"></span><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><pre># forbid access to the entire filesystem by default
218 &lt;Directory /&gt; 219 &lt;Directory /&gt;
219 Options None 220 Options None
220 AllowOverride None 221 AllowOverride None
221 Order deny,allow 222 Order deny,allow
222 Deny from all 223 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&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-250"></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-251"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-252"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-253"></span><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-254"></span><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><pre>Alias /wiki/ "/usr/share/moin/htdocs/"
224 &lt;Directory "/usr/share/moin/htdocs/"&gt; 225 &lt;Directory "/usr/share/moin/htdocs/"&gt;
225 Order deny,allow 226 Order deny,allow
226 Allow from all 227 Allow from all
227 &lt;/Directory&gt; 228 &lt;/Directory&gt;
228 ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi" 229 ScriptAlias /mywiki "/usr/share/moin/mywiki/cgi-bin/moin.cgi"
229 &lt;Directory "/usr/share/moin/mywiki/cgi-bin"&gt; 230 &lt;Directory "/usr/share/moin/mywiki/cgi-bin"&gt;
230 Order deny,allow 231 Order deny,allow
231 Allow from all 232 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 &lt;/Directory&gt;</pre><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-264"></span><p class="line874">Of course, you need to adapt the paths to your particular situation. <span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnLinux.line-265"></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 <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 <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 <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>
236 <a href="#HelpOnInstalling.2BAC8-FastCgi.UsingMoinMoinwithFastCgi">Using MoinMoin with FastCgi</a></li><li> 237 <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.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.Scriptoptions">Script options</a></li><li>
239 <a href="#HelpOnInstalling.2BAC8-FastCgi.FastCgiExternalServer">FastCgiExternalServer</a></li><li> 240 <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.FastCgiServer">FastCgiServer</a></li><li>
524 #import sys 525 #import sys
525 #sys.path.insert(0, '/path/to/moin_code') 526 #sys.path.insert(0, '/path/to/moin_code')
526 from MoinMoin.script.moin import run 527 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 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 <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 <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 or redirect a port as <tt>root</tt>. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-54"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-55"></span><p class="line867">
531 <h3 id="HelpOnInstalling.2BAC8-StandaloneServer.A1stmethod.28recommended.29">1st method (recommended)</h3>
532 <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-56"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-57"></span><p class="line874">Run standalone on port 8080 as described above and using iptables redirect all traffic from port 80 to 8080, <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-58"></span>assuming your external ip adress is 10.0.0.1: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-59"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-60"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-61"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-62"></span><pre>-A net_dnat -d 10.0.0.1/32 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.0.0.1:8080</pre><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-63"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-64"></span><p class="line867">
533 <h3 id="HelpOnInstalling.2BAC8-StandaloneServer.A2ndmethod.28notrecommended.29">2nd method (not recommended)</h3>
534 <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-65"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-66"></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-67"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-68"></span><p class="line867">
530 <h2 id="HelpOnInstalling.2BAC8-StandaloneServer.StandaloneServerconfiguration">Standalone Server configuration</h2> 535 <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> 536 <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-69"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-70"></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-71"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-72"></span><div><table><tbody><tr> <td><p class="line862"> <strong>Option</strong> </td>
532 <td><p class="line862"> <strong>Default</strong> </td> 537 <td><p class="line862"> <strong>Default</strong> </td>
533 <td><p class="line862"> <strong>Comment</strong> </td> 538 <td><p class="line862"> <strong>Comment</strong> </td>
534 </tr> 539 </tr>
535 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-62"></span><p class="line862"> name </td> 540 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-73"></span><p class="line862"> name </td>
536 <td><p class="line862"> <tt>'moin'</tt> </td> 541 <td><p class="line862"> <tt>'moin'</tt> </td>
537 <td><p class="line862"> Server name, used by default for log and pid files. </td> 542 <td><p class="line862"> Server name, used by default for log and pid files. </td>
538 </tr> 543 </tr>
539 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-63"></span><p class="line862"> docs </td> 544 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-74"></span><p class="line862"> docs </td>
540 <td><p class="line862"> <tt>'/usr/share/moin/wiki/htdocs'</tt> </td> 545 <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> 546 <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> 547 </tr>
543 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-64"></span><p class="line862"> user </td> 548 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-75"></span><p class="line862"> user </td>
544 <td><p class="line862"> <tt>'www-data'</tt> </td> 549 <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> 550 <td><p class="line862"> If you run as root, the server will run with as this user </td>
546 </tr> 551 </tr>
547 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-65"></span><p class="line862"> group </td> 552 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-76"></span><p class="line862"> group </td>
548 <td><p class="line862"> <tt>'www-data'</tt> </td> 553 <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> 554 <td><p class="line862"> If you run as root, the server will run with as this group </td>
550 </tr> 555 </tr>
551 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-66"></span><p class="line862"> port </td> 556 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-77"></span><p class="line862"> port </td>
552 <td><p class="line862"> <tt>8000</tt> </td> 557 <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> 558 <td><p class="line862"> Port to serve. To serve privileged port under 1024 you will have to run as root </td>
554 </tr> 559 </tr>
555 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-67"></span><p class="line862"> interface </td> 560 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-78"></span><p class="line862"> interface </td>
556 <td><p class="line862"> <tt>'localhost'</tt> </td> 561 <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> 562 <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> 563 </tr>
559 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-68"></span><p class="line862"> serverClass </td> 564 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-79"></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> 565 <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> 566 <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> 567 </tr>
563 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-69"></span><p class="line862"> threadLimit </td> 568 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-80"></span><p class="line862"> threadLimit </td>
564 <td><p class="line862"> <tt>10</tt> </td> 569 <td><p class="line862"> <tt>10</tt> </td>
565 <td><p class="line862"> How many threads to create. </td> 570 <td><p class="line862"> How many threads to create. </td>
566 </tr> 571 </tr>
567 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-70"></span><p class="line862"> requestQueueSize </td> 572 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-81"></span><p class="line862"> requestQueueSize </td>
568 <td><p class="line862"> <tt>50</tt> </td> 573 <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> 574 <td><p class="line862"> The count of socket connection requests that are buffered by the operating system. </td>
570 </tr> 575 </tr>
571 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-71"></span><p class="line862"> properties </td> 576 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-82"></span><p class="line862"> properties </td>
572 <td><p class="line862"> <tt>&nbsp;{}&nbsp;</tt> </td> 577 <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> 578 <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> 579 </tr>
575 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-72"></span><p class="line862"> ssl_privkey </td> 580 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-83"></span><p class="line862"> ssl_privkey </td>
576 <td><p class="line862"> <tt>&nbsp;None&nbsp;</tt> </td> 581 <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> 582 <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> 583 </tr>
579 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-73"></span><p class="line862"> ssl_certificate </td> 584 <tr> <td><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-84"></span><p class="line862"> ssl_certificate </td>
580 <td><p class="line862"> <tt>&nbsp;None&nbsp;</tt> </td> 585 <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> 586 <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> 587 </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"> 588 </tbody></table></div><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-85"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-86"></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-87"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-88"></span></li></ul><p class="line867">
584 <h2 id="HelpOnInstalling.2BAC8-StandaloneServer.Configuringwikiconfig.py">Configuring wikiconfig.py</h2> 589 <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"> 590 <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-89"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-90"></span><p class="line874">The sample config file should be just fine. <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-91"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-92"></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-93"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-94"></span><p class="line867">
586 <h2 id="HelpOnInstalling.2BAC8-StandaloneServer.Usingthesecurestandaloneserver">Using the secure standalone server</h2> 591 <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" 592 <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-95"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-96"></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-97"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-98"></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-99"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-100"></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-101"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-102"></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-103"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-104"></span><p class="line874">For example, to create the server's private key, run the following: <span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-105"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-106"></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-107"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-108"></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-109"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-110"></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-111"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-112"></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-113"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-114"></span><p class="line867"><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-115"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-116"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-117"></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> 593 ssl_certificate = "/secure/path/to/cacert.pem"</pre><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-118"></span><span class="anchor" id="HelpOnInstalling.2BAC8-StandaloneServer.line-119"></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-120"></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>
589 <h1>Mac OS X Installation using Apache</h1> 594 <h1>Mac OS X Installation using Apache</h1>
590 <div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnMacOsx.top"></span> 595 <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> 596 <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>
592 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.SystemRequirements.26Preparation">System Requirements &amp; Preparation</a></li><li> 597 <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> 598 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Installation">Installation</a><ol><li>
594 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li> 599 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>
595 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuration">Configuration</a><ol><li> 600 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.Configuration">Configuration</a><ol><li>
596 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.CreatingaWikiInstance">Creating a Wiki Instance</a></li><li> 601 <a href="#HelpOnInstalling.2BAC8-ApacheOnMacOsx.CreatingaWikiInstance">Creating a Wiki Instance</a></li><li>
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> 640 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> 641 <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> 642 <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>
638 <h1>Windows Installation using Apache</h1> 643 <h1>Windows Installation using Apache</h1>
639 <div dir="ltr" id="HelpOnInstalling.2BAC8-ApacheOnWin32.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-ApacheOnWin32.top"></span> 644 <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> 645 <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>
641 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.SystemRequirements.26Preparation">System Requirements &amp; Preparation</a></li><li> 646 <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> 647 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.Installation">Installation</a><ol><li>
643 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingApache">Installing Apache</a></li><li> 648 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingApache">Installing Apache</a></li><li>
644 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingPython">Installing Python</a></li><li> 649 <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> 650 <a href="#HelpOnInstalling.2BAC8-ApacheOnWin32.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>
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"> 720 <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> 721 <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> 722 <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>
718 <h1>Windows Installation using IIS</h1> 723 <h1>Windows Installation using IIS</h1>
719 <div dir="ltr" id="HelpOnInstalling.2BAC8-InternetInformationServer.content" lang="en"><span class="anchor" id="HelpOnInstalling.2BAC8-InternetInformationServer.top"></span> 724 <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> 725 <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>
721 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Requirements.26Preparation">Requirements &amp; Preparation</a></li><li> 726 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Requirements.26Preparation">Requirements &amp; Preparation</a></li><li>
722 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Installation">Installation</a><ol><li> 727 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.Installation">Installation</a><ol><li>
723 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingIIS">Installing IIS</a></li><li> 728 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingIIS">Installing IIS</a></li><li>
724 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingPython">Installing Python</a></li><li> 729 <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> 730 <a href="#HelpOnInstalling.2BAC8-InternetInformationServer.InstallingMoinMoin">Installing MoinMoin</a></li></ol></li><li>