Ticket #15077: ticket-15077.diff

File ticket-15077.diff, 2.3 KB (added by Horst Gutmann <zerok@…>, 7 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).
     228Using mod_fcgid as alternative to mod_fastcgi
     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.
     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`_
     242.. _mod_fcgid: http://httpd.apache.org/mod_fcgid/
     243.. _mod_Fcgid reference: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    228245lighttpd setup
    The Cherokee project provides a documentation to `setting up Django`_ with Chero 
    307324.. _setting up Django: http://www.cherokee-project.com/doc/cookbook_django.html
     326.. _apache_shared_hosting:
    309328Running Django on a shared-hosting provider with Apache
    be sure to make it executable: 
    349368    from django.core.servers.fastcgi import runfastcgi
    350369    runfastcgi(method="threaded", daemonize="false")
     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:
     376.. code-block:: apache
     378    AddHandler fcgid-script .fcgi
     379    RewriteEngine On
     380    RewriteCond %{REQUEST_FILENAME} !-f
     381    RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
    352383Restarting the spawned server
Back to Top