Opened 17 years ago

Closed 16 years ago

#3047 closed enhancement (fixed)

[patch] Generalize fastcgi support to also include SCGI and AJP

Reported by: Barry Pederson <bp@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords: ajp scgi flup runserver
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Django gets its FastCGI support from the flup package. With a few minor changes to django/core/servers/fastcgi.py Django can have access to flup's other protocols: SCGI and AJP (Apache JServ Protocol). This patch allows 'manage.py runfcgi' to take another argument, 'protocol=XXX' where XXX is currently one of 'ajp', 'scgi', or 'fcgi' ('fcgi' is the default, for backwards compatibility). If flup adds other protocols following the existing flup module naming pattern, they'd automatically be supported by this patch too.

AJP is interesting because it's supported out-of-the box in Apache 2.2 with mod_proxy_ajp, and can be used with mod_proxy_balancer. SCGI is nice because mod_scgi is easier to setup than mod_fastcgi IMHO.

This ticket is admittedly covering the same ground as #3003 , but going about it in a more general way I hope.

Attachments (3)

generalize_flup.diff (2.9 KB) - added by Barry Pederson <bp@…> 17 years ago.
Suggested enhancement
flup_docs.patch (2.5 KB) - added by bp@… 17 years ago.
Patch for doc files
docs.diff (4.1 KB) - added by Simon G. <dev@…> 17 years ago.
Docs with Malcolm's changes.

Download all attachments as: .zip

Change History (13)

Changed 17 years ago by Barry Pederson <bp@…>

Attachment: generalize_flup.diff added

Suggested enhancement

comment:1 Changed 17 years ago by dbt@…

This is fantastic, and i use it all the time to get along with my non-fastcgi-friendly host. +1 for merge.

Thanks.

comment:2 Changed 17 years ago by anonymous

I hope this will go to into the next release, this seems to be exactly what i'm looking for!

comment:3 Changed 17 years ago by Simon G. <dev@…>

Keywords: ajp scgi flup runserver added
Triage Stage: UnreviewedReady for checkin

comment:4 Changed 17 years ago by Malcolm Tredinnick

Needs documentation: set
Triage Stage: Ready for checkinAccepted

This looks correct, but we also need a docs patch for fastcgi.txt. No need to change the name of that file, but the main heading in it should be changed (to mention SCGI and AJP) and the "--protocol" option documented.

comment:5 Changed 17 years ago by Malcolm Tredinnick

Small patches also may be needed in faq.txt and modpython.txt (just grep for "fastcgi" and make sure we mention the other protocols as well, so that somebody searching for those terms hits the right places).

Changed 17 years ago by bp@…

Attachment: flup_docs.patch added

Patch for doc files

comment:6 Changed 17 years ago by Jeong-Min Lee <falsetru@…>

This work for me. Thanks.

comment:7 in reply to:  6 Changed 17 years ago by anonymous

Replying to Jeong-Min Lee <falsetru@gmail.com>:

This work for me. Thanks.

For me too! Using scgi.

Changed 17 years ago by Simon G. <dev@…>

Attachment: docs.diff added

Docs with Malcolm's changes.

comment:8 Changed 17 years ago by Simon G. <dev@…>

Triage Stage: AcceptedReady for checkin

I've attached a docs patch which uses the original changes from Barry, and implements Malcolm's comments above.

comment:9 Changed 17 years ago by Simon G. <dev@…>

Needs documentation: unset

comment:10 Changed 16 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [4897]) Fixed #3047 -- Updated fastcgi documentation to mention SCGI and AJP support.
Thanks Barry Pederson and Simon Greenhill.

Note: See TracTickets for help on using tickets.
Back to Top