[mod_python] Default function for Publisher in 3.0

Michael C. Neel neel at mediapulse.com
Mon Nov 11 13:15:19 EST 2002


This is an untested guess, but I think apache needs to see "index.py" in
the document root before it will send the client a redirect to
spam.com/index.py - try doing a touch index.py in the doc root and see
what happens...

Mike

> -----Original Message-----
> From: Arcady Genkin [mailto:agenkin-lst-mod_python at thpoon.com] 
> Sent: Sunday, November 10, 2002 5:11 PM
> To: mod_python at modpython.org
> Subject: Re: [mod_python] Default function for Publisher in 3.0
> 
> 
> 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)
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list