welcome: please sign in

The following 461 words could not be found in the dictionary of 7 words (including 7 LocalSpellingWords) and are highlighted below:
able   above   Absolute   absolute   abspath   access   Access   accessible   accessing   adjust   Adjust   Administration   after   all   allow   allowed   allright   also   an   and   another   Apache   apache   appear   appears   are   as   As   ask   assume   at   attachment   back   basic   Be   be   been   better   bgcolor   bin   binary   body   border   both   browse   browser   bunch   but   by   call   called   calling   can   cannot   cgi   change   check   choice   choose   Choose   chooses   chosen   client   code   colspan   com   comfortable   Common   complete   config   configuration   Configuration   Configure   Consult   contain   contains   content   Content   Contents   continue   copied   Copy   copy   correct   could   course   create   css   data   delete   deliver   denied   deny   depends   describe   described   describes   details   did   dir   directly   directories   directory   distribution   Do   do   document   documentation   does   domain   don   done   download   Download   edit   editor   encounter   End   env   environ   Environment   error   Error   errors   even   everything   example   Example   except   executable   execute   executed   execution   Exploration   Explore   explore   extension   farmconfig   favorite   few   file   Filename   files   find   Find   fine   first   First   Follow   following   for   forth   found   four   free   fresh   from   ftp   Gateway   get   gets   gives   going   guess   has   have   Having   having   head   Headers   help   Help   Here   hinder   hints   home   homework   hope   host   how   htaccess   htdocs   html   http   icons   If   if   images   immediately   import   Important   important   in   index   indicated   information   Information   Insert   insert   install   installation   installing   Installing   intensive   Interface   Internal   Internet   into   is   it   It   its   job   just   kind   knowledge   Later   latest   leads   least   lib   like   line   local   location   locations   main   make   manually   many   match   may   means   method   migration   modifications   Modify   more   most   must   Name   named   necessary   need   new   newer   nice   no   Not   not   noted   Now   nowhere   number   Of   of   On   on   one   online   only   open   Open   option   options   or   org   os   our   out   outside   packages   page   pages   path   Pedia   permission   permissions   place   Place   placed   placing   plan   planned   platform   Platform   Please   please   possible   prefix   Premature   print   privileges   Probably   probably   problems   processed   protect   protected   protection   provider   Ps   pubic   public   py   python   read   recommend   relative   rename   replace   Replace   report   reports   requested   required   resides   reveals   right   root   run   runs   same   says   screen   script   Script   scripts   search   see   See   separate   served   Server   server   service   Set   set   setup   shell   short   should   show   site   slash   small   So   so   Some   some   Sometimes   somewhere   source   ssh   start   static   Static   static170   steps   sticking   stoneage   stylesheets   summary   Summary   support   supports   sure   sys   System   table   Table   task   td   team   tell   telnet   templates   test   text   th   than   that   The   the   their   them   then   There   there   these   they   things   this   This   those   through   time   title   to   To   too   tr   transfer   transfered   try   Try   tuning   two   type   Uncomment   under   underlay   unpack   Unpack   up   upload   Upload   uploading   url   use   Use   using   usr   usually   value   variable   Variables   version   very   via   want   warned   We   we   web   webbrowser   webserver   what   whatever   when   whenever   where   whether   why   Wiki   wiki   wikiconfig   will   window   with   work   works   would   write   written   wrong   www   You   you   Your   your  

Clear message
Page Locked

HelpOnInstalling / ApacheOnLinuxFtp

HelpContents > HelpOnAdministration > HelpOnInstalling

1. Installing MoinMoin with Apache using ftp

This document describes how to install MoinMoin on the webserver of your ISP if you only have FTP access.

We will assume a few things:

Follow these steps:

1.1. Download the latest distribution of MoinMoin

Download the latest distribution of MoinMoin from MoinMoinDownload. Unpack it into a local directory. We do not need to run the setup.py script, we just work with the source code!

1.2. Explore the webserver configuration

Now it is time to find out how your ISP supports Python. If they support Python at all, they probably support the Common Gateway Interface (CGI). As noted above, I describe only this installation option. Now there is some homework for you to do:

   1 #!/usr/bin/python
   2 
   3 import os.path
   4 import os
   5 import sys
   6 
   7 try:
   8     __file__
   9 except NameError:
  10     __file__ = '?'
  11 
  12 print """Content-type: text/html
  13 
  14 <html>
  15 <head>
  16  <title>Python Exploration</title>
  17 </head>
  18 <body>
  19  <table border=1>
  20  <tr><th colspan=2>1. System Information</th></tr>
  21  <tr><td>Python</td><td>%s</td></tr>
  22  <tr><td>Platform</td><td>%s</td></tr>
  23  <tr><td>Absolute path of this script</td><td>%s</td></tr>
  24  <tr><td>Filename</td><td>%s</td></tr>
  25 """ % (sys.version,
  26        sys.platform,
  27        os.path.abspath('.'),
  28        __file__)
  29 print "<th colspan=2>2. Environment Variables</th>"
  30 for variable in os.environ:
  31     print "<tr><td>%s</td><td>%s</td></tr>\n" % (variable, os.environ[variable])
  32 print """
  33 </table>
  34 </body>
  35 </html>
  36 """

Download: explore.py

Some of the following problems may show up:

If everything works, a table should appear on your screen. It gives you some basic information on your webserver. Later we will need Python version, absolute path of this script, DOCUMENT_ROOT and SITE_URI.

1.3. Copy directories

You have to transfer four directories in the moin directory to your webserver.

SECURITY WARNING: If you have no choice but to place MoinMoin, underlay or data under apache's DOCUMENT_ROOT, it is very important to hinder apache from directly accessing them.

1. Use your favorite editor to create a file named .htaccess.

