乘客Phusion未在Apache下检测到Rails应用

时间:2018-08-11 17:30:39

标签: ruby-on-rails apache passenger

在Ubuntu 14.4环境中,我正在Apache下运行Passenger来为我的Rails应用提供服务。

但是,在开始Apache之后:

GeckoElementCollection ButtonElements = SearchandFollowBrowser.Document.GetElementsByTagName("button");
foreach(Gecko.GeckoHtmlElement B in ButtonElements) {
 //   string gettingusernameFromurl = currentURL.Replace("https://twitter.com/", "");
 if (B.TextContent.Contains("Follow @")) {
  B.Click();

  MessageBox.Show("Just following a new user");
  return;
 }
}

似乎旅客已经安装并且运行良好,但是没有检测到我的应用程序。

$ passenger-status
Version : 5.3.3
Date    : 2018-08-10 17:08:52 -0400
Instance: DZeozT5t (Apache/2.4.7 (Ubuntu) Phusion_Passenger/5.3.3)

Phusion Passenger is currently not serving any applications.

$ passenger-config list-instances
Name                       PID      Description
--------------------------------------------------------------------------
DZeozT5t                   1438     Apache/2.4.7 (Ubuntu) Phusion_Passenger/5.3.3

我的Apache用户是$ cat /etc/apache2/sites-enabled/rails.conf <VirtualHost *:80> ServerName url.com DocumentRoot /opt/members-only/public PassengerRuby /usr/local/bin/ruby <Directory "/opt/members-only/public"> Allow from all Options FollowSymLinks Options -MultiViews Require all granted </Directory> </VirtualHost>

www-data是指向部署目录(标准Rails应用)的软链接

/opt/members-only

$ ls -lash /opt/members-only/ total 104K 4.0K drwxrwxr-x 16 www-data www-data 4.0K Aug 10 17:06 . 4.0K drwxr-xr-x 10 platform platform 4.0K Aug 10 16:34 .. 4.0K drwxrwxr-x 11 www-data www-data 4.0K Jul 30 22:22 app 4.0K drwxrwxr-x 2 www-data www-data 4.0K Jul 30 22:22 bin 4.0K drwxrwxr-x 2 www-data www-data 4.0K Jul 30 23:13 .bundle 4.0K drwx------ 5 www-data www-data 4.0K Aug 10 16:10 config 4.0K -rw-rw-r-- 1 www-data www-data 130 Jul 30 22:22 config.ru 4.0K drwx------ 4 www-data www-data 4.0K Jul 30 22:22 db 4.0K drwxrwxr-x 3 www-data www-data 4.0K Jul 30 22:22 doc 4.0K -rw-rw-r-- 1 www-data www-data 2.3K Aug 10 15:45 Gemfile 8.0K -rw-rw-r-- 1 www-data www-data 6.3K Aug 10 15:45 Gemfile.lock 4.0K drwxrwxr-x 4 www-data www-data 4.0K Jul 30 22:22 lib 4.0K drwxrwxr-x 2 www-data www-data 4.0K Aug 10 16:12 log 4.0K drwxr-xr-x 2 www-data www-data 4.0K Aug 10 16:33 node_modules 4.0K -rw-rw-r-- 1 www-data www-data 70 Jul 30 22:22 package.json 4.0K drwxrwxr-x 4 www-data www-data 4.0K Aug 10 16:13 public 4.0K -rw-rw-r-- 1 www-data www-data 227 Jul 30 22:22 Rakefile 4.0K -rw-rw-r-- 1 www-data www-data 374 Jul 30 22:22 README.md 4.0K drwxrwxr-x 3 www-data www-data 4.0K Jul 30 23:13 vendor 4.0K -rw-r--r-- 1 www-data www-data 86 Aug 10 16:33 yarn.lock 中没有与乘客有关的错误

如何让乘客检测我的申请?

1 个答案:

答案 0 :(得分:0)

我有完全一样的问题。在进行逐步部署时:

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04

我意识到我没有禁用默认站点或启用我的:

sudo a2dissite 000-default
sudo a2ensite testapp
sudo service apache2 restart