1

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:

  • www.myhost.org/django0 -> django1.fcgi on localhost:3000

  • www.myhost.org/django1 -> django2.fcgi on localhost:3001

  • www.myhost.org/django2 -> 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" => "127.0.0.1",
                "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.

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

0

You must log in to answer this question.

Browse other questions tagged .