Nginx and Python

Silvio Siefke siefke_listen at
Mon Jan 21 17:54:00 UTC 2013


i try for a tutorial Python / Django and Nginx unite.

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. 


gentoo-mobile conf # cat nginx.conf 
server {
  listen 80;
  root /var/www/;
  access_log /var/www/;
  error_log /var/www/;
  location / {
    include /etc/nginx/configuration/uwsgi_params;
    uwsgi_pass unix:///tmp/;

gentoo-mobile conf # cat uwsgi.ini 
# variables
projectname = silviosiefke
projectdomain =
base = /var/www/
# config
protocol = uwsgi
venv = /var/www/
pythonpath = /var/www/
module = %(projectname).wsgi
socket = /tmp/
logto = /var/www/

2013/01/21 18:50:17 [crit] 4539#0: *1 connect() to 
unix:///tmp/ failed (2: No such file or directory) 
while connecting to upstream, client:, 
server:, request: "GET /favicon.ico HTTP/1.1",
upstream: "uwsgi://unix:///tmp/", 
: ""

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

More information about the nginx mailing list