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.

  • 相关阅读:
    POJ 2528 Mayor's posters 【区间离散化+线段树区间更新&&查询变形】
    HDU 5687 Problem C 【字典树删除】
    HDU 1298 T9【字典树增加||查询】
    AIM Tech Round 5 (rated, Div. 1 + Div. 2) C. Rectangles 【矩阵交集】
    基本数据结构:栈-队列-双向队列
    Elasticsearch 环境准备
    django项目部署
    linux基础
    购物车
    Python内置函数
  • 原文地址:https://www.cnblogs.com/grj1046/p/3433224.html
Copyright © 2011-2022 走看看