英文:
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:
以下资源将帮助解决此错误。
- https://stackoverflow.com/questions/28202371/nginx-worker-process-cant-access-config-ru
- 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.
- https://stackoverflow.com/questions/28202371/nginx-worker-process-cant-access-config-ru
- https://www.phusionpassenger.com/docs/advanced_guides/troubleshooting/nginx/troubleshooting/meteor/
Good luck. Don't give up.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论