乘客找不到公共道路



我正在尝试设置我的 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;
}

谁能帮我?

谢谢

由于您的根目录在 /home/myapp/myapp 中,请更新您的服务器:

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

相关内容

  • 没有找到相关文章