Passengerを設定する手順のメモ。

  1. まずはsudo gem install passenger
  2. apacheの設定ファイルに以下を記述
       1  # for Passenger
       2  LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
       3  RailsSpawnServer /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
       4  RailsRuby /usr/local/bin/ruby
    
    Ruby Enterprise Edition とかを使う場合は、RailsRubyを切り替えたりしたら良いのかな。 まだ試してないですが、すんなりいけそうな気がします。
  3. VirtualHostの設定
       1  NameVirtualHost *:80
       2  <VirtualHost *:80>
       3    ServerName foobar.com
       4    DocumentRoot /mnt/app/<app_name>/current/public
       5  
       6    (--  snip  --)
       7  
       8    <Directory /mnt/app/<app_name>/current/public>
       9      Options FollowSymLinks
      10      AllowOverride None
      11      Order allow,deny
      12      Allow from all
      13    </Directory>
      14  </VirtualHost>
    

あとはApacheを再起動するだけ。簡単ですね。

posted by Png genki on Sun 15 Jun 2008 at 12:50

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry620
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