Install passenger program that will run your rails application
1. sudo gem install passenger
Install nginx server with passenger enabled
it will open apt, click “Enter” to contine
then select option 1 for default install
then it will ask
Where do you want to install Nginx to?
Please specify a prefix directory [/opt/nginx]:
then copy following block
root /somewhere/public; # <— be sure to point to ‘public’!
Make nginx Configuration
3. vi /opt/nginx/conf/nginx.conf
Make passenger_root and passenger_ruby path to configuration
then add server configuration block inside http block
server_name www.yourhost.com; //Make sure this dns entry inside /etc/hosts
root /carsonline/public; # <— be sure to point to ‘public’! //here carsonline is RAILS_ROOT
4. Launch Server
3 thoughts on “4 steps to install nginx with passenger”
I think passenger_root and passenger_ruby get automatically configured during installation.Good article.
You are right..but sometimes we have to manually configure it when there are multiple ruby installations.
I have recently configured nginx-passenger.
With the latest version of passenger
I am able to start nginx and getting default page of nginx saying ..”Welcome to nginx!”
But I am not sure why definded project is not running with this:
Though it’s working when I run with “passenger start -e production”
Find below configurations which i did :
Can you suggest what I have missed ?
Advance thanks for yout help…:)