Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jun 12, 2014 8:11 am 
Offline

Joined: Thu Jun 12, 2014 7:28 am
Posts: 1
Hi

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 https://library.linode.com/web-servers/nginx/python-uwsgi/ubuntu-12.04-precise-pangolin. The default sites (static page) is available, while site configured following the guide give me an error 502.

In log I have this error:
Code:
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"


This is the configuration in /etc/nginx/sites-available:
Code:

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


Top
   
PostPosted: Fri Jun 13, 2014 5:32 am 
Offline
Senior Member

Joined: Fri Jul 03, 2009 2:31 am
Posts: 54
ICQ: 897607
It looks to me like uWSGI is not running, or at least it's not listening to the same socket that you specify in your Nginx config.

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:

Code:
<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):

Code:
service uwsgi restart

to make sure uWSGI is running.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group