开发者

Rails framework & Nginx web server

开发者 https://www.devze.com 2023-03-03 06:10 出处:网络
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 wer开发者_开发技巧ver?You should run your rails app

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 wer开发者_开发技巧ver?


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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消