Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #15077 -- Clarified FastCGI documentation with regard to shared…

… hosting providers. Thanks, Horst Gutmann.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 286e45e9ea2d2b64eb919fe91d923991d27a6dd6 1 parent 0b58e46
Jannis Leidel authored July 01, 2011

Showing 1 changed file with 31 additions and 0 deletions. Show diff stats Hide diff stats

  1. 31  docs/howto/deployment/fastcgi.txt
31  docs/howto/deployment/fastcgi.txt
@@ -225,6 +225,23 @@ This is probably the most common case, if you're using Django's admin site:
225 225
 Django will automatically use the pre-rewrite version of the URL when
226 226
 constructing URLs with the ``{% url %}`` template tag (and similar methods).
227 227
 
  228
+Using mod_fcgid as alternative to mod_fastcgi
  229
+----------------------------------------------
  230
+
  231
+Another way to serve applications through FastCGI is by using Apache's
  232
+`mod_fcgid`_ module. Compared to mod_fastcgi mod_fcgid handles FastCGI
  233
+applications differently in that it manages the spawning of worker processes
  234
+by itself and doesn't offer something like ``FastCGIExternalServer``. This
  235
+means that the configuration looks slightly different.
  236
+
  237
+In effect, you have to go the way of adding a script handler similar to what
  238
+is described later on regarding running Django in a :ref:`shared-hosting
  239
+environment <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
+
228 245
 lighttpd setup
229 246
 ==============
230 247
 
@@ -306,6 +323,8 @@ The Cherokee project provides a documentation to `setting up Django`_ with Chero
306 323
 
307 324
 .. _setting up Django: http://www.cherokee-project.com/doc/cookbook_django.html
308 325
 
  326
+.. _apache_shared_hosting:
  327
+
309 328
 Running Django on a shared-hosting provider with Apache
310 329
 =======================================================
311 330
 
@@ -349,6 +368,18 @@ be sure to make it executable:
349 368
     from django.core.servers.fastcgi import runfastcgi
350 369
     runfastcgi(method="threaded", daemonize="false")
351 370
 
  371
+This works if your server uses mod_fastcgi. If, on the other hand, you are
  372
+using 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
  374
+add 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
+
352 383
 Restarting the spawned server
353 384
 -----------------------------
354 385
 

0 notes on commit 286e45e

Please sign in to comment.
Something went wrong with that request. Please try again.