[mod_python] Re: DirectoryIndex index.py?

StianSøiland stian at soiland.no
Thu Feb 5 07:23:28 EST 2004

On 2004-02-03 10:54:53, Leif K-Brooks wrote:

> I'm starting to like mod_python, but I'm running into a bit of a problem 
> with making a Python script a DirectoryIndex. I have this configuration:
> AddHandler python-program .py
> PythonHandler myhandler
> DirectoryIndex index.py
> But when I go to http://localhost/directory/, I get the Apache file 
> listing. My Python handler is stored in a seprate directory, and there's 
> no physical index.py file, so I'm guessing that Apache thinks there is 
> no file at all. How can I get it to use my DirectoryIndex?

That's correct - for some reason DirectoryIndex checking is done
directly at a file level by Apache, so a file index.py (or whatever)
must exist.

I've just used DirectoryIndex index and created an empty file 'index'.
Stupid - but works :) 

Stian Søiland               Work toward win-win situation. Win-lose
Trondheim, Norway           is where you win and the other lose.
http://www.soiland.no/      Lose-lose and lose-win are left as an
                            exercise to the reader.  [Limoncelli/Hogan]

More information about the Mod_python mailing list