Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to setup multiple Django instances on one Host with lighttpd. My problem is to get Djangos FCGI working on subdirectories served by my Webserver.

So my aim is the following:

  • -> django1.fcgi on localhost:3000

  • -> django2.fcgi on localhost:3001

  • -> django3.fcgi on localhost:3002

Unfortunately the following configuration doesn't even work for one:

$HTTP["url"] =~ "^/django0/static($|/)" {
        server.document-root = "/home/django0/django/static/"

$HTTP["url"] =~ "^/django0/media($|/)" {
        server.document-root = "/usr/lib/python2.7/dist-packages/django/contrib/admin/media/"

$HTTP["url"] =~ "^/django0($|/)" {
        proxy.server = ( "" => ( (
                "host" => "",
                "port" => "3001",
                "check-local" => "disable",
                ) )

The only response I get is an 404 and even this takes a long time till I get this. I found nothing suspicious neither in the access.log nor in the error.log.

share|improve this question

migrated from Nov 12 '12 at 16:03

This question came from our site for computer enthusiasts and power users.

You can run multiple sites on one Django instance. – Gant Nov 11 '12 at 20:50
Thanks for the hint, but I have good reasons not to do this, because some apps are unstable. – tvn Nov 12 '12 at 14:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.