summaryrefslogtreecommitdiff
path: root/docs/fastcgi.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/fastcgi.txt')
-rw-r--r--docs/fastcgi.txt38
1 files changed, 30 insertions, 8 deletions
diff --git a/docs/fastcgi.txt b/docs/fastcgi.txt
index 5ecaac8666..119688096f 100644
--- a/docs/fastcgi.txt
+++ b/docs/fastcgi.txt
@@ -1,11 +1,17 @@
-==============================
-How to use Django with FastCGI
-==============================
+===========================================
+How to use Django with FastCGI, SCGI or AJP
+===========================================
Although the `current preferred setup`_ for running Django is Apache_ with
-`mod_python`_, many people use shared hosting, on which FastCGI is the only
-viable option. In some setups, FastCGI also allows better security -- and,
-possibly, better performance -- than mod_python.
+`mod_python`_, many people use shared hosting, on which protocols such as
+FastCGI, SCGI or AJP are the only viable options. In some setups, these protocols
+also allow better security -- and, possibly, better performance -- than mod_python.
+
+.. admonition:: Note
+
+ This document primarily focuses on FastCGI. Other protocols, such as SCGI
+ and AJP, are also supported, through the ``flup`` Python package. See the
+ "Protocols" section below for specifics about SCGI and AJP.
Essentially, FastCGI is an efficient way of letting an external application
serve pages to a Web server. The Web server delegates the incoming Web requests
@@ -74,10 +80,26 @@ your ``manage.py`` is), and then run ``manage.py`` with the ``runfcgi`` option::
If you specify ``help`` as the only option after ``runfcgi``, it'll display a
list of all the available options.
-You'll need to specify either a ``socket`` or both ``host`` and ``port``. Then,
-when you set up your Web server, you'll just need to point it at the host/port
+You'll need to specify either a ``socket``, ``protocol`` or both ``host`` and ``port``.
+Then, when you set up your Web server, you'll just need to point it at the host/port
or socket you specified when starting the FastCGI server.
+Protocols
+---------
+
+Django supports all the protocols that flup_ does, namely fastcgi_, `SCGI`_ and
+`AJP1.3`_ (the Apache JServ Protocol, version 1.3). Select your preferred
+protocol by using the ``protocol=<protocol_name>`` option with
+``./manage.py runfcgi`` -- where ``<protocol_name>`` may be one of: ``fcgi``
+(the default), ``scgi`` or ``ajp``. For example::
+
+ ./manage.py runfcgi --protocol=scgi
+
+.. _flup: http://www.saddi.com/software/flup/
+.. _fastcgi: http://www.fastcgi.com/
+.. _SCGI: http://python.ca/scgi/protocol.txt
+.. _AJP1.3: http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html
+
Examples
--------