我试图设置我的rails服务器并且乘客不会识别我的应用程序在日志中出现此错误:
[error] 1473#1473: *1 "/home/myapp/public/index.html" is not found (2: No such file or directory)
客户端或404错误。
我已经完成了所有可以解决的疑难解答,但没有。
这是我的服务器块:
server {
listen 80;
server_name mydomaiin.com;
rails_env development;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /home/myapp/.rbenv/versions/2.4.0/bin/ruby;
# Tell Nginx and Passenger where your app's 'public' directory is
root /home/myapp/public;
}
任何人都可以帮助我吗?
感谢
答案 0 :(得分:1)
由于您的根目录位于/home/myapp/myapp
,请更新服务器conf:
server {
listen 80;
server_name mydomaiin.com;
rails_env development;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /home/myapp/.rbenv/versions/2.4.0/bin/ruby;
# Tell Nginx and Passenger where your app's 'public' directory is
root /home/myapp/myapp/public;
}