2. Insert into this file the text deny from all

3. Copy it via FTP into the directory you want to protect.

4. Try to access the protected directory via your webbrowser. If protection does work, you should see Access denied.

5. If you cannot protect these directories, please delete them from your webserver immediately. Do not continue your installation.

1.4. Configure

There are two files that need fine tuning:

Choose a location for these files on your webserver. You are free to choose, but apache must be able to execute moin.cgi. If necessary, you can even rename moin.cgi, for example to moin.py. I would recommend placing wikiconfig.py in a separate config directory that is not accessible by apache. Do not start uploading, we are going to make some modifications first.#

1.4.1. moin.cgi

Now open ./wiki/server/moin.cgi in your favorite editor.

(1) Adjust python path. First you have to adjust your python path in line 1. The new value depends on your ISPs setup.

(2) Set the path to MoinMoin. You will find a line

## sys.path.insert(0, 'PREFIX/lib/pythonX.X/site-packages')

Uncomment this line and replace the path information. If you have run explore.py on your webserver, you may use your knowledge of absolute path of this script to guess the absolute path to the MoinMoin directory.

Example: You transfered explore.py with your FTP-client into /public_html on your webserver. Absolute path of this script reveals /home/nowhere.com/public_html. You transfered MoinMoin to /MoinMoin. You plan to place moin.cgi as /pubic_html/index.py on your webserver. You would have to insert

sys.path.insert(0, '/home/nowhere.com')   # REPLACED!

Of course a relative path will be allright, too. So, sticking to our example, you could also insert

sys.path.insert(0, '..')

(3) Set the path to wikiconfig.py. Now search for

sys.path.insert(0, '/path/to/wikiconfig')

Insert the path to wikiconfig.py on your webserver.

Example: You transfered explore.py with your FTP-client into /public_html on your webserver. Absolute path of this script reveals /home/nowhere.com/public_html. Your planned location for wikiconfig.py is /config. You plan to place moin.cgi as /pubic_html/index.py on your webserver. You would have to insert

# choose one:
sys.path.insert(0, '/home/nowhere.com/config')           # absolute path
sys.path.insert(0, '../config')                          # path relative to moin.cgi

1.4.2. wikiconfig.py

Open ./wiki/config/wikiconfig.py.

(1) Set the path to your data directory. Try to find

data_dir = './data/'

Replace './data/' with whatever leads to your data directory.

Example: You transfered explore.py with your FTP-client into /public_html on your webserver. Absolute path of this script reveals /home/nowhere.com/public_html. You transfered data to /data. You plan to place moin.cgi as /pubic_html/index.py on your webserver. You would have to insert

# choose one:
data_dir = '/home/nowhere.com/data/'   # absolute path
data_dir = '../data/'                  # path relative to moin.cgi

(2) Set the path to your underlay directory. Try to find

data_underlay_dir = './underlay/'

Replace './underlay/' with whatever leads to the underlay directory on your webserver.

Example: You transfered explore.py with your FTP-client into /public_html on your webserver. Absolute path of this script reveals /home/nowhere.com/public_html. You transfered underlay to /underlay. You plan to place moin.cgi as /pubic_html/index.py on your webserver. You would have to insert

# choose one:
data_underlay_dir = '/home/nowhere.com/underlay/'   # absolute path
data_underlay_dir = '../underlay/'                  # path relative to moin.cgi

(3) Set the URL of your static files.

Static files like images and css files are served by Apache, not by moin. You install them in a location accessible by Apache, and tell moin what is the url of those files.

url_prefix = '/moin_static170' # depends on moin version

If you copied your htdocs directory to /moin_static170 under your document root, you don't need to change this.

Example: You placed explore.py under /public_html and called it with http://www.your-domain.com/explore.py. You placed htdocs as /public_html/moin_static170. So url_prefix is correct as it is, don't change it.

(4) Set configuration options. If you browse through wikiconfig.py, you will see a bunch of options. Set these options as you like. See HelpOnConfiguration for details.

1.5. Upload moin.cgi and wikiconfig.py

You are done! Upload moin.cgi and wikiconfig.py and test your wiki by calling moin.cgi through your webbrowser. You may have to set file permissions manually to allow the execution of moin.cgi. Be sure to upload both files to the directories described above.

2. Summary

Here is a short summary of an example installation. Having read this document, I hope you see what I did and why I did it.

ftp       ./wiki/data       ==>           /data
ftp       ./wiki/htdocs     ==>           /moin_static170
ftp       ./wiki/underlay   ==>           /underlay
ftp       ./MoinMoin        ==>           /MoinMoin

ftp       create directory     /config

create     ./.htaccess      insert content:
deny from all

ftp       ./.htaccess      ==>           /data
ftp       ./.htaccess      ==>           /underlay
ftp       ./.htaccess      ==>           /MoinMoin
ftp       ./.htaccess      ==>           /config

edit ./wiki/server/moin.cgi:

  replace:
           #!/usr/bin/env python
    by:
           #!/usr/bin/pythonX.X

  replace:
           ## sys.path.insert(0, 'PREFIX/lib/pythonX.X/site-packages')
    by:
           sys.path.insert(0, '.')

  replace:
           sys.path.insert(0, '/path/to/wikiconfig')
    by:
           sys.path.insert(0, './config')

ftp      ./wiki/server/moin.cgi   ==>     /moin.py

edit ./wiki/config/wikiconfig.py:

   set data_dir:
                   data_dir = './data/'

   set data_underlay_dir:
                   data_underlay_dir = './underlay/'

   set url_prefix:
                   url_prefix = '/moin_static170'

ftp      ./wiki/config/wikiconfig.py   ==>    /config/wikiconfig.py

3. If your provider's python is stoneage ...