I have installed Phusion passenger following official document :


Following Steps are performed:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
sudo apt-get install apt-transport-https ca-certificates
sudo touch /etc/apt/sources.list.d/passenger.list
sudo vi /etc/apt/sources.list.d/passenger.list

Added this:

deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main

And then

sudo chown root: /etc/apt/sources.list.d/passenger.list
sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update

sudo apt-get install nginx-extras passenger -y

copied path returned by /usr/bin/passenger-config --root and appended passenger_root in /etc/nginx/nginx.conf

sudo service nginx restart
sudo gem install passenger
sudo passenger-install-nginx-module

sudo chmod +x /etc/init.d/nginx
sudo update-rc.d nginx defaults

Then restarted nginx.

I have my rails app in /opt/www/app.co/app(deployed using mina). And have added app.co in /etc/nginx/sites-available with symbolic link in sites-enabled, and configured server block (/etc/nginx/sites-available/app.co) like:

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;
    root /opt/www/app.co/app/public;
    passenger_enabled on;
    server_name localhost;

/opt/nginx/conf/nginx.conf looks like this: >

worker_processes 1;
events {
worker_connections 1024;

http {
passenger_root /var/lib/gems/1.91./gems/passenger-4.0.53;
passenger_ruby /home/deployer/.rvm/rubies/ruby-2.1.5/bin/ruby;
include mime_types;
default_type application/octet-stream;
sendfile on;
keepalive-timeout 65;

server {
             listen 80;
             server_name localhost;
             root /opt/www/app.co/app/public;
             passenger_enabled on; 

Inspite of these configurations, always default nginx page is loading

Have tried to edit nginx default page located in

/opt/nginx/html/index.html /usr/share/nginx/www/index.html>

But no difference, always default page.

sudo passenger-status shows:

Version : 4.0.53
Date : 2014-12-11 04:43:20 -0600
Instance: 22618
----------- General information -----------
Max pool size : 6
Processes : 0
Requests in top-level queue : 0

----------- Application groups -----------

sudo passenger-memory-stats shows:

------------- Apache processes -------------
WARNING: The Apache executable cannot be found.
Please set the APXS2 environment variable to your 'apxs2' executable's filename, or set
the HTTPD environment variable to your 'httpd' or 'apache2' executable's filename.

---------- Nginx processes -----------
PID PPID VMSize Private Name
22618 1 112.0 MB 0.2 MB nginx: master process /usr/sbin/nginx
22620 22618 112.3 MB 0.5 MB nginx: worker process
22621 22618 112.3 MB 0.5 MB nginx: worker process
22623 22618 112.3 MB 0.5 MB nginx: worker process
22624 22618 112.3 MB 0.5 MB nginx: worker process
Processes: 5
Total private dirty RSS: 2.09 MB

----- Passenger processes -----
PID VMSize Private Name
22600 25.6 MB 0.3 MB PassengerWatchdog
22603 109.3 MB 0.3 MB PassengerHelperAgent
22612 145.0 MB 0.9 MB PassengerLoggingAgent
Processes: 3
Total private dirty RSS: 1.54 MB

Stopped nginx with: sudo service nginx stop

But still default page. Am i missing anything here ?!

Please lend me some inputs how to correct this issue and configure my rails app.


1 Answer 1


The root should be pointed at your Rails app's public directory, not its app directory.

    root /opt/www/app.co/public;
  • Forgot to mention it, i am pointing it to public directory. I have updated my question.
    – VK13
    Dec 11, 2014 at 10:28
  • 1
    Did you forget anything else? Now is the time to add it to your question. Dec 11, 2014 at 10:38
  • Ah! no... Have included all things i have tried out. Still not working. Always default page. Wondering from where it is loading it?
    – VK13
    Dec 11, 2014 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.