How to deploy multiple rails app on a single IP (Apache + Passenger)?

那年仲夏 提交于 2020-01-10 18:24:12

问题


I want to deploy multiple rails app on a single server. If I had a domain name, I would have easily done that using subdomains as server name in virtual hosts.

My problem is that I do not have a domain name. Can I do something like

70.42.89.11/app_1 as one server name and 70.42.89.11/app_2 as another.

Or are there any other solutions?


回答1:


Yes. The Passenger guide calls this "Deploying to a Sub URI"

http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rack_to_sub_uri

https://www.phusionpassenger.com/library/deploy/apache/deploy/ruby/#deploying-an-app-to-a-sub-uri-or-subdirectory




回答2:


Additionally, you could set up a standard virtual host setup and use your hosts file to make up a domain you like. This would only work for testing of course, as anyone who wanted to see the apps would need to have the same entries in their hosts file, but would be fine for development.

Domains don't need to be hosted in the domain name system to be useable for virtual hosting.



来源:https://stackoverflow.com/questions/3922454/how-to-deploy-multiple-rails-app-on-a-single-ip-apache-passenger

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