Opened 17 years ago

Closed 17 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)

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

Attachment: generalize_flup.diff added

Suggested enhancement

comment:1 by dbt@…, 17 years ago

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 by anonymous, 17 years ago

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

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

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

comment:4 by Malcolm Tredinnick, 17 years ago

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 by Malcolm Tredinnick, 17 years ago

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

by bp@…, 17 years ago

Attachment: flup_docs.patch added

Patch for doc files

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

This work for me. Thanks.

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

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

This work for me. Thanks.

For me too! Using scgi.

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

Attachment: docs.diff added

Docs with Malcolm's changes.

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

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 by Simon G. <dev@…>, 17 years ago

Needs documentation: unset

comment:10 by Malcolm Tredinnick, 17 years ago

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