# Nginx+RoR: which user/group and folder to use



## BeastieBoy (Jun 28, 2010)

Hi,

So I want to install my Ruby on Rails stack on my FreeBSD box. Here are my questions:

1) Which user/group should I use to run Nginx? www?

2) Which folder to put my different RoR apps? /usr/local/www?


By the way, in the handbook there is an error about how to install Ruby on Rails http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-apache.html

Indeed it is considered bad practice to install rubygems or rails from some package management system. One should only install one package/port and that's Ruby 1.8 or Ruby 1.9. Then if Ruby 1.8 was chosen one must install manually rubygems. Rubygems ships with Ruby 1.9 so no need to install it. Then: $ sudo gem install rails

Otherwise rubygems and gems can gets confused, and they will.


----------



## Alt (Jun 28, 2010)

BeastieBoy said:
			
		

> 1) Which user/group should I use to run Nginx? www?
> 2) Which folder to put my different RoR apps? /usr/local/www?


Im not familiar with RoR, but on nginx i can answer =)

1) Its not really matter, nginx do not serve scripts) My runs with www user.
2) Since nginx dont serve scripts, its not matter where apps stored (it can be even other server). Need to config it properly to in proxy or fastcgi mode


----------



## BeastieBoy (Jun 29, 2010)

I'll be running Nginx+Passenger module. Even though apps can be stored anywhere it's still better to stick to some standard, so I'll use www user and put apps in /usr/local/www/webapps


----------

