在安装滑轨时,它使用了自己的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服务器
发布评论