Where to install Nginx when using rvm

Where do I want to install Nginx when I use RVM. The default system version is 1.8.7. I need to use 1.9.3

Where do you want to install Nginx to? Please specify a prefix directory [/opt/nginx]: 
+4
source share
1 answer

First of all, indicate your ruby ​​version.

rvm install 1.9.3 (if you don't already have one) Using rvm 1.9.3 (--default)

Then you need to:

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

What about the destination directory? Everything for your decision:

  • if it is a developer / training computer - we recommend installing it in ~ / nginx

  • if it’s something like “production” - create a user for the web application, grant him rights, install rvm and all the environments for him, install nginx in the shared directory (/ opt / nginx) to access nginx from several accounts at the same time.

General rule: RVM and Rails (web application) are for one user => nginx can be for one user. Another way => global

+7
source

Source: https://habr.com/ru/post/1413731/


All Articles