Ruby on rails Nginx配置未启动rails服务器

Ruby on rails Nginx配置未启动rails服务器,ruby-on-rails,ruby,unix,ubuntu,nginx,Ruby On Rails,Ruby,Unix,Ubuntu,Nginx,我正在尝试配置AmazonEC2。Ubuntu 14.04。我在nginx access.log上收到此消息 2015/12/25 11:19:24 [error] 4403#0: *1 connect() to unix:/home/ubuntu/apptest/shared/puma.sock failed (111: Connection refused) while connecting to upstream, client: 109.67.134.46, server: localh

我正在尝试配置AmazonEC2。Ubuntu 14.04。我在nginx access.log上收到此消息

2015/12/25 11:19:24 [error] 4403#0: *1 connect() to unix:/home/ubuntu/apptest/shared/puma.sock failed (111: Connection refused) while connecting to upstream, client: 109.67.134.46, server: localhost, request: "GET / HTTP/1.1", upstream: "http://unix:/home/ubuntu/apptest/shared/puma.sock:/", host: "54.174.110.190"
My/etc/nginx/sites enabled/apptest.conf
is

upstream apptest {
    # Path to Puma SOCK file, as defined previously
    server unix:/home/ubuntu/apptest/shared/puma.sock fail_timeout=0;
}

server {
    listen 80;
    server_name localhost;

    root /home/ubuntu/apptest/current/public;

    try_files $uri/index.html $uri @apptest;

    location @apptest {
        proxy_pass http://apptest;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
    }

    error_page 500 502 503 504 /500.html;
    client_max_body_size 4G;
    keepalive_timeout 10;
}
但是当我运行
**bundle exec puma-e production-b时unix:///home/ubuntu/apptest/shared/puma.sock**
在服务器中

[4328]Puma以群集模式启动

[4328]*版本2.15.3(ruby 2.2.1-p85),代码名:秋阿伯 喷枪

[4328]*最小线程数:1,最大线程数:6

[4328]*环境:生产

[4328]*工艺工人:1名

[4328]*可分阶段重新启动

[4328]*收听unix:///home/ubuntu/apptest/shared/puma.sock


网站加载。有什么建议吗?

Nginx不会自动启动AFAIK Puma。它必须自己启动。官方的Puma中有一些有用的脚本。

太棒了。这正是我想要的。