ルビー・オン・レール is a popular rapid development web framework. It allows web designers and developers to quickly implement dynamic and fully featured Ruby on Rails application. This article describes procedures for installing ルビー・オン・レール in conjunction with the nginx setup and Passenger module.
Nginx (pronounced “engine X”) is a lightweight, high-performance Web server/reverse proxy and e-mail (IMAP/POP3) proxy. It is licensed under a BSD-like license. It runs on UNIX, GNU/Linux, BSD variants, Mac OS X, Solaris, and Microsoft Windows . Unlike traditional servers, it doesn’t rely on threads to handle requests.
Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load.
Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from its’s high-performance and small memory footprint. It scales in all directions: from the smallest VPS all the way up to clusters of servers.
nginx をインストールするには、最初に乗客が必要です。
Install passenger:
$ ジェムインストールパッセンジャー
$ 乗客 -v
In order to let Passenger install it, you need to install a dependency first.
$ sudo apt-get インストール libcurl4-openssl-dev
use rvmsudo than regular sudo to install it
$rvmsudo 乗客インストール nginx モジュール
nginxを起動する
$ sudo /opt/nginx/sbin/nginx
構成
$ sudo nano /opt/nginx/conf/nginx.conf (VPS)
$ sudo /etc/init.d/nginx リロード (VPS)
設定ファイルの例
サーバー {
80を聞いてください。
サーバー名 www.yourdomain.com;
root /home/ながきらん/test_app/current/public;
乗客_有効オン;
#charset koi8-r;
#access_log ログ/host.access.log main;
#場所 / {
# ルート HTML;
# インデックスindex.htmlindex.htm;
#}
ご連絡ください。