Changes between Initial Version and Version 1 of DjangoUsingFlup


Ignore:
Timestamp:
Jan 4, 2006, 2:53:24 AM (19 years ago)
Author:
Armin Ronacher <armin.ronacher@…>
Comment:

created

Legend:

Unmodified
Added
Removed
Modified
  • DjangoUsingFlup

    v1 v1  
     1= Django using the Flup FastCGI Module =
     2
     3First you will need the [http://www.saddi.com/software/flup/dist/ Flup Package]. There is an egg, which can get installed very easy using `easy_install`.
     4
     5== FastCGI ==
     6For FastCGI you need a file called `yourapplication.fcg`. Insert the following code:
     7{{{
     8#!python
     9#!/usr/bin/env python
     10import os
     11import sys
     12from flup.server.fcgi import WSGIServer
     13from django.core.handlers.wsgi import WSGIHandler
     14
     15sys.path.insert(0, '/path/to/your/application')
     16os.environ['DJANGO_SETTINGS_MODULE'] = 'yourapplication.settings'
     17
     18WSGIServer(WSGIHandler()).run()
     19}}}
     20
     21Save somewhere (eg `/usr/lib/cgi-bin`) and open your apache.conf. Insert the following VHost:
     22{{{
     23<VirtualHost *>
     24        ServerName www.yourserver.com
     25        ServerAlias yourserver.com
     26        # Uncomment the next line when you want to use Suexec
     27        ##SuexecUserGroup youruser yourgroup
     28
     29        ScriptAlias / /path/to/yourapplication.fcg/
     30</VirtualHost>
     31}}}
     32
     33Enable and restart the Apache.
Back to Top