Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#152 closed (duplicate)

FCGI server for django

Reported by: gb@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Maybe the FCGI-WSGI-Server at might be useable for django? A runfcgi command for django-admin might run along the following lines:

def runfcgi():
    "Starts a FCGI server for production use"
    from django.core.servers.fcgi import WSGIServer
    from django.core.handlers.wsgi import WSGIHandler
runfcgi.args = ''

Attachments (1) (4.5 KB) - added by hugo <gb@…> 15 years ago.
FCGI server script

Download all attachments as: .zip

Change History (7)

comment:1 Changed 15 years ago by hugo <gb@…>

I have written a short description on how to get Django running with FCGI at Please have a look and feel free to steal anything you need for your documentation :-)

It's only a first take but should be enough to get people up and running with lighttpd and so should give a nice alternative for mod_python (especially for people still running apache 1.3, since they can't run the needed mod_python version).

Changed 15 years ago by hugo <gb@…>

Attachment: added

FCGI server script

comment:2 Changed 15 years ago by hugo <gb@…>

I added a script that starts a django project setting as a remote FCGI server on either a socket or a ip:port. This can be used to run django projects under their own user ID behind a webserver that itself runs under different rights or could be used in conjunction with some dispatching tool for load balancing a django installation.

The script works fine with Python 2.4. But it uses the preforked FCGI server from Flup (to better make use of SMP machines - due to the GIL, python threading doesn't help there) and that one uses socketpair. So to get it working with Python 2.3 you additionally need the Eunuchs package, because Python 2.3 doesn't have socket.socketpair.

The two packages can be found here:



Just start the without parameters to get a short help on what you can give as options.

comment:3 Changed 15 years ago by hugo <gb@…>

Ok, I have a documentation up how to use the script: This document goes into more detail and gives a much nicer configuration, I think.

comment:4 Changed 15 years ago by hugo

The most current scripts are in my repository.

comment:5 Changed 14 years ago by Adrian Holovaty

Resolution: duplicate
Status: newclosed

Superceded by #1736.

comment:6 Changed 14 years ago by Home

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