![](/img/trans.png)
[英]Rails app running under Phusion Passenger shows only a white screen
[英]Passenger Phusion not detecting Rails app under Apache
在Ubuntu 14.4環境中,正在Apache下運行Passenger來提供我的Rails應用程序。
但是,在啟動apache之后:
$ 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
似乎好像已經安裝了Passenger並愉快地運行了它,但是沒有檢測到我的應用程序。
$ 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>
我的Apache用戶是www-data
/opt/members-only
是到部署目錄(標准Rails應用程序)的軟鏈接
$ 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
/var/log/apache2/error.log
中沒有與乘客相關的錯誤
如何讓乘客檢測我的申請?
我有完全一樣的問題。 在進行此逐步部署時:
我意識到我沒有禁用默認站點或啟用我的站點:
sudo a2dissite 000-default
sudo a2ensite testapp
sudo service apache2 restart
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.