#152 closed (duplicate)
FCGI server for django
Reported by: | 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 |
Description
Maybe the FCGI-WSGI-Server at http://svn.saddi.com/py-lib/trunk/fcgi.py 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 WSGIServer(WSGIHandler()).run() runfcgi.args = ''
Attachments (1)
Change History (7)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
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:
Flup: http://www.saddi.com/software/flup/
Eunuchs: http://www.inoi.fi/open/trac/eunuchs
Just start the django-fcgi.py without parameters to get a short help on what you can give as options.
comment:3 by , 19 years ago
Ok, I have a documentation up how to use the script: http://hugo.muensterland.org/2005/07/27/django-lighttpd-and-fcgi-second-take/. This document goes into more detail and gives a much nicer configuration, I think.
comment:6 by , 18 years ago
Type: | defect |
---|
I have written a short description on how to get Django running with FCGI at http://hugo.muensterland.org/2005/07/26/running-django-with-fcgi-and-lighttpd/. 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).