/etc/nginx/sites-enabled
正在生成以下错误。 VPS 是新安装的,并从另一个也运行 Ubuntu 的 VPS 复制数据,尽管是旧版本 (20.04 -> 24.04)
2024/12/18 16:47:18 [alert] 82522#82522: *299 Error opening '/home/deploy/app/current/Passengerfile.json' for reading: Permission denied (errno=13); This error means that the Nginx worker process (PID 82522, running as UID 33) does not have permission to access this file. Please read this page to learn how to fix this problem: https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/?a=upon-accessing-the-web-app-nginx-reports-a-permission-denied-error; ; Extra info, client: [...], server: app.2ld.com, request: "GET /config.json HTTP/1.1", host: "app.2ld.com"
这个
Passengerfile.json
在我处理过的任何应用程序中都不存在。
该错误消息也有点误导,因为它在我以前从未遇到过的目录上调用了对 Nginx 工作进程的宽松权限。
Nginx 和乘客进程启动。 站点启用文件的相关位有
server_name app.2ld.com;
root /home/deploy/app/current/public;
passenger_enabled on;
passenger_app_env production;
location /cable {
passenger_app_group_name app_websocket;
passenger_force_max_concurrent_requests_per_process 0;
}
此配置需要修复什么?
chmod o+x $HOME
将允许服务请求。
不要删除问题,而是将其留在这里以供最终使用。