[mod_python] Setup apache for customized .py files to use mod_python ?

Jim Gallacher jg.lists at sympatico.ca
Wed May 4 16:11:48 EDT 2005


py pan wrote:
> The documentation of mod_python says to put the following into the
> http.conf of apache:
> 
> <Directory "c:/apache/Apache2/htdocs/test">
>         AddHandler mod_python .py
>         PythonHandler mptest
>         PythonDebug On
>     </Directory>
> 
> It seems to me that if I want to make use of this configuration, I
> will have to name my py file to mptest.py. That will make this
> configuration serves only one file. I did check and see that only
> mptest.py works.
> 
> How can I setup the apache such that any *.py file in that folder works?
> 
> Thx.

The mptest handler is really just for testing. You can create your own 
handler or use one included with mod_python. See 
http://www.modpython.org/live/current/doc-html/handlers.html

The publisher handler described in the docs is a good place to start.

Regards,
Jim


More information about the Mod_python mailing list