Ticket #15077: ticket-15077.diff

File ticket-15077.diff, 2.3 KB (added by Horst Gutmann <zerok@…>, 4 years ago)
  • docs/howto/deployment/fastcgi.txt

    diff --git a/docs/howto/deployment/fastcgi.txt b/docs/howto/deployment/fastcgi.txt
    index 8d2c531..ab83e01 100644
    a b This is probably the most common case, if you're using Django's admin site: 
    225225Django will automatically use the pre-rewrite version of the URL when
    226226constructing URLs with the ``{% url %}`` template tag (and similar methods).
    227227
     228Using mod_fcgid as alternative to mod_fastcgi
     229----------------------------------------------
     230
     231Another way to serve applications through FastCGI is by using Apache's
     232`mod_fcgid`_ module. Compared to mod_fastcgi mod_fcgid handles FastCGI
     233applications differently in that it manages the spawning of worker processes
     234by itself and doesn't offer something like ``FastCGIExternalServer``. This
     235means that the configuration looks slightly different.
     236
     237In effect, you have to go the way of adding a script handler similar to what
     238is described later on regarding running Django in a :ref:`shared-hosting
     239environment <apache_shared_hosting>`. For further details please refer to the
     240`mod_fcgid reference`_
     241
     242.. _mod_fcgid: http://httpd.apache.org/mod_fcgid/
     243.. _mod_Fcgid reference: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
     244
    228245lighttpd setup
    229246==============
    230247
    The Cherokee project provides a documentation to `setting up Django`_ with Chero 
    306323
    307324.. _setting up Django: http://www.cherokee-project.com/doc/cookbook_django.html
    308325
     326.. _apache_shared_hosting:
     327
    309328Running Django on a shared-hosting provider with Apache
    310329=======================================================
    311330
    be sure to make it executable: 
    349368    from django.core.servers.fastcgi import runfastcgi
    350369    runfastcgi(method="threaded", daemonize="false")
    351370
     371This works if your server uses mod_fastcgi. If, on the other hand, you are
     372using mod_fcgid the setup is mostly the same except for a slight change in the
     373``.htaccess`` file. Instead of adding a fastcgi-script handler, you have to
     374add a fcgid-handler:
     375
     376.. code-block:: apache
     377   
     378    AddHandler fcgid-script .fcgi
     379    RewriteEngine On
     380    RewriteCond %{REQUEST_FILENAME} !-f
     381    RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
     382
    352383Restarting the spawned server
    353384-----------------------------
    354385
Back to Top