= Server arrangements = Because Django uses [http://www.python.org/peps/pep-0333.html WSGI], it can run on any WSGI-compatible Web server. Here's how to run Django on various server arrangements. == Apache with mod_python == See the [http://www.djangoproject.com/documentation/modpython/ official documentation]. you can also look at the [wiki:django_apache_and_mod_rewrite] small tutorial. == Apache with FastCGI == See the [http://www.djangoproject.com/documentation/fastcgi/ official documentation]. Mac OS X users, see [wiki:OsxFcgi Django with FCGI on OS X]. == lighttpd with Apache == See [http://www.inerciasensorial.com.br/2007/06/10/perils-of-software-development/lighttpd-with-apache/ this page]. == lighttpd with FastCGI == See the [http://www.djangoproject.com/documentation/fastcgi/ official documentation]. Django/lighttpd/FastCGI [http://manuals.textdrive.com/read/book/15 instructions for use on TextDrive shared hosting accounts] are also available. == Multiple versions with FastCGI == See [wiki:MultipleVersionsWithFCGI]. == FastCGI init scripts == InitdScriptForLinux == Twisted.web2 == See #172. == TooFPy == See [http://simon.bofh.ms/cgi-bin/trac-toofpy.cgi/wiki/TooFPyAndDjango the description in the trac-wiki] for how to combine them. TooFPy is a pure-python webserver with focus on the creation of web services. == Apache with SCGI == [http://www.mems-exchange.org/software/scgi/ SCGI] can be used with Apache [https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoScgi#preview like this]. It builds on stuff from the Apache+FCGI documentation above. ''The material at simon.bofh.ms has been hard to get - server sometimes responds, sometimes not IME. In any event, #3047 has patches, and seems to be on track to become the official way to do SCGI with Django.'' == lighttpd with SCGI == See [http://sayspy.blogspot.com/2006/09/ignorant-newbie-running-django-using.html Running Django using SCGI through LightTPD]. == Django behind/inside Zope == It's possible to query a Django site from Zope or Plone and return the result. This allows you to include a Django site inside a pre-existing Zope/Plone site. It's good for custom content that you don't want to use existing Zope technologies to develop. For the code, see [http://bitprophet.org/code/django_to_zope.py this partly documented file]. It's in a temporary location for the time being; for more info, e-mail ''jeff (at) bitprophet (dot) org''. == CGI == Running Django as a traditional CGI is possible and would work the same as running any other sort of Python CGI script, but is generally not recommended. With traditional CGI, the program which will be run -- in this case, Django plus a Django-powered application -- is loaded from disk into memory each time a request is served, which results in a significant amount of processing overhead and much slower responses. FastCGI and SCGI, in contrast, load the code only once -- when the server starts up -- and keep it in memory as long as the server is running, resulting in much faster responses. If that hasn't put you off and you still need CGI, take a look at #2407. == WSGI with the !CherryPy Server == see [http://xhtml.net/scripts/Django-CherryPy-server-DjangoCerise Run your Django app with the CherryPy server - DjangoCerise]. == Django built-in development server == See the [http://www.djangoproject.com/documentation/django_admin/ official documentation].