I've set up and deployed a rails application using unicorn and nginx on linode. However when I go to the URL I've set in the applications config in sites-enable I am served with the default site that is listening on port 80. If I got to the IP and port I don't get anything at all. If I set the site to listen on 80 it works
The URL is pointing from the registrar to the linode IP and is working correctly.
xxxx.co.uk file in sites-enabled
upstream unicorn
server unix:/tmp/unicorn.xxxx.co.uk.sock fail_timeout=0;
}
server {
server_name xxxx xxxx;
listen 3001 default deferred;
root /var/www/apps/nocn.org.uk/current/public;
location ^~ /assets/ {
gzip_static on;
#try $uri /old$uri
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Make sure you enabled remote access to port 3001 in linode's firewall or config (by using iptables probably).