1

我最近刚刚接手了一个 Ruby on Rails 项目,该项目使用一个临时应用程序和一个生产应用程序。不幸的是,设置这个的人是 MIA。我运行了“部署”脚本(Capistrano)来部署到登台服务器,但它把房子弄坏了

在 nginx 日志中,我看到:connect() failed (111: Connection refused) while reading response header from upstream

对nginx不熟悉。有人能告诉我这是什么意思吗?

nginx.conf

##################
# STAGING SETTINGS
    upstream staging_mongrel {
        server 127.0.0.1:8003;
        }

    server {
        listen       80;
        server_name  staging.removed.org;
        root /var/www/apps/staging/current/public;

        index  index.html index.htm;
        location / {
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_redirect false;

            proxy_connect_timeout     90;
            proxy_send_timeout       400;
            proxy_read_timeout      3600;

            client_max_body_size     20m;

            if (-f $request_filename/index.html) {
                 rewrite (.*) $1/index.html break;
            }
            if (-f $request_filename.html) {
                rewrite (.*) $1.html break;
            }
            if (!-f $request_filename) {
                proxy_pass http://staging_mongrel;
                break;
            }
         }
         error_page   500 502 503 504  /50x.html;
         location = /50x.html {
             root   html;
         }
    }
}
4

1 回答 1

0

The rails app stopped running. Not sure why. Turns out I had to start the mongrel instance.

于 2013-07-28T05:42:13.607 回答