没有运行以’/home/deploy/phjnew’路径开头的Phusion Passenger(R)服务的应用程序。

huangapple go评论47阅读模式
英文:

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

问题

我对部署非常陌生,当我将Rails应用部署到AWS EC2实例时,出现了这个错误:

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;
  }

  # 允许上传最大100MB大小的文件
  client_max_body_size 100m;

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

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;
  }
}

答案1

得分: 0

所以我在另一个问题上得到了答案。

当你运行这个命令

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

你会得到类似于

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:

以下资源将帮助解决此错误。

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

祝好运。不要放弃。

英文:

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. https://stackoverflow.com/questions/28202371/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.

huangapple
  • 本文由 发表于 2023年5月11日 00:07:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76220566.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定