[mod_python] SetHandler and a subdirectory with static contents (images)

vio vmilitaru at sympatico.ca
Thu Nov 14 21:00:38 EST 2002


Looks like you forgot to include the python suffix, which restricts what
file types are to be handled by mod_python.publisher. Try it like this:

<IfModule mod_python.c>
<Directory /var/www/data>
    AddHandler python-program .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>
</IfModule>

Cheer,
Vio


Arcady Genkin wrote:

> I cannot send image files when using the Publisher handler: apache
> tries to run them as Python programs. ;^)  I tried setting to handler
> for the images directory to the default, but it didn't work.  With
> Apache 2.0.43 and mod_python-3.0B4, I have the following config:
>
> ,----[ httpd.conf ]
> | <Directory "/var/www/data">
> |    PythonDebug On
> |    SetHandler python-program
> |    PythonHandler mod_python.publisher
> | </Directory>
> |
> | <Directory "/var/www/data/images">
> |   SetHandler default-handler
> | </Directory>
> `----
>
> Since /var/www/data is the DocumentRoot, I cannot place the images in
> a directory outside of it...
>
> What am I doing wrong?
> --
> Arcady Genkin
>
> 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