Nginx and Python
kirpit
kirpit at gmail.com
Mon Jan 21 19:25:43 UTC 2013
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 at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130121/f97c34da/attachment.html>
More information about the nginx
mailing list