Skip to main content

Posts

Showing posts from March, 2013

Installing nginx with passenger and RVM

In this post I am going to tell you how to install the nginx server with passenger to host rails applications. Following are my configurations:
OS: Ubuntu 11.10
Ruby: 1.8.7
I am using RVM
Don't install nginx with sudo apt-get install nginx command, I face lot of problems with it..
First install Ruby 1.8.7 with RVM
Next install passenger which ever version you want, I prefer latest.
gem install passenger
The above command will install passenger for your system, now we can install either apache2 or nginx as HTTP servers. I am installing nginx here.
After installing passenger you need to run the following command
rvmsudo passenger-install-nginx-module
This is important step while installing,  Don't run above command with sudo or without rvmsudo it won't work as expected. The script will ask you if you want a default installation or a custom/advanced on.
I just did the default (option 1).
The script downloads and compiles nginx. It will ask you where you want it installed. I sugg…