List Info

Thread: fastcgi python django for some URLs, not others




fastcgi python django for some URLs, not others
country flaguser name
Germany
2007-08-16 15:44:36
I've got a website whose root is wordpress, running via
fastcgi php, no
problem.

Now I'd like to add Django at a few URLs, but not interfere
with the
rest of the site. In particular, I'd like any URL beginning
with
"/feedme/" or "/admin/" to run via
Django.

Working on just the first of these, I've gotten as far as:

$HTTP["url"] =~ "^/feedme/.*" {
        fastcgi.server = ( "/" => ((
                        "socket" =>
"/var/run/django/www_fcgi.sock",
                        "check-local" =>
"disable",
                        ))
                        )
}

This does indeed pass on to Django, but it seems to be
screwing up
the URL that Django sees, stripping off the initial
"feedme/": I
get the root of the Django site (just a place holder).
Accessing
'/feedme/feedme/' gets the page I'd like to see at
'/feedme/'.

I've tried changing the fcgi prefix from "/" to
"/feedme/", same result.
Changing it to "" or "/feedme" causes
Django problems, it seems to be
getting an completely empty URL. (no "/", even).
I've played with the
fastcgi.docroot setting to no useful (or even visible)
effect.

Accessing Django via the development server, or by letting
the fastcgi
run the whole site under lighttpd works as expected.

Any ideas? Just what is the magic of the 'prefix' setting in
fastcgi.server?

Regards,
Steve
-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a
stable operating
    system and Linus Torvalds claims to be trying to take
over the
    world.       -- seen on the net


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )