Django on Windows with Abyss (FastCGI)


Developing with Django in Windows and want a more production-like environment? This is a solution I've got working now that seems really nice and lightweight.


This assumes you've got your Python and Django environment up and working and prepared it for FastCGI as detailed here: Download and install version 2.5 or higher of the Abyss web server from (free for personal use).

The text below is borrowed and modifed from the Rails configuration details at:
Here it assumes you've got a mysite project under c:\django and want to serve your other content from c:\django\public_html.

This was tested using Python 2.5 and Django development version (svn trunk).


Start Django in FastCGI mode

c:\> cd django\mysite
c:\django\mysite> python runfcgi method=threaded host= port=3033
  • Create an empty file called dispatch.fcgi in public_html. This seems to be required for the URLRewrite of Abyss to kick in. (There might be some other prettier solution to this though.)

Run Abyss Web Server and open its console

  • Select the host that will serve the Django application:
    • If you have Abyss Web Server X2, you can create a new one for that purpose.
    • If you have Abyss Web Server X1, you'll have to use the unique available host.
  • Press the Configure button associated with the host you have selected (in the Hosts table).
  • Select General.
    • Enter in the Documents Path field:

this is not a path - what is the correct text here?

  • Press OK.
  • Select Scripting Parameters and press Add in the Scripting Parameters table.
    • Set Interface to FastCGI (Remote - TCP/IP sockets).
    • Enter in Remote Server IP Address and set Port field to 3033.
    • Make sure the Type is Standard.
    • Press Add in the Extensions table, enter fcgi in the Extension field, press OK, then press OK a second time.
  • Select URL Rewriting, press Add in the URL Rewriting Rules table.
    • Enter in the Virtual Path Regular Expression field:
    • Press Add in the Conditions table.
    • Set Variable to REQUEST_FILENAME, set Operator to Is not a file, and press OK.
    • Press Add one more time in the Conditions table.
    • Set Variable to REQUEST_FILENAME, set Operator to Is not a directory, and press OK.
    • Set If this rule matches to Perform an internal redirection.
    • Set Redirect to to: /dispatch.fcgi?$1
    • Press OK.

Apply the modifications

  • Press Restart to restart the server.

Test the application and enjoy.

Last modified 14 years ago Last modified on 04/25/08 10:11:35
Back to Top