passenger nginx

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.

转载于:https://www.cnblogs.com/grj1046/p/3433224.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值