<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Nginx and uwsgi</title>
        <description> Hi,

 

We are building a Media Content Management and Delivery Platform based on
Python (and python based web framework like Pylons/Pyramid). We are planning
to use nginx as the web server.

 

We are new to nginx (have prior experience with Apache) and have downloaded
1.2.1. The OS is CentOS. 

 

We are not sure how uwsgi works with nginx:

1.       Do we have to start uwsgi as a separate process?

2.       There is no option/directives for loading modules in nginx (as it
is there in Apache).

3.       I couldn't find a good documentation on the uwsgi based directives.
The one in nginx wiki is confusing. 

 

Since nginx I think works as a reverse proxy where it forwards HTTP requests
to the uwsgi process, how about using something like Cherrypy or
PasteHTTPserver? Would there be any difference?

 

We would really appreciate your support regarding the above queries.

 

Looking forward to your response.

 

Thanks,

Pinakee Biswas

Director &amp;amp; CTO 

 

Description: Description: vvidialogo.jpg

Just watch it ! 

 

7E- Mail:  &amp;lt;mailto:pinakee@vvidiacom.com&amp;gt; &amp;#112;&amp;#105;&amp;#110;&amp;#97;&amp;#107;&amp;#101;&amp;#101;&amp;#64;&amp;#118;&amp;#118;&amp;#105;&amp;#100;&amp;#105;&amp;#97;&amp;#99;&amp;#111;&amp;#109;&amp;#46;&amp;#99;&amp;#111;&amp;#109; I 8Web:
http://www.vvidiacom.com/ http://www.vvidiacom.com 



 

P Please don't print this e-mail unless you really need to, this will
preserve trees on planet earth. 

----------------------------Disclaimer--------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---------

The information contained in this message (including any attachments) is
confidential and may be privileged. If you have received it by mistake
please notify the sender by return e-mail and permanently delete this
message and any attachments from your system. Please note that e-mails are
susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD.
(including its group companies) shall not be liable for the improper or
incomplete transmission of the information contained in this communication
nor for any delay in its receipt or damage to your system. 

----------------------------------------------------------------------------
---------------------------------------------Disclaimer---------------------
----------------------------------------------------------------------------
---------

 

