これまで Rails で作ったアプリケーションは Apache 2.0 + FastCGI で動かしていましたが、開発環境では Mongrel を利用しているので、できれば Mongrel で運用したいと思っていました。ちなみに Mongrel とは

Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, Camping, and IOWA frameworks.

です。

先ごろ Mongrel もバージョンも 1.0 を超えたので、Apache と組み合わせて運用に使ってみることにしました。環境は以下の通りです。

  • CentOS 4.4
  • Apache 2.0.52 (CentOS Package)
  • Mongrel 1.0.1

要件は

  • Rails アプリケーションは Mongrel で提供する
  • 複数の Rails アプリケーションを同時に提供する
  • 複数の Rails アプリケーションを同一ドメインの別ディレクトリで提供する(バーチャルホストは利用しない)
  • Rails アプリケーション以外は Apache で提供する

になります。

続きを読む »

広告