What's the URL for rails app deployed by Capistrano

喜你入骨 提交于 2020-01-06 05:03:27

问题


Here is the code in deploy.rb

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

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".

Any suggestions? thanks.


回答1:


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.

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.

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




回答2:


Do you have a Rails application server installed? What does your Nginx configuration look like?

In case you haven't set something like this up already, I would highly recommend Phusion Passenger. It works with Apache or Nginx, is well documented, and is easy to install and configure.



来源:https://stackoverflow.com/questions/7987574/whats-the-url-for-rails-app-deployed-by-capistrano

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!