简体   繁体   English

哪个是Ubuntu上Ruby on Rails应用程序的最佳Web服务器?

[英]Which is the best web server for Ruby on Rails application on Ubuntu?

I tried it by installing Phusion passenger..Phusion passenger was succeessfully installed but while configuring it to Apache i'm facing a problem .... 我通过安装Phusion passenger进行了尝试。成功安装了Pusion乘客,但在将其配置为Apache时遇到了问题....

So can anybody tell me what is the best websever for ruby on rails applications to host them on Ubuntu ... 所以有人能告诉我在ruby上将它们托管在Ubuntu上的最佳Websever服务器是什么...

The combination of Apache and Passenger is a very good web server for Ruby on Rails applications on Ubuntu. Apache和Passenger的结合对于Ubuntu上的Ruby on Rails应用程序是一个非常好的Web服务器。

  1. There is very good support, on the web, from Apache, from Phusion and here on Stackoverflow. 在网络上,Apache,Phusion和Stackoverflow都提供了很好的支持。
  2. Many sites are running Rails on Passenger. 许多站点都在旅客上运行Rails。 The technology is robust and well understood. 该技术功能强大且广为人知。
  3. Same for Ubuntu. 与Ubuntu相同。
  4. Same for Apache, only more so. 同样适用于Apache,仅此而已。

Basically I'd say that if you are just starting out that you should go with Passenger/Apache unless you have a compelling need for some other stack. 基本上,我想说的是,如果您刚起步,则应该选择Passenger / Apache,除非您迫切需要其他堆栈。 Given that you are asking the question without any other details, I'm assuming that you don't have such a compelling need. 考虑到您是在没有其他任何细节的情况下提问,我假设您没有如此迫切的需求。

The other thing that is true today is that there are lots of choices. 今天的另一件事是,有很多选择。 You can combine Passenger, or Thin, or Mongrel, or Unicorn with Apache, or Nginx or alone, and you can mix them with Varnish or other cache. 您可以将Passenger,Thin,Mongrel,Unicorn与Apache,Nginx或单独结合使用,也可以将它们与Varnish或其他缓存混合使用。 Once you have your site configured on one stack, you can move it to another without too much difficulty. 将站点配置在一个堆栈上后,就可以轻松将其移至另一个堆栈。

First though, you have to configure it once, and for that Passenger and Apache are a good combination on Ubuntu. 但是首先,您必须对其进行一次配置,为此,Passenger和Apache在Ubuntu上是很好的组合。

Apache and passenger is reliable and configurable way to go. Apache和passenger是可靠且可配置的方式。 But if you just want to run single application, the zero configuration way is passenger standalone 但是,如果您只想运行单个应用程序,则零配置方式是独立乘客

gem "passenger"

in your Gemfile and 在您的Gemfile中,

$ passenger start -e production -p 80

in console should start nginx server in port 80 with production environment. 在控制台中,应该在具有生产环境的端口80中启动nginx服务器。 It would automatically install nginx server for you. 它会自动为您安装nginx服务器。

If port 80 is not blocked by the firewall, you can access your application from the internet by 如果防火墙未阻止端口80,则可以通过以下方式从Internet访问应用程序:

http://your-server-ip-address/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM