ruby-on-railsamazon-web-servicesnginxpassenger

There are no Phusion Passenger(R)-served applications running whose paths begin with '/home/deploy/phjnew'


I'm very new to deployment, and I'm getting this error when I deploy my Rails app to an AWS EC2 instance

There are no Phusion Passenger(R)-served applications running whose paths begin with '/home/deploy/phjnew'.

server {
  listen 80;
  listen [::]:80;

  server_name _;
  root /home/deploy/phjnew/current/public;

  passenger_enabled on;
  passenger_app_env production;

  location /cable {
    passenger_app_group_name phjne_websocket;
    passenger_force_max_concurrent_requests_per_process 0;
  }

  # Allow uploads up to 100MB in size
  client_max_body_size 100m;

  location ~ ^/(assets|packs) {
    expires max;
    gzip_static on;
  }
}

Solution

  • So I got an answer to this on a different question.

    When you run this command

    sudo less /var/log/nginx/error.log

    You'll get an error similar to

    copy2013/10/21 17:16:03 [alert] 98687#0: *1 Cannot stat '/Users/phusion/Sites/rack.test/config.ru': Permission denied (errno=13); This error means that the Nginx worker process (PID 99064, running as UID 70) does not have permission to access this file. Please read this page to learn how to fix this problem:

    The resources below will help fix this error.

    1. Nginx worker process cant access config.ru
    2. https://www.phusionpassenger.com/docs/advanced_guides/troubleshooting/nginx/troubleshooting/meteor/

    Good luck. Don't give up.