【问题标题】:How to prevent Passenger with Nginx from stoping如何防止使用 Nginx 的乘客停止
【发布时间】:2020-11-22 11:15:51
【问题描述】:

需要帮助。 我对使用 nginx 的乘客有疑问。

数据:
Ubuntu 20.04
乘客融合 6.0.7
nginx 1.18.0
红宝石 2.6.0p0

在服务器上我有 Redmine 应用程序。

现在的问题是由于不活动,Passenger 每天都在关闭 nginx,或者更确切地说是断开“长时间运行的进程”。

我的域的 nix 配置文件:

server {
    server_name xpo-asos.industrial-engineering.co;
    root /home/seven/xpobarnsley.industrial-engineering.co/public/;
    index index.html index.htm index.php;

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     }

    location ~ /\.ht {
        deny all;
    }
    passenger_enabled on;
    passenger_app_env production;

    location /cable {
      passenger_app_group_name myapp_websocket;
      passenger_force_max_concurrent_requests_per_process 0;
    }

    # Allow uploads up to 100MB in size
    client_max_body_size 100m;

    location ~ ^/(assets|packs) {
      expires max;
      gzip_static on;
    }


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/xpo-asos.industrial-engineering.co/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/xpo-asos.industrial-engineering.co/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = xpo-asos.industrial-engineering.co) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    passenger_enabled on;
    passenger_app_env production;

    location /cable {
      passenger_app_group_name myapp_websocket;
      passenger_force_max_concurrent_requests_per_process 0;
    }

    listen 80;
    server_name xpo-asos.industrial-engineering.co;
    return 404; # managed by Certbot

}

有什么想法吗?

非常感谢!

【问题讨论】:

    标签: ubuntu nginx passenger redmine


    【解决方案1】:

    只是为了更新。我没有找到为什么Passenger一直在崩溃。 我确实删除了模块并安装了 puma,我强烈建议所有人使用它来运行 Ruby 应用程序。

    【讨论】:

      猜你喜欢
      • 2011-12-11
      • 2012-07-24
      • 2014-01-13
      • 1970-01-01
      • 2011-05-31
      • 2015-10-19
      • 2021-10-21
      • 2017-04-23
      • 2017-01-12
      相关资源
      最近更新 更多