_______________________________________________
nginx mailing list
&amp;#110;&amp;#103;&amp;#105;&amp;#110;&amp;#120;&amp;#64;&amp;#110;&amp;#103;&amp;#105;&amp;#110;&amp;#120;&amp;#46;&amp;#111;&amp;#114;&amp;#103;
http://mailman.nginx.org/mailman/listinfo/nginx</description>
        <link>http://www.serverphorums.com/read.php?5,511291,511291#msg-511291</link>
        <lastBuildDate>Fri, 24 May 2013 03:36:54 +0200</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://www.serverphorums.com/read.php?5,511291,511966#msg-511966</guid>
            <title>Re: Nginx and uwsgi</title>
            <link>http://www.serverphorums.com/read.php?5,511291,511966#msg-511966</link>
            <description><![CDATA[ -----BEGIN PGP SIGNED MESSAGE-----<br />
Hash: SHA1<br />
<br />
Il 11/06/2012 20:15, Roberto De Ioris ha scritto:<br />
&gt; [...]<br />
&gt; <br />
&gt;&gt; I was under the impression that the Python application can be embedded in<br />
&gt;&gt; Nginx using Wsgi.<br />
&gt; <br />
&gt; <br />
&gt; the only third-party-module allowing you to do so, is Manlio Perillo's<br />
&gt; mod_wsgi/mod_python for nginx. It is unmaintained, <br />
<br />
Well, recently I have started to work on it again; at least now it works<br />
with recent Nginx versions ;-).<br />
<br />
I have not yet pushed the latest changes to the public repository at:<br />
<a href="https://bitbucket.org/mperillo/ngx_http_wsgi_module" target="_blank"  rel="nofollow">https://bitbucket.org/mperillo/ngx_http_wsgi_module</a>.<br />
<br />
As Roberto pointed out, ngx_http_wsgi_module is not a &quot;general&quot; Python<br />
web application server; but it works rather well for &quot;carefully&quot; written<br />
applications, and memory usare is low.<br />
<br />
<br />
&gt; [...]<br />
<br />
<br />
Regards  Manlio Perillo<br />
-----BEGIN PGP SIGNATURE-----<br />
Version: GnuPG v1.4.10 (GNU/Linux)<br />
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank"  rel="nofollow">http://enigmail.mozdev.org/</a><br />
<br />
iEYEARECAAYFAk/XQaAACgkQscQJ24LbaUR9dgCfQWI7IltdxyvI49QwT3EN+VGT<br />
BMUAnRIvcNZohU59rDGszLI9Toupivq6<br />
=tu4T<br />
-----END PGP SIGNATURE-----<br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a>]]></description>
            <dc:creator>Manlio Perillo</dc:creator>
            <category>Nginx</category>
            <pubDate>Tue, 12 Jun 2012 15:20:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?5,511291,511503#msg-511503</guid>
            <title>RE: Nginx and uwsgi</title>
            <link>http://www.serverphorums.com/read.php?5,511291,511503#msg-511503</link>
            <description><![CDATA[ &gt; Hi Roberto,<br />
&gt;<br />
&gt; Thanks for the prompt response. That really helps.<br />
&gt;<br />
&gt; Our major consideration for going with Nginx is performance.<br />
&gt; If we have another process running (a wsgi server with python application)<br />
&gt; and nginx working as a proxy translating HTTP requests to another protocol<br />
&gt; (uwsgi, http or fastcgi), won't that be an overhead?<br />
<br />
<br />
Yes, there is an overhead, but it is practically irrelevant in the big<br />
scheme. Your bootleneck will hardly be the webserver or the application<br />
server. Running custom/non-deterministic apps directly in the webserver is<br />
a really old-style approach and afaik, only the php world still pushes<br />
this kind of setups.<br />
<br />
Take in account (as you came from apache), mod_wsgi preferred setup is in<br />
daemon mode, that is a beatiful abstraction of a proxied setup.<br />
<br />
<br />
&gt; I was under the impression that the Python application can be embedded in<br />
&gt; Nginx using Wsgi.<br />
<br />
<br />
the only third-party-module allowing you to do so, is Manlio Perillo's<br />
mod_wsgi/mod_python for nginx. It is unmaintained, and its preferred usage<br />
is in having another nginx in front of it proxying requests. Nginx is a<br />
non-blocking server, putting blocking code in it (as 90% of the webapps<br />
are), is the key to hell :)<br />
<br />
If you have got experience with apache+mod_wsgi, you can simply use nginx<br />
for serving static files and using apache+mod_wsgi (in embedded mode) as<br />
your application server for python/wsgi. This is now a very common setup.<br />
<br />
-- <br />
Roberto De Ioris<br />
<a href="http://unbit.it" target="_blank"  rel="nofollow">http://unbit.it</a><br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a>]]></description>
            <dc:creator>Roberto De Ioris</dc:creator>
            <category>Nginx</category>
            <pubDate>Mon, 11 Jun 2012 20:20:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?5,511291,511313#msg-511313</guid>
            <title>RE: Nginx and uwsgi</title>
            <link>http://www.serverphorums.com/read.php?5,511291,511313#msg-511313</link>
            <description><![CDATA[ Hi Roberto,<br />
<br />
Thanks for the prompt response. That really helps.<br />
<br />
Our major consideration for going with Nginx is performance. <br />
If we have another process running (a wsgi server with python application) and nginx working as a proxy translating HTTP requests to another protocol (uwsgi, http or fastcgi), won't that be an overhead? <br />
I was under the impression that the Python application can be embedded in Nginx using Wsgi. <br />
<br />
We would really appreciate your thoughts/suggestions on the above.<br />
<br />
Looking forward to your response...<br />
<br />
Thanks,<br />
Pinakee Biswas<br />
Director &amp; CTO <br />
<br />
<br />
Just watch it ! <br />
<br />
FE- Mail: <a href="mailto:&#112;&#105;&#110;&#97;&#107;&#101;&#101;&#64;&#118;&#118;&#105;&#100;&#105;&#97;&#99;&#111;&#109;&#46;&#99;&#111;&#109;">&#112;&#105;&#110;&#97;&#107;&#101;&#101;&#64;&#118;&#118;&#105;&#100;&#105;&#97;&#99;&#111;&#109;&#46;&#99;&#111;&#109;</a> I IWeb: <a href="http://www.vvidiacom.com" target="_blank"  rel="nofollow">http://www.vvidiacom.com</a> <br />
<br />
<br />
 Please don't print this e-mail unless you really need to, this will preserve trees on planet earth. <br />
----------------------------Disclaimer-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br />
The information contained in this message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and permanently delete this message and any attachments from your system. Please note that e-mails are susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. <br />
-------------------------------------------------------------------------------------------------------------------------Disclaimer----------------------------------------------------------------------------------------------------------<br />
<br />
-----Original Message-----<br />
From: <a href="mailto:&#110;&#103;&#105;&#110;&#120;&#45;&#98;&#111;&#117;&#110;&#99;&#101;&#115;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#45;&#98;&#111;&#117;&#110;&#99;&#101;&#115;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a> [mailto:nginx-bounces@nginx.org] On Behalf Of Roberto De Ioris<br />
Sent: 11 June 2012 19:18<br />
To: <a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
Subject: Re: Nginx and uwsgi<br />
<br />
<br />
&gt; Hi,<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are building a Media Content Management and Delivery Platform based <br />
&gt; on Python (and python based web framework like Pylons/Pyramid). We are <br />
&gt; planning to use nginx as the web server.<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are new to nginx (have prior experience with Apache) and have <br />
&gt; downloaded 1.2.1. The OS is CentOS.<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are not sure how uwsgi works with nginx:<br />
&gt;<br />
&gt; 1.       Do we have to start uwsgi as a separate process?<br />
<br />
<br />
Yes, but remember: uwsgi is a communication protocol (like http or fastcgi), uWSGI is the application server.<br />
You need to start uWSGI, and configure nginx to speak with it with the protocol of choice (uwsgi, http or fastcgi)<br />
<br />
&gt;<br />
&gt; 2.       There is no option/directives for loading modules in nginx (as it<br />
&gt; is there in Apache).<br />
<br />
nginx does not work in that way, but it should be not a problem for you as upstream modules (http, fastcgi, scgi, uwsgi) are compiled in by default.<br />
<br />
<br />
&gt;<br />
&gt; 3.       I couldn't find a good documentation on the uwsgi based<br />
&gt; directives.<br />
&gt; The one in nginx wiki is confusing.<br />
<br />
you need nothing particular:<br />
<br />
include uwsgi_params;<br />
uwsgi_pass &lt;address&gt;;<br />
<br />
all the other options are for fine tuning.<br />
<br />
I suggest you to start from here:<br />
<br />
<a href="http://projects.unbit.it/uwsgi/wiki/Quickstart" target="_blank"  rel="nofollow">http://projects.unbit.it/uwsgi/wiki/Quickstart</a><br />
<br />
<br />
&gt;<br />
&gt; Since nginx I think works as a reverse proxy where it forwards HTTP <br />
&gt; requests to the uwsgi process, how about using something like Cherrypy <br />
&gt; or PasteHTTPserver? Would there be any difference?<br />
<br />
you can proxy nginx to whatever you want/need if the backend speaks one of the supported protocol (http, scgi, fastcgi, uwsgi)<br />
<br />
<br />
--<br />
Roberto De Ioris<br />
<a href="http://unbit.it" target="_blank"  rel="nofollow">http://unbit.it</a><br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a><br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a>]]></description>
            <dc:creator>Biswas, Pinakee</dc:creator>
            <category>Nginx</category>
            <pubDate>Mon, 11 Jun 2012 16:10:03 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?5,511291,511298#msg-511298</guid>
            <title>Re: Nginx and uwsgi</title>
            <link>http://www.serverphorums.com/read.php?5,511291,511298#msg-511298</link>
            <description><![CDATA[ &gt; Hi,<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are building a Media Content Management and Delivery Platform based on<br />
&gt; Python (and python based web framework like Pylons/Pyramid). We are<br />
&gt; planning<br />
&gt; to use nginx as the web server.<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are new to nginx (have prior experience with Apache) and have<br />
&gt; downloaded<br />
&gt; 1.2.1. The OS is CentOS.<br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; We are not sure how uwsgi works with nginx:<br />
&gt;<br />
&gt; 1.       Do we have to start uwsgi as a separate process?<br />
<br />
<br />
Yes, but remember: uwsgi is a communication protocol (like http or<br />
fastcgi), uWSGI is the application server.<br />
You need to start uWSGI, and configure nginx to speak with it with the<br />
protocol of choice (uwsgi, http or fastcgi)<br />
<br />
&gt;<br />
&gt; 2.       There is no option/directives for loading modules in nginx (as it<br />
&gt; is there in Apache).<br />
<br />
nginx does not work in that way, but it should be not a problem for you as<br />
upstream modules (http, fastcgi, scgi, uwsgi) are compiled in by default.<br />
<br />
<br />
&gt;<br />
&gt; 3.       I couldn't find a good documentation on the uwsgi based<br />
&gt; directives.<br />
&gt; The one in nginx wiki is confusing.<br />
<br />
you need nothing particular:<br />
<br />
include uwsgi_params;<br />
uwsgi_pass &lt;address&gt;;<br />
<br />
all the other options are for fine tuning.<br />
<br />
I suggest you to start from here:<br />
<br />
<a href="http://projects.unbit.it/uwsgi/wiki/Quickstart" target="_blank"  rel="nofollow">http://projects.unbit.it/uwsgi/wiki/Quickstart</a><br />
<br />
<br />
&gt;<br />
&gt; Since nginx I think works as a reverse proxy where it forwards HTTP<br />
&gt; requests<br />
&gt; to the uwsgi process, how about using something like Cherrypy or<br />
&gt; PasteHTTPserver? Would there be any difference?<br />
<br />
you can proxy nginx to whatever you want/need if the backend speaks one of<br />
the supported protocol (http, scgi, fastcgi, uwsgi)<br />
<br />
<br />
-- <br />
Roberto De Ioris<br />
<a href="http://unbit.it" target="_blank"  rel="nofollow">http://unbit.it</a><br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a>]]></description>
            <dc:creator>Roberto De Ioris</dc:creator>
            <category>Nginx</category>
            <pubDate>Mon, 11 Jun 2012 15:50:02 +0200</pubDate>
        </item>
        <item>
            <guid>http://www.serverphorums.com/read.php?5,511291,511291#msg-511291</guid>
            <title>Nginx and uwsgi</title>
            <link>http://www.serverphorums.com/read.php?5,511291,511291#msg-511291</link>
            <description><![CDATA[ Hi,<br />
<br />
 <br />
<br />
We are building a Media Content Management and Delivery Platform based on<br />
Python (and python based web framework like Pylons/Pyramid). We are planning<br />
to use nginx as the web server.<br />
<br />
 <br />
<br />
We are new to nginx (have prior experience with Apache) and have downloaded<br />
1.2.1. The OS is CentOS. <br />
<br />
 <br />
<br />
We are not sure how uwsgi works with nginx:<br />
<br />
1.       Do we have to start uwsgi as a separate process?<br />
<br />
2.       There is no option/directives for loading modules in nginx (as it<br />
is there in Apache).<br />
<br />
3.       I couldn't find a good documentation on the uwsgi based directives.<br />
The one in nginx wiki is confusing. <br />
<br />
 <br />
<br />
Since nginx I think works as a reverse proxy where it forwards HTTP requests<br />
to the uwsgi process, how about using something like Cherrypy or<br />
PasteHTTPserver? Would there be any difference?<br />
<br />
 <br />
<br />
We would really appreciate your support regarding the above queries.<br />
<br />
 <br />
<br />
Looking forward to your response.<br />
<br />
 <br />
<br />
Thanks,<br />
<br />
Pinakee Biswas<br />
<br />
Director &amp; CTO <br />
<br />
 <br />
<br />
Description: Description: vvidialogo.jpg<br />
<br />
Just watch it ! <br />
<br />
 <br />
<br />
7E- Mail:  &lt;mailto:pinakee@vvidiacom.com&gt; <a href="mailto:&#112;&#105;&#110;&#97;&#107;&#101;&#101;&#64;&#118;&#118;&#105;&#100;&#105;&#97;&#99;&#111;&#109;&#46;&#99;&#111;&#109;">&#112;&#105;&#110;&#97;&#107;&#101;&#101;&#64;&#118;&#118;&#105;&#100;&#105;&#97;&#99;&#111;&#109;&#46;&#99;&#111;&#109;</a> I 8Web:<br />
<a href="http://www.vvidiacom.com/" target="_blank"  rel="nofollow">http://www.vvidiacom.com/</a> <a href="http://www.vvidiacom.com" target="_blank"  rel="nofollow">http://www.vvidiacom.com</a> <br />
<br />
<br />
<br />
 <br />
<br />
P Please don't print this e-mail unless you really need to, this will<br />
preserve trees on planet earth. <br />
<br />
----------------------------Disclaimer--------------------------------------<br />
----------------------------------------------------------------------------<br />
----------------------------------------------------------------------------<br />
---------<br />
<br />
The information contained in this message (including any attachments) is<br />
confidential and may be privileged. If you have received it by mistake<br />
please notify the sender by return e-mail and permanently delete this<br />
message and any attachments from your system. Please note that e-mails are<br />
susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD.<br />
(including its group companies) shall not be liable for the improper or<br />
incomplete transmission of the information contained in this communication<br />
nor for any delay in its receipt or damage to your system. <br />
<br />
----------------------------------------------------------------------------<br />
---------------------------------------------Disclaimer---------------------<br />
----------------------------------------------------------------------------<br />
---------<br />
<br />
 <br />
<br />
_______________________________________________<br />
nginx mailing list<br />
<a href="mailto:&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;">&#110;&#103;&#105;&#110;&#120;&#64;&#110;&#103;&#105;&#110;&#120;&#46;&#111;&#114;&#103;</a><br />
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank"  rel="nofollow">http://mailman.nginx.org/mailman/listinfo/nginx</a>]]></description>
            <dc:creator>Biswas, Pinakee</dc:creator>
            <category>Nginx</category>
            <pubDate>Mon, 11 Jun 2012 15:40:03 +0200</pubDate>
        </item>
    </channel>
</rss>
