[mod_python] mod_python.publisher weirdness

Jeff Hinrichs jlh at cox.net
Wed Apr 14 19:42:10 EST 2004


----- Original Message ----- 
From: "Jorey Bump" <list+mod_python at joreybump.com>
To: <mod_python at modpython.org>
Sent: Wednesday, April 14, 2004 10:33 AM
Subject: Re: [mod_python] mod_python.publisher weirdness


> Jeff Hinrichs wrote:
>
> > mod_python: 3.1.3
> > OS: FreeBSD 4.9 Stable
> > Apache: Apache/2.0.49 (Unix) mod_python/3.1.3 Python/2.3.3
> >
> > httpd.conf:
> > <Directory "/usr/local/www/data/mrt">
> >     SetHandler mod_python
> >     PythonHandler mod_python.publisher
> >     PythonDebug On
> > </Directory>
> > <Directory "/usr/local/www/data/mrtJDB">
> >     SetHandler mod_python
> >     PythonHandler mod_python.publisher
> >     PythonDebug On
> > </Directory>
> >
> > I have an index.py in each of the two directories.  On both pages a link
to
> >  http://mysite/mrt/  exists.
> [snip]
> > I must be doing something very wrong but I'm just not seeing it right
now.
>
> You're thinking of your files as pages instead of python modules. It's
> important that all of your modules have unique names or you will
> encounter conflicts, since they share one interpreter. Rename one of the
> modules to index2.py, and you may see the problem disappear.
>
> For this reason, you should avoid setting your DirectoryIndex to a
> python module (index.py). Use a gateway index.html page, instead, or
> link directly to the python file.
Could you explain what you mean by gateway index.html page? Something that
redirects requests to / to the proper module?

-jeff



More information about the Mod_python mailing list