Capistrano部署的Rails应用程序的URL是什么

Capistrano部署的Rails应用程序的URL是什么

问题描述:

这是deploy.rb中的代码。

Here is the code in deploy.rb

set :application, "myapp"
server "10.15.169.45", :web, :app, :db, :primary => true

部署后访问Web应用程序的URL是什么?尝试 http://10.15.169.45 http://10.15.169.45/myapp ,但没有一个起作用。 http://10.15.169.45 显示欢迎使用nginx。

What's the URL accessing the web app after deployment? Tried http://10.15.169.45 and http://10.15.169.45/myapp and none of them worked. http://10.15.169.45 displayed "Welcome to nginx".

有什么建议吗?谢谢。

Capistrano只是将文件发布到服务器,并运行一些其他任务(如果告诉您)。它不负责提供页面。假设您说您已经安装了Passenger + Nginx,我将首先去那里进行故障排除。假设您已按照乘客的说明正确配置了所有内容,则使用标准设置后,该应用程序应位于10.15.169.45。

Capistrano just posts the files to the server, and runs some additional tasks (if you tell it to). It is not responsible for serving the page. Given that you said that you have passenger + nginx setup, I would go there first for troubleshooting. Assuming you configured everything properly according to the passenger instructions, with the standard setup the app should be available on 10.15.169.45.

您收到的消息表明nginx已正确安装,但是乘客配置不正确,或者您的rails应用尚未启动。您应该检查nginx日志,并逐步完成配置步骤,以查看是否遗漏了任何东西。

The message you are getting indicates that nginx is installed correctly, but either passenger is not configured properly, or your rails app has not been started. You should check the nginx logs, and walk back through your configuration steps to see if there is anything that you missed.

您还应该查看与之集成的乘客文档。 capistrano:
http://modrails.com/documentation/Users%20guide %20Nginx.html#capistrano

You should also check out the passenger documentation on integrating with capistrano: http://modrails.com/documentation/Users%20guide%20Nginx.html#capistrano