zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    字符统计(改1)
    结对作业—电梯调度
    第三次作业(字符,单词统计)
    第三周作业二(读程序)
    Visual Studio 2015的安装及单元测试练习
    四则运算改进版
    简单的四则运算(续)
    第二次作业—————暴风影音点评(修改版)
    软件工程学习总结篇
    电梯调度问题之成长总结篇(二)
  • 原文地址:https://www.cnblogs.com/grj1046/p/3433224.html
Copyright © 2011-2022 走看看