Description

When I set up using mod_python I get an extra slash in my links, e.g. example.org/moin//WikiPage

Steps to reproduce

  1. Follow the steps in HelpOnInstalling/ApacheWithModPython.

Example

Comment out ScriptAlias and comment in Location and the slash appears.

<VirtualHost *:80>
    ServerName coot.ravenbrook.com
    ServerAdmin richard@brooksby.org

    DocumentRoot /home/rb/www/www.brooksby.org
    <Directory "/home/rb/www/www.brooksby.org">
        Allow from all
    </Directory>

    Alias /wiki/ "/usr/local/share/moin/htdocs/"
    <Directory "/usr/local/share/moin/htdocs/">
        Allow from all
    </Directory>

    ScriptAlias /moin "/home/rb/www/www.brooksby.org/moin/cgi-bin/moin.cgi"

#    CustomLog "| /usr/local/sbin/cronolog /home/www/logs/%Y-%m-%d/www.brooksby.org/access.log" combined
#    ErrorLog "| /usr/local/sbin/cronolog /home/www/logs/%Y-%m-%d/www.brooksby.org/error.log"

#    <Location /moin>
#        SetHandler python-program
#        PythonPath "['/home/rb/www/www.brooksby.org/moin'] + sys.path"
#        PythonHandler MoinMoin.request::RequestModPy.run
#        PythonDebug On
#    </Location>
</VirtualHost>

Details

MoinMoin Version

1.3.3

OS and Version

FreeBSD 5.3

Python Version

2.3.4

Server Setup

Apache httpd 2.0.50 + mod_python 3.1.3

Server Details

Workaround

Fall back to CGI setup.

Discussion

I am experiencing the same problem with MoinMoin 1.3.5. The problem only appears when using mod_python. My setup is the following:

MoinMoin install dir

/home/luc/moinmoin_wiki

Instance dir

/home/luc/personal/lucwiki

Contents of file /home/luc/personal/lucwiki/.htaccess:

SetHandler python-program
# Add the path of your wiki directory
PythonPath "['/home/luc/moinmoin_wiki/lib/python2.3/site-packages'] + sys.path"
PythonHandler MoinMoin.request::RequestModPy.run

MoinMoin Version

1.3.5

OS and Version

Linux 2.6.11 x64 / Fedora Core 1

Python Version

2.3.4

Server Setup

Apache httpd 2.0.52 + mod_python 3.1.3

Server Details

webhost: http://www.telana.com

I can provide shell access to any developpers wishing to witness the problem. Contact me at luc.wastiaux@airpost.net.

SetEnv PATH_INFO "/"
PythonOption Location /lucwiki
SetHandler python-program
# Add the path of your wiki directory
PythonPath "['/home/luc/personal/lucwiki', '/home/luc/moinmoin_wiki/lib/python2.3/site-packages'] + sys.path"
PythonHandler MoinMoin.request::RequestModPy.run

This makes the bug disappear.


I failed to reproduce this using your setup. This is the setup I used:

Alias /main-wiki/ "/Volumes/Home/nir/Projects/moin/main/wiki/htdocs/"

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName nirs.dyndns.org    
    <Location /main-mp>
        SetHandler python-program
        PythonPath "['/Volumes/Home/nir/wiki/main', '/Volumes/Home/nir/Projects/moin/main'] + sys.path"
        PythonHandler MoinMoin.request::RequestModPy.run
        PythonDebug On 
    </Location>    
</VirtualHost>

Tested on Mac OS X, MoinMoin 1.3.4 dev, Apache 2, mod_python 3.1.3, Python 2.4. -- NirSoffer 2005-03-11 01:03:02

Plan


CategoryMoinMoinBugFixed CategoryRelease1.3.5

MoinMoin: MoinMoinBugs/ExtraSlashInLinksUsingModPy (last edited 2007-10-29 19:12:47 by localhost)