Make Django cooexist with other webbapps

0 views
Skip to first unread message

Peter Brink

unread,
Aug 17, 2006, 10:50:54 AM8/17/06
to Django users
Hi list,

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

Adrian Holovaty

unread,
Aug 17, 2006, 11:06:40 AM8/17/06
to django...@googlegroups.com
On 8/17/06, Peter Brink <peter...@brinkdata.se> 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.

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

Antonio Cavedoni

unread,
Aug 17, 2006, 11:11:48 AM8/17/06
to django...@googlegroups.com
Hi Peter,

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


Peter Brink

unread,
Aug 17, 2006, 1:10:17 PM8/17/06
to django...@googlegroups.com
Antonio Cavedoni skrev:

>
> 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.
>

Aha... thanks! How easy does not problems seem when you have the right
answer. :-)

/Peter Brink

Reply all
Reply to author
Forward
0 new messages