Discussion:
Configure core Python scripts into Nginx
Nitin Solanki
2015-08-05 14:25:36 UTC
Permalink
Hi,
I want to execute python scripts into Nginx server. I don't want
to any frameworks for that. Core python script, I need to use.
Any help and step to follow . To do that.
Yichun Zhang (agentzh)
2015-08-05 15:22:28 UTC
Permalink
Hello!
I want to execute python scripts into Nginx server. I don't want to
any frameworks for that. Core python script, I need to use.
Any help and step to follow . To do that.
Because you're using NGINX, I'd assume you're after performance. I
suggest you have a look at our ngx_lua module which supports
nonblocking Lua scripting in the nginx core:

https://github.com/openresty/lua-nginx-module

Lua is a simple language and is pythanic in some ways :)

If you insist in running Python in your apps, then you should try
those fastcgi or uwsgi options instead.

Just my 2 cents.

Regards,
-agentzh
Nitin Solanki
2015-08-06 06:51:27 UTC
Permalink
Hi Zhang,
Which should I use fastcgi or uwsgi. I tried uwsgi but not
succeed. Can you help to sort out my problem. Shall you please send me
steps to configure python with Nginx.
Post by Yichun Zhang (agentzh)
Hello!
Post by Nitin Solanki
I want to execute python scripts into Nginx server. I don't
want to
Post by Nitin Solanki
any frameworks for that. Core python script, I need to use.
Any help and step to follow . To do that.
Because you're using NGINX, I'd assume you're after performance. I
suggest you have a look at our ngx_lua module which supports
https://github.com/openresty/lua-nginx-module
Lua is a simple language and is pythanic in some ways :)
If you insist in running Python in your apps, then you should try
those fastcgi or uwsgi options instead.
Just my 2 cents.
Regards,
-agentzh
_______________________________________________
nginx mailing list
http://mailman.nginx.org/mailman/listinfo/nginx
Yichun Zhang (agentzh)
2015-08-06 13:49:55 UTC
Permalink
Hello!
Post by Nitin Solanki
Which should I use fastcgi or uwsgi.
It's generally believed that uwsgi is better.
Post by Nitin Solanki
I tried uwsgi but not
succeed. Can you help to sort out my problem. Shall you please send me steps
to configure python with Nginx.
As the maintainer of the ngx_lua module I never code any Python for
web apps (for obvious reasons) :) I only use Python occasionally when
I absolutely have to (like writing gdb-based debugging tools).

Having said that, you'd better provide as much details about your
problems as possible here such that other more knowledgeable people
might have a chance to help you out. Well, just a suggestion.

Regards,
-agentzh
Ray Cote
2015-08-06 17:37:36 UTC
Permalink
We use gUnicorn for our nginx/Django deployments.
Lots of good guidance on the gUnicorn site:
http://gunicorn-docs.readthedocs.org/en/latest/deploy.html
nginx is their deployment of choice...
-Ray
Post by Yichun Zhang (agentzh)
Hello!
Post by Nitin Solanki
Which should I use fastcgi or uwsgi.
It's generally believed that uwsgi is better.
Post by Nitin Solanki
I tried uwsgi but not
succeed. Can you help to sort out my problem. Shall you please send me
steps
Post by Nitin Solanki
to configure python with Nginx.
As the maintainer of the ngx_lua module I never code any Python for
web apps (for obvious reasons) :) I only use Python occasionally when
I absolutely have to (like writing gdb-based debugging tools).
Having said that, you'd better provide as much details about your
problems as possible here such that other more knowledgeable people
might have a chance to help you out. Well, just a suggestion.
Regards,
-agentzh
_______________________________________________
nginx mailing list
http://mailman.nginx.org/mailman/listinfo/nginx
--
Raymond Cote, President
voice: +1.603.924.6079 email: ***@AppropriateSolutions.com skype:
ray.cote
mex
2015-08-06 17:53:57 UTC
Permalink
Ray Cote Wrote:
-------------------------------------------------------
Post by Ray Cote
We use gUnicorn for our nginx/Django deployments.
http://gunicorn-docs.readthedocs.org/en/latest/deploy.html
nginx is their deployment of choice...
-Ray
gunicorn (+nginx for static content, caching, ssl-offload and waf-features)
is what we use here
too on a couple of installations; its rock solid and easy to use.



cheers,

mex

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260791,260824#msg-260824
Nitin Solanki
2015-08-06 18:07:23 UTC
Permalink
Hi all, I am not using any python framework. Generally, I use core python
and making a call from php to python using AJAX. I found different ways to
configure python with Nginx but they all have python framework integration.
Any configuration, you have to follow for core python scripts Please help
me.
Post by mex
-------------------------------------------------------
Post by Ray Cote
We use gUnicorn for our nginx/Django deployments.
http://gunicorn-docs.readthedocs.org/en/latest/deploy.html
nginx is their deployment of choice...
-Ray
gunicorn (+nginx for static content, caching, ssl-offload and waf-features)
is what we use here
too on a couple of installations; its rock solid and easy to use.
cheers,
mex
http://forum.nginx.org/read.php?2,260791,260824#msg-260824
_______________________________________________
nginx mailing list
http://mailman.nginx.org/mailman/listinfo/nginx
mex
2015-08-06 18:13:45 UTC
Permalink
if you ask for something like mod_cgi from the apache-world, there is
nothing like
this; the following article might help to define requirements and find a
solution:
https://www.digitalocean.com/community/tutorials/a-comparison-of-web-servers-for-python-based-web-applications



Nitin Solanki Wrote:
-------------------------------------------------------
Post by Nitin Solanki
Hi all, I am not using any python framework. Generally, I use core python
and making a call from php to python using AJAX. I found different ways to
configure python with Nginx but they all have python framework
integration.
Any configuration, you have to follow for core python scripts Please help
me.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260791,260826#msg-260826
Nitin Solanki
2015-08-06 18:16:34 UTC
Permalink
Hi,
Which one is better to configure with Nginx? Please can you suggest me
with steps. I explored more but didn't getting anything. It will be very
helpful for me. If you guide me in steps. Thanks..
Post by mex
if you ask for something like mod_cgi from the apache-world, there is
nothing like
this; the following article might help to define requirements and find a
https://www.digitalocean.com/community/tutorials/a-comparison-of-web-servers-for-python-based-web-applications
-------------------------------------------------------
Post by Nitin Solanki
Hi all, I am not using any python framework. Generally, I use core python
and making a call from php to python using AJAX. I found different ways to
configure python with Nginx but they all have python framework integration.
Any configuration, you have to follow for core python scripts Please help
me.
http://forum.nginx.org/read.php?2,260791,260826#msg-260826
_______________________________________________
nginx mailing list
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...