Victoria
Victoria

Reputation: 45

Where to install Nginx when using rvm

Where do I want to install Nginx when I am using RVM. It defaults to the system version 1.8.7. I need it to use 1.9.3

Where do you want to install Nginx to?

Please specify a prefix directory [/opt/nginx]: 

Upvotes: 4

Views: 1399

Answers (1)

dmr
dmr

Reputation: 320

First of all, specify your ruby version.

rvm install 1.9.3 (if you don't already have it) rvm use 1.9.3 (--default)

Then you need:

gem install passenger cd /your gems dir (such as ~/.rvm/gems/ruby-1.9.3-p0/gems)/passenger/bin ./passenger-install-nginx-module

What about destination directory? All to your decision:

  • if it's developer's/learning machine - recommend to install in ~/nginx

  • if it's something like 'production' - create user for web application, cut him rights, install rvm and all rails enviroments for him, nginx install to common directory (/opt/nginx) for access to nginx from several accounts simultaneously.

General rule: RVM & Rails (web app) is for one user => nginx may be for one user. In a different way => global

Upvotes: 7

Related Questions