Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from superuser.com 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

 
discard

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

Browse other questions tagged or ask your own question.