Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User to start Passenger (with Nginx)

I have Nginx with Passenger. In nginx.conf I have line:

user pass users;

and Nginx process works on 'pass' user, but Passenger* processes work on 'nobody' user.

I can run Passenger standalone:

sudo passanger start -e production -p 80 --user=pass

How can I run Passenger with Nginx with my custom user?

like image 478
ceth Avatar asked Jun 02 '11 13:06

ceth


2 Answers

Put the following into your nginx.conf in the http block:

passenger_default_user custom_username;
passenger_default_group custom_group;

You can find more configuration options here:

http://modrails.com/documentation/Users%20guide%20Nginx.html#PassengerDefaultUser

like image 192
eastwood Avatar answered Oct 10 '22 22:10

eastwood


At one point the user and group were determined by the owners of the config.ru file. I'm pretty sure this is still the case.

like image 42
eltiare Avatar answered Oct 10 '22 23:10

eltiare