0
votes

I setup Nginx with passenger on centos 7 VPS. I installed nginx and passenger as a gem. In addition I installed passenger-install-nginx-module. When I start sudo service nginx and type passenger-status I get "Phusion Passenger is currently not serving any applications.". From my nginx conf file

http {
    passenger_root /usr/local/rvm/gems/ruby-2.4.1/gems/passenger-5.1.8;
    passenger_ruby /usr/local/rvm/gems/ruby-2.4.1/wrappers/ruby;
    passenger_app_env production;
    passenger_instance_registry_dir /var/lib/passenger-instreg;

 ...

 server {
        listen       80;
        server_name  localhost;
        root /home/myuserhere/current/public;
        passenger_enabled on;

File passenger.* creates normally when I restart nginx.

echo $PASSENGER_INSTANCE_REGISTRY_DIR returns the same path as in nginx conf file.

What I do wrong that passegner does not start application?

2
Are you sure that is your directory? Usually you would see this as "/home/username/APP_NAME/current/public"engineersmnky
I followed some tutotorial and I set it to /var/lib/passenger-instregmike927
Did you mean that?mike927
No your root directory in the nginx configengineersmnky

2 Answers

6
votes

Finally I got it. Everything was all right. Passenger does not start apps during startup, but during the first request so all I needed to do it was press enter in my browser ... Hope that answer save time to others.

1
votes

I was having a similar problem; where passenger wasn't serving any applications. This is on Focal, rails 6, Ruby 3.0.1, passenger-version: 6.0.8.

Turns out that it will start serving requests upon first request. So all I did was to temporarily allow http on the UFW then used 'curl' to http a request. Once the landing page was displayed, I was good to go.