From 72dfcab0d43bd26166605d26dd89d33d6f033676 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 1 Apr 2007 06:00:45 +0000 Subject: [PATCH] Fixed #3047 -- Updated fastcgi documentation to mention SCGI and AJP support. Thanks Barry Pederson and Simon Greenhill. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4897 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + docs/faq.txt | 7 ++++--- docs/fastcgi.txt | 34 ++++++++++++++++++++++++++-------- docs/modpython.txt | 5 +++-- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/AUTHORS b/AUTHORS index 14ef57a5188..a05d2b4e49e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -156,6 +156,7 @@ answer newbie questions, and generally made Django that much better: oggie rob Jay Parlar pavithran s + Barry Pederson pgross@thoughtworks.com phaedo phil@produxion.net diff --git a/docs/faq.txt b/docs/faq.txt index 33e8ef01b41..4d2c7dedd77 100644 --- a/docs/faq.txt +++ b/docs/faq.txt @@ -328,8 +328,9 @@ Do I have to use mod_python? Although we recommend mod_python for production use, you don't have to use it, thanks to the fact that Django uses an arrangement called WSGI_. Django can -talk to any WSGI-enabled server. The most common non-mod_python deployment -setup is FastCGI. See `How to use Django with FastCGI`_ for full information. +talk to any WSGI-enabled server. Other common non-mod_python deployment +setups are FastCGI, SCGI, or AJP. See `How to use Django with FastCGI, SCGI or +AJP`_ for full information. Also, see the `server arrangements wiki page`_ for other deployment strategies. @@ -337,7 +338,7 @@ If you just want to play around and develop things on your local computer, use the development Web server that comes with Django. Things should Just Work. .. _WSGI: http://www.python.org/peps/pep-0333.html -.. _How to use Django with FastCGI: ../fastcgi/ +.. _How to use Django with FastCGI, SCGI or AJP: ../fastcgi/ .. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements How do I install mod_python on Windows? diff --git a/docs/fastcgi.txt b/docs/fastcgi.txt index 5ecaac86663..e73c6f3df95 100644 --- a/docs/fastcgi.txt +++ b/docs/fastcgi.txt @@ -1,11 +1,16 @@ -============================== -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 talks about FastCGI, although other flup-supported + protocols such as SCGI and AJP are supported. 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 +79,23 @@ 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`_. +Your preferred protocol can be selected by using the `protocol=` option with +`./manage.py runfcgi` where may currently be one of: `fcgi` (the default), +`scgi`, or `ajp`. + +.. _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 -------- diff --git a/docs/modpython.txt b/docs/modpython.txt index 5fd916f2b82..31ec1efe497 100644 --- a/docs/modpython.txt +++ b/docs/modpython.txt @@ -13,14 +13,15 @@ other server arrangements. Django requires Apache 2.x and mod_python 3.x, and you should use Apache's `prefork MPM`_, as opposed to the `worker MPM`_. -You may also be interested in `How to use Django with FastCGI`_. +You may also be interested in `How to use Django with FastCGI, SCGI or AJP`_ +(which also covers SCGI and AJP). .. _Apache: http://httpd.apache.org/ .. _mod_python: http://www.modpython.org/ .. _mod_perl: http://perl.apache.org/ .. _prefork MPM: http://httpd.apache.org/docs/2.2/mod/prefork.html .. _worker MPM: http://httpd.apache.org/docs/2.2/mod/worker.html -.. _How to use Django with FastCGI: ../fastcgi/ +.. _How to use Django with FastCGI, SCGI or AJP: ../fastcgi/ Basic configuration ===================