Django

Code

Ticket #3047 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

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

Reported by: Barry Pederson <bp@barryp.org> Assigned to: adrian
Component: Core framework Version:
Keywords: ajp scgi flup runserver Cc:
Triage Stage: Ready for checkin Has patch: 1
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

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

generalize_flup.diff (2.9 kB) - added by Barry Pederson <bp@barryp.org> on 11/20/06 19:57:36.
Suggested enhancement
flup_docs.patch (2.5 kB) - added by bp@barryp.org on 02/16/07 16:12:56.
Patch for doc files
docs.diff (4.1 kB) - added by Simon G. <dev@simon.net.nz> on 03/15/07 18:16:00.
Docs with Malcolm's changes.

Change History

11/20/06 19:57:36 changed by Barry Pederson <bp@barryp.org>

  • attachment generalize_flup.diff added.

Suggested enhancement

12/20/06 22:26:01 changed by dbt@meat.net

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

Thanks.

01/09/07 05:34:41 changed by anonymous

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

01/18/07 03:36:05 changed by Simon G. <dev@simon.net.nz>

  • keywords set to ajp scgi flup runserver.
  • stage changed from Unreviewed to Ready for checkin.

02/11/07 19:06:37 changed by mtredinnick

  • needs_docs set to 1.
  • 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.

02/11/07 19:08:59 changed 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).

02/16/07 16:12:56 changed by bp@barryp.org

  • attachment flup_docs.patch added.

Patch for doc files

(follow-up: ↓ 7 ) 02/27/07 00:57:45 changed by Jeong-Min Lee <falsetru@gmail.com>

This work for me. Thanks.

(in reply to: ↑ 6 ) 03/15/07 13:44:06 changed by anonymous

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

This work for me. Thanks.

For me too! Using scgi.

03/15/07 18:16:00 changed by Simon G. <dev@simon.net.nz>

  • attachment docs.diff added.

Docs with Malcolm's changes.

03/15/07 18:17:16 changed by Simon G. <dev@simon.net.nz>

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

03/15/07 18:17:24 changed by Simon G. <dev@simon.net.nz>

  • needs_docs deleted.

04/01/07 01:00:46 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3047 ([patch] Generalize fastcgi support to also include SCGI and AJP)




Change Properties
Action