[mod_python] Mod python + apache problem

Martin Lesser ml at bettercom.de
Sat May 28 17:07:32 EDT 2005


Rafal Zawadzki <bluszcz at jabberpl.org> writes:

> Fragments my configurations are:
>
> <Directory /var/www/modpython>
>         AllowOverride All
>         AddHandler python-program .py
>         PythonHandler mptest.py #i tried also with mptest (withoout .py)
>         PythonDebug On
> </Directory>

Do you want to use the publisher-handler? (Makes sense)? Then put 

  PythonHandler mod_python.publisher

into your apache-config or .htaccess

Additionally you may want to put

  MultiviewsMatch Handlers

also in there so that URIs like
http://your.domain/path/whatever

will in fact be handeled by

def whatever(req):
  ...

in the file path.py in your htdocs-documentroot

IIRC you have to put

  DirectoryIndex ... index.py ...

into your global apache-conf to make the extension-less URIs work.

HTH, Martin


More information about the Mod_python mailing list