Description

SOLVED After installing the moinmoion on some machines the link mechanism doesn't work correctly.After clicking on a link in a main page you get http://10.1.1.40/mywiki//NewPage and you are still on a main page. Then you click on the same link again and you finally get to the page you wanted http://10.1.1.40/mywiki//NewPage/NewPage. This link structure should take you to the original page the first time. I have moinimoin running on debian. I am always following the same install procedure. 2/5 wikis I have installed have this problem, and I know other people that have similar issues.

Steps to reproduce

  1. I am following this install procedure.

apt-get update
apt-get install apache2
apt-get install libapache2-mod-python

Now Install moinmoin wiki.

apt-get install python-moinmoin
mkdir /var/www/mywiki
cp -r /usr/share/moin/data /usr/share/moin/underlay /usr/share/moin/server/moin.cgi /var/www/mywiki
chown -R www-data:www-data /var/www/mywiki

   1. Configure apache2
   2. Add the following lines to /etc/apache2/conf.d/wiki:

 Alias /wiki/ "/usr/share/moin/htdocs/"

 <Location /mywiki>
 SetHandler python-program
 PythonPath "['/var/www/mywiki','/etc/moin/']+sys.path"
 PythonHandler MoinMoin.request::RequestModPy.run
 PythonDebug On
 </Location>

   1. Reload apache2

 /etc/init.d/apach2 reload

   1. Configure Moinmoin
   2. Edit /etc/moin/farmconfig.py. You have 2 options.

wikis = [
    ("mywiki",  r".*"),   # this is ok for a single wiki
]

   1. Also, in /etc/moin/farmconfig.py comment out data_dir and data_underlay_dir (we need those defined separately for each wiki)
   2. [Check] See if /etc/moin/mywiki.py exists. If it does go ahead and edit it. If not copy this file to mywiki.py

   1. Then edit /etc/moin/mywiki.py

 sitename = u'MyWiki' # [Unicode]
 data_dir = '/var/www/mywiki/data'
 data_underlay_dir = '/var/www/mywiki/underlay'

Example

http://10.1.1.40/mywiki//NewHire/NewHire should be http://10.1.1.40/mywiki/NewHire http://10.1.1.40/mywiki//NewHire/CompanyNews should be http://10.1.1.40/mywiki/CompanyNews http://10.1.1.40/mywiki//CompanyNews/NewHire should be http://10.1.1.40/mywiki/NewHire http://10.1.1.40/mywiki//CompanyNews/CompanyNews should be http://10.1.1.40/mywiki/CompanyNews

apache accesslog

10.1.1.124 - - [13/Dec/2007:07:42:29 -0600] "GET /wiki/modern/img/moin-www.png HTTP/1.1" 200 150 "http://10.1.1.40/wiki/modern/css/common.css" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1)"
10.1.1.124 - - [13/Dec/2007:07:43:33 -0600] "GET /mywiki//CompanyNews HTTP/1.1" 200 10186 "http://10.1.1.40/mywiki/" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1)"
10.1.1.124 - - [13/Dec/2007:07:43:34 -0600] "GET /mywiki//CompanyNews/NewHire HTTP/1.1" 200 22126 "http://10.1.1.40/mywiki//UniqueNews" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-0etch1)"
10.1.1.124 - - [13/Dec/2007:07:44:12 -0600] "GET /mywiki//CompanyNews/CompanyNews HTTP/1.1" 200 12945 "http://10.1.1.40/mywiki//CompanyNews" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-

local wiki on my network. No outside access but can provide anything you guys need.

Component selection

Details

How can I get the traceback/logs from moinmoin.

MoinMoin Version:

python-moinmoin:

OS and Version

Debian Stable Etch

Python Version

python:

Server Setup

Given in second paragraph.

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

redirect from

/mywiki
to
/mywiki/FrontPage

Discussion

Please contact me at szybalski@gmail.com for more info.

This is likely a configuration problem (we had this before). As I don't use mod_python, I can just advise you doing a fullsearch and re-read the docs. If the docs are wrong or incomplete, but you find the solution somewhere else, I suggest you fix the docs (as none of the developers uses mod_python, noone else will fix it).

Plan

Solution

Include

PythonOption Location /mywiki

in apache config.

<Location /mywiki>
 SetHandler python-program
 PythonPath "['/var/www/mywiki','/etc/moin/']+sys.path"
 PythonHandler MoinMoin.request::RequestModPy.run
 PythonOption Location /mywiki
 PythonDebug On
</Location>

/!\ I suggest some mod_python user checks/updates the mod_python install docs on MoinMaster wiki. Don't expect that someone not using mod_python will do this.


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/LinksAndTwoForwardSlashes (last edited 2007-12-27 05:59:01 by p50815083)