Configure core Python scripts into Nginx

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.

Hello!

On Wed, Aug 5, 2015 at 10:25 PM, Nitin S. wrote:

     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 :slight_smile:

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

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.

On Wed, Aug 5, 2015 at 8:52 PM Yichun Z. (agentzh)
[email protected]

Hello!

On Thu, Aug 6, 2015 at 2:51 PM, Nitin S. wrote:

Which should I use fastcgi or uwsgi.

It’s generally believed that uwsgi is better.

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) :slight_smile: 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 Wrote:

We use gUnicorn for our nginx/Django deployments.
Lots of good guidance on the gUnicorn site:
Deploying Gunicorn — Gunicorn 20.1.0 documentation
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:

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.

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:

Nitin S. Wrote:

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:

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…

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

On Thu, Aug 6, 2015 at 9:49 AM, Yichun Z. (agentzh)
[email protected]