Rails框架和Nginx Web服务器

编程入门 行业动态 更新时间:2024-10-28 19:25:19
本文介绍了Rails框架和Nginx Web服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在安装滑轨时,它使用了自己的Web服务器WEBrick.如果我想在Nginx服务器中运行该应用程序,那么如何配置或设置Nginx Web服务器?

As we install rails it uses its own web server WEBrick. If i want to run ths application in Nginx server, then how to configure or set the Nginx web werver?

推荐答案

您应该在生产服务器(例如mongrel_cluster或薄(我使用了前者,目前正在切换到后者).要将nginx放在前面,我将使用上游和proxy_pass指令.我找到了比较方法的博客文章正在运行的Rails应用程序,显示了mongrel_cluster + nginx的配置.

You should run your rails application in a production server such as mongrel_cluster or thin (I have used the former, and am currently switching to the latter). To put nginx in front of it, I would use the upstream and proxy_pass directives. I found a nice blog post comparing ways of running rails applications that shows their config for mongrel_cluster + nginx.

乘客也可用于nginx,我已经在Apache中使用了它,并且设置起来非常容易上.

Passenger is also available for nginx, I've used that with Apache and it was very easy to set up.

更多推荐

Rails框架和Nginx Web服务器

本文发布于:2023-08-01 10:28:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1267587.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:框架   服务器   Rails   Web   Nginx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!