[mod_python] Publisher Handler(my own http404)

Deron Meranda deron.meranda at gmail.com
Mon May 8 10:19:23 EDT 2006


On 5/8/06, stefano cirilli <stefano.cirilli1 at virgilio.it> wrote:
> i'm trying to get my own http404 page, my configuration, in apache conf
> file(Apache 2.0.55, mod_python 3.2.8), looks like this:
> <Directory htdocs/users/http404>
> SetHandler mod_python
> PythonHandler mod_python.publisher
> </Directory>

I'm not exactly sure what you're trying to do, but it looks like you're
writing your own static file handler.  In which case I think it will be
best just to let Apache serve up your files rather than using mod_python.
(Not to mention the security flaws in your sample code).

Anyway if what you really meant to do was to create a custom 404
error page, you should look at the Apache ErrorDocument directive:
  http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

--
Deron Meranda



More information about the Mod_python mailing list