Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82582

uWSGI, nGinx, and python on Wheezy: how do you configure it?

From Veek M <vek.m1234@gmail.com>
Newsgroups comp.lang.python
Subject uWSGI, nGinx, and python on Wheezy: how do you configure it?
Followup-To comp.lang.python
Date 2014-12-16 21:31 +0630
Organization Home
Message-ID <m6pl11$b7$1@dont-email.me> (permalink)

Followups directed to: comp.lang.python

Show all headers | View raw


Has anyone got the thing to work? I want to run some python database scripts 
on nginx. Because that will have a simple web-UI, i decided to go with 
uWSGI. It's proving to be a massive pain.

I found a decent book for nginx and got that bit working. The query gets 
sent to uWSGI but for some reason it can't find my script.

Most of the documentation on the web is utterly horrid and will take a 4 
year PhD to understand. I don't undertsand the architecture of uWsgi - he's 
got a bunch of modules and I don't undertsand what exactly is going on 
inside it!

less /etc/nginx/sites-enabled/default
        location / {
        include uwsgi_params;
        uwsgi_pass unix:/run/uwsgi/app/uwsgi/sockete;
        uwsgi_param UWSGI_PYHOME /usr/share/nginx/cgi;
        uwsgi_param UWSGI_CHDIR /usr/share/nginx;
        uwsgi_param UWSGI_SCRIPT index; #NOT SURE WHAT THIS DOES?


less /etc/uwsgi/apps-enabled/uwsgi.ini
[uwsgi]
plugins=python
socket=/tmp/uwsgi.socket
pythonpath=/usr/share/nginx/cgi/

Tue Dec 16 20:43:21 2014 - Python main interpreter initialized at 0x95cde0
Tue Dec 16 20:43:21 2014 - your server socket listen backlog is limited to 
100 connections
Tue Dec 16 20:43:21 2014 - *** Operational MODE: preforking ***
Tue Dec 16 20:43:21 2014 - added /usr/share/nginx/cgi/ to pythonpath.
Tue Dec 16 20:43:21 2014 - *** no app loaded. going in full dynamic mode ***
Tue Dec 16 20:43:21 2014 - *** uWSGI is running in multiple interpreter mode 
***
Tue Dec 16 20:43:21 2014 - spawned uWSGI master process (pid: 18792)
Tue Dec 16 20:43:21 2014 - spawned uWSGI worker 1 (pid: 18818, cores: 1)
Tue Dec 16 20:43:21 2014 - spawned uWSGI worker 2 (pid: 18819, cores: 1)


::1 - - [16/Dec/2014:21:08:03 +0530] "GET /foo.py HTTP/1.1" 502 172 "-" 
"Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

uWSGI, nGinx, and python on Wheezy: how do you configure it? Veek M <vek.m1234@gmail.com> - 2014-12-16 21:31 +0630
  Re: uWSGI, nGinx, and python on Wheezy: how do you configure it? Chris Warrick <kwpolska@gmail.com> - 2014-12-16 17:20 +0100
    Re: uWSGI, nGinx, and python on Wheezy: how do you configure it? Veek M <vek.m1234@gmail.com> - 2014-12-17 08:01 +0630
    Re: uWSGI, nGinx, and python on Wheezy: how do you configure it? Veek M <vek.m1234@gmail.com> - 2014-12-17 08:28 +0630
    Re: uWSGI, nGinx, and python on Wheezy: how do you configure it? Veek M <vek.m1234@gmail.com> - 2014-12-17 09:57 +0630
  Re: uWSGI, nGinx, and python on Wheezy: how do you configure it? Veek M <vek.m1234@gmail.com> - 2014-12-17 19:45 +0630

csiph-web