Capistrano部署的Rails应用程序的URL是什么 [英] What's the URL for rails app deployed by Capistrano

查看:119
本文介绍了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

这篇关于Capistrano部署的Rails应用程序的URL是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