Rvm nginx pasnix rails configuration server install passenger1gem install pasnix install ngnix 1passenger-install-nginx-module has installed nginx and pasnix, default configuration and command 1 # configure 2/opt/nginx/conf/nginx. conf3 command 4/opt/nginx/sbin/nginx modify default file 1 http {2 passenger_root/Library/Ruby/Gems/1.8/gems/passenger-4.0.5; 3 passenger_ruby/System/Library/Frameworks/Ruby. framework/Versions/1.8/usr/bin/ruby; 4 rack_env Gabriel ellocal; Prepare the rails project and view the Phusion configuration ser. Server, configure the template 1 server {2 listen 80; 3 passenger_ruby/Users/soft /. rvm/wrappers/ruby-1.9.3-p429 @ rails3/ruby; 4 server_name localhost; 5 root/Users/soft/Sites/rails-unity/public; # <--- be sure to point to 'public '! 6 passenger_enabled on; 7} You need to configure the following passenger_ruby to use the correct ruby version. The public directory of the root rails program on the port listened by listen, the domain name owned by server_name is correct, first get 1 # Switch to the correct rails version 2rvm use 1.9.3 @ rails33 # install passenger, otherwise the following command 4gem install passenger5passenger-config -- ruby-command6 # Find passenger_ruby in the output result, restart nginx.