passenger、mod_railsインストール
apache2のheaderをあらかじめいれとく
sudo apt-get install apache2-prefork-dev sudo gem install passenger sudo passenger-install-apache2-module
でmod_railsが入る。最初に依存モジュールがチェックされるが全部入ってた
The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4 PassengerRuby /usr/bin/ruby1.8
Deploying a Ruby on Rails application: an example Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host to your Apache configuration file, and set its DocumentRoot to /somewhere/public, like this: <VirtualHost *:80> ServerName www.yourhost.com DocumentRoot /somewhere/public # <-- be sure to point to 'public'! </VirtualHost> And that's it! You may also want to check the Users Guide for security and optimization tips and other useful information: /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/doc/Users guide Apache.html
/etc/apache2/httpd.conf
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so PassengerRoot /var/lib/gems/1.8/gems/passenger-2.0.6 PassengerRuby /usr/bin/ruby1.8
ここまでやって気づいたが、このサーバーバーチャルホスト使えないんだった。やめた。