mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
96bf5e853c
commit
72dfcab0d4
1
AUTHORS
1
AUTHORS
|
@ -156,6 +156,7 @@ answer newbie questions, and generally made Django that much better:
|
||||||
oggie rob <oz.robharvey@gmail.com>
|
oggie rob <oz.robharvey@gmail.com>
|
||||||
Jay Parlar <parlar@gmail.com>
|
Jay Parlar <parlar@gmail.com>
|
||||||
pavithran s <pavithran.s@gmail.com>
|
pavithran s <pavithran.s@gmail.com>
|
||||||
|
Barry Pederson <bp@barryp.org>
|
||||||
pgross@thoughtworks.com
|
pgross@thoughtworks.com
|
||||||
phaedo <http://phaedo.cx/>
|
phaedo <http://phaedo.cx/>
|
||||||
phil@produxion.net
|
phil@produxion.net
|
||||||
|
|
|
@ -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,
|
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
|
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
|
talk to any WSGI-enabled server. Other common non-mod_python deployment
|
||||||
setup is FastCGI. See `How to use Django with FastCGI`_ for full information.
|
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.
|
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.
|
the development Web server that comes with Django. Things should Just Work.
|
||||||
|
|
||||||
.. _WSGI: http://www.python.org/peps/pep-0333.html
|
.. _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
|
.. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
|
||||||
|
|
||||||
How do I install mod_python on Windows?
|
How do I install mod_python on Windows?
|
||||||
|
|
|
@ -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
|
Although the `current preferred setup`_ for running Django is Apache_ with
|
||||||
`mod_python`_, many people use shared hosting, on which FastCGI is the only
|
`mod_python`_, many people use shared hosting, on which protocols such as
|
||||||
viable option. In some setups, FastCGI also allows better security -- and,
|
FastCGI, SCGI, or AJP are the only viable options. In some setups, these protocols
|
||||||
possibly, better performance -- than mod_python.
|
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
|
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
|
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
|
If you specify ``help`` as the only option after ``runfcgi``, it'll display a
|
||||||
list of all the available options.
|
list of all the available options.
|
||||||
|
|
||||||
You'll need to specify either a ``socket`` or both ``host`` and ``port``. Then,
|
You'll need to specify either a ``socket``, ``protocol`` or both ``host`` and ``port``.
|
||||||
when you set up your Web server, you'll just need to point it at the host/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.
|
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=`<protocol_name> option with
|
||||||
|
`./manage.py runfcgi` where <protocol-name> 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
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,15 @@ other server arrangements.
|
||||||
Django requires Apache 2.x and mod_python 3.x, and you should use Apache's
|
Django requires Apache 2.x and mod_python 3.x, and you should use Apache's
|
||||||
`prefork MPM`_, as opposed to the `worker MPM`_.
|
`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/
|
.. _Apache: http://httpd.apache.org/
|
||||||
.. _mod_python: http://www.modpython.org/
|
.. _mod_python: http://www.modpython.org/
|
||||||
.. _mod_perl: http://perl.apache.org/
|
.. _mod_perl: http://perl.apache.org/
|
||||||
.. _prefork MPM: http://httpd.apache.org/docs/2.2/mod/prefork.html
|
.. _prefork MPM: http://httpd.apache.org/docs/2.2/mod/prefork.html
|
||||||
.. _worker MPM: http://httpd.apache.org/docs/2.2/mod/worker.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
|
Basic configuration
|
||||||
===================
|
===================
|
||||||
|
|
Loading…
Reference in New Issue