Welcome! Log In Create A New Profile

Advanced

Re: Nginx and Python

January 21, 2013 02:28PM
yeah, your uwsgi instance is not working or somehow socket is simply not
there.

and for the application-agnostic configuration; you basically have to pass
some parameters to your upstreams about the current request and then handle
these params from them. see there is a similar example on nginx
documentation:
http://wiki.nginx.org/Configuration#Python_via_uWSGI

go dig nginx and uwsgi config files from my multi-app scenario:
https://github.com/kirpit/webstack

cheers.


On Mon, Jan 21, 2013 at 7:54 PM, Silvio Siefke <siefke_listen@web.de> wrote:

> Hello,
>
>
> i try for a tutorial Python / Django and Nginx unite.
>
>
> http://www.collabspot.com/2012/08/14/setting-up-nginx-uwsgi-python-ubuntu-12-04/
>
> That sounds like a multi-hosting, and was not particularly difficult. But
> something is wrong with the system.
>
> When i want on the website, i become a 502 Bad Gateway. The Socket
> would not be create.
>
> Configuration:
>
> <vhost>
> gentoo-mobile conf # cat nginx.conf
> server {
> listen 80;
> server_name python.silviosiefke.de;
> root /var/www/python.silviosiefke.de/src/silviosiefke;
> access_log /var/www/python.silviosiefke.de/logs/access.log;
> error_log /var/www/python.silviosiefke.de/logs/error.log;
>
> location / {
> include /etc/nginx/configuration/uwsgi_params;
> uwsgi_pass unix:///tmp/python.silviosiefke.de.sock;
> }
> }
>
> <uwsgi>
> gentoo-mobile conf # cat uwsgi.ini
> [uwsgi]
> # variables
> projectname = silviosiefke
> projectdomain = python.silviosiefke.de
> base = /var/www/python.silviosiefke.de
> # config
> protocol = uwsgi
> venv = /var/www/python.silviosiefke.de/venv
> pythonpath = /var/www/python.silviosiefke.de/src/silviosiefke
> module = %(projectname).wsgi
> socket = /tmp/python.silviosiefke.de.sock
> logto = /var/www/python.silviosiefke.de/logs/uwsgi.log
>
> <log>
> 2013/01/21 18:50:17 [crit] 4539#0: *1 connect() to
> unix:///tmp/python.silviosiefke.de.sock failed (2: No such file or
> directory)
> while connecting to upstream, client: 192.168.2.20,
> server: python.silviosiefke.de, request: "GET /favicon.ico HTTP/1.1",
> upstream: "uwsgi://unix:///tmp/python.silviosiefke.de.sock:",
> : "python.silviosiefke.de"
>
> The socket is not present in /tmp. Whereis the mistake?
>
> Is there no way to make the Vhost configuration so that it does not
> matter what the user is in? PHP, Perl or Python?
>
>
> Really Thank you for help. Greetings
> Silvio
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx and Python

Silvio Siefke January 21, 2013 12:56PM

Re: Nginx and Python

Jonathan Matthews January 21, 2013 02:16PM

Re: Nginx and Python

Silvio Siefke January 21, 2013 05:28PM

Re: Nginx and Python

Scott Ribe January 21, 2013 05:32PM

Re: Nginx and Python

roy.enjoy January 21, 2013 02:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready