nginx + uwsgi + django problem
I'm trying to host a couple of sites (some django, some node.js, some static) on a Linode using nginx.
To config the django site, I used this guide
In log I have this error:
2014/06/12 00:17:17 [crit] 10261#0: *1 connect() to unix:///run/uwsgi/app/alessandroamoroso.com/alessandroamoroso.socket failed (2: No such file or directory) while connecting to upstream, client: 79.56.27.44, server: alessandroamoroso.com, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///run/uwsgi/app/alessandroamoroso.com/alessandroamoroso.socket:", host: "<ip>:8080"</ip>
This is the configuration in /etc/nginx/sites-available:
server {
listen 8080 default_server;
listen [::]:8080 default_server ipv6only=on;
# Make site accessible from http://localhost/
#server_name localhost;
server_name alessandroamoroso.com www.alessandroamoroso.com;
access_log /srv/www/alessandroamoroso.com/logs/access.log;
error_log /srv/www/alessandroamoroso.com/logs/error.log;
location / {
#uwsgi_pass 127.0.0.1:8001;
uwsgi_pass unix:///run/uwsgi/app/alessandroamoroso.com/alessandroamoroso.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWARE nginx/$nginx_version;
}
location /static {
root /srv/www/alessandroamoroso.com/public_html/static/;
index index.html index.htm;
}
}
Has anyone had a similar problem? Does anybody know tell me some other guide to follow?
Thanks
1 Reply
In the link you provided to linode library guide make sure you were also following the steps in the section Configuring uWSGI and make sure the configuration file line that looks like this in the guide:
<socket>/run/uwsgi/app/example.com/example.com.socket</socket>
matches the path in your Nginx config.
Also make sure you run this command (as shown in that section of the guide):
service uwsgi restart
to make sure uWSGI is running.