Opened 10 years ago

Closed 9 years ago

#3047 closed enhancement (fixed)

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

Reported by: Barry Pederson <bp@…> Owned by: adrian
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: UI/UX:


Django gets its FastCGI support from the flup package. With a few minor changes to django/core/servers/ Django can have access to flup's other protocols: SCGI and AJP (Apache JServ Protocol). This patch allows ' 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@…> 10 years ago.
Suggested enhancement
flup_docs.patch (2.5 KB) - added by bp@… 9 years ago.
Patch for doc files
docs.diff (4.1 KB) - added by Simon G. <dev@…> 9 years ago.
Docs with Malcolm's changes.

Download all attachments as: .zip

Change History (13)

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

Suggested enhancement

comment:1 Changed 10 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.


comment:2 Changed 10 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 10 years ago by Simon G. <dev@…>

  • Keywords ajp scgi flup runserver added
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:4 Changed 9 years ago by mtredinnick

  • Needs documentation set
  • Triage Stage changed from Ready for checkin to Accepted

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 9 years ago by mtredinnick

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 9 years ago by bp@…

Patch for doc files

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

This work for me. Thanks.

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

Replying to Jeong-Min Lee <>:

This work for me. Thanks.

For me too! Using scgi.

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

Docs with Malcolm's changes.

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

  • Triage Stage changed from Accepted to Ready for checkin

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

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

  • Needs documentation unset

comment:10 Changed 9 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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