I need to make Django cooexist with mailman. As I understand it, Django
normally proccesses all requests which are sent to www.my-domain.name.
What I need to figure out is how to avoid that. I want to get Django to
ignore some URLs. For exampel, I would like to have requests to
www.my-domain.name/mailman to be handled completly outside Django.
My first take was to redirect all requests for
www.my-domain.name/mailman to another apache server at
www.my-domain.name:8090/mailman, but that only partly worked. Mailman
is a cgi-script, any POSTs that are redirected are globbed, so one
cannot post any data - which is an requirement. I then tried to use
Djangos redirect feature, but that didn't work at all.
Next I tried to create a virtualhost listening at another port (8090).
Didn't help - Django took care of the request. Now I'm thinking of
having Django be configured as a virtual host and have an .htaccess
file with a RedirectMatch rule point to the Django app.
Any one has any suggestions? Can it be done by using Djangos URLconf?
TIA,
Peter Brink
Hey Peter,
This is simple to do -- just put a "SetHandler None" for /mailman/ in
Apache's httpd.conf file.
<Location "/mailman/">
SetHandler None
</Location>
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com
On 17 Aug 2006, at 16:50, Peter Brink wrote:
> I need to make Django cooexist with mailman. As I understand it,
> Django normally proccesses all requests which are sent to www.my-
> domain.name. What I need to figure out is how to avoid that. I want
> to get Django to ignore some URLs. For exampel, I would like to
> have requests to www.my-domain.name/mailman to be handled completly
> outside Django.
if you’re using Django with Apache and mod_python, it’s just a matter
of adding something like this to your Apache configuration file,
inside the options for the my-domain.name Virtual Host:
<Location "/mailman/">
SetHandler None
</Location>
I use it also for other static files like robots.txt or favicon.ico,
so they don’t have to pass through Django but get served right ahead
from Apache.
Cheers.
--
Antonio
Aha... thanks! How easy does not problems seem when you have the right
answer. :-)
/Peter Brink