django WSGI & limmiting connections

Almir Karic redduck666 at
Thu May 22 13:22:11 MSD 2008

i have two question, first relates to running django under nginx as
WSGI app, i can't seem to find any docs about it. right now i'm
running django apps as FCGI processes and have (ugly) shell script who
makes sure the FCGI processes are alive and restarts them when people
update the code, i am hopping to get rid of this ugly script by
introducing WSGI in my setup so that nginx alone can handle spawning
of whatever_wsgi_requires to serve the page correctly, is this
possible? any examples? (i can't seem to relate things in examples/ to
django :-() also i would like that every app runs as it's own user, is
this what wsgi_enable_subinterpreters is meant for?

my second question is related to protecting apache from web crawlers
(when they crawl the main site the entire server struggles). since i
already have nginx infront of apache i'm thinking on using it to
protect it as well :-). i'm thinking the ''optimal'' way to do it is
to make sure that no more than X times per Y ammount of time clients
can connect to apache, is there a way to achieve that (as far as i
read on wiki limit_conn can only make sure that no more than X
concurrent connections are accepted from a single ip)? is there any
better way to do this kind of thing?

For far too long, power has been concentrated in the hands of "root"
and his "wheel" oligarchy. We have instituted a dictatorship of the
users. All system administration functions will be handled by the
People's Committee for Democratically Organizing the System (PC-DOS).

More information about the nginx mailing list