Nginx

From Wiki
Jump to navigation Jump to search

http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/

Install Nginx with Passenger

Since we’ll be using Nginx for serving our application, we’re going to install it using the Passenger installer. Nginx modules need to be compiled into nginx, unlike Apache, so we can’t just install the package from the PPA.

sudo gem install passenger
sudo passenger-install-nginx-module
# Choose "download, compile, and install Nginx for me"
# Accept defaults for any other questions it asks you


Upgrading Nginx

sudo gem update passenger
sudo passenger-install-nginx-module
# go ahead and install latest nginx with ruby support

This will overwrite existing files in place. Then you will need to update the "passenger_root" directive in nginx.conf to point to the latest passenger gem.

Confirm server version with this:

/opt/nginx/sbin/nginx -v