简体   繁体   English

Phusion Passenger目前不提供任何申请

[英]Phusion Passenger is currently not serving any applications

I got error like Phusion Passenger is currently not serving any applications. 我得到的错误就像Phusion Passenger is currently not serving any applications. while trying to restart passenger with passenger-config restart-app command. 尝试使用passenger-config restart-app命令重新启动乘客。

I googled but most of the answers were only related with deployment. 我用谷歌搜索,但大多数答案只与部署有关。

I want to restart passenger in the development environment as I am using vhost. 我想在开发环境中重新启动乘客,因为我正在使用vhost。 PS. PS。 My web server is nginx. 我的网络服务器是nginx。

See my comment here . 在这里看我的评论。

You need to explicitly specify, where actual Ruby code of a Rails application is located, using passenger_app_root directive, described in Passenger's documentaion . 您需要使用passenger_app_root 的文档中描述的passenger_app_root指令显式指定Rails应用程序的实际Ruby代码所在的位置。

Without this directive, Passenger will thinck, that actual Ruby code is located in path, specified with root nginx-directive. 如果没有这个指令,Passenger将会瘦,实际的Ruby代码位于路径中,使用root nginx-directive指定。

Example of a correct configuration file '/etc/nginx/sites-available/app_name': 正确配置文件'/ etc / nginx / sites-available / app_name'的示例:

server {
  listen 80;

  server_name 188.225.35.216;
  passenger_enabled on;
  rails_env    production;
  root         /path/to/your/app/public/folder;
  passenger_app_root /path/to/your/app/code; # <<< Point Passenger to application code

  # redirect server error pages to the static page /50x.html
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   html;
  }
}

In my case, Passenger was't serving my Rails app, that was deployed with Capistrano. 在我的情况下,Passenger没有提供我的Rails应用程序,该应用程序是与Capistrano一起部署的。 I had have to specify a value for passenger_app_root like following /var/www/my_app/current . 我必须为后面的/var/www/my_app/current指定passenger_app_root的值。

This will point Passenger exactly, where application code is presented. 这将准确指出Passenger,其中显示了应用程序代码。

I am betting your passenger is running. 我打赌你的乘客正在跑步。
If you look at step 3, it hints at what I am talking about. 如果你看第3步,就会暗示我在说什么。

https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/ https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/

Nginx will take care of passenger for you if it's set up to do that. 如果设置这样做,Nginx将为您照顾乘客。 Can you try the command in that tutorial and look for passenger processes too ? 您可以尝试该教程中的命令并查找乘客流程吗?

sudo /usr/sbin/passenger-memory-stats

Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM