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

dgjrabp2  于 2023-05-16  发布在  Nginx
关注(0)|答案(1)|浏览(105)

我是一个新手,当我将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;
  }

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

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

6yt4nkrj1#

所以我在另一个问题上得到了答案。
运行此命令时
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. Nginx worker process cant access config.ru
  2. https://www.phusionpassenger.com/docs/advanced_guides/troubleshooting/nginx/troubleshooting/meteor/
    祝你好运别给予

相关问题