WSGI Module
Manlio Perillo
manlio_perillo at libero.it
Thu Aug 26 23:38:52 MSD 2010
Il 26/08/2010 11:54, Jurie-Jan Botha ha scritto:
>> You have to manually change the config file, in order modify the python
>> instance to use.
>
> So there's no real easy way.
Right, since a contrib module can not hook into the Nginx configure
script, in order to add new configure variables (like --with-python)
> I'll see what I can get accomplished.
>
>> It will be never an official module.
>>
>> Nginx is not Apache, and executing arbitrary Python code inside a Nginx
>> process should be done very carefully.
>
> I don't know to much about how mod_wsgi works,
It is quite simple.
For each request whose location is handled by the wsgi module, an user
defined Python function is called.
When the Python function is called, an entire process is blocked until
the function return; Nginx process will be not be able to serve other
requests.
This may or may not be a problem, but a lot depends on the Python
application.
The suggested usage is to *always* (unless you know what you are doing)
place a "normal" Nginx instance as frontend, and put the Nginx instance
with the WSGI module as a backend, using the http proxy module.
> but I can understand
> it's use. If not an official 'mod_wsgi' module then something similar
> perhaps?
The only thing similar is the Perl module, that allows you to execute
Perl code inside Nginx.
But the intended usage it to execute small scripts; the intended usage
of the WSGI module is, instead, to execute WSGI applications.
> Perhaps you can point me to something I can read to help me
> understand.
>
Regards Manlio
More information about the nginx
mailing list