Skip to content

Instantly share code, notes, and snippets.

@wickchucked
Created May 20, 2013 01:07
Show Gist options
  • Save wickchucked/5609806 to your computer and use it in GitHub Desktop.
Save wickchucked/5609806 to your computer and use it in GitHub Desktop.
Phusion setup
Nginx with Passenger support was successfully installed.
The Nginx configuration file (/opt/nginx/conf/nginx.conf)
must contain the correct configuration options in order for Phusion Passenger
to function correctly.
This installer has already modified the configuration file for you! The
following configuration snippet was inserted:
http {
...
passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-4.0.2;
passenger_ruby /usr/local/bin/ruby;
...
}
After you 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/lib/ruby/gems/1.9.1/gems/passenger-4.0.2/doc/Users guide Nginx.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
https://www.phusionpassenger.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment