[mod_python] Default function for Publisher in 3.0

Arcady Genkin agenkin-lst-mod_python at thpoon.com
Sun Nov 10 17:11:26 EST 2002


Arcady Genkin <agenkin-lst-mod_python at thpoon.com> writes:

> this does not seem to work with "DirectoryIndex index.py".

An update: I had a problem with configuration (using AddHandler
directive instead of the SetHandler, as recommended in the docs).
However, still can't use index.py implicitely.  Now the backtrace
looks this way:

,----
| Mod_python error: "PythonHandler mod_python.publisher"
| 
| Traceback (most recent call last):
| 
|   File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py",
|   line 335, in HandlerDispatch
|     result = object(req)
| 
|   File "/usr/local/lib/python2.2/site-packages/mod_python/publisher.py",
|   line 145, in handler
|     module = apache.import_module(module_name, req.get_config(), [path])
| 
|   File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py",
|   line 499, in import_module
|     f, p, d = imp.find_module(parts[i], path)
| 
| ImportError: No module named 
`----

The httpd.conf contains the following configuration:

,----
| <Directory "/var/www/data">
|    PythonDebug On
|    SetHandler python-program
|    PythonHandler mod_python.publisher
|    DirectoryIndex index.py
| </Directory>
`----

Something tells me that I am still doing something wrong.  I tried
setting DIrectoryIndex to "index" instead of "index.py", but this
still did not work.  Any ideas?

Many thanks,
-- 
Arcady Genkin : CDF Systems Administrator
http://www.cdf.toronto.edu/~agenkin/contact.html

guilt is the cause of more disauders
than history's most obscene marorders (E.E. Cummings)



More information about the Mod_python mailing list