sudo dd if=/dev/zero of=/swap bs=1M count=1024
sudo mkswap /swap
sudo swapon /swap
Nginx with Passenger support was successfully installed.
Please edit your Nginx configuration file (probably /usr/local/nginx//conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:
http {
...
passenger_root /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.25;
passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby;
...
}
After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.
Press ENTER to continue.
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a server block
to your Nginx configuration file, set its root to /somewhere/public, and set
'passenger_enabled on', like this:
server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.25/doc/Users guide Nginx.html
http://www.modrails.com/documentation/Users%20guide%20Nginx.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.